@harbour-enterprises/superdoc 0.24.0-next.2 → 0.24.0-next.4

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 (82) hide show
  1. package/dist/chunks/{PdfViewer--Z8scsXq.es.js → PdfViewer-D7C8g2G4.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-CYiJzT44.cjs → PdfViewer-kOVuv-4I.cjs} +1 -1
  3. package/dist/chunks/blank-docx-ABm6XYAA.es.js +4 -0
  4. package/dist/chunks/blank-docx-DfW3Eeh2.cjs +3 -0
  5. package/dist/chunks/{index-CBSXpA57.cjs → index-BFKwBQjS.cjs} +12 -4
  6. package/dist/chunks/{index-CCf_X9Jy.es.js → index-CnEAVnHQ.es.js} +12 -4
  7. package/dist/chunks/{super-editor.es-CZFQdEKI.cjs → super-editor.es-BmGTQ05x.cjs} +1954 -1216
  8. package/dist/chunks/{super-editor.es-BFco6Gra.es.js → super-editor.es-CBPoWvjs.es.js} +1954 -1216
  9. package/dist/core/SuperDoc.d.ts.map +1 -1
  10. package/dist/core/types/index.d.ts.map +1 -1
  11. package/dist/style.css +32 -31
  12. package/dist/super-editor/ai-writer.es.js +2 -2
  13. package/dist/super-editor/chunks/{converter-nWAUAQ83.js → converter-DpPj67OW.js} +1537 -1175
  14. package/dist/super-editor/chunks/{docx-zipper-B2uMUaj9.js → docx-zipper-6Kc95yG-.js} +1 -1
  15. package/dist/super-editor/chunks/{editor-DAyiX5AL.js → editor-Dx6AhT5N.js} +454 -57
  16. package/dist/super-editor/chunks/{toolbar-LmzuO_YJ.js → toolbar-CXSg2lJ9.js} +2 -2
  17. package/dist/super-editor/converter.es.js +1 -1
  18. package/dist/super-editor/docx-zipper.es.js +2 -2
  19. package/dist/super-editor/editor.es.js +3 -3
  20. package/dist/super-editor/file-zipper.es.js +1 -1
  21. package/dist/super-editor/style.css +5 -4
  22. package/dist/super-editor/super-editor/src/core/Editor.d.ts +11 -0
  23. package/dist/super-editor/super-editor/src/core/helpers/canRenderFont.d.ts +12 -0
  24. package/dist/super-editor/super-editor/src/core/super-converter/SuperConverter.d.ts +6 -1
  25. package/dist/super-editor/super-editor/src/core/super-converter/helpers.d.ts +23 -1
  26. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/docxImporter.d.ts +3 -1
  27. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/tableImporter.d.ts +5 -3
  28. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/trackChangesImporter.d.ts +5 -0
  29. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/types/index.d.ts +5 -0
  30. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/helpers.d.ts +1 -0
  31. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/utils.d.ts +9 -0
  32. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/del/del-translator.d.ts +7 -0
  33. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/del/index.d.ts +1 -0
  34. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/gridSpan/gridSpan-translator.d.ts +6 -0
  35. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/gridSpan/index.d.ts +1 -0
  36. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/header/header-translator.d.ts +6 -0
  37. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/header/index.d.ts +1 -0
  38. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/headers/headers-translator.d.ts +7 -0
  39. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/headers/index.d.ts +1 -0
  40. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/hideMark/hideMark-translator.d.ts +6 -0
  41. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/hideMark/index.d.ts +1 -0
  42. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ins/index.d.ts +1 -0
  43. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/ins/ins-translator.d.ts +7 -0
  44. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/noWrap/index.d.ts +1 -0
  45. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/noWrap/noWrap-translator.d.ts +6 -0
  46. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/shd/shd-translator.d.ts +1 -1
  47. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tc/helpers/translate-table-cell.d.ts +0 -5
  48. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcBorders/index.d.ts +1 -0
  49. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcBorders/tcBorders-translator.d.ts +6 -0
  50. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcFitText/index.d.ts +1 -0
  51. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcFitText/tcFitText-translator.d.ts +6 -0
  52. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcMar/index.d.ts +1 -0
  53. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcMar/tcMar-translator.d.ts +6 -0
  54. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcPr/index.d.ts +1 -0
  55. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcPr/tcPr-translator.d.ts +5 -0
  56. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcW/index.d.ts +1 -0
  57. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcW/tcW-translator.d.ts +6 -0
  58. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textDirection/index.d.ts +1 -0
  59. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textDirection/textDirection-translator.d.ts +6 -0
  60. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tl2br/index.d.ts +1 -0
  61. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tl2br/tl2br-translator.d.ts +6 -0
  62. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tr2bl/index.d.ts +1 -0
  63. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tr2bl/tr2bl-translator.d.ts +6 -0
  64. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vAlign/index.d.ts +1 -0
  65. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vAlign/vAlign-translator.d.ts +6 -0
  66. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vMerge/index.d.ts +1 -0
  67. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vMerge/vMerge-translator.d.ts +6 -0
  68. package/dist/super-editor/super-editor/src/extensions/image/image.d.ts +1 -1
  69. package/dist/super-editor/super-editor/src/extensions/image/imageHelpers/index.d.ts +1 -0
  70. package/dist/super-editor/super-editor/src/extensions/image/imageHelpers/legacyAttributes.d.ts +17 -0
  71. package/dist/super-editor/super-editor/src/extensions/table-cell/table-cell.d.ts +112 -0
  72. package/dist/super-editor/super-editor.es.js +91 -76
  73. package/dist/super-editor/toolbar.es.js +2 -2
  74. package/dist/super-editor.cjs +1 -1
  75. package/dist/super-editor.es.js +1 -1
  76. package/dist/superdoc.cjs +3 -3
  77. package/dist/superdoc.es.js +3 -3
  78. package/dist/superdoc.umd.js +1964 -1218
  79. package/dist/superdoc.umd.js.map +1 -1
  80. package/package.json +1 -1
  81. package/dist/chunks/blank-docx-CPqX9RF5.cjs +0 -3
  82. package/dist/chunks/blank-docx-iwdyG9RH.es.js +0 -4
