@harbour-enterprises/superdoc 0.24.0-next.3 → 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.
- package/dist/chunks/{PdfViewer-DEWI6Uts.es.js → PdfViewer-D7C8g2G4.es.js} +1 -1
- package/dist/chunks/{PdfViewer-skWUtg2N.cjs → PdfViewer-kOVuv-4I.cjs} +1 -1
- package/dist/chunks/blank-docx-ABm6XYAA.es.js +4 -0
- package/dist/chunks/blank-docx-DfW3Eeh2.cjs +3 -0
- package/dist/chunks/{index-2QL0aZ2S.cjs → index-BFKwBQjS.cjs} +12 -4
- package/dist/chunks/{index-C_AMhrHP.es.js → index-CnEAVnHQ.es.js} +12 -4
- package/dist/chunks/{super-editor.es-CfK_qBM9.cjs → super-editor.es-BmGTQ05x.cjs} +1010 -859
- package/dist/chunks/{super-editor.es-iMAoOYOw.es.js → super-editor.es-CBPoWvjs.es.js} +1010 -859
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/style.css +27 -27
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-BueCftlx.js → converter-DpPj67OW.js} +916 -863
- package/dist/super-editor/chunks/{docx-zipper-C9jmfWYZ.js → docx-zipper-6Kc95yG-.js} +1 -1
- package/dist/super-editor/chunks/{editor-BsuNqVvp.js → editor-Dx6AhT5N.js} +124 -6
- package/dist/super-editor/chunks/{toolbar-DxhfgAoa.js → toolbar-CXSg2lJ9.js} +2 -2
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/super-editor/src/core/Editor.d.ts +11 -0
- package/dist/super-editor/super-editor/src/core/helpers/canRenderFont.d.ts +12 -0
- package/dist/super-editor/super-editor/src/core/super-converter/SuperConverter.d.ts +6 -1
- package/dist/super-editor/super-editor/src/core/super-converter/helpers.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/docxImporter.d.ts +2 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/tableImporter.d.ts +5 -3
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/types/index.d.ts +4 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/utils.d.ts +9 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/gridSpan/gridSpan-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/gridSpan/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/header/header-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/header/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/headers/headers-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/headers/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/hideMark/hideMark-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/hideMark/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/noWrap/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/noWrap/noWrap-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/shd/shd-translator.d.ts +1 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tc/helpers/translate-table-cell.d.ts +0 -5
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcBorders/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcBorders/tcBorders-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcFitText/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcFitText/tcFitText-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcMar/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcMar/tcMar-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcPr/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcPr/tcPr-translator.d.ts +5 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcW/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tcW/tcW-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textDirection/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/textDirection/textDirection-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tl2br/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tl2br/tl2br-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tr2bl/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/tr2bl/tr2bl-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vAlign/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vAlign/vAlign-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vMerge/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/vMerge/vMerge-translator.d.ts +6 -0
- package/dist/super-editor/super-editor/src/extensions/table-cell/table-cell.d.ts +112 -0
- package/dist/super-editor/super-editor.es.js +91 -76
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +3 -3
- package/dist/superdoc.es.js +3 -3
- package/dist/superdoc.umd.js +1020 -861
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/blank-docx-CPqX9RF5.cjs +0 -3
- package/dist/chunks/blank-docx-iwdyG9RH.es.js +0 -4
|
@@ -15127,9 +15127,9 @@ function pixelsToEmu(px) {
|
|
|
15127
15127
|
if (typeof px === "string") px = parseFloat(px);
|
|
15128
15128
|
return Math.round(px * 9525);
|
|
15129
15129
|
}
|
|
15130
|
-
function
|
|
15131
|
-
if (
|
|
15132
|
-
const points = parseFloat(
|
|
15130
|
+
function eighthPointsToPixels(eighthPoints) {
|
|
15131
|
+
if (eighthPoints == null) return;
|
|
15132
|
+
const points = parseFloat(eighthPoints) / 8;
|
|
15133
15133
|
const pixels = points * 1.3333;
|
|
15134
15134
|
return pixels;
|
|
15135
15135
|
}
|
|
@@ -24542,37 +24542,37 @@ const _NodeTranslator = class _NodeTranslator {
|
|
|
24542
24542
|
/** @type {typeof TranslatorTypes} */
|
|
24543
24543
|
__publicField(_NodeTranslator, "translatorTypes", TranslatorTypes);
|
|
24544
24544
|
let NodeTranslator = _NodeTranslator;
|
|
24545
|
-
const encode$
|
|
24545
|
+
const encode$1b = (attributes) => {
|
|
24546
24546
|
return attributes["w:type"];
|
|
24547
24547
|
};
|
|
24548
|
-
const decode$
|
|
24548
|
+
const decode$13 = (attrs) => {
|
|
24549
24549
|
const { lineBreakType } = attrs;
|
|
24550
24550
|
return lineBreakType;
|
|
24551
24551
|
};
|
|
24552
24552
|
const attrConfig$G = Object.freeze({
|
|
24553
24553
|
xmlName: "w:type",
|
|
24554
24554
|
sdName: "lineBreakType",
|
|
24555
|
-
encode: encode$
|
|
24556
|
-
decode: decode$
|
|
24555
|
+
encode: encode$1b,
|
|
24556
|
+
decode: decode$13
|
|
24557
24557
|
});
|
|
24558
|
-
const encode$
|
|
24558
|
+
const encode$1a = (attributes) => {
|
|
24559
24559
|
const xmlAttrValue = attributes["w:clear"];
|
|
24560
24560
|
return xmlAttrValue;
|
|
24561
24561
|
};
|
|
24562
|
-
const decode$
|
|
24562
|
+
const decode$12 = (attrs) => {
|
|
24563
24563
|
const { clear } = attrs;
|
|
24564
24564
|
return clear;
|
|
24565
24565
|
};
|
|
24566
24566
|
const attrConfig$F = Object.freeze({
|
|
24567
24567
|
xmlName: "w:clear",
|
|
24568
24568
|
sdName: "clear",
|
|
24569
|
-
encode: encode$
|
|
24570
|
-
decode: decode$
|
|
24569
|
+
encode: encode$1a,
|
|
24570
|
+
decode: decode$12
|
|
24571
24571
|
});
|
|
24572
24572
|
const validXmlAttributes$p = [attrConfig$G, attrConfig$F];
|
|
24573
|
-
const XML_NODE_NAME$
|
|
24573
|
+
const XML_NODE_NAME$y = "w:br";
|
|
24574
24574
|
const SD_NODE_NAME$h = "lineBreak";
|
|
24575
|
-
const encode$
|
|
24575
|
+
const encode$19 = (_2, encodedAttrs) => {
|
|
24576
24576
|
const isPageBreak = encodedAttrs?.lineBreakType === "page";
|
|
24577
24577
|
const translated = {
|
|
24578
24578
|
type: isPageBreak ? "hardBreak" : "lineBreak"
|
|
@@ -24582,7 +24582,7 @@ const encode$1c = (_2, encodedAttrs) => {
|
|
|
24582
24582
|
}
|
|
24583
24583
|
return translated;
|
|
24584
24584
|
};
|
|
24585
|
-
const decode$
|
|
24585
|
+
const decode$11 = (params, decodedAttrs) => {
|
|
24586
24586
|
const { node } = params;
|
|
24587
24587
|
if (!node) return;
|
|
24588
24588
|
const wBreak = { name: "w:br" };
|
|
@@ -24599,39 +24599,39 @@ const decode$14 = (params, decodedAttrs) => {
|
|
|
24599
24599
|
};
|
|
24600
24600
|
return translated;
|
|
24601
24601
|
};
|
|
24602
|
-
const config$
|
|
24603
|
-
xmlName: XML_NODE_NAME$
|
|
24602
|
+
const config$x = {
|
|
24603
|
+
xmlName: XML_NODE_NAME$y,
|
|
24604
24604
|
sdNodeOrKeyName: SD_NODE_NAME$h,
|
|
24605
24605
|
type: NodeTranslator.translatorTypes.NODE,
|
|
24606
|
-
encode: encode$
|
|
24607
|
-
decode: decode$
|
|
24606
|
+
encode: encode$19,
|
|
24607
|
+
decode: decode$11,
|
|
24608
24608
|
attributes: validXmlAttributes$p
|
|
24609
24609
|
};
|
|
24610
|
-
const translator$
|
|
24611
|
-
const encode$
|
|
24612
|
-
const decode$
|
|
24610
|
+
const translator$1r = NodeTranslator.from(config$x);
|
|
24611
|
+
const encode$18 = (attributes) => attributes?.["w:val"];
|
|
24612
|
+
const decode$10 = (attrs) => attrs?.highlight;
|
|
24613
24613
|
const attrConfig$E = Object.freeze({
|
|
24614
24614
|
xmlName: "w:val",
|
|
24615
24615
|
sdName: "highlight",
|
|
24616
|
-
encode: encode$
|
|
24617
|
-
decode: decode$
|
|
24616
|
+
encode: encode$18,
|
|
24617
|
+
decode: decode$10
|
|
24618
24618
|
});
|
|
24619
24619
|
const validXmlAttributes$o = [attrConfig$E];
|
|
24620
|
-
const XML_NODE_NAME$
|
|
24621
|
-
const SD_ATTR_KEY$
|
|
24620
|
+
const XML_NODE_NAME$x = "w:highlight";
|
|
24621
|
+
const SD_ATTR_KEY$f = "highlight";
|
|
24622
24622
|
const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
|
|
24623
|
-
const encode$
|
|
24623
|
+
const encode$17 = (params, encodedAttrs = {}) => {
|
|
24624
24624
|
const { nodes } = params;
|
|
24625
24625
|
const node = nodes?.[0];
|
|
24626
24626
|
const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
|
|
24627
24627
|
return {
|
|
24628
24628
|
type: "attr",
|
|
24629
|
-
xmlName: XML_NODE_NAME$
|
|
24630
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
24629
|
+
xmlName: XML_NODE_NAME$x,
|
|
24630
|
+
sdNodeOrKeyName: SD_ATTR_KEY$f,
|
|
24631
24631
|
attributes: { "w:val": value ?? null }
|
|
24632
24632
|
};
|
|
24633
24633
|
};
|
|
24634
|
-
const decode
|
|
24634
|
+
const decode$$ = (params) => {
|
|
24635
24635
|
const attrs = params?.node?.attrs || {};
|
|
24636
24636
|
const highlightValue = attrs.highlight ?? attrs.color ?? null;
|
|
24637
24637
|
if (!highlightValue) return void 0;
|
|
@@ -24639,14 +24639,14 @@ const decode$12 = (params) => {
|
|
|
24639
24639
|
if (!normalizedValue) return void 0;
|
|
24640
24640
|
if (DISABLED_TOKENS.has(normalizedValue)) {
|
|
24641
24641
|
return {
|
|
24642
|
-
name: XML_NODE_NAME$
|
|
24642
|
+
name: XML_NODE_NAME$x,
|
|
24643
24643
|
attributes: { "w:val": "none" }
|
|
24644
24644
|
};
|
|
24645
24645
|
}
|
|
24646
24646
|
const keyword = getDocxHighlightKeywordFromHex(highlightValue);
|
|
24647
24647
|
if (keyword) {
|
|
24648
24648
|
return {
|
|
24649
|
-
name: XML_NODE_NAME$
|
|
24649
|
+
name: XML_NODE_NAME$x,
|
|
24650
24650
|
attributes: { "w:val": keyword }
|
|
24651
24651
|
};
|
|
24652
24652
|
}
|
|
@@ -24661,63 +24661,63 @@ const decode$12 = (params) => {
|
|
|
24661
24661
|
}
|
|
24662
24662
|
};
|
|
24663
24663
|
};
|
|
24664
|
-
const config$
|
|
24665
|
-
xmlName: XML_NODE_NAME$
|
|
24666
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
24664
|
+
const config$w = {
|
|
24665
|
+
xmlName: XML_NODE_NAME$x,
|
|
24666
|
+
sdNodeOrKeyName: SD_ATTR_KEY$f,
|
|
24667
24667
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
24668
|
-
encode: encode$
|
|
24669
|
-
decode: decode
|
|
24668
|
+
encode: encode$17,
|
|
24669
|
+
decode: decode$$,
|
|
24670
24670
|
attributes: validXmlAttributes$o
|
|
24671
24671
|
};
|
|
24672
|
-
const translator$
|
|
24673
|
-
const encode$
|
|
24672
|
+
const translator$1q = NodeTranslator.from(config$w);
|
|
24673
|
+
const encode$16 = (attributes) => {
|
|
24674
24674
|
return attributes["w:val"];
|
|
24675
24675
|
};
|
|
24676
|
-
const decode$
|
|
24676
|
+
const decode$_ = (attrs) => {
|
|
24677
24677
|
const { tabSize } = attrs || {};
|
|
24678
24678
|
return tabSize;
|
|
24679
24679
|
};
|
|
24680
24680
|
const attrConfig$D = Object.freeze({
|
|
24681
24681
|
xmlName: "w:val",
|
|
24682
24682
|
sdName: "tabSize",
|
|
24683
|
-
encode: encode$
|
|
24684
|
-
decode: decode$
|
|
24683
|
+
encode: encode$16,
|
|
24684
|
+
decode: decode$_
|
|
24685
24685
|
});
|
|
24686
|
-
const encode$
|
|
24686
|
+
const encode$15 = (attributes) => {
|
|
24687
24687
|
return attributes["w:leader"];
|
|
24688
24688
|
};
|
|
24689
|
-
const decode$
|
|
24689
|
+
const decode$Z = (attrs) => {
|
|
24690
24690
|
const { leader } = attrs || {};
|
|
24691
24691
|
return leader;
|
|
24692
24692
|
};
|
|
24693
24693
|
const attrConfig$C = Object.freeze({
|
|
24694
24694
|
xmlName: "w:leader",
|
|
24695
24695
|
sdName: "leader",
|
|
24696
|
-
encode: encode$
|
|
24697
|
-
decode: decode$
|
|
24696
|
+
encode: encode$15,
|
|
24697
|
+
decode: decode$Z
|
|
24698
24698
|
});
|
|
24699
|
-
const encode$
|
|
24699
|
+
const encode$14 = (attributes) => {
|
|
24700
24700
|
return attributes["w:pos"];
|
|
24701
24701
|
};
|
|
24702
|
-
const decode
|
|
24702
|
+
const decode$Y = (attrs) => {
|
|
24703
24703
|
const { pos } = attrs || {};
|
|
24704
24704
|
return pos;
|
|
24705
24705
|
};
|
|
24706
24706
|
const attrConfig$B = Object.freeze({
|
|
24707
24707
|
xmlName: "w:pos",
|
|
24708
24708
|
sdName: "pos",
|
|
24709
|
-
encode: encode$
|
|
24710
|
-
decode: decode
|
|
24709
|
+
encode: encode$14,
|
|
24710
|
+
decode: decode$Y
|
|
24711
24711
|
});
|
|
24712
24712
|
const validXmlAttributes$n = [attrConfig$D, attrConfig$B, attrConfig$C];
|
|
24713
|
-
const XML_NODE_NAME$
|
|
24713
|
+
const XML_NODE_NAME$w = "w:tab";
|
|
24714
24714
|
const SD_NODE_NAME$g = "tab";
|
|
24715
|
-
const encode$
|
|
24715
|
+
const encode$13 = (_2, encodedAttrs = {}) => {
|
|
24716
24716
|
const translated = { type: "tab" };
|
|
24717
24717
|
if (encodedAttrs) translated.attrs = { ...encodedAttrs };
|
|
24718
24718
|
return translated;
|
|
24719
24719
|
};
|
|
24720
|
-
const decode$
|
|
24720
|
+
const decode$X = (params, decodedAttrs = {}) => {
|
|
24721
24721
|
const { node } = params || {};
|
|
24722
24722
|
if (!node) return;
|
|
24723
24723
|
const wTab = { name: "w:tab" };
|
|
@@ -24733,15 +24733,15 @@ const decode$_ = (params, decodedAttrs = {}) => {
|
|
|
24733
24733
|
}
|
|
24734
24734
|
return translated;
|
|
24735
24735
|
};
|
|
24736
|
-
const config$
|
|
24737
|
-
xmlName: XML_NODE_NAME$
|
|
24736
|
+
const config$v = {
|
|
24737
|
+
xmlName: XML_NODE_NAME$w,
|
|
24738
24738
|
sdNodeOrKeyName: SD_NODE_NAME$g,
|
|
24739
24739
|
type: NodeTranslator.translatorTypes.NODE,
|
|
24740
|
-
encode: encode$
|
|
24741
|
-
decode: decode$
|
|
24740
|
+
encode: encode$13,
|
|
24741
|
+
decode: decode$X,
|
|
24742
24742
|
attributes: validXmlAttributes$n
|
|
24743
24743
|
};
|
|
24744
|
-
const translator$
|
|
24744
|
+
const translator$1p = NodeTranslator.from(config$v);
|
|
24745
24745
|
const mergeTextNodes = (nodes) => {
|
|
24746
24746
|
if (!nodes || !Array.isArray(nodes)) {
|
|
24747
24747
|
return nodes;
|
|
@@ -24967,9 +24967,9 @@ const parseParagraphBorders = (pBdr) => {
|
|
|
24967
24967
|
const { attributes: a } = el;
|
|
24968
24968
|
if (a["w:val"] === "nil" || a["w:val"] === void 0) return;
|
|
24969
24969
|
let sizePx;
|
|
24970
|
-
if (a["w:sz"] !== void 0) sizePx =
|
|
24970
|
+
if (a["w:sz"] !== void 0) sizePx = eighthPointsToPixels(a["w:sz"]);
|
|
24971
24971
|
let spacePx;
|
|
24972
|
-
if (a["w:space"] !== void 0) spacePx =
|
|
24972
|
+
if (a["w:space"] !== void 0) spacePx = eighthPointsToPixels(a["w:space"]);
|
|
24973
24973
|
result[side] = {
|
|
24974
24974
|
val: a["w:val"],
|
|
24975
24975
|
size: sizePx,
|
|
@@ -25259,89 +25259,89 @@ const handleParagraphNode$1 = (params) => {
|
|
|
25259
25259
|
}
|
|
25260
25260
|
return schemaNode;
|
|
25261
25261
|
};
|
|
25262
|
-
const encode$
|
|
25262
|
+
const encode$12 = (attributes) => {
|
|
25263
25263
|
return attributes["w:rsidDel"];
|
|
25264
25264
|
};
|
|
25265
|
-
const decode$
|
|
25265
|
+
const decode$W = (attrs) => {
|
|
25266
25266
|
return attrs.rsidDel;
|
|
25267
25267
|
};
|
|
25268
25268
|
const attrConfig$A = Object.freeze({
|
|
25269
25269
|
xmlName: "w:rsidDel",
|
|
25270
25270
|
sdName: "rsidDel",
|
|
25271
|
-
encode: encode$
|
|
25272
|
-
decode: decode$
|
|
25271
|
+
encode: encode$12,
|
|
25272
|
+
decode: decode$W
|
|
25273
25273
|
});
|
|
25274
|
-
const encode$
|
|
25274
|
+
const encode$11 = (attributes) => {
|
|
25275
25275
|
return attributes["w:rsidP"];
|
|
25276
25276
|
};
|
|
25277
|
-
const decode$
|
|
25277
|
+
const decode$V = (attrs) => {
|
|
25278
25278
|
return attrs.rsidP;
|
|
25279
25279
|
};
|
|
25280
25280
|
const attrConfig$z = Object.freeze({
|
|
25281
25281
|
xmlName: "w:rsidP",
|
|
25282
25282
|
sdName: "rsidP",
|
|
25283
|
-
encode: encode$
|
|
25284
|
-
decode: decode$
|
|
25283
|
+
encode: encode$11,
|
|
25284
|
+
decode: decode$V
|
|
25285
25285
|
});
|
|
25286
|
-
const encode$
|
|
25286
|
+
const encode$10 = (attributes) => {
|
|
25287
25287
|
return attributes["w:rsidR"];
|
|
25288
25288
|
};
|
|
25289
|
-
const decode$
|
|
25289
|
+
const decode$U = (attrs) => {
|
|
25290
25290
|
return attrs.rsidR;
|
|
25291
25291
|
};
|
|
25292
25292
|
const attrConfig$y = Object.freeze({
|
|
25293
25293
|
xmlName: "w:rsidR",
|
|
25294
25294
|
sdName: "rsidR",
|
|
25295
|
-
encode: encode$
|
|
25296
|
-
decode: decode$
|
|
25295
|
+
encode: encode$10,
|
|
25296
|
+
decode: decode$U
|
|
25297
25297
|
});
|
|
25298
|
-
const encode
|
|
25298
|
+
const encode$$ = (attributes) => {
|
|
25299
25299
|
return attributes["w:rsidRPr"];
|
|
25300
25300
|
};
|
|
25301
|
-
const decode$
|
|
25301
|
+
const decode$T = (attrs) => {
|
|
25302
25302
|
return attrs.rsidRPr;
|
|
25303
25303
|
};
|
|
25304
25304
|
const attrConfig$x = Object.freeze({
|
|
25305
25305
|
xmlName: "w:rsidRPr",
|
|
25306
25306
|
sdName: "rsidRPr",
|
|
25307
|
-
encode: encode
|
|
25308
|
-
decode: decode$
|
|
25307
|
+
encode: encode$$,
|
|
25308
|
+
decode: decode$T
|
|
25309
25309
|
});
|
|
25310
|
-
const encode$
|
|
25310
|
+
const encode$_ = (attributes) => {
|
|
25311
25311
|
return attributes["w:rsidRDefault"];
|
|
25312
25312
|
};
|
|
25313
|
-
const decode$
|
|
25313
|
+
const decode$S = (attrs) => {
|
|
25314
25314
|
return attrs.rsidRDefault;
|
|
25315
25315
|
};
|
|
25316
25316
|
const attrConfig$w = Object.freeze({
|
|
25317
25317
|
xmlName: "w:rsidRDefault",
|
|
25318
25318
|
sdName: "rsidRDefault",
|
|
25319
|
-
encode: encode$
|
|
25320
|
-
decode: decode$
|
|
25319
|
+
encode: encode$_,
|
|
25320
|
+
decode: decode$S
|
|
25321
25321
|
});
|
|
25322
|
-
const encode$
|
|
25322
|
+
const encode$Z = (attributes) => {
|
|
25323
25323
|
return attributes["w14:paraId"];
|
|
25324
25324
|
};
|
|
25325
|
-
const decode$
|
|
25325
|
+
const decode$R = (attrs) => {
|
|
25326
25326
|
return attrs.paraId;
|
|
25327
25327
|
};
|
|
25328
25328
|
const attrConfig$v = Object.freeze({
|
|
25329
25329
|
xmlName: "w14:paraId",
|
|
25330
25330
|
sdName: "paraId",
|
|
25331
|
-
encode: encode$
|
|
25332
|
-
decode: decode$
|
|
25331
|
+
encode: encode$Z,
|
|
25332
|
+
decode: decode$R
|
|
25333
25333
|
});
|
|
25334
|
-
const encode
|
|
25334
|
+
const encode$Y = (attributes) => {
|
|
25335
25335
|
return attributes["w14:textId"];
|
|
25336
25336
|
};
|
|
25337
|
-
const decode$
|
|
25337
|
+
const decode$Q = (attrs) => {
|
|
25338
25338
|
return attrs.textId;
|
|
25339
25339
|
};
|
|
25340
25340
|
const attrConfig$u = Object.freeze({
|
|
25341
25341
|
xmlName: "w14:textId",
|
|
25342
25342
|
sdName: "textId",
|
|
25343
|
-
encode: encode
|
|
25344
|
-
decode: decode$
|
|
25343
|
+
encode: encode$Y,
|
|
25344
|
+
decode: decode$Q
|
|
25345
25345
|
});
|
|
25346
25346
|
const validXmlAttributes$m = [
|
|
25347
25347
|
attrConfig$v,
|
|
@@ -25352,9 +25352,9 @@ const validXmlAttributes$m = [
|
|
|
25352
25352
|
attrConfig$x,
|
|
25353
25353
|
attrConfig$A
|
|
25354
25354
|
];
|
|
25355
|
-
const XML_NODE_NAME$
|
|
25355
|
+
const XML_NODE_NAME$v = "w:p";
|
|
25356
25356
|
const SD_NODE_NAME$f = "paragraph";
|
|
25357
|
-
const encode$
|
|
25357
|
+
const encode$X = (params, encodedAttrs = {}) => {
|
|
25358
25358
|
const node = handleParagraphNode$1(params);
|
|
25359
25359
|
if (!node) return void 0;
|
|
25360
25360
|
if (encodedAttrs && Object.keys(encodedAttrs).length) {
|
|
@@ -25362,7 +25362,7 @@ const encode$_ = (params, encodedAttrs = {}) => {
|
|
|
25362
25362
|
}
|
|
25363
25363
|
return node;
|
|
25364
25364
|
};
|
|
25365
|
-
const decode$
|
|
25365
|
+
const decode$P = (params, decodedAttrs = {}) => {
|
|
25366
25366
|
const translated = translateParagraphNode(params);
|
|
25367
25367
|
if (!translated) return void 0;
|
|
25368
25368
|
if (decodedAttrs && Object.keys(decodedAttrs).length) {
|
|
@@ -25370,16 +25370,16 @@ const decode$S = (params, decodedAttrs = {}) => {
|
|
|
25370
25370
|
}
|
|
25371
25371
|
return translated;
|
|
25372
25372
|
};
|
|
25373
|
-
const config$
|
|
25374
|
-
xmlName: XML_NODE_NAME$
|
|
25373
|
+
const config$u = {
|
|
25374
|
+
xmlName: XML_NODE_NAME$v,
|
|
25375
25375
|
sdNodeOrKeyName: SD_NODE_NAME$f,
|
|
25376
25376
|
type: NodeTranslator.translatorTypes.NODE,
|
|
25377
|
-
encode: encode$
|
|
25378
|
-
decode: decode$
|
|
25377
|
+
encode: encode$X,
|
|
25378
|
+
decode: decode$P,
|
|
25379
25379
|
attributes: validXmlAttributes$m
|
|
25380
25380
|
};
|
|
25381
|
-
const translator$
|
|
25382
|
-
const encode$
|
|
25381
|
+
const translator$1o = NodeTranslator.from(config$u);
|
|
25382
|
+
const encode$W = (attributes) => {
|
|
25383
25383
|
const raw = attributes?.["w:val"];
|
|
25384
25384
|
if (raw === void 0 || raw === null) return void 0;
|
|
25385
25385
|
if (typeof raw === "boolean") return raw;
|
|
@@ -25389,24 +25389,24 @@ const encode$Z = (attributes) => {
|
|
|
25389
25389
|
if (val === "1" || val === "true" || val === "on") return true;
|
|
25390
25390
|
return void 0;
|
|
25391
25391
|
};
|
|
25392
|
-
const decode$
|
|
25392
|
+
const decode$O = (runProps) => {
|
|
25393
25393
|
if (runProps?.bold === false) return "0";
|
|
25394
25394
|
return void 0;
|
|
25395
25395
|
};
|
|
25396
25396
|
const attrConfig$t = Object.freeze({
|
|
25397
25397
|
xmlName: "w:val",
|
|
25398
25398
|
sdName: "bold",
|
|
25399
|
-
encode: encode$
|
|
25400
|
-
decode: decode$
|
|
25399
|
+
encode: encode$W,
|
|
25400
|
+
decode: decode$O
|
|
25401
25401
|
});
|
|
25402
25402
|
const validXmlAttributes$l = [attrConfig$t];
|
|
25403
|
-
const XML_NODE_NAME$
|
|
25404
|
-
const SD_ATTR_KEY$
|
|
25405
|
-
const encode$
|
|
25403
|
+
const XML_NODE_NAME$u = "w:b";
|
|
25404
|
+
const SD_ATTR_KEY$e = "bold";
|
|
25405
|
+
const encode$V = (params, encodedAttrs = {}) => {
|
|
25406
25406
|
const { nodes } = params;
|
|
25407
25407
|
const node = nodes[0];
|
|
25408
25408
|
if (!node) return void 0;
|
|
25409
|
-
const val = encodedAttrs?.[SD_ATTR_KEY$
|
|
25409
|
+
const val = encodedAttrs?.[SD_ATTR_KEY$e];
|
|
25410
25410
|
let attributes;
|
|
25411
25411
|
if (val === false) attributes = { "w:val": "0" };
|
|
25412
25412
|
else if (val === true)
|
|
@@ -25414,85 +25414,85 @@ const encode$Y = (params, encodedAttrs = {}) => {
|
|
|
25414
25414
|
else attributes = node.attributes || {};
|
|
25415
25415
|
return {
|
|
25416
25416
|
type: "attr",
|
|
25417
|
-
xmlName: XML_NODE_NAME$
|
|
25418
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25417
|
+
xmlName: XML_NODE_NAME$u,
|
|
25418
|
+
sdNodeOrKeyName: SD_ATTR_KEY$e,
|
|
25419
25419
|
attributes
|
|
25420
25420
|
};
|
|
25421
25421
|
};
|
|
25422
|
-
const config$
|
|
25423
|
-
xmlName: XML_NODE_NAME$
|
|
25424
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25422
|
+
const config$t = {
|
|
25423
|
+
xmlName: XML_NODE_NAME$u,
|
|
25424
|
+
sdNodeOrKeyName: SD_ATTR_KEY$e,
|
|
25425
25425
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25426
|
-
encode: encode$
|
|
25426
|
+
encode: encode$V,
|
|
25427
25427
|
attributes: validXmlAttributes$l
|
|
25428
25428
|
};
|
|
25429
|
-
const translator$
|
|
25430
|
-
const XML_NODE_NAME$
|
|
25431
|
-
const SD_ATTR_KEY$
|
|
25432
|
-
const encode$
|
|
25429
|
+
const translator$1n = NodeTranslator.from(config$t);
|
|
25430
|
+
const XML_NODE_NAME$t = "w:i";
|
|
25431
|
+
const SD_ATTR_KEY$d = "italic";
|
|
25432
|
+
const encode$U = (params) => {
|
|
25433
25433
|
const { nodes } = params;
|
|
25434
25434
|
const node = nodes?.[0];
|
|
25435
25435
|
if (!node) return void 0;
|
|
25436
25436
|
return {
|
|
25437
25437
|
type: "attr",
|
|
25438
|
-
xmlName: XML_NODE_NAME$
|
|
25439
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25438
|
+
xmlName: XML_NODE_NAME$t,
|
|
25439
|
+
sdNodeOrKeyName: SD_ATTR_KEY$d,
|
|
25440
25440
|
attributes: {
|
|
25441
25441
|
"w:val": node.attributes?.["w:val"] ?? null
|
|
25442
25442
|
}
|
|
25443
25443
|
};
|
|
25444
25444
|
};
|
|
25445
|
-
const config$
|
|
25446
|
-
xmlName: XML_NODE_NAME$
|
|
25447
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25445
|
+
const config$s = {
|
|
25446
|
+
xmlName: XML_NODE_NAME$t,
|
|
25447
|
+
sdNodeOrKeyName: SD_ATTR_KEY$d,
|
|
25448
25448
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25449
|
-
encode: encode$
|
|
25449
|
+
encode: encode$U
|
|
25450
25450
|
};
|
|
25451
|
-
const translator$
|
|
25452
|
-
const encode$
|
|
25453
|
-
const decode$
|
|
25451
|
+
const translator$1m = NodeTranslator.from(config$s);
|
|
25452
|
+
const encode$T = (attributes) => attributes?.["w:val"];
|
|
25453
|
+
const decode$N = (attrs) => attrs?.underline;
|
|
25454
25454
|
const attrConfig$s = Object.freeze({
|
|
25455
25455
|
xmlName: "w:val",
|
|
25456
25456
|
sdName: "underline",
|
|
25457
|
-
encode: encode$
|
|
25458
|
-
decode: decode$
|
|
25457
|
+
encode: encode$T,
|
|
25458
|
+
decode: decode$N
|
|
25459
25459
|
});
|
|
25460
|
-
const encode$
|
|
25461
|
-
const decode$
|
|
25460
|
+
const encode$S = (attributes) => attributes?.["w:color"];
|
|
25461
|
+
const decode$M = (attrs) => attrs?.color;
|
|
25462
25462
|
const attrConfig$r = Object.freeze({
|
|
25463
25463
|
xmlName: "w:color",
|
|
25464
25464
|
sdName: "color",
|
|
25465
|
-
encode: encode$
|
|
25466
|
-
decode: decode$
|
|
25465
|
+
encode: encode$S,
|
|
25466
|
+
decode: decode$M
|
|
25467
25467
|
});
|
|
25468
|
-
const encode$
|
|
25469
|
-
const decode$
|
|
25468
|
+
const encode$R = (attributes) => attributes?.["w:themeColor"];
|
|
25469
|
+
const decode$L = (attrs) => attrs?.themeColor;
|
|
25470
25470
|
const attrConfig$q = Object.freeze({
|
|
25471
25471
|
xmlName: "w:themeColor",
|
|
25472
25472
|
sdName: "themeColor",
|
|
25473
|
-
encode: encode$
|
|
25474
|
-
decode: decode$
|
|
25473
|
+
encode: encode$R,
|
|
25474
|
+
decode: decode$L
|
|
25475
25475
|
});
|
|
25476
|
-
const encode$
|
|
25477
|
-
const decode$
|
|
25476
|
+
const encode$Q = (attributes) => attributes?.["w:themeTint"];
|
|
25477
|
+
const decode$K = (attrs) => attrs?.themeTint;
|
|
25478
25478
|
const attrConfig$p = Object.freeze({
|
|
25479
25479
|
xmlName: "w:themeTint",
|
|
25480
25480
|
sdName: "themeTint",
|
|
25481
|
-
encode: encode$
|
|
25482
|
-
decode: decode$
|
|
25481
|
+
encode: encode$Q,
|
|
25482
|
+
decode: decode$K
|
|
25483
25483
|
});
|
|
25484
|
-
const encode$
|
|
25485
|
-
const decode$
|
|
25484
|
+
const encode$P = (attributes) => attributes?.["w:themeShade"];
|
|
25485
|
+
const decode$J = (attrs) => attrs?.themeShade;
|
|
25486
25486
|
const attrConfig$o = Object.freeze({
|
|
25487
25487
|
xmlName: "w:themeShade",
|
|
25488
25488
|
sdName: "themeShade",
|
|
25489
|
-
encode: encode$
|
|
25490
|
-
decode: decode$
|
|
25489
|
+
encode: encode$P,
|
|
25490
|
+
decode: decode$J
|
|
25491
25491
|
});
|
|
25492
25492
|
const validXmlAttributes$k = [attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o];
|
|
25493
|
-
const XML_NODE_NAME$
|
|
25494
|
-
const SD_ATTR_KEY$
|
|
25495
|
-
const encode$
|
|
25493
|
+
const XML_NODE_NAME$s = "w:u";
|
|
25494
|
+
const SD_ATTR_KEY$c = "underline";
|
|
25495
|
+
const encode$O = (params, encodedAttrs = {}) => {
|
|
25496
25496
|
const { nodes } = params;
|
|
25497
25497
|
const node = nodes?.[0];
|
|
25498
25498
|
const sourceAttrs = node?.attributes || {};
|
|
@@ -25508,12 +25508,12 @@ const encode$R = (params, encodedAttrs = {}) => {
|
|
|
25508
25508
|
if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
|
|
25509
25509
|
return {
|
|
25510
25510
|
type: "attr",
|
|
25511
|
-
xmlName: XML_NODE_NAME$
|
|
25512
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25511
|
+
xmlName: XML_NODE_NAME$s,
|
|
25512
|
+
sdNodeOrKeyName: SD_ATTR_KEY$c,
|
|
25513
25513
|
attributes
|
|
25514
25514
|
};
|
|
25515
25515
|
};
|
|
25516
|
-
const decode$
|
|
25516
|
+
const decode$I = (params) => {
|
|
25517
25517
|
const attrs = params?.node?.attrs || {};
|
|
25518
25518
|
const underlineType = attrs.underlineType ?? attrs.underline ?? null;
|
|
25519
25519
|
const color = attrs.underlineColor ?? attrs.color ?? null;
|
|
@@ -25531,20 +25531,20 @@ const decode$L = (params) => {
|
|
|
25531
25531
|
if (themeTint) attributes["w:themeTint"] = themeTint;
|
|
25532
25532
|
if (themeShade) attributes["w:themeShade"] = themeShade;
|
|
25533
25533
|
return {
|
|
25534
|
-
name: XML_NODE_NAME$
|
|
25534
|
+
name: XML_NODE_NAME$s,
|
|
25535
25535
|
attributes
|
|
25536
25536
|
};
|
|
25537
25537
|
};
|
|
25538
|
-
const config$
|
|
25539
|
-
xmlName: XML_NODE_NAME$
|
|
25540
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25538
|
+
const config$r = {
|
|
25539
|
+
xmlName: XML_NODE_NAME$s,
|
|
25540
|
+
sdNodeOrKeyName: SD_ATTR_KEY$c,
|
|
25541
25541
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25542
|
-
encode: encode$
|
|
25543
|
-
decode: decode$
|
|
25542
|
+
encode: encode$O,
|
|
25543
|
+
decode: decode$I,
|
|
25544
25544
|
attributes: validXmlAttributes$k
|
|
25545
25545
|
};
|
|
25546
|
-
const translator$
|
|
25547
|
-
const encode$
|
|
25546
|
+
const translator$1l = NodeTranslator.from(config$r);
|
|
25547
|
+
const encode$N = (attributes) => {
|
|
25548
25548
|
const raw = attributes?.["w:val"];
|
|
25549
25549
|
if (raw === void 0 || raw === null) return void 0;
|
|
25550
25550
|
if (typeof raw === "boolean") return raw;
|
|
@@ -25554,24 +25554,24 @@ const encode$Q = (attributes) => {
|
|
|
25554
25554
|
if (val === "1" || val === "true" || val === "on") return true;
|
|
25555
25555
|
return void 0;
|
|
25556
25556
|
};
|
|
25557
|
-
const decode$
|
|
25557
|
+
const decode$H = (attrs) => {
|
|
25558
25558
|
if (attrs?.strike === false) return "0";
|
|
25559
25559
|
return void 0;
|
|
25560
25560
|
};
|
|
25561
25561
|
const attrConfig$n = Object.freeze({
|
|
25562
25562
|
xmlName: "w:val",
|
|
25563
25563
|
sdName: "strike",
|
|
25564
|
-
encode: encode$
|
|
25565
|
-
decode: decode$
|
|
25564
|
+
encode: encode$N,
|
|
25565
|
+
decode: decode$H
|
|
25566
25566
|
});
|
|
25567
25567
|
const validXmlAttributes$j = [attrConfig$n];
|
|
25568
|
-
const XML_NODE_NAME$
|
|
25569
|
-
const SD_ATTR_KEY$
|
|
25570
|
-
const encode$
|
|
25568
|
+
const XML_NODE_NAME$r = "w:strike";
|
|
25569
|
+
const SD_ATTR_KEY$b = "strike";
|
|
25570
|
+
const encode$M = (params, encodedAttrs = {}) => {
|
|
25571
25571
|
const { nodes } = params;
|
|
25572
25572
|
const node = nodes?.[0];
|
|
25573
25573
|
if (!node) return void 0;
|
|
25574
|
-
const val = encodedAttrs?.[SD_ATTR_KEY$
|
|
25574
|
+
const val = encodedAttrs?.[SD_ATTR_KEY$b];
|
|
25575
25575
|
let attributes;
|
|
25576
25576
|
if (val === false) attributes = { "w:val": "0" };
|
|
25577
25577
|
else if (val === true) attributes = {};
|
|
@@ -25580,55 +25580,55 @@ const encode$P = (params, encodedAttrs = {}) => {
|
|
|
25580
25580
|
else if (val === true && attributes["w:val"] === void 0) delete attributes["w:val"];
|
|
25581
25581
|
return {
|
|
25582
25582
|
type: "attr",
|
|
25583
|
-
xmlName: XML_NODE_NAME$
|
|
25584
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25583
|
+
xmlName: XML_NODE_NAME$r,
|
|
25584
|
+
sdNodeOrKeyName: SD_ATTR_KEY$b,
|
|
25585
25585
|
attributes
|
|
25586
25586
|
};
|
|
25587
25587
|
};
|
|
25588
|
-
const config$
|
|
25589
|
-
xmlName: XML_NODE_NAME$
|
|
25590
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25588
|
+
const config$q = {
|
|
25589
|
+
xmlName: XML_NODE_NAME$r,
|
|
25590
|
+
sdNodeOrKeyName: SD_ATTR_KEY$b,
|
|
25591
25591
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25592
|
-
encode: encode$
|
|
25592
|
+
encode: encode$M,
|
|
25593
25593
|
attributes: validXmlAttributes$j
|
|
25594
25594
|
};
|
|
25595
|
-
const translator$
|
|
25596
|
-
const encode$
|
|
25597
|
-
const decode$
|
|
25595
|
+
const translator$1k = NodeTranslator.from(config$q);
|
|
25596
|
+
const encode$L = (attributes) => attributes?.["w:val"];
|
|
25597
|
+
const decode$G = (attrs) => attrs?.color;
|
|
25598
25598
|
const attrConfig$m = Object.freeze({
|
|
25599
25599
|
xmlName: "w:val",
|
|
25600
25600
|
sdName: "color",
|
|
25601
|
-
encode: encode$
|
|
25602
|
-
decode: decode$
|
|
25601
|
+
encode: encode$L,
|
|
25602
|
+
decode: decode$G
|
|
25603
25603
|
});
|
|
25604
|
-
const encode$
|
|
25605
|
-
const decode$
|
|
25604
|
+
const encode$K = (attributes) => attributes?.["w:themeColor"];
|
|
25605
|
+
const decode$F = (attrs) => attrs?.themeColor;
|
|
25606
25606
|
const attrConfig$l = Object.freeze({
|
|
25607
25607
|
xmlName: "w:themeColor",
|
|
25608
25608
|
sdName: "themeColor",
|
|
25609
|
-
encode: encode$
|
|
25610
|
-
decode: decode$
|
|
25609
|
+
encode: encode$K,
|
|
25610
|
+
decode: decode$F
|
|
25611
25611
|
});
|
|
25612
|
-
const encode$
|
|
25613
|
-
const decode$
|
|
25612
|
+
const encode$J = (attributes) => attributes?.["w:themeTint"];
|
|
25613
|
+
const decode$E = (attrs) => attrs?.themeTint;
|
|
25614
25614
|
const attrConfig$k = Object.freeze({
|
|
25615
25615
|
xmlName: "w:themeTint",
|
|
25616
25616
|
sdName: "themeTint",
|
|
25617
|
-
encode: encode$
|
|
25618
|
-
decode: decode$
|
|
25617
|
+
encode: encode$J,
|
|
25618
|
+
decode: decode$E
|
|
25619
25619
|
});
|
|
25620
|
-
const encode$
|
|
25621
|
-
const decode$
|
|
25620
|
+
const encode$I = (attributes) => attributes?.["w:themeShade"];
|
|
25621
|
+
const decode$D = (attrs) => attrs?.themeShade;
|
|
25622
25622
|
const attrConfig$j = Object.freeze({
|
|
25623
25623
|
xmlName: "w:themeShade",
|
|
25624
25624
|
sdName: "themeShade",
|
|
25625
|
-
encode: encode$
|
|
25626
|
-
decode: decode$
|
|
25625
|
+
encode: encode$I,
|
|
25626
|
+
decode: decode$D
|
|
25627
25627
|
});
|
|
25628
25628
|
const validXmlAttributes$i = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j];
|
|
25629
|
-
const XML_NODE_NAME$
|
|
25630
|
-
const SD_ATTR_KEY$
|
|
25631
|
-
const encode$
|
|
25629
|
+
const XML_NODE_NAME$q = "w:color";
|
|
25630
|
+
const SD_ATTR_KEY$a = "color";
|
|
25631
|
+
const encode$H = (params, encodedAttrs = {}) => {
|
|
25632
25632
|
const { nodes } = params;
|
|
25633
25633
|
const node = nodes?.[0];
|
|
25634
25634
|
const sourceAttrs = node?.attributes || {};
|
|
@@ -25643,63 +25643,63 @@ const encode$K = (params, encodedAttrs = {}) => {
|
|
|
25643
25643
|
if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
|
|
25644
25644
|
return {
|
|
25645
25645
|
type: "attr",
|
|
25646
|
-
xmlName: XML_NODE_NAME$
|
|
25647
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25646
|
+
xmlName: XML_NODE_NAME$q,
|
|
25647
|
+
sdNodeOrKeyName: SD_ATTR_KEY$a,
|
|
25648
25648
|
attributes
|
|
25649
25649
|
};
|
|
25650
25650
|
};
|
|
25651
|
-
const config$
|
|
25652
|
-
xmlName: XML_NODE_NAME$
|
|
25653
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25651
|
+
const config$p = {
|
|
25652
|
+
xmlName: XML_NODE_NAME$q,
|
|
25653
|
+
sdNodeOrKeyName: SD_ATTR_KEY$a,
|
|
25654
25654
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25655
|
-
encode: encode$
|
|
25655
|
+
encode: encode$H,
|
|
25656
25656
|
attributes: validXmlAttributes$i
|
|
25657
25657
|
};
|
|
25658
|
-
const translator$
|
|
25659
|
-
const encode$
|
|
25660
|
-
const decode$
|
|
25658
|
+
const translator$1j = NodeTranslator.from(config$p);
|
|
25659
|
+
const encode$G = (attributes) => attributes?.["w:eastAsia"];
|
|
25660
|
+
const decode$C = (attrs) => attrs?.eastAsia;
|
|
25661
25661
|
const attrConfig$i = Object.freeze({
|
|
25662
25662
|
xmlName: "w:eastAsia",
|
|
25663
25663
|
sdName: "eastAsia",
|
|
25664
|
-
encode: encode$
|
|
25665
|
-
decode: decode$
|
|
25664
|
+
encode: encode$G,
|
|
25665
|
+
decode: decode$C
|
|
25666
25666
|
});
|
|
25667
|
-
const encode$
|
|
25668
|
-
const decode$
|
|
25667
|
+
const encode$F = (attributes) => attributes?.["w:ascii"];
|
|
25668
|
+
const decode$B = (attrs) => attrs?.ascii;
|
|
25669
25669
|
const attrConfig$h = Object.freeze({
|
|
25670
25670
|
xmlName: "w:ascii",
|
|
25671
25671
|
sdName: "ascii",
|
|
25672
|
-
encode: encode$
|
|
25673
|
-
decode: decode$
|
|
25672
|
+
encode: encode$F,
|
|
25673
|
+
decode: decode$B
|
|
25674
25674
|
});
|
|
25675
|
-
const encode$
|
|
25676
|
-
const decode$
|
|
25675
|
+
const encode$E = (attributes) => attributes?.["w:hAnsi"];
|
|
25676
|
+
const decode$A = (attrs) => attrs?.hAnsi;
|
|
25677
25677
|
const attrConfig$g = Object.freeze({
|
|
25678
25678
|
xmlName: "w:hAnsi",
|
|
25679
25679
|
sdName: "hAnsi",
|
|
25680
|
-
encode: encode$
|
|
25681
|
-
decode: decode$
|
|
25680
|
+
encode: encode$E,
|
|
25681
|
+
decode: decode$A
|
|
25682
25682
|
});
|
|
25683
|
-
const encode$
|
|
25684
|
-
const decode$
|
|
25683
|
+
const encode$D = (attributes) => attributes?.["w:cs"];
|
|
25684
|
+
const decode$z = (attrs) => attrs?.cs;
|
|
25685
25685
|
const attrConfig$f = Object.freeze({
|
|
25686
25686
|
xmlName: "w:cs",
|
|
25687
25687
|
sdName: "cs",
|
|
25688
|
-
encode: encode$
|
|
25689
|
-
decode: decode$
|
|
25688
|
+
encode: encode$D,
|
|
25689
|
+
decode: decode$z
|
|
25690
25690
|
});
|
|
25691
|
-
const encode$
|
|
25692
|
-
const decode$
|
|
25691
|
+
const encode$C = (attributes) => attributes?.["w:val"];
|
|
25692
|
+
const decode$y = (attrs) => attrs?.value;
|
|
25693
25693
|
const attrConfig$e = Object.freeze({
|
|
25694
25694
|
xmlName: "w:val",
|
|
25695
25695
|
sdName: "value",
|
|
25696
|
-
encode: encode$
|
|
25697
|
-
decode: decode$
|
|
25696
|
+
encode: encode$C,
|
|
25697
|
+
decode: decode$y
|
|
25698
25698
|
});
|
|
25699
25699
|
const validXmlAttributes$h = [attrConfig$i, attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e];
|
|
25700
|
-
const XML_NODE_NAME$
|
|
25701
|
-
const SD_ATTR_KEY$
|
|
25702
|
-
const encode$
|
|
25700
|
+
const XML_NODE_NAME$p = "w:rFonts";
|
|
25701
|
+
const SD_ATTR_KEY$9 = "fontFamily";
|
|
25702
|
+
const encode$B = (params, encodedAttrs = {}) => {
|
|
25703
25703
|
const { nodes } = params;
|
|
25704
25704
|
const node = nodes?.[0];
|
|
25705
25705
|
const sourceAttrs = node?.attributes || {};
|
|
@@ -25723,111 +25723,119 @@ const encode$E = (params, encodedAttrs = {}) => {
|
|
|
25723
25723
|
attributes["w:val"] = attributes["w:eastAsia"];
|
|
25724
25724
|
}
|
|
25725
25725
|
if (attributes["w:val"] === void 0) delete attributes["w:val"];
|
|
25726
|
+
if (params.inlineDocumentFonts) {
|
|
25727
|
+
const font = attributes["w:ascii"];
|
|
25728
|
+
if (font) {
|
|
25729
|
+
if (!params.inlineDocumentFonts.includes(font)) {
|
|
25730
|
+
params.inlineDocumentFonts.push(font);
|
|
25731
|
+
}
|
|
25732
|
+
}
|
|
25733
|
+
}
|
|
25726
25734
|
return {
|
|
25727
25735
|
type: "attr",
|
|
25728
|
-
xmlName: XML_NODE_NAME$
|
|
25729
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25736
|
+
xmlName: XML_NODE_NAME$p,
|
|
25737
|
+
sdNodeOrKeyName: SD_ATTR_KEY$9,
|
|
25730
25738
|
attributes
|
|
25731
25739
|
};
|
|
25732
25740
|
};
|
|
25733
|
-
const config$
|
|
25734
|
-
xmlName: XML_NODE_NAME$
|
|
25735
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25741
|
+
const config$o = {
|
|
25742
|
+
xmlName: XML_NODE_NAME$p,
|
|
25743
|
+
sdNodeOrKeyName: SD_ATTR_KEY$9,
|
|
25736
25744
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25737
|
-
encode: encode$
|
|
25745
|
+
encode: encode$B,
|
|
25738
25746
|
attributes: validXmlAttributes$h
|
|
25739
25747
|
};
|
|
25740
|
-
const translator$
|
|
25741
|
-
const encode$
|
|
25742
|
-
const decode$
|
|
25748
|
+
const translator$1i = NodeTranslator.from(config$o);
|
|
25749
|
+
const encode$A = (attributes) => attributes?.["w:val"];
|
|
25750
|
+
const decode$x = (attrs) => attrs?.styleId;
|
|
25743
25751
|
const attrConfig$d = Object.freeze({
|
|
25744
25752
|
xmlName: "w:val",
|
|
25745
25753
|
sdName: "styleId",
|
|
25746
|
-
encode: encode$
|
|
25747
|
-
decode: decode$
|
|
25754
|
+
encode: encode$A,
|
|
25755
|
+
decode: decode$x
|
|
25748
25756
|
});
|
|
25749
25757
|
const validXmlAttributes$g = [attrConfig$d];
|
|
25750
|
-
const XML_NODE_NAME$
|
|
25751
|
-
const SD_ATTR_KEY$
|
|
25752
|
-
const encode$
|
|
25758
|
+
const XML_NODE_NAME$o = "w:rStyle";
|
|
25759
|
+
const SD_ATTR_KEY$8 = "styleId";
|
|
25760
|
+
const encode$z = (params, encodedAttrs = {}) => {
|
|
25753
25761
|
const { nodes } = params;
|
|
25754
25762
|
const node = nodes?.[0];
|
|
25755
25763
|
const value = encodedAttrs.styleId ?? node?.attributes?.["w:val"];
|
|
25756
25764
|
return {
|
|
25757
25765
|
type: "attr",
|
|
25758
|
-
xmlName: XML_NODE_NAME$
|
|
25759
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25766
|
+
xmlName: XML_NODE_NAME$o,
|
|
25767
|
+
sdNodeOrKeyName: SD_ATTR_KEY$8,
|
|
25760
25768
|
attributes: { "w:val": value ?? null }
|
|
25761
25769
|
};
|
|
25762
25770
|
};
|
|
25763
|
-
const config$
|
|
25764
|
-
xmlName: XML_NODE_NAME$
|
|
25765
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25771
|
+
const config$n = {
|
|
25772
|
+
xmlName: XML_NODE_NAME$o,
|
|
25773
|
+
sdNodeOrKeyName: SD_ATTR_KEY$8,
|
|
25766
25774
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25767
|
-
encode: encode$
|
|
25775
|
+
encode: encode$z,
|
|
25768
25776
|
attributes: validXmlAttributes$g
|
|
25769
25777
|
};
|
|
25770
|
-
const translator$
|
|
25771
|
-
const encode$
|
|
25772
|
-
const decode$
|
|
25778
|
+
const translator$1h = NodeTranslator.from(config$n);
|
|
25779
|
+
const encode$y = (attributes) => attributes?.["w:val"];
|
|
25780
|
+
const decode$w = (attrs) => attrs?.fontSize;
|
|
25773
25781
|
const attrConfig$c = Object.freeze({
|
|
25774
25782
|
xmlName: "w:val",
|
|
25775
25783
|
sdName: "fontSize",
|
|
25776
|
-
encode: encode$
|
|
25777
|
-
decode: decode$
|
|
25784
|
+
encode: encode$y,
|
|
25785
|
+
decode: decode$w
|
|
25778
25786
|
});
|
|
25779
25787
|
const validXmlAttributes$f = [attrConfig$c];
|
|
25780
|
-
const XML_NODE_NAME$
|
|
25781
|
-
const SD_ATTR_KEY$
|
|
25782
|
-
const encode$
|
|
25788
|
+
const XML_NODE_NAME$n = "w:sz";
|
|
25789
|
+
const SD_ATTR_KEY$7 = "fontSize";
|
|
25790
|
+
const encode$x = (params, encodedAttrs = {}) => {
|
|
25783
25791
|
const { nodes } = params;
|
|
25784
25792
|
const node = nodes?.[0];
|
|
25785
25793
|
const value = encodedAttrs.fontSize ?? node?.attributes?.["w:val"];
|
|
25786
25794
|
return {
|
|
25787
25795
|
type: "attr",
|
|
25788
|
-
xmlName: XML_NODE_NAME$
|
|
25789
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25796
|
+
xmlName: XML_NODE_NAME$n,
|
|
25797
|
+
sdNodeOrKeyName: SD_ATTR_KEY$7,
|
|
25790
25798
|
attributes: { "w:val": value ?? null }
|
|
25791
25799
|
};
|
|
25792
25800
|
};
|
|
25793
|
-
const config$
|
|
25794
|
-
xmlName: XML_NODE_NAME$
|
|
25795
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25801
|
+
const config$m = {
|
|
25802
|
+
xmlName: XML_NODE_NAME$n,
|
|
25803
|
+
sdNodeOrKeyName: SD_ATTR_KEY$7,
|
|
25796
25804
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25797
|
-
encode: encode$
|
|
25805
|
+
encode: encode$x,
|
|
25798
25806
|
attributes: validXmlAttributes$f
|
|
25799
25807
|
};
|
|
25800
|
-
const translator$
|
|
25801
|
-
const encode$
|
|
25802
|
-
const decode$
|
|
25808
|
+
const translator$1g = NodeTranslator.from(config$m);
|
|
25809
|
+
const encode$w = (attributes) => attributes?.["w:val"];
|
|
25810
|
+
const decode$v = (attrs) => attrs?.fontSizeCs;
|
|
25803
25811
|
const attrConfig$b = Object.freeze({
|
|
25804
25812
|
xmlName: "w:val",
|
|
25805
25813
|
sdName: "fontSizeCs",
|
|
25806
|
-
encode: encode$
|
|
25807
|
-
decode: decode$
|
|
25814
|
+
encode: encode$w,
|
|
25815
|
+
decode: decode$v
|
|
25808
25816
|
});
|
|
25809
25817
|
const validXmlAttributes$e = [attrConfig$b];
|
|
25810
|
-
const XML_NODE_NAME$
|
|
25811
|
-
const SD_ATTR_KEY$
|
|
25812
|
-
const encode$
|
|
25818
|
+
const XML_NODE_NAME$m = "w:szCs";
|
|
25819
|
+
const SD_ATTR_KEY$6 = "fontSizeCs";
|
|
25820
|
+
const encode$v = (params, encodedAttrs = {}) => {
|
|
25813
25821
|
const { nodes } = params;
|
|
25814
25822
|
const node = nodes?.[0];
|
|
25815
25823
|
const value = encodedAttrs.fontSizeCs ?? node?.attributes?.["w:val"];
|
|
25816
25824
|
return {
|
|
25817
25825
|
type: "attr",
|
|
25818
|
-
xmlName: XML_NODE_NAME$
|
|
25819
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25826
|
+
xmlName: XML_NODE_NAME$m,
|
|
25827
|
+
sdNodeOrKeyName: SD_ATTR_KEY$6,
|
|
25820
25828
|
attributes: { "w:val": value ?? null }
|
|
25821
25829
|
};
|
|
25822
25830
|
};
|
|
25823
|
-
const config$
|
|
25824
|
-
xmlName: XML_NODE_NAME$
|
|
25825
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25831
|
+
const config$l = {
|
|
25832
|
+
xmlName: XML_NODE_NAME$m,
|
|
25833
|
+
sdNodeOrKeyName: SD_ATTR_KEY$6,
|
|
25826
25834
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25827
|
-
encode: encode$
|
|
25835
|
+
encode: encode$v,
|
|
25828
25836
|
attributes: validXmlAttributes$e
|
|
25829
25837
|
};
|
|
25830
|
-
const translator$
|
|
25838
|
+
const translator$1f = NodeTranslator.from(config$l);
|
|
25831
25839
|
const generateV2HandlerEntity = (handlerName, translator2) => ({
|
|
25832
25840
|
handlerName,
|
|
25833
25841
|
handler: (params) => {
|
|
@@ -25851,7 +25859,7 @@ function createSingleAttrPropertyHandler(xmlName, sdName = null, attrName = "w:v
|
|
|
25851
25859
|
xmlName,
|
|
25852
25860
|
sdNodeOrKeyName: sdName,
|
|
25853
25861
|
encode: ({ nodes }) => {
|
|
25854
|
-
return transformEncode(nodes[0]
|
|
25862
|
+
return transformEncode(nodes[0]?.attributes?.[attrName]) ?? void 0;
|
|
25855
25863
|
},
|
|
25856
25864
|
decode: ({ node }) => {
|
|
25857
25865
|
const value = node.attrs?.[sdName] != null ? transformDecode(node.attrs[sdName]) : void 0;
|
|
@@ -25883,8 +25891,32 @@ function createBorderPropertyHandler(xmlName, sdName = null) {
|
|
|
25883
25891
|
xmlName,
|
|
25884
25892
|
sdNodeOrKeyName: sdName,
|
|
25885
25893
|
attributes: [
|
|
25886
|
-
createAttributeHandler(
|
|
25887
|
-
|
|
25894
|
+
createAttributeHandler(
|
|
25895
|
+
"w:val",
|
|
25896
|
+
"val",
|
|
25897
|
+
(v2) => v2 === "nil" ? "none" : v2,
|
|
25898
|
+
(v2) => v2 === "none" ? "nil" : v2
|
|
25899
|
+
),
|
|
25900
|
+
createAttributeHandler(
|
|
25901
|
+
"w:color",
|
|
25902
|
+
"color",
|
|
25903
|
+
(v2) => {
|
|
25904
|
+
if (v2 === "auto") {
|
|
25905
|
+
return null;
|
|
25906
|
+
} else if (v2) {
|
|
25907
|
+
return `#${v2}`;
|
|
25908
|
+
} else {
|
|
25909
|
+
return void 0;
|
|
25910
|
+
}
|
|
25911
|
+
},
|
|
25912
|
+
(v2) => {
|
|
25913
|
+
if (v2) {
|
|
25914
|
+
return v2.replace("#", "");
|
|
25915
|
+
} else {
|
|
25916
|
+
return void 0;
|
|
25917
|
+
}
|
|
25918
|
+
}
|
|
25919
|
+
),
|
|
25888
25920
|
createAttributeHandler("w:themeColor"),
|
|
25889
25921
|
createAttributeHandler("w:themeTint"),
|
|
25890
25922
|
createAttributeHandler("w:themeShade"),
|
|
@@ -25950,6 +25982,37 @@ function decodeProperties(translatorsBySdName, properties) {
|
|
|
25950
25982
|
});
|
|
25951
25983
|
return elements;
|
|
25952
25984
|
}
|
|
25985
|
+
function createNestedPropertiesTranslator(xmlName, sdName, propertyTranslators2, defaultEncodedAttrs = {}) {
|
|
25986
|
+
const propertyTranslatorsByXmlName = {};
|
|
25987
|
+
const propertyTranslatorsBySdName = {};
|
|
25988
|
+
propertyTranslators2.forEach((translator2) => {
|
|
25989
|
+
propertyTranslatorsByXmlName[translator2.xmlName] = translator2;
|
|
25990
|
+
propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
|
|
25991
|
+
});
|
|
25992
|
+
return {
|
|
25993
|
+
xmlName,
|
|
25994
|
+
sdNodeOrKeyName: sdName,
|
|
25995
|
+
type: NodeTranslator.translatorTypes.NODE,
|
|
25996
|
+
attributes: [],
|
|
25997
|
+
encode: (params) => {
|
|
25998
|
+
const { nodes } = params;
|
|
25999
|
+
const node = nodes[0];
|
|
26000
|
+
const attributes = { ...defaultEncodedAttrs, ...encodeProperties(node, propertyTranslatorsByXmlName) };
|
|
26001
|
+
return Object.keys(attributes).length > 0 ? attributes : void 0;
|
|
26002
|
+
},
|
|
26003
|
+
decode: (params) => {
|
|
26004
|
+
const currentValue = params.node.attrs?.[sdName];
|
|
26005
|
+
const elements = decodeProperties(propertyTranslatorsBySdName, currentValue);
|
|
26006
|
+
const newNode = {
|
|
26007
|
+
name: xmlName,
|
|
26008
|
+
type: "element",
|
|
26009
|
+
attributes: {},
|
|
26010
|
+
elements
|
|
26011
|
+
};
|
|
26012
|
+
return newNode;
|
|
26013
|
+
}
|
|
26014
|
+
};
|
|
26015
|
+
}
|
|
25953
26016
|
const parseBoolean = (value) => value != null ? ["1", "true"].includes(value) : void 0;
|
|
25954
26017
|
const booleanToString = (value) => value != null ? value ? "1" : "0" : void 0;
|
|
25955
26018
|
const parseInteger = (value) => {
|
|
@@ -25961,9 +26024,9 @@ const integerToString = (value) => {
|
|
|
25961
26024
|
const intValue = parseInteger(value);
|
|
25962
26025
|
return intValue != void 0 ? String(intValue) : void 0;
|
|
25963
26026
|
};
|
|
25964
|
-
const XML_NODE_NAME$
|
|
25965
|
-
const SD_ATTR_KEY$
|
|
25966
|
-
const encode$
|
|
26027
|
+
const XML_NODE_NAME$l = "w:caps";
|
|
26028
|
+
const SD_ATTR_KEY$5 = "textTransform";
|
|
26029
|
+
const encode$u = (params, encodedAttrs = {}) => {
|
|
25967
26030
|
const { nodes } = params;
|
|
25968
26031
|
const node = nodes[0];
|
|
25969
26032
|
if (!node) return void 0;
|
|
@@ -25975,31 +26038,31 @@ const encode$x = (params, encodedAttrs = {}) => {
|
|
|
25975
26038
|
}
|
|
25976
26039
|
return {
|
|
25977
26040
|
type: "attr",
|
|
25978
|
-
xmlName: XML_NODE_NAME$
|
|
25979
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
25980
|
-
attributes: { [SD_ATTR_KEY$
|
|
26041
|
+
xmlName: XML_NODE_NAME$l,
|
|
26042
|
+
sdNodeOrKeyName: SD_ATTR_KEY$5,
|
|
26043
|
+
attributes: { [SD_ATTR_KEY$5]: result }
|
|
25981
26044
|
};
|
|
25982
26045
|
};
|
|
25983
|
-
const config$
|
|
25984
|
-
xmlName: XML_NODE_NAME$
|
|
25985
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
26046
|
+
const config$k = {
|
|
26047
|
+
xmlName: XML_NODE_NAME$l,
|
|
26048
|
+
sdNodeOrKeyName: SD_ATTR_KEY$5,
|
|
25986
26049
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25987
|
-
encode: encode$
|
|
26050
|
+
encode: encode$u,
|
|
25988
26051
|
attributes: [createAttributeHandler("w:val")]
|
|
25989
26052
|
};
|
|
25990
|
-
const translator
|
|
26053
|
+
const translator$1e = NodeTranslator.from(config$k);
|
|
25991
26054
|
const runPropertyTranslators = Object.freeze({
|
|
25992
|
-
"w:b": translator$
|
|
25993
|
-
"w:i": translator$
|
|
25994
|
-
"w:u": translator$
|
|
25995
|
-
"w:strike": translator$
|
|
25996
|
-
"w:color": translator$
|
|
25997
|
-
"w:highlight": translator$
|
|
25998
|
-
"w:rFonts": translator$
|
|
25999
|
-
"w:rStyle": translator$
|
|
26000
|
-
"w:sz": translator$
|
|
26001
|
-
"w:szCs": translator$
|
|
26002
|
-
"w:caps": translator
|
|
26055
|
+
"w:b": translator$1n,
|
|
26056
|
+
"w:i": translator$1m,
|
|
26057
|
+
"w:u": translator$1l,
|
|
26058
|
+
"w:strike": translator$1k,
|
|
26059
|
+
"w:color": translator$1j,
|
|
26060
|
+
"w:highlight": translator$1q,
|
|
26061
|
+
"w:rFonts": translator$1i,
|
|
26062
|
+
"w:rStyle": translator$1h,
|
|
26063
|
+
"w:sz": translator$1g,
|
|
26064
|
+
"w:szCs": translator$1f,
|
|
26065
|
+
"w:caps": translator$1e
|
|
26003
26066
|
});
|
|
26004
26067
|
const rawRunPropertyXmlNames = Object.freeze(["w:lang", "w:shd"]);
|
|
26005
26068
|
const RAW_CHILD_NAME_SET = new Set(rawRunPropertyXmlNames);
|
|
@@ -26013,9 +26076,9 @@ const toRunPropertyEntry = (candidate) => {
|
|
|
26013
26076
|
attributes: { ...candidate.attributes || {} }
|
|
26014
26077
|
};
|
|
26015
26078
|
};
|
|
26016
|
-
const XML_NODE_NAME$
|
|
26017
|
-
const SD_ATTR_KEY$
|
|
26018
|
-
const encode$
|
|
26079
|
+
const XML_NODE_NAME$k = "w:rPr";
|
|
26080
|
+
const SD_ATTR_KEY$4 = "runProperties";
|
|
26081
|
+
const encode$t = (params) => {
|
|
26019
26082
|
const { nodes } = params;
|
|
26020
26083
|
const node = nodes?.[0] || {};
|
|
26021
26084
|
const contents = Array.isArray(node.elements) ? node.elements : [];
|
|
@@ -26049,16 +26112,16 @@ const encode$w = (params) => {
|
|
|
26049
26112
|
attributes: runPropsArray
|
|
26050
26113
|
};
|
|
26051
26114
|
};
|
|
26052
|
-
const config$
|
|
26053
|
-
xmlName: XML_NODE_NAME$
|
|
26054
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
26115
|
+
const config$j = {
|
|
26116
|
+
xmlName: XML_NODE_NAME$k,
|
|
26117
|
+
sdNodeOrKeyName: SD_ATTR_KEY$4,
|
|
26055
26118
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
26056
|
-
encode: encode$
|
|
26119
|
+
encode: encode$t
|
|
26057
26120
|
};
|
|
26058
|
-
const translator$
|
|
26121
|
+
const translator$1d = NodeTranslator.from(config$j);
|
|
26059
26122
|
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;
|
|
26060
26123
|
const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
|
|
26061
|
-
const collectRunProperties = (params, rPrNode, translator2 = translator$
|
|
26124
|
+
const collectRunProperties = (params, rPrNode, translator2 = translator$1d) => {
|
|
26062
26125
|
if (!rPrNode) return { entries: [], hadRPr: false, styleChangeMarks: [] };
|
|
26063
26126
|
const result = translator2.encode({ ...params, nodes: [rPrNode] }) || {};
|
|
26064
26127
|
let entries = [];
|
|
@@ -26531,7 +26594,7 @@ const ensureTrackedWrapper = (runs, trackingMarksByType = /* @__PURE__ */ new Ma
|
|
|
26531
26594
|
}
|
|
26532
26595
|
return runs;
|
|
26533
26596
|
};
|
|
26534
|
-
const XML_NODE_NAME$
|
|
26597
|
+
const XML_NODE_NAME$j = "w:hyperlink";
|
|
26535
26598
|
const SD_NODE_NAME$e = "link";
|
|
26536
26599
|
const _createAttributeHandler = (xmlName, sdName) => ({
|
|
26537
26600
|
xmlName,
|
|
@@ -26552,7 +26615,7 @@ const validXmlAttributes$d = [
|
|
|
26552
26615
|
_createAttributeHandler("r:id", "rId"),
|
|
26553
26616
|
_createAttributeHandler("w:tgtFrame", "target")
|
|
26554
26617
|
];
|
|
26555
|
-
const encode$
|
|
26618
|
+
const encode$s = (params, encodedAttrs) => {
|
|
26556
26619
|
const { nodes, docx, nodeListHandler } = params;
|
|
26557
26620
|
const node = nodes[0];
|
|
26558
26621
|
let href = _resolveHref(docx, encodedAttrs);
|
|
@@ -26586,7 +26649,7 @@ const _resolveHref = (docx, encodedAttrs) => {
|
|
|
26586
26649
|
}
|
|
26587
26650
|
return href;
|
|
26588
26651
|
};
|
|
26589
|
-
function decode$
|
|
26652
|
+
function decode$u(params) {
|
|
26590
26653
|
const { hyperlinkGroup = [params.node] } = params.extraParams || {};
|
|
26591
26654
|
const node = hyperlinkGroup[0];
|
|
26592
26655
|
const linkMark = node.marks.find((m2) => m2.type === "link");
|
|
@@ -26635,55 +26698,55 @@ function _addNewLinkRelationship(params, link) {
|
|
|
26635
26698
|
});
|
|
26636
26699
|
return id;
|
|
26637
26700
|
}
|
|
26638
|
-
const config$
|
|
26639
|
-
xmlName: XML_NODE_NAME$
|
|
26701
|
+
const config$i = {
|
|
26702
|
+
xmlName: XML_NODE_NAME$j,
|
|
26640
26703
|
sdNodeOrKeyName: SD_NODE_NAME$e,
|
|
26641
26704
|
type: NodeTranslator.translatorTypes.NODE,
|
|
26642
|
-
encode: encode$
|
|
26643
|
-
decode: decode$
|
|
26705
|
+
encode: encode$s,
|
|
26706
|
+
decode: decode$u,
|
|
26644
26707
|
attributes: validXmlAttributes$d
|
|
26645
26708
|
};
|
|
26646
|
-
const translator$
|
|
26647
|
-
const encode$
|
|
26709
|
+
const translator$1c = NodeTranslator.from(config$i);
|
|
26710
|
+
const encode$r = (attributes) => {
|
|
26648
26711
|
return attributes["w:rsidR"];
|
|
26649
26712
|
};
|
|
26650
|
-
const decode$
|
|
26713
|
+
const decode$t = (attrs) => {
|
|
26651
26714
|
return attrs.rsidR;
|
|
26652
26715
|
};
|
|
26653
26716
|
const attrConfig$a = Object.freeze({
|
|
26654
26717
|
xmlName: "w:rsidR",
|
|
26655
26718
|
sdName: "rsidR",
|
|
26656
|
-
encode: encode$
|
|
26657
|
-
decode: decode$
|
|
26719
|
+
encode: encode$r,
|
|
26720
|
+
decode: decode$t
|
|
26658
26721
|
});
|
|
26659
|
-
const encode$
|
|
26722
|
+
const encode$q = (attributes) => {
|
|
26660
26723
|
return attributes["w:rsidRPr"];
|
|
26661
26724
|
};
|
|
26662
|
-
const decode$
|
|
26725
|
+
const decode$s = (attrs) => {
|
|
26663
26726
|
return attrs.rsidRPr;
|
|
26664
26727
|
};
|
|
26665
26728
|
const attrConfig$9 = Object.freeze({
|
|
26666
26729
|
xmlName: "w:rsidRPr",
|
|
26667
26730
|
sdName: "rsidRPr",
|
|
26668
|
-
encode: encode$
|
|
26669
|
-
decode: decode$
|
|
26731
|
+
encode: encode$q,
|
|
26732
|
+
decode: decode$s
|
|
26670
26733
|
});
|
|
26671
|
-
const encode$
|
|
26734
|
+
const encode$p = (attributes) => {
|
|
26672
26735
|
return attributes["w:rsidDel"];
|
|
26673
26736
|
};
|
|
26674
|
-
const decode$
|
|
26737
|
+
const decode$r = (attrs) => {
|
|
26675
26738
|
return attrs.rsidDel;
|
|
26676
26739
|
};
|
|
26677
26740
|
const attrConfig$8 = Object.freeze({
|
|
26678
26741
|
xmlName: "w:rsidDel",
|
|
26679
26742
|
sdName: "rsidDel",
|
|
26680
|
-
encode: encode$
|
|
26681
|
-
decode: decode$
|
|
26743
|
+
encode: encode$p,
|
|
26744
|
+
decode: decode$r
|
|
26682
26745
|
});
|
|
26683
26746
|
const validXmlAttributes$c = [attrConfig$a, attrConfig$9, attrConfig$8];
|
|
26684
|
-
const XML_NODE_NAME$
|
|
26747
|
+
const XML_NODE_NAME$i = "w:r";
|
|
26685
26748
|
const SD_KEY_NAME = "run";
|
|
26686
|
-
const encode$
|
|
26749
|
+
const encode$o = (params, encodedAttrs = {}) => {
|
|
26687
26750
|
const { nodes = [], nodeListHandler } = params || {};
|
|
26688
26751
|
const runNode = nodes[0];
|
|
26689
26752
|
if (!runNode) return void 0;
|
|
@@ -26731,7 +26794,7 @@ const encode$r = (params, encodedAttrs = {}) => {
|
|
|
26731
26794
|
}
|
|
26732
26795
|
return runNodeResult;
|
|
26733
26796
|
};
|
|
26734
|
-
const decode$
|
|
26797
|
+
const decode$q = (params, decodedAttrs = {}) => {
|
|
26735
26798
|
const { node } = params || {};
|
|
26736
26799
|
if (!node) return void 0;
|
|
26737
26800
|
const isLinkNode = node.marks?.some((m2) => m2.type === "link");
|
|
@@ -26740,7 +26803,7 @@ const decode$t = (params, decodedAttrs = {}) => {
|
|
|
26740
26803
|
...params.extraParams,
|
|
26741
26804
|
linkProcessed: true
|
|
26742
26805
|
};
|
|
26743
|
-
return translator$
|
|
26806
|
+
return translator$1c.decode({ ...params, extraParams });
|
|
26744
26807
|
}
|
|
26745
26808
|
const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
|
|
26746
26809
|
const runAttrs = runNodeForExport.attrs || {};
|
|
@@ -26796,7 +26859,7 @@ const decode$t = (params, decodedAttrs = {}) => {
|
|
|
26796
26859
|
runs.push(trackedClone);
|
|
26797
26860
|
return;
|
|
26798
26861
|
}
|
|
26799
|
-
const runWrapper = { name: XML_NODE_NAME$
|
|
26862
|
+
const runWrapper = { name: XML_NODE_NAME$i, elements: [] };
|
|
26800
26863
|
applyBaseRunProps(runWrapper);
|
|
26801
26864
|
if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
|
|
26802
26865
|
runWrapper.elements.push(cloneXmlNode(child));
|
|
@@ -26804,7 +26867,7 @@ const decode$t = (params, decodedAttrs = {}) => {
|
|
|
26804
26867
|
});
|
|
26805
26868
|
const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
|
|
26806
26869
|
if (!trackedRuns.length) {
|
|
26807
|
-
const emptyRun = { name: XML_NODE_NAME$
|
|
26870
|
+
const emptyRun = { name: XML_NODE_NAME$i, elements: [] };
|
|
26808
26871
|
applyBaseRunProps(emptyRun);
|
|
26809
26872
|
trackedRuns.push(emptyRun);
|
|
26810
26873
|
}
|
|
@@ -26818,15 +26881,15 @@ const decode$t = (params, decodedAttrs = {}) => {
|
|
|
26818
26881
|
}
|
|
26819
26882
|
return trackedRuns;
|
|
26820
26883
|
};
|
|
26821
|
-
const config$
|
|
26822
|
-
xmlName: XML_NODE_NAME$
|
|
26884
|
+
const config$h = {
|
|
26885
|
+
xmlName: XML_NODE_NAME$i,
|
|
26823
26886
|
sdNodeOrKeyName: SD_KEY_NAME,
|
|
26824
26887
|
type: NodeTranslator.translatorTypes.NODE,
|
|
26825
|
-
encode: encode$
|
|
26826
|
-
decode: decode$
|
|
26888
|
+
encode: encode$o,
|
|
26889
|
+
decode: decode$q,
|
|
26827
26890
|
attributes: validXmlAttributes$c
|
|
26828
26891
|
};
|
|
26829
|
-
const translator$
|
|
26892
|
+
const translator$1b = NodeTranslator.from(config$h);
|
|
26830
26893
|
function preProcessVerticalMergeCells(table, { editorSchema }) {
|
|
26831
26894
|
if (!table || !Array.isArray(table.content)) {
|
|
26832
26895
|
return table;
|
|
@@ -26867,13 +26930,13 @@ function preProcessVerticalMergeCells(table, { editorSchema }) {
|
|
|
26867
26930
|
}
|
|
26868
26931
|
return table;
|
|
26869
26932
|
}
|
|
26870
|
-
const translator$
|
|
26933
|
+
const translator$1a = NodeTranslator.from({
|
|
26871
26934
|
xmlName: "w:cantSplit",
|
|
26872
26935
|
sdNodeOrKeyName: "cantSplit",
|
|
26873
26936
|
encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
26874
26937
|
decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
|
|
26875
26938
|
});
|
|
26876
|
-
const translator$
|
|
26939
|
+
const translator$19 = NodeTranslator.from({
|
|
26877
26940
|
xmlName: "w:cnfStyle",
|
|
26878
26941
|
sdNodeOrKeyName: "cnfStyle",
|
|
26879
26942
|
attributes: [
|
|
@@ -26899,8 +26962,8 @@ const translator$W = NodeTranslator.from({
|
|
|
26899
26962
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
26900
26963
|
}
|
|
26901
26964
|
});
|
|
26902
|
-
const translator$
|
|
26903
|
-
const translator$
|
|
26965
|
+
const translator$18 = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
|
|
26966
|
+
const translator$17 = NodeTranslator.from(
|
|
26904
26967
|
createSingleAttrPropertyHandler(
|
|
26905
26968
|
"w:gridAfter",
|
|
26906
26969
|
null,
|
|
@@ -26909,7 +26972,7 @@ const translator$U = NodeTranslator.from(
|
|
|
26909
26972
|
(v2) => integerToString(v2)
|
|
26910
26973
|
)
|
|
26911
26974
|
);
|
|
26912
|
-
const translator$
|
|
26975
|
+
const translator$16 = NodeTranslator.from(
|
|
26913
26976
|
createSingleAttrPropertyHandler(
|
|
26914
26977
|
"w:gridBefore",
|
|
26915
26978
|
null,
|
|
@@ -26918,21 +26981,21 @@ const translator$T = NodeTranslator.from(
|
|
|
26918
26981
|
(v2) => integerToString(v2)
|
|
26919
26982
|
)
|
|
26920
26983
|
);
|
|
26921
|
-
const translator$
|
|
26984
|
+
const translator$15 = NodeTranslator.from({
|
|
26922
26985
|
xmlName: "w:hidden",
|
|
26923
26986
|
sdNodeOrKeyName: "hidden",
|
|
26924
26987
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
26925
26988
|
decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
|
|
26926
26989
|
});
|
|
26927
|
-
const translator$
|
|
26928
|
-
const translator$
|
|
26929
|
-
const translator$
|
|
26990
|
+
const translator$14 = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
|
|
26991
|
+
const translator$13 = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
|
|
26992
|
+
const translator$12 = NodeTranslator.from({
|
|
26930
26993
|
xmlName: "w:tblHeader",
|
|
26931
26994
|
sdNodeOrKeyName: "repeatHeader",
|
|
26932
26995
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
26933
26996
|
decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
|
|
26934
26997
|
});
|
|
26935
|
-
const translator$
|
|
26998
|
+
const translator$11 = NodeTranslator.from({
|
|
26936
26999
|
xmlName: "w:trHeight",
|
|
26937
27000
|
sdNodeOrKeyName: "rowHeight",
|
|
26938
27001
|
encode: ({ nodes }) => {
|
|
@@ -26959,84 +27022,43 @@ const translator$O = NodeTranslator.from({
|
|
|
26959
27022
|
return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
|
|
26960
27023
|
}
|
|
26961
27024
|
});
|
|
26962
|
-
const translator$
|
|
26963
|
-
const translator
|
|
26964
|
-
const
|
|
26965
|
-
|
|
26966
|
-
|
|
26967
|
-
|
|
26968
|
-
|
|
26969
|
-
|
|
27025
|
+
const translator$10 = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
|
|
27026
|
+
const translator$$ = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
|
|
27027
|
+
const propertyTranslators$6 = [
|
|
27028
|
+
translator$1a,
|
|
27029
|
+
translator$19,
|
|
27030
|
+
translator$18,
|
|
27031
|
+
translator$17,
|
|
27032
|
+
translator$16,
|
|
27033
|
+
translator$15,
|
|
27034
|
+
translator$14,
|
|
27035
|
+
translator$13,
|
|
27036
|
+
translator$12,
|
|
27037
|
+
translator$11,
|
|
27038
|
+
translator$10,
|
|
27039
|
+
translator$$
|
|
27040
|
+
];
|
|
27041
|
+
const translator$_ = NodeTranslator.from(
|
|
27042
|
+
createNestedPropertiesTranslator("w:trPr", "tableRowProperties", propertyTranslators$6, {
|
|
26970
27043
|
cantSplit: false,
|
|
26971
27044
|
hidden: false,
|
|
26972
27045
|
repeatHeader: false
|
|
26973
|
-
}
|
|
26974
|
-
|
|
26975
|
-
|
|
26976
|
-
...encodeProperties(node, propertyTranslatorsByXmlName$2)
|
|
26977
|
-
};
|
|
26978
|
-
return {
|
|
26979
|
-
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
26980
|
-
xmlName: XML_NODE_NAME$k,
|
|
26981
|
-
sdNodeOrKeyName: SD_ATTR_KEY$6,
|
|
26982
|
-
attributes
|
|
26983
|
-
};
|
|
26984
|
-
};
|
|
26985
|
-
const decode$s = (params) => {
|
|
26986
|
-
const { tableRowProperties = {} } = params.node.attrs || {};
|
|
26987
|
-
const elements = decodeProperties(propertyTranslatorsBySdName$2, tableRowProperties);
|
|
26988
|
-
const newNode = {
|
|
26989
|
-
name: "w:trPr",
|
|
26990
|
-
type: "element",
|
|
26991
|
-
attributes: {},
|
|
26992
|
-
elements
|
|
26993
|
-
};
|
|
26994
|
-
return newNode;
|
|
26995
|
-
};
|
|
26996
|
-
const propertyTranslators$3 = [
|
|
26997
|
-
translator$X,
|
|
26998
|
-
translator$W,
|
|
26999
|
-
translator$V,
|
|
27000
|
-
translator$U,
|
|
27001
|
-
translator$T,
|
|
27002
|
-
translator$S,
|
|
27003
|
-
translator$R,
|
|
27004
|
-
translator$Q,
|
|
27005
|
-
translator$P,
|
|
27006
|
-
translator$O,
|
|
27007
|
-
translator$N,
|
|
27008
|
-
translator$M
|
|
27009
|
-
];
|
|
27010
|
-
const propertyTranslatorsByXmlName$2 = {};
|
|
27011
|
-
propertyTranslators$3.forEach((translator2) => {
|
|
27012
|
-
propertyTranslatorsByXmlName$2[translator2.xmlName] = translator2;
|
|
27013
|
-
});
|
|
27014
|
-
const propertyTranslatorsBySdName$2 = {};
|
|
27015
|
-
propertyTranslators$3.forEach((translator2) => {
|
|
27016
|
-
propertyTranslatorsBySdName$2[translator2.sdNodeOrKeyName] = translator2;
|
|
27017
|
-
});
|
|
27018
|
-
const config$h = {
|
|
27019
|
-
xmlName: XML_NODE_NAME$k,
|
|
27020
|
-
sdNodeOrKeyName: SD_ATTR_KEY$6,
|
|
27021
|
-
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
27022
|
-
encode: encode$q,
|
|
27023
|
-
decode: decode$s
|
|
27024
|
-
};
|
|
27025
|
-
const translator$L = NodeTranslator.from(config$h);
|
|
27026
|
-
const XML_NODE_NAME$j = "w:tr";
|
|
27046
|
+
})
|
|
27047
|
+
);
|
|
27048
|
+
const XML_NODE_NAME$h = "w:tr";
|
|
27027
27049
|
const SD_NODE_NAME$d = "tableRow";
|
|
27028
27050
|
const validXmlAttributes$b = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
|
|
27029
27051
|
(xmlName) => createAttributeHandler(xmlName)
|
|
27030
27052
|
);
|
|
27031
|
-
const encode$
|
|
27053
|
+
const encode$n = (params, encodedAttrs) => {
|
|
27032
27054
|
const { row } = params.extraParams;
|
|
27033
27055
|
let tableRowProperties = {};
|
|
27034
27056
|
const tPr = row.elements.find((el) => el.name === "w:trPr");
|
|
27035
27057
|
if (tPr) {
|
|
27036
|
-
|
|
27058
|
+
tableRowProperties = translator$_.encode({
|
|
27037
27059
|
...params,
|
|
27038
27060
|
nodes: [tPr]
|
|
27039
|
-
})
|
|
27061
|
+
});
|
|
27040
27062
|
}
|
|
27041
27063
|
encodedAttrs["tableRowProperties"] = Object.freeze(tableRowProperties);
|
|
27042
27064
|
encodedAttrs["rowHeight"] = twipsToPixels(tableRowProperties["rowHeight"]?.value);
|
|
@@ -27068,7 +27090,7 @@ const encode$p = (params, encodedAttrs) => {
|
|
|
27068
27090
|
};
|
|
27069
27091
|
return newNode;
|
|
27070
27092
|
};
|
|
27071
|
-
const decode$
|
|
27093
|
+
const decode$p = (params, decodedAttrs) => {
|
|
27072
27094
|
const { node } = params;
|
|
27073
27095
|
const elements = translateChildNodes(params);
|
|
27074
27096
|
if (node.attrs?.tableRowProperties) {
|
|
@@ -27080,7 +27102,7 @@ const decode$r = (params, decodedAttrs) => {
|
|
|
27080
27102
|
}
|
|
27081
27103
|
}
|
|
27082
27104
|
tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
|
|
27083
|
-
const trPr = translator$
|
|
27105
|
+
const trPr = translator$_.decode({
|
|
27084
27106
|
...params,
|
|
27085
27107
|
node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
|
|
27086
27108
|
});
|
|
@@ -27093,21 +27115,21 @@ const decode$r = (params, decodedAttrs) => {
|
|
|
27093
27115
|
};
|
|
27094
27116
|
};
|
|
27095
27117
|
const config$g = {
|
|
27096
|
-
xmlName: XML_NODE_NAME$
|
|
27118
|
+
xmlName: XML_NODE_NAME$h,
|
|
27097
27119
|
sdNodeOrKeyName: SD_NODE_NAME$d,
|
|
27098
27120
|
type: NodeTranslator.translatorTypes.NODE,
|
|
27099
|
-
encode: encode$
|
|
27100
|
-
decode: decode$
|
|
27121
|
+
encode: encode$n,
|
|
27122
|
+
decode: decode$p,
|
|
27101
27123
|
attributes: validXmlAttributes$b
|
|
27102
27124
|
};
|
|
27103
|
-
const translator$
|
|
27104
|
-
const translator$
|
|
27125
|
+
const translator$Z = NodeTranslator.from(config$g);
|
|
27126
|
+
const translator$Y = NodeTranslator.from({
|
|
27105
27127
|
xmlName: "w:bidiVisual",
|
|
27106
27128
|
sdNodeOrKeyName: "rightToLeft",
|
|
27107
27129
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
27108
27130
|
decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
|
|
27109
27131
|
});
|
|
27110
|
-
const translator$
|
|
27132
|
+
const translator$X = NodeTranslator.from({
|
|
27111
27133
|
xmlName: "w:shd",
|
|
27112
27134
|
sdNodeOrKeyName: "shading",
|
|
27113
27135
|
attributes: [
|
|
@@ -27129,11 +27151,11 @@ const translator$I = NodeTranslator.from({
|
|
|
27129
27151
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
27130
27152
|
}
|
|
27131
27153
|
});
|
|
27132
|
-
const translator$
|
|
27133
|
-
const translator$
|
|
27134
|
-
const translator$
|
|
27135
|
-
const translator$
|
|
27136
|
-
const translator$
|
|
27154
|
+
const translator$W = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
|
|
27155
|
+
const translator$V = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
|
|
27156
|
+
const translator$U = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
|
|
27157
|
+
const translator$T = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
|
|
27158
|
+
const translator$S = NodeTranslator.from({
|
|
27137
27159
|
xmlName: "w:tblLook",
|
|
27138
27160
|
sdNodeOrKeyName: "tblLook",
|
|
27139
27161
|
attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
|
|
@@ -27145,16 +27167,16 @@ const translator$D = NodeTranslator.from({
|
|
|
27145
27167
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
27146
27168
|
}
|
|
27147
27169
|
});
|
|
27148
|
-
const translator$
|
|
27149
|
-
const translator$
|
|
27150
|
-
const translator$
|
|
27170
|
+
const translator$R = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
|
|
27171
|
+
const translator$Q = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
|
|
27172
|
+
const translator$P = NodeTranslator.from(
|
|
27151
27173
|
createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
|
|
27152
27174
|
);
|
|
27153
|
-
const translator$
|
|
27175
|
+
const translator$O = NodeTranslator.from(
|
|
27154
27176
|
createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
|
|
27155
27177
|
);
|
|
27156
|
-
const translator$
|
|
27157
|
-
const translator$
|
|
27178
|
+
const translator$N = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
|
|
27179
|
+
const translator$M = NodeTranslator.from({
|
|
27158
27180
|
xmlName: "w:tblpPr",
|
|
27159
27181
|
sdNodeOrKeyName: "floatingTableProperties",
|
|
27160
27182
|
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))),
|
|
@@ -27166,160 +27188,67 @@ const translator$x = NodeTranslator.from({
|
|
|
27166
27188
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
27167
27189
|
}
|
|
27168
27190
|
});
|
|
27169
|
-
const translator$
|
|
27170
|
-
const translator$
|
|
27171
|
-
const translator$
|
|
27172
|
-
const translator$
|
|
27173
|
-
const translator$
|
|
27174
|
-
const translator$
|
|
27175
|
-
const translator$
|
|
27176
|
-
const translator$
|
|
27177
|
-
const translator$
|
|
27178
|
-
const translator$
|
|
27179
|
-
const translator$
|
|
27180
|
-
const translator$
|
|
27181
|
-
const translator$
|
|
27182
|
-
const translator$
|
|
27183
|
-
const
|
|
27184
|
-
|
|
27185
|
-
const encode$o = (params) => {
|
|
27186
|
-
const { nodes } = params;
|
|
27187
|
-
const node = nodes[0];
|
|
27188
|
-
const attributes = encodeProperties(node, tblBordersTranslatorsByXmlName);
|
|
27189
|
-
return Object.keys(attributes).length > 0 ? attributes : void 0;
|
|
27190
|
-
};
|
|
27191
|
-
const decode$q = (params) => {
|
|
27192
|
-
const { borders = {} } = params.node.attrs || {};
|
|
27193
|
-
const elements = decodeProperties(tblBordersTranslatorsBySdName, borders);
|
|
27194
|
-
const newNode = {
|
|
27195
|
-
name: "w:tblBorders",
|
|
27196
|
-
type: "element",
|
|
27197
|
-
attributes: {},
|
|
27198
|
-
elements
|
|
27199
|
-
};
|
|
27200
|
-
return newNode;
|
|
27201
|
-
};
|
|
27202
|
-
const propertyTranslators$2 = [
|
|
27203
|
-
translator$w,
|
|
27204
|
-
translator$u,
|
|
27205
|
-
translator$s,
|
|
27206
|
-
translator$r,
|
|
27207
|
-
translator$q,
|
|
27208
|
-
translator$o,
|
|
27209
|
-
translator$m,
|
|
27210
|
-
translator$k
|
|
27211
|
-
];
|
|
27212
|
-
const tblBordersTranslatorsByXmlName = {};
|
|
27213
|
-
const tblBordersTranslatorsBySdName = {};
|
|
27214
|
-
propertyTranslators$2.forEach((translator2) => {
|
|
27215
|
-
tblBordersTranslatorsByXmlName[translator2.xmlName] = translator2;
|
|
27216
|
-
tblBordersTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
|
|
27217
|
-
});
|
|
27218
|
-
const translator$i = NodeTranslator.from({
|
|
27219
|
-
xmlName: XML_NODE_NAME$i,
|
|
27220
|
-
sdNodeOrKeyName: SD_ATTR_KEY$5,
|
|
27221
|
-
type: NodeTranslator.translatorTypes.NODE,
|
|
27222
|
-
attributes: [],
|
|
27223
|
-
encode: encode$o,
|
|
27224
|
-
decode: decode$q
|
|
27225
|
-
});
|
|
27226
|
-
const XML_NODE_NAME$h = "w:tblCellMar";
|
|
27227
|
-
const SD_ATTR_KEY$4 = "cellMargins";
|
|
27228
|
-
const encode$n = (params) => {
|
|
27229
|
-
const { nodes } = params;
|
|
27230
|
-
const node = nodes[0];
|
|
27231
|
-
const attributes = encodeProperties(node, propertyTranslatorsByXmlName$1);
|
|
27232
|
-
return Object.keys(attributes).length > 0 ? attributes : void 0;
|
|
27233
|
-
};
|
|
27234
|
-
const decode$p = (params) => {
|
|
27235
|
-
const { cellMargins = {} } = params.node.attrs || {};
|
|
27236
|
-
const elements = decodeProperties(propertyTranslatorsBySdName$1, cellMargins);
|
|
27237
|
-
const newNode = {
|
|
27238
|
-
name: XML_NODE_NAME$h,
|
|
27239
|
-
type: "element",
|
|
27240
|
-
attributes: {},
|
|
27241
|
-
elements
|
|
27242
|
-
};
|
|
27243
|
-
return newNode;
|
|
27244
|
-
};
|
|
27245
|
-
const propertyTranslators$1 = [
|
|
27246
|
-
translator$v,
|
|
27247
|
-
translator$t,
|
|
27248
|
-
translator$p,
|
|
27249
|
-
translator$n,
|
|
27250
|
-
translator$l,
|
|
27251
|
-
translator$j
|
|
27252
|
-
];
|
|
27253
|
-
const propertyTranslatorsByXmlName$1 = {};
|
|
27254
|
-
const propertyTranslatorsBySdName$1 = {};
|
|
27255
|
-
propertyTranslators$1.forEach((translator2) => {
|
|
27256
|
-
propertyTranslatorsByXmlName$1[translator2.xmlName] = translator2;
|
|
27257
|
-
propertyTranslatorsBySdName$1[translator2.sdNodeOrKeyName] = translator2;
|
|
27258
|
-
});
|
|
27259
|
-
const translator$h = NodeTranslator.from({
|
|
27260
|
-
xmlName: XML_NODE_NAME$h,
|
|
27261
|
-
sdNodeOrKeyName: SD_ATTR_KEY$4,
|
|
27262
|
-
type: NodeTranslator.translatorTypes.NODE,
|
|
27263
|
-
attributes: [],
|
|
27264
|
-
encode: encode$n,
|
|
27265
|
-
decode: decode$p
|
|
27266
|
-
});
|
|
27267
|
-
const XML_NODE_NAME$g = "w:tblPr";
|
|
27268
|
-
const SD_ATTR_KEY$3 = "tableProperties";
|
|
27269
|
-
const encode$m = (params) => {
|
|
27270
|
-
const { nodes } = params;
|
|
27271
|
-
const node = nodes[0];
|
|
27272
|
-
const attributes = encodeProperties(node, propertyTranslatorsByXmlName);
|
|
27273
|
-
return {
|
|
27274
|
-
xmlName: XML_NODE_NAME$g,
|
|
27275
|
-
sdNodeOrKeyName: SD_ATTR_KEY$3,
|
|
27276
|
-
attributes
|
|
27277
|
-
};
|
|
27278
|
-
};
|
|
27279
|
-
const decode$o = (params) => {
|
|
27280
|
-
const { tableProperties = {} } = params.node.attrs || {};
|
|
27281
|
-
const elements = decodeProperties(propertyTranslatorsBySdName, tableProperties);
|
|
27282
|
-
const newNode = {
|
|
27283
|
-
name: "w:tblPr",
|
|
27284
|
-
type: "element",
|
|
27285
|
-
attributes: {},
|
|
27286
|
-
elements
|
|
27287
|
-
};
|
|
27288
|
-
return newNode;
|
|
27289
|
-
};
|
|
27290
|
-
const propertyTranslators = [
|
|
27191
|
+
const translator$L = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
|
|
27192
|
+
const translator$K = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
|
|
27193
|
+
const translator$J = NodeTranslator.from(createBorderPropertyHandler("w:end"));
|
|
27194
|
+
const translator$I = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
|
|
27195
|
+
const translator$H = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
|
|
27196
|
+
const translator$G = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
|
|
27197
|
+
const translator$F = NodeTranslator.from(createBorderPropertyHandler("w:left"));
|
|
27198
|
+
const translator$E = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
|
|
27199
|
+
const translator$D = NodeTranslator.from(createBorderPropertyHandler("w:right"));
|
|
27200
|
+
const translator$C = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
|
|
27201
|
+
const translator$B = NodeTranslator.from(createBorderPropertyHandler("w:start"));
|
|
27202
|
+
const translator$A = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
|
|
27203
|
+
const translator$z = NodeTranslator.from(createBorderPropertyHandler("w:top"));
|
|
27204
|
+
const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
|
|
27205
|
+
const propertyTranslators$5 = [
|
|
27206
|
+
translator$L,
|
|
27291
27207
|
translator$J,
|
|
27292
|
-
translator$R,
|
|
27293
|
-
translator$I,
|
|
27294
27208
|
translator$H,
|
|
27295
|
-
translator$Q,
|
|
27296
27209
|
translator$G,
|
|
27297
27210
|
translator$F,
|
|
27298
|
-
translator$E,
|
|
27299
27211
|
translator$D,
|
|
27300
|
-
translator$C,
|
|
27301
27212
|
translator$B,
|
|
27213
|
+
translator$z
|
|
27214
|
+
];
|
|
27215
|
+
const translator$x = NodeTranslator.from(
|
|
27216
|
+
createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$5)
|
|
27217
|
+
);
|
|
27218
|
+
const propertyTranslators$4 = [
|
|
27219
|
+
translator$K,
|
|
27220
|
+
translator$I,
|
|
27221
|
+
translator$E,
|
|
27222
|
+
translator$C,
|
|
27302
27223
|
translator$A,
|
|
27303
|
-
translator$
|
|
27304
|
-
|
|
27224
|
+
translator$y
|
|
27225
|
+
];
|
|
27226
|
+
const translator$w = NodeTranslator.from(
|
|
27227
|
+
createNestedPropertiesTranslator("w:tblCellMar", "cellMargins", propertyTranslators$4)
|
|
27228
|
+
);
|
|
27229
|
+
const propertyTranslators$3 = [
|
|
27230
|
+
translator$Y,
|
|
27231
|
+
translator$14,
|
|
27232
|
+
translator$X,
|
|
27233
|
+
translator$W,
|
|
27234
|
+
translator$13,
|
|
27235
|
+
translator$V,
|
|
27236
|
+
translator$U,
|
|
27237
|
+
translator$T,
|
|
27238
|
+
translator$S,
|
|
27239
|
+
translator$R,
|
|
27240
|
+
translator$Q,
|
|
27241
|
+
translator$P,
|
|
27242
|
+
translator$O,
|
|
27243
|
+
translator$N,
|
|
27244
|
+
translator$M,
|
|
27305
27245
|
translator$x,
|
|
27306
|
-
translator$
|
|
27307
|
-
translator$h
|
|
27246
|
+
translator$w
|
|
27308
27247
|
];
|
|
27309
|
-
const
|
|
27310
|
-
|
|
27311
|
-
|
|
27312
|
-
|
|
27313
|
-
propertyTranslatorsBySdName[translator2.sdNodeOrKeyName] = translator2;
|
|
27314
|
-
});
|
|
27315
|
-
const config$f = {
|
|
27316
|
-
xmlName: XML_NODE_NAME$g,
|
|
27317
|
-
sdNodeOrKeyName: SD_ATTR_KEY$3,
|
|
27318
|
-
encode: encode$m,
|
|
27319
|
-
decode: decode$o
|
|
27320
|
-
};
|
|
27321
|
-
const translator$g = NodeTranslator.from(config$f);
|
|
27322
|
-
const translator$f = NodeTranslator.from(
|
|
27248
|
+
const translator$v = NodeTranslator.from(
|
|
27249
|
+
createNestedPropertiesTranslator("w:tblPr", "tableProperties", propertyTranslators$3)
|
|
27250
|
+
);
|
|
27251
|
+
const translator$u = NodeTranslator.from(
|
|
27323
27252
|
createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
|
|
27324
27253
|
);
|
|
27325
27254
|
const DEFAULT_COLUMN_WIDTH_PX = 100;
|
|
@@ -27369,20 +27298,20 @@ const resolveFallbackColumnWidthTwips = (params, totalColumns, cellMinWidthTwips
|
|
|
27369
27298
|
}
|
|
27370
27299
|
return Math.max(fallbackWidthTwips, cellMinWidthTwips);
|
|
27371
27300
|
};
|
|
27372
|
-
const XML_NODE_NAME$
|
|
27373
|
-
const SD_ATTR_KEY$
|
|
27301
|
+
const XML_NODE_NAME$g = "w:tblGrid";
|
|
27302
|
+
const SD_ATTR_KEY$3 = "grid";
|
|
27374
27303
|
const cellMinWidth = pixelsToTwips(10);
|
|
27375
|
-
const encode$
|
|
27304
|
+
const encode$m = (params) => {
|
|
27376
27305
|
const { nodes } = params;
|
|
27377
27306
|
const node = nodes[0];
|
|
27378
|
-
const attributes = encodeProperties(node, { [translator$
|
|
27307
|
+
const attributes = encodeProperties(node, { [translator$u.xmlName]: translator$u }, true);
|
|
27379
27308
|
return {
|
|
27380
|
-
xmlName: XML_NODE_NAME$
|
|
27381
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
27309
|
+
xmlName: XML_NODE_NAME$g,
|
|
27310
|
+
sdNodeOrKeyName: SD_ATTR_KEY$3,
|
|
27382
27311
|
attributes
|
|
27383
27312
|
};
|
|
27384
27313
|
};
|
|
27385
|
-
const decode$
|
|
27314
|
+
const decode$o = (params) => {
|
|
27386
27315
|
const { grid: rawGrid } = params.node.attrs || {};
|
|
27387
27316
|
const grid = Array.isArray(rawGrid) ? rawGrid : [];
|
|
27388
27317
|
const { firstRow = {} } = params.extraParams || {};
|
|
@@ -27401,10 +27330,10 @@ const decode$n = (params) => {
|
|
|
27401
27330
|
numericWidth = fallbackColumnWidthTwips;
|
|
27402
27331
|
}
|
|
27403
27332
|
numericWidth = Math.max(numericWidth, cellMinWidth);
|
|
27404
|
-
const decoded = translator$
|
|
27333
|
+
const decoded = translator$u.decode({
|
|
27405
27334
|
node: { type: (
|
|
27406
27335
|
/** @type {string} */
|
|
27407
|
-
translator$
|
|
27336
|
+
translator$u.sdNodeOrKeyName
|
|
27408
27337
|
), attrs: { col: numericWidth } }
|
|
27409
27338
|
});
|
|
27410
27339
|
if (decoded) elements.push(decoded);
|
|
@@ -27439,19 +27368,19 @@ const decode$n = (params) => {
|
|
|
27439
27368
|
columnIndex++;
|
|
27440
27369
|
}
|
|
27441
27370
|
const newNode = {
|
|
27442
|
-
name: XML_NODE_NAME$
|
|
27371
|
+
name: XML_NODE_NAME$g,
|
|
27443
27372
|
attributes: {},
|
|
27444
27373
|
elements
|
|
27445
27374
|
};
|
|
27446
27375
|
return newNode;
|
|
27447
27376
|
};
|
|
27448
|
-
const config$
|
|
27449
|
-
xmlName: XML_NODE_NAME$
|
|
27450
|
-
sdNodeOrKeyName: SD_ATTR_KEY$
|
|
27451
|
-
encode: encode$
|
|
27452
|
-
decode: decode$
|
|
27377
|
+
const config$f = {
|
|
27378
|
+
xmlName: XML_NODE_NAME$g,
|
|
27379
|
+
sdNodeOrKeyName: SD_ATTR_KEY$3,
|
|
27380
|
+
encode: encode$m,
|
|
27381
|
+
decode: decode$o
|
|
27453
27382
|
};
|
|
27454
|
-
const translator$
|
|
27383
|
+
const translator$t = NodeTranslator.from(config$f);
|
|
27455
27384
|
const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
|
|
27456
27385
|
const DEFAULT_PAGE_MARGIN_TWIPS = 1440;
|
|
27457
27386
|
const DEFAULT_CONTENT_WIDTH_TWIPS = DEFAULT_PAGE_WIDTH_TWIPS - 2 * DEFAULT_PAGE_MARGIN_TWIPS;
|
|
@@ -27514,19 +27443,19 @@ const buildFallbackGridForTable = ({ params, rows, tableWidth, tableWidthMeasure
|
|
|
27514
27443
|
columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
|
|
27515
27444
|
};
|
|
27516
27445
|
};
|
|
27517
|
-
const XML_NODE_NAME$
|
|
27446
|
+
const XML_NODE_NAME$f = "w:tbl";
|
|
27518
27447
|
const SD_NODE_NAME$c = "table";
|
|
27519
|
-
const encode$
|
|
27448
|
+
const encode$l = (params, encodedAttrs) => {
|
|
27520
27449
|
const { nodes } = params;
|
|
27521
27450
|
const node = nodes[0];
|
|
27522
27451
|
const tblPr = node.elements.find((el) => el.name === "w:tblPr");
|
|
27523
27452
|
if (tblPr) {
|
|
27524
|
-
const encodedProperties = translator$
|
|
27525
|
-
encodedAttrs["tableProperties"] = encodedProperties
|
|
27453
|
+
const encodedProperties = translator$v.encode({ ...params, nodes: [tblPr] });
|
|
27454
|
+
encodedAttrs["tableProperties"] = encodedProperties || {};
|
|
27526
27455
|
}
|
|
27527
27456
|
const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
|
|
27528
27457
|
if (tblGrid) {
|
|
27529
|
-
encodedAttrs["grid"] = translator$
|
|
27458
|
+
encodedAttrs["grid"] = translator$t.encode({ ...params, nodes: [tblGrid] }).attributes;
|
|
27530
27459
|
}
|
|
27531
27460
|
[
|
|
27532
27461
|
"tableStyleId",
|
|
@@ -27593,7 +27522,7 @@ const encode$k = (params, encodedAttrs) => {
|
|
|
27593
27522
|
}
|
|
27594
27523
|
const content = [];
|
|
27595
27524
|
rows.forEach((row) => {
|
|
27596
|
-
const result = translator$
|
|
27525
|
+
const result = translator$Z.encode({
|
|
27597
27526
|
...params,
|
|
27598
27527
|
nodes: [row],
|
|
27599
27528
|
extraParams: {
|
|
@@ -27612,13 +27541,13 @@ const encode$k = (params, encodedAttrs) => {
|
|
|
27612
27541
|
attrs: encodedAttrs
|
|
27613
27542
|
};
|
|
27614
27543
|
};
|
|
27615
|
-
const decode$
|
|
27544
|
+
const decode$n = (params, decodedAttrs) => {
|
|
27616
27545
|
params.node = preProcessVerticalMergeCells(params.node, params);
|
|
27617
27546
|
const { node } = params;
|
|
27618
27547
|
const elements = translateChildNodes(params);
|
|
27619
27548
|
const firstRow = node.content?.find((n) => n.type === "tableRow");
|
|
27620
27549
|
const properties = node.attrs.grid;
|
|
27621
|
-
const element = translator$
|
|
27550
|
+
const element = translator$t.decode({
|
|
27622
27551
|
...params,
|
|
27623
27552
|
node: { ...node, attrs: { ...node.attrs, grid: properties } },
|
|
27624
27553
|
extraParams: {
|
|
@@ -27628,7 +27557,7 @@ const decode$m = (params, decodedAttrs) => {
|
|
|
27628
27557
|
if (element) elements.unshift(element);
|
|
27629
27558
|
if (node.attrs?.tableProperties) {
|
|
27630
27559
|
const properties2 = { ...node.attrs.tableProperties };
|
|
27631
|
-
const element2 = translator$
|
|
27560
|
+
const element2 = translator$v.decode({
|
|
27632
27561
|
...params,
|
|
27633
27562
|
node: { ...node, attrs: { ...node.attrs, tableProperties: properties2 } }
|
|
27634
27563
|
});
|
|
@@ -27648,7 +27577,7 @@ function _processTableBorders(rawBorders) {
|
|
|
27648
27577
|
const color = attributes.color;
|
|
27649
27578
|
const size = attributes.size;
|
|
27650
27579
|
if (color && color !== "auto") attrs["color"] = color.startsWith("#") ? color : `#${color}`;
|
|
27651
|
-
if (size && size !== "auto") attrs["size"] =
|
|
27580
|
+
if (size && size !== "auto") attrs["size"] = eighthPointsToPixels(size);
|
|
27652
27581
|
const rowBorderNames = ["insideH", "insideV"];
|
|
27653
27582
|
if (rowBorderNames.includes(name)) rowBorders[name] = attrs;
|
|
27654
27583
|
borders[name] = attrs;
|
|
@@ -27694,7 +27623,7 @@ function _getReferencedTableStyles(tableStyleReference, params) {
|
|
|
27694
27623
|
if (baseTblPr && baseTblPr.elements) {
|
|
27695
27624
|
tblPr.elements.push(...baseTblPr.elements);
|
|
27696
27625
|
}
|
|
27697
|
-
const tableProperties = translator$
|
|
27626
|
+
const tableProperties = translator$v.encode({ ...params, nodes: [tblPr] });
|
|
27698
27627
|
const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
|
|
27699
27628
|
if (borders) stylesToReturn.borders = borders;
|
|
27700
27629
|
if (rowBorders) stylesToReturn.rowBorders = rowBorders;
|
|
@@ -27711,16 +27640,16 @@ function _getReferencedTableStyles(tableStyleReference, params) {
|
|
|
27711
27640
|
}
|
|
27712
27641
|
return stylesToReturn;
|
|
27713
27642
|
}
|
|
27714
|
-
const config$
|
|
27715
|
-
xmlName: XML_NODE_NAME$
|
|
27643
|
+
const config$e = {
|
|
27644
|
+
xmlName: XML_NODE_NAME$f,
|
|
27716
27645
|
sdNodeOrKeyName: SD_NODE_NAME$c,
|
|
27717
27646
|
type: NodeTranslator.translatorTypes.NODE,
|
|
27718
|
-
encode: encode$
|
|
27719
|
-
decode: decode$
|
|
27647
|
+
encode: encode$l,
|
|
27648
|
+
decode: decode$n,
|
|
27720
27649
|
attributes: []
|
|
27721
27650
|
};
|
|
27722
|
-
const translator$
|
|
27723
|
-
const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$
|
|
27651
|
+
const translator$s = NodeTranslator.from(config$e);
|
|
27652
|
+
const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$s);
|
|
27724
27653
|
function getReferencedTableStyles(tblStyleTag, docx) {
|
|
27725
27654
|
if (!tblStyleTag) return null;
|
|
27726
27655
|
const stylesToReturn = {};
|
|
@@ -27791,7 +27720,7 @@ function processTableBorders(borderElements) {
|
|
|
27791
27720
|
const color = attributes["w:color"];
|
|
27792
27721
|
const size = attributes["w:sz"];
|
|
27793
27722
|
if (color && color !== "auto") attrs["color"] = color.startsWith("#") ? color : `#${color}`;
|
|
27794
|
-
if (size && size !== "auto") attrs["size"] =
|
|
27723
|
+
if (size && size !== "auto") attrs["size"] = eighthPointsToPixels(size);
|
|
27795
27724
|
const rowBorderNames = ["insideH", "insideV"];
|
|
27796
27725
|
if (rowBorderNames.includes(borderName)) rowBorders[borderName] = attrs;
|
|
27797
27726
|
borders[borderName] = attrs;
|
|
@@ -27801,6 +27730,125 @@ function processTableBorders(borderElements) {
|
|
|
27801
27730
|
rowBorders
|
|
27802
27731
|
};
|
|
27803
27732
|
}
|
|
27733
|
+
const translator$r = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
|
|
27734
|
+
const translator$q = NodeTranslator.from(
|
|
27735
|
+
createSingleAttrPropertyHandler(
|
|
27736
|
+
"w:gridSpan",
|
|
27737
|
+
null,
|
|
27738
|
+
"w:val",
|
|
27739
|
+
(v2) => parseInteger(v2) ?? void 0,
|
|
27740
|
+
(v2) => integerToString(v2)
|
|
27741
|
+
)
|
|
27742
|
+
);
|
|
27743
|
+
const translator$p = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
|
|
27744
|
+
const translator$o = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
|
|
27745
|
+
const translator$n = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
|
|
27746
|
+
const propertyTranslators$2 = [
|
|
27747
|
+
translator$z,
|
|
27748
|
+
translator$B,
|
|
27749
|
+
translator$F,
|
|
27750
|
+
translator$L,
|
|
27751
|
+
translator$J,
|
|
27752
|
+
translator$D,
|
|
27753
|
+
translator$H,
|
|
27754
|
+
translator$G,
|
|
27755
|
+
translator$o,
|
|
27756
|
+
translator$n
|
|
27757
|
+
];
|
|
27758
|
+
const translator$m = NodeTranslator.from(
|
|
27759
|
+
createNestedPropertiesTranslator("w:tcBorders", "borders", propertyTranslators$2)
|
|
27760
|
+
);
|
|
27761
|
+
const translator$l = NodeTranslator.from(
|
|
27762
|
+
createSingleAttrPropertyHandler(
|
|
27763
|
+
"w:noWrap",
|
|
27764
|
+
null,
|
|
27765
|
+
"w:val",
|
|
27766
|
+
(v2) => parseBoolean(v2 ?? "true"),
|
|
27767
|
+
(v2) => booleanToString(v2)
|
|
27768
|
+
)
|
|
27769
|
+
);
|
|
27770
|
+
const propertyTranslators$1 = [
|
|
27771
|
+
translator$K,
|
|
27772
|
+
translator$I,
|
|
27773
|
+
translator$E,
|
|
27774
|
+
translator$C,
|
|
27775
|
+
translator$A,
|
|
27776
|
+
translator$y
|
|
27777
|
+
];
|
|
27778
|
+
const translator$k = NodeTranslator.from(
|
|
27779
|
+
createNestedPropertiesTranslator("w:tcMar", "cellMargins", propertyTranslators$1)
|
|
27780
|
+
);
|
|
27781
|
+
const translator$j = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
|
|
27782
|
+
const translator$i = NodeTranslator.from(
|
|
27783
|
+
createSingleAttrPropertyHandler(
|
|
27784
|
+
"w:tcFitText",
|
|
27785
|
+
null,
|
|
27786
|
+
"w:val",
|
|
27787
|
+
(v2) => parseBoolean(v2 ?? "true"),
|
|
27788
|
+
(v2) => booleanToString(v2)
|
|
27789
|
+
)
|
|
27790
|
+
);
|
|
27791
|
+
const translator$h = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
|
|
27792
|
+
const translator$g = NodeTranslator.from(
|
|
27793
|
+
createSingleAttrPropertyHandler(
|
|
27794
|
+
"w:hideMark",
|
|
27795
|
+
null,
|
|
27796
|
+
"w:val",
|
|
27797
|
+
(v2) => parseBoolean(v2 ?? "true"),
|
|
27798
|
+
(v2) => booleanToString(v2)
|
|
27799
|
+
)
|
|
27800
|
+
);
|
|
27801
|
+
const translator$f = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
|
|
27802
|
+
const XML_NODE_NAME$e = "w:headers";
|
|
27803
|
+
const SD_ATTR_KEY$2 = "headers";
|
|
27804
|
+
const encode$k = (params) => {
|
|
27805
|
+
const { nodes } = params;
|
|
27806
|
+
const node = nodes[0];
|
|
27807
|
+
const attributes = encodeProperties(node, { [translator$f.xmlName]: translator$f }, true);
|
|
27808
|
+
return {
|
|
27809
|
+
xmlName: XML_NODE_NAME$e,
|
|
27810
|
+
sdNodeOrKeyName: SD_ATTR_KEY$2,
|
|
27811
|
+
attributes
|
|
27812
|
+
};
|
|
27813
|
+
};
|
|
27814
|
+
const decode$m = (params) => {
|
|
27815
|
+
const { headers = [] } = params.node.attrs || {};
|
|
27816
|
+
const newNode = {
|
|
27817
|
+
name: XML_NODE_NAME$e,
|
|
27818
|
+
attributes: {},
|
|
27819
|
+
elements: headers.map(
|
|
27820
|
+
(header) => translator$f.decode({
|
|
27821
|
+
node: { type: "header", attrs: header }
|
|
27822
|
+
})
|
|
27823
|
+
)
|
|
27824
|
+
};
|
|
27825
|
+
return newNode;
|
|
27826
|
+
};
|
|
27827
|
+
const config$d = {
|
|
27828
|
+
xmlName: XML_NODE_NAME$e,
|
|
27829
|
+
sdNodeOrKeyName: SD_ATTR_KEY$2,
|
|
27830
|
+
encode: encode$k,
|
|
27831
|
+
decode: decode$m
|
|
27832
|
+
};
|
|
27833
|
+
const translator$e = NodeTranslator.from(config$d);
|
|
27834
|
+
const propertyTranslators = [
|
|
27835
|
+
translator$19,
|
|
27836
|
+
translator$r,
|
|
27837
|
+
translator$q,
|
|
27838
|
+
translator$p,
|
|
27839
|
+
translator$m,
|
|
27840
|
+
translator$X,
|
|
27841
|
+
translator$l,
|
|
27842
|
+
translator$k,
|
|
27843
|
+
translator$j,
|
|
27844
|
+
translator$i,
|
|
27845
|
+
translator$h,
|
|
27846
|
+
translator$g,
|
|
27847
|
+
translator$e
|
|
27848
|
+
];
|
|
27849
|
+
const translator$d = NodeTranslator.from(
|
|
27850
|
+
createNestedPropertiesTranslator("w:tcPr", "tableCellProperties", propertyTranslators)
|
|
27851
|
+
);
|
|
27804
27852
|
function handleTableCellNode({
|
|
27805
27853
|
params,
|
|
27806
27854
|
node,
|
|
@@ -27813,8 +27861,10 @@ function handleTableCellNode({
|
|
|
27813
27861
|
allColumnWidths = []
|
|
27814
27862
|
}) {
|
|
27815
27863
|
const { docx, nodeListHandler } = params;
|
|
27864
|
+
const attributes = {};
|
|
27816
27865
|
const tcPr = node.elements.find((el) => el.name === "w:tcPr");
|
|
27817
|
-
const
|
|
27866
|
+
const tableCellProperties = tcPr ? translator$d.encode({ ...params, nodes: [tcPr] }) ?? {} : {};
|
|
27867
|
+
attributes["tableCellProperties"] = tableCellProperties;
|
|
27818
27868
|
if (rowBorders?.insideH) {
|
|
27819
27869
|
rowBorders["bottom"] = rowBorders.insideH;
|
|
27820
27870
|
delete rowBorders.insideH;
|
|
@@ -27823,33 +27873,20 @@ function handleTableCellNode({
|
|
|
27823
27873
|
rowBorders["right"] = rowBorders.insideV;
|
|
27824
27874
|
delete rowBorders?.insideV;
|
|
27825
27875
|
}
|
|
27826
|
-
|
|
27827
|
-
const
|
|
27828
|
-
|
|
27829
|
-
|
|
27830
|
-
|
|
27876
|
+
if (rowBorders) attributes["borders"] = { ...rowBorders };
|
|
27877
|
+
const inlineBorders = processInlineCellBorders(tableCellProperties.borders, rowBorders);
|
|
27878
|
+
if (inlineBorders) attributes["borders"] = Object.assign(attributes["borders"] || {}, inlineBorders);
|
|
27879
|
+
const colspan = tableCellProperties.gridSpan;
|
|
27880
|
+
if (colspan && !isNaN(parseInt(colspan, 10))) attributes["colspan"] = parseInt(colspan, 10);
|
|
27881
|
+
let width = tableCellProperties.cellWidth?.value ? twipsToPixels(tableCellProperties.cellWidth?.value) : null;
|
|
27882
|
+
const widthType = tableCellProperties.cellWidth?.type;
|
|
27883
|
+
if (widthType) attributes["widthType"] = widthType;
|
|
27831
27884
|
if (!width && columnWidth) width = columnWidth;
|
|
27832
|
-
const vMerge = getTableCellMergeTag(node);
|
|
27833
|
-
const { attributes: vMergeAttrs } = vMerge || {};
|
|
27834
|
-
const backgroundColor = tcPr?.elements?.find((el) => el.name === "w:shd");
|
|
27835
|
-
const background = {
|
|
27836
|
-
color: backgroundColor?.attributes["w:fill"]
|
|
27837
|
-
};
|
|
27838
|
-
const colspanTag = tcPr?.elements?.find((el) => el.name === "w:gridSpan");
|
|
27839
|
-
const colspan = colspanTag?.attributes["w:val"];
|
|
27840
|
-
const marginTag = tcPr?.elements?.find((el) => el.name === "w:tcMar");
|
|
27841
|
-
const verticalAlignTag = tcPr?.elements?.find((el) => el.name === "w:vAlign");
|
|
27842
|
-
const verticalAlign = verticalAlignTag?.attributes["w:val"] || "top";
|
|
27843
|
-
const attributes = {};
|
|
27844
|
-
const referencedStyles = getReferencedTableStyles(styleTag, docx) || {};
|
|
27845
|
-
attributes.cellMargins = getTableCellMargins(marginTag, referencedStyles);
|
|
27846
|
-
const { fontSize, fonts = {} } = referencedStyles;
|
|
27847
|
-
const fontFamily = fonts["ascii"];
|
|
27848
27885
|
if (width) {
|
|
27849
27886
|
attributes["colwidth"] = [width];
|
|
27850
27887
|
attributes["widthUnit"] = "px";
|
|
27851
|
-
const defaultColWidths =
|
|
27852
|
-
const hasDefaultColWidths =
|
|
27888
|
+
const defaultColWidths = allColumnWidths;
|
|
27889
|
+
const hasDefaultColWidths = allColumnWidths && allColumnWidths.length > 0;
|
|
27853
27890
|
const colspanNum = parseInt(colspan || 1, 10);
|
|
27854
27891
|
if (colspanNum && colspanNum > 1 && hasDefaultColWidths) {
|
|
27855
27892
|
let colwidth = [];
|
|
@@ -27867,15 +27904,19 @@ function handleTableCellNode({
|
|
|
27867
27904
|
}
|
|
27868
27905
|
}
|
|
27869
27906
|
}
|
|
27870
|
-
|
|
27871
|
-
|
|
27872
|
-
|
|
27873
|
-
attributes["
|
|
27907
|
+
const background = {
|
|
27908
|
+
color: tableCellProperties.shading?.fill
|
|
27909
|
+
};
|
|
27910
|
+
if (background.color) attributes["background"] = background;
|
|
27911
|
+
const verticalAlign = tableCellProperties.vAlign;
|
|
27912
|
+
if (verticalAlign) attributes["verticalAlign"] = verticalAlign;
|
|
27913
|
+
const referencedStyles = getReferencedTableStyles(styleTag, docx) || { fontSize: null, fonts: {}, cellMargins: {} };
|
|
27914
|
+
attributes.cellMargins = getTableCellMargins(tableCellProperties.cellMargins, referencedStyles);
|
|
27915
|
+
const { fontSize, fonts = {} } = referencedStyles;
|
|
27916
|
+
const fontFamily = fonts["ascii"];
|
|
27874
27917
|
if (fontSize) attributes["fontSize"] = fontSize;
|
|
27875
|
-
if (fontFamily) attributes["fontFamily"] = fontFamily
|
|
27876
|
-
if (
|
|
27877
|
-
if (inlineBorders) attributes["borders"] = Object.assign(attributes["borders"] || {}, inlineBorders);
|
|
27878
|
-
if (vMergeAttrs && vMergeAttrs["w:val"] === "restart") {
|
|
27918
|
+
if (fontFamily) attributes["fontFamily"] = fontFamily;
|
|
27919
|
+
if (tableCellProperties.vMerge === "restart") {
|
|
27879
27920
|
const rows = table.elements.filter((el) => el.name === "w:tr");
|
|
27880
27921
|
const currentRowIndex = rows.findIndex((r) => r === row);
|
|
27881
27922
|
const remainingRows = rows.slice(currentRowIndex + 1);
|
|
@@ -27886,9 +27927,8 @@ function handleTableCellNode({
|
|
|
27886
27927
|
const firstCell = remainingRow.elements.findIndex((el) => el.name === "w:tc");
|
|
27887
27928
|
const cellAtIndex = remainingRow.elements[firstCell + cellIndex];
|
|
27888
27929
|
if (!cellAtIndex) break;
|
|
27889
|
-
const
|
|
27890
|
-
|
|
27891
|
-
if (!vMerge2 && !currentCellMergeAttrs || currentCellMergeAttrs && currentCellMergeAttrs["w:val"] === "restart") {
|
|
27930
|
+
const vMerge = getTableCellVMerge(cellAtIndex);
|
|
27931
|
+
if (!vMerge || vMerge === "restart") {
|
|
27892
27932
|
break;
|
|
27893
27933
|
}
|
|
27894
27934
|
rowspan++;
|
|
@@ -27908,69 +27948,52 @@ function handleTableCellNode({
|
|
|
27908
27948
|
}
|
|
27909
27949
|
const processInlineCellBorders = (borders, rowBorders) => {
|
|
27910
27950
|
if (!borders) return null;
|
|
27911
|
-
|
|
27912
|
-
|
|
27913
|
-
|
|
27914
|
-
|
|
27915
|
-
|
|
27916
|
-
|
|
27917
|
-
|
|
27918
|
-
|
|
27919
|
-
|
|
27920
|
-
|
|
27921
|
-
|
|
27922
|
-
const
|
|
27923
|
-
|
|
27924
|
-
|
|
27925
|
-
|
|
27926
|
-
|
|
27927
|
-
|
|
27928
|
-
|
|
27929
|
-
|
|
27930
|
-
|
|
27931
|
-
|
|
27932
|
-
|
|
27933
|
-
const border = Object.assign({}, rowBorders[direction] || {});
|
|
27934
|
-
if (!Object.keys(border)) return null;
|
|
27935
|
-
border["val"] = "none";
|
|
27936
|
-
return border;
|
|
27937
|
-
}
|
|
27938
|
-
return null;
|
|
27951
|
+
return ["bottom", "top", "left", "right"].reduce((acc, direction) => {
|
|
27952
|
+
const borderAttrs = borders[direction];
|
|
27953
|
+
const rowBorderAttrs = rowBorders[direction];
|
|
27954
|
+
if (borderAttrs && borderAttrs["val"] !== "nil") {
|
|
27955
|
+
const color = borderAttrs["color"];
|
|
27956
|
+
let size = borderAttrs["size"];
|
|
27957
|
+
if (size) size = eighthPointsToPixels(size);
|
|
27958
|
+
acc[direction] = { color, size, val: borderAttrs["val"] };
|
|
27959
|
+
return acc;
|
|
27960
|
+
}
|
|
27961
|
+
if (borderAttrs && borderAttrs["val"] === "nil") {
|
|
27962
|
+
const border = Object.assign({}, rowBorderAttrs || {});
|
|
27963
|
+
if (!Object.keys(border).length) {
|
|
27964
|
+
return acc;
|
|
27965
|
+
} else {
|
|
27966
|
+
border["val"] = "none";
|
|
27967
|
+
acc[direction] = border;
|
|
27968
|
+
return acc;
|
|
27969
|
+
}
|
|
27970
|
+
}
|
|
27971
|
+
return acc;
|
|
27972
|
+
}, {});
|
|
27939
27973
|
};
|
|
27940
|
-
const
|
|
27974
|
+
const getTableCellVMerge = (node) => {
|
|
27941
27975
|
const tcPr = node.elements.find((el) => el.name === "w:tcPr");
|
|
27942
27976
|
const vMerge = tcPr?.elements?.find((el) => el.name === "w:vMerge");
|
|
27943
|
-
return
|
|
27944
|
-
|
|
27945
|
-
|
|
27946
|
-
|
|
27947
|
-
const inlineMarginRightTag = marginTag?.elements?.find((el) => el.name === "w:right");
|
|
27948
|
-
const inlineMarginTopTag = marginTag?.elements?.find((el) => el.name === "w:top");
|
|
27949
|
-
const inlineMarginBottomTag = marginTag?.elements?.find((el) => el.name === "w:bottom");
|
|
27950
|
-
const inlineMarginLeftValue = inlineMarginLeftTag?.attributes["w:w"];
|
|
27951
|
-
const inlineMarginRightValue = inlineMarginRightTag?.attributes["w:w"];
|
|
27952
|
-
const inlineMarginTopValue = inlineMarginTopTag?.attributes["w:w"];
|
|
27953
|
-
const inlineMarginBottomValue = inlineMarginBottomTag?.attributes["w:w"];
|
|
27977
|
+
if (!vMerge) return null;
|
|
27978
|
+
return vMerge.attributes?.["w:val"] || "continue";
|
|
27979
|
+
};
|
|
27980
|
+
const getTableCellMargins = (inlineMargins, referencedStyles) => {
|
|
27954
27981
|
const { cellMargins = {} } = referencedStyles;
|
|
27955
|
-
|
|
27956
|
-
|
|
27957
|
-
|
|
27958
|
-
|
|
27959
|
-
|
|
27960
|
-
|
|
27961
|
-
|
|
27962
|
-
|
|
27963
|
-
if (styleValue
|
|
27964
|
-
|
|
27965
|
-
|
|
27966
|
-
|
|
27967
|
-
|
|
27968
|
-
|
|
27969
|
-
|
|
27970
|
-
top: twipsToPixels(resolveMargin(inlineMarginTopValue, marginTopStyle)),
|
|
27971
|
-
bottom: twipsToPixels(resolveMargin(inlineMarginBottomValue, marginBottomStyle))
|
|
27972
|
-
};
|
|
27973
|
-
return margins;
|
|
27982
|
+
return ["left", "right", "top", "bottom"].reduce((acc, direction) => {
|
|
27983
|
+
const key = `margin${direction.charAt(0).toUpperCase() + direction.slice(1)}`;
|
|
27984
|
+
const inlineValue = inlineMargins ? inlineMargins?.[key]?.value : null;
|
|
27985
|
+
const styleValue = cellMargins ? cellMargins[key] : null;
|
|
27986
|
+
if (inlineValue != null) {
|
|
27987
|
+
acc[direction] = twipsToPixels(inlineValue);
|
|
27988
|
+
} else if (styleValue == null) {
|
|
27989
|
+
acc[direction] = void 0;
|
|
27990
|
+
} else if (typeof styleValue === "object") {
|
|
27991
|
+
acc[direction] = twipsToPixels(styleValue.value);
|
|
27992
|
+
} else {
|
|
27993
|
+
acc[direction] = twipsToPixels(styleValue);
|
|
27994
|
+
}
|
|
27995
|
+
return acc;
|
|
27996
|
+
}, {});
|
|
27974
27997
|
};
|
|
27975
27998
|
function translateTableCell(params) {
|
|
27976
27999
|
const elements = translateChildNodes({
|
|
@@ -27985,102 +28008,86 @@ function translateTableCell(params) {
|
|
|
27985
28008
|
};
|
|
27986
28009
|
}
|
|
27987
28010
|
function generateTableCellProperties(node) {
|
|
27988
|
-
const
|
|
28011
|
+
const tableCellProperties = { ...node.attrs?.tableCellProperties || {} };
|
|
27989
28012
|
const { attrs } = node;
|
|
27990
|
-
const { colwidth = [], cellWidthType = "dxa",
|
|
28013
|
+
const { colwidth = [], cellWidthType = "dxa", widthUnit } = attrs;
|
|
27991
28014
|
const colwidthSum = colwidth.reduce((acc, curr) => acc + curr, 0);
|
|
27992
|
-
const
|
|
27993
|
-
|
|
27994
|
-
|
|
27995
|
-
|
|
27996
|
-
|
|
27997
|
-
}
|
|
27998
|
-
};
|
|
27999
|
-
elements.push(cellWidthElement);
|
|
28000
|
-
if (colspan) {
|
|
28001
|
-
const gridSpanElement = {
|
|
28002
|
-
name: "w:gridSpan",
|
|
28003
|
-
attributes: { "w:val": `${colspan}` }
|
|
28015
|
+
const propertiesWidthPixels = twipsToPixels(tableCellProperties.cellWidth?.value);
|
|
28016
|
+
if (propertiesWidthPixels !== colwidthSum) {
|
|
28017
|
+
tableCellProperties["cellWidth"] = {
|
|
28018
|
+
value: widthUnit === "px" ? pixelsToTwips(colwidthSum) : inchesToTwips(colwidthSum),
|
|
28019
|
+
type: cellWidthType
|
|
28004
28020
|
};
|
|
28005
|
-
elements.push(gridSpanElement);
|
|
28006
28021
|
}
|
|
28007
|
-
const {
|
|
28008
|
-
if (
|
|
28009
|
-
|
|
28010
|
-
|
|
28011
|
-
|
|
28012
|
-
|
|
28013
|
-
|
|
28022
|
+
const { colspan } = attrs;
|
|
28023
|
+
if (colspan > 1 && tableCellProperties.gridSpan !== colspan) {
|
|
28024
|
+
tableCellProperties["gridSpan"] = colspan;
|
|
28025
|
+
} else if (!colspan || tableCellProperties?.gridSpan === 1) {
|
|
28026
|
+
delete tableCellProperties.gridSpan;
|
|
28027
|
+
}
|
|
28028
|
+
const { background = {} } = attrs;
|
|
28029
|
+
if (background?.color && tableCellProperties.shading?.fill !== background?.color) {
|
|
28030
|
+
tableCellProperties["shading"] = { fill: background.color };
|
|
28031
|
+
} else if (!background?.color && tableCellProperties?.shading?.fill) {
|
|
28032
|
+
delete tableCellProperties.shading;
|
|
28014
28033
|
}
|
|
28015
28034
|
const { cellMargins } = attrs;
|
|
28016
28035
|
if (cellMargins) {
|
|
28017
|
-
|
|
28018
|
-
|
|
28019
|
-
|
|
28020
|
-
|
|
28021
|
-
|
|
28036
|
+
["left", "right", "top", "bottom"].forEach((side) => {
|
|
28037
|
+
const key = `margin${side.charAt(0).toUpperCase() + side.slice(1)}`;
|
|
28038
|
+
if (cellMargins[side] != null) {
|
|
28039
|
+
if (!tableCellProperties.cellMargins) tableCellProperties["cellMargins"] = {};
|
|
28040
|
+
let currentPropertyValuePixels = twipsToPixels(tableCellProperties.cellMargins?.[key]?.value);
|
|
28041
|
+
if (currentPropertyValuePixels !== cellMargins[side]) {
|
|
28042
|
+
tableCellProperties.cellMargins[key] = { value: pixelsToTwips(cellMargins[side]), type: "dxa" };
|
|
28043
|
+
}
|
|
28044
|
+
} else if (tableCellProperties?.cellMargins?.[key]) {
|
|
28045
|
+
delete tableCellProperties.cellMargins[key];
|
|
28046
|
+
}
|
|
28047
|
+
});
|
|
28022
28048
|
}
|
|
28023
28049
|
const { verticalAlign } = attrs;
|
|
28024
|
-
if (verticalAlign) {
|
|
28025
|
-
|
|
28026
|
-
|
|
28027
|
-
|
|
28028
|
-
|
|
28029
|
-
|
|
28030
|
-
|
|
28031
|
-
|
|
28032
|
-
const vMergeElement = {
|
|
28033
|
-
name: "w:vMerge",
|
|
28034
|
-
type: "element",
|
|
28035
|
-
attributes: { "w:val": "restart" }
|
|
28036
|
-
};
|
|
28037
|
-
elements.push(vMergeElement);
|
|
28050
|
+
if (verticalAlign && verticalAlign !== tableCellProperties.vAlign) {
|
|
28051
|
+
tableCellProperties["vAlign"] = verticalAlign;
|
|
28052
|
+
} else if (!verticalAlign && tableCellProperties?.vAlign) {
|
|
28053
|
+
delete tableCellProperties.vAlign;
|
|
28054
|
+
}
|
|
28055
|
+
const { rowspan } = attrs;
|
|
28056
|
+
if (rowspan && rowspan > 1 && tableCellProperties.vMerge !== "restart") {
|
|
28057
|
+
tableCellProperties["vMerge"] = "restart";
|
|
28038
28058
|
} else if (attrs.continueMerge) {
|
|
28039
|
-
|
|
28040
|
-
|
|
28041
|
-
|
|
28042
|
-
};
|
|
28043
|
-
elements.push(vMergeElement);
|
|
28059
|
+
tableCellProperties["vMerge"] = "continue";
|
|
28060
|
+
} else if (tableCellProperties?.vMerge) {
|
|
28061
|
+
delete tableCellProperties.vMerge;
|
|
28044
28062
|
}
|
|
28045
28063
|
const { borders = {} } = attrs;
|
|
28046
28064
|
if (!!borders && Object.keys(borders).length) {
|
|
28047
|
-
|
|
28048
|
-
|
|
28049
|
-
|
|
28050
|
-
|
|
28051
|
-
|
|
28052
|
-
|
|
28053
|
-
|
|
28054
|
-
|
|
28055
|
-
|
|
28065
|
+
["top", "bottom", "left", "right"].forEach((side) => {
|
|
28066
|
+
if (borders[side]) {
|
|
28067
|
+
let currentPropertyValue = tableCellProperties.borders?.[side];
|
|
28068
|
+
let currentPropertySizePixels = eighthPointsToPixels(currentPropertyValue?.size);
|
|
28069
|
+
let color = borders[side].color;
|
|
28070
|
+
if (borders[side].color && color === "#000000") {
|
|
28071
|
+
color = "auto";
|
|
28072
|
+
}
|
|
28073
|
+
if (currentPropertySizePixels !== borders[side].size || currentPropertyValue?.color !== color || borders[side].val !== currentPropertyValue?.val) {
|
|
28074
|
+
if (!tableCellProperties.borders) tableCellProperties["borders"] = {};
|
|
28075
|
+
tableCellProperties.borders[side] = {
|
|
28076
|
+
size: pixelsToEightPoints(borders[side].size || 0),
|
|
28077
|
+
color,
|
|
28078
|
+
space: borders[side].space || 0,
|
|
28079
|
+
val: borders[side].val || "single"
|
|
28056
28080
|
};
|
|
28057
28081
|
}
|
|
28058
|
-
|
|
28059
|
-
|
|
28060
|
-
|
|
28061
|
-
|
|
28062
|
-
|
|
28063
|
-
|
|
28064
|
-
"w:space": value.space || 0
|
|
28065
|
-
}
|
|
28066
|
-
};
|
|
28067
|
-
})
|
|
28068
|
-
};
|
|
28069
|
-
elements.push(cellBordersElement);
|
|
28082
|
+
} else if (tableCellProperties.borders?.[side]) {
|
|
28083
|
+
delete tableCellProperties.borders[side];
|
|
28084
|
+
}
|
|
28085
|
+
});
|
|
28086
|
+
} else if (tableCellProperties?.borders) {
|
|
28087
|
+
delete tableCellProperties.borders;
|
|
28070
28088
|
}
|
|
28071
|
-
|
|
28072
|
-
|
|
28073
|
-
elements
|
|
28074
|
-
};
|
|
28075
|
-
}
|
|
28076
|
-
function generateCellMargins(cellMargins) {
|
|
28077
|
-
const elements = [];
|
|
28078
|
-
const { top, right, bottom, left } = cellMargins;
|
|
28079
|
-
if (top != null) elements.push({ name: "w:top", attributes: { "w:w": pixelsToTwips(top) } });
|
|
28080
|
-
if (right != null) elements.push({ name: "w:right", attributes: { "w:w": pixelsToTwips(right) } });
|
|
28081
|
-
if (bottom != null) elements.push({ name: "w:bottom", attributes: { "w:w": pixelsToTwips(bottom) } });
|
|
28082
|
-
if (left != null) elements.push({ name: "w:left", attributes: { "w:w": pixelsToTwips(left) } });
|
|
28083
|
-
return elements;
|
|
28089
|
+
const result = translator$d.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
|
|
28090
|
+
return result;
|
|
28084
28091
|
}
|
|
28085
28092
|
const XML_NODE_NAME$d = "w:tc";
|
|
28086
28093
|
const SD_NODE_NAME$b = "tableCell";
|
|
@@ -31692,8 +31699,8 @@ const trackChangeNodeHandlerEntity = {
|
|
|
31692
31699
|
handlerName: "trackChangeNodeHandler",
|
|
31693
31700
|
handler: handleTrackChangeNode
|
|
31694
31701
|
};
|
|
31695
|
-
const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$
|
|
31696
|
-
const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$
|
|
31702
|
+
const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$1c);
|
|
31703
|
+
const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$1b);
|
|
31697
31704
|
function parseProperties(node) {
|
|
31698
31705
|
const marks = [];
|
|
31699
31706
|
const unknownMarks = [];
|
|
@@ -31785,7 +31792,7 @@ const handleParagraphNode = (params) => {
|
|
|
31785
31792
|
if (nodes.length === 0 || nodes[0].name !== "w:p") {
|
|
31786
31793
|
return { nodes: [], consumed: 0 };
|
|
31787
31794
|
}
|
|
31788
|
-
const schemaNode = translator$
|
|
31795
|
+
const schemaNode = translator$1o.encode(params);
|
|
31789
31796
|
const newNodes = schemaNode ? [schemaNode] : [];
|
|
31790
31797
|
return { nodes: newNodes, consumed: 1 };
|
|
31791
31798
|
};
|
|
@@ -31888,7 +31895,7 @@ const handler = (params) => {
|
|
|
31888
31895
|
if (nodes.length === 0 || nodes[0].name !== "w:br") {
|
|
31889
31896
|
return { nodes: [], consumed: 0 };
|
|
31890
31897
|
}
|
|
31891
|
-
const result = translator$
|
|
31898
|
+
const result = translator$1r.encode(params);
|
|
31892
31899
|
if (!result) return { nodes: [], consumed: 0 };
|
|
31893
31900
|
return {
|
|
31894
31901
|
nodes: [result],
|
|
@@ -32514,7 +32521,7 @@ const handleTabNode = (params) => {
|
|
|
32514
32521
|
if (!nodes.length || nodes[0].name !== "w:tab") {
|
|
32515
32522
|
return { nodes: [], consumed: 0 };
|
|
32516
32523
|
}
|
|
32517
|
-
const node = translator$
|
|
32524
|
+
const node = translator$1p.encode(params);
|
|
32518
32525
|
return { nodes: [node], consumed: 1 };
|
|
32519
32526
|
};
|
|
32520
32527
|
const tabNodeEntityHandler = {
|
|
@@ -32766,12 +32773,14 @@ const createDocumentJson = (docx, converter, editor) => {
|
|
|
32766
32773
|
const content = pruneIgnoredNodes(contentElements);
|
|
32767
32774
|
const comments = importCommentData({ docx, converter, editor });
|
|
32768
32775
|
const lists = {};
|
|
32776
|
+
const inlineDocumentFonts = [];
|
|
32769
32777
|
let parsedContent = nodeListHandler.handler({
|
|
32770
32778
|
nodes: content,
|
|
32771
32779
|
nodeListHandler,
|
|
32772
32780
|
docx,
|
|
32773
32781
|
converter,
|
|
32774
32782
|
editor,
|
|
32783
|
+
inlineDocumentFonts,
|
|
32775
32784
|
lists,
|
|
32776
32785
|
path: []
|
|
32777
32786
|
});
|
|
@@ -32794,6 +32803,7 @@ const createDocumentJson = (docx, converter, editor) => {
|
|
|
32794
32803
|
savedTagsToRestore: node,
|
|
32795
32804
|
pageStyles: getDocumentStyles(node, docx, converter, editor),
|
|
32796
32805
|
comments,
|
|
32806
|
+
inlineDocumentFonts,
|
|
32797
32807
|
linkedStyles: getStyleDefinitions(docx),
|
|
32798
32808
|
numbering: getNumberingDefinitions(docx)
|
|
32799
32809
|
};
|
|
@@ -32857,6 +32867,7 @@ const createNodeListHandler = (nodeHandlers) => {
|
|
|
32857
32867
|
filename,
|
|
32858
32868
|
parentStyleId,
|
|
32859
32869
|
lists,
|
|
32870
|
+
inlineDocumentFonts,
|
|
32860
32871
|
path = []
|
|
32861
32872
|
}) => {
|
|
32862
32873
|
if (!elements || !elements.length) return [];
|
|
@@ -32883,6 +32894,7 @@ const createNodeListHandler = (nodeHandlers) => {
|
|
|
32883
32894
|
filename,
|
|
32884
32895
|
parentStyleId,
|
|
32885
32896
|
lists,
|
|
32897
|
+
inlineDocumentFonts,
|
|
32886
32898
|
path
|
|
32887
32899
|
});
|
|
32888
32900
|
},
|
|
@@ -33570,21 +33582,21 @@ function exportSchemaToJson(params) {
|
|
|
33570
33582
|
doc: translateDocumentNode,
|
|
33571
33583
|
body: translateBodyNode,
|
|
33572
33584
|
heading: translateHeadingNode,
|
|
33573
|
-
paragraph: translator$
|
|
33574
|
-
run: translator$
|
|
33585
|
+
paragraph: translator$1o,
|
|
33586
|
+
run: translator$1b,
|
|
33575
33587
|
text: translateTextNode,
|
|
33576
33588
|
bulletList: translateList,
|
|
33577
33589
|
orderedList: translateList,
|
|
33578
|
-
lineBreak: translator$
|
|
33579
|
-
table: translator$
|
|
33580
|
-
tableRow: translator$
|
|
33590
|
+
lineBreak: translator$1r,
|
|
33591
|
+
table: translator$s,
|
|
33592
|
+
tableRow: translator$Z,
|
|
33581
33593
|
tableCell: translator$c,
|
|
33582
33594
|
bookmarkStart: translator$7,
|
|
33583
33595
|
bookmarkEnd: translator$6,
|
|
33584
33596
|
fieldAnnotation: translator$8,
|
|
33585
|
-
tab: translator$
|
|
33597
|
+
tab: translator$1p,
|
|
33586
33598
|
image: translator$9,
|
|
33587
|
-
hardBreak: translator$
|
|
33599
|
+
hardBreak: translator$1r,
|
|
33588
33600
|
commentRangeStart: commentRangeStartTranslator,
|
|
33589
33601
|
commentRangeEnd: commentRangeEndTranslator,
|
|
33590
33602
|
commentReference: () => null,
|
|
@@ -33945,7 +33957,7 @@ function translateTextNode(params) {
|
|
|
33945
33957
|
}
|
|
33946
33958
|
const isLinkNode = node.marks?.some((m2) => m2.type === "link");
|
|
33947
33959
|
if (isLinkNode && !extraParams?.linkProcessed) {
|
|
33948
|
-
return translator$
|
|
33960
|
+
return translator$1c.decode(params);
|
|
33949
33961
|
}
|
|
33950
33962
|
const { text, marks = [] } = node;
|
|
33951
33963
|
return getTextNodeForExport(text, marks, params);
|
|
@@ -34205,7 +34217,7 @@ function translateMark(mark) {
|
|
|
34205
34217
|
markElement.type = "element";
|
|
34206
34218
|
break;
|
|
34207
34219
|
case "underline": {
|
|
34208
|
-
const translated = translator$
|
|
34220
|
+
const translated = translator$1l.decode({
|
|
34209
34221
|
node: {
|
|
34210
34222
|
attrs: {
|
|
34211
34223
|
underlineType: attrs.underlineType ?? attrs.underline ?? null,
|
|
@@ -34269,7 +34281,7 @@ function translateMark(mark) {
|
|
|
34269
34281
|
break;
|
|
34270
34282
|
case "highlight": {
|
|
34271
34283
|
const highlightValue = attrs.color ?? attrs.highlight ?? null;
|
|
34272
|
-
const translated = translator$
|
|
34284
|
+
const translated = translator$1q.decode({ node: { attrs: { highlight: highlightValue } } });
|
|
34273
34285
|
return translated || {};
|
|
34274
34286
|
}
|
|
34275
34287
|
case "link":
|
|
@@ -34648,6 +34660,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
34648
34660
|
this.fonts = params?.fonts || {};
|
|
34649
34661
|
this.addedMedia = {};
|
|
34650
34662
|
this.comments = [];
|
|
34663
|
+
this.inlineDocumentFonts = [];
|
|
34651
34664
|
this.docHiglightColors = /* @__PURE__ */ new Set([]);
|
|
34652
34665
|
this.xml = params?.xml;
|
|
34653
34666
|
this.declaration = null;
|
|
@@ -34934,6 +34947,23 @@ const _SuperConverter = class _SuperConverter {
|
|
|
34934
34947
|
return result;
|
|
34935
34948
|
}
|
|
34936
34949
|
getDocumentFonts() {
|
|
34950
|
+
const inlineDocumentFonts = [...new Set(this.inlineDocumentFonts || [])];
|
|
34951
|
+
const fontTable = this.convertedXml["word/fontTable.xml"];
|
|
34952
|
+
if (!fontTable) {
|
|
34953
|
+
return inlineDocumentFonts;
|
|
34954
|
+
}
|
|
34955
|
+
const wFonts = fontTable.elements?.find((element) => element.name === "w:fonts");
|
|
34956
|
+
if (!wFonts) {
|
|
34957
|
+
return inlineDocumentFonts;
|
|
34958
|
+
}
|
|
34959
|
+
if (!wFonts.elements) {
|
|
34960
|
+
return inlineDocumentFonts;
|
|
34961
|
+
}
|
|
34962
|
+
const fontsInFontTable = wFonts.elements.filter((element) => element.name === "w:font").map((element) => element.attributes["w:name"]);
|
|
34963
|
+
const allFonts = [...inlineDocumentFonts, ...fontsInFontTable];
|
|
34964
|
+
return [...new Set(allFonts)];
|
|
34965
|
+
}
|
|
34966
|
+
getFontFaceImportString() {
|
|
34937
34967
|
const fontTable = this.convertedXml["word/fontTable.xml"];
|
|
34938
34968
|
if (!fontTable || !Object.keys(this.fonts).length) return;
|
|
34939
34969
|
const fonts = fontTable.elements.find((el) => el.name === "w:fonts");
|
|
@@ -34947,6 +34977,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
34947
34977
|
const rels = this.convertedXml["word/_rels/fontTable.xml.rels"];
|
|
34948
34978
|
const relationships = rels?.elements.find((el) => el.name === "Relationships") || {};
|
|
34949
34979
|
const { elements } = relationships;
|
|
34980
|
+
const fontsImported = [];
|
|
34950
34981
|
let styleString = "";
|
|
34951
34982
|
for (const font of fontsToInclude) {
|
|
34952
34983
|
const filePath = elements.find((el) => el.attributes.Id === font.attributes["r:id"])?.attributes?.Target;
|
|
@@ -34963,6 +34994,9 @@ const _SuperConverter = class _SuperConverter {
|
|
|
34963
34994
|
const isItalic = font.name.includes("Italic");
|
|
34964
34995
|
const isLight = font.name.includes("Light");
|
|
34965
34996
|
const fontWeight = isNormal ? "normal" : isBold ? "bold" : isLight ? "200" : "normal";
|
|
34997
|
+
if (!fontsImported.includes(font.fontFamily)) {
|
|
34998
|
+
fontsImported.push(font.fontFamily);
|
|
34999
|
+
}
|
|
34966
35000
|
styleString += `
|
|
34967
35001
|
@font-face {
|
|
34968
35002
|
font-style: ${isItalic ? "italic" : "normal"};
|
|
@@ -34973,7 +35007,10 @@ const _SuperConverter = class _SuperConverter {
|
|
|
34973
35007
|
}
|
|
34974
35008
|
`;
|
|
34975
35009
|
}
|
|
34976
|
-
return
|
|
35010
|
+
return {
|
|
35011
|
+
styleString,
|
|
35012
|
+
fontsImported
|
|
35013
|
+
};
|
|
34977
35014
|
}
|
|
34978
35015
|
getDocumentInternalId() {
|
|
34979
35016
|
const settingsLocation = "word/settings.xml";
|
|
@@ -35028,6 +35065,7 @@ const _SuperConverter = class _SuperConverter {
|
|
|
35028
35065
|
this.numbering = result.numbering;
|
|
35029
35066
|
this.comments = result.comments;
|
|
35030
35067
|
this.linkedStyles = result.linkedStyles;
|
|
35068
|
+
this.inlineDocumentFonts = result.inlineDocumentFonts;
|
|
35031
35069
|
return result.pmDoc;
|
|
35032
35070
|
} else {
|
|
35033
35071
|
return null;
|
|
@@ -35403,7 +35441,7 @@ export {
|
|
|
35403
35441
|
objectIncludes as Z,
|
|
35404
35442
|
AddMarkStep as _,
|
|
35405
35443
|
Plugin as a,
|
|
35406
|
-
translator$
|
|
35444
|
+
translator$10 as a$,
|
|
35407
35445
|
twipsToLines as a0,
|
|
35408
35446
|
pixelsToTwips as a1,
|
|
35409
35447
|
helpers as a2,
|
|
@@ -35421,26 +35459,26 @@ export {
|
|
|
35421
35459
|
handleClipboardPaste as aE,
|
|
35422
35460
|
getFileObject as aF,
|
|
35423
35461
|
runPropertyTranslators as aG,
|
|
35424
|
-
|
|
35425
|
-
|
|
35426
|
-
translator$
|
|
35427
|
-
translator$
|
|
35428
|
-
translator$
|
|
35429
|
-
translator$
|
|
35430
|
-
translator$
|
|
35431
|
-
translator$
|
|
35432
|
-
translator$
|
|
35433
|
-
translator$
|
|
35434
|
-
translator$
|
|
35435
|
-
translator$
|
|
35436
|
-
translator$
|
|
35437
|
-
translator$
|
|
35438
|
-
translator$
|
|
35439
|
-
|
|
35440
|
-
|
|
35441
|
-
translator$
|
|
35442
|
-
translator$
|
|
35443
|
-
translator
|
|
35462
|
+
translator$d as aH,
|
|
35463
|
+
translator$k as aI,
|
|
35464
|
+
translator$m as aJ,
|
|
35465
|
+
translator$e as aK,
|
|
35466
|
+
translator$f as aL,
|
|
35467
|
+
translator$n as aM,
|
|
35468
|
+
translator$o as aN,
|
|
35469
|
+
translator$j as aO,
|
|
35470
|
+
translator$g as aP,
|
|
35471
|
+
translator$r as aQ,
|
|
35472
|
+
translator$i as aR,
|
|
35473
|
+
translator$l as aS,
|
|
35474
|
+
translator$h as aT,
|
|
35475
|
+
translator$q as aU,
|
|
35476
|
+
translator$p as aV,
|
|
35477
|
+
commentRangeEndTranslator as aW,
|
|
35478
|
+
commentRangeStartTranslator as aX,
|
|
35479
|
+
translator$a as aY,
|
|
35480
|
+
translator$b as aZ,
|
|
35481
|
+
translator$$ as a_,
|
|
35444
35482
|
hasSomeParentWithClass as aa,
|
|
35445
35483
|
isActive as ab,
|
|
35446
35484
|
unflattenListsInHtml as ac,
|
|
@@ -35468,55 +35506,70 @@ export {
|
|
|
35468
35506
|
getDefaultExportFromCjs$2 as ay,
|
|
35469
35507
|
getContentTypesFromXml as az,
|
|
35470
35508
|
Slice as b,
|
|
35471
|
-
|
|
35472
|
-
translator$
|
|
35473
|
-
translator$
|
|
35474
|
-
translator$
|
|
35475
|
-
translator$
|
|
35476
|
-
translator$
|
|
35477
|
-
translator$
|
|
35478
|
-
translator$
|
|
35479
|
-
translator$
|
|
35480
|
-
translator$
|
|
35481
|
-
translator$
|
|
35482
|
-
translator$
|
|
35483
|
-
translator$
|
|
35484
|
-
translator$
|
|
35485
|
-
translator$
|
|
35486
|
-
translator$
|
|
35487
|
-
translator$
|
|
35488
|
-
translator$
|
|
35489
|
-
translator$
|
|
35490
|
-
translator$
|
|
35491
|
-
translator$
|
|
35492
|
-
translator$
|
|
35493
|
-
|
|
35494
|
-
translator$
|
|
35495
|
-
translator$
|
|
35496
|
-
translator$
|
|
35497
|
-
translator$
|
|
35498
|
-
translator$
|
|
35499
|
-
translator$
|
|
35500
|
-
translator$
|
|
35501
|
-
translator$
|
|
35502
|
-
translator$
|
|
35509
|
+
_sfc_main as b$,
|
|
35510
|
+
translator$1l as b0,
|
|
35511
|
+
translator$_ as b1,
|
|
35512
|
+
translator$11 as b2,
|
|
35513
|
+
translator$Z as b3,
|
|
35514
|
+
translator$z as b4,
|
|
35515
|
+
translator$c as b5,
|
|
35516
|
+
translator$M as b6,
|
|
35517
|
+
translator$N as b7,
|
|
35518
|
+
translator$O as b8,
|
|
35519
|
+
translator$P as b9,
|
|
35520
|
+
translator$1o as bA,
|
|
35521
|
+
translator$F as bB,
|
|
35522
|
+
translator$14 as bC,
|
|
35523
|
+
translator$G as bD,
|
|
35524
|
+
translator$H as bE,
|
|
35525
|
+
translator$1m as bF,
|
|
35526
|
+
translator$1c as bG,
|
|
35527
|
+
translator$1q as bH,
|
|
35528
|
+
translator$15 as bI,
|
|
35529
|
+
translator$u as bJ,
|
|
35530
|
+
translator$16 as bK,
|
|
35531
|
+
translator$17 as bL,
|
|
35532
|
+
translator$J as bM,
|
|
35533
|
+
translator$9 as bN,
|
|
35534
|
+
translator$18 as bO,
|
|
35535
|
+
translator$1j as bP,
|
|
35536
|
+
translator$19 as bQ,
|
|
35537
|
+
translator$1a as bR,
|
|
35538
|
+
translator$1r as bS,
|
|
35539
|
+
translator$L as bT,
|
|
35540
|
+
translator$7 as bU,
|
|
35541
|
+
translator$6 as bV,
|
|
35542
|
+
translator$Y as bW,
|
|
35543
|
+
translator$1n as bX,
|
|
35544
|
+
translator$4 as bY,
|
|
35545
|
+
translator$5 as bZ,
|
|
35546
|
+
translator$1 as b_,
|
|
35547
|
+
translator$Q as ba,
|
|
35548
|
+
translator$v as bb,
|
|
35549
|
+
translator$R as bc,
|
|
35550
|
+
translator$S as bd,
|
|
35551
|
+
translator$T as be,
|
|
35552
|
+
translator$U as bf,
|
|
35553
|
+
translator$12 as bg,
|
|
35554
|
+
translator$t as bh,
|
|
35555
|
+
translator$V as bi,
|
|
35503
35556
|
translator$13 as bj,
|
|
35504
|
-
translator$
|
|
35505
|
-
translator$
|
|
35506
|
-
translator$
|
|
35507
|
-
translator$
|
|
35508
|
-
translator$
|
|
35509
|
-
translator$
|
|
35510
|
-
translator$
|
|
35511
|
-
translator$
|
|
35512
|
-
translator$
|
|
35513
|
-
translator$
|
|
35514
|
-
translator$
|
|
35515
|
-
translator$
|
|
35516
|
-
translator$
|
|
35517
|
-
translator$
|
|
35518
|
-
translator$
|
|
35519
|
-
translator$
|
|
35557
|
+
translator$w as bk,
|
|
35558
|
+
translator$W as bl,
|
|
35559
|
+
translator$x as bm,
|
|
35560
|
+
translator$s as bn,
|
|
35561
|
+
translator$1p as bo,
|
|
35562
|
+
translator$1f as bp,
|
|
35563
|
+
translator$1g as bq,
|
|
35564
|
+
translator$1k as br,
|
|
35565
|
+
translator$B as bs,
|
|
35566
|
+
translator$X as bt,
|
|
35567
|
+
translator$8 as bu,
|
|
35568
|
+
translator$D as bv,
|
|
35569
|
+
translator$1h as bw,
|
|
35570
|
+
translator$1d as bx,
|
|
35571
|
+
translator$1i as by,
|
|
35572
|
+
translator$1b as bz,
|
|
35520
35573
|
DOMParser$1 as c,
|
|
35521
35574
|
Mark as d,
|
|
35522
35575
|
dropPoint as e,
|