@@ -15107,14 +15107,21 @@ function twipsToInches(twips) {
15107
15107
  function twipsToPixels(twips) {
15108
15108
  if (twips == null) return;
15109
15109
  const inches = twipsToInches(twips);
15110
+ return inchesToPixels(inches);
15111
+ }
15112
+ function pixelsToTwips(pixels) {
15113
+ const inches = pixelsToInches(pixels);
15114
+ return inchesToTwips(inches);
15115
+ }
15116
+ function inchesToPixels(inches) {
15110
15117
  if (inches == null) return;
15111
15118
  const pixels = inches * 96;
15112
15119
  return Math.round(pixels * 1e3) / 1e3;
15113
15120
  }
15114
- function pixelsToTwips(pixels) {
15121
+ function pixelsToInches(pixels) {
15115
15122
  if (pixels == null) return;
15116
15123
  const inches = Number(pixels) / 96;
15117
- return inchesToTwips(inches);
15124
+ return inches;
15118
15125
  }
15119
15126
  function twipsToLines(twips) {
15120
15127
  if (twips == null) return;
@@ -15139,9 +15146,9 @@ function pixelsToEmu(px) {
15139
15146
  if (typeof px === "string") px = parseFloat(px);
15140
15147
  return Math.round(px * 9525);
15141
15148
  }
15142
- function eigthPointsToPixels(eigthPoints) {
15143
- if (eigthPoints == null) return;
15144
- const points = parseFloat(eigthPoints) / 8;
15149
+ function eighthPointsToPixels(eighthPoints) {
15150
+ if (eighthPoints == null) return;
15151
+ const points = parseFloat(eighthPoints) / 8;
15145
15152
  const pixels = points * 1.3333;
15146
15153
  return pixels;
15147
15154
  }
@@ -15165,6 +15172,71 @@ function degreesToRot(degrees) {
15165
15172
  if (degrees == null) return;
15166
15173
  return degrees * 6e4;
15167
15174
  }
15175
+ function pixelsToPolygonUnits(pixels) {
15176
+ if (pixels == null) return;
15177
+ const pu = pixels * 96;
15178
+ return Math.round(pu);
15179
+ }
15180
+ function polygonUnitsToPixels(pu) {
15181
+ if (pu == null) return;
15182
+ const pixels = Number(pu) / 96;
15183
+ return Math.round(pixels * 1e3) / 1e3;
15184
+ }
15185
+ function polygonToObj(polygonNode) {
15186
+ if (!polygonNode) return null;
15187
+ const points = [];
15188
+ polygonNode.elements.forEach((element) => {
15189
+ if (["wp:start", "wp:lineTo"].includes(element.name)) {
15190
+ const { x, y: y2 } = element.attributes;
15191
+ points.push([polygonUnitsToPixels(x), polygonUnitsToPixels(y2)]);
15192
+ }
15193
+ });
15194
+ if (points.length > 1) {
15195
+ const firstPoint = points[0];
15196
+ const lastPoint = points[points.length - 1];
15197
+ if (firstPoint[0] === lastPoint[0] && firstPoint[1] === lastPoint[1]) {
15198
+ points.pop();
15199
+ }
15200
+ }
15201
+ return points;
15202
+ }
15203
+ function objToPolygon(points) {
15204
+ if (!points || !Array.isArray(points)) return null;
15205
+ const polygonNode = {
15206
+ name: "wp:wrapPolygon",
15207
+ type: "wp:wrapPolygon",
15208
+ attributes: {
15209
+ edited: "0"
15210
+ },
15211
+ elements: []
15212
+ };
15213
+ points.forEach((point, index2) => {
15214
+ const [x, y2] = point;
15215
+ const tagName = index2 === 0 ? "wp:start" : "wp:lineTo";
15216
+ const pointNode = {
15217
+ name: tagName,
15218
+ type: tagName,
15219
+ attributes: {
15220
+ x: pixelsToPolygonUnits(x),
15221
+ y: pixelsToPolygonUnits(y2)
15222
+ }
15223
+ };
15224
+ polygonNode.elements.push(pointNode);
15225
+ });
15226
+ if (points.length > 0) {
15227
+ const [startX, startY] = points[0];
15228
+ const closePointNode = {
15229
+ name: "wp:lineTo",
15230
+ type: "wp:lineTo",
15231
+ attributes: {
15232
+ x: pixelsToPolygonUnits(startX),
15233
+ y: pixelsToPolygonUnits(startY)
15234
+ }
15235
+ };
15236
+ polygonNode.elements.push(closePointNode);
15237
+ }
15238
+ return polygonNode;
15239
+ }
15168
15240
  const getTextIndentExportValue = (indent) => {
15169
15241
  const [value, unit] = parseSizeUnit(indent);
15170
15242
  const functionsMap = {
@@ -24480,37 +24552,37 @@ const _NodeTranslator = class _NodeTranslator2 {
24480
24552
  };
24481
24553
  __publicField$2(_NodeTranslator, "translatorTypes", TranslatorTypes);
24482
24554
  let NodeTranslator = _NodeTranslator;
24483
- const encode$1c = (attributes) => {
24555
+ const encode$1b = (attributes) => {
24484
24556
  return attributes["w:type"];
24485
24557
  };
24486
- const decode$14 = (attrs) => {
24558
+ const decode$13 = (attrs) => {
24487
24559
  const { lineBreakType } = attrs;
24488
24560
  return lineBreakType;
24489
24561
  };
24490
24562
  const attrConfig$G = Object.freeze({
24491
24563
  xmlName: "w:type",
24492
24564
  sdName: "lineBreakType",
24493
- encode: encode$1c,
24494
- decode: decode$14
24565
+ encode: encode$1b,
24566
+ decode: decode$13
24495
24567
  });
24496
- const encode$1b = (attributes) => {
24568
+ const encode$1a = (attributes) => {
24497
24569
  const xmlAttrValue = attributes["w:clear"];
24498
24570
  return xmlAttrValue;
24499
24571
  };
24500
- const decode$13 = (attrs) => {
24572
+ const decode$12 = (attrs) => {
24501
24573
  const { clear } = attrs;
24502
24574
  return clear;
24503
24575
  };
24504
24576
  const attrConfig$F = Object.freeze({
24505
24577
  xmlName: "w:clear",
24506
24578
  sdName: "clear",
24507
- encode: encode$1b,
24508
- decode: decode$13
24579
+ encode: encode$1a,
24580
+ decode: decode$12
24509
24581
  });
24510
- const validXmlAttributes$n = [attrConfig$G, attrConfig$F];
24511
- const XML_NODE_NAME$z = "w:br";
24582
+ const validXmlAttributes$p = [attrConfig$G, attrConfig$F];
24583
+ const XML_NODE_NAME$y = "w:br";
24512
24584
  const SD_NODE_NAME$h = "lineBreak";
24513
- const encode$1a = (_2, encodedAttrs) => {
24585
+ const encode$19 = (_2, encodedAttrs) => {
24514
24586
  const isPageBreak = encodedAttrs?.lineBreakType === "page";
24515
24587
  const translated = {
24516
24588
  type: isPageBreak ? "hardBreak" : "lineBreak"
@@ -24520,7 +24592,7 @@ const encode$1a = (_2, encodedAttrs) => {
24520
24592
  }
24521
24593
  return translated;
24522
24594
  };
24523
- const decode$12 = (params2, decodedAttrs) => {
24595
+ const decode$11 = (params2, decodedAttrs) => {
24524
24596
  const { node } = params2;
24525
24597
  if (!node) return;
24526
24598
  const wBreak = { name: "w:br" };
@@ -24537,39 +24609,39 @@ const decode$12 = (params2, decodedAttrs) => {
24537
24609
  };
24538
24610
  return translated;
24539
24611
  };
24540
- const config$w = {
24541
- xmlName: XML_NODE_NAME$z,
24612
+ const config$x = {
24613
+ xmlName: XML_NODE_NAME$y,
24542
24614
  sdNodeOrKeyName: SD_NODE_NAME$h,
24543
24615
  type: NodeTranslator.translatorTypes.NODE,
24544
- encode: encode$1a,
24545
- decode: decode$12,
24546
- attributes: validXmlAttributes$n
24616
+ encode: encode$19,
24617
+ decode: decode$11,
24618
+ attributes: validXmlAttributes$p
24547
24619
  };
24548
- const translator$1a = NodeTranslator.from(config$w);
24549
- const encode$19 = (attributes) => attributes?.["w:val"];
24550
- const decode$11 = (attrs) => attrs?.highlight;
24620
+ const translator$1r = NodeTranslator.from(config$x);
24621
+ const encode$18 = (attributes) => attributes?.["w:val"];
24622
+ const decode$10 = (attrs) => attrs?.highlight;
24551
24623
  const attrConfig$E = Object.freeze({
24552
24624
  xmlName: "w:val",
24553
24625
  sdName: "highlight",
24554
- encode: encode$19,
24555
- decode: decode$11
24626
+ encode: encode$18,
24627
+ decode: decode$10
24556
24628
  });
24557
- const validXmlAttributes$m = [attrConfig$E];
24558
- const XML_NODE_NAME$y = "w:highlight";
24559
- const SD_ATTR_KEY$g = "highlight";
24629
+ const validXmlAttributes$o = [attrConfig$E];
24630
+ const XML_NODE_NAME$x = "w:highlight";
24631
+ const SD_ATTR_KEY$f = "highlight";
24560
24632
  const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
24561
- const encode$18 = (params2, encodedAttrs = {}) => {
24633
+ const encode$17 = (params2, encodedAttrs = {}) => {
24562
24634
  const { nodes } = params2;
24563
24635
  const node = nodes?.[0];
24564
24636
  const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
24565
24637
  return {
24566
24638
  type: "attr",
24567
- xmlName: XML_NODE_NAME$y,
24568
- sdNodeOrKeyName: SD_ATTR_KEY$g,
24639
+ xmlName: XML_NODE_NAME$x,
24640
+ sdNodeOrKeyName: SD_ATTR_KEY$f,
24569
24641
  attributes: { "w:val": value ?? null }
24570
24642
  };
24571
24643
  };
24572
- const decode$10 = (params2) => {
24644
+ const decode$$ = (params2) => {
24573
24645
  const attrs = params2?.node?.attrs || {};
24574
24646
  const highlightValue = attrs.highlight ?? attrs.color ?? null;
24575
24647
  if (!highlightValue) return void 0;
@@ -24577,14 +24649,14 @@ const decode$10 = (params2) => {
24577
24649
  if (!normalizedValue) return void 0;
24578
24650
  if (DISABLED_TOKENS.has(normalizedValue)) {
24579
24651
  return {
24580
- name: XML_NODE_NAME$y,
24652
+ name: XML_NODE_NAME$x,
24581
24653
  attributes: { "w:val": "none" }
24582
24654
  };
24583
24655
  }
24584
24656
  const keyword = getDocxHighlightKeywordFromHex(highlightValue);
24585
24657
  if (keyword) {
24586
24658
  return {
24587
- name: XML_NODE_NAME$y,
24659
+ name: XML_NODE_NAME$x,
24588
24660
  attributes: { "w:val": keyword }
24589
24661
  };
24590
24662
  }
@@ -24599,63 +24671,63 @@ const decode$10 = (params2) => {
24599
24671
  }
24600
24672
  };
24601
24673
  };
24602
- const config$v = {
24603
- xmlName: XML_NODE_NAME$y,
24604
- sdNodeOrKeyName: SD_ATTR_KEY$g,
24674
+ const config$w = {
24675
+ xmlName: XML_NODE_NAME$x,
24676
+ sdNodeOrKeyName: SD_ATTR_KEY$f,
24605
24677
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
24606
- encode: encode$18,
24607
- decode: decode$10,
24608
- attributes: validXmlAttributes$m
24678
+ encode: encode$17,
24679
+ decode: decode$$,
24680
+ attributes: validXmlAttributes$o
24609
24681
  };
24610
- const translator$19 = NodeTranslator.from(config$v);
24611
- const encode$17 = (attributes) => {
24682
+ const translator$1q = NodeTranslator.from(config$w);
24683
+ const encode$16 = (attributes) => {
24612
24684
  return attributes["w:val"];
24613
24685
  };
24614
- const decode$$ = (attrs) => {
24686
+ const decode$_ = (attrs) => {
24615
24687
  const { tabSize } = attrs || {};
24616
24688
  return tabSize;
24617
24689
  };
24618
24690
  const attrConfig$D = Object.freeze({
24619
24691
  xmlName: "w:val",
24620
24692
  sdName: "tabSize",
24621
- encode: encode$17,
24622
- decode: decode$$
24693
+ encode: encode$16,
24694
+ decode: decode$_
24623
24695
  });
24624
- const encode$16 = (attributes) => {
24696
+ const encode$15 = (attributes) => {
24625
24697
  return attributes["w:leader"];
24626
24698
  };
24627
- const decode$_ = (attrs) => {
24699
+ const decode$Z = (attrs) => {
24628
24700
  const { leader } = attrs || {};
24629
24701
  return leader;
24630
24702
  };
24631
24703
  const attrConfig$C = Object.freeze({
24632
24704
  xmlName: "w:leader",
24633
24705
  sdName: "leader",
24634
- encode: encode$16,
24635
- decode: decode$_
24706
+ encode: encode$15,
24707
+ decode: decode$Z
24636
24708
  });
24637
- const encode$15 = (attributes) => {
24709
+ const encode$14 = (attributes) => {
24638
24710
  return attributes["w:pos"];
24639
24711
  };
24640
- const decode$Z = (attrs) => {
24712
+ const decode$Y = (attrs) => {
24641
24713
  const { pos } = attrs || {};
24642
24714
  return pos;
24643
24715
  };
24644
24716
  const attrConfig$B = Object.freeze({
24645
24717
  xmlName: "w:pos",
24646
24718
  sdName: "pos",
24647
- encode: encode$15,
24648
- decode: decode$Z
24719
+ encode: encode$14,
24720
+ decode: decode$Y
24649
24721
  });
24650
- const validXmlAttributes$l = [attrConfig$D, attrConfig$B, attrConfig$C];
24651
- const XML_NODE_NAME$x = "w:tab";
24722
+ const validXmlAttributes$n = [attrConfig$D, attrConfig$B, attrConfig$C];
24723
+ const XML_NODE_NAME$w = "w:tab";
24652
24724
  const SD_NODE_NAME$g = "tab";
24653
- const encode$14 = (_2, encodedAttrs = {}) => {
24725
+ const encode$13 = (_2, encodedAttrs = {}) => {
24654
24726
  const translated = { type: "tab" };
24655
24727
  if (encodedAttrs) translated.attrs = { ...encodedAttrs };
24656
24728
  return translated;
24657
24729
  };
24658
- const decode$Y = (params2, decodedAttrs = {}) => {
24730
+ const decode$X = (params2, decodedAttrs = {}) => {
24659
24731
  const { node } = params2 || {};
24660
24732
  if (!node) return;
24661
24733
  const wTab = { name: "w:tab" };
@@ -24671,15 +24743,15 @@ const decode$Y = (params2, decodedAttrs = {}) => {
24671
24743
  }
24672
24744
  return translated;
24673
24745
  };
24674
- const config$u = {
24675
- xmlName: XML_NODE_NAME$x,
24746
+ const config$v = {
24747
+ xmlName: XML_NODE_NAME$w,
24676
24748
  sdNodeOrKeyName: SD_NODE_NAME$g,
24677
24749
  type: NodeTranslator.translatorTypes.NODE,
24678
- encode: encode$14,
24679
- decode: decode$Y,
24680
- attributes: validXmlAttributes$l
24750
+ encode: encode$13,
24751
+ decode: decode$X,
24752
+ attributes: validXmlAttributes$n
24681
24753
  };
24682
- const translator$18 = NodeTranslator.from(config$u);
24754
+ const translator$1p = NodeTranslator.from(config$v);
24683
24755
  const mergeTextNodes = (nodes) => {
24684
24756
  if (!nodes || !Array.isArray(nodes)) {
24685
24757
  return nodes;
@@ -24905,9 +24977,9 @@ const parseParagraphBorders = (pBdr) => {
24905
24977
  const { attributes: a } = el;
24906
24978
  if (a["w:val"] === "nil" || a["w:val"] === void 0) return;
24907
24979
  let sizePx;
24908
- if (a["w:sz"] !== void 0) sizePx = eigthPointsToPixels(a["w:sz"]);
24980
+ if (a["w:sz"] !== void 0) sizePx = eighthPointsToPixels(a["w:sz"]);
24909
24981
  let spacePx;
24910
- if (a["w:space"] !== void 0) spacePx = eigthPointsToPixels(a["w:space"]);
24982
+ if (a["w:space"] !== void 0) spacePx = eighthPointsToPixels(a["w:space"]);
24911
24983
  result[side] = {
24912
24984
  val: a["w:val"],
24913
24985
  size: sizePx,
@@ -25197,91 +25269,91 @@ const handleParagraphNode$1 = (params2) => {
25197
25269
  }
25198
25270
  return schemaNode;
25199
25271
  };
25200
- const encode$13 = (attributes) => {
25272
+ const encode$12 = (attributes) => {
25201
25273
  return attributes["w:rsidDel"];
25202
25274
  };
25203
- const decode$X = (attrs) => {
25275
+ const decode$W = (attrs) => {
25204
25276
  return attrs.rsidDel;
25205
25277
  };
25206
25278
  const attrConfig$A = Object.freeze({
25207
25279
  xmlName: "w:rsidDel",
25208
25280
  sdName: "rsidDel",
25209
- encode: encode$13,
25210
- decode: decode$X
25281
+ encode: encode$12,
25282
+ decode: decode$W
25211
25283
  });
25212
- const encode$12 = (attributes) => {
25284
+ const encode$11 = (attributes) => {
25213
25285
  return attributes["w:rsidP"];
25214
25286
  };
25215
- const decode$W = (attrs) => {
25287
+ const decode$V = (attrs) => {
25216
25288
  return attrs.rsidP;
25217
25289
  };
25218
25290
  const attrConfig$z = Object.freeze({
25219
25291
  xmlName: "w:rsidP",
25220
25292
  sdName: "rsidP",
25221
- encode: encode$12,
25222
- decode: decode$W
25293
+ encode: encode$11,
25294
+ decode: decode$V
25223
25295
  });
25224
- const encode$11 = (attributes) => {
25296
+ const encode$10 = (attributes) => {
25225
25297
  return attributes["w:rsidR"];
25226
25298
  };
25227
- const decode$V = (attrs) => {
25299
+ const decode$U = (attrs) => {
25228
25300
  return attrs.rsidR;
25229
25301
  };
25230
25302
  const attrConfig$y = Object.freeze({
25231
25303
  xmlName: "w:rsidR",
25232
25304
  sdName: "rsidR",
25233
- encode: encode$11,
25234
- decode: decode$V
25305
+ encode: encode$10,
25306
+ decode: decode$U
25235
25307
  });
25236
- const encode$10 = (attributes) => {
25308
+ const encode$$ = (attributes) => {
25237
25309
  return attributes["w:rsidRPr"];
25238
25310
  };
25239
- const decode$U = (attrs) => {
25311
+ const decode$T = (attrs) => {
25240
25312
  return attrs.rsidRPr;
25241
25313
  };
25242
25314
  const attrConfig$x = Object.freeze({
25243
25315
  xmlName: "w:rsidRPr",
25244
25316
  sdName: "rsidRPr",
25245
- encode: encode$10,
25246
- decode: decode$U
25317
+ encode: encode$$,
25318
+ decode: decode$T
25247
25319
  });
25248
- const encode$$ = (attributes) => {
25320
+ const encode$_ = (attributes) => {
25249
25321
  return attributes["w:rsidRDefault"];
25250
25322
  };
25251
- const decode$T = (attrs) => {
25323
+ const decode$S = (attrs) => {
25252
25324
  return attrs.rsidRDefault;
25253
25325
  };
25254
25326
  const attrConfig$w = Object.freeze({
25255
25327
  xmlName: "w:rsidRDefault",
25256
25328
  sdName: "rsidRDefault",
25257
- encode: encode$$,
25258
- decode: decode$T
25329
+ encode: encode$_,
25330
+ decode: decode$S
25259
25331
  });
25260
- const encode$_ = (attributes) => {
25332
+ const encode$Z = (attributes) => {
25261
25333
  return attributes["w14:paraId"];
25262
25334
  };
25263
- const decode$S = (attrs) => {
25335
+ const decode$R = (attrs) => {
25264
25336
  return attrs.paraId;
25265
25337
  };
25266
25338
  const attrConfig$v = Object.freeze({
25267
25339
  xmlName: "w14:paraId",
25268
25340
  sdName: "paraId",
25269
- encode: encode$_,
25270
- decode: decode$S
25341
+ encode: encode$Z,
25342
+ decode: decode$R
25271
25343
  });
25272
- const encode$Z = (attributes) => {
25344
+ const encode$Y = (attributes) => {
25273
25345
  return attributes["w14:textId"];
25274
25346
  };
25275
- const decode$R = (attrs) => {
25347
+ const decode$Q = (attrs) => {
25276
25348
  return attrs.textId;
25277
25349
  };
25278
25350
  const attrConfig$u = Object.freeze({
25279
25351
  xmlName: "w14:textId",
25280
25352
  sdName: "textId",
25281
- encode: encode$Z,
25282
- decode: decode$R
25353
+ encode: encode$Y,
25354
+ decode: decode$Q
25283
25355
  });
25284
- const validXmlAttributes$k = [
25356
+ const validXmlAttributes$m = [
25285
25357
  attrConfig$v,
25286
25358
  attrConfig$u,
25287
25359
  attrConfig$y,
@@ -25290,9 +25362,9 @@ const validXmlAttributes$k = [
25290
25362
  attrConfig$x,
25291
25363
  attrConfig$A
25292
25364
  ];
25293
- const XML_NODE_NAME$w = "w:p";
25365
+ const XML_NODE_NAME$v = "w:p";
25294
25366
  const SD_NODE_NAME$f = "paragraph";
25295
- const encode$Y = (params2, encodedAttrs = {}) => {
25367
+ const encode$X = (params2, encodedAttrs = {}) => {
25296
25368
  const node = handleParagraphNode$1(params2);
25297
25369
  if (!node) return void 0;
25298
25370
  if (encodedAttrs && Object.keys(encodedAttrs).length) {
@@ -25300,7 +25372,7 @@ const encode$Y = (params2, encodedAttrs = {}) => {
25300
25372
  }
25301
25373
  return node;
25302
25374
  };
25303
- const decode$Q = (params2, decodedAttrs = {}) => {
25375
+ const decode$P = (params2, decodedAttrs = {}) => {
25304
25376
  const translated = translateParagraphNode(params2);
25305
25377
  if (!translated) return void 0;
25306
25378
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -25308,16 +25380,16 @@ const decode$Q = (params2, decodedAttrs = {}) => {
25308
25380
  }
25309
25381
  return translated;
25310
25382
  };
25311
- const config$t = {
25312
- xmlName: XML_NODE_NAME$w,
25383
+ const config$u = {
25384
+ xmlName: XML_NODE_NAME$v,
25313
25385
  sdNodeOrKeyName: SD_NODE_NAME$f,
25314
25386
  type: NodeTranslator.translatorTypes.NODE,
25315
- encode: encode$Y,
25316
- decode: decode$Q,
25317
- attributes: validXmlAttributes$k
25387
+ encode: encode$X,
25388
+ decode: decode$P,
25389
+ attributes: validXmlAttributes$m
25318
25390
  };
25319
- const translator$17 = NodeTranslator.from(config$t);
25320
- const encode$X = (attributes) => {
25391
+ const translator$1o = NodeTranslator.from(config$u);
25392
+ const encode$W = (attributes) => {
25321
25393
  const raw = attributes?.["w:val"];
25322
25394
  if (raw === void 0 || raw === null) return void 0;
25323
25395
  if (typeof raw === "boolean") return raw;
@@ -25327,24 +25399,24 @@ const encode$X = (attributes) => {
25327
25399
  if (val === "1" || val === "true" || val === "on") return true;
25328
25400
  return void 0;
25329
25401
  };
25330
- const decode$P = (runProps) => {
25402
+ const decode$O = (runProps) => {
25331
25403
  if (runProps?.bold === false) return "0";
25332
25404
  return void 0;
25333
25405
  };
25334
25406
  const attrConfig$t = Object.freeze({
25335
25407
  xmlName: "w:val",
25336
25408
  sdName: "bold",
25337
- encode: encode$X,
25338
- decode: decode$P
25409
+ encode: encode$W,
25410
+ decode: decode$O
25339
25411
  });
25340
- const validXmlAttributes$j = [attrConfig$t];
25341
- const XML_NODE_NAME$v = "w:b";
25342
- const SD_ATTR_KEY$f = "bold";
25343
- const encode$W = (params2, encodedAttrs = {}) => {
25412
+ const validXmlAttributes$l = [attrConfig$t];
25413
+ const XML_NODE_NAME$u = "w:b";
25414
+ const SD_ATTR_KEY$e = "bold";
25415
+ const encode$V = (params2, encodedAttrs = {}) => {
25344
25416
  const { nodes } = params2;
25345
25417
  const node = nodes[0];
25346
25418
  if (!node) return void 0;
25347
- const val = encodedAttrs?.[SD_ATTR_KEY$f];
25419
+ const val = encodedAttrs?.[SD_ATTR_KEY$e];
25348
25420
  let attributes;
25349
25421
  if (val === false) attributes = { "w:val": "0" };
25350
25422
  else if (val === true)
@@ -25352,85 +25424,85 @@ const encode$W = (params2, encodedAttrs = {}) => {
25352
25424
  else attributes = node.attributes || {};
25353
25425
  return {
25354
25426
  type: "attr",
25355
- xmlName: XML_NODE_NAME$v,
25356
- sdNodeOrKeyName: SD_ATTR_KEY$f,
25427
+ xmlName: XML_NODE_NAME$u,
25428
+ sdNodeOrKeyName: SD_ATTR_KEY$e,
25357
25429
  attributes
25358
25430
  };
25359
25431
  };
25360
- const config$s = {
25361
- xmlName: XML_NODE_NAME$v,
25362
- sdNodeOrKeyName: SD_ATTR_KEY$f,
25432
+ const config$t = {
25433
+ xmlName: XML_NODE_NAME$u,
25434
+ sdNodeOrKeyName: SD_ATTR_KEY$e,
25363
25435
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25364
- encode: encode$W,
25365
- attributes: validXmlAttributes$j
25436
+ encode: encode$V,
25437
+ attributes: validXmlAttributes$l
25366
25438
  };
25367
- const translator$16 = NodeTranslator.from(config$s);
25368
- const XML_NODE_NAME$u = "w:i";
25369
- const SD_ATTR_KEY$e = "italic";
25370
- const encode$V = (params2) => {
25439
+ const translator$1n = NodeTranslator.from(config$t);
25440
+ const XML_NODE_NAME$t = "w:i";
25441
+ const SD_ATTR_KEY$d = "italic";
25442
+ const encode$U = (params2) => {
25371
25443
  const { nodes } = params2;
25372
25444
  const node = nodes?.[0];
25373
25445
  if (!node) return void 0;
25374
25446
  return {
25375
25447
  type: "attr",
25376
- xmlName: XML_NODE_NAME$u,
25377
- sdNodeOrKeyName: SD_ATTR_KEY$e,
25448
+ xmlName: XML_NODE_NAME$t,
25449
+ sdNodeOrKeyName: SD_ATTR_KEY$d,
25378
25450
  attributes: {
25379
25451
  "w:val": node.attributes?.["w:val"] ?? null
25380
25452
  }
25381
25453
  };
25382
25454
  };
25383
- const config$r = {
25384
- xmlName: XML_NODE_NAME$u,
25385
- sdNodeOrKeyName: SD_ATTR_KEY$e,
25455
+ const config$s = {
25456
+ xmlName: XML_NODE_NAME$t,
25457
+ sdNodeOrKeyName: SD_ATTR_KEY$d,
25386
25458
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25387
- encode: encode$V
25459
+ encode: encode$U
25388
25460
  };
25389
- const translator$15 = NodeTranslator.from(config$r);
25390
- const encode$U = (attributes) => attributes?.["w:val"];
25391
- const decode$O = (attrs) => attrs?.underline;
25461
+ const translator$1m = NodeTranslator.from(config$s);
25462
+ const encode$T = (attributes) => attributes?.["w:val"];
25463
+ const decode$N = (attrs) => attrs?.underline;
25392
25464
  const attrConfig$s = Object.freeze({
25393
25465
  xmlName: "w:val",
25394
25466
  sdName: "underline",
25395
- encode: encode$U,
25396
- decode: decode$O
25467
+ encode: encode$T,
25468
+ decode: decode$N
25397
25469
  });
25398
- const encode$T = (attributes) => attributes?.["w:color"];
25399
- const decode$N = (attrs) => attrs?.color;
25470
+ const encode$S = (attributes) => attributes?.["w:color"];
25471
+ const decode$M = (attrs) => attrs?.color;
25400
25472
  const attrConfig$r = Object.freeze({
25401
25473
  xmlName: "w:color",
25402
25474
  sdName: "color",
25403
- encode: encode$T,
25404
- decode: decode$N
25475
+ encode: encode$S,
25476
+ decode: decode$M
25405
25477
  });
25406
- const encode$S = (attributes) => attributes?.["w:themeColor"];
25407
- const decode$M = (attrs) => attrs?.themeColor;
25478
+ const encode$R = (attributes) => attributes?.["w:themeColor"];
25479
+ const decode$L = (attrs) => attrs?.themeColor;
25408
25480
  const attrConfig$q = Object.freeze({
25409
25481
  xmlName: "w:themeColor",
25410
25482
  sdName: "themeColor",
25411
- encode: encode$S,
25412
- decode: decode$M
25483
+ encode: encode$R,
25484
+ decode: decode$L
25413
25485
  });
25414
- const encode$R = (attributes) => attributes?.["w:themeTint"];
25415
- const decode$L = (attrs) => attrs?.themeTint;
25486
+ const encode$Q = (attributes) => attributes?.["w:themeTint"];
25487
+ const decode$K = (attrs) => attrs?.themeTint;
25416
25488
  const attrConfig$p = Object.freeze({
25417
25489
  xmlName: "w:themeTint",
25418
25490
  sdName: "themeTint",
25419
- encode: encode$R,
25420
- decode: decode$L
25491
+ encode: encode$Q,
25492
+ decode: decode$K
25421
25493
  });
25422
- const encode$Q = (attributes) => attributes?.["w:themeShade"];
25423
- const decode$K = (attrs) => attrs?.themeShade;
25494
+ const encode$P = (attributes) => attributes?.["w:themeShade"];
25495
+ const decode$J = (attrs) => attrs?.themeShade;
25424
25496
  const attrConfig$o = Object.freeze({
25425
25497
  xmlName: "w:themeShade",
25426
25498
  sdName: "themeShade",
25427
- encode: encode$Q,
25428
- decode: decode$K
25499
+ encode: encode$P,
25500
+ decode: decode$J
25429
25501
  });
25430
- const validXmlAttributes$i = [attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o];
25431
- const XML_NODE_NAME$t = "w:u";
25432
- const SD_ATTR_KEY$d = "underline";
25433
- const encode$P = (params2, encodedAttrs = {}) => {
25502
+ const validXmlAttributes$k = [attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o];
25503
+ const XML_NODE_NAME$s = "w:u";
25504
+ const SD_ATTR_KEY$c = "underline";
25505
+ const encode$O = (params2, encodedAttrs = {}) => {
25434
25506
  const { nodes } = params2;
25435
25507
  const node = nodes?.[0];
25436
25508
  const sourceAttrs = node?.attributes || {};
@@ -25446,12 +25518,12 @@ const encode$P = (params2, encodedAttrs = {}) => {
25446
25518
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
25447
25519
  return {
25448
25520
  type: "attr",
25449
- xmlName: XML_NODE_NAME$t,
25450
- sdNodeOrKeyName: SD_ATTR_KEY$d,
25521
+ xmlName: XML_NODE_NAME$s,
25522
+ sdNodeOrKeyName: SD_ATTR_KEY$c,
25451
25523
  attributes
25452
25524
  };
25453
25525
  };
25454
- const decode$J = (params2) => {
25526
+ const decode$I = (params2) => {
25455
25527
  const attrs = params2?.node?.attrs || {};
25456
25528
  const underlineType = attrs.underlineType ?? attrs.underline ?? null;
25457
25529
  const color = attrs.underlineColor ?? attrs.color ?? null;
@@ -25469,20 +25541,20 @@ const decode$J = (params2) => {
25469
25541
  if (themeTint) attributes["w:themeTint"] = themeTint;
25470
25542
  if (themeShade) attributes["w:themeShade"] = themeShade;
25471
25543
  return {
25472
- name: XML_NODE_NAME$t,
25544
+ name: XML_NODE_NAME$s,
25473
25545
  attributes
25474
25546
  };
25475
25547
  };
25476
- const config$q = {
25477
- xmlName: XML_NODE_NAME$t,
25478
- sdNodeOrKeyName: SD_ATTR_KEY$d,
25548
+ const config$r = {
25549
+ xmlName: XML_NODE_NAME$s,
25550
+ sdNodeOrKeyName: SD_ATTR_KEY$c,
25479
25551
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25480
- encode: encode$P,
25481
- decode: decode$J,
25482
- attributes: validXmlAttributes$i
25552
+ encode: encode$O,
25553
+ decode: decode$I,
25554
+ attributes: validXmlAttributes$k
25483
25555
  };
25484
- const translator$14 = NodeTranslator.from(config$q);
25485
- const encode$O = (attributes) => {
25556
+ const translator$1l = NodeTranslator.from(config$r);
25557
+ const encode$N = (attributes) => {
25486
25558
  const raw = attributes?.["w:val"];
25487
25559
  if (raw === void 0 || raw === null) return void 0;
25488
25560
  if (typeof raw === "boolean") return raw;
@@ -25492,24 +25564,24 @@ const encode$O = (attributes) => {
25492
25564
  if (val === "1" || val === "true" || val === "on") return true;
25493
25565
  return void 0;
25494
25566
  };
25495
- const decode$I = (attrs) => {
25567
+ const decode$H = (attrs) => {
25496
25568
  if (attrs?.strike === false) return "0";
25497
25569
  return void 0;
25498
25570
  };
25499
25571
  const attrConfig$n = Object.freeze({
25500
25572
  xmlName: "w:val",
25501
25573
  sdName: "strike",
25502
- encode: encode$O,
25503
- decode: decode$I
25574
+ encode: encode$N,
25575
+ decode: decode$H
25504
25576
  });
25505
- const validXmlAttributes$h = [attrConfig$n];
25506
- const XML_NODE_NAME$s = "w:strike";
25507
- const SD_ATTR_KEY$c = "strike";
25508
- const encode$N = (params2, encodedAttrs = {}) => {
25577
+ const validXmlAttributes$j = [attrConfig$n];
25578
+ const XML_NODE_NAME$r = "w:strike";
25579
+ const SD_ATTR_KEY$b = "strike";
25580
+ const encode$M = (params2, encodedAttrs = {}) => {
25509
25581
  const { nodes } = params2;
25510
25582
  const node = nodes?.[0];
25511
25583
  if (!node) return void 0;
25512
- const val = encodedAttrs?.[SD_ATTR_KEY$c];
25584
+ const val = encodedAttrs?.[SD_ATTR_KEY$b];
25513
25585
  let attributes;
25514
25586
  if (val === false) attributes = { "w:val": "0" };
25515
25587
  else if (val === true) attributes = {};
@@ -25518,55 +25590,55 @@ const encode$N = (params2, encodedAttrs = {}) => {
25518
25590
  else if (val === true && attributes["w:val"] === void 0) delete attributes["w:val"];
25519
25591
  return {
25520
25592
  type: "attr",
25521
- xmlName: XML_NODE_NAME$s,
25522
- sdNodeOrKeyName: SD_ATTR_KEY$c,
25593
+ xmlName: XML_NODE_NAME$r,
25594
+ sdNodeOrKeyName: SD_ATTR_KEY$b,
25523
25595
  attributes
25524
25596
  };
25525
25597
  };
25526
- const config$p = {
25527
- xmlName: XML_NODE_NAME$s,
25528
- sdNodeOrKeyName: SD_ATTR_KEY$c,
25598
+ const config$q = {
25599
+ xmlName: XML_NODE_NAME$r,
25600
+ sdNodeOrKeyName: SD_ATTR_KEY$b,
25529
25601
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25530
- encode: encode$N,
25531
- attributes: validXmlAttributes$h
25602
+ encode: encode$M,
25603
+ attributes: validXmlAttributes$j
25532
25604
  };
25533
- const translator$13 = NodeTranslator.from(config$p);
25534
- const encode$M = (attributes) => attributes?.["w:val"];
25535
- const decode$H = (attrs) => attrs?.color;
25605
+ const translator$1k = NodeTranslator.from(config$q);
25606
+ const encode$L = (attributes) => attributes?.["w:val"];
25607
+ const decode$G = (attrs) => attrs?.color;
25536
25608
  const attrConfig$m = Object.freeze({
25537
25609
  xmlName: "w:val",
25538
25610
  sdName: "color",
25539
- encode: encode$M,
25540
- decode: decode$H
25611
+ encode: encode$L,
25612
+ decode: decode$G
25541
25613
  });
25542
- const encode$L = (attributes) => attributes?.["w:themeColor"];
25543
- const decode$G = (attrs) => attrs?.themeColor;
25614
+ const encode$K = (attributes) => attributes?.["w:themeColor"];
25615
+ const decode$F = (attrs) => attrs?.themeColor;
25544
25616
  const attrConfig$l = Object.freeze({
25545
25617
  xmlName: "w:themeColor",
25546
25618
  sdName: "themeColor",
25547
- encode: encode$L,
25548
- decode: decode$G
25619
+ encode: encode$K,
25620
+ decode: decode$F
25549
25621
  });
25550
- const encode$K = (attributes) => attributes?.["w:themeTint"];
25551
- const decode$F = (attrs) => attrs?.themeTint;
25622
+ const encode$J = (attributes) => attributes?.["w:themeTint"];
25623
+ const decode$E = (attrs) => attrs?.themeTint;
25552
25624
  const attrConfig$k = Object.freeze({
25553
25625
  xmlName: "w:themeTint",
25554
25626
  sdName: "themeTint",
25555
- encode: encode$K,
25556
- decode: decode$F
25627
+ encode: encode$J,
25628
+ decode: decode$E
25557
25629
  });
25558
- const encode$J = (attributes) => attributes?.["w:themeShade"];
25559
- const decode$E = (attrs) => attrs?.themeShade;
25630
+ const encode$I = (attributes) => attributes?.["w:themeShade"];
25631
+ const decode$D = (attrs) => attrs?.themeShade;
25560
25632
  const attrConfig$j = Object.freeze({
25561
25633
  xmlName: "w:themeShade",
25562
25634
  sdName: "themeShade",
25563
- encode: encode$J,
25564
- decode: decode$E
25635
+ encode: encode$I,
25636
+ decode: decode$D
25565
25637
  });
25566
- const validXmlAttributes$g = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j];
25567
- const XML_NODE_NAME$r = "w:color";
25568
- const SD_ATTR_KEY$b = "color";
25569
- const encode$I = (params2, encodedAttrs = {}) => {
25638
+ const validXmlAttributes$i = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j];
25639
+ const XML_NODE_NAME$q = "w:color";
25640
+ const SD_ATTR_KEY$a = "color";
25641
+ const encode$H = (params2, encodedAttrs = {}) => {
25570
25642
  const { nodes } = params2;
25571
25643
  const node = nodes?.[0];
25572
25644
  const sourceAttrs = node?.attributes || {};
@@ -25581,63 +25653,63 @@ const encode$I = (params2, encodedAttrs = {}) => {
25581
25653
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
25582
25654
  return {
25583
25655
  type: "attr",
25584
- xmlName: XML_NODE_NAME$r,
25585
- sdNodeOrKeyName: SD_ATTR_KEY$b,
25656
+ xmlName: XML_NODE_NAME$q,
25657
+ sdNodeOrKeyName: SD_ATTR_KEY$a,
25586
25658
  attributes
25587
25659
  };
25588
25660
  };
25589
- const config$o = {
25590
- xmlName: XML_NODE_NAME$r,
25591
- sdNodeOrKeyName: SD_ATTR_KEY$b,
25661
+ const config$p = {
25662
+ xmlName: XML_NODE_NAME$q,
25663
+ sdNodeOrKeyName: SD_ATTR_KEY$a,
25592
25664
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25593
- encode: encode$I,
25594
- attributes: validXmlAttributes$g
25665
+ encode: encode$H,
25666
+ attributes: validXmlAttributes$i
25595
25667
  };
25596
- const translator$12 = NodeTranslator.from(config$o);
25597
- const encode$H = (attributes) => attributes?.["w:eastAsia"];
25598
- const decode$D = (attrs) => attrs?.eastAsia;
25668
+ const translator$1j = NodeTranslator.from(config$p);
25669
+ const encode$G = (attributes) => attributes?.["w:eastAsia"];
25670
+ const decode$C = (attrs) => attrs?.eastAsia;
25599
25671
  const attrConfig$i = Object.freeze({
25600
25672
  xmlName: "w:eastAsia",
25601
25673
  sdName: "eastAsia",
25602
- encode: encode$H,
25603
- decode: decode$D
25674
+ encode: encode$G,
25675
+ decode: decode$C
25604
25676
  });
25605
- const encode$G = (attributes) => attributes?.["w:ascii"];
25606
- const decode$C = (attrs) => attrs?.ascii;
25677
+ const encode$F = (attributes) => attributes?.["w:ascii"];
25678
+ const decode$B = (attrs) => attrs?.ascii;
25607
25679
  const attrConfig$h = Object.freeze({
25608
25680
  xmlName: "w:ascii",
25609
25681
  sdName: "ascii",
25610
- encode: encode$G,
25611
- decode: decode$C
25682
+ encode: encode$F,
25683
+ decode: decode$B
25612
25684
  });
25613
- const encode$F = (attributes) => attributes?.["w:hAnsi"];
25614
- const decode$B = (attrs) => attrs?.hAnsi;
25685
+ const encode$E = (attributes) => attributes?.["w:hAnsi"];
25686
+ const decode$A = (attrs) => attrs?.hAnsi;
25615
25687
  const attrConfig$g = Object.freeze({
25616
25688
  xmlName: "w:hAnsi",
25617
25689
  sdName: "hAnsi",
25618
- encode: encode$F,
25619
- decode: decode$B
25690
+ encode: encode$E,
25691
+ decode: decode$A
25620
25692
  });
25621
- const encode$E = (attributes) => attributes?.["w:cs"];
25622
- const decode$A = (attrs) => attrs?.cs;
25693
+ const encode$D = (attributes) => attributes?.["w:cs"];
25694
+ const decode$z = (attrs) => attrs?.cs;
25623
25695
  const attrConfig$f = Object.freeze({
25624
25696
  xmlName: "w:cs",
25625
25697
  sdName: "cs",
25626
- encode: encode$E,
25627
- decode: decode$A
25698
+ encode: encode$D,
25699
+ decode: decode$z
25628
25700
  });
25629
- const encode$D = (attributes) => attributes?.["w:val"];
25630
- const decode$z = (attrs) => attrs?.value;
25701
+ const encode$C = (attributes) => attributes?.["w:val"];
25702
+ const decode$y = (attrs) => attrs?.value;
25631
25703
  const attrConfig$e = Object.freeze({
25632
25704
  xmlName: "w:val",
25633
25705
  sdName: "value",
25634
- encode: encode$D,
25635
- decode: decode$z
25706
+ encode: encode$C,
25707
+ decode: decode$y
25636
25708
  });
25637
- const validXmlAttributes$f = [attrConfig$i, attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e];
25638
- const XML_NODE_NAME$q = "w:rFonts";
25639
- const SD_ATTR_KEY$a = "fontFamily";
25640
- const encode$C = (params2, encodedAttrs = {}) => {
25709
+ const validXmlAttributes$h = [attrConfig$i, attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e];
25710
+ const XML_NODE_NAME$p = "w:rFonts";
25711
+ const SD_ATTR_KEY$9 = "fontFamily";
25712
+ const encode$B = (params2, encodedAttrs = {}) => {
25641
25713
  const { nodes } = params2;
25642
25714
  const node = nodes?.[0];
25643
25715
  const sourceAttrs = node?.attributes || {};
@@ -25661,111 +25733,119 @@ const encode$C = (params2, encodedAttrs = {}) => {
25661
25733
  attributes["w:val"] = attributes["w:eastAsia"];
25662
25734
  }
25663
25735
  if (attributes["w:val"] === void 0) delete attributes["w:val"];
25736
+ if (params2.inlineDocumentFonts) {
25737
+ const font = attributes["w:ascii"];
25738
+ if (font) {
25739
+ if (!params2.inlineDocumentFonts.includes(font)) {
25740
+ params2.inlineDocumentFonts.push(font);
25741
+ }
25742
+ }
25743
+ }
25664
25744
  return {
25665
25745
  type: "attr",
25666
- xmlName: XML_NODE_NAME$q,
25667
- sdNodeOrKeyName: SD_ATTR_KEY$a,
25746
+ xmlName: XML_NODE_NAME$p,
25747
+ sdNodeOrKeyName: SD_ATTR_KEY$9,
25668
25748
  attributes
25669
25749
  };
25670
25750
  };
25671
- const config$n = {
25672
- xmlName: XML_NODE_NAME$q,
25673
- sdNodeOrKeyName: SD_ATTR_KEY$a,
25751
+ const config$o = {
25752
+ xmlName: XML_NODE_NAME$p,
25753
+ sdNodeOrKeyName: SD_ATTR_KEY$9,
25674
25754
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25675
- encode: encode$C,
25676
- attributes: validXmlAttributes$f
25755
+ encode: encode$B,
25756
+ attributes: validXmlAttributes$h
25677
25757
  };
25678
- const translator$11 = NodeTranslator.from(config$n);
25679
- const encode$B = (attributes) => attributes?.["w:val"];
25680
- const decode$y = (attrs) => attrs?.styleId;
25758
+ const translator$1i = NodeTranslator.from(config$o);
25759
+ const encode$A = (attributes) => attributes?.["w:val"];
25760
+ const decode$x = (attrs) => attrs?.styleId;
25681
25761
  const attrConfig$d = Object.freeze({
25682
25762
  xmlName: "w:val",
25683
25763
  sdName: "styleId",
25684
- encode: encode$B,
25685
- decode: decode$y
25764
+ encode: encode$A,
25765
+ decode: decode$x
25686
25766
  });
25687
- const validXmlAttributes$e = [attrConfig$d];
25688
- const XML_NODE_NAME$p = "w:rStyle";
25689
- const SD_ATTR_KEY$9 = "styleId";
25690
- const encode$A = (params2, encodedAttrs = {}) => {
25767
+ const validXmlAttributes$g = [attrConfig$d];
25768
+ const XML_NODE_NAME$o = "w:rStyle";
25769
+ const SD_ATTR_KEY$8 = "styleId";
25770
+ const encode$z = (params2, encodedAttrs = {}) => {
25691
25771
  const { nodes } = params2;
25692
25772
  const node = nodes?.[0];
25693
25773
  const value = encodedAttrs.styleId ?? node?.attributes?.["w:val"];
25694
25774
  return {
25695
25775
  type: "attr",
25696
- xmlName: XML_NODE_NAME$p,
25697
- sdNodeOrKeyName: SD_ATTR_KEY$9,
25776
+ xmlName: XML_NODE_NAME$o,
25777
+ sdNodeOrKeyName: SD_ATTR_KEY$8,
25698
25778
  attributes: { "w:val": value ?? null }
25699
25779
  };
25700
25780
  };
25701
- const config$m = {
25702
- xmlName: XML_NODE_NAME$p,
25703
- sdNodeOrKeyName: SD_ATTR_KEY$9,
25781
+ const config$n = {
25782
+ xmlName: XML_NODE_NAME$o,
25783
+ sdNodeOrKeyName: SD_ATTR_KEY$8,
25704
25784
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25705
- encode: encode$A,
25706
- attributes: validXmlAttributes$e
25785
+ encode: encode$z,
25786
+ attributes: validXmlAttributes$g
25707
25787
  };
25708
- const translator$10 = NodeTranslator.from(config$m);
25709
- const encode$z = (attributes) => attributes?.["w:val"];
25710
- const decode$x = (attrs) => attrs?.fontSize;
25788
+ const translator$1h = NodeTranslator.from(config$n);
25789
+ const encode$y = (attributes) => attributes?.["w:val"];
25790
+ const decode$w = (attrs) => attrs?.fontSize;
25711
25791
  const attrConfig$c = Object.freeze({
25712
25792
  xmlName: "w:val",
25713
25793
  sdName: "fontSize",
25714
- encode: encode$z,
25715
- decode: decode$x
25794
+ encode: encode$y,
25795
+ decode: decode$w
25716
25796
  });
25717
- const validXmlAttributes$d = [attrConfig$c];
25718
- const XML_NODE_NAME$o = "w:sz";
25719
- const SD_ATTR_KEY$8 = "fontSize";
25720
- const encode$y = (params2, encodedAttrs = {}) => {
25797
+ const validXmlAttributes$f = [attrConfig$c];
25798
+ const XML_NODE_NAME$n = "w:sz";
25799
+ const SD_ATTR_KEY$7 = "fontSize";
25800
+ const encode$x = (params2, encodedAttrs = {}) => {
25721
25801
  const { nodes } = params2;
25722
25802
  const node = nodes?.[0];
25723
25803
  const value = encodedAttrs.fontSize ?? node?.attributes?.["w:val"];
25724
25804
  return {
25725
25805
  type: "attr",
25726
- xmlName: XML_NODE_NAME$o,
25727
- sdNodeOrKeyName: SD_ATTR_KEY$8,
25806
+ xmlName: XML_NODE_NAME$n,
25807
+ sdNodeOrKeyName: SD_ATTR_KEY$7,
25728
25808
  attributes: { "w:val": value ?? null }
25729
25809
  };
25730
25810
  };
25731
- const config$l = {
25732
- xmlName: XML_NODE_NAME$o,
25733
- sdNodeOrKeyName: SD_ATTR_KEY$8,
25811
+ const config$m = {
25812
+ xmlName: XML_NODE_NAME$n,
25813
+ sdNodeOrKeyName: SD_ATTR_KEY$7,
25734
25814
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25735
- encode: encode$y,
25736
- attributes: validXmlAttributes$d
25815
+ encode: encode$x,
25816
+ attributes: validXmlAttributes$f
25737
25817
  };
25738
- const translator$$ = NodeTranslator.from(config$l);
25739
- const encode$x = (attributes) => attributes?.["w:val"];
25740
- const decode$w = (attrs) => attrs?.fontSizeCs;
25818
+ const translator$1g = NodeTranslator.from(config$m);
25819
+ const encode$w = (attributes) => attributes?.["w:val"];
25820
+ const decode$v = (attrs) => attrs?.fontSizeCs;
25741
25821
  const attrConfig$b = Object.freeze({
25742
25822
  xmlName: "w:val",
25743
25823
  sdName: "fontSizeCs",
25744
- encode: encode$x,
25745
- decode: decode$w
25824
+ encode: encode$w,
25825
+ decode: decode$v
25746
25826
  });
25747
- const validXmlAttributes$c = [attrConfig$b];
25748
- const XML_NODE_NAME$n = "w:szCs";
25749
- const SD_ATTR_KEY$7 = "fontSizeCs";
25750
- const encode$w = (params2, encodedAttrs = {}) => {
25827
+ const validXmlAttributes$e = [attrConfig$b];
25828
+ const XML_NODE_NAME$m = "w:szCs";
25829
+ const SD_ATTR_KEY$6 = "fontSizeCs";
25830
+ const encode$v = (params2, encodedAttrs = {}) => {
25751
25831
  const { nodes } = params2;
25752
25832
  const node = nodes?.[0];
25753
25833
  const value = encodedAttrs.fontSizeCs ?? node?.attributes?.["w:val"];
25754
25834
  return {
25755
25835
  type: "attr",
25756
- xmlName: XML_NODE_NAME$n,
25757
- sdNodeOrKeyName: SD_ATTR_KEY$7,
25836
+ xmlName: XML_NODE_NAME$m,
25837
+ sdNodeOrKeyName: SD_ATTR_KEY$6,
25758
25838
  attributes: { "w:val": value ?? null }
25759
25839
  };
25760
25840
  };
25761
- const config$k = {
25762
- xmlName: XML_NODE_NAME$n,
25763
- sdNodeOrKeyName: SD_ATTR_KEY$7,
25841
+ const config$l = {
25842
+ xmlName: XML_NODE_NAME$m,
25843
+ sdNodeOrKeyName: SD_ATTR_KEY$6,
25764
25844
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25765
- encode: encode$w,
25766
- attributes: validXmlAttributes$c
25845
+ encode: encode$v,
25846
+ attributes: validXmlAttributes$e
25767
25847
  };
25768
- const translator$_ = NodeTranslator.from(config$k);
25848
+ const translator$1f = NodeTranslator.from(config$l);
25769
25849
  const generateV2HandlerEntity = (handlerName, translator2) => ({
25770
25850
  handlerName,
25771
25851
  handler: (params2) => {
@@ -25789,7 +25869,7 @@ function createSingleAttrPropertyHandler(xmlName, sdName = null, attrName = "w:v
25789
25869
  xmlName,
25790
25870
  sdNodeOrKeyName: sdName,
25791
25871
  encode: ({ nodes }) => {
25792
- return transformEncode(nodes[0].attributes[attrName]) ?? void 0;
25872
+ return transformEncode(nodes[0]?.attributes?.[attrName]) ?? void 0;
25793
25873
  },
25794
25874
  decode: ({ node }) => {
25795
25875
  const value = node.attrs?.[sdName] != null ? transformDecode(node.attrs[sdName]) : void 0;
@@ -25821,8 +25901,32 @@ function createBorderPropertyHandler(xmlName, sdName = null) {
25821
25901
  xmlName,
25822
25902
  sdNodeOrKeyName: sdName,
25823
25903
  attributes: [
25824
- createAttributeHandler("w:val"),
25825
- createAttributeHandler("w:color"),
25904
+ createAttributeHandler(
25905
+ "w:val",
25906
+ "val",
25907
+ (v2) => v2 === "nil" ? "none" : v2,
25908
+ (v2) => v2 === "none" ? "nil" : v2
25909
+ ),
25910
+ createAttributeHandler(
25911
+ "w:color",
25912
+ "color",
25913
+ (v2) => {
25914
+ if (v2 === "auto") {
25915
+ return null;
25916
+ } else if (v2) {
25917
+ return `#${v2}`;
25918
+ } else {
25919
+ return void 0;
25920
+ }
25921
+ },
25922
+ (v2) => {
25923
+ if (v2) {
25924
+ return v2.replace("#", "");
25925
+ } else {
25926
+ return void 0;
25927
+ }
25928
+ }
25929
+ ),
25826
25930
  createAttributeHandler("w:themeColor"),
25827
25931
  createAttributeHandler("w:themeTint"),
25828
25932
  createAttributeHandler("w:themeShade"),
@@ -25888,6 +25992,37 @@ function decodeProperties(translatorsBySdName, properties) {
25888
25992
  });
25889
25993
  return elements;
25890
25994
  }
25995
+ function createNestedPropertiesTranslator(xmlName, sdName, propertyTranslators2, defaultEncodedAttrs = {}) {
25996
+ const propertyTranslatorsByXmlName = {};
25997
+ const propertyTranslatorsBySdName = {};
25998
+ propertyTranslators2.forEach((translator2) => {
25999
+ propertyTranslatorsByXmlName[translator2.xmlName] = translator2;
26000
+ propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
26001
+ });
26002
+ return {
26003
+ xmlName,
26004
+ sdNodeOrKeyName: sdName,
26005
+ type: NodeTranslator.translatorTypes.NODE,
26006
+ attributes: [],
26007
+ encode: (params2) => {
26008
+ const { nodes } = params2;
26009
+ const node = nodes[0];
26010
+ const attributes = { ...defaultEncodedAttrs, ...encodeProperties(node, propertyTranslatorsByXmlName) };
26011
+ return Object.keys(attributes).length > 0 ? attributes : void 0;
26012
+ },
26013
+ decode: (params2) => {
26014
+ const currentValue = params2.node.attrs?.[sdName];
26015
+ const elements = decodeProperties(propertyTranslatorsBySdName, currentValue);
26016
+ const newNode = {
26017
+ name: xmlName,
26018
+ type: "element",
26019
+ attributes: {},
26020
+ elements
26021
+ };
26022
+ return newNode;
26023
+ }
26024
+ };
26025
+ }
25891
26026
  const parseBoolean = (value) => value != null ? ["1", "true"].includes(value) : void 0;
25892
26027
  const booleanToString = (value) => value != null ? value ? "1" : "0" : void 0;
25893
26028
  const parseInteger = (value) => {
@@ -25899,9 +26034,9 @@ const integerToString = (value) => {
25899
26034
  const intValue = parseInteger(value);
25900
26035
  return intValue != void 0 ? String(intValue) : void 0;
25901
26036
  };
25902
- const XML_NODE_NAME$m = "w:caps";
25903
- const SD_ATTR_KEY$6 = "textTransform";
25904
- const encode$v = (params2, encodedAttrs = {}) => {
26037
+ const XML_NODE_NAME$l = "w:caps";
26038
+ const SD_ATTR_KEY$5 = "textTransform";
26039
+ const encode$u = (params2, encodedAttrs = {}) => {
25905
26040
  const { nodes } = params2;
25906
26041
  const node = nodes[0];
25907
26042
  if (!node) return void 0;
@@ -25913,31 +26048,31 @@ const encode$v = (params2, encodedAttrs = {}) => {
25913
26048
  }
25914
26049
  return {
25915
26050
  type: "attr",
25916
- xmlName: XML_NODE_NAME$m,
25917
- sdNodeOrKeyName: SD_ATTR_KEY$6,
25918
- attributes: { [SD_ATTR_KEY$6]: result }
26051
+ xmlName: XML_NODE_NAME$l,
26052
+ sdNodeOrKeyName: SD_ATTR_KEY$5,
26053
+ attributes: { [SD_ATTR_KEY$5]: result }
25919
26054
  };
25920
26055
  };
25921
- const config$j = {
25922
- xmlName: XML_NODE_NAME$m,
25923
- sdNodeOrKeyName: SD_ATTR_KEY$6,
26056
+ const config$k = {
26057
+ xmlName: XML_NODE_NAME$l,
26058
+ sdNodeOrKeyName: SD_ATTR_KEY$5,
25924
26059
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25925
- encode: encode$v,
26060
+ encode: encode$u,
25926
26061
  attributes: [createAttributeHandler("w:val")]
25927
26062
  };
25928
- const translator$Z = NodeTranslator.from(config$j);
26063
+ const translator$1e = NodeTranslator.from(config$k);
25929
26064
  const runPropertyTranslators = Object.freeze({
25930
- "w:b": translator$16,
25931
- "w:i": translator$15,
25932
- "w:u": translator$14,
25933
- "w:strike": translator$13,
25934
- "w:color": translator$12,
25935
- "w:highlight": translator$19,
25936
- "w:rFonts": translator$11,
25937
- "w:rStyle": translator$10,
25938
- "w:sz": translator$$,
25939
- "w:szCs": translator$_,
25940
- "w:caps": translator$Z
26065
+ "w:b": translator$1n,
26066
+ "w:i": translator$1m,
26067
+ "w:u": translator$1l,
26068
+ "w:strike": translator$1k,
26069
+ "w:color": translator$1j,
26070
+ "w:highlight": translator$1q,
26071
+ "w:rFonts": translator$1i,
26072
+ "w:rStyle": translator$1h,
26073
+ "w:sz": translator$1g,
26074
+ "w:szCs": translator$1f,
26075
+ "w:caps": translator$1e
25941
26076
  });
25942
26077
  const rawRunPropertyXmlNames = Object.freeze(["w:lang", "w:shd"]);
25943
26078
  const RAW_CHILD_NAME_SET = new Set(rawRunPropertyXmlNames);
@@ -25951,9 +26086,9 @@ const toRunPropertyEntry = (candidate) => {
25951
26086
  attributes: { ...candidate.attributes || {} }
25952
26087
  };
25953
26088
  };
25954
- const XML_NODE_NAME$l = "w:rPr";
25955
- const SD_ATTR_KEY$5 = "runProperties";
25956
- const encode$u = (params2) => {
26089
+ const XML_NODE_NAME$k = "w:rPr";
26090
+ const SD_ATTR_KEY$4 = "runProperties";
26091
+ const encode$t = (params2) => {
25957
26092
  const { nodes } = params2;
25958
26093
  const node = nodes?.[0] || {};
25959
26094
  const contents = Array.isArray(node.elements) ? node.elements : [];
@@ -25987,16 +26122,16 @@ const encode$u = (params2) => {
25987
26122
  attributes: runPropsArray
25988
26123
  };
25989
26124
  };
25990
- const config$i = {
25991
- xmlName: XML_NODE_NAME$l,
25992
- sdNodeOrKeyName: SD_ATTR_KEY$5,
26125
+ const config$j = {
26126
+ xmlName: XML_NODE_NAME$k,
26127
+ sdNodeOrKeyName: SD_ATTR_KEY$4,
25993
26128
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
25994
- encode: encode$u
26129
+ encode: encode$t
25995
26130
  };
25996
- const translator$Y = NodeTranslator.from(config$i);
26131
+ const translator$1d = NodeTranslator.from(config$j);
25997
26132
  const EAST_ASIAN_CHARACTER_REGEX = /[\u1100-\u11FF\u2E80-\u2EFF\u2F00-\u2FDF\u3040-\u30FF\u3100-\u312F\u3130-\u318F\u31A0-\u31BF\u3400-\u4DBF\u4E00-\u9FFF\uA960-\uA97F\uAC00-\uD7AF\uF900-\uFAFF\uFF00-\uFFEF]/u;
25998
26133
  const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
25999
- const collectRunProperties = (params2, rPrNode, translator2 = translator$Y) => {
26134
+ const collectRunProperties = (params2, rPrNode, translator2 = translator$1d) => {
26000
26135
  if (!rPrNode) return { entries: [], hadRPr: false, styleChangeMarks: [] };
26001
26136
  const result = translator2.encode({ ...params2, nodes: [rPrNode] }) || {};
26002
26137
  let entries = [];
@@ -26469,7 +26604,7 @@ const ensureTrackedWrapper = (runs, trackingMarksByType = /* @__PURE__ */ new Ma
26469
26604
  }
26470
26605
  return runs;
26471
26606
  };
26472
- const XML_NODE_NAME$k = "w:hyperlink";
26607
+ const XML_NODE_NAME$j = "w:hyperlink";
26473
26608
  const SD_NODE_NAME$e = "link";
26474
26609
  const _createAttributeHandler = (xmlName, sdName) => ({
26475
26610
  xmlName,
@@ -26477,7 +26612,7 @@ const _createAttributeHandler = (xmlName, sdName) => ({
26477
26612
  encode: (attributes) => attributes[xmlName],
26478
26613
  decode: (attributes) => attributes[sdName]
26479
26614
  });
26480
- const validXmlAttributes$b = [
26615
+ const validXmlAttributes$d = [
26481
26616
  _createAttributeHandler("w:anchor", "anchor"),
26482
26617
  _createAttributeHandler("w:docLocation", "docLocation"),
26483
26618
  {
@@ -26490,7 +26625,7 @@ const validXmlAttributes$b = [
26490
26625
  _createAttributeHandler("r:id", "rId"),
26491
26626
  _createAttributeHandler("w:tgtFrame", "target")
26492
26627
  ];
26493
- const encode$t = (params2, encodedAttrs) => {
26628
+ const encode$s = (params2, encodedAttrs) => {
26494
26629
  const { nodes, docx, nodeListHandler } = params2;
26495
26630
  const node = nodes[0];
26496
26631
  let href = _resolveHref(docx, encodedAttrs);
@@ -26524,7 +26659,7 @@ const _resolveHref = (docx, encodedAttrs) => {
26524
26659
  }
26525
26660
  return href;
26526
26661
  };
26527
- function decode$v(params2) {
26662
+ function decode$u(params2) {
26528
26663
  const { hyperlinkGroup = [params2.node] } = params2.extraParams || {};
26529
26664
  const node = hyperlinkGroup[0];
26530
26665
  const linkMark = node.marks.find((m2) => m2.type === "link");
@@ -26573,55 +26708,55 @@ function _addNewLinkRelationship(params2, link) {
26573
26708
  });
26574
26709
  return id;
26575
26710
  }
26576
- const config$h = {
26577
- xmlName: XML_NODE_NAME$k,
26711
+ const config$i = {
26712
+ xmlName: XML_NODE_NAME$j,
26578
26713
  sdNodeOrKeyName: SD_NODE_NAME$e,
26579
26714
  type: NodeTranslator.translatorTypes.NODE,
26580
- encode: encode$t,
26581
- decode: decode$v,
26582
- attributes: validXmlAttributes$b
26715
+ encode: encode$s,
26716
+ decode: decode$u,
26717
+ attributes: validXmlAttributes$d
26583
26718
  };
26584
- const translator$X = NodeTranslator.from(config$h);
26585
- const encode$s = (attributes) => {
26719
+ const translator$1c = NodeTranslator.from(config$i);
26720
+ const encode$r = (attributes) => {
26586
26721
  return attributes["w:rsidR"];
26587
26722
  };
26588
- const decode$u = (attrs) => {
26723
+ const decode$t = (attrs) => {
26589
26724
  return attrs.rsidR;
26590
26725
  };
26591
26726
  const attrConfig$a = Object.freeze({
26592
26727
  xmlName: "w:rsidR",
26593
26728
  sdName: "rsidR",
26594
- encode: encode$s,
26595
- decode: decode$u
26729
+ encode: encode$r,
26730
+ decode: decode$t
26596
26731
  });
26597
- const encode$r = (attributes) => {
26732
+ const encode$q = (attributes) => {
26598
26733
  return attributes["w:rsidRPr"];
26599
26734
  };
26600
- const decode$t = (attrs) => {
26735
+ const decode$s = (attrs) => {
26601
26736
  return attrs.rsidRPr;
26602
26737
  };
26603
26738
  const attrConfig$9 = Object.freeze({
26604
26739
  xmlName: "w:rsidRPr",
26605
26740
  sdName: "rsidRPr",
26606
- encode: encode$r,
26607
- decode: decode$t
26741
+ encode: encode$q,
26742
+ decode: decode$s
26608
26743
  });
26609
- const encode$q = (attributes) => {
26744
+ const encode$p = (attributes) => {
26610
26745
  return attributes["w:rsidDel"];
26611
26746
  };
26612
- const decode$s = (attrs) => {
26747
+ const decode$r = (attrs) => {
26613
26748
  return attrs.rsidDel;
26614
26749
  };
26615
26750
  const attrConfig$8 = Object.freeze({
26616
26751
  xmlName: "w:rsidDel",
26617
26752
  sdName: "rsidDel",
26618
- encode: encode$q,
26619
- decode: decode$s
26753
+ encode: encode$p,
26754
+ decode: decode$r
26620
26755
  });
26621
- const validXmlAttributes$a = [attrConfig$a, attrConfig$9, attrConfig$8];
26622
- const XML_NODE_NAME$j = "w:r";
26756
+ const validXmlAttributes$c = [attrConfig$a, attrConfig$9, attrConfig$8];
26757
+ const XML_NODE_NAME$i = "w:r";
26623
26758
  const SD_KEY_NAME = "run";
26624
- const encode$p = (params2, encodedAttrs = {}) => {
26759
+ const encode$o = (params2, encodedAttrs = {}) => {
26625
26760
  const { nodes = [], nodeListHandler } = params2 || {};
26626
26761
  const runNode = nodes[0];
26627
26762
  if (!runNode) return void 0;
@@ -26669,7 +26804,7 @@ const encode$p = (params2, encodedAttrs = {}) => {
26669
26804
  }
26670
26805
  return runNodeResult;
26671
26806
  };
26672
- const decode$r = (params2, decodedAttrs = {}) => {
26807
+ const decode$q = (params2, decodedAttrs = {}) => {
26673
26808
  const { node } = params2 || {};
26674
26809
  if (!node) return void 0;
26675
26810
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
@@ -26678,7 +26813,7 @@ const decode$r = (params2, decodedAttrs = {}) => {
26678
26813
  ...params2.extraParams,
26679
26814
  linkProcessed: true
26680
26815
  };
26681
- return translator$X.decode({ ...params2, extraParams });
26816
+ return translator$1c.decode({ ...params2, extraParams });
26682
26817
  }
26683
26818
  const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
26684
26819
  const runAttrs = runNodeForExport.attrs || {};
@@ -26734,7 +26869,7 @@ const decode$r = (params2, decodedAttrs = {}) => {
26734
26869
  runs.push(trackedClone);
26735
26870
  return;
26736
26871
  }
26737
- const runWrapper = { name: XML_NODE_NAME$j, elements: [] };
26872
+ const runWrapper = { name: XML_NODE_NAME$i, elements: [] };
26738
26873
  applyBaseRunProps(runWrapper);
26739
26874
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
26740
26875
  runWrapper.elements.push(cloneXmlNode(child));
@@ -26742,7 +26877,7 @@ const decode$r = (params2, decodedAttrs = {}) => {
26742
26877
  });
26743
26878
  const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
26744
26879
  if (!trackedRuns.length) {
26745
- const emptyRun = { name: XML_NODE_NAME$j, elements: [] };
26880
+ const emptyRun = { name: XML_NODE_NAME$i, elements: [] };
26746
26881
  applyBaseRunProps(emptyRun);
26747
26882
  trackedRuns.push(emptyRun);
26748
26883
  }
@@ -26756,15 +26891,15 @@ const decode$r = (params2, decodedAttrs = {}) => {
26756
26891
  }
26757
26892
  return trackedRuns;
26758
26893
  };
26759
- const config$g = {
26760
- xmlName: XML_NODE_NAME$j,
26894
+ const config$h = {
26895
+ xmlName: XML_NODE_NAME$i,
26761
26896
  sdNodeOrKeyName: SD_KEY_NAME,
26762
26897
  type: NodeTranslator.translatorTypes.NODE,
26763
- encode: encode$p,
26764
- decode: decode$r,
26765
- attributes: validXmlAttributes$a
26898
+ encode: encode$o,
26899
+ decode: decode$q,
26900
+ attributes: validXmlAttributes$c
26766
26901
  };
26767
- const translator$W = NodeTranslator.from(config$g);
26902
+ const translator$1b = NodeTranslator.from(config$h);
26768
26903
  function preProcessVerticalMergeCells(table, { editorSchema }) {
26769
26904
  if (!table || !Array.isArray(table.content)) {
26770
26905
  return table;
@@ -26805,13 +26940,13 @@ function preProcessVerticalMergeCells(table, { editorSchema }) {
26805
26940
  }
26806
26941
  return table;
26807
26942
  }
26808
- const translator$V = NodeTranslator.from({
26943
+ const translator$1a = NodeTranslator.from({
26809
26944
  xmlName: "w:cantSplit",
26810
26945
  sdNodeOrKeyName: "cantSplit",
26811
26946
  encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
26812
26947
  decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
26813
26948
  });
26814
- const translator$U = NodeTranslator.from({
26949
+ const translator$19 = NodeTranslator.from({
26815
26950
  xmlName: "w:cnfStyle",
26816
26951
  sdNodeOrKeyName: "cnfStyle",
26817
26952
  attributes: [
@@ -26837,8 +26972,8 @@ const translator$U = NodeTranslator.from({
26837
26972
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
26838
26973
  }
26839
26974
  });
26840
- const translator$T = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
26841
- const translator$S = NodeTranslator.from(
26975
+ const translator$18 = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
26976
+ const translator$17 = NodeTranslator.from(
26842
26977
  createSingleAttrPropertyHandler(
26843
26978
  "w:gridAfter",
26844
26979
  null,
@@ -26847,7 +26982,7 @@ const translator$S = NodeTranslator.from(
26847
26982
  (v2) => integerToString(v2)
26848
26983
  )
26849
26984
  );
26850
- const translator$R = NodeTranslator.from(
26985
+ const translator$16 = NodeTranslator.from(
26851
26986
  createSingleAttrPropertyHandler(
26852
26987
  "w:gridBefore",
26853
26988
  null,
@@ -26856,21 +26991,21 @@ const translator$R = NodeTranslator.from(
26856
26991
  (v2) => integerToString(v2)
26857
26992
  )
26858
26993
  );
26859
- const translator$Q = NodeTranslator.from({
26994
+ const translator$15 = NodeTranslator.from({
26860
26995
  xmlName: "w:hidden",
26861
26996
  sdNodeOrKeyName: "hidden",
26862
26997
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
26863
26998
  decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
26864
26999
  });
26865
- const translator$P = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
26866
- const translator$O = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
26867
- const translator$N = NodeTranslator.from({
27000
+ const translator$14 = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
27001
+ const translator$13 = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
27002
+ const translator$12 = NodeTranslator.from({
26868
27003
  xmlName: "w:tblHeader",
26869
27004
  sdNodeOrKeyName: "repeatHeader",
26870
27005
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
26871
27006
  decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
26872
27007
  });
26873
- const translator$M = NodeTranslator.from({
27008
+ const translator$11 = NodeTranslator.from({
26874
27009
  xmlName: "w:trHeight",
26875
27010
  sdNodeOrKeyName: "rowHeight",
26876
27011
  encode: ({ nodes }) => {
@@ -26897,73 +27032,32 @@ const translator$M = NodeTranslator.from({
26897
27032
  return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
26898
27033
  }
26899
27034
  });
26900
- const translator$L = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
26901
- const translator$K = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
26902
- const XML_NODE_NAME$i = "w:trPr";
26903
- const SD_ATTR_KEY$4 = "tableRowProperties";
26904
- const encode$o = (params2) => {
26905
- const { nodes } = params2;
26906
- const node = nodes[0];
26907
- let attributes = {
27035
+ const translator$10 = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
27036
+ const translator$$ = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
27037
+ const propertyTranslators$6 = [
27038
+ translator$1a,
27039
+ translator$19,
27040
+ translator$18,
27041
+ translator$17,
27042
+ translator$16,
27043
+ translator$15,
27044
+ translator$14,
27045
+ translator$13,
27046
+ translator$12,
27047
+ translator$11,
27048
+ translator$10,
27049
+ translator$$
27050
+ ];
27051
+ const translator$_ = NodeTranslator.from(
27052
+ createNestedPropertiesTranslator("w:trPr", "tableRowProperties", propertyTranslators$6, {
26908
27053
  cantSplit: false,
26909
27054
  hidden: false,
26910
27055
  repeatHeader: false
26911
- };
26912
- attributes = {
26913
- ...attributes,
26914
- ...encodeProperties(node, propertyTranslatorsByXmlName$2)
26915
- };
26916
- return {
26917
- type: NodeTranslator.translatorTypes.ATTRIBUTE,
26918
- xmlName: XML_NODE_NAME$i,
26919
- sdNodeOrKeyName: SD_ATTR_KEY$4,
26920
- attributes
26921
- };
26922
- };
26923
- const decode$q = (params2) => {
26924
- const { tableRowProperties = {} } = params2.node.attrs || {};
26925
- const elements = decodeProperties(propertyTranslatorsBySdName$2, tableRowProperties);
26926
- const newNode = {
26927
- name: "w:trPr",
26928
- type: "element",
26929
- attributes: {},
26930
- elements
26931
- };
26932
- return newNode;
26933
- };
26934
- const propertyTranslators$3 = [
26935
- translator$V,
26936
- translator$U,
26937
- translator$T,
26938
- translator$S,
26939
- translator$R,
26940
- translator$Q,
26941
- translator$P,
26942
- translator$O,
26943
- translator$N,
26944
- translator$M,
26945
- translator$L,
26946
- translator$K
26947
- ];
26948
- const propertyTranslatorsByXmlName$2 = {};
26949
- propertyTranslators$3.forEach((translator2) => {
26950
- propertyTranslatorsByXmlName$2[translator2.xmlName] = translator2;
26951
- });
26952
- const propertyTranslatorsBySdName$2 = {};
26953
- propertyTranslators$3.forEach((translator2) => {
26954
- propertyTranslatorsBySdName$2[translator2.sdNodeOrKeyName] = translator2;
26955
- });
26956
- const config$f = {
26957
- xmlName: XML_NODE_NAME$i,
26958
- sdNodeOrKeyName: SD_ATTR_KEY$4,
26959
- type: NodeTranslator.translatorTypes.ATTRIBUTE,
26960
- encode: encode$o,
26961
- decode: decode$q
26962
- };
26963
- const translator$J = NodeTranslator.from(config$f);
27056
+ })
27057
+ );
26964
27058
  const XML_NODE_NAME$h = "w:tr";
26965
27059
  const SD_NODE_NAME$d = "tableRow";
26966
- const validXmlAttributes$9 = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
27060
+ const validXmlAttributes$b = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
26967
27061
  (xmlName) => createAttributeHandler(xmlName)
26968
27062
  );
26969
27063
  const encode$n = (params2, encodedAttrs) => {
@@ -26971,10 +27065,10 @@ const encode$n = (params2, encodedAttrs) => {
26971
27065
  let tableRowProperties = {};
26972
27066
  const tPr = row.elements.find((el) => el.name === "w:trPr");
26973
27067
  if (tPr) {
26974
- ({ attributes: tableRowProperties } = translator$J.encode({
27068
+ tableRowProperties = translator$_.encode({
26975
27069
  ...params2,
26976
27070
  nodes: [tPr]
26977
- }));
27071
+ });
26978
27072
  }
26979
27073
  encodedAttrs["tableRowProperties"] = Object.freeze(tableRowProperties);
26980
27074
  encodedAttrs["rowHeight"] = twipsToPixels(tableRowProperties["rowHeight"]?.value);
@@ -26984,7 +27078,7 @@ const encode$n = (params2, encodedAttrs) => {
26984
27078
  let currentColumnIndex = 0;
26985
27079
  const content = cellNodes?.map((n) => {
26986
27080
  let columnWidth = gridColumnWidths?.[currentColumnIndex] || null;
26987
- const result = translator$a.encode({
27081
+ const result = translator$c.encode({
26988
27082
  ...params2,
26989
27083
  extraParams: {
26990
27084
  ...params2.extraParams,
@@ -27018,7 +27112,7 @@ const decode$p = (params2, decodedAttrs) => {
27018
27112
  }
27019
27113
  }
27020
27114
  tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
27021
- const trPr = translator$J.decode({
27115
+ const trPr = translator$_.decode({
27022
27116
  ...params2,
27023
27117
  node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
27024
27118
  });
@@ -27030,22 +27124,22 @@ const decode$p = (params2, decodedAttrs) => {
27030
27124
  elements
27031
27125
  };
27032
27126
  };
27033
- const config$e = {
27127
+ const config$g = {
27034
27128
  xmlName: XML_NODE_NAME$h,
27035
27129
  sdNodeOrKeyName: SD_NODE_NAME$d,
27036
27130
  type: NodeTranslator.translatorTypes.NODE,
27037
27131
  encode: encode$n,
27038
27132
  decode: decode$p,
27039
- attributes: validXmlAttributes$9
27133
+ attributes: validXmlAttributes$b
27040
27134
  };
27041
- const translator$I = NodeTranslator.from(config$e);
27042
- const translator$H = NodeTranslator.from({
27135
+ const translator$Z = NodeTranslator.from(config$g);
27136
+ const translator$Y = NodeTranslator.from({
27043
27137
  xmlName: "w:bidiVisual",
27044
27138
  sdNodeOrKeyName: "rightToLeft",
27045
27139
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
27046
27140
  decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
27047
27141
  });
27048
- const translator$G = NodeTranslator.from({
27142
+ const translator$X = NodeTranslator.from({
27049
27143
  xmlName: "w:shd",
27050
27144
  sdNodeOrKeyName: "shading",
27051
27145
  attributes: [
@@ -27067,11 +27161,11 @@ const translator$G = NodeTranslator.from({
27067
27161
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
27068
27162
  }
27069
27163
  });
27070
- const translator$F = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
27071
- const translator$E = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
27072
- const translator$D = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
27073
- const translator$C = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
27074
- const translator$B = NodeTranslator.from({
27164
+ const translator$W = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
27165
+ const translator$V = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
27166
+ const translator$U = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
27167
+ const translator$T = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
27168
+ const translator$S = NodeTranslator.from({
27075
27169
  xmlName: "w:tblLook",
27076
27170
  sdNodeOrKeyName: "tblLook",
27077
27171
  attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
@@ -27083,16 +27177,16 @@ const translator$B = NodeTranslator.from({
27083
27177
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
27084
27178
  }
27085
27179
  });
27086
- const translator$A = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
27087
- const translator$z = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
27088
- const translator$y = NodeTranslator.from(
27180
+ const translator$R = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
27181
+ const translator$Q = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
27182
+ const translator$P = NodeTranslator.from(
27089
27183
  createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
27090
27184
  );
27091
- const translator$x = NodeTranslator.from(
27185
+ const translator$O = NodeTranslator.from(
27092
27186
  createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
27093
27187
  );
27094
- const translator$w = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
27095
- const translator$v = NodeTranslator.from({
27188
+ const translator$N = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
27189
+ const translator$M = NodeTranslator.from({
27096
27190
  xmlName: "w:tblpPr",
27097
27191
  sdNodeOrKeyName: "floatingTableProperties",
27098
27192
  attributes: ["w:leftFromText", "w:rightFromText", "w:topFromText", "w:bottomFromText", "w:tblpX", "w:tblpY"].map((attr) => createAttributeHandler(attr, null, parseInteger, integerToString)).concat(["w:horzAnchor", "w:vertAnchor", "w:tblpXSpec", "w:tblpYSpec"].map((attr) => createAttributeHandler(attr))),
@@ -27104,160 +27198,67 @@ const translator$v = NodeTranslator.from({
27104
27198
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
27105
27199
  }
27106
27200
  });
27107
- const translator$u = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
27108
- const translator$t = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
27109
- const translator$s = NodeTranslator.from(createBorderPropertyHandler("w:end"));
27110
- const translator$r = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
27111
- const translator$q = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
27112
- const translator$p = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
27113
- const translator$o = NodeTranslator.from(createBorderPropertyHandler("w:left"));
27114
- const translator$n = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
27115
- const translator$m = NodeTranslator.from(createBorderPropertyHandler("w:right"));
27116
- const translator$l = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
27117
- const translator$k = NodeTranslator.from(createBorderPropertyHandler("w:start"));
27118
- const translator$j = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
27119
- const translator$i = NodeTranslator.from(createBorderPropertyHandler("w:top"));
27120
- const translator$h = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
27121
- const XML_NODE_NAME$g = "w:tblBorders";
27122
- const SD_ATTR_KEY$3 = "borders";
27123
- const encode$m = (params2) => {
27124
- const { nodes } = params2;
27125
- const node = nodes[0];
27126
- const attributes = encodeProperties(node, tblBordersTranslatorsByXmlName);
27127
- return Object.keys(attributes).length > 0 ? attributes : void 0;
27128
- };
27129
- const decode$o = (params2) => {
27130
- const { borders = {} } = params2.node.attrs || {};
27131
- const elements = decodeProperties(tblBordersTranslatorsBySdName, borders);
27132
- const newNode = {
27133
- name: "w:tblBorders",
27134
- type: "element",
27135
- attributes: {},
27136
- elements
27137
- };
27138
- return newNode;
27139
- };
27140
- const propertyTranslators$2 = [
27141
- translator$u,
27142
- translator$s,
27143
- translator$q,
27144
- translator$p,
27145
- translator$o,
27146
- translator$m,
27147
- translator$k,
27148
- translator$i
27149
- ];
27150
- const tblBordersTranslatorsByXmlName = {};
27151
- const tblBordersTranslatorsBySdName = {};
27152
- propertyTranslators$2.forEach((translator2) => {
27153
- tblBordersTranslatorsByXmlName[translator2.xmlName] = translator2;
27154
- tblBordersTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
27155
- });
27156
- const translator$g = NodeTranslator.from({
27157
- xmlName: XML_NODE_NAME$g,
27158
- sdNodeOrKeyName: SD_ATTR_KEY$3,
27159
- type: NodeTranslator.translatorTypes.NODE,
27160
- attributes: [],
27161
- encode: encode$m,
27162
- decode: decode$o
27163
- });
27164
- const XML_NODE_NAME$f = "w:tblCellMar";
27165
- const SD_ATTR_KEY$2 = "cellMargins";
27166
- const encode$l = (params2) => {
27167
- const { nodes } = params2;
27168
- const node = nodes[0];
27169
- const attributes = encodeProperties(node, propertyTranslatorsByXmlName$1);
27170
- return Object.keys(attributes).length > 0 ? attributes : void 0;
27171
- };
27172
- const decode$n = (params2) => {
27173
- const { cellMargins = {} } = params2.node.attrs || {};
27174
- const elements = decodeProperties(propertyTranslatorsBySdName$1, cellMargins);
27175
- const newNode = {
27176
- name: XML_NODE_NAME$f,
27177
- type: "element",
27178
- attributes: {},
27179
- elements
27180
- };
27181
- return newNode;
27182
- };
27183
- const propertyTranslators$1 = [
27184
- translator$t,
27185
- translator$r,
27186
- translator$n,
27187
- translator$l,
27188
- translator$j,
27189
- translator$h
27190
- ];
27191
- const propertyTranslatorsByXmlName$1 = {};
27192
- const propertyTranslatorsBySdName$1 = {};
27193
- propertyTranslators$1.forEach((translator2) => {
27194
- propertyTranslatorsByXmlName$1[translator2.xmlName] = translator2;
27195
- propertyTranslatorsBySdName$1[translator2.sdNodeOrKeyName] = translator2;
27196
- });
27197
- const translator$f = NodeTranslator.from({
27198
- xmlName: XML_NODE_NAME$f,
27199
- sdNodeOrKeyName: SD_ATTR_KEY$2,
27200
- type: NodeTranslator.translatorTypes.NODE,
27201
- attributes: [],
27202
- encode: encode$l,
27203
- decode: decode$n
27204
- });
27205
- const XML_NODE_NAME$e = "w:tblPr";
27206
- const SD_ATTR_KEY$1 = "tableProperties";
27207
- const encode$k = (params2) => {
27208
- const { nodes } = params2;
27209
- const node = nodes[0];
27210
- const attributes = encodeProperties(node, propertyTranslatorsByXmlName);
27211
- return {
27212
- xmlName: XML_NODE_NAME$e,
27213
- sdNodeOrKeyName: SD_ATTR_KEY$1,
27214
- attributes
27215
- };
27216
- };
27217
- const decode$m = (params2) => {
27218
- const { tableProperties = {} } = params2.node.attrs || {};
27219
- const elements = decodeProperties(propertyTranslatorsBySdName, tableProperties);
27220
- const newNode = {
27221
- name: "w:tblPr",
27222
- type: "element",
27223
- attributes: {},
27224
- elements
27225
- };
27226
- return newNode;
27227
- };
27228
- const propertyTranslators = [
27201
+ const translator$L = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
27202
+ const translator$K = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
27203
+ const translator$J = NodeTranslator.from(createBorderPropertyHandler("w:end"));
27204
+ const translator$I = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
27205
+ const translator$H = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
27206
+ const translator$G = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
27207
+ const translator$F = NodeTranslator.from(createBorderPropertyHandler("w:left"));
27208
+ const translator$E = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
27209
+ const translator$D = NodeTranslator.from(createBorderPropertyHandler("w:right"));
27210
+ const translator$C = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
27211
+ const translator$B = NodeTranslator.from(createBorderPropertyHandler("w:start"));
27212
+ const translator$A = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
27213
+ const translator$z = NodeTranslator.from(createBorderPropertyHandler("w:top"));
27214
+ const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
27215
+ const propertyTranslators$5 = [
27216
+ translator$L,
27217
+ translator$J,
27229
27218
  translator$H,
27230
- translator$P,
27231
27219
  translator$G,
27232
27220
  translator$F,
27233
- translator$O,
27234
- translator$E,
27235
27221
  translator$D,
27236
- translator$C,
27237
27222
  translator$B,
27223
+ translator$z
27224
+ ];
27225
+ const translator$x = NodeTranslator.from(
27226
+ createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$5)
27227
+ );
27228
+ const propertyTranslators$4 = [
27229
+ translator$K,
27230
+ translator$I,
27231
+ translator$E,
27232
+ translator$C,
27238
27233
  translator$A,
27239
- translator$z,
27240
- translator$y,
27234
+ translator$y
27235
+ ];
27236
+ const translator$w = NodeTranslator.from(
27237
+ createNestedPropertiesTranslator("w:tblCellMar", "cellMargins", propertyTranslators$4)
27238
+ );
27239
+ const propertyTranslators$3 = [
27240
+ translator$Y,
27241
+ translator$14,
27242
+ translator$X,
27243
+ translator$W,
27244
+ translator$13,
27245
+ translator$V,
27246
+ translator$U,
27247
+ translator$T,
27248
+ translator$S,
27249
+ translator$R,
27250
+ translator$Q,
27251
+ translator$P,
27252
+ translator$O,
27253
+ translator$N,
27254
+ translator$M,
27241
27255
  translator$x,
27242
- translator$w,
27243
- translator$v,
27244
- translator$g,
27245
- translator$f
27256
+ translator$w
27246
27257
  ];
27247
- const propertyTranslatorsByXmlName = {};
27248
- const propertyTranslatorsBySdName = {};
27249
- propertyTranslators.forEach((translator2) => {
27250
- propertyTranslatorsByXmlName[translator2.xmlName] = translator2;
27251
- propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
27252
- });
27253
- const config$d = {
27254
- xmlName: XML_NODE_NAME$e,
27255
- sdNodeOrKeyName: SD_ATTR_KEY$1,
27256
- encode: encode$k,
27257
- decode: decode$m
27258
- };
27259
- const translator$e = NodeTranslator.from(config$d);
27260
- const translator$d = NodeTranslator.from(
27258
+ const translator$v = NodeTranslator.from(
27259
+ createNestedPropertiesTranslator("w:tblPr", "tableProperties", propertyTranslators$3)
27260
+ );
27261
+ const translator$u = NodeTranslator.from(
27261
27262
  createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
27262
27263
  );
27263
27264
  const DEFAULT_COLUMN_WIDTH_PX = 100;
@@ -27307,20 +27308,20 @@ const resolveFallbackColumnWidthTwips = (params2, totalColumns, cellMinWidthTwip
27307
27308
  }
27308
27309
  return Math.max(fallbackWidthTwips, cellMinWidthTwips);
27309
27310
  };
27310
- const XML_NODE_NAME$d = "w:tblGrid";
27311
- const SD_ATTR_KEY = "grid";
27311
+ const XML_NODE_NAME$g = "w:tblGrid";
27312
+ const SD_ATTR_KEY$3 = "grid";
27312
27313
  const cellMinWidth = pixelsToTwips(10);
27313
- const encode$j = (params2) => {
27314
+ const encode$m = (params2) => {
27314
27315
  const { nodes } = params2;
27315
27316
  const node = nodes[0];
27316
- const attributes = encodeProperties(node, { [translator$d.xmlName]: translator$d }, true);
27317
+ const attributes = encodeProperties(node, { [translator$u.xmlName]: translator$u }, true);
27317
27318
  return {
27318
- xmlName: XML_NODE_NAME$d,
27319
- sdNodeOrKeyName: SD_ATTR_KEY,
27319
+ xmlName: XML_NODE_NAME$g,
27320
+ sdNodeOrKeyName: SD_ATTR_KEY$3,
27320
27321
  attributes
27321
27322
  };
27322
27323
  };
27323
- const decode$l = (params2) => {
27324
+ const decode$o = (params2) => {
27324
27325
  const { grid: rawGrid } = params2.node.attrs || {};
27325
27326
  const grid = Array.isArray(rawGrid) ? rawGrid : [];
27326
27327
  const { firstRow = {} } = params2.extraParams || {};
@@ -27339,10 +27340,10 @@ const decode$l = (params2) => {
27339
27340
  numericWidth = fallbackColumnWidthTwips;
27340
27341
  }
27341
27342
  numericWidth = Math.max(numericWidth, cellMinWidth);
27342
- const decoded = translator$d.decode({
27343
+ const decoded = translator$u.decode({
27343
27344
  node: { type: (
27344
27345
  /** @type {string} */
27345
- translator$d.sdNodeOrKeyName
27346
+ translator$u.sdNodeOrKeyName
27346
27347
  ), attrs: { col: numericWidth } }
27347
27348
  });
27348
27349
  if (decoded) elements.push(decoded);
@@ -27377,19 +27378,19 @@ const decode$l = (params2) => {
27377
27378
  columnIndex++;
27378
27379
  }
27379
27380
  const newNode = {
27380
- name: XML_NODE_NAME$d,
27381
+ name: XML_NODE_NAME$g,
27381
27382
  attributes: {},
27382
27383
  elements
27383
27384
  };
27384
27385
  return newNode;
27385
27386
  };
27386
- const config$c = {
27387
- xmlName: XML_NODE_NAME$d,
27388
- sdNodeOrKeyName: SD_ATTR_KEY,
27389
- encode: encode$j,
27390
- decode: decode$l
27387
+ const config$f = {
27388
+ xmlName: XML_NODE_NAME$g,
27389
+ sdNodeOrKeyName: SD_ATTR_KEY$3,
27390
+ encode: encode$m,
27391
+ decode: decode$o
27391
27392
  };
27392
- const translator$c = NodeTranslator.from(config$c);
27393
+ const translator$t = NodeTranslator.from(config$f);
27393
27394
  const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
27394
27395
  const DEFAULT_PAGE_MARGIN_TWIPS = 1440;
27395
27396
  const DEFAULT_CONTENT_WIDTH_TWIPS = DEFAULT_PAGE_WIDTH_TWIPS - 2 * DEFAULT_PAGE_MARGIN_TWIPS;
@@ -27452,19 +27453,19 @@ const buildFallbackGridForTable = ({ params: params2, rows, tableWidth, tableWid
27452
27453
  columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
27453
27454
  };
27454
27455
  };
27455
- const XML_NODE_NAME$c = "w:tbl";
27456
+ const XML_NODE_NAME$f = "w:tbl";
27456
27457
  const SD_NODE_NAME$c = "table";
27457
- const encode$i = (params2, encodedAttrs) => {
27458
+ const encode$l = (params2, encodedAttrs) => {
27458
27459
  const { nodes } = params2;
27459
27460
  const node = nodes[0];
27460
27461
  const tblPr = node.elements.find((el) => el.name === "w:tblPr");
27461
27462
  if (tblPr) {
27462
- const encodedProperties = translator$e.encode({ ...params2, nodes: [tblPr] });
27463
- encodedAttrs["tableProperties"] = encodedProperties?.attributes || {};
27463
+ const encodedProperties = translator$v.encode({ ...params2, nodes: [tblPr] });
27464
+ encodedAttrs["tableProperties"] = encodedProperties || {};
27464
27465
  }
27465
27466
  const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
27466
27467
  if (tblGrid) {
27467
- encodedAttrs["grid"] = translator$c.encode({ ...params2, nodes: [tblGrid] }).attributes;
27468
+ encodedAttrs["grid"] = translator$t.encode({ ...params2, nodes: [tblGrid] }).attributes;
27468
27469
  }
27469
27470
  [
27470
27471
  "tableStyleId",
@@ -27531,7 +27532,7 @@ const encode$i = (params2, encodedAttrs) => {
27531
27532
  }
27532
27533
  const content = [];
27533
27534
  rows.forEach((row) => {
27534
- const result = translator$I.encode({
27535
+ const result = translator$Z.encode({
27535
27536
  ...params2,
27536
27537
  nodes: [row],
27537
27538
  extraParams: {
@@ -27550,13 +27551,13 @@ const encode$i = (params2, encodedAttrs) => {
27550
27551
  attrs: encodedAttrs
27551
27552
  };
27552
27553
  };
27553
- const decode$k = (params2, decodedAttrs) => {
27554
+ const decode$n = (params2, decodedAttrs) => {
27554
27555
  params2.node = preProcessVerticalMergeCells(params2.node, params2);
27555
27556
  const { node } = params2;
27556
27557
  const elements = translateChildNodes(params2);
27557
27558
  const firstRow = node.content?.find((n) => n.type === "tableRow");
27558
27559
  const properties = node.attrs.grid;
27559
- const element = translator$c.decode({
27560
+ const element = translator$t.decode({
27560
27561
  ...params2,
27561
27562
  node: { ...node, attrs: { ...node.attrs, grid: properties } },
27562
27563
  extraParams: {
@@ -27566,7 +27567,7 @@ const decode$k = (params2, decodedAttrs) => {
27566
27567
  if (element) elements.unshift(element);
27567
27568
  if (node.attrs?.tableProperties) {
27568
27569
  const properties2 = { ...node.attrs.tableProperties };
27569
- const element2 = translator$e.decode({
27570
+ const element2 = translator$v.decode({
27570
27571
  ...params2,
27571
27572
  node: { ...node, attrs: { ...node.attrs, tableProperties: properties2 } }
27572
27573
  });
@@ -27586,7 +27587,7 @@ function _processTableBorders(rawBorders) {
27586
27587
  const color = attributes.color;
27587
27588
  const size2 = attributes.size;
27588
27589
  if (color && color !== "auto") attrs["color"] = color.startsWith("#") ? color : `#${color}`;
27589
- if (size2 && size2 !== "auto") attrs["size"] = eigthPointsToPixels(size2);
27590
+ if (size2 && size2 !== "auto") attrs["size"] = eighthPointsToPixels(size2);
27590
27591
  const rowBorderNames = ["insideH", "insideV"];
27591
27592
  if (rowBorderNames.includes(name)) rowBorders[name] = attrs;
27592
27593
  borders[name] = attrs;
@@ -27632,7 +27633,7 @@ function _getReferencedTableStyles(tableStyleReference, params2) {
27632
27633
  if (baseTblPr && baseTblPr.elements) {
27633
27634
  tblPr.elements.push(...baseTblPr.elements);
27634
27635
  }
27635
- const tableProperties = translator$e.encode({ ...params2, nodes: [tblPr] }).attributes;
27636
+ const tableProperties = translator$v.encode({ ...params2, nodes: [tblPr] });
27636
27637
  const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
27637
27638
  if (borders) stylesToReturn.borders = borders;
27638
27639
  if (rowBorders) stylesToReturn.rowBorders = rowBorders;
@@ -27649,16 +27650,16 @@ function _getReferencedTableStyles(tableStyleReference, params2) {
27649
27650
  }
27650
27651
  return stylesToReturn;
27651
27652
  }
27652
- const config$b = {
27653
- xmlName: XML_NODE_NAME$c,
27653
+ const config$e = {
27654
+ xmlName: XML_NODE_NAME$f,
27654
27655
  sdNodeOrKeyName: SD_NODE_NAME$c,
27655
27656
  type: NodeTranslator.translatorTypes.NODE,
27656
- encode: encode$i,
27657
- decode: decode$k,
27657
+ encode: encode$l,
27658
+ decode: decode$n,
27658
27659
  attributes: []
27659
27660
  };
27660
- const translator$b = NodeTranslator.from(config$b);
27661
- const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$b);
27661
+ const translator$s = NodeTranslator.from(config$e);
27662
+ const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$s);
27662
27663
  function getReferencedTableStyles(tblStyleTag, docx) {
27663
27664
  if (!tblStyleTag) return null;
27664
27665
  const stylesToReturn = {};
@@ -27729,7 +27730,7 @@ function processTableBorders(borderElements) {
27729
27730
  const color = attributes["w:color"];
27730
27731
  const size2 = attributes["w:sz"];
27731
27732
  if (color && color !== "auto") attrs["color"] = color.startsWith("#") ? color : `#${color}`;
27732
- if (size2 && size2 !== "auto") attrs["size"] = eigthPointsToPixels(size2);
27733
+ if (size2 && size2 !== "auto") attrs["size"] = eighthPointsToPixels(size2);
27733
27734
  const rowBorderNames = ["insideH", "insideV"];
27734
27735
  if (rowBorderNames.includes(borderName)) rowBorders[borderName] = attrs;
27735
27736
  borders[borderName] = attrs;
@@ -27739,6 +27740,125 @@ function processTableBorders(borderElements) {
27739
27740
  rowBorders
27740
27741
  };
27741
27742
  }
27743
+ const translator$r = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
27744
+ const translator$q = NodeTranslator.from(
27745
+ createSingleAttrPropertyHandler(
27746
+ "w:gridSpan",
27747
+ null,
27748
+ "w:val",
27749
+ (v2) => parseInteger(v2) ?? void 0,
27750
+ (v2) => integerToString(v2)
27751
+ )
27752
+ );
27753
+ const translator$p = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
27754
+ const translator$o = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
27755
+ const translator$n = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
27756
+ const propertyTranslators$2 = [
27757
+ translator$z,
27758
+ translator$B,
27759
+ translator$F,
27760
+ translator$L,
27761
+ translator$J,
27762
+ translator$D,
27763
+ translator$H,
27764
+ translator$G,
27765
+ translator$o,
27766
+ translator$n
27767
+ ];
27768
+ const translator$m = NodeTranslator.from(
27769
+ createNestedPropertiesTranslator("w:tcBorders", "borders", propertyTranslators$2)
27770
+ );
27771
+ const translator$l = NodeTranslator.from(
27772
+ createSingleAttrPropertyHandler(
27773
+ "w:noWrap",
27774
+ null,
27775
+ "w:val",
27776
+ (v2) => parseBoolean(v2 ?? "true"),
27777
+ (v2) => booleanToString(v2)
27778
+ )
27779
+ );
27780
+ const propertyTranslators$1 = [
27781
+ translator$K,
27782
+ translator$I,
27783
+ translator$E,
27784
+ translator$C,
27785
+ translator$A,
27786
+ translator$y
27787
+ ];
27788
+ const translator$k = NodeTranslator.from(
27789
+ createNestedPropertiesTranslator("w:tcMar", "cellMargins", propertyTranslators$1)
27790
+ );
27791
+ const translator$j = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
27792
+ const translator$i = NodeTranslator.from(
27793
+ createSingleAttrPropertyHandler(
27794
+ "w:tcFitText",
27795
+ null,
27796
+ "w:val",
27797
+ (v2) => parseBoolean(v2 ?? "true"),
27798
+ (v2) => booleanToString(v2)
27799
+ )
27800
+ );
27801
+ const translator$h = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
27802
+ const translator$g = NodeTranslator.from(
27803
+ createSingleAttrPropertyHandler(
27804
+ "w:hideMark",
27805
+ null,
27806
+ "w:val",
27807
+ (v2) => parseBoolean(v2 ?? "true"),
27808
+ (v2) => booleanToString(v2)
27809
+ )
27810
+ );
27811
+ const translator$f = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
27812
+ const XML_NODE_NAME$e = "w:headers";
27813
+ const SD_ATTR_KEY$2 = "headers";
27814
+ const encode$k = (params2) => {
27815
+ const { nodes } = params2;
27816
+ const node = nodes[0];
27817
+ const attributes = encodeProperties(node, { [translator$f.xmlName]: translator$f }, true);
27818
+ return {
27819
+ xmlName: XML_NODE_NAME$e,
27820
+ sdNodeOrKeyName: SD_ATTR_KEY$2,
27821
+ attributes
27822
+ };
27823
+ };
27824
+ const decode$m = (params2) => {
27825
+ const { headers = [] } = params2.node.attrs || {};
27826
+ const newNode = {
27827
+ name: XML_NODE_NAME$e,
27828
+ attributes: {},
27829
+ elements: headers.map(
27830
+ (header) => translator$f.decode({
27831
+ node: { type: "header", attrs: header }
27832
+ })
27833
+ )
27834
+ };
27835
+ return newNode;
27836
+ };
27837
+ const config$d = {
27838
+ xmlName: XML_NODE_NAME$e,
27839
+ sdNodeOrKeyName: SD_ATTR_KEY$2,
27840
+ encode: encode$k,
27841
+ decode: decode$m
27842
+ };
27843
+ const translator$e = NodeTranslator.from(config$d);
27844
+ const propertyTranslators = [
27845
+ translator$19,
27846
+ translator$r,
27847
+ translator$q,
27848
+ translator$p,
27849
+ translator$m,
27850
+ translator$X,
27851
+ translator$l,
27852
+ translator$k,
27853
+ translator$j,
27854
+ translator$i,
27855
+ translator$h,
27856
+ translator$g,
27857
+ translator$e
27858
+ ];
27859
+ const translator$d = NodeTranslator.from(
27860
+ createNestedPropertiesTranslator("w:tcPr", "tableCellProperties", propertyTranslators)
27861
+ );
27742
27862
  function handleTableCellNode({
27743
27863
  params: params2,
27744
27864
  node,
@@ -27751,8 +27871,10 @@ function handleTableCellNode({
27751
27871
  allColumnWidths = []
27752
27872
  }) {
27753
27873
  const { docx, nodeListHandler } = params2;
27874
+ const attributes = {};
27754
27875
  const tcPr = node.elements.find((el) => el.name === "w:tcPr");
27755
- const borders = tcPr?.elements?.find((el) => el.name === "w:tcBorders");
27876
+ const tableCellProperties = tcPr ? translator$d.encode({ ...params2, nodes: [tcPr] }) ?? {} : {};
27877
+ attributes["tableCellProperties"] = tableCellProperties;
27756
27878
  if (rowBorders?.insideH) {
27757
27879
  rowBorders["bottom"] = rowBorders.insideH;
27758
27880
  delete rowBorders.insideH;
@@ -27761,33 +27883,20 @@ function handleTableCellNode({
27761
27883
  rowBorders["right"] = rowBorders.insideV;
27762
27884
  delete rowBorders?.insideV;
27763
27885
  }
27764
- const inlineBorders = processInlineCellBorders(borders, rowBorders);
27765
- const gridColumnWidths = allColumnWidths;
27766
- const tcWidth = tcPr?.elements?.find((el) => el.name === "w:tcW");
27767
- let width = tcWidth ? twipsToPixels(tcWidth.attributes["w:w"]) : null;
27768
- const widthType = tcWidth?.attributes["w:type"];
27886
+ if (rowBorders) attributes["borders"] = { ...rowBorders };
27887
+ const inlineBorders = processInlineCellBorders(tableCellProperties.borders, rowBorders);
27888
+ if (inlineBorders) attributes["borders"] = Object.assign(attributes["borders"] || {}, inlineBorders);
27889
+ const colspan = tableCellProperties.gridSpan;
27890
+ if (colspan && !isNaN(parseInt(colspan, 10))) attributes["colspan"] = parseInt(colspan, 10);
27891
+ let width = tableCellProperties.cellWidth?.value ? twipsToPixels(tableCellProperties.cellWidth?.value) : null;
27892
+ const widthType = tableCellProperties.cellWidth?.type;
27893
+ if (widthType) attributes["widthType"] = widthType;
27769
27894
  if (!width && columnWidth) width = columnWidth;
27770
- const vMerge = getTableCellMergeTag(node);
27771
- const { attributes: vMergeAttrs } = vMerge || {};
27772
- const backgroundColor = tcPr?.elements?.find((el) => el.name === "w:shd");
27773
- const background = {
27774
- color: backgroundColor?.attributes["w:fill"]
27775
- };
27776
- const colspanTag = tcPr?.elements?.find((el) => el.name === "w:gridSpan");
27777
- const colspan = colspanTag?.attributes["w:val"];
27778
- const marginTag = tcPr?.elements?.find((el) => el.name === "w:tcMar");
27779
- const verticalAlignTag = tcPr?.elements?.find((el) => el.name === "w:vAlign");
27780
- const verticalAlign = verticalAlignTag?.attributes["w:val"] || "top";
27781
- const attributes = {};
27782
- const referencedStyles = getReferencedTableStyles(styleTag, docx) || {};
27783
- attributes.cellMargins = getTableCellMargins(marginTag, referencedStyles);
27784
- const { fontSize: fontSize2, fonts = {} } = referencedStyles;
27785
- const fontFamily2 = fonts["ascii"];
27786
27895
  if (width) {
27787
27896
  attributes["colwidth"] = [width];
27788
27897
  attributes["widthUnit"] = "px";
27789
- const defaultColWidths = gridColumnWidths;
27790
- const hasDefaultColWidths = gridColumnWidths && gridColumnWidths.length > 0;
27898
+ const defaultColWidths = allColumnWidths;
27899
+ const hasDefaultColWidths = allColumnWidths && allColumnWidths.length > 0;
27791
27900
  const colspanNum = parseInt(colspan || 1, 10);
27792
27901
  if (colspanNum && colspanNum > 1 && hasDefaultColWidths) {
27793
27902
  let colwidth = [];
@@ -27805,15 +27914,19 @@ function handleTableCellNode({
27805
27914
  }
27806
27915
  }
27807
27916
  }
27808
- if (widthType) attributes["widthType"] = widthType;
27809
- if (colspan) attributes["colspan"] = parseInt(colspan, 10);
27810
- if (background) attributes["background"] = background;
27811
- attributes["verticalAlign"] = verticalAlign;
27917
+ const background = {
27918
+ color: tableCellProperties.shading?.fill
27919
+ };
27920
+ if (background.color) attributes["background"] = background;
27921
+ const verticalAlign = tableCellProperties.vAlign;
27922
+ if (verticalAlign) attributes["verticalAlign"] = verticalAlign;
27923
+ const referencedStyles = getReferencedTableStyles(styleTag, docx) || { fontSize: null, fonts: {}, cellMargins: {} };
27924
+ attributes.cellMargins = getTableCellMargins(tableCellProperties.cellMargins, referencedStyles);
27925
+ const { fontSize: fontSize2, fonts = {} } = referencedStyles;
27926
+ const fontFamily2 = fonts["ascii"];
27812
27927
  if (fontSize2) attributes["fontSize"] = fontSize2;
27813
- if (fontFamily2) attributes["fontFamily"] = fontFamily2["ascii"];
27814
- if (rowBorders) attributes["borders"] = { ...rowBorders };
27815
- if (inlineBorders) attributes["borders"] = Object.assign(attributes["borders"] || {}, inlineBorders);
27816
- if (vMergeAttrs && vMergeAttrs["w:val"] === "restart") {
27928
+ if (fontFamily2) attributes["fontFamily"] = fontFamily2;
27929
+ if (tableCellProperties.vMerge === "restart") {
27817
27930
  const rows = table.elements.filter((el) => el.name === "w:tr");
27818
27931
  const currentRowIndex = rows.findIndex((r2) => r2 === row);
27819
27932
  const remainingRows = rows.slice(currentRowIndex + 1);
@@ -27824,9 +27937,8 @@ function handleTableCellNode({
27824
27937
  const firstCell = remainingRow.elements.findIndex((el) => el.name === "w:tc");
27825
27938
  const cellAtIndex = remainingRow.elements[firstCell + cellIndex];
27826
27939
  if (!cellAtIndex) break;
27827
- const vMerge2 = getTableCellMergeTag(cellAtIndex);
27828
- const { attributes: currentCellMergeAttrs } = vMerge2 || {};
27829
- if (!vMerge2 && !currentCellMergeAttrs || currentCellMergeAttrs && currentCellMergeAttrs["w:val"] === "restart") {
27940
+ const vMerge = getTableCellVMerge(cellAtIndex);
27941
+ if (!vMerge || vMerge === "restart") {
27830
27942
  break;
27831
27943
  }
27832
27944
  rowspan++;
@@ -27846,69 +27958,52 @@ function handleTableCellNode({
27846
27958
  }
27847
27959
  const processInlineCellBorders = (borders, rowBorders) => {
27848
27960
  if (!borders) return null;
27849
- const processedBorders = {};
27850
- const inlineBorderBottom = processBorder(borders, "bottom", rowBorders);
27851
- if (inlineBorderBottom) processedBorders["bottom"] = inlineBorderBottom;
27852
- const inlineBorderTop = processBorder(borders, "top", rowBorders);
27853
- if (inlineBorderTop) processedBorders["top"] = inlineBorderTop;
27854
- const inlineBorderLeft = processBorder(borders, "left", rowBorders);
27855
- if (inlineBorderLeft) processedBorders["left"] = inlineBorderLeft;
27856
- const inlineBorderRight = processBorder(borders, "right", rowBorders);
27857
- if (inlineBorderRight) processedBorders["right"] = inlineBorderRight;
27858
- return processedBorders;
27859
- };
27860
- const processBorder = (borders, direction, rowBorders = {}) => {
27861
- const borderAttrs = borders?.elements?.find((el) => el.name === `w:${direction}`)?.attributes;
27862
- if (borderAttrs && borderAttrs["w:val"] !== "nil") {
27863
- const border = {};
27864
- const color = borderAttrs["w:color"];
27865
- if (color) border["color"] = color === "auto" ? "#000000" : `#${color}`;
27866
- const size2 = borderAttrs["w:sz"];
27867
- if (size2) border["size"] = eigthPointsToPixels(size2);
27868
- return border;
27869
- }
27870
- if (borderAttrs && borderAttrs["w:val"] === "nil") {
27871
- const border = Object.assign({}, rowBorders[direction] || {});
27872
- if (!Object.keys(border)) return null;
27873
- border["val"] = "none";
27874
- return border;
27875
- }
27876
- return null;
27961
+ return ["bottom", "top", "left", "right"].reduce((acc, direction) => {
27962
+ const borderAttrs = borders[direction];
27963
+ const rowBorderAttrs = rowBorders[direction];
27964
+ if (borderAttrs && borderAttrs["val"] !== "nil") {
27965
+ const color = borderAttrs["color"];
27966
+ let size2 = borderAttrs["size"];
27967
+ if (size2) size2 = eighthPointsToPixels(size2);
27968
+ acc[direction] = { color, size: size2, val: borderAttrs["val"] };
27969
+ return acc;
27970
+ }
27971
+ if (borderAttrs && borderAttrs["val"] === "nil") {
27972
+ const border = Object.assign({}, rowBorderAttrs || {});
27973
+ if (!Object.keys(border).length) {
27974
+ return acc;
27975
+ } else {
27976
+ border["val"] = "none";
27977
+ acc[direction] = border;
27978
+ return acc;
27979
+ }
27980
+ }
27981
+ return acc;
27982
+ }, {});
27877
27983
  };
27878
- const getTableCellMergeTag = (node) => {
27984
+ const getTableCellVMerge = (node) => {
27879
27985
  const tcPr = node.elements.find((el) => el.name === "w:tcPr");
27880
27986
  const vMerge = tcPr?.elements?.find((el) => el.name === "w:vMerge");
27881
- return vMerge;
27882
- };
27883
- const getTableCellMargins = (marginTag, referencedStyles) => {
27884
- const inlineMarginLeftTag = marginTag?.elements?.find((el) => el.name === "w:left");
27885
- const inlineMarginRightTag = marginTag?.elements?.find((el) => el.name === "w:right");
27886
- const inlineMarginTopTag = marginTag?.elements?.find((el) => el.name === "w:top");
27887
- const inlineMarginBottomTag = marginTag?.elements?.find((el) => el.name === "w:bottom");
27888
- const inlineMarginLeftValue = inlineMarginLeftTag?.attributes["w:w"];
27889
- const inlineMarginRightValue = inlineMarginRightTag?.attributes["w:w"];
27890
- const inlineMarginTopValue = inlineMarginTopTag?.attributes["w:w"];
27891
- const inlineMarginBottomValue = inlineMarginBottomTag?.attributes["w:w"];
27987
+ if (!vMerge) return null;
27988
+ return vMerge.attributes?.["w:val"] || "continue";
27989
+ };
27990
+ const getTableCellMargins = (inlineMargins, referencedStyles) => {
27892
27991
  const { cellMargins = {} } = referencedStyles;
27893
- const {
27894
- marginLeft: marginLeftStyle,
27895
- marginRight: marginRightStyle,
27896
- marginTop: marginTopStyle,
27897
- marginBottom: marginBottomStyle
27898
- } = cellMargins;
27899
- const resolveMargin = (inlineValue, styleValue) => {
27900
- if (inlineValue != null) return inlineValue;
27901
- if (styleValue == null) return void 0;
27902
- if (typeof styleValue === "object") return styleValue.value;
27903
- return styleValue;
27904
- };
27905
- const margins = {
27906
- left: twipsToPixels(resolveMargin(inlineMarginLeftValue, marginLeftStyle)),
27907
- right: twipsToPixels(resolveMargin(inlineMarginRightValue, marginRightStyle)),
27908
- top: twipsToPixels(resolveMargin(inlineMarginTopValue, marginTopStyle)),
27909
- bottom: twipsToPixels(resolveMargin(inlineMarginBottomValue, marginBottomStyle))
27910
- };
27911
- return margins;
27992
+ return ["left", "right", "top", "bottom"].reduce((acc, direction) => {
27993
+ const key2 = `margin${direction.charAt(0).toUpperCase() + direction.slice(1)}`;
27994
+ const inlineValue = inlineMargins ? inlineMargins?.[key2]?.value : null;
27995
+ const styleValue = cellMargins ? cellMargins[key2] : null;
27996
+ if (inlineValue != null) {
27997
+ acc[direction] = twipsToPixels(inlineValue);
27998
+ } else if (styleValue == null) {
27999
+ acc[direction] = void 0;
28000
+ } else if (typeof styleValue === "object") {
28001
+ acc[direction] = twipsToPixels(styleValue.value);
28002
+ } else {
28003
+ acc[direction] = twipsToPixels(styleValue);
28004
+ }
28005
+ return acc;
28006
+ }, {});
27912
28007
  };
27913
28008
  function translateTableCell(params2) {
27914
28009
  const elements = translateChildNodes({
@@ -27923,107 +28018,91 @@ function translateTableCell(params2) {
27923
28018
  };
27924
28019
  }
27925
28020
  function generateTableCellProperties(node) {
27926
- const elements = [];
28021
+ const tableCellProperties = { ...node.attrs?.tableCellProperties || {} };
27927
28022
  const { attrs } = node;
27928
- const { colwidth = [], cellWidthType = "dxa", background = {}, colspan, rowspan, widthUnit } = attrs;
28023
+ const { colwidth = [], cellWidthType = "dxa", widthUnit } = attrs;
27929
28024
  const colwidthSum = colwidth.reduce((acc, curr) => acc + curr, 0);
27930
- const cellWidthElement = {
27931
- name: "w:tcW",
27932
- attributes: {
27933
- "w:w": widthUnit === "px" ? pixelsToTwips(colwidthSum) : inchesToTwips(colwidthSum),
27934
- "w:type": cellWidthType
27935
- }
27936
- };
27937
- elements.push(cellWidthElement);
27938
- if (colspan) {
27939
- const gridSpanElement = {
27940
- name: "w:gridSpan",
27941
- attributes: { "w:val": `${colspan}` }
28025
+ const propertiesWidthPixels = twipsToPixels(tableCellProperties.cellWidth?.value);
28026
+ if (propertiesWidthPixels !== colwidthSum) {
28027
+ tableCellProperties["cellWidth"] = {
28028
+ value: widthUnit === "px" ? pixelsToTwips(colwidthSum) : inchesToTwips(colwidthSum),
28029
+ type: cellWidthType
27942
28030
  };
27943
- elements.push(gridSpanElement);
27944
28031
  }
27945
- const { color } = background || {};
27946
- if (color) {
27947
- const cellBgElement = {
27948
- name: "w:shd",
27949
- attributes: { "w:fill": color }
27950
- };
27951
- elements.push(cellBgElement);
28032
+ const { colspan } = attrs;
28033
+ if (colspan > 1 && tableCellProperties.gridSpan !== colspan) {
28034
+ tableCellProperties["gridSpan"] = colspan;
28035
+ } else if (!colspan || tableCellProperties?.gridSpan === 1) {
28036
+ delete tableCellProperties.gridSpan;
28037
+ }
28038
+ const { background = {} } = attrs;
28039
+ if (background?.color && tableCellProperties.shading?.fill !== background?.color) {
28040
+ tableCellProperties["shading"] = { fill: background.color };
28041
+ } else if (!background?.color && tableCellProperties?.shading?.fill) {
28042
+ delete tableCellProperties.shading;
27952
28043
  }
27953
28044
  const { cellMargins } = attrs;
27954
28045
  if (cellMargins) {
27955
- const cellMarginsElement = {
27956
- name: "w:tcMar",
27957
- elements: generateCellMargins(cellMargins)
27958
- };
27959
- elements.push(cellMarginsElement);
28046
+ ["left", "right", "top", "bottom"].forEach((side) => {
28047
+ const key2 = `margin${side.charAt(0).toUpperCase() + side.slice(1)}`;
28048
+ if (cellMargins[side] != null) {
28049
+ if (!tableCellProperties.cellMargins) tableCellProperties["cellMargins"] = {};
28050
+ let currentPropertyValuePixels = twipsToPixels(tableCellProperties.cellMargins?.[key2]?.value);
28051
+ if (currentPropertyValuePixels !== cellMargins[side]) {
28052
+ tableCellProperties.cellMargins[key2] = { value: pixelsToTwips(cellMargins[side]), type: "dxa" };
28053
+ }
28054
+ } else if (tableCellProperties?.cellMargins?.[key2]) {
28055
+ delete tableCellProperties.cellMargins[key2];
28056
+ }
28057
+ });
27960
28058
  }
27961
28059
  const { verticalAlign } = attrs;
27962
- if (verticalAlign) {
27963
- const vertAlignElement = {
27964
- name: "w:vAlign",
27965
- attributes: { "w:val": verticalAlign }
27966
- };
27967
- elements.push(vertAlignElement);
27968
- }
27969
- if (rowspan && rowspan > 1) {
27970
- const vMergeElement = {
27971
- name: "w:vMerge",
27972
- type: "element",
27973
- attributes: { "w:val": "restart" }
27974
- };
27975
- elements.push(vMergeElement);
28060
+ if (verticalAlign && verticalAlign !== tableCellProperties.vAlign) {
28061
+ tableCellProperties["vAlign"] = verticalAlign;
28062
+ } else if (!verticalAlign && tableCellProperties?.vAlign) {
28063
+ delete tableCellProperties.vAlign;
28064
+ }
28065
+ const { rowspan } = attrs;
28066
+ if (rowspan && rowspan > 1 && tableCellProperties.vMerge !== "restart") {
28067
+ tableCellProperties["vMerge"] = "restart";
27976
28068
  } else if (attrs.continueMerge) {
27977
- const vMergeElement = {
27978
- name: "w:vMerge",
27979
- type: "element"
27980
- };
27981
- elements.push(vMergeElement);
28069
+ tableCellProperties["vMerge"] = "continue";
28070
+ } else if (tableCellProperties?.vMerge) {
28071
+ delete tableCellProperties.vMerge;
27982
28072
  }
27983
28073
  const { borders = {} } = attrs;
27984
28074
  if (!!borders && Object.keys(borders).length) {
27985
- const cellBordersElement = {
27986
- name: "w:tcBorders",
27987
- elements: Object.entries(borders).map(([key2, value]) => {
27988
- if (!value.size || value.val === "none") {
27989
- return {
27990
- name: `w:${key2}`,
27991
- attributes: {
27992
- "w:val": "nil"
27993
- }
28075
+ ["top", "bottom", "left", "right"].forEach((side) => {
28076
+ if (borders[side]) {
28077
+ let currentPropertyValue = tableCellProperties.borders?.[side];
28078
+ let currentPropertySizePixels = eighthPointsToPixels(currentPropertyValue?.size);
28079
+ let color = borders[side].color;
28080
+ if (borders[side].color && color === "#000000") {
28081
+ color = "auto";
28082
+ }
28083
+ if (currentPropertySizePixels !== borders[side].size || currentPropertyValue?.color !== color || borders[side].val !== currentPropertyValue?.val) {
28084
+ if (!tableCellProperties.borders) tableCellProperties["borders"] = {};
28085
+ tableCellProperties.borders[side] = {
28086
+ size: pixelsToEightPoints(borders[side].size || 0),
28087
+ color,
28088
+ space: borders[side].space || 0,
28089
+ val: borders[side].val || "single"
27994
28090
  };
27995
28091
  }
27996
- return {
27997
- name: `w:${key2}`,
27998
- attributes: {
27999
- "w:val": "single",
28000
- "w:color": value.color ? value.color.substring(1) : "auto",
28001
- "w:sz": pixelsToEightPoints(value.size),
28002
- "w:space": value.space || 0
28003
- }
28004
- };
28005
- })
28006
- };
28007
- elements.push(cellBordersElement);
28092
+ } else if (tableCellProperties.borders?.[side]) {
28093
+ delete tableCellProperties.borders[side];
28094
+ }
28095
+ });
28096
+ } else if (tableCellProperties?.borders) {
28097
+ delete tableCellProperties.borders;
28008
28098
  }
28009
- return {
28010
- name: "w:tcPr",
28011
- elements
28012
- };
28013
- }
28014
- function generateCellMargins(cellMargins) {
28015
- const elements = [];
28016
- const { top: top2, right: right2, bottom: bottom2, left: left2 } = cellMargins;
28017
- if (top2 != null) elements.push({ name: "w:top", attributes: { "w:w": pixelsToTwips(top2) } });
28018
- if (right2 != null) elements.push({ name: "w:right", attributes: { "w:w": pixelsToTwips(right2) } });
28019
- if (bottom2 != null) elements.push({ name: "w:bottom", attributes: { "w:w": pixelsToTwips(bottom2) } });
28020
- if (left2 != null) elements.push({ name: "w:left", attributes: { "w:w": pixelsToTwips(left2) } });
28021
- return elements;
28099
+ const result = translator$d.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
28100
+ return result;
28022
28101
  }
28023
- const XML_NODE_NAME$b = "w:tc";
28102
+ const XML_NODE_NAME$d = "w:tc";
28024
28103
  const SD_NODE_NAME$b = "tableCell";
28025
- const validXmlAttributes$8 = [];
28026
- function encode$h(params2, encodedAttrs) {
28104
+ const validXmlAttributes$a = [];
28105
+ function encode$j(params2, encodedAttrs) {
28027
28106
  const {
28028
28107
  node,
28029
28108
  table,
@@ -28050,22 +28129,22 @@ function encode$h(params2, encodedAttrs) {
28050
28129
  }
28051
28130
  return schemaNode;
28052
28131
  }
28053
- function decode$j(params2, decodedAttrs) {
28132
+ function decode$l(params2, decodedAttrs) {
28054
28133
  const translated = translateTableCell(params2);
28055
28134
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
28056
28135
  translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
28057
28136
  }
28058
28137
  return translated;
28059
28138
  }
28060
- const config$a = {
28061
- xmlName: XML_NODE_NAME$b,
28139
+ const config$c = {
28140
+ xmlName: XML_NODE_NAME$d,
28062
28141
  sdNodeOrKeyName: SD_NODE_NAME$b,
28063
28142
  type: NodeTranslator.translatorTypes.NODE,
28064
- encode: encode$h,
28065
- decode: decode$j,
28066
- attributes: validXmlAttributes$8
28143
+ encode: encode$j,
28144
+ decode: decode$l,
28145
+ attributes: validXmlAttributes$a
28067
28146
  };
28068
- const translator$a = NodeTranslator.from(config$a);
28147
+ const translator$c = NodeTranslator.from(config$c);
28069
28148
  function parseTagValueJSON(json) {
28070
28149
  if (typeof json !== "string") {
28071
28150
  return {};
@@ -28492,8 +28571,64 @@ function handleImageNode(node, params2, isAnchor) {
28492
28571
  const vRelativeFrom = positionVTag?.attributes.relativeFrom;
28493
28572
  const alignV = positionVTag?.elements?.find((el) => el.name === "wp:align")?.elements[0]?.text;
28494
28573
  const simplePos = node.elements.find((el) => el.name === "wp:simplePos");
28495
- const wrapSquare = node.elements.find((el) => el.name === "wp:wrapSquare");
28496
- const wrapTopAndBottom = node.elements.find((el) => el.name === "wp:wrapTopAndBottom");
28574
+ const wrapNode = isAnchor ? node.elements.find(
28575
+ (el) => ["wp:wrapNone", "wp:wrapSquare", "wp:wrapThrough", "wp:wrapTight", "wp:wrapTopAndBottom"].includes(el.name)
28576
+ ) : null;
28577
+ const wrap2 = isAnchor ? { type: wrapNode?.name.slice(7) || "None", attrs: {} } : { type: "Inline" };
28578
+ switch (wrap2.type) {
28579
+ case "Square":
28580
+ wrap2.attrs.wrapText = wrapNode.attributes.wrapText;
28581
+ if ("distB" in (wrapNode.attributes || {})) {
28582
+ wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
28583
+ }
28584
+ if ("distL" in (wrapNode.attributes || {})) {
28585
+ wrap2.attrs.distLeft = emuToPixels(wrapNode.attributes.distL);
28586
+ }
28587
+ if ("distR" in (wrapNode.attributes || {})) {
28588
+ wrap2.attrs.distRight = emuToPixels(wrapNode.attributes.distR);
28589
+ }
28590
+ if ("distT" in (wrapNode.attributes || {})) {
28591
+ wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
28592
+ }
28593
+ break;
28594
+ case "Tight":
28595
+ case "Through": {
28596
+ if ("distL" in (wrapNode.attributes || {})) {
28597
+ wrap2.attrs.distLeft = emuToPixels(wrapNode.attributes.distL);
28598
+ }
28599
+ if ("distR" in (wrapNode.attributes || {})) {
28600
+ wrap2.attrs.distRight = emuToPixels(wrapNode.attributes.distR);
28601
+ }
28602
+ if ("distT" in (wrapNode.attributes || {})) {
28603
+ wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
28604
+ }
28605
+ if ("distB" in (wrapNode.attributes || {})) {
28606
+ wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
28607
+ }
28608
+ if ("wrapText" in (wrapNode.attributes || {})) {
28609
+ wrap2.attrs.wrapText = wrapNode.attributes.wrapText;
28610
+ }
28611
+ const polygon = wrapNode.elements?.find((el) => el.name === "wp:wrapPolygon");
28612
+ if (polygon) {
28613
+ wrap2.attrs.polygon = polygonToObj(polygon);
28614
+ if (polygon.attributes?.edited !== void 0) {
28615
+ wrap2.attrs.polygonEdited = polygon.attributes.edited;
28616
+ }
28617
+ }
28618
+ break;
28619
+ }
28620
+ case "TopAndBottom":
28621
+ if ("distB" in (wrapNode.attributes || {})) {
28622
+ wrap2.attrs.distBottom = emuToPixels(wrapNode.attributes.distB);
28623
+ }
28624
+ if ("distT" in (wrapNode.attributes || {})) {
28625
+ wrap2.attrs.distTop = emuToPixels(wrapNode.attributes.distT);
28626
+ }
28627
+ break;
28628
+ case "None":
28629
+ wrap2.attrs.behindDoc = node.attributes?.behindDoc === "1";
28630
+ break;
28631
+ }
28497
28632
  const docPr = node.elements.find((el) => el.name === "wp:docPr");
28498
28633
  let anchorData = null;
28499
28634
  if (hRelativeFrom || alignH || vRelativeFrom || alignV) {
@@ -28505,7 +28640,7 @@ function handleImageNode(node, params2, isAnchor) {
28505
28640
  };
28506
28641
  }
28507
28642
  const marginOffset = {
28508
- left: positionHValue,
28643
+ horizontal: positionHValue,
28509
28644
  top: positionVValue
28510
28645
  };
28511
28646
  const { attributes: blipAttributes = {} } = blip;
@@ -28544,10 +28679,7 @@ function handleImageNode(node, params2, isAnchor) {
28544
28679
  y: simplePos.attributes.y
28545
28680
  }
28546
28681
  },
28547
- ...wrapSquare && {
28548
- wrapText: wrapSquare.attributes.wrapText
28549
- },
28550
- wrapTopAndBottom: !!wrapTopAndBottom,
28682
+ wrap: wrap2,
28551
28683
  originalPadding: {
28552
28684
  distT: attributes["distT"],
28553
28685
  distB: attributes["distB"],
@@ -28895,7 +29027,6 @@ function addNewImageRelationship(params2, imagePath) {
28895
29027
  function translateAnchorNode(params2) {
28896
29028
  const { attrs } = params2.node;
28897
29029
  const anchorElements = [];
28898
- const wrapElements = [];
28899
29030
  if (attrs.simplePos) {
28900
29031
  anchorElements.push({
28901
29032
  name: "wp:simplePos",
@@ -28907,10 +29038,10 @@ function translateAnchorNode(params2) {
28907
29038
  }
28908
29039
  if (attrs.anchorData) {
28909
29040
  const hElements = [];
28910
- if (attrs.marginOffset.left !== void 0) {
29041
+ if (attrs.marginOffset.horizontal !== void 0) {
28911
29042
  hElements.push({
28912
29043
  name: "wp:posOffset",
28913
- elements: [{ type: "text", text: pixelsToEmu(attrs.marginOffset.left).toString() }]
29044
+ elements: [{ type: "text", text: pixelsToEmu(attrs.marginOffset.horizontal).toString() }]
28914
29045
  });
28915
29046
  }
28916
29047
  if (attrs.anchorData.alignH) {
@@ -28943,38 +29074,110 @@ function translateAnchorNode(params2) {
28943
29074
  ...vElements.length && { elements: vElements }
28944
29075
  });
28945
29076
  }
28946
- if (attrs.wrapText) {
28947
- wrapElements.push({
28948
- name: "wp:wrapSquare",
28949
- attributes: {
28950
- wrapText: attrs.wrapText
28951
- }
28952
- });
29077
+ const nodeElements = translateImageNode(params2);
29078
+ const inlineAttrs = {
29079
+ ...attrs.originalAttributes || {},
29080
+ ...nodeElements.attributes || {}
29081
+ };
29082
+ if (inlineAttrs.relativeHeight == null) {
29083
+ inlineAttrs.relativeHeight = 1;
28953
29084
  }
28954
- if (attrs.wrapTopAndBottom) {
28955
- wrapElements.push({
28956
- name: "wp:wrapTopAndBottom"
28957
- });
29085
+ if (attrs.originalAttributes?.simplePos !== void 0) {
29086
+ inlineAttrs.simplePos = attrs.originalAttributes.simplePos;
29087
+ } else if (attrs.simplePos !== void 0) {
29088
+ inlineAttrs.simplePos = attrs.simplePos;
28958
29089
  }
28959
- if (!wrapElements.length) {
28960
- wrapElements.push({
28961
- name: "wp:wrapNone"
28962
- });
29090
+ if (attrs.originalAttributes?.locked !== void 0) {
29091
+ inlineAttrs.locked = attrs.originalAttributes.locked;
28963
29092
  }
28964
- const nodeElements = translateImageNode(params2);
28965
- const inlineAttrs = {
28966
- ...nodeElements.attributes,
28967
- simplePos: attrs.originalAttributes?.simplePos,
28968
- relativeHeight: 1,
28969
- behindDoc: attrs.originalAttributes?.behindDoc,
28970
- locked: attrs.originalAttributes?.locked,
28971
- layoutInCell: attrs.originalAttributes?.layoutInCell,
28972
- allowOverlap: attrs.originalAttributes?.allowOverlap
29093
+ if (attrs.originalAttributes?.layoutInCell !== void 0) {
29094
+ inlineAttrs.layoutInCell = attrs.originalAttributes.layoutInCell;
29095
+ }
29096
+ if (attrs.originalAttributes?.allowOverlap !== void 0) {
29097
+ inlineAttrs.allowOverlap = attrs.originalAttributes.allowOverlap;
29098
+ }
29099
+ const wrapElement = {
29100
+ name: `wp:wrap${attrs.wrap?.type || "None"}`
29101
+ // Important: wp:anchor will break if no wrapping is specified. We need to use wrapNone.
28973
29102
  };
29103
+ switch (attrs.wrap?.type) {
29104
+ case "Square":
29105
+ wrapElement.attributes = {
29106
+ wrapText: attrs.wrap.attrs.wrapText
29107
+ };
29108
+ if ("distBottom" in (attrs.wrap.attrs || {})) {
29109
+ wrapElement.attributes.distB = pixelsToEmu(attrs.wrap.attrs.distBottom);
29110
+ }
29111
+ if ("distLeft" in (attrs.wrap.attrs || {})) {
29112
+ wrapElement.attributes.distL = pixelsToEmu(attrs.wrap.attrs.distLeft);
29113
+ }
29114
+ if ("distRight" in (attrs.wrap.attrs || {})) {
29115
+ wrapElement.attributes.distR = pixelsToEmu(attrs.wrap.attrs.distRight);
29116
+ }
29117
+ if ("distTop" in (attrs.wrap.attrs || {})) {
29118
+ wrapElement.attributes.distT = pixelsToEmu(attrs.wrap.attrs.distTop);
29119
+ }
29120
+ break;
29121
+ case "TopAndBottom": {
29122
+ const attributes = {};
29123
+ let hasKeys = false;
29124
+ if ("distBottom" in (attrs.wrap.attrs || {})) {
29125
+ attributes.distB = pixelsToEmu(attrs.wrap.attrs.distBottom);
29126
+ hasKeys = true;
29127
+ }
29128
+ if ("distTop" in (attrs.wrap.attrs || {})) {
29129
+ attributes.distT = pixelsToEmu(attrs.wrap.attrs.distTop);
29130
+ hasKeys = true;
29131
+ }
29132
+ if (hasKeys) {
29133
+ wrapElement.attributes = attributes;
29134
+ }
29135
+ break;
29136
+ }
29137
+ case "Through":
29138
+ case "Tight": {
29139
+ const attributes = {};
29140
+ if ("distLeft" in (attrs.wrap.attrs || {})) {
29141
+ attributes.distL = pixelsToEmu(attrs.wrap.attrs.distLeft);
29142
+ }
29143
+ if ("distRight" in (attrs.wrap.attrs || {})) {
29144
+ attributes.distR = pixelsToEmu(attrs.wrap.attrs.distRight);
29145
+ }
29146
+ if ("distTop" in (attrs.wrap.attrs || {})) {
29147
+ attributes.distT = pixelsToEmu(attrs.wrap.attrs.distTop);
29148
+ }
29149
+ if ("distBottom" in (attrs.wrap.attrs || {})) {
29150
+ attributes.distB = pixelsToEmu(attrs.wrap.attrs.distBottom);
29151
+ }
29152
+ const wrapText = attrs.wrap.attrs?.wrapText || "bothSides";
29153
+ {
29154
+ attributes.wrapText = wrapText;
29155
+ }
29156
+ if (Object.keys(attributes).length) {
29157
+ wrapElement.attributes = attributes;
29158
+ }
29159
+ if (attrs.wrap.attrs?.polygon) {
29160
+ const polygonNode = objToPolygon(attrs.wrap.attrs.polygon);
29161
+ if (polygonNode) {
29162
+ if (attrs.wrap.attrs?.polygonEdited !== void 0) {
29163
+ polygonNode.attributes = {
29164
+ ...polygonNode.attributes || {},
29165
+ edited: String(attrs.wrap.attrs.polygonEdited)
29166
+ };
29167
+ }
29168
+ wrapElement.elements = [polygonNode];
29169
+ }
29170
+ }
29171
+ break;
29172
+ }
29173
+ case "None":
29174
+ inlineAttrs.behindDoc = attrs.wrap.attrs?.behindDoc ? "1" : "0";
29175
+ break;
29176
+ }
28974
29177
  const effectIndex = nodeElements.elements.findIndex((el) => el.name === "wp:effectExtent");
28975
29178
  const elementsWithWrap = [
28976
29179
  ...nodeElements.elements.slice(0, effectIndex + 1),
28977
- ...wrapElements,
29180
+ wrapElement,
28978
29181
  ...nodeElements.elements.slice(effectIndex + 1)
28979
29182
  ];
28980
29183
  return {
@@ -28983,32 +29186,32 @@ function translateAnchorNode(params2) {
28983
29186
  elements: [...anchorElements, ...elementsWithWrap]
28984
29187
  };
28985
29188
  }
28986
- const XML_NODE_NAME$a = "wp:anchor";
29189
+ const XML_NODE_NAME$c = "wp:anchor";
28987
29190
  const SD_NODE_NAME$a = ["image"];
28988
- const validXmlAttributes$7 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
28989
- function encode$g(params2) {
29191
+ const validXmlAttributes$9 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
29192
+ function encode$i(params2) {
28990
29193
  const { node } = params2.extraParams;
28991
29194
  if (!node || !node.type) {
28992
29195
  return null;
28993
29196
  }
28994
29197
  return handleAnchorNode(params2);
28995
29198
  }
28996
- function decode$i(params2) {
29199
+ function decode$k(params2) {
28997
29200
  const { node } = params2;
28998
29201
  if (!node || !node.type) {
28999
29202
  return null;
29000
29203
  }
29001
29204
  return translateAnchorNode(params2);
29002
29205
  }
29003
- const config$9 = {
29004
- xmlName: XML_NODE_NAME$a,
29206
+ const config$b = {
29207
+ xmlName: XML_NODE_NAME$c,
29005
29208
  sdNodeOrKeyName: SD_NODE_NAME$a,
29006
29209
  type: NodeTranslator.translatorTypes.NODE,
29007
- encode: encode$g,
29008
- decode: decode$i,
29009
- attributes: validXmlAttributes$7
29210
+ encode: encode$i,
29211
+ decode: decode$k,
29212
+ attributes: validXmlAttributes$9
29010
29213
  };
29011
- const translator$9 = NodeTranslator.from(config$9);
29214
+ const translator$b = NodeTranslator.from(config$b);
29012
29215
  function handleInlineNode(params2) {
29013
29216
  const { node } = params2.extraParams;
29014
29217
  if (node.name !== "wp:inline") {
@@ -29024,41 +29227,41 @@ function translateInlineNode(params2) {
29024
29227
  elements: nodeElements.elements
29025
29228
  };
29026
29229
  }
29027
- const XML_NODE_NAME$9 = "wp:inline";
29230
+ const XML_NODE_NAME$b = "wp:inline";
29028
29231
  const SD_NODE_NAME$9 = ["image"];
29029
- const validXmlAttributes$6 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
29030
- function encode$f(params2) {
29232
+ const validXmlAttributes$8 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
29233
+ function encode$h(params2) {
29031
29234
  const { node } = params2.extraParams;
29032
29235
  if (!node || !node.type) {
29033
29236
  return null;
29034
29237
  }
29035
29238
  return handleInlineNode(params2);
29036
29239
  }
29037
- function decode$h(params2) {
29240
+ function decode$j(params2) {
29038
29241
  const { node } = params2;
29039
29242
  if (!node || !node.type) {
29040
29243
  return null;
29041
29244
  }
29042
29245
  return translateInlineNode(params2);
29043
29246
  }
29044
- const config$8 = {
29045
- xmlName: XML_NODE_NAME$9,
29247
+ const config$a = {
29248
+ xmlName: XML_NODE_NAME$b,
29046
29249
  sdNodeOrKeyName: SD_NODE_NAME$9,
29047
29250
  type: NodeTranslator.translatorTypes.NODE,
29048
- encode: encode$f,
29049
- decode: decode$h,
29050
- attributes: validXmlAttributes$6
29251
+ encode: encode$h,
29252
+ decode: decode$j,
29253
+ attributes: validXmlAttributes$8
29051
29254
  };
29052
- const translator$8 = NodeTranslator.from(config$8);
29053
- const XML_NODE_NAME$8 = "w:drawing";
29255
+ const translator$a = NodeTranslator.from(config$a);
29256
+ const XML_NODE_NAME$a = "w:drawing";
29054
29257
  const SD_NODE_NAME$8 = [];
29055
- const validXmlAttributes$5 = [];
29056
- function encode$e(params2) {
29258
+ const validXmlAttributes$7 = [];
29259
+ function encode$g(params2) {
29057
29260
  const nodes = params2.nodes;
29058
29261
  const node = nodes[0];
29059
29262
  const translatorByChildName = {
29060
- "wp:anchor": translator$9,
29061
- "wp:inline": translator$8
29263
+ "wp:anchor": translator$b,
29264
+ "wp:inline": translator$a
29062
29265
  };
29063
29266
  return node.elements.reduce((acc, child) => {
29064
29267
  if (acc) return acc;
@@ -29067,12 +29270,12 @@ function encode$e(params2) {
29067
29270
  return translator2.encode({ ...params2, extraParams: { node: child } }) || acc;
29068
29271
  }, null);
29069
29272
  }
29070
- function decode$g(params2) {
29273
+ function decode$i(params2) {
29071
29274
  const { node } = params2;
29072
29275
  if (!node || !node.type) {
29073
29276
  return null;
29074
29277
  }
29075
- const childTranslator = node.attrs.isAnchor ? translator$9 : translator$8;
29278
+ const childTranslator = node.attrs.isAnchor ? translator$b : translator$a;
29076
29279
  const resultNode = childTranslator.decode(params2);
29077
29280
  return wrapTextInRun(
29078
29281
  {
@@ -29082,15 +29285,15 @@ function decode$g(params2) {
29082
29285
  []
29083
29286
  );
29084
29287
  }
29085
- const config$7 = {
29086
- xmlName: XML_NODE_NAME$8,
29288
+ const config$9 = {
29289
+ xmlName: XML_NODE_NAME$a,
29087
29290
  sdNodeOrKeyName: SD_NODE_NAME$8,
29088
29291
  type: NodeTranslator.translatorTypes.NODE,
29089
- encode: encode$e,
29090
- decode: decode$g,
29091
- attributes: validXmlAttributes$5
29292
+ encode: encode$g,
29293
+ decode: decode$i,
29294
+ attributes: validXmlAttributes$7
29092
29295
  };
29093
- const translator$7 = NodeTranslator.from(config$7);
29296
+ const translator$9 = NodeTranslator.from(config$9);
29094
29297
  class CommandService {
29095
29298
  /**
29096
29299
  * @param {import('./commands/types/index.js').CommandServiceOptions} props
@@ -30438,7 +30641,7 @@ function prepareTextAnnotation(params2) {
30438
30641
  return getTextNodeForExport(attrs.displayLabel, [...marks, ...marksFromAttrs], params2);
30439
30642
  }
30440
30643
  function prepareImageAnnotation(params2, imageSize) {
30441
- return translator$7.decode({
30644
+ return translator$9.decode({
30442
30645
  ...params2,
30443
30646
  imageSize
30444
30647
  });
@@ -30753,10 +30956,10 @@ function generateSdtPrTagForStructuredContent({ node }) {
30753
30956
  };
30754
30957
  return result;
30755
30958
  }
30756
- const XML_NODE_NAME$7 = "w:sdt";
30959
+ const XML_NODE_NAME$9 = "w:sdt";
30757
30960
  const SD_NODE_NAME$7 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
30758
- const validXmlAttributes$4 = [];
30759
- function encode$d(params2) {
30961
+ const validXmlAttributes$6 = [];
30962
+ function encode$f(params2) {
30760
30963
  const nodes = params2.nodes;
30761
30964
  const node = nodes[0];
30762
30965
  const { type: sdtType, handler: handler2 } = sdtNodeTypeStrategy(node);
@@ -30766,7 +30969,7 @@ function encode$d(params2) {
30766
30969
  const result = handler2(params2);
30767
30970
  return result;
30768
30971
  }
30769
- function decode$f(params2) {
30972
+ function decode$h(params2) {
30770
30973
  const { node } = params2;
30771
30974
  if (!node || !node.type) {
30772
30975
  return null;
@@ -30784,85 +30987,85 @@ function decode$f(params2) {
30784
30987
  const result = decoder();
30785
30988
  return result;
30786
30989
  }
30787
- const config$6 = {
30788
- xmlName: XML_NODE_NAME$7,
30990
+ const config$8 = {
30991
+ xmlName: XML_NODE_NAME$9,
30789
30992
  sdNodeOrKeyName: SD_NODE_NAME$7,
30790
30993
  type: NodeTranslator.translatorTypes.NODE,
30791
- encode: encode$d,
30792
- decode: decode$f,
30793
- attributes: validXmlAttributes$4
30994
+ encode: encode$f,
30995
+ decode: decode$h,
30996
+ attributes: validXmlAttributes$6
30794
30997
  };
30795
- const translator$6 = NodeTranslator.from(config$6);
30796
- const encode$c = (attributes) => {
30998
+ const translator$8 = NodeTranslator.from(config$8);
30999
+ const encode$e = (attributes) => {
30797
31000
  return attributes["w:id"];
30798
31001
  };
30799
- const decode$e = (attrs) => {
31002
+ const decode$g = (attrs) => {
30800
31003
  return attrs.id;
30801
31004
  };
30802
31005
  const attrConfig$7 = Object.freeze({
30803
31006
  xmlName: "w:id",
30804
31007
  sdName: "id",
30805
- encode: encode$c,
30806
- decode: decode$e
31008
+ encode: encode$e,
31009
+ decode: decode$g
30807
31010
  });
30808
- const encode$b = (attributes) => {
31011
+ const encode$d = (attributes) => {
30809
31012
  return attributes["w:name"];
30810
31013
  };
30811
- const decode$d = (attrs) => {
31014
+ const decode$f = (attrs) => {
30812
31015
  return attrs.name;
30813
31016
  };
30814
31017
  const attrConfig$6 = Object.freeze({
30815
31018
  xmlName: "w:name",
30816
31019
  sdName: "name",
30817
- encode: encode$b,
30818
- decode: decode$d
31020
+ encode: encode$d,
31021
+ decode: decode$f
30819
31022
  });
30820
- const encode$a = (attributes) => {
31023
+ const encode$c = (attributes) => {
30821
31024
  return attributes["w:colFirst"];
30822
31025
  };
30823
- const decode$c = (attrs) => {
31026
+ const decode$e = (attrs) => {
30824
31027
  return attrs.colFirst;
30825
31028
  };
30826
31029
  const attrConfig$5 = Object.freeze({
30827
31030
  xmlName: "w:colFirst",
30828
31031
  sdName: "colFirst",
30829
- encode: encode$a,
30830
- decode: decode$c
31032
+ encode: encode$c,
31033
+ decode: decode$e
30831
31034
  });
30832
- const encode$9 = (attributes) => {
31035
+ const encode$b = (attributes) => {
30833
31036
  return attributes["w:colLast"];
30834
31037
  };
30835
- const decode$b = (attrs) => {
31038
+ const decode$d = (attrs) => {
30836
31039
  return attrs.colLast;
30837
31040
  };
30838
31041
  const attrConfig$4 = Object.freeze({
30839
31042
  xmlName: "w:colLast",
30840
31043
  sdName: "colLast",
30841
- encode: encode$9,
30842
- decode: decode$b
31044
+ encode: encode$b,
31045
+ decode: decode$d
30843
31046
  });
30844
- const encode$8 = (attributes) => {
31047
+ const encode$a = (attributes) => {
30845
31048
  return attributes["w:displacedByCustomXml"];
30846
31049
  };
30847
- const decode$a = (attrs) => {
31050
+ const decode$c = (attrs) => {
30848
31051
  return attrs.displacedByCustomXml;
30849
31052
  };
30850
31053
  const attrConfig$3 = Object.freeze({
30851
31054
  xmlName: "w:displacedByCustomXml",
30852
31055
  sdName: "displacedByCustomXml",
30853
- encode: encode$8,
30854
- decode: decode$a
31056
+ encode: encode$a,
31057
+ decode: decode$c
30855
31058
  });
30856
- const validXmlAttributes$3 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
30857
- const XML_NODE_NAME$6 = "w:bookmarkStart";
31059
+ const validXmlAttributes$5 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
31060
+ const XML_NODE_NAME$8 = "w:bookmarkStart";
30858
31061
  const SD_NODE_NAME$6 = "bookmarkStart";
30859
- const encode$7 = (params2, encodedAttrs = {}) => {
31062
+ const encode$9 = (params2, encodedAttrs = {}) => {
30860
31063
  return {
30861
31064
  type: "bookmarkStart",
30862
31065
  attrs: encodedAttrs
30863
31066
  };
30864
31067
  };
30865
- const decode$9 = (params2, decodedAttrs = {}) => {
31068
+ const decode$b = (params2, decodedAttrs = {}) => {
30866
31069
  const result = {
30867
31070
  name: "w:bookmarkStart",
30868
31071
  elements: []
@@ -30872,49 +31075,49 @@ const decode$9 = (params2, decodedAttrs = {}) => {
30872
31075
  }
30873
31076
  return result;
30874
31077
  };
30875
- const config$5 = {
30876
- xmlName: XML_NODE_NAME$6,
31078
+ const config$7 = {
31079
+ xmlName: XML_NODE_NAME$8,
30877
31080
  sdNodeOrKeyName: SD_NODE_NAME$6,
30878
31081
  type: NodeTranslator.translatorTypes.NODE,
30879
- encode: encode$7,
30880
- decode: decode$9,
30881
- attributes: validXmlAttributes$3
31082
+ encode: encode$9,
31083
+ decode: decode$b,
31084
+ attributes: validXmlAttributes$5
30882
31085
  };
30883
- const translator$5 = NodeTranslator.from(config$5);
30884
- const encode$6 = (attributes) => {
31086
+ const translator$7 = NodeTranslator.from(config$7);
31087
+ const encode$8 = (attributes) => {
30885
31088
  return attributes["w:id"];
30886
31089
  };
30887
- const decode$8 = (attrs) => {
31090
+ const decode$a = (attrs) => {
30888
31091
  return attrs.id;
30889
31092
  };
30890
31093
  const attrConfig$2 = Object.freeze({
30891
31094
  xmlName: "w:id",
30892
31095
  sdName: "id",
30893
- encode: encode$6,
30894
- decode: decode$8
31096
+ encode: encode$8,
31097
+ decode: decode$a
30895
31098
  });
30896
- const encode$5 = (attributes) => {
31099
+ const encode$7 = (attributes) => {
30897
31100
  return attributes["w:displacedByCustomXml"];
30898
31101
  };
30899
- const decode$7 = (attrs) => {
31102
+ const decode$9 = (attrs) => {
30900
31103
  return attrs.displacedByCustomXml;
30901
31104
  };
30902
31105
  const attrConfig$1 = Object.freeze({
30903
31106
  xmlName: "w:displacedByCustomXml",
30904
31107
  sdName: "displacedByCustomXml",
30905
- encode: encode$5,
30906
- decode: decode$7
31108
+ encode: encode$7,
31109
+ decode: decode$9
30907
31110
  });
30908
- const validXmlAttributes$2 = [attrConfig$2, attrConfig$1];
30909
- const XML_NODE_NAME$5 = "w:bookmarkEnd";
31111
+ const validXmlAttributes$4 = [attrConfig$2, attrConfig$1];
31112
+ const XML_NODE_NAME$7 = "w:bookmarkEnd";
30910
31113
  const SD_NODE_NAME$5 = "bookmarkEnd";
30911
- const encode$4 = (params2, encodedAttrs = {}) => {
31114
+ const encode$6 = (params2, encodedAttrs = {}) => {
30912
31115
  return {
30913
31116
  type: "bookmarkEnd",
30914
31117
  attrs: encodedAttrs
30915
31118
  };
30916
31119
  };
30917
- const decode$6 = (params2, decodedAttrs = {}) => {
31120
+ const decode$8 = (params2, decodedAttrs = {}) => {
30918
31121
  const result = {
30919
31122
  name: "w:bookmarkEnd",
30920
31123
  elements: []
@@ -30924,27 +31127,27 @@ const decode$6 = (params2, decodedAttrs = {}) => {
30924
31127
  }
30925
31128
  return result;
30926
31129
  };
30927
- const config$4 = {
30928
- xmlName: XML_NODE_NAME$5,
31130
+ const config$6 = {
31131
+ xmlName: XML_NODE_NAME$7,
30929
31132
  sdNodeOrKeyName: SD_NODE_NAME$5,
30930
31133
  type: NodeTranslator.translatorTypes.NODE,
30931
- encode: encode$4,
30932
- decode: decode$6,
30933
- attributes: validXmlAttributes$2
31134
+ encode: encode$6,
31135
+ decode: decode$8,
31136
+ attributes: validXmlAttributes$4
30934
31137
  };
30935
- const translator$4 = NodeTranslator.from(config$4);
30936
- const decode$5 = (attrs) => attrs?.["w:id"];
31138
+ const translator$6 = NodeTranslator.from(config$6);
31139
+ const decode$7 = (attrs) => attrs?.["w:id"];
30937
31140
  const attrConfig = Object.freeze({
30938
31141
  xmlName: "w:id",
30939
31142
  sdName: "w:id",
30940
31143
  // We do not translate it from 'w:id' to 'id' when encoding, so the name is the same
30941
31144
  encode: () => {
30942
31145
  },
30943
- decode: decode$5
31146
+ decode: decode$7
30944
31147
  });
30945
- const XML_NODE_NAME$4 = "w:commentRange";
31148
+ const XML_NODE_NAME$6 = "w:commentRange";
30946
31149
  const SD_NODE_NAME$4 = "commentRange";
30947
- const decode$4 = (params2) => {
31150
+ const decode$6 = (params2) => {
30948
31151
  const { node, comments, commentsExportType, exportedCommentDefs } = params2;
30949
31152
  if (!node) return;
30950
31153
  if (!comments) return;
@@ -30987,19 +31190,19 @@ const getCommentSchema = (type2, commentIndex) => {
30987
31190
  };
30988
31191
  };
30989
31192
  const getConfig = (type2) => ({
30990
- xmlName: `${XML_NODE_NAME$4}${type2}`,
31193
+ xmlName: `${XML_NODE_NAME$6}${type2}`,
30991
31194
  sdNodeOrKeyName: `${SD_NODE_NAME$4}${type2}`,
30992
31195
  type: NodeTranslator.translatorTypes.NODE,
30993
31196
  encode: () => {
30994
31197
  },
30995
- decode: decode$4,
31198
+ decode: decode$6,
30996
31199
  attributes: [attrConfig]
30997
31200
  });
30998
31201
  const commentRangeStartTranslator = NodeTranslator.from(getConfig("Start"));
30999
31202
  const commentRangeEndTranslator = NodeTranslator.from(getConfig("End"));
31000
- const XML_NODE_NAME$3 = "sd:pageReference";
31203
+ const XML_NODE_NAME$5 = "sd:pageReference";
31001
31204
  const SD_NODE_NAME$3 = "pageReference";
31002
- const encode$3 = (params2) => {
31205
+ const encode$5 = (params2) => {
31003
31206
  const { nodes = [], nodeListHandler } = params2 || {};
31004
31207
  const node = nodes[0];
31005
31208
  const processedText = nodeListHandler.handler({
@@ -31016,7 +31219,7 @@ const encode$3 = (params2) => {
31016
31219
  };
31017
31220
  return processedNode;
31018
31221
  };
31019
- const decode$3 = (params2) => {
31222
+ const decode$5 = (params2) => {
31020
31223
  const { node } = params2;
31021
31224
  const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
31022
31225
  const contentNodes = (node.content ?? []).flatMap((n) => exportSchemaToJson({ ...params2, node: n }));
@@ -31089,17 +31292,17 @@ const decode$3 = (params2) => {
31089
31292
  ];
31090
31293
  return translated;
31091
31294
  };
31092
- const config$3 = {
31093
- xmlName: XML_NODE_NAME$3,
31295
+ const config$5 = {
31296
+ xmlName: XML_NODE_NAME$5,
31094
31297
  sdNodeOrKeyName: SD_NODE_NAME$3,
31095
31298
  type: NodeTranslator.translatorTypes.NODE,
31096
- encode: encode$3,
31097
- decode: decode$3
31299
+ encode: encode$5,
31300
+ decode: decode$5
31098
31301
  };
31099
- const translator$3 = NodeTranslator.from(config$3);
31100
- const XML_NODE_NAME$2 = "sd:tableOfContents";
31302
+ const translator$5 = NodeTranslator.from(config$5);
31303
+ const XML_NODE_NAME$4 = "sd:tableOfContents";
31101
31304
  const SD_NODE_NAME$2 = "tableOfContents";
31102
- const encode$2 = (params2) => {
31305
+ const encode$4 = (params2) => {
31103
31306
  const { nodes = [], nodeListHandler } = params2 || {};
31104
31307
  const node = nodes[0];
31105
31308
  const processedContent = nodeListHandler.handler({
@@ -31115,7 +31318,7 @@ const encode$2 = (params2) => {
31115
31318
  };
31116
31319
  return processedNode;
31117
31320
  };
31118
- const decode$2 = (params2) => {
31321
+ const decode$4 = (params2) => {
31119
31322
  const { node } = params2;
31120
31323
  const contentNodes = node.content.map((n) => exportSchemaToJson({ ...params2, node: n }));
31121
31324
  const tocBeginElements = [
@@ -31162,14 +31365,14 @@ const decode$2 = (params2) => {
31162
31365
  }
31163
31366
  return contentNodes;
31164
31367
  };
31165
- const config$2 = {
31166
- xmlName: XML_NODE_NAME$2,
31368
+ const config$4 = {
31369
+ xmlName: XML_NODE_NAME$4,
31167
31370
  sdNodeOrKeyName: SD_NODE_NAME$2,
31168
31371
  type: NodeTranslator.translatorTypes.NODE,
31169
- encode: encode$2,
31170
- decode: decode$2
31372
+ encode: encode$4,
31373
+ decode: decode$4
31171
31374
  };
31172
- const translator$2 = NodeTranslator.from(config$2);
31375
+ const translator$4 = NodeTranslator.from(config$4);
31173
31376
  function parseInlineStyles(styleString) {
31174
31377
  if (!styleString) return {};
31175
31378
  return styleString.split(";").filter((style2) => !!style2.trim()).reduce((acc, style2) => {
@@ -31303,7 +31506,7 @@ const handleDrawingNode = (params2) => {
31303
31506
  if (mainNode.name === "w:drawing") node = mainNode;
31304
31507
  else node = mainNode.elements.find((el) => el.name === "w:drawing");
31305
31508
  if (!node) return { nodes: [], consumed: 0 };
31306
- const schemaNode = translator$7.encode(params2);
31509
+ const schemaNode = translator$9.encode(params2);
31307
31510
  const newNodes = schemaNode ? [schemaNode] : [];
31308
31511
  return { nodes: newNodes, consumed: 1 };
31309
31512
  };
@@ -31311,6 +31514,203 @@ const drawingNodeHandlerEntity = {
31311
31514
  handlerName: "drawingNodeHandler",
31312
31515
  handler: handleDrawingNode
31313
31516
  };
31517
+ const createTrackStyleMark = (marks) => {
31518
+ const trackStyleMark = marks.find((mark) => mark.type === "trackFormat");
31519
+ if (trackStyleMark) {
31520
+ return {
31521
+ type: "element",
31522
+ name: "w:rPrChange",
31523
+ attributes: {
31524
+ "w:id": trackStyleMark.attrs.id,
31525
+ "w:author": trackStyleMark.attrs.author,
31526
+ "w:authorEmail": trackStyleMark.attrs.authorEmail,
31527
+ "w:date": trackStyleMark.attrs.date
31528
+ },
31529
+ elements: trackStyleMark.attrs.before.map((mark) => processOutputMarks([mark])).filter((r2) => r2 !== void 0)
31530
+ };
31531
+ }
31532
+ return void 0;
31533
+ };
31534
+ const XML_NODE_NAME$3 = "w:del";
31535
+ const SD_ATTR_KEY$1 = "trackDelete";
31536
+ const validXmlAttributes$3 = [
31537
+ createAttributeHandler("w:id", "id"),
31538
+ createAttributeHandler("w:date", "date"),
31539
+ createAttributeHandler("w:author", "author"),
31540
+ createAttributeHandler("w:authorEmail", "authorEmail")
31541
+ ];
31542
+ const encode$3 = (params2, encodedAttrs = {}) => {
31543
+ const { nodeListHandler, extraParams = {} } = params2;
31544
+ const { node } = extraParams;
31545
+ const subs = nodeListHandler.handler({
31546
+ ...params2,
31547
+ insideTrackChange: true,
31548
+ nodes: node.elements,
31549
+ path: [...params2.path || [], node]
31550
+ });
31551
+ encodedAttrs.importedAuthor = `${encodedAttrs.author} (imported)`;
31552
+ subs.forEach((subElement) => {
31553
+ if (subElement.marks === void 0) subElement.marks = [];
31554
+ subElement.marks.push({ type: "trackDelete", attrs: encodedAttrs });
31555
+ });
31556
+ return subs;
31557
+ };
31558
+ function decode$3(params2) {
31559
+ const { node } = params2;
31560
+ if (!node || !node.type) {
31561
+ return null;
31562
+ }
31563
+ const trackingMarks = ["trackInsert", "trackFormat", "trackDelete"];
31564
+ const marks = node.marks;
31565
+ const trackedMark = marks.find((m2) => m2.type === "trackDelete");
31566
+ const trackStyleMark = createTrackStyleMark(marks);
31567
+ node.marks = marks.filter((m2) => !trackingMarks.includes(m2.type));
31568
+ if (trackStyleMark) {
31569
+ node.marks.push(trackStyleMark);
31570
+ }
31571
+ const translatedTextNode = exportSchemaToJson({ ...params2, node });
31572
+ const textNode = translatedTextNode.elements.find((n) => n.name === "w:t");
31573
+ textNode.name = "w:delText";
31574
+ return {
31575
+ name: "w:del",
31576
+ attributes: {
31577
+ "w:id": trackedMark.attrs.id,
31578
+ "w:author": trackedMark.attrs.author,
31579
+ "w:authorEmail": trackedMark.attrs.authorEmail,
31580
+ "w:date": trackedMark.attrs.date
31581
+ },
31582
+ elements: [translatedTextNode]
31583
+ };
31584
+ }
31585
+ const config$3 = {
31586
+ xmlName: XML_NODE_NAME$3,
31587
+ sdNodeOrKeyName: SD_ATTR_KEY$1,
31588
+ type: NodeTranslator.translatorTypes.ATTRIBUTE,
31589
+ encode: encode$3,
31590
+ decode: decode$3,
31591
+ attributes: validXmlAttributes$3
31592
+ };
31593
+ const translator$3 = NodeTranslator.from(config$3);
31594
+ const XML_NODE_NAME$2 = "w:ins";
31595
+ const SD_ATTR_KEY = "trackInsert";
31596
+ const validXmlAttributes$2 = [
31597
+ createAttributeHandler("w:id", "id"),
31598
+ createAttributeHandler("w:date", "date"),
31599
+ createAttributeHandler("w:author", "author"),
31600
+ createAttributeHandler("w:authorEmail", "authorEmail")
31601
+ ];
31602
+ const encode$2 = (params2, encodedAttrs = {}) => {
31603
+ const { nodeListHandler, extraParams = {} } = params2;
31604
+ const { node } = extraParams;
31605
+ const subs = nodeListHandler.handler({
31606
+ ...params2,
31607
+ insideTrackChange: true,
31608
+ nodes: node.elements,
31609
+ path: [...params2.path || [], node]
31610
+ });
31611
+ encodedAttrs.importedAuthor = `${encodedAttrs.author} (imported)`;
31612
+ subs.forEach((subElement) => {
31613
+ if (subElement.marks === void 0) subElement.marks = [];
31614
+ subElement.marks.push({ type: "trackInsert", attrs: encodedAttrs });
31615
+ });
31616
+ return subs;
31617
+ };
31618
+ function decode$2(params2) {
31619
+ const { node } = params2;
31620
+ if (!node || !node.type) {
31621
+ return null;
31622
+ }
31623
+ const trackingMarks = ["trackInsert", "trackFormat", "trackDelete"];
31624
+ const marks = node.marks;
31625
+ const trackedMark = marks.find((m2) => m2.type === "trackInsert");
31626
+ const trackStyleMark = createTrackStyleMark(marks);
31627
+ node.marks = marks.filter((m2) => !trackingMarks.includes(m2.type));
31628
+ if (trackStyleMark) {
31629
+ node.marks.push(trackStyleMark);
31630
+ }
31631
+ const translatedTextNode = exportSchemaToJson({ ...params2, node });
31632
+ return {
31633
+ name: "w:ins",
31634
+ attributes: {
31635
+ "w:id": trackedMark.attrs.id,
31636
+ "w:author": trackedMark.attrs.author,
31637
+ "w:authorEmail": trackedMark.attrs.authorEmail,
31638
+ "w:date": trackedMark.attrs.date
31639
+ },
31640
+ elements: [translatedTextNode]
31641
+ };
31642
+ }
31643
+ const config$2 = {
31644
+ xmlName: XML_NODE_NAME$2,
31645
+ sdNodeOrKeyName: SD_ATTR_KEY,
31646
+ type: NodeTranslator.translatorTypes.ATTRIBUTE,
31647
+ encode: encode$2,
31648
+ decode: decode$2,
31649
+ attributes: validXmlAttributes$2
31650
+ };
31651
+ const translator$2 = NodeTranslator.from(config$2);
31652
+ const isTrackChangeElement = (node) => node?.name === "w:del" || node?.name === "w:ins";
31653
+ const unwrapTrackChangeNode = (node) => {
31654
+ if (!node) {
31655
+ return null;
31656
+ }
31657
+ if (isTrackChangeElement(node)) {
31658
+ return node;
31659
+ }
31660
+ if (node.name === "w:sdt") {
31661
+ const content = node.elements?.find((element) => element.name === "w:sdtContent");
31662
+ if (!content?.elements?.length) {
31663
+ return null;
31664
+ }
31665
+ for (const child of content.elements) {
31666
+ const trackChange = unwrapTrackChangeNode(child);
31667
+ if (trackChange) {
31668
+ return trackChange;
31669
+ }
31670
+ }
31671
+ }
31672
+ return null;
31673
+ };
31674
+ const handleTrackChangeNode = (params2) => {
31675
+ const { nodes } = params2;
31676
+ if (nodes.length === 0) {
31677
+ return { nodes: [], consumed: 0 };
31678
+ }
31679
+ const mainNode = unwrapTrackChangeNode(nodes[0]);
31680
+ if (!mainNode) {
31681
+ return { nodes: [], consumed: 0 };
31682
+ }
31683
+ let result;
31684
+ const translatorParams = {
31685
+ ...params2,
31686
+ nodes: [mainNode]
31687
+ };
31688
+ switch (mainNode.name) {
31689
+ case "w:del":
31690
+ result = translator$3.encode({
31691
+ extraParams: {
31692
+ node: mainNode
31693
+ },
31694
+ ...translatorParams
31695
+ });
31696
+ break;
31697
+ case "w:ins":
31698
+ result = translator$2.encode({
31699
+ extraParams: {
31700
+ node: mainNode
31701
+ },
31702
+ ...translatorParams
31703
+ });
31704
+ break;
31705
+ }
31706
+ return { nodes: result, consumed: 1 };
31707
+ };
31708
+ const trackChangeNodeHandlerEntity = {
31709
+ handlerName: "trackChangeNodeHandler",
31710
+ handler: handleTrackChangeNode
31711
+ };
31712
+ const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$1c);
31713
+ const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$1b);
31314
31714
  function parseProperties(node) {
31315
31715
  const marks = [];
31316
31716
  const unknownMarks = [];
@@ -31362,51 +31762,6 @@ function getElementName(element) {
31362
31762
  const isPropertiesElement = (element) => {
31363
31763
  return !!SuperConverter.propertyTypes[element.name || element.type];
31364
31764
  };
31365
- const handleTrackChangeNode = (params2) => {
31366
- const { nodes, nodeListHandler } = params2;
31367
- if (nodes.length === 0 || !(nodes[0].name === "w:del" || nodes[0].name === "w:ins" || nodes[0].name === "w:sdt")) {
31368
- return { nodes: [], consumed: 0 };
31369
- }
31370
- const mainNode = nodes[0];
31371
- let node;
31372
- if (["w:ins", "w:del"].includes(mainNode.name)) {
31373
- node = mainNode;
31374
- } else {
31375
- const sdtContent = mainNode.elements.find((el) => el.name === "w:sdtContent");
31376
- const trackedChange = sdtContent?.elements.find((el) => ["w:ins", "w:del"].includes(el.name));
31377
- if (trackedChange) node = trackedChange;
31378
- }
31379
- if (!node) {
31380
- return { nodes: [], consumed: 0 };
31381
- }
31382
- const { name } = node;
31383
- const { attributes, elements } = parseProperties(node);
31384
- const subs = nodeListHandler.handler({
31385
- ...params2,
31386
- insideTrackChange: true,
31387
- nodes: elements,
31388
- path: [...params2.path || [], node]
31389
- });
31390
- const changeType = name === "w:del" ? TrackDeleteMarkName : TrackInsertMarkName;
31391
- const mappedAttributes = {
31392
- id: attributes["w:id"],
31393
- date: attributes["w:date"],
31394
- author: attributes["w:author"],
31395
- authorEmail: attributes["w:authorEmail"],
31396
- importedAuthor: `${attributes["w:author"]} (imported)`
31397
- };
31398
- subs.forEach((subElement) => {
31399
- if (subElement.marks === void 0) subElement.marks = [];
31400
- subElement.marks.push({ type: changeType, attrs: mappedAttributes });
31401
- });
31402
- return { nodes: subs, consumed: 1 };
31403
- };
31404
- const trackChangeNodeHandlerEntity = {
31405
- handlerName: "trackChangeNodeHandler",
31406
- handler: handleTrackChangeNode
31407
- };
31408
- const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$X);
31409
- const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$W);
31410
31765
  const handleTextNode = (params2) => {
31411
31766
  const { nodes, insideTrackChange } = params2;
31412
31767
  if (nodes.length === 0 || !(nodes[0].name === "w:t" || insideTrackChange && nodes[0].name === "w:delText")) {
@@ -31447,7 +31802,7 @@ const handleParagraphNode = (params2) => {
31447
31802
  if (nodes.length === 0 || nodes[0].name !== "w:p") {
31448
31803
  return { nodes: [], consumed: 0 };
31449
31804
  }
31450
- const schemaNode = translator$17.encode(params2);
31805
+ const schemaNode = translator$1o.encode(params2);
31451
31806
  const newNodes = schemaNode ? [schemaNode] : [];
31452
31807
  return { nodes: newNodes, consumed: 1 };
31453
31808
  };
@@ -31460,7 +31815,7 @@ const handleSdtNode = (params2) => {
31460
31815
  if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
31461
31816
  return { nodes: [], consumed: 0 };
31462
31817
  }
31463
- const result = translator$6.encode(params2);
31818
+ const result = translator$8.encode(params2);
31464
31819
  if (!result) {
31465
31820
  return { nodes: [], consumed: 0 };
31466
31821
  }
@@ -31550,7 +31905,7 @@ const handler = (params2) => {
31550
31905
  if (nodes.length === 0 || nodes[0].name !== "w:br") {
31551
31906
  return { nodes: [], consumed: 0 };
31552
31907
  }
31553
- const result = translator$1a.encode(params2);
31908
+ const result = translator$1r.encode(params2);
31554
31909
  if (!result) return { nodes: [], consumed: 0 };
31555
31910
  return {
31556
31911
  nodes: [result],
@@ -31622,7 +31977,7 @@ const handleBookmarkStartNode = (params2) => {
31622
31977
  if (isCustomMarkBookmark(nodes[0], params2.editor)) {
31623
31978
  return handleBookmarkNode(params2);
31624
31979
  }
31625
- const node = translator$5.encode(params2);
31980
+ const node = translator$7.encode(params2);
31626
31981
  if (!node) return { nodes: [], consumed: 0 };
31627
31982
  return { nodes: [node], consumed: 1 };
31628
31983
  };
@@ -31654,7 +32009,7 @@ const handleBookmarkEndNode = (params2) => {
31654
32009
  if (!nodes.length || nodes[0].name !== "w:bookmarkEnd") {
31655
32010
  return { nodes: [], consumed: 0 };
31656
32011
  }
31657
- const node = translator$4.encode(params2);
32012
+ const node = translator$6.encode(params2);
31658
32013
  if (!node) return { nodes: [], consumed: 0 };
31659
32014
  return { nodes: [node], consumed: 1 };
31660
32015
  };
@@ -31787,7 +32142,7 @@ const autoTotalPageCountEntity = {
31787
32142
  handlerName: "autoTotalPageCountEntity",
31788
32143
  handler: handleAutoTotalPageNumber
31789
32144
  };
31790
- const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$3);
32145
+ const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$5);
31791
32146
  const handlePictNode = (params2) => {
31792
32147
  const { nodes } = params2;
31793
32148
  if (!nodes.length || nodes[0].name !== "w:p") {
@@ -32176,14 +32531,14 @@ const handleTabNode = (params2) => {
32176
32531
  if (!nodes.length || nodes[0].name !== "w:tab") {
32177
32532
  return { nodes: [], consumed: 0 };
32178
32533
  }
32179
- const node = translator$18.encode(params2);
32534
+ const node = translator$1p.encode(params2);
32180
32535
  return { nodes: [node], consumed: 1 };
32181
32536
  };
32182
32537
  const tabNodeEntityHandler = {
32183
32538
  handlerName: "w:tabTranslator",
32184
32539
  handler: handleTabNode
32185
32540
  };
32186
- const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$2);
32541
+ const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$4);
32187
32542
  function preProcessPageInstruction(nodesToCombine) {
32188
32543
  const pageNumNode = {
32189
32544
  name: "sd:autoPageNumber",
@@ -32428,12 +32783,14 @@ const createDocumentJson = (docx, converter, editor) => {
32428
32783
  const content = pruneIgnoredNodes(contentElements);
32429
32784
  const comments = importCommentData({ docx, converter, editor });
32430
32785
  const lists = {};
32786
+ const inlineDocumentFonts = [];
32431
32787
  let parsedContent = nodeListHandler.handler({
32432
32788
  nodes: content,
32433
32789
  nodeListHandler,
32434
32790
  docx,
32435
32791
  converter,
32436
32792
  editor,
32793
+ inlineDocumentFonts,
32437
32794
  lists,
32438
32795
  path: []
32439
32796
  });
@@ -32456,6 +32813,7 @@ const createDocumentJson = (docx, converter, editor) => {
32456
32813
  savedTagsToRestore: node,
32457
32814
  pageStyles: getDocumentStyles(node, docx, converter, editor),
32458
32815
  comments,
32816
+ inlineDocumentFonts,
32459
32817
  linkedStyles: getStyleDefinitions(docx),
32460
32818
  numbering: getNumberingDefinitions(docx)
32461
32819
  };
@@ -32519,6 +32877,7 @@ const createNodeListHandler = (nodeHandlers) => {
32519
32877
  filename,
32520
32878
  parentStyleId,
32521
32879
  lists,
32880
+ inlineDocumentFonts,
32522
32881
  path = []
32523
32882
  }) => {
32524
32883
  if (!elements || !elements.length) return [];
@@ -32545,6 +32904,7 @@ const createNodeListHandler = (nodeHandlers) => {
32545
32904
  filename,
32546
32905
  parentStyleId,
32547
32906
  lists,
32907
+ inlineDocumentFonts,
32548
32908
  path
32549
32909
  });
32550
32910
  },
@@ -33124,7 +33484,7 @@ function translateVRectContentBlock(params2) {
33124
33484
  const XML_NODE_NAME = "w:pict";
33125
33485
  const SD_NODE_NAME = ["shapeContainer", "contentBlock"];
33126
33486
  const validXmlAttributes = [];
33127
- function encode$1d(params2) {
33487
+ function encode$1c(params2) {
33128
33488
  const { node, pNode } = params2.extraParams;
33129
33489
  const { type: pictType, handler: handler2 } = pictNodeTypeStrategy(node);
33130
33490
  if (!handler2 || pictType === "unknown") {
@@ -33156,7 +33516,7 @@ const config = {
33156
33516
  xmlName: XML_NODE_NAME,
33157
33517
  sdNodeOrKeyName: SD_NODE_NAME,
33158
33518
  type: NodeTranslator.translatorTypes.NODE,
33159
- encode: encode$1d,
33519
+ encode: encode$1c,
33160
33520
  decode,
33161
33521
  attributes: validXmlAttributes
33162
33522
  };
@@ -33232,35 +33592,35 @@ function exportSchemaToJson(params2) {
33232
33592
  doc: translateDocumentNode,
33233
33593
  body: translateBodyNode,
33234
33594
  heading: translateHeadingNode,
33235
- paragraph: translator$17,
33236
- run: translator$W,
33595
+ paragraph: translator$1o,
33596
+ run: translator$1b,
33237
33597
  text: translateTextNode,
33238
33598
  bulletList: translateList,
33239
33599
  orderedList: translateList,
33240
- lineBreak: translator$1a,
33241
- table: translator$b,
33242
- tableRow: translator$I,
33243
- tableCell: translator$a,
33244
- bookmarkStart: translator$5,
33245
- bookmarkEnd: translator$4,
33246
- fieldAnnotation: translator$6,
33247
- tab: translator$18,
33248
- image: translator$7,
33249
- hardBreak: translator$1a,
33600
+ lineBreak: translator$1r,
33601
+ table: translator$s,
33602
+ tableRow: translator$Z,
33603
+ tableCell: translator$c,
33604
+ bookmarkStart: translator$7,
33605
+ bookmarkEnd: translator$6,
33606
+ fieldAnnotation: translator$8,
33607
+ tab: translator$1p,
33608
+ image: translator$9,
33609
+ hardBreak: translator$1r,
33250
33610
  commentRangeStart: commentRangeStartTranslator,
33251
33611
  commentRangeEnd: commentRangeEndTranslator,
33252
33612
  commentReference: () => null,
33253
33613
  shapeContainer: translator,
33254
33614
  shapeTextbox: translator,
33255
33615
  contentBlock: translator,
33256
- structuredContent: translator$6,
33257
- structuredContentBlock: translator$6,
33258
- documentPartObject: translator$6,
33259
- documentSection: translator$6,
33616
+ structuredContent: translator$8,
33617
+ structuredContentBlock: translator$8,
33618
+ documentPartObject: translator$8,
33619
+ documentSection: translator$8,
33260
33620
  "page-number": translatePageNumberNode,
33261
33621
  "total-page-number": translateTotalPageNumberNode,
33262
- pageReference: translator$3,
33263
- tableOfContents: translator$2
33622
+ pageReference: translator$5,
33623
+ tableOfContents: translator$4
33264
33624
  };
33265
33625
  let handler2 = router[type2];
33266
33626
  if (handler2 && "decode" in handler2 && typeof handler2.decode === "function") {
@@ -33596,62 +33956,22 @@ function getTextNodeForExport(text, marks, params2) {
33596
33956
  function translateTextNode(params2) {
33597
33957
  const { node, extraParams } = params2;
33598
33958
  const trackedMarks = [TrackInsertMarkName, TrackDeleteMarkName];
33599
- const isTrackedNode = node.marks?.some((m2) => trackedMarks.includes(m2.type));
33600
- if (isTrackedNode) return translateTrackedNode(params2);
33959
+ const trackedMark = node.marks?.find((m2) => trackedMarks.includes(m2.type));
33960
+ if (trackedMark) {
33961
+ switch (trackedMark.type) {
33962
+ case "trackDelete":
33963
+ return translator$3.decode(params2);
33964
+ case "trackInsert":
33965
+ return translator$2.decode(params2);
33966
+ }
33967
+ }
33601
33968
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
33602
33969
  if (isLinkNode && !extraParams?.linkProcessed) {
33603
- return translator$X.decode(params2);
33970
+ return translator$1c.decode(params2);
33604
33971
  }
33605
33972
  const { text, marks = [] } = node;
33606
33973
  return getTextNodeForExport(text, marks, params2);
33607
33974
  }
33608
- function createTrackStyleMark(marks) {
33609
- const trackStyleMark = marks.find((mark) => mark.type === TrackFormatMarkName);
33610
- if (trackStyleMark) {
33611
- const markElement = {
33612
- type: "element",
33613
- name: "w:rPrChange",
33614
- attributes: {
33615
- "w:id": trackStyleMark.attrs.id,
33616
- "w:author": trackStyleMark.attrs.author,
33617
- "w:authorEmail": trackStyleMark.attrs.authorEmail,
33618
- "w:date": trackStyleMark.attrs.date
33619
- },
33620
- elements: trackStyleMark.attrs.before.map((mark) => processOutputMarks([mark])).filter((r2) => r2 !== void 0)
33621
- };
33622
- return markElement;
33623
- }
33624
- return void 0;
33625
- }
33626
- function translateTrackedNode(params2) {
33627
- const { node } = params2;
33628
- const marks = node.marks;
33629
- const trackingMarks = [TrackInsertMarkName, TrackDeleteMarkName, TrackFormatMarkName];
33630
- const trackedMark = marks.find((m2) => trackingMarks.includes(m2.type));
33631
- const isInsert = trackedMark.type === TrackInsertMarkName;
33632
- const trackStyleMark = createTrackStyleMark(marks);
33633
- node.marks = marks.filter((m2) => !trackingMarks.includes(m2.type));
33634
- if (trackStyleMark) {
33635
- node.marks.push(trackStyleMark);
33636
- }
33637
- const translatedTextNode = exportSchemaToJson({ ...params2, node });
33638
- if (!isInsert) {
33639
- const textNode = translatedTextNode.elements.find((n) => n.name === "w:t");
33640
- textNode.name = "w:delText";
33641
- }
33642
- const trackedNode = {
33643
- name: isInsert ? "w:ins" : "w:del",
33644
- type: "element",
33645
- attributes: {
33646
- "w:id": trackedMark.attrs.id,
33647
- "w:author": trackedMark.attrs.author,
33648
- "w:authorEmail": trackedMark.attrs.authorEmail,
33649
- "w:date": trackedMark.attrs.date
33650
- },
33651
- elements: [translatedTextNode]
33652
- };
33653
- return trackedNode;
33654
- }
33655
33975
  function wrapTextInRun(nodeOrNodes, marks) {
33656
33976
  let elements = [];
33657
33977
  if (Array.isArray(nodeOrNodes)) elements = nodeOrNodes;
@@ -33907,7 +34227,7 @@ function translateMark(mark) {
33907
34227
  markElement.type = "element";
33908
34228
  break;
33909
34229
  case "underline": {
33910
- const translated = translator$14.decode({
34230
+ const translated = translator$1l.decode({
33911
34231
  node: {
33912
34232
  attrs: {
33913
34233
  underlineType: attrs.underlineType ?? attrs.underline ?? null,
@@ -33971,7 +34291,7 @@ function translateMark(mark) {
33971
34291
  break;
33972
34292
  case "highlight": {
33973
34293
  const highlightValue = attrs.color ?? attrs.highlight ?? null;
33974
- const translated = translator$19.decode({ node: { attrs: { highlight: highlightValue } } });
34294
+ const translated = translator$1q.decode({ node: { attrs: { highlight: highlightValue } } });
33975
34295
  return translated || {};
33976
34296
  }
33977
34297
  case "link":
@@ -34350,6 +34670,7 @@ const _SuperConverter = class _SuperConverter2 {
34350
34670
  this.fonts = params2?.fonts || {};
34351
34671
  this.addedMedia = {};
34352
34672
  this.comments = [];
34673
+ this.inlineDocumentFonts = [];
34353
34674
  this.docHiglightColors = /* @__PURE__ */ new Set([]);
34354
34675
  this.xml = params2?.xml;
34355
34676
  this.declaration = null;
@@ -34636,6 +34957,23 @@ const _SuperConverter = class _SuperConverter2 {
34636
34957
  return result;
34637
34958
  }
34638
34959
  getDocumentFonts() {
34960
+ const inlineDocumentFonts = [...new Set(this.inlineDocumentFonts || [])];
34961
+ const fontTable = this.convertedXml["word/fontTable.xml"];
34962
+ if (!fontTable) {
34963
+ return inlineDocumentFonts;
34964
+ }
34965
+ const wFonts = fontTable.elements?.find((element) => element.name === "w:fonts");
34966
+ if (!wFonts) {
34967
+ return inlineDocumentFonts;
34968
+ }
34969
+ if (!wFonts.elements) {
34970
+ return inlineDocumentFonts;
34971
+ }
34972
+ const fontsInFontTable = wFonts.elements.filter((element) => element.name === "w:font").map((element) => element.attributes["w:name"]);
34973
+ const allFonts = [...inlineDocumentFonts, ...fontsInFontTable];
34974
+ return [...new Set(allFonts)];
34975
+ }
34976
+ getFontFaceImportString() {
34639
34977
  const fontTable = this.convertedXml["word/fontTable.xml"];
34640
34978
  if (!fontTable || !Object.keys(this.fonts).length) return;
34641
34979
  const fonts = fontTable.elements.find((el) => el.name === "w:fonts");
@@ -34649,6 +34987,7 @@ const _SuperConverter = class _SuperConverter2 {
34649
34987
  const rels = this.convertedXml["word/_rels/fontTable.xml.rels"];
34650
34988
  const relationships = rels?.elements.find((el) => el.name === "Relationships") || {};
34651
34989
  const { elements } = relationships;
34990
+ const fontsImported = [];
34652
34991
  let styleString = "";
34653
34992
  for (const font of fontsToInclude) {
34654
34993
  const filePath = elements.find((el) => el.attributes.Id === font.attributes["r:id"])?.attributes?.Target;
@@ -34665,6 +35004,9 @@ const _SuperConverter = class _SuperConverter2 {
34665
35004
  const isItalic = font.name.includes("Italic");
34666
35005
  const isLight = font.name.includes("Light");
34667
35006
  const fontWeight = isNormal ? "normal" : isBold ? "bold" : isLight ? "200" : "normal";
35007
+ if (!fontsImported.includes(font.fontFamily)) {
35008
+ fontsImported.push(font.fontFamily);
35009
+ }
34668
35010
  styleString += `
34669
35011
  @font-face {
34670
35012
  font-style: ${isItalic ? "italic" : "normal"};
@@ -34675,7 +35017,10 @@ const _SuperConverter = class _SuperConverter2 {
34675
35017
  }
34676
35018
  `;
34677
35019
  }
34678
- return styleString;
35020
+ return {
35021
+ styleString,
35022
+ fontsImported
35023
+ };
34679
35024
  }
34680
35025
  getDocumentInternalId() {
34681
35026
  const settingsLocation = "word/settings.xml";
@@ -34730,6 +35075,7 @@ const _SuperConverter = class _SuperConverter2 {
34730
35075
  this.numbering = result.numbering;
34731
35076
  this.comments = result.comments;
34732
35077
  this.linkedStyles = result.linkedStyles;
35078
+ this.inlineDocumentFonts = result.inlineDocumentFonts;
34733
35079
  return result.pmDoc;
34734
35080
  } else {
34735
35081
  return null;
@@ -37691,7 +38037,7 @@ var __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, "rea
37691
38037
  var __privateAdd$1 = (obj, member, value) => member.has(obj) ? __typeError$1("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
37692
38038
  var __privateSet = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
37693
38039
  var __privateMethod$1 = (obj, member, method) => (__accessCheck$1(obj, member, "access private method"), method);
37694
- var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
38040
+ var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, determineUnsupportedFontsWithLocalFonts_fn, determineUnsupportedFontsWithCanvas_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
37695
38041
  var GOOD_LEAF_SIZE = 200;
37696
38042
  var RopeSequence = function RopeSequence2() {
37697
38043
  };
@@ -50760,6 +51106,29 @@ const setImageNodeSelection = (view, pos) => {
50760
51106
  }
50761
51107
  return false;
50762
51108
  };
51109
+ function canRenderFont(fontName, fallbackFont = "sans-serif") {
51110
+ const _canRenderFont = (fontName2, fallbackFont2) => {
51111
+ const canvas = document.createElement("canvas");
51112
+ const ctx2 = canvas.getContext("2d");
51113
+ ctx2.textBaseline = "top";
51114
+ const text = "abcdefghijklmnopqrstuvwxyz0123456789";
51115
+ ctx2.font = `72px ${fallbackFont2}`;
51116
+ const initialTextMeasurement = ctx2.measureText(text);
51117
+ const fallbackWidth = initialTextMeasurement.width;
51118
+ const fallbackHeight = initialTextMeasurement.actualBoundingBoxDescent;
51119
+ ctx2.font = `72px "${fontName2}", ${fallbackFont2}`;
51120
+ const customTextMeasurement = ctx2.measureText(text);
51121
+ const customFontWidth = customTextMeasurement.width;
51122
+ const customFontHeight = customTextMeasurement.actualBoundingBoxDescent;
51123
+ const isAvailable = customFontWidth !== fallbackWidth || customFontHeight !== fallbackHeight;
51124
+ return isAvailable;
51125
+ };
51126
+ if (_canRenderFont(fontName, fallbackFont)) {
51127
+ return true;
51128
+ }
51129
+ const oppositeFallbackFont = fallbackFont === "sans-serif" ? "serif" : "sans-serif";
51130
+ return _canRenderFont(fontName, oppositeFallbackFont);
51131
+ }
50763
51132
  const { findChildren: findChildren$3 } = helpers;
50764
51133
  function getAllFieldAnnotations(state2) {
50765
51134
  let fieldAnnotations = findChildren$3(state2.doc, (node) => node.type.name === "fieldAnnotation");
@@ -51809,6 +52178,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
51809
52178
  __publicField$1(this, "schema");
51810
52179
  __publicField$1(this, "view");
51811
52180
  __publicField$1(this, "isFocused", false);
52181
+ __publicField$1(this, "fontsImported", []);
51812
52182
  __publicField$1(this, "options", {
51813
52183
  element: null,
51814
52184
  selector: null,
@@ -51869,6 +52239,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
51869
52239
  onPaginationUpdate: () => null,
51870
52240
  onException: () => null,
51871
52241
  onListDefinitionsChange: () => null,
52242
+ onFontsResolved: null,
51872
52243
  // async (file) => url;
51873
52244
  handleImageUpload: null,
51874
52245
  // telemetry
@@ -52845,6 +53216,9 @@ init_fn = function() {
52845
53216
  this.emit("beforeCreate", { editor: this });
52846
53217
  this.on("contentError", this.options.onContentError);
52847
53218
  this.mount(this.options.element);
53219
+ if (!this.options.isHeadless) {
53220
+ __privateMethod$1(this, _Editor_instances, checkFonts_fn).call(this);
53221
+ }
52848
53222
  this.on("create", this.options.onCreate);
52849
53223
  this.on("update", this.options.onUpdate);
52850
53224
  this.on("selectionUpdate", this.options.onSelectionUpdate);
@@ -52992,13 +53366,74 @@ initMedia_fn = function() {
52992
53366
  }
52993
53367
  };
52994
53368
  initFonts_fn = function() {
52995
- const styleString = this.converter.getDocumentFonts();
52996
- if (styleString?.length) {
53369
+ const results = this.converter.getFontFaceImportString();
53370
+ if (results?.styleString?.length) {
52997
53371
  const style2 = document.createElement("style");
52998
- style2.textContent = styleString;
53372
+ style2.textContent = results.styleString;
52999
53373
  document.head.appendChild(style2);
53374
+ this.fontsImported = results.fontsImported;
53375
+ }
53376
+ };
53377
+ checkFonts_fn = async function() {
53378
+ if (!this.options.onFontsResolved || typeof this.options.onFontsResolved !== "function") {
53379
+ return;
53380
+ }
53381
+ if (this.options.isHeadless) {
53382
+ return;
53383
+ }
53384
+ const fontsUsedInDocument = this.converter.getDocumentFonts();
53385
+ if (!("queryLocalFonts" in window)) {
53386
+ console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
53387
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
53388
+ this.options.onFontsResolved({
53389
+ documentFonts: fontsUsedInDocument,
53390
+ unsupportedFonts
53391
+ });
53392
+ return;
53393
+ }
53394
+ const localFontAccess = await navigator.permissions.query({ name: "local-fonts" });
53395
+ if (localFontAccess.state === "denied") {
53396
+ console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
53397
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
53398
+ this.options.onFontsResolved({
53399
+ documentFonts: fontsUsedInDocument,
53400
+ unsupportedFonts
53401
+ });
53402
+ return;
53403
+ }
53404
+ try {
53405
+ const localFonts = await window.queryLocalFonts();
53406
+ const uniqueLocalFonts = [...new Set(localFonts.map((font) => font.family))];
53407
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithLocalFonts_fn).call(this, fontsUsedInDocument, uniqueLocalFonts);
53408
+ this.options.onFontsResolved({
53409
+ documentFonts: fontsUsedInDocument,
53410
+ unsupportedFonts
53411
+ });
53412
+ } catch {
53413
+ console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
53414
+ const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
53415
+ this.options.onFontsResolved({
53416
+ documentFonts: fontsUsedInDocument,
53417
+ unsupportedFonts
53418
+ });
53000
53419
  }
53001
53420
  };
53421
+ determineUnsupportedFontsWithLocalFonts_fn = function(fonts, localFonts) {
53422
+ const unsupportedFonts = fonts.filter((font) => {
53423
+ const isLocalFont = localFonts.includes(font);
53424
+ const isFontImported = this.fontsImported.includes(font);
53425
+ return !isLocalFont && !isFontImported;
53426
+ });
53427
+ return unsupportedFonts;
53428
+ };
53429
+ determineUnsupportedFontsWithCanvas_fn = function(fonts) {
53430
+ const unsupportedFonts = fonts.filter((font) => {
53431
+ const canRender = canRenderFont(font);
53432
+ const isFontImported = this.fontsImported.includes(font);
53433
+ return !canRender && !isFontImported;
53434
+ });
53435
+ return unsupportedFonts;
53436
+ };
53002
53437
  createSchema_fn = function() {
53003
53438
  this.schema = this.extensionService.schema;
53004
53439
  };
@@ -61755,6 +62190,15 @@ const TableCell = Node$1.create({
61755
62190
  widthUnit: {
61756
62191
  default: "px",
61757
62192
  rendered: false
62193
+ },
62194
+ /**
62195
+ * @category Attribute
62196
+ * @param {TableCellProperties} tableCellProperties - Properties for the table cell.
62197
+ * @see {@link https://ecma-international.org/publications-and-standards/standards/ecma-376/} "Fundamentals And Markup Language Reference", page 463
62198
+ */
62199
+ tableCellProperties: {
62200
+ default: null,
62201
+ rendered: false
61758
62202
  }
61759
62203
  };
61760
62204
  },
@@ -63914,6 +64358,58 @@ const registerImages = async (foundImages, editor, view) => {
63914
64358
  }
63915
64359
  });
63916
64360
  };
64361
+ const normalizeWrap = (attrs = {}) => {
64362
+ const wrap2 = attrs.wrap;
64363
+ if (wrap2?.type && wrap2.type !== "Inline") {
64364
+ return {
64365
+ type: wrap2.type,
64366
+ attrs: wrap2.attrs ?? {}
64367
+ };
64368
+ }
64369
+ if (wrap2?.type === "Inline" && Object.keys(wrap2.attrs ?? {}).length) {
64370
+ return {
64371
+ type: "Inline",
64372
+ attrs: wrap2.attrs
64373
+ };
64374
+ }
64375
+ if (!wrap2 && attrs.wrapText) {
64376
+ return {
64377
+ type: "Square",
64378
+ attrs: {
64379
+ wrapText: attrs.wrapText
64380
+ }
64381
+ };
64382
+ }
64383
+ if (!wrap2 && attrs.wrapTopAndBottom) {
64384
+ return {
64385
+ type: "TopAndBottom",
64386
+ attrs: {}
64387
+ };
64388
+ }
64389
+ if (wrap2?.type === "Inline") {
64390
+ return {
64391
+ type: "Inline",
64392
+ attrs: wrap2.attrs ?? {}
64393
+ };
64394
+ }
64395
+ return {
64396
+ type: "Inline",
64397
+ attrs: {}
64398
+ };
64399
+ };
64400
+ const normalizeMarginOffset = (marginOffset = {}) => {
64401
+ const { left: left2, horizontal, ...rest } = marginOffset;
64402
+ return {
64403
+ ...rest,
64404
+ horizontal: horizontal ?? left2
64405
+ };
64406
+ };
64407
+ const getNormalizedImageAttrs = (attrs = {}) => {
64408
+ return {
64409
+ wrap: normalizeWrap(attrs),
64410
+ marginOffset: normalizeMarginOffset(attrs.marginOffset ?? {})
64411
+ };
64412
+ };
63917
64413
  const ImagePositionPluginKey = new PluginKey("ImagePosition");
63918
64414
  const ImagePositionPlugin = ({ editor }) => {
63919
64415
  const { view } = editor;
@@ -63961,7 +64457,8 @@ const getImagePositionDecorations = (state2, view) => {
63961
64457
  let style2 = "";
63962
64458
  let className = "";
63963
64459
  const { vRelativeFrom, alignH } = node.attrs.anchorData;
63964
- const { size: size2, padding, marginOffset } = node.attrs;
64460
+ const { size: size2, padding } = node.attrs;
64461
+ const { marginOffset } = getNormalizedImageAttrs(node.attrs);
63965
64462
  const pageBreak = findPreviousDomNodeWithClass(view, pos, "pagination-break-wrapper");
63966
64463
  if (pageBreak) {
63967
64464
  switch (alignH) {
@@ -64078,7 +64575,24 @@ const Image = Node$1.create({
64078
64575
  rendered: false
64079
64576
  },
64080
64577
  originalAttributes: { rendered: false },
64081
- wrapTopAndBottom: { rendered: false },
64578
+ /**
64579
+ * @category Attribute
64580
+ * @param {Object} wrap - Wrapping options
64581
+ * @param {string} wrap.type - Wrap type: "None", "Square", "Through", "Tight", "TopAndBottom", "Inline"
64582
+ * @param {Object} [wrap.attrs] - Wrap attributes (only allowed attributes for the given type will be accepted)
64583
+ * @param {string} [wrap.attrs.wrapText] - Text wrapping mode for Square type: "bothSides", "largest", "left", "right"
64584
+ * @param {number} [wrap.attrs.distTop] - Top distance in pixels
64585
+ * @param {number} [wrap.attrs.distBottom] - Bottom distance in pixels
64586
+ * @param {number} [wrap.attrs.distLeft] - Left distance in pixels
64587
+ * @param {number} [wrap.attrs.distRight] - Right distance in pixels
64588
+ * @param {Array} [wrap.attrs.polygon] - Polygon points for Through/Tight types: [[x1,y1], [x2,y2], ...]
64589
+ * @param {boolean} [wrap.attrs.behindDoc] - Whether image should be behind document text (for wrapNone)
64590
+ */
64591
+ wrap: {
64592
+ default: { type: "Inline" },
64593
+ rendered: false
64594
+ // Handled in main renderDOM
64595
+ },
64082
64596
  anchorData: {
64083
64597
  default: null,
64084
64598
  rendered: false
@@ -64124,7 +64638,6 @@ const Image = Node$1.create({
64124
64638
  * @private
64125
64639
  */
64126
64640
  simplePos: { rendered: false },
64127
- wrapText: { rendered: false },
64128
64641
  extension: { rendered: false },
64129
64642
  size: {
64130
64643
  default: {},
@@ -64140,55 +64653,13 @@ const Image = Node$1.create({
64140
64653
  },
64141
64654
  padding: {
64142
64655
  default: {},
64143
- renderDOM: ({ size: size2 = {}, padding, marginOffset, transformData = {} }) => {
64144
- let { left: left2 = 0, top: top2 = 0, bottom: bottom2 = 0, right: right2 = 0 } = padding ?? {};
64145
- const { rotation } = transformData;
64146
- const { height, width } = size2;
64147
- if (rotation && height && width) {
64148
- const { horizontal, vertical } = getRotationMargins(width, height, rotation);
64149
- left2 += horizontal;
64150
- right2 += horizontal;
64151
- top2 += vertical;
64152
- bottom2 += vertical;
64153
- }
64154
- let style2 = "";
64155
- if (left2 && marginOffset?.left == null) style2 += `margin-left: ${left2}px;`;
64156
- if (top2 && marginOffset?.top == null) style2 += `margin-top: ${top2}px;`;
64157
- if (bottom2) style2 += `margin-bottom: ${bottom2}px;`;
64158
- if (right2) style2 += `margin-right: ${right2}px;`;
64159
- return { style: style2 };
64160
- }
64656
+ rendered: false
64657
+ // Handled in main renderDOM
64161
64658
  },
64162
64659
  marginOffset: {
64163
64660
  default: {},
64164
- renderDOM: ({ marginOffset, anchorData, transformData, size: size2 }) => {
64165
- const hasAnchorData = Boolean(anchorData);
64166
- const hasMarginOffsets = marginOffset?.left != null || marginOffset?.top != null;
64167
- if (!hasAnchorData && !hasMarginOffsets) return {};
64168
- const relativeFromPageV = anchorData?.vRelativeFrom === "page";
64169
- const maxMarginV = 500;
64170
- const baseLeft = marginOffset?.left ?? 0;
64171
- const baseTop = marginOffset?.top ?? 0;
64172
- let rotationLeft = 0;
64173
- let rotationTop = 0;
64174
- const { rotation } = transformData ?? {};
64175
- const { height, width } = size2 ?? {};
64176
- if (rotation && height && width) {
64177
- const { horizontal, vertical } = getRotationMargins(width, height, rotation);
64178
- rotationLeft = horizontal;
64179
- rotationTop = vertical;
64180
- }
64181
- const left2 = baseLeft + rotationLeft;
64182
- const top2 = baseTop + rotationTop;
64183
- let style2 = "";
64184
- if (left2) style2 += `margin-left: ${left2}px;`;
64185
- if (top2) {
64186
- if (relativeFromPageV && top2 >= maxMarginV) style2 += `margin-top: ${maxMarginV}px;`;
64187
- else style2 += `margin-top: ${top2}px;`;
64188
- }
64189
- if (!style2) return {};
64190
- return { style: style2 };
64191
- }
64661
+ rendered: false
64662
+ // Handled in main renderDOM
64192
64663
  },
64193
64664
  style: {
64194
64665
  default: null,
@@ -64207,8 +64678,181 @@ const Image = Node$1.create({
64207
64678
  }
64208
64679
  ];
64209
64680
  },
64210
- renderDOM({ htmlAttributes }) {
64211
- return ["img", Attribute2.mergeAttributes(this.options.htmlAttributes, htmlAttributes)];
64681
+ renderDOM({ node, htmlAttributes }) {
64682
+ const { wrap: wrap2, marginOffset } = getNormalizedImageAttrs(node.attrs);
64683
+ const { anchorData, padding, transformData = {}, size: size2 = { width: 0, height: 0 } } = node.attrs;
64684
+ const margin = {
64685
+ left: 0,
64686
+ right: 0,
64687
+ top: 0,
64688
+ bottom: 0
64689
+ };
64690
+ let centered = false;
64691
+ let floatRight = false;
64692
+ let baseHorizontal = marginOffset?.horizontal || 0;
64693
+ let style2 = "";
64694
+ if (padding) {
64695
+ if (padding.left) margin.left += padding.left;
64696
+ if (padding.right) margin.right += padding.right;
64697
+ if (padding.top) margin.top += padding.top;
64698
+ if (padding.bottom) margin.bottom += padding.bottom;
64699
+ }
64700
+ const { rotation } = transformData;
64701
+ const { height, width } = size2;
64702
+ if (rotation && height && width) {
64703
+ const { horizontal, vertical } = getRotationMargins(width, height, rotation);
64704
+ margin.left += horizontal;
64705
+ margin.right += horizontal;
64706
+ margin.top += vertical;
64707
+ margin.bottom += vertical;
64708
+ }
64709
+ if (wrap2 && wrap2.type) {
64710
+ const { type: type2, attrs = {} } = wrap2;
64711
+ switch (type2) {
64712
+ case "None":
64713
+ style2 += "position: absolute;";
64714
+ if (attrs.behindDoc) {
64715
+ style2 += "z-index: -1;";
64716
+ } else {
64717
+ style2 += "z-index: 1;";
64718
+ }
64719
+ break;
64720
+ case "Square":
64721
+ style2 += "shape-outside: border-box; clear: both;";
64722
+ if (attrs.wrapText === "right") {
64723
+ style2 += "float: left;";
64724
+ } else if (attrs.wrapText === "left") {
64725
+ style2 += "float: right;";
64726
+ floatRight = true;
64727
+ } else if (["largest", "bothSides"].includes(attrs.wrapText)) {
64728
+ const pageStyles2 = this.editor?.converter?.pageStyles;
64729
+ if (pageStyles2?.pageSize && pageStyles2?.pageMargins && size2.width) {
64730
+ const pageWidth = inchesToPixels(pageStyles2.pageSize.width);
64731
+ const leftMargin = inchesToPixels(pageStyles2.pageMargins.left);
64732
+ const rightMargin = inchesToPixels(pageStyles2.pageMargins.right);
64733
+ const contentWidth = pageWidth - leftMargin - rightMargin;
64734
+ const imageWidth = size2.width + (attrs.distLeft || 0) + (attrs.distRight || 0);
64735
+ const leftSpace = marginOffset.horizontal;
64736
+ const rightSpace = contentWidth - leftSpace - imageWidth;
64737
+ if (rightSpace < 0) {
64738
+ style2 += "float: left;";
64739
+ } else if (rightSpace > leftSpace) {
64740
+ style2 += "float: left;";
64741
+ } else {
64742
+ style2 += "float: right;";
64743
+ floatRight = true;
64744
+ baseHorizontal = rightSpace;
64745
+ }
64746
+ } else {
64747
+ style2 += "float: left;";
64748
+ }
64749
+ }
64750
+ if (attrs.distTop) margin.top += attrs.distTop;
64751
+ if (attrs.distBottom) margin.bottom += attrs.distBottom;
64752
+ if (attrs.distLeft) margin.left += attrs.distLeft;
64753
+ if (attrs.distRight) margin.right += attrs.distRight;
64754
+ break;
64755
+ case "Through":
64756
+ case "Tight":
64757
+ style2 += "clear: both;";
64758
+ const pageStyles = this.editor?.converter?.pageStyles;
64759
+ if (pageStyles?.pageSize && pageStyles?.pageMargins && size2.width) {
64760
+ const pageWidth = inchesToPixels(pageStyles.pageSize.width);
64761
+ const leftMargin = inchesToPixels(pageStyles.pageMargins.left);
64762
+ const rightMargin = inchesToPixels(pageStyles.pageMargins.right);
64763
+ const contentWidth = pageWidth - leftMargin - rightMargin;
64764
+ const imageWidth = size2.width + (attrs.distLeft || 0) + (attrs.distRight || 0);
64765
+ const leftSpace = marginOffset.horizontal;
64766
+ const rightSpace = contentWidth - leftSpace - imageWidth;
64767
+ if (rightSpace < 0) {
64768
+ style2 += "float: left;";
64769
+ } else if (rightSpace > leftSpace) {
64770
+ style2 += "float: left;";
64771
+ } else {
64772
+ style2 += "float: right;";
64773
+ floatRight = true;
64774
+ baseHorizontal = rightSpace;
64775
+ }
64776
+ } else {
64777
+ style2 += "float: left;";
64778
+ }
64779
+ if (attrs.distTop) margin.top += attrs.distTop;
64780
+ if (attrs.distBottom) margin.bottom += attrs.distBottom;
64781
+ if (attrs.distLeft) margin.left += attrs.distLeft;
64782
+ if (attrs.distRight) margin.right += attrs.distRight;
64783
+ if (attrs.polygon) {
64784
+ let horizontalOffset = floatRight ? attrs.polygon[0][0] || 0 : marginOffset.horizontal + 15;
64785
+ let maxX = 0;
64786
+ let minX = 0;
64787
+ let minY = 0;
64788
+ let maxY = 0;
64789
+ attrs.polygon.forEach(([x, y2]) => {
64790
+ if (floatRight && x < horizontalOffset) horizontalOffset = x;
64791
+ if (x > maxX) maxX = x;
64792
+ if (x < minX) minX = x;
64793
+ if (y2 > maxY) maxY = y2;
64794
+ if (y2 < minY) minY = y2;
64795
+ });
64796
+ const originalWidth = maxX - minX;
64797
+ const originalHeight = maxY - minY;
64798
+ const scaleWidth = Math.min(1, size2.width / originalWidth);
64799
+ const scaleHeight = Math.min(1, size2.height / originalHeight);
64800
+ const verticalOffset = Math.max(0, marginOffset.top);
64801
+ const points = attrs.polygon.map(([x, y2]) => `${horizontalOffset + x * scaleWidth}px ${verticalOffset + y2 * scaleHeight}px`).join(", ");
64802
+ style2 += `shape-outside: polygon(${points});`;
64803
+ }
64804
+ break;
64805
+ case "TopAndBottom":
64806
+ style2 += "display: block; clear: both;";
64807
+ if (attrs.distTop) margin.top += attrs.distTop;
64808
+ if (attrs.distBottom) margin.bottom += attrs.distBottom;
64809
+ centered = true;
64810
+ break;
64811
+ }
64812
+ }
64813
+ const hasAnchorData = Boolean(anchorData);
64814
+ const hasMarginOffsets = marginOffset?.horizontal != null || marginOffset?.top != null;
64815
+ if (hasAnchorData || hasMarginOffsets) {
64816
+ const relativeFromPageV = anchorData?.vRelativeFrom === "page";
64817
+ const maxMarginV = 500;
64818
+ const baseTop = Math.max(0, marginOffset?.top ?? 0);
64819
+ let rotationHorizontal = 0;
64820
+ let rotationTop = 0;
64821
+ const { rotation: rotation2 } = transformData ?? {};
64822
+ const { height: height2, width: width2 } = size2 ?? {};
64823
+ if (rotation2 && height2 && width2) {
64824
+ const { horizontal: horizontal2, vertical } = getRotationMargins(width2, height2, rotation2);
64825
+ rotationHorizontal = horizontal2;
64826
+ rotationTop = vertical;
64827
+ }
64828
+ const horizontal = baseHorizontal + rotationHorizontal;
64829
+ const top2 = baseTop + rotationTop;
64830
+ if (horizontal) {
64831
+ if (floatRight) {
64832
+ margin.right += horizontal;
64833
+ } else {
64834
+ margin.left += horizontal;
64835
+ }
64836
+ }
64837
+ if (top2) {
64838
+ if (relativeFromPageV && top2 >= maxMarginV) margin.top += maxMarginV;
64839
+ else margin.top += top2;
64840
+ }
64841
+ }
64842
+ if (centered) {
64843
+ style2 += "margin-left: auto; margin-right: auto;";
64844
+ } else {
64845
+ if (margin.left) style2 += `margin-left: ${margin.left}px;`;
64846
+ if (margin.right) style2 += `margin-right: ${margin.right}px;`;
64847
+ }
64848
+ if (margin.top) style2 += `margin-top: ${margin.top}px;`;
64849
+ if (margin.bottom) style2 += `margin-bottom: ${margin.bottom}px;`;
64850
+ const finalAttributes = { ...htmlAttributes };
64851
+ if (style2) {
64852
+ const existingStyle = finalAttributes.style || "";
64853
+ finalAttributes.style = existingStyle + (existingStyle ? " " : "") + style2;
64854
+ }
64855
+ return ["img", Attribute2.mergeAttributes(this.options.htmlAttributes, finalAttributes)];
64212
64856
  },
64213
64857
  addCommands() {
64214
64858
  return {
@@ -64230,6 +64874,85 @@ const Image = Node$1.create({
64230
64874
  type: this.name,
64231
64875
  attrs: options
64232
64876
  });
64877
+ },
64878
+ /**
64879
+ * Set the wrapping mode and attributes for the selected image
64880
+ * @category Command
64881
+ * @param {Object} options - Wrapping options
64882
+ * @param {string} options.type - Wrap type: "None", "Square", "Through", "Tight", "TopAndBottom", "Inline"
64883
+ * @param {Object} [options.attrs] - Wrap attributes (only allowed attributes for the given type will be accepted)
64884
+ * @param {string} [options.attrs.wrapText] - Text wrapping mode for Square type: "bothSides", "largest", "left", "right"
64885
+ * @param {number} [options.attrs.distTop] - Top distance in pixels
64886
+ * @param {number} [options.attrs.distBottom] - Bottom distance in pixels
64887
+ * @param {number} [options.attrs.distLeft] - Left distance in pixels
64888
+ * @param {number} [options.attrs.distRight] - Right distance in pixels
64889
+ * @param {Array} [options.attrs.polygon] - Polygon points for Through/Tight types: [[x1,y1], [x2,y2], ...]
64890
+ * @param {boolean} [options.attrs.behindDoc] - Whether image should be behind document text (for wrapNone)
64891
+ * @example
64892
+ * // No wrapping, behind document
64893
+ * editor.commands.setWrapping({ type: 'None', attrs: {behindDoc: true} })
64894
+ *
64895
+ * // Square wrapping on both sides with distances
64896
+ * editor.commands.setWrapping({
64897
+ * type: 'Square',
64898
+ * attrs: {
64899
+ * wrapText: 'bothSides',
64900
+ * distTop: 10,
64901
+ * distBottom: 10,
64902
+ * distLeft: 10,
64903
+ * distRight: 10
64904
+ * }
64905
+ * })
64906
+ *
64907
+ * // Tight wrapping with polygon
64908
+ * editor.commands.setWrapping({
64909
+ * type: 'Tight',
64910
+ * attrs: {
64911
+ * polygon: [[0, 0], [100, 0], [100, 100], [0, 100]]
64912
+ * }
64913
+ * })
64914
+ *
64915
+ * // Top and bottom wrapping
64916
+ * editor.commands.setWrapping({
64917
+ * type: 'TopAndBottom',
64918
+ * attrs: {
64919
+ * distTop: 15,
64920
+ * distBottom: 15
64921
+ * }
64922
+ * })
64923
+ */
64924
+ setWrapping: (options) => ({ chain, state: state2 }) => {
64925
+ const { selection } = state2;
64926
+ const { $from } = selection;
64927
+ const node = $from.nodeAfter;
64928
+ if (!node || node.type.name !== this.name) {
64929
+ return false;
64930
+ }
64931
+ const { type: type2, attrs = {} } = options;
64932
+ const allowedAttrs = {};
64933
+ const allowedAttributes = {
64934
+ None: ["behindDoc"],
64935
+ Square: ["wrapText", "distTop", "distBottom", "distLeft", "distRight"],
64936
+ Through: ["distTop", "distBottom", "distLeft", "distRight", "polygon"],
64937
+ Tight: ["distTop", "distBottom", "distLeft", "distRight", "polygon"],
64938
+ TopAndBottom: ["distTop", "distBottom"],
64939
+ Inline: []
64940
+ };
64941
+ const allowedForType = allowedAttributes[type2] || [];
64942
+ Object.keys(attrs).forEach((key2) => {
64943
+ if (allowedForType.includes(key2)) {
64944
+ allowedAttrs[key2] = attrs[key2];
64945
+ }
64946
+ });
64947
+ const updatedAttrs = {
64948
+ ...node.attrs,
64949
+ wrap: {
64950
+ type: type2,
64951
+ attrs: allowedAttrs
64952
+ },
64953
+ isAnchor: type2 !== "Inline"
64954
+ };
64955
+ return chain().updateAttributes(this.name, updatedAttrs).run();
64233
64956
  }
64234
64957
  };
64235
64958
  },
@@ -87185,7 +87908,7 @@ const _sfc_main$2 = {
87185
87908
  }
87186
87909
  };
87187
87910
  const GenericPopover = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-cbddcc0f"]]);
87188
- const BlankDOCX = "data:application/octet-stream;base64,UEsDBBQABgAIAAAAIQAykW9XZgEAAKUFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAC/BgAAd29yZC9kb2N1bWVudC54bWxQSwECLQAUAAYACAAAACEAs76LHQUBAAC2AwAAHAAAAAAAAAAAAAAAAADSCQAAd29yZC9fcmVscy9kb2N1bWVudC54bWwucmVsc1BLAQItABQABgAIAAAAIQBngPy0zgYAAM0gAAAVAAAAAAAAAAAAAAAAABkMAAB3b3JkL3RoZW1lL3RoZW1lMS54bWxQSwECLQAUAAYACAAAACEAyudlijsEAAC+DAAAEQAAAAAAAAAAAAAAAAAaEwAAd29yZC9zZXR0aW5ncy54bWxQSwECLQAUAAYACAAAACEA24Vsw6EEAACXHQAAEgAAAAAAAAAAAAAAAACEFwAAd29yZC9udW1iZXJpbmcueG1sUEsBAi0AFAAGAAgAAAAhAD+v4WbrDwAADaYAAA8AAAAAAAAAAAAAAAAAVRwAAHdvcmQvc3R5bGVzLnhtbFBLAQItABQABgAIAAAAIQC+fnZiXgEAANADAAAUAAAAAAAAAAAAAAAAAG0sAAB3b3JkL3dlYlNldHRpbmdzLnhtbFBLAQItABQABgAIAAAAIQC6dnA8swIAANgLAAASAAAAAAAAAAAAAAAAAP0tAAB3b3JkL2ZvbnRUYWJsZS54bWxQSwECLQAUAAYACAAAACEACvOn+GwBAADtAgAAEQAAAAAAAAAAAAAAAADgMAAAZG9jUHJvcHMvY29yZS54bWxQSwECLQAUAAYACAAAACEAIRivWWsBAADFAgAAEAAAAAAAAAAAAAAAAACDMwAAZG9jUHJvcHMvYXBwLnhtbFBLBQYAAAAADAAMAAEDAAAkNgAAAAA=";
87911
+ const BlankDOCX = "data:application/octet-stream;base64,UEsDBBQAAAAIAAAAIQAykW9XXgEAAKUFAAATABwAW0NvbnRlbnRfVHlwZXNdLnhtbFVUCQADMNDOEjDQzhJ1eAsAAQT1AQAABBQAAAC1lMtqwzAQRfeF/oPRNthKuiilxMmij2UbaPoBijRORPVCmrz+vuM4NaWkMeSxMcgz994zQsxwvLEmW0FM2ruSDYo+y8BJr7Sbl+xz+po/sCyhcEoY76BkW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AAACEAvn52YlYBAADQAwAAFAAYAAAAAAABAAAApIG2FQAAd29yZC93ZWJTZXR0aW5ncy54bWxVVAUAAzDQzhJ1eAsAAQT1AQAABBQAAABQSwECHgMUAAAACAAAACEAP6/hZl8PAAANpgAADwAYAAAAAAABAAAApIFaFwAAd29yZC9zdHlsZXMueG1sVVQFAAMw0M4SdXgLAAEE9QEAAAQUAAAAUEsBAh4DCgAAAAAAk2RNWwAAAAAAAAAAAAAAAAsAGAAAAAAAAAAQAO1BAicAAHdvcmQvdGhlbWUvVVQFAAOGHO1odXgLAAEE9QEAAAQUAAAAUEsBAh4DFAAAAAgAAAAhAGeA/LSbBgAAzSAAABUAGAAAAAAAAQAAAKSBRycAAHdvcmQvdGhlbWUvdGhlbWUxLnhtbFVUBQADMNDOEnV4CwABBPUBAAAEFAAAAFBLAQIeAwoAAAAAAJNkTVsAAAAAAAAAAAAAAAALABgAAAAAAAAAEADtQTEuAAB3b3JkL19yZWxzL1VUBQADhhztaHV4CwABBPUBAAAEFAAAAFBLAQIeAxQAAAAIAAAAIQCzvosd/gAAALYDAAAcABgAAAAAAAEAAACkgXYuAAB3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzVVQFAAMw0M4SdXgLAAEE9QEAAAQUAAAAUEsFBgAAAAARABEAqQUAAMovAAAAAA==";
87189
87912
  const _hoisted_1$1 = { class: "super-editor-container" };
87190
87913
  const _hoisted_2 = {
87191
87914
  key: 1,
@@ -87578,74 +88301,89 @@ const _sfc_main = {
87578
88301
  const SuperInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4d5cff52"]]);
87579
88302
  const additionalHandlers = Object.freeze({
87580
88303
  "mc:AlternateContent": translator$1,
87581
- "sd:pageReference": translator$3,
87582
- "sd:tableOfContents": translator$2,
87583
- "w:b": translator$16,
87584
- "w:bidiVisual": translator$H,
87585
- "w:bookmarkEnd": translator$4,
87586
- "w:bookmarkStart": translator$5,
87587
- "w:bottom": translator$u,
87588
- "w:br": translator$1a,
87589
- "w:cantSplit": translator$V,
87590
- "w:cnfStyle": translator$U,
87591
- "w:color": translator$12,
87592
- "w:divId": translator$T,
87593
- "w:drawing": translator$7,
87594
- "w:end": translator$s,
87595
- "w:gridAfter": translator$S,
87596
- "w:gridBefore": translator$R,
87597
- "w:gridCol": translator$d,
87598
- "w:hidden": translator$Q,
87599
- "w:highlight": translator$19,
87600
- "w:hyperlink": translator$X,
87601
- "w:i": translator$15,
87602
- "w:insideH": translator$q,
87603
- "w:insideV": translator$p,
87604
- "w:jc": translator$P,
87605
- "w:left": translator$o,
87606
- "w:p": translator$17,
87607
- "w:r": translator$W,
87608
- "w:rFonts": translator$11,
87609
- "w:rPr": translator$Y,
87610
- "w:rStyle": translator$10,
87611
- "w:right": translator$m,
87612
- "w:sdt": translator$6,
87613
- "w:shd": translator$G,
87614
- "w:start": translator$k,
87615
- "w:strike": translator$13,
87616
- "w:sz": translator$$,
87617
- "w:szCs": translator$_,
87618
- "w:tab": translator$18,
87619
- "w:tbl": translator$b,
87620
- "w:tblBorders": translator$g,
87621
- "w:tblCaption": translator$F,
87622
- "w:tblCellMar": translator$f,
87623
- "w:tblCellSpacing": translator$O,
87624
- "w:tblDescription": translator$E,
87625
- "w:tblGrid": translator$c,
87626
- "w:tblHeader": translator$N,
87627
- "w:tblInd": translator$D,
87628
- "w:tblLayout": translator$C,
87629
- "w:tblLook": translator$B,
87630
- "w:tblOverlap": translator$A,
87631
- "w:tblPr": translator$e,
87632
- "w:tblStyle": translator$z,
87633
- "w:tblStyleColBandSize": translator$y,
87634
- "w:tblStyleRowBandSize": translator$x,
87635
- "w:tblW": translator$w,
87636
- "w:tblpPr": translator$v,
87637
- "w:tc": translator$a,
87638
- "w:top": translator$i,
87639
- "w:tr": translator$I,
87640
- "w:trHeight": translator$M,
87641
- "w:trPr": translator$J,
87642
- "w:u": translator$14,
87643
- "w:wAfter": translator$L,
87644
- "w:wBefore": translator$K,
87645
- "wp:anchor": translator$9,
87646
- "wp:inline": translator$8,
88304
+ "sd:pageReference": translator$5,
88305
+ "sd:tableOfContents": translator$4,
88306
+ "w:b": translator$1n,
88307
+ "w:bidiVisual": translator$Y,
88308
+ "w:bookmarkEnd": translator$6,
88309
+ "w:bookmarkStart": translator$7,
88310
+ "w:bottom": translator$L,
88311
+ "w:br": translator$1r,
88312
+ "w:cantSplit": translator$1a,
88313
+ "w:cnfStyle": translator$19,
88314
+ "w:color": translator$1j,
88315
+ "w:divId": translator$18,
88316
+ "w:drawing": translator$9,
88317
+ "w:end": translator$J,
88318
+ "w:gridAfter": translator$17,
88319
+ "w:gridBefore": translator$16,
88320
+ "w:gridCol": translator$u,
88321
+ "w:hidden": translator$15,
88322
+ "w:highlight": translator$1q,
88323
+ "w:hyperlink": translator$1c,
88324
+ "w:i": translator$1m,
88325
+ "w:insideH": translator$H,
88326
+ "w:insideV": translator$G,
88327
+ "w:jc": translator$14,
88328
+ "w:left": translator$F,
88329
+ "w:p": translator$1o,
88330
+ "w:r": translator$1b,
88331
+ "w:rFonts": translator$1i,
88332
+ "w:rPr": translator$1d,
88333
+ "w:rStyle": translator$1h,
88334
+ "w:right": translator$D,
88335
+ "w:sdt": translator$8,
88336
+ "w:shd": translator$X,
88337
+ "w:start": translator$B,
88338
+ "w:strike": translator$1k,
88339
+ "w:sz": translator$1g,
88340
+ "w:szCs": translator$1f,
88341
+ "w:tab": translator$1p,
88342
+ "w:tbl": translator$s,
88343
+ "w:tblBorders": translator$x,
88344
+ "w:tblCaption": translator$W,
88345
+ "w:tblCellMar": translator$w,
88346
+ "w:tblCellSpacing": translator$13,
88347
+ "w:tblDescription": translator$V,
88348
+ "w:tblGrid": translator$t,
88349
+ "w:tblHeader": translator$12,
88350
+ "w:tblInd": translator$U,
88351
+ "w:tblLayout": translator$T,
88352
+ "w:tblLook": translator$S,
88353
+ "w:tblOverlap": translator$R,
88354
+ "w:tblPr": translator$v,
88355
+ "w:tblStyle": translator$Q,
88356
+ "w:tblStyleColBandSize": translator$P,
88357
+ "w:tblStyleRowBandSize": translator$O,
88358
+ "w:tblW": translator$N,
88359
+ "w:tblpPr": translator$M,
88360
+ "w:tc": translator$c,
88361
+ "w:top": translator$z,
88362
+ "w:tr": translator$Z,
88363
+ "w:trHeight": translator$11,
88364
+ "w:trPr": translator$_,
88365
+ "w:u": translator$1l,
88366
+ "w:wAfter": translator$10,
88367
+ "w:wBefore": translator$$,
88368
+ "wp:anchor": translator$b,
88369
+ "wp:inline": translator$a,
87647
88370
  "w:commentRangeStart": commentRangeStartTranslator,
87648
- "w:commentRangeEnd": commentRangeEndTranslator
88371
+ "w:commentRangeEnd": commentRangeEndTranslator,
88372
+ "w:vMerge": translator$p,
88373
+ "w:gridSpan": translator$q,
88374
+ "w:vAlign": translator$h,
88375
+ "w:noWrap": translator$l,
88376
+ "w:tcFitText": translator$i,
88377
+ "w:tcW": translator$r,
88378
+ "w:hideMark": translator$g,
88379
+ "w:textDirection": translator$j,
88380
+ "w:tl2br": translator$o,
88381
+ "w:tr2bl": translator$n,
88382
+ "w:header": translator$f,
88383
+ "w:headers": translator$e,
88384
+ "w:tcBorders": translator$m,
88385
+ "w:tcMar": translator$k,
88386
+ "w:tcPr": translator$d
87649
88387
  });
87650
88388
  const baseHandlers = {
87651
88389
  ...runPropertyTranslators,