@harbour-enterprises/superdoc 0.28.0-next.3 → 0.28.0-next.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{PdfViewer-CZjW8f3f.cjs → PdfViewer-DfV9m2w-.cjs} +1 -1
- package/dist/chunks/{PdfViewer-DD5F97cu.es.js → PdfViewer-XosZYIXN.es.js} +1 -1
- package/dist/chunks/{index-DykhO4QQ.es.js → index-C-bRwL21.es.js} +2 -2
- package/dist/chunks/{index-BnppcMmx.cjs → index-D6Of6iAY.cjs} +2 -2
- package/dist/chunks/{super-editor.es-DgZmzGBh.cjs → super-editor.es-CcOevWta.cjs} +890 -869
- package/dist/chunks/{super-editor.es-DYmxXX-J.es.js → super-editor.es-DIXtx-tf.es.js} +890 -869
- package/dist/core/types/index.d.ts +1 -1
- package/dist/core/types/index.d.ts.map +1 -1
- package/dist/stores/comments-store.d.ts +1 -1
- package/dist/super-editor/ai-writer.es.js +2 -2
- package/dist/super-editor/chunks/{converter-CSVDRdnO.js → converter-wp7RjeT9.js} +867 -843
- package/dist/super-editor/chunks/{docx-zipper-rJLEcjUK.js → docx-zipper-CcShJNvj.js} +1 -1
- package/dist/super-editor/chunks/{editor-CCcFa6pi.js → editor-BRaGPAFY.js} +23 -20
- package/dist/super-editor/chunks/{toolbar-BJMZP9uq.js → toolbar-CJn7VKcT.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 +2 -1
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/docxImporter.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/types/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/t/index.d.ts +1 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/t/t-translator.d.ts +7 -0
- package/dist/super-editor/super-editor/src/core/super-converter/v3/node-translator/node-translator.d.ts +2 -1
- package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts +1 -1
- package/dist/super-editor/super-editor.es.js +6 -6
- 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 +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +890 -869
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -16601,9 +16601,6 @@ const COMMENTS_XML_DEFINITIONS = {
|
|
|
16601
16601
|
DOCUMENT_RELS_XML_DEF,
|
|
16602
16602
|
CONTENT_TYPES
|
|
16603
16603
|
};
|
|
16604
|
-
const TrackInsertMarkName = "trackInsert";
|
|
16605
|
-
const TrackDeleteMarkName = "trackDelete";
|
|
16606
|
-
const TrackFormatMarkName = "trackFormat";
|
|
16607
16604
|
const carbonCopy = (obj) => {
|
|
16608
16605
|
if (!obj) return void 0;
|
|
16609
16606
|
try {
|
|
@@ -24649,37 +24646,37 @@ const _NodeTranslator = class _NodeTranslator2 {
|
|
|
24649
24646
|
};
|
|
24650
24647
|
__publicField$2(_NodeTranslator, "translatorTypes", TranslatorTypes);
|
|
24651
24648
|
let NodeTranslator = _NodeTranslator;
|
|
24652
|
-
const encode$
|
|
24649
|
+
const encode$1c = (attributes) => {
|
|
24653
24650
|
return attributes["w:type"];
|
|
24654
24651
|
};
|
|
24655
|
-
const decode$
|
|
24652
|
+
const decode$14 = (attrs) => {
|
|
24656
24653
|
const { lineBreakType } = attrs;
|
|
24657
24654
|
return lineBreakType;
|
|
24658
24655
|
};
|
|
24659
24656
|
const attrConfig$G = Object.freeze({
|
|
24660
24657
|
xmlName: "w:type",
|
|
24661
24658
|
sdName: "lineBreakType",
|
|
24662
|
-
encode: encode$
|
|
24663
|
-
decode: decode$
|
|
24659
|
+
encode: encode$1c,
|
|
24660
|
+
decode: decode$14
|
|
24664
24661
|
});
|
|
24665
|
-
const encode$
|
|
24662
|
+
const encode$1b = (attributes) => {
|
|
24666
24663
|
const xmlAttrValue = attributes["w:clear"];
|
|
24667
24664
|
return xmlAttrValue;
|
|
24668
24665
|
};
|
|
24669
|
-
const decode$
|
|
24666
|
+
const decode$13 = (attrs) => {
|
|
24670
24667
|
const { clear } = attrs;
|
|
24671
24668
|
return clear;
|
|
24672
24669
|
};
|
|
24673
24670
|
const attrConfig$F = Object.freeze({
|
|
24674
24671
|
xmlName: "w:clear",
|
|
24675
24672
|
sdName: "clear",
|
|
24676
|
-
encode: encode$
|
|
24677
|
-
decode: decode$
|
|
24673
|
+
encode: encode$1b,
|
|
24674
|
+
decode: decode$13
|
|
24678
24675
|
});
|
|
24679
|
-
const validXmlAttributes$
|
|
24680
|
-
const XML_NODE_NAME$
|
|
24681
|
-
const SD_NODE_NAME$
|
|
24682
|
-
const encode$
|
|
24676
|
+
const validXmlAttributes$q = [attrConfig$G, attrConfig$F];
|
|
24677
|
+
const XML_NODE_NAME$z = "w:br";
|
|
24678
|
+
const SD_NODE_NAME$i = "lineBreak";
|
|
24679
|
+
const encode$1a = (_2, encodedAttrs) => {
|
|
24683
24680
|
const isPageBreak = encodedAttrs?.lineBreakType === "page";
|
|
24684
24681
|
const translated = {
|
|
24685
24682
|
type: isPageBreak ? "hardBreak" : "lineBreak"
|
|
@@ -24689,7 +24686,7 @@ const encode$19 = (_2, encodedAttrs) => {
|
|
|
24689
24686
|
}
|
|
24690
24687
|
return translated;
|
|
24691
24688
|
};
|
|
24692
|
-
const decode$
|
|
24689
|
+
const decode$12 = (params2, decodedAttrs) => {
|
|
24693
24690
|
const { node } = params2;
|
|
24694
24691
|
if (!node) return;
|
|
24695
24692
|
const wBreak = { name: "w:br" };
|
|
@@ -24706,39 +24703,39 @@ const decode$11 = (params2, decodedAttrs) => {
|
|
|
24706
24703
|
};
|
|
24707
24704
|
return translated;
|
|
24708
24705
|
};
|
|
24709
|
-
const config$
|
|
24710
|
-
xmlName: XML_NODE_NAME$
|
|
24711
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
24706
|
+
const config$y = {
|
|
24707
|
+
xmlName: XML_NODE_NAME$z,
|
|
24708
|
+
sdNodeOrKeyName: SD_NODE_NAME$i,
|
|
24712
24709
|
type: NodeTranslator.translatorTypes.NODE,
|
|
24713
|
-
encode: encode$
|
|
24714
|
-
decode: decode$
|
|
24715
|
-
attributes: validXmlAttributes$
|
|
24710
|
+
encode: encode$1a,
|
|
24711
|
+
decode: decode$12,
|
|
24712
|
+
attributes: validXmlAttributes$q
|
|
24716
24713
|
};
|
|
24717
|
-
const translator$
|
|
24718
|
-
const encode$
|
|
24719
|
-
const decode$
|
|
24714
|
+
const translator$1s = NodeTranslator.from(config$y);
|
|
24715
|
+
const encode$19 = (attributes) => attributes?.["w:val"];
|
|
24716
|
+
const decode$11 = (attrs) => attrs?.highlight;
|
|
24720
24717
|
const attrConfig$E = Object.freeze({
|
|
24721
24718
|
xmlName: "w:val",
|
|
24722
24719
|
sdName: "highlight",
|
|
24723
|
-
encode: encode$
|
|
24724
|
-
decode: decode$
|
|
24720
|
+
encode: encode$19,
|
|
24721
|
+
decode: decode$11
|
|
24725
24722
|
});
|
|
24726
|
-
const validXmlAttributes$
|
|
24727
|
-
const XML_NODE_NAME$
|
|
24723
|
+
const validXmlAttributes$p = [attrConfig$E];
|
|
24724
|
+
const XML_NODE_NAME$y = "w:highlight";
|
|
24728
24725
|
const SD_ATTR_KEY$f = "highlight";
|
|
24729
24726
|
const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
|
|
24730
|
-
const encode$
|
|
24727
|
+
const encode$18 = (params2, encodedAttrs = {}) => {
|
|
24731
24728
|
const { nodes } = params2;
|
|
24732
24729
|
const node = nodes?.[0];
|
|
24733
24730
|
const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
|
|
24734
24731
|
return {
|
|
24735
24732
|
type: "attr",
|
|
24736
|
-
xmlName: XML_NODE_NAME$
|
|
24733
|
+
xmlName: XML_NODE_NAME$y,
|
|
24737
24734
|
sdNodeOrKeyName: SD_ATTR_KEY$f,
|
|
24738
24735
|
attributes: { "w:val": value ?? null }
|
|
24739
24736
|
};
|
|
24740
24737
|
};
|
|
24741
|
-
const decode
|
|
24738
|
+
const decode$10 = (params2) => {
|
|
24742
24739
|
const attrs = params2?.node?.attrs || {};
|
|
24743
24740
|
const highlightValue = attrs.highlight ?? attrs.color ?? null;
|
|
24744
24741
|
if (!highlightValue) return void 0;
|
|
@@ -24746,14 +24743,14 @@ const decode$$ = (params2) => {
|
|
|
24746
24743
|
if (!normalizedValue) return void 0;
|
|
24747
24744
|
if (DISABLED_TOKENS.has(normalizedValue)) {
|
|
24748
24745
|
return {
|
|
24749
|
-
name: XML_NODE_NAME$
|
|
24746
|
+
name: XML_NODE_NAME$y,
|
|
24750
24747
|
attributes: { "w:val": "none" }
|
|
24751
24748
|
};
|
|
24752
24749
|
}
|
|
24753
24750
|
const keyword = getDocxHighlightKeywordFromHex(highlightValue);
|
|
24754
24751
|
if (keyword) {
|
|
24755
24752
|
return {
|
|
24756
|
-
name: XML_NODE_NAME$
|
|
24753
|
+
name: XML_NODE_NAME$y,
|
|
24757
24754
|
attributes: { "w:val": keyword }
|
|
24758
24755
|
};
|
|
24759
24756
|
}
|
|
@@ -24768,63 +24765,63 @@ const decode$$ = (params2) => {
|
|
|
24768
24765
|
}
|
|
24769
24766
|
};
|
|
24770
24767
|
};
|
|
24771
|
-
const config$
|
|
24772
|
-
xmlName: XML_NODE_NAME$
|
|
24768
|
+
const config$x = {
|
|
24769
|
+
xmlName: XML_NODE_NAME$y,
|
|
24773
24770
|
sdNodeOrKeyName: SD_ATTR_KEY$f,
|
|
24774
24771
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
24775
|
-
encode: encode$
|
|
24776
|
-
decode: decode
|
|
24777
|
-
attributes: validXmlAttributes$
|
|
24772
|
+
encode: encode$18,
|
|
24773
|
+
decode: decode$10,
|
|
24774
|
+
attributes: validXmlAttributes$p
|
|
24778
24775
|
};
|
|
24779
|
-
const translator$
|
|
24780
|
-
const encode$
|
|
24776
|
+
const translator$1r = NodeTranslator.from(config$x);
|
|
24777
|
+
const encode$17 = (attributes) => {
|
|
24781
24778
|
return attributes["w:val"];
|
|
24782
24779
|
};
|
|
24783
|
-
const decode
|
|
24780
|
+
const decode$$ = (attrs) => {
|
|
24784
24781
|
const { tabSize } = attrs || {};
|
|
24785
24782
|
return tabSize;
|
|
24786
24783
|
};
|
|
24787
24784
|
const attrConfig$D = Object.freeze({
|
|
24788
24785
|
xmlName: "w:val",
|
|
24789
24786
|
sdName: "tabSize",
|
|
24790
|
-
encode: encode$
|
|
24791
|
-
decode: decode
|
|
24787
|
+
encode: encode$17,
|
|
24788
|
+
decode: decode$$
|
|
24792
24789
|
});
|
|
24793
|
-
const encode$
|
|
24790
|
+
const encode$16 = (attributes) => {
|
|
24794
24791
|
return attributes["w:leader"];
|
|
24795
24792
|
};
|
|
24796
|
-
const decode$
|
|
24793
|
+
const decode$_ = (attrs) => {
|
|
24797
24794
|
const { leader } = attrs || {};
|
|
24798
24795
|
return leader;
|
|
24799
24796
|
};
|
|
24800
24797
|
const attrConfig$C = Object.freeze({
|
|
24801
24798
|
xmlName: "w:leader",
|
|
24802
24799
|
sdName: "leader",
|
|
24803
|
-
encode: encode$
|
|
24804
|
-
decode: decode$
|
|
24800
|
+
encode: encode$16,
|
|
24801
|
+
decode: decode$_
|
|
24805
24802
|
});
|
|
24806
|
-
const encode$
|
|
24803
|
+
const encode$15 = (attributes) => {
|
|
24807
24804
|
return attributes["w:pos"];
|
|
24808
24805
|
};
|
|
24809
|
-
const decode$
|
|
24806
|
+
const decode$Z = (attrs) => {
|
|
24810
24807
|
const { pos } = attrs || {};
|
|
24811
24808
|
return pos;
|
|
24812
24809
|
};
|
|
24813
24810
|
const attrConfig$B = Object.freeze({
|
|
24814
24811
|
xmlName: "w:pos",
|
|
24815
24812
|
sdName: "pos",
|
|
24816
|
-
encode: encode$
|
|
24817
|
-
decode: decode$
|
|
24813
|
+
encode: encode$15,
|
|
24814
|
+
decode: decode$Z
|
|
24818
24815
|
});
|
|
24819
|
-
const validXmlAttributes$
|
|
24820
|
-
const XML_NODE_NAME$
|
|
24821
|
-
const SD_NODE_NAME$
|
|
24822
|
-
const encode$
|
|
24816
|
+
const validXmlAttributes$o = [attrConfig$D, attrConfig$B, attrConfig$C];
|
|
24817
|
+
const XML_NODE_NAME$x = "w:tab";
|
|
24818
|
+
const SD_NODE_NAME$h = "tab";
|
|
24819
|
+
const encode$14 = (_2, encodedAttrs = {}) => {
|
|
24823
24820
|
const translated = { type: "tab" };
|
|
24824
24821
|
if (encodedAttrs) translated.attrs = { ...encodedAttrs };
|
|
24825
24822
|
return translated;
|
|
24826
24823
|
};
|
|
24827
|
-
const decode$
|
|
24824
|
+
const decode$Y = (params2, decodedAttrs = {}) => {
|
|
24828
24825
|
const { node } = params2 || {};
|
|
24829
24826
|
if (!node) return;
|
|
24830
24827
|
const wTab = { name: "w:tab" };
|
|
@@ -24840,15 +24837,15 @@ const decode$X = (params2, decodedAttrs = {}) => {
|
|
|
24840
24837
|
}
|
|
24841
24838
|
return translated;
|
|
24842
24839
|
};
|
|
24843
|
-
const config$
|
|
24844
|
-
xmlName: XML_NODE_NAME$
|
|
24845
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
24840
|
+
const config$w = {
|
|
24841
|
+
xmlName: XML_NODE_NAME$x,
|
|
24842
|
+
sdNodeOrKeyName: SD_NODE_NAME$h,
|
|
24846
24843
|
type: NodeTranslator.translatorTypes.NODE,
|
|
24847
|
-
encode: encode$
|
|
24848
|
-
decode: decode$
|
|
24849
|
-
attributes: validXmlAttributes$
|
|
24844
|
+
encode: encode$14,
|
|
24845
|
+
decode: decode$Y,
|
|
24846
|
+
attributes: validXmlAttributes$o
|
|
24850
24847
|
};
|
|
24851
|
-
const translator$
|
|
24848
|
+
const translator$1q = NodeTranslator.from(config$w);
|
|
24852
24849
|
const mergeTextNodes = (nodes) => {
|
|
24853
24850
|
if (!nodes || !Array.isArray(nodes)) {
|
|
24854
24851
|
return nodes;
|
|
@@ -24898,6 +24895,9 @@ const canMergeTextNodes = (nodeA, nodeB) => {
|
|
|
24898
24895
|
const areAttrsEqual = (attrsA = {}, attrsB = {}) => {
|
|
24899
24896
|
return objectIncludes(attrsA, attrsB);
|
|
24900
24897
|
};
|
|
24898
|
+
const TrackInsertMarkName = "trackInsert";
|
|
24899
|
+
const TrackDeleteMarkName = "trackDelete";
|
|
24900
|
+
const TrackFormatMarkName = "trackFormat";
|
|
24901
24901
|
function parseMarks(property2, unknownMarks = [], docx = null) {
|
|
24902
24902
|
const marks = [];
|
|
24903
24903
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -25366,91 +25366,91 @@ const handleParagraphNode$1 = (params2) => {
|
|
|
25366
25366
|
}
|
|
25367
25367
|
return schemaNode;
|
|
25368
25368
|
};
|
|
25369
|
-
const encode$
|
|
25369
|
+
const encode$13 = (attributes) => {
|
|
25370
25370
|
return attributes["w:rsidDel"];
|
|
25371
25371
|
};
|
|
25372
|
-
const decode$
|
|
25372
|
+
const decode$X = (attrs) => {
|
|
25373
25373
|
return attrs.rsidDel;
|
|
25374
25374
|
};
|
|
25375
25375
|
const attrConfig$A = Object.freeze({
|
|
25376
25376
|
xmlName: "w:rsidDel",
|
|
25377
25377
|
sdName: "rsidDel",
|
|
25378
|
-
encode: encode$
|
|
25379
|
-
decode: decode$
|
|
25378
|
+
encode: encode$13,
|
|
25379
|
+
decode: decode$X
|
|
25380
25380
|
});
|
|
25381
|
-
const encode$
|
|
25381
|
+
const encode$12 = (attributes) => {
|
|
25382
25382
|
return attributes["w:rsidP"];
|
|
25383
25383
|
};
|
|
25384
|
-
const decode$
|
|
25384
|
+
const decode$W = (attrs) => {
|
|
25385
25385
|
return attrs.rsidP;
|
|
25386
25386
|
};
|
|
25387
25387
|
const attrConfig$z = Object.freeze({
|
|
25388
25388
|
xmlName: "w:rsidP",
|
|
25389
25389
|
sdName: "rsidP",
|
|
25390
|
-
encode: encode$
|
|
25391
|
-
decode: decode$
|
|
25390
|
+
encode: encode$12,
|
|
25391
|
+
decode: decode$W
|
|
25392
25392
|
});
|
|
25393
|
-
const encode$
|
|
25393
|
+
const encode$11 = (attributes) => {
|
|
25394
25394
|
return attributes["w:rsidR"];
|
|
25395
25395
|
};
|
|
25396
|
-
const decode$
|
|
25396
|
+
const decode$V = (attrs) => {
|
|
25397
25397
|
return attrs.rsidR;
|
|
25398
25398
|
};
|
|
25399
25399
|
const attrConfig$y = Object.freeze({
|
|
25400
25400
|
xmlName: "w:rsidR",
|
|
25401
25401
|
sdName: "rsidR",
|
|
25402
|
-
encode: encode$
|
|
25403
|
-
decode: decode$
|
|
25402
|
+
encode: encode$11,
|
|
25403
|
+
decode: decode$V
|
|
25404
25404
|
});
|
|
25405
|
-
const encode
|
|
25405
|
+
const encode$10 = (attributes) => {
|
|
25406
25406
|
return attributes["w:rsidRPr"];
|
|
25407
25407
|
};
|
|
25408
|
-
const decode$
|
|
25408
|
+
const decode$U = (attrs) => {
|
|
25409
25409
|
return attrs.rsidRPr;
|
|
25410
25410
|
};
|
|
25411
25411
|
const attrConfig$x = Object.freeze({
|
|
25412
25412
|
xmlName: "w:rsidRPr",
|
|
25413
25413
|
sdName: "rsidRPr",
|
|
25414
|
-
encode: encode
|
|
25415
|
-
decode: decode$
|
|
25414
|
+
encode: encode$10,
|
|
25415
|
+
decode: decode$U
|
|
25416
25416
|
});
|
|
25417
|
-
const encode
|
|
25417
|
+
const encode$$ = (attributes) => {
|
|
25418
25418
|
return attributes["w:rsidRDefault"];
|
|
25419
25419
|
};
|
|
25420
|
-
const decode$
|
|
25420
|
+
const decode$T = (attrs) => {
|
|
25421
25421
|
return attrs.rsidRDefault;
|
|
25422
25422
|
};
|
|
25423
25423
|
const attrConfig$w = Object.freeze({
|
|
25424
25424
|
xmlName: "w:rsidRDefault",
|
|
25425
25425
|
sdName: "rsidRDefault",
|
|
25426
|
-
encode: encode
|
|
25427
|
-
decode: decode$
|
|
25426
|
+
encode: encode$$,
|
|
25427
|
+
decode: decode$T
|
|
25428
25428
|
});
|
|
25429
|
-
const encode$
|
|
25429
|
+
const encode$_ = (attributes) => {
|
|
25430
25430
|
return attributes["w14:paraId"];
|
|
25431
25431
|
};
|
|
25432
|
-
const decode$
|
|
25432
|
+
const decode$S = (attrs) => {
|
|
25433
25433
|
return attrs.paraId;
|
|
25434
25434
|
};
|
|
25435
25435
|
const attrConfig$v = Object.freeze({
|
|
25436
25436
|
xmlName: "w14:paraId",
|
|
25437
25437
|
sdName: "paraId",
|
|
25438
|
-
encode: encode$
|
|
25439
|
-
decode: decode$
|
|
25438
|
+
encode: encode$_,
|
|
25439
|
+
decode: decode$S
|
|
25440
25440
|
});
|
|
25441
|
-
const encode$
|
|
25441
|
+
const encode$Z = (attributes) => {
|
|
25442
25442
|
return attributes["w14:textId"];
|
|
25443
25443
|
};
|
|
25444
|
-
const decode$
|
|
25444
|
+
const decode$R = (attrs) => {
|
|
25445
25445
|
return attrs.textId;
|
|
25446
25446
|
};
|
|
25447
25447
|
const attrConfig$u = Object.freeze({
|
|
25448
25448
|
xmlName: "w14:textId",
|
|
25449
25449
|
sdName: "textId",
|
|
25450
|
-
encode: encode$
|
|
25451
|
-
decode: decode$
|
|
25450
|
+
encode: encode$Z,
|
|
25451
|
+
decode: decode$R
|
|
25452
25452
|
});
|
|
25453
|
-
const validXmlAttributes$
|
|
25453
|
+
const validXmlAttributes$n = [
|
|
25454
25454
|
attrConfig$v,
|
|
25455
25455
|
attrConfig$u,
|
|
25456
25456
|
attrConfig$y,
|
|
@@ -25459,9 +25459,9 @@ const validXmlAttributes$m = [
|
|
|
25459
25459
|
attrConfig$x,
|
|
25460
25460
|
attrConfig$A
|
|
25461
25461
|
];
|
|
25462
|
-
const XML_NODE_NAME$
|
|
25463
|
-
const SD_NODE_NAME$
|
|
25464
|
-
const encode$
|
|
25462
|
+
const XML_NODE_NAME$w = "w:p";
|
|
25463
|
+
const SD_NODE_NAME$g = "paragraph";
|
|
25464
|
+
const encode$Y = (params2, encodedAttrs = {}) => {
|
|
25465
25465
|
const node = handleParagraphNode$1(params2);
|
|
25466
25466
|
if (!node) return void 0;
|
|
25467
25467
|
if (encodedAttrs && Object.keys(encodedAttrs).length) {
|
|
@@ -25469,7 +25469,7 @@ const encode$X = (params2, encodedAttrs = {}) => {
|
|
|
25469
25469
|
}
|
|
25470
25470
|
return node;
|
|
25471
25471
|
};
|
|
25472
|
-
const decode$
|
|
25472
|
+
const decode$Q = (params2, decodedAttrs = {}) => {
|
|
25473
25473
|
const translated = translateParagraphNode(params2);
|
|
25474
25474
|
if (!translated) return void 0;
|
|
25475
25475
|
if (decodedAttrs && Object.keys(decodedAttrs).length) {
|
|
@@ -25477,16 +25477,16 @@ const decode$P = (params2, decodedAttrs = {}) => {
|
|
|
25477
25477
|
}
|
|
25478
25478
|
return translated;
|
|
25479
25479
|
};
|
|
25480
|
-
const config$
|
|
25481
|
-
xmlName: XML_NODE_NAME$
|
|
25482
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
25480
|
+
const config$v = {
|
|
25481
|
+
xmlName: XML_NODE_NAME$w,
|
|
25482
|
+
sdNodeOrKeyName: SD_NODE_NAME$g,
|
|
25483
25483
|
type: NodeTranslator.translatorTypes.NODE,
|
|
25484
|
-
encode: encode$
|
|
25485
|
-
decode: decode$
|
|
25486
|
-
attributes: validXmlAttributes$
|
|
25484
|
+
encode: encode$Y,
|
|
25485
|
+
decode: decode$Q,
|
|
25486
|
+
attributes: validXmlAttributes$n
|
|
25487
25487
|
};
|
|
25488
|
-
const translator$
|
|
25489
|
-
const encode$
|
|
25488
|
+
const translator$1p = NodeTranslator.from(config$v);
|
|
25489
|
+
const encode$X = (attributes) => {
|
|
25490
25490
|
const raw = attributes?.["w:val"];
|
|
25491
25491
|
if (raw === void 0 || raw === null) return void 0;
|
|
25492
25492
|
if (typeof raw === "boolean") return raw;
|
|
@@ -25496,20 +25496,20 @@ const encode$W = (attributes) => {
|
|
|
25496
25496
|
if (val === "1" || val === "true" || val === "on") return true;
|
|
25497
25497
|
return void 0;
|
|
25498
25498
|
};
|
|
25499
|
-
const decode$
|
|
25499
|
+
const decode$P = (runProps) => {
|
|
25500
25500
|
if (runProps?.bold === false) return "0";
|
|
25501
25501
|
return void 0;
|
|
25502
25502
|
};
|
|
25503
25503
|
const attrConfig$t = Object.freeze({
|
|
25504
25504
|
xmlName: "w:val",
|
|
25505
25505
|
sdName: "bold",
|
|
25506
|
-
encode: encode$
|
|
25507
|
-
decode: decode$
|
|
25506
|
+
encode: encode$X,
|
|
25507
|
+
decode: decode$P
|
|
25508
25508
|
});
|
|
25509
|
-
const validXmlAttributes$
|
|
25510
|
-
const XML_NODE_NAME$
|
|
25509
|
+
const validXmlAttributes$m = [attrConfig$t];
|
|
25510
|
+
const XML_NODE_NAME$v = "w:b";
|
|
25511
25511
|
const SD_ATTR_KEY$e = "bold";
|
|
25512
|
-
const encode$
|
|
25512
|
+
const encode$W = (params2, encodedAttrs = {}) => {
|
|
25513
25513
|
const { nodes } = params2;
|
|
25514
25514
|
const node = nodes[0];
|
|
25515
25515
|
if (!node) return void 0;
|
|
@@ -25521,85 +25521,85 @@ const encode$V = (params2, encodedAttrs = {}) => {
|
|
|
25521
25521
|
else attributes = node.attributes || {};
|
|
25522
25522
|
return {
|
|
25523
25523
|
type: "attr",
|
|
25524
|
-
xmlName: XML_NODE_NAME$
|
|
25524
|
+
xmlName: XML_NODE_NAME$v,
|
|
25525
25525
|
sdNodeOrKeyName: SD_ATTR_KEY$e,
|
|
25526
25526
|
attributes
|
|
25527
25527
|
};
|
|
25528
25528
|
};
|
|
25529
|
-
const config$
|
|
25530
|
-
xmlName: XML_NODE_NAME$
|
|
25529
|
+
const config$u = {
|
|
25530
|
+
xmlName: XML_NODE_NAME$v,
|
|
25531
25531
|
sdNodeOrKeyName: SD_ATTR_KEY$e,
|
|
25532
25532
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25533
|
-
encode: encode$
|
|
25534
|
-
attributes: validXmlAttributes$
|
|
25533
|
+
encode: encode$W,
|
|
25534
|
+
attributes: validXmlAttributes$m
|
|
25535
25535
|
};
|
|
25536
|
-
const translator$
|
|
25537
|
-
const XML_NODE_NAME$
|
|
25536
|
+
const translator$1o = NodeTranslator.from(config$u);
|
|
25537
|
+
const XML_NODE_NAME$u = "w:i";
|
|
25538
25538
|
const SD_ATTR_KEY$d = "italic";
|
|
25539
|
-
const encode$
|
|
25539
|
+
const encode$V = (params2) => {
|
|
25540
25540
|
const { nodes } = params2;
|
|
25541
25541
|
const node = nodes?.[0];
|
|
25542
25542
|
if (!node) return void 0;
|
|
25543
25543
|
return {
|
|
25544
25544
|
type: "attr",
|
|
25545
|
-
xmlName: XML_NODE_NAME$
|
|
25545
|
+
xmlName: XML_NODE_NAME$u,
|
|
25546
25546
|
sdNodeOrKeyName: SD_ATTR_KEY$d,
|
|
25547
25547
|
attributes: {
|
|
25548
25548
|
"w:val": node.attributes?.["w:val"] ?? null
|
|
25549
25549
|
}
|
|
25550
25550
|
};
|
|
25551
25551
|
};
|
|
25552
|
-
const config$
|
|
25553
|
-
xmlName: XML_NODE_NAME$
|
|
25552
|
+
const config$t = {
|
|
25553
|
+
xmlName: XML_NODE_NAME$u,
|
|
25554
25554
|
sdNodeOrKeyName: SD_ATTR_KEY$d,
|
|
25555
25555
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25556
|
-
encode: encode$
|
|
25556
|
+
encode: encode$V
|
|
25557
25557
|
};
|
|
25558
|
-
const translator$
|
|
25559
|
-
const encode$
|
|
25560
|
-
const decode$
|
|
25558
|
+
const translator$1n = NodeTranslator.from(config$t);
|
|
25559
|
+
const encode$U = (attributes) => attributes?.["w:val"];
|
|
25560
|
+
const decode$O = (attrs) => attrs?.underline;
|
|
25561
25561
|
const attrConfig$s = Object.freeze({
|
|
25562
25562
|
xmlName: "w:val",
|
|
25563
25563
|
sdName: "underline",
|
|
25564
|
-
encode: encode$
|
|
25565
|
-
decode: decode$
|
|
25564
|
+
encode: encode$U,
|
|
25565
|
+
decode: decode$O
|
|
25566
25566
|
});
|
|
25567
|
-
const encode$
|
|
25568
|
-
const decode$
|
|
25567
|
+
const encode$T = (attributes) => attributes?.["w:color"];
|
|
25568
|
+
const decode$N = (attrs) => attrs?.color;
|
|
25569
25569
|
const attrConfig$r = Object.freeze({
|
|
25570
25570
|
xmlName: "w:color",
|
|
25571
25571
|
sdName: "color",
|
|
25572
|
-
encode: encode$
|
|
25573
|
-
decode: decode$
|
|
25572
|
+
encode: encode$T,
|
|
25573
|
+
decode: decode$N
|
|
25574
25574
|
});
|
|
25575
|
-
const encode$
|
|
25576
|
-
const decode$
|
|
25575
|
+
const encode$S = (attributes) => attributes?.["w:themeColor"];
|
|
25576
|
+
const decode$M = (attrs) => attrs?.themeColor;
|
|
25577
25577
|
const attrConfig$q = Object.freeze({
|
|
25578
25578
|
xmlName: "w:themeColor",
|
|
25579
25579
|
sdName: "themeColor",
|
|
25580
|
-
encode: encode$
|
|
25581
|
-
decode: decode$
|
|
25580
|
+
encode: encode$S,
|
|
25581
|
+
decode: decode$M
|
|
25582
25582
|
});
|
|
25583
|
-
const encode$
|
|
25584
|
-
const decode$
|
|
25583
|
+
const encode$R = (attributes) => attributes?.["w:themeTint"];
|
|
25584
|
+
const decode$L = (attrs) => attrs?.themeTint;
|
|
25585
25585
|
const attrConfig$p = Object.freeze({
|
|
25586
25586
|
xmlName: "w:themeTint",
|
|
25587
25587
|
sdName: "themeTint",
|
|
25588
|
-
encode: encode$
|
|
25589
|
-
decode: decode$
|
|
25588
|
+
encode: encode$R,
|
|
25589
|
+
decode: decode$L
|
|
25590
25590
|
});
|
|
25591
|
-
const encode$
|
|
25592
|
-
const decode$
|
|
25591
|
+
const encode$Q = (attributes) => attributes?.["w:themeShade"];
|
|
25592
|
+
const decode$K = (attrs) => attrs?.themeShade;
|
|
25593
25593
|
const attrConfig$o = Object.freeze({
|
|
25594
25594
|
xmlName: "w:themeShade",
|
|
25595
25595
|
sdName: "themeShade",
|
|
25596
|
-
encode: encode$
|
|
25597
|
-
decode: decode$
|
|
25596
|
+
encode: encode$Q,
|
|
25597
|
+
decode: decode$K
|
|
25598
25598
|
});
|
|
25599
|
-
const validXmlAttributes$
|
|
25600
|
-
const XML_NODE_NAME$
|
|
25599
|
+
const validXmlAttributes$l = [attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o];
|
|
25600
|
+
const XML_NODE_NAME$t = "w:u";
|
|
25601
25601
|
const SD_ATTR_KEY$c = "underline";
|
|
25602
|
-
const encode$
|
|
25602
|
+
const encode$P = (params2, encodedAttrs = {}) => {
|
|
25603
25603
|
const { nodes } = params2;
|
|
25604
25604
|
const node = nodes?.[0];
|
|
25605
25605
|
const sourceAttrs = node?.attributes || {};
|
|
@@ -25615,12 +25615,12 @@ const encode$O = (params2, encodedAttrs = {}) => {
|
|
|
25615
25615
|
if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
|
|
25616
25616
|
return {
|
|
25617
25617
|
type: "attr",
|
|
25618
|
-
xmlName: XML_NODE_NAME$
|
|
25618
|
+
xmlName: XML_NODE_NAME$t,
|
|
25619
25619
|
sdNodeOrKeyName: SD_ATTR_KEY$c,
|
|
25620
25620
|
attributes
|
|
25621
25621
|
};
|
|
25622
25622
|
};
|
|
25623
|
-
const decode$
|
|
25623
|
+
const decode$J = (params2) => {
|
|
25624
25624
|
const attrs = params2?.node?.attrs || {};
|
|
25625
25625
|
const underlineType = attrs.underlineType ?? attrs.underline ?? null;
|
|
25626
25626
|
const color = attrs.underlineColor ?? attrs.color ?? null;
|
|
@@ -25638,20 +25638,20 @@ const decode$I = (params2) => {
|
|
|
25638
25638
|
if (themeTint) attributes["w:themeTint"] = themeTint;
|
|
25639
25639
|
if (themeShade) attributes["w:themeShade"] = themeShade;
|
|
25640
25640
|
return {
|
|
25641
|
-
name: XML_NODE_NAME$
|
|
25641
|
+
name: XML_NODE_NAME$t,
|
|
25642
25642
|
attributes
|
|
25643
25643
|
};
|
|
25644
25644
|
};
|
|
25645
|
-
const config$
|
|
25646
|
-
xmlName: XML_NODE_NAME$
|
|
25645
|
+
const config$s = {
|
|
25646
|
+
xmlName: XML_NODE_NAME$t,
|
|
25647
25647
|
sdNodeOrKeyName: SD_ATTR_KEY$c,
|
|
25648
25648
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25649
|
-
encode: encode$
|
|
25650
|
-
decode: decode$
|
|
25651
|
-
attributes: validXmlAttributes$
|
|
25649
|
+
encode: encode$P,
|
|
25650
|
+
decode: decode$J,
|
|
25651
|
+
attributes: validXmlAttributes$l
|
|
25652
25652
|
};
|
|
25653
|
-
const translator$
|
|
25654
|
-
const encode$
|
|
25653
|
+
const translator$1m = NodeTranslator.from(config$s);
|
|
25654
|
+
const encode$O = (attributes) => {
|
|
25655
25655
|
const raw = attributes?.["w:val"];
|
|
25656
25656
|
if (raw === void 0 || raw === null) return void 0;
|
|
25657
25657
|
if (typeof raw === "boolean") return raw;
|
|
@@ -25661,20 +25661,20 @@ const encode$N = (attributes) => {
|
|
|
25661
25661
|
if (val === "1" || val === "true" || val === "on") return true;
|
|
25662
25662
|
return void 0;
|
|
25663
25663
|
};
|
|
25664
|
-
const decode$
|
|
25664
|
+
const decode$I = (attrs) => {
|
|
25665
25665
|
if (attrs?.strike === false) return "0";
|
|
25666
25666
|
return void 0;
|
|
25667
25667
|
};
|
|
25668
25668
|
const attrConfig$n = Object.freeze({
|
|
25669
25669
|
xmlName: "w:val",
|
|
25670
25670
|
sdName: "strike",
|
|
25671
|
-
encode: encode$
|
|
25672
|
-
decode: decode$
|
|
25671
|
+
encode: encode$O,
|
|
25672
|
+
decode: decode$I
|
|
25673
25673
|
});
|
|
25674
|
-
const validXmlAttributes$
|
|
25675
|
-
const XML_NODE_NAME$
|
|
25674
|
+
const validXmlAttributes$k = [attrConfig$n];
|
|
25675
|
+
const XML_NODE_NAME$s = "w:strike";
|
|
25676
25676
|
const SD_ATTR_KEY$b = "strike";
|
|
25677
|
-
const encode$
|
|
25677
|
+
const encode$N = (params2, encodedAttrs = {}) => {
|
|
25678
25678
|
const { nodes } = params2;
|
|
25679
25679
|
const node = nodes?.[0];
|
|
25680
25680
|
if (!node) return void 0;
|
|
@@ -25687,55 +25687,55 @@ const encode$M = (params2, encodedAttrs = {}) => {
|
|
|
25687
25687
|
else if (val === true && attributes["w:val"] === void 0) delete attributes["w:val"];
|
|
25688
25688
|
return {
|
|
25689
25689
|
type: "attr",
|
|
25690
|
-
xmlName: XML_NODE_NAME$
|
|
25690
|
+
xmlName: XML_NODE_NAME$s,
|
|
25691
25691
|
sdNodeOrKeyName: SD_ATTR_KEY$b,
|
|
25692
25692
|
attributes
|
|
25693
25693
|
};
|
|
25694
25694
|
};
|
|
25695
|
-
const config$
|
|
25696
|
-
xmlName: XML_NODE_NAME$
|
|
25695
|
+
const config$r = {
|
|
25696
|
+
xmlName: XML_NODE_NAME$s,
|
|
25697
25697
|
sdNodeOrKeyName: SD_ATTR_KEY$b,
|
|
25698
25698
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25699
|
-
encode: encode$
|
|
25700
|
-
attributes: validXmlAttributes$
|
|
25699
|
+
encode: encode$N,
|
|
25700
|
+
attributes: validXmlAttributes$k
|
|
25701
25701
|
};
|
|
25702
|
-
const translator$
|
|
25703
|
-
const encode$
|
|
25704
|
-
const decode$
|
|
25702
|
+
const translator$1l = NodeTranslator.from(config$r);
|
|
25703
|
+
const encode$M = (attributes) => attributes?.["w:val"];
|
|
25704
|
+
const decode$H = (attrs) => attrs?.color;
|
|
25705
25705
|
const attrConfig$m = Object.freeze({
|
|
25706
25706
|
xmlName: "w:val",
|
|
25707
25707
|
sdName: "color",
|
|
25708
|
-
encode: encode$
|
|
25709
|
-
decode: decode$
|
|
25708
|
+
encode: encode$M,
|
|
25709
|
+
decode: decode$H
|
|
25710
25710
|
});
|
|
25711
|
-
const encode$
|
|
25712
|
-
const decode$
|
|
25711
|
+
const encode$L = (attributes) => attributes?.["w:themeColor"];
|
|
25712
|
+
const decode$G = (attrs) => attrs?.themeColor;
|
|
25713
25713
|
const attrConfig$l = Object.freeze({
|
|
25714
25714
|
xmlName: "w:themeColor",
|
|
25715
25715
|
sdName: "themeColor",
|
|
25716
|
-
encode: encode$
|
|
25717
|
-
decode: decode$
|
|
25716
|
+
encode: encode$L,
|
|
25717
|
+
decode: decode$G
|
|
25718
25718
|
});
|
|
25719
|
-
const encode$
|
|
25720
|
-
const decode$
|
|
25719
|
+
const encode$K = (attributes) => attributes?.["w:themeTint"];
|
|
25720
|
+
const decode$F = (attrs) => attrs?.themeTint;
|
|
25721
25721
|
const attrConfig$k = Object.freeze({
|
|
25722
25722
|
xmlName: "w:themeTint",
|
|
25723
25723
|
sdName: "themeTint",
|
|
25724
|
-
encode: encode$
|
|
25725
|
-
decode: decode$
|
|
25724
|
+
encode: encode$K,
|
|
25725
|
+
decode: decode$F
|
|
25726
25726
|
});
|
|
25727
|
-
const encode$
|
|
25728
|
-
const decode$
|
|
25727
|
+
const encode$J = (attributes) => attributes?.["w:themeShade"];
|
|
25728
|
+
const decode$E = (attrs) => attrs?.themeShade;
|
|
25729
25729
|
const attrConfig$j = Object.freeze({
|
|
25730
25730
|
xmlName: "w:themeShade",
|
|
25731
25731
|
sdName: "themeShade",
|
|
25732
|
-
encode: encode$
|
|
25733
|
-
decode: decode$
|
|
25732
|
+
encode: encode$J,
|
|
25733
|
+
decode: decode$E
|
|
25734
25734
|
});
|
|
25735
|
-
const validXmlAttributes$
|
|
25736
|
-
const XML_NODE_NAME$
|
|
25735
|
+
const validXmlAttributes$j = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j];
|
|
25736
|
+
const XML_NODE_NAME$r = "w:color";
|
|
25737
25737
|
const SD_ATTR_KEY$a = "color";
|
|
25738
|
-
const encode$
|
|
25738
|
+
const encode$I = (params2, encodedAttrs = {}) => {
|
|
25739
25739
|
const { nodes } = params2;
|
|
25740
25740
|
const node = nodes?.[0];
|
|
25741
25741
|
const sourceAttrs = node?.attributes || {};
|
|
@@ -25750,63 +25750,63 @@ const encode$H = (params2, encodedAttrs = {}) => {
|
|
|
25750
25750
|
if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
|
|
25751
25751
|
return {
|
|
25752
25752
|
type: "attr",
|
|
25753
|
-
xmlName: XML_NODE_NAME$
|
|
25753
|
+
xmlName: XML_NODE_NAME$r,
|
|
25754
25754
|
sdNodeOrKeyName: SD_ATTR_KEY$a,
|
|
25755
25755
|
attributes
|
|
25756
25756
|
};
|
|
25757
25757
|
};
|
|
25758
|
-
const config$
|
|
25759
|
-
xmlName: XML_NODE_NAME$
|
|
25758
|
+
const config$q = {
|
|
25759
|
+
xmlName: XML_NODE_NAME$r,
|
|
25760
25760
|
sdNodeOrKeyName: SD_ATTR_KEY$a,
|
|
25761
25761
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25762
|
-
encode: encode$
|
|
25763
|
-
attributes: validXmlAttributes$
|
|
25762
|
+
encode: encode$I,
|
|
25763
|
+
attributes: validXmlAttributes$j
|
|
25764
25764
|
};
|
|
25765
|
-
const translator$
|
|
25766
|
-
const encode$
|
|
25767
|
-
const decode$
|
|
25765
|
+
const translator$1k = NodeTranslator.from(config$q);
|
|
25766
|
+
const encode$H = (attributes) => attributes?.["w:eastAsia"];
|
|
25767
|
+
const decode$D = (attrs) => attrs?.eastAsia;
|
|
25768
25768
|
const attrConfig$i = Object.freeze({
|
|
25769
25769
|
xmlName: "w:eastAsia",
|
|
25770
25770
|
sdName: "eastAsia",
|
|
25771
|
-
encode: encode$
|
|
25772
|
-
decode: decode$
|
|
25771
|
+
encode: encode$H,
|
|
25772
|
+
decode: decode$D
|
|
25773
25773
|
});
|
|
25774
|
-
const encode$
|
|
25775
|
-
const decode$
|
|
25774
|
+
const encode$G = (attributes) => attributes?.["w:ascii"];
|
|
25775
|
+
const decode$C = (attrs) => attrs?.ascii;
|
|
25776
25776
|
const attrConfig$h = Object.freeze({
|
|
25777
25777
|
xmlName: "w:ascii",
|
|
25778
25778
|
sdName: "ascii",
|
|
25779
|
-
encode: encode$
|
|
25780
|
-
decode: decode$
|
|
25779
|
+
encode: encode$G,
|
|
25780
|
+
decode: decode$C
|
|
25781
25781
|
});
|
|
25782
|
-
const encode$
|
|
25783
|
-
const decode$
|
|
25782
|
+
const encode$F = (attributes) => attributes?.["w:hAnsi"];
|
|
25783
|
+
const decode$B = (attrs) => attrs?.hAnsi;
|
|
25784
25784
|
const attrConfig$g = Object.freeze({
|
|
25785
25785
|
xmlName: "w:hAnsi",
|
|
25786
25786
|
sdName: "hAnsi",
|
|
25787
|
-
encode: encode$
|
|
25788
|
-
decode: decode$
|
|
25787
|
+
encode: encode$F,
|
|
25788
|
+
decode: decode$B
|
|
25789
25789
|
});
|
|
25790
|
-
const encode$
|
|
25791
|
-
const decode$
|
|
25790
|
+
const encode$E = (attributes) => attributes?.["w:cs"];
|
|
25791
|
+
const decode$A = (attrs) => attrs?.cs;
|
|
25792
25792
|
const attrConfig$f = Object.freeze({
|
|
25793
25793
|
xmlName: "w:cs",
|
|
25794
25794
|
sdName: "cs",
|
|
25795
|
-
encode: encode$
|
|
25796
|
-
decode: decode$
|
|
25795
|
+
encode: encode$E,
|
|
25796
|
+
decode: decode$A
|
|
25797
25797
|
});
|
|
25798
|
-
const encode$
|
|
25799
|
-
const decode$
|
|
25798
|
+
const encode$D = (attributes) => attributes?.["w:val"];
|
|
25799
|
+
const decode$z = (attrs) => attrs?.value;
|
|
25800
25800
|
const attrConfig$e = Object.freeze({
|
|
25801
25801
|
xmlName: "w:val",
|
|
25802
25802
|
sdName: "value",
|
|
25803
|
-
encode: encode$
|
|
25804
|
-
decode: decode$
|
|
25803
|
+
encode: encode$D,
|
|
25804
|
+
decode: decode$z
|
|
25805
25805
|
});
|
|
25806
|
-
const validXmlAttributes$
|
|
25807
|
-
const XML_NODE_NAME$
|
|
25806
|
+
const validXmlAttributes$i = [attrConfig$i, attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e];
|
|
25807
|
+
const XML_NODE_NAME$q = "w:rFonts";
|
|
25808
25808
|
const SD_ATTR_KEY$9 = "fontFamily";
|
|
25809
|
-
const encode$
|
|
25809
|
+
const encode$C = (params2, encodedAttrs = {}) => {
|
|
25810
25810
|
const { nodes } = params2;
|
|
25811
25811
|
const node = nodes?.[0];
|
|
25812
25812
|
const sourceAttrs = node?.attributes || {};
|
|
@@ -25840,109 +25840,109 @@ const encode$B = (params2, encodedAttrs = {}) => {
|
|
|
25840
25840
|
}
|
|
25841
25841
|
return {
|
|
25842
25842
|
type: "attr",
|
|
25843
|
-
xmlName: XML_NODE_NAME$
|
|
25843
|
+
xmlName: XML_NODE_NAME$q,
|
|
25844
25844
|
sdNodeOrKeyName: SD_ATTR_KEY$9,
|
|
25845
25845
|
attributes
|
|
25846
25846
|
};
|
|
25847
25847
|
};
|
|
25848
|
-
const config$
|
|
25849
|
-
xmlName: XML_NODE_NAME$
|
|
25848
|
+
const config$p = {
|
|
25849
|
+
xmlName: XML_NODE_NAME$q,
|
|
25850
25850
|
sdNodeOrKeyName: SD_ATTR_KEY$9,
|
|
25851
25851
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25852
|
-
encode: encode$
|
|
25853
|
-
attributes: validXmlAttributes$
|
|
25852
|
+
encode: encode$C,
|
|
25853
|
+
attributes: validXmlAttributes$i
|
|
25854
25854
|
};
|
|
25855
|
-
const translator$
|
|
25856
|
-
const encode$
|
|
25857
|
-
const decode$
|
|
25855
|
+
const translator$1j = NodeTranslator.from(config$p);
|
|
25856
|
+
const encode$B = (attributes) => attributes?.["w:val"];
|
|
25857
|
+
const decode$y = (attrs) => attrs?.styleId;
|
|
25858
25858
|
const attrConfig$d = Object.freeze({
|
|
25859
25859
|
xmlName: "w:val",
|
|
25860
25860
|
sdName: "styleId",
|
|
25861
|
-
encode: encode$
|
|
25862
|
-
decode: decode$
|
|
25861
|
+
encode: encode$B,
|
|
25862
|
+
decode: decode$y
|
|
25863
25863
|
});
|
|
25864
|
-
const validXmlAttributes$
|
|
25865
|
-
const XML_NODE_NAME$
|
|
25864
|
+
const validXmlAttributes$h = [attrConfig$d];
|
|
25865
|
+
const XML_NODE_NAME$p = "w:rStyle";
|
|
25866
25866
|
const SD_ATTR_KEY$8 = "styleId";
|
|
25867
|
-
const encode$
|
|
25867
|
+
const encode$A = (params2, encodedAttrs = {}) => {
|
|
25868
25868
|
const { nodes } = params2;
|
|
25869
25869
|
const node = nodes?.[0];
|
|
25870
25870
|
const value = encodedAttrs.styleId ?? node?.attributes?.["w:val"];
|
|
25871
25871
|
return {
|
|
25872
25872
|
type: "attr",
|
|
25873
|
-
xmlName: XML_NODE_NAME$
|
|
25873
|
+
xmlName: XML_NODE_NAME$p,
|
|
25874
25874
|
sdNodeOrKeyName: SD_ATTR_KEY$8,
|
|
25875
25875
|
attributes: { "w:val": value ?? null }
|
|
25876
25876
|
};
|
|
25877
25877
|
};
|
|
25878
|
-
const config$
|
|
25879
|
-
xmlName: XML_NODE_NAME$
|
|
25878
|
+
const config$o = {
|
|
25879
|
+
xmlName: XML_NODE_NAME$p,
|
|
25880
25880
|
sdNodeOrKeyName: SD_ATTR_KEY$8,
|
|
25881
25881
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25882
|
-
encode: encode$
|
|
25883
|
-
attributes: validXmlAttributes$
|
|
25882
|
+
encode: encode$A,
|
|
25883
|
+
attributes: validXmlAttributes$h
|
|
25884
25884
|
};
|
|
25885
|
-
const translator$
|
|
25886
|
-
const encode$
|
|
25887
|
-
const decode$
|
|
25885
|
+
const translator$1i = NodeTranslator.from(config$o);
|
|
25886
|
+
const encode$z = (attributes) => attributes?.["w:val"];
|
|
25887
|
+
const decode$x = (attrs) => attrs?.fontSize;
|
|
25888
25888
|
const attrConfig$c = Object.freeze({
|
|
25889
25889
|
xmlName: "w:val",
|
|
25890
25890
|
sdName: "fontSize",
|
|
25891
|
-
encode: encode$
|
|
25892
|
-
decode: decode$
|
|
25891
|
+
encode: encode$z,
|
|
25892
|
+
decode: decode$x
|
|
25893
25893
|
});
|
|
25894
|
-
const validXmlAttributes$
|
|
25895
|
-
const XML_NODE_NAME$
|
|
25894
|
+
const validXmlAttributes$g = [attrConfig$c];
|
|
25895
|
+
const XML_NODE_NAME$o = "w:sz";
|
|
25896
25896
|
const SD_ATTR_KEY$7 = "fontSize";
|
|
25897
|
-
const encode$
|
|
25897
|
+
const encode$y = (params2, encodedAttrs = {}) => {
|
|
25898
25898
|
const { nodes } = params2;
|
|
25899
25899
|
const node = nodes?.[0];
|
|
25900
25900
|
const value = encodedAttrs.fontSize ?? node?.attributes?.["w:val"];
|
|
25901
25901
|
return {
|
|
25902
25902
|
type: "attr",
|
|
25903
|
-
xmlName: XML_NODE_NAME$
|
|
25903
|
+
xmlName: XML_NODE_NAME$o,
|
|
25904
25904
|
sdNodeOrKeyName: SD_ATTR_KEY$7,
|
|
25905
25905
|
attributes: { "w:val": value ?? null }
|
|
25906
25906
|
};
|
|
25907
25907
|
};
|
|
25908
|
-
const config$
|
|
25909
|
-
xmlName: XML_NODE_NAME$
|
|
25908
|
+
const config$n = {
|
|
25909
|
+
xmlName: XML_NODE_NAME$o,
|
|
25910
25910
|
sdNodeOrKeyName: SD_ATTR_KEY$7,
|
|
25911
25911
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25912
|
-
encode: encode$
|
|
25913
|
-
attributes: validXmlAttributes$
|
|
25912
|
+
encode: encode$y,
|
|
25913
|
+
attributes: validXmlAttributes$g
|
|
25914
25914
|
};
|
|
25915
|
-
const translator$
|
|
25916
|
-
const encode$
|
|
25917
|
-
const decode$
|
|
25915
|
+
const translator$1h = NodeTranslator.from(config$n);
|
|
25916
|
+
const encode$x = (attributes) => attributes?.["w:val"];
|
|
25917
|
+
const decode$w = (attrs) => attrs?.fontSizeCs;
|
|
25918
25918
|
const attrConfig$b = Object.freeze({
|
|
25919
25919
|
xmlName: "w:val",
|
|
25920
25920
|
sdName: "fontSizeCs",
|
|
25921
|
-
encode: encode$
|
|
25922
|
-
decode: decode$
|
|
25921
|
+
encode: encode$x,
|
|
25922
|
+
decode: decode$w
|
|
25923
25923
|
});
|
|
25924
|
-
const validXmlAttributes$
|
|
25925
|
-
const XML_NODE_NAME$
|
|
25924
|
+
const validXmlAttributes$f = [attrConfig$b];
|
|
25925
|
+
const XML_NODE_NAME$n = "w:szCs";
|
|
25926
25926
|
const SD_ATTR_KEY$6 = "fontSizeCs";
|
|
25927
|
-
const encode$
|
|
25927
|
+
const encode$w = (params2, encodedAttrs = {}) => {
|
|
25928
25928
|
const { nodes } = params2;
|
|
25929
25929
|
const node = nodes?.[0];
|
|
25930
25930
|
const value = encodedAttrs.fontSizeCs ?? node?.attributes?.["w:val"];
|
|
25931
25931
|
return {
|
|
25932
25932
|
type: "attr",
|
|
25933
|
-
xmlName: XML_NODE_NAME$
|
|
25933
|
+
xmlName: XML_NODE_NAME$n,
|
|
25934
25934
|
sdNodeOrKeyName: SD_ATTR_KEY$6,
|
|
25935
25935
|
attributes: { "w:val": value ?? null }
|
|
25936
25936
|
};
|
|
25937
25937
|
};
|
|
25938
|
-
const config$
|
|
25939
|
-
xmlName: XML_NODE_NAME$
|
|
25938
|
+
const config$m = {
|
|
25939
|
+
xmlName: XML_NODE_NAME$n,
|
|
25940
25940
|
sdNodeOrKeyName: SD_ATTR_KEY$6,
|
|
25941
25941
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
25942
|
-
encode: encode$
|
|
25943
|
-
attributes: validXmlAttributes$
|
|
25942
|
+
encode: encode$w,
|
|
25943
|
+
attributes: validXmlAttributes$f
|
|
25944
25944
|
};
|
|
25945
|
-
const translator$
|
|
25945
|
+
const translator$1g = NodeTranslator.from(config$m);
|
|
25946
25946
|
const generateV2HandlerEntity = (handlerName, translator2) => ({
|
|
25947
25947
|
handlerName,
|
|
25948
25948
|
handler: (params2) => {
|
|
@@ -26131,9 +26131,9 @@ const integerToString = (value) => {
|
|
|
26131
26131
|
const intValue = parseInteger(value);
|
|
26132
26132
|
return intValue != void 0 ? String(intValue) : void 0;
|
|
26133
26133
|
};
|
|
26134
|
-
const XML_NODE_NAME$
|
|
26134
|
+
const XML_NODE_NAME$m = "w:caps";
|
|
26135
26135
|
const SD_ATTR_KEY$5 = "textTransform";
|
|
26136
|
-
const encode$
|
|
26136
|
+
const encode$v = (params2, encodedAttrs = {}) => {
|
|
26137
26137
|
const { nodes } = params2;
|
|
26138
26138
|
const node = nodes[0];
|
|
26139
26139
|
if (!node) return void 0;
|
|
@@ -26145,31 +26145,31 @@ const encode$u = (params2, encodedAttrs = {}) => {
|
|
|
26145
26145
|
}
|
|
26146
26146
|
return {
|
|
26147
26147
|
type: "attr",
|
|
26148
|
-
xmlName: XML_NODE_NAME$
|
|
26148
|
+
xmlName: XML_NODE_NAME$m,
|
|
26149
26149
|
sdNodeOrKeyName: SD_ATTR_KEY$5,
|
|
26150
26150
|
attributes: { [SD_ATTR_KEY$5]: result }
|
|
26151
26151
|
};
|
|
26152
26152
|
};
|
|
26153
|
-
const config$
|
|
26154
|
-
xmlName: XML_NODE_NAME$
|
|
26153
|
+
const config$l = {
|
|
26154
|
+
xmlName: XML_NODE_NAME$m,
|
|
26155
26155
|
sdNodeOrKeyName: SD_ATTR_KEY$5,
|
|
26156
26156
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
26157
|
-
encode: encode$
|
|
26157
|
+
encode: encode$v,
|
|
26158
26158
|
attributes: [createAttributeHandler("w:val")]
|
|
26159
26159
|
};
|
|
26160
|
-
const translator$
|
|
26160
|
+
const translator$1f = NodeTranslator.from(config$l);
|
|
26161
26161
|
const runPropertyTranslators = Object.freeze({
|
|
26162
|
-
"w:b": translator$
|
|
26163
|
-
"w:i": translator$
|
|
26164
|
-
"w:u": translator$
|
|
26165
|
-
"w:strike": translator$
|
|
26166
|
-
"w:color": translator$
|
|
26167
|
-
"w:highlight": translator$
|
|
26168
|
-
"w:rFonts": translator$
|
|
26169
|
-
"w:rStyle": translator$
|
|
26170
|
-
"w:sz": translator$
|
|
26171
|
-
"w:szCs": translator$
|
|
26172
|
-
"w:caps": translator$
|
|
26162
|
+
"w:b": translator$1o,
|
|
26163
|
+
"w:i": translator$1n,
|
|
26164
|
+
"w:u": translator$1m,
|
|
26165
|
+
"w:strike": translator$1l,
|
|
26166
|
+
"w:color": translator$1k,
|
|
26167
|
+
"w:highlight": translator$1r,
|
|
26168
|
+
"w:rFonts": translator$1j,
|
|
26169
|
+
"w:rStyle": translator$1i,
|
|
26170
|
+
"w:sz": translator$1h,
|
|
26171
|
+
"w:szCs": translator$1g,
|
|
26172
|
+
"w:caps": translator$1f
|
|
26173
26173
|
});
|
|
26174
26174
|
const rawRunPropertyXmlNames = Object.freeze(["w:lang", "w:shd"]);
|
|
26175
26175
|
const RAW_CHILD_NAME_SET = new Set(rawRunPropertyXmlNames);
|
|
@@ -26183,9 +26183,9 @@ const toRunPropertyEntry = (candidate) => {
|
|
|
26183
26183
|
attributes: { ...candidate.attributes || {} }
|
|
26184
26184
|
};
|
|
26185
26185
|
};
|
|
26186
|
-
const XML_NODE_NAME$
|
|
26186
|
+
const XML_NODE_NAME$l = "w:rPr";
|
|
26187
26187
|
const SD_ATTR_KEY$4 = "runProperties";
|
|
26188
|
-
const encode$
|
|
26188
|
+
const encode$u = (params2) => {
|
|
26189
26189
|
const { nodes } = params2;
|
|
26190
26190
|
const node = nodes?.[0] || {};
|
|
26191
26191
|
const contents = Array.isArray(node.elements) ? node.elements : [];
|
|
@@ -26219,16 +26219,16 @@ const encode$t = (params2) => {
|
|
|
26219
26219
|
attributes: runPropsArray
|
|
26220
26220
|
};
|
|
26221
26221
|
};
|
|
26222
|
-
const config$
|
|
26223
|
-
xmlName: XML_NODE_NAME$
|
|
26222
|
+
const config$k = {
|
|
26223
|
+
xmlName: XML_NODE_NAME$l,
|
|
26224
26224
|
sdNodeOrKeyName: SD_ATTR_KEY$4,
|
|
26225
26225
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
26226
|
-
encode: encode$
|
|
26226
|
+
encode: encode$u
|
|
26227
26227
|
};
|
|
26228
|
-
const translator$
|
|
26228
|
+
const translator$1e = NodeTranslator.from(config$k);
|
|
26229
26229
|
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;
|
|
26230
26230
|
const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
|
|
26231
|
-
const collectRunProperties = (params2, rPrNode, translator2 = translator$
|
|
26231
|
+
const collectRunProperties = (params2, rPrNode, translator2 = translator$1e) => {
|
|
26232
26232
|
if (!rPrNode) return { entries: [], hadRPr: false, styleChangeMarks: [] };
|
|
26233
26233
|
const result = translator2.encode({ ...params2, nodes: [rPrNode] }) || {};
|
|
26234
26234
|
let entries = [];
|
|
@@ -26701,15 +26701,15 @@ const ensureTrackedWrapper = (runs, trackingMarksByType = /* @__PURE__ */ new Ma
|
|
|
26701
26701
|
}
|
|
26702
26702
|
return runs;
|
|
26703
26703
|
};
|
|
26704
|
-
const XML_NODE_NAME$
|
|
26705
|
-
const SD_NODE_NAME$
|
|
26704
|
+
const XML_NODE_NAME$k = "w:hyperlink";
|
|
26705
|
+
const SD_NODE_NAME$f = "link";
|
|
26706
26706
|
const _createAttributeHandler = (xmlName, sdName) => ({
|
|
26707
26707
|
xmlName,
|
|
26708
26708
|
sdName,
|
|
26709
26709
|
encode: (attributes) => attributes[xmlName],
|
|
26710
26710
|
decode: (attributes) => attributes[sdName]
|
|
26711
26711
|
});
|
|
26712
|
-
const validXmlAttributes$
|
|
26712
|
+
const validXmlAttributes$e = [
|
|
26713
26713
|
_createAttributeHandler("w:anchor", "anchor"),
|
|
26714
26714
|
_createAttributeHandler("w:docLocation", "docLocation"),
|
|
26715
26715
|
{
|
|
@@ -26722,7 +26722,7 @@ const validXmlAttributes$d = [
|
|
|
26722
26722
|
_createAttributeHandler("r:id", "rId"),
|
|
26723
26723
|
_createAttributeHandler("w:tgtFrame", "target")
|
|
26724
26724
|
];
|
|
26725
|
-
const encode$
|
|
26725
|
+
const encode$t = (params2, encodedAttrs) => {
|
|
26726
26726
|
const { nodes, docx, nodeListHandler } = params2;
|
|
26727
26727
|
const node = nodes[0];
|
|
26728
26728
|
let href = _resolveHref(docx, encodedAttrs);
|
|
@@ -26756,7 +26756,7 @@ const _resolveHref = (docx, encodedAttrs) => {
|
|
|
26756
26756
|
}
|
|
26757
26757
|
return href;
|
|
26758
26758
|
};
|
|
26759
|
-
function decode$
|
|
26759
|
+
function decode$v(params2) {
|
|
26760
26760
|
const { hyperlinkGroup = [params2.node] } = params2.extraParams || {};
|
|
26761
26761
|
const node = hyperlinkGroup[0];
|
|
26762
26762
|
const linkMark = node.marks.find((m2) => m2.type === "link");
|
|
@@ -26805,55 +26805,55 @@ function _addNewLinkRelationship(params2, link) {
|
|
|
26805
26805
|
});
|
|
26806
26806
|
return id;
|
|
26807
26807
|
}
|
|
26808
|
-
const config$
|
|
26809
|
-
xmlName: XML_NODE_NAME$
|
|
26810
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
26808
|
+
const config$j = {
|
|
26809
|
+
xmlName: XML_NODE_NAME$k,
|
|
26810
|
+
sdNodeOrKeyName: SD_NODE_NAME$f,
|
|
26811
26811
|
type: NodeTranslator.translatorTypes.NODE,
|
|
26812
|
-
encode: encode$
|
|
26813
|
-
decode: decode$
|
|
26814
|
-
attributes: validXmlAttributes$
|
|
26812
|
+
encode: encode$t,
|
|
26813
|
+
decode: decode$v,
|
|
26814
|
+
attributes: validXmlAttributes$e
|
|
26815
26815
|
};
|
|
26816
|
-
const translator$
|
|
26817
|
-
const encode$
|
|
26816
|
+
const translator$1d = NodeTranslator.from(config$j);
|
|
26817
|
+
const encode$s = (attributes) => {
|
|
26818
26818
|
return attributes["w:rsidR"];
|
|
26819
26819
|
};
|
|
26820
|
-
const decode$
|
|
26820
|
+
const decode$u = (attrs) => {
|
|
26821
26821
|
return attrs.rsidR;
|
|
26822
26822
|
};
|
|
26823
26823
|
const attrConfig$a = Object.freeze({
|
|
26824
26824
|
xmlName: "w:rsidR",
|
|
26825
26825
|
sdName: "rsidR",
|
|
26826
|
-
encode: encode$
|
|
26827
|
-
decode: decode$
|
|
26826
|
+
encode: encode$s,
|
|
26827
|
+
decode: decode$u
|
|
26828
26828
|
});
|
|
26829
|
-
const encode$
|
|
26829
|
+
const encode$r = (attributes) => {
|
|
26830
26830
|
return attributes["w:rsidRPr"];
|
|
26831
26831
|
};
|
|
26832
|
-
const decode$
|
|
26832
|
+
const decode$t = (attrs) => {
|
|
26833
26833
|
return attrs.rsidRPr;
|
|
26834
26834
|
};
|
|
26835
26835
|
const attrConfig$9 = Object.freeze({
|
|
26836
26836
|
xmlName: "w:rsidRPr",
|
|
26837
26837
|
sdName: "rsidRPr",
|
|
26838
|
-
encode: encode$
|
|
26839
|
-
decode: decode$
|
|
26838
|
+
encode: encode$r,
|
|
26839
|
+
decode: decode$t
|
|
26840
26840
|
});
|
|
26841
|
-
const encode$
|
|
26841
|
+
const encode$q = (attributes) => {
|
|
26842
26842
|
return attributes["w:rsidDel"];
|
|
26843
26843
|
};
|
|
26844
|
-
const decode$
|
|
26844
|
+
const decode$s = (attrs) => {
|
|
26845
26845
|
return attrs.rsidDel;
|
|
26846
26846
|
};
|
|
26847
26847
|
const attrConfig$8 = Object.freeze({
|
|
26848
26848
|
xmlName: "w:rsidDel",
|
|
26849
26849
|
sdName: "rsidDel",
|
|
26850
|
-
encode: encode$
|
|
26851
|
-
decode: decode$
|
|
26850
|
+
encode: encode$q,
|
|
26851
|
+
decode: decode$s
|
|
26852
26852
|
});
|
|
26853
|
-
const validXmlAttributes$
|
|
26854
|
-
const XML_NODE_NAME$
|
|
26853
|
+
const validXmlAttributes$d = [attrConfig$a, attrConfig$9, attrConfig$8];
|
|
26854
|
+
const XML_NODE_NAME$j = "w:r";
|
|
26855
26855
|
const SD_KEY_NAME = "run";
|
|
26856
|
-
const encode$
|
|
26856
|
+
const encode$p = (params2, encodedAttrs = {}) => {
|
|
26857
26857
|
const { nodes = [], nodeListHandler } = params2 || {};
|
|
26858
26858
|
const runNode = nodes[0];
|
|
26859
26859
|
if (!runNode) return void 0;
|
|
@@ -26901,7 +26901,7 @@ const encode$o = (params2, encodedAttrs = {}) => {
|
|
|
26901
26901
|
}
|
|
26902
26902
|
return runNodeResult;
|
|
26903
26903
|
};
|
|
26904
|
-
const decode$
|
|
26904
|
+
const decode$r = (params2, decodedAttrs = {}) => {
|
|
26905
26905
|
const { node } = params2 || {};
|
|
26906
26906
|
if (!node) return void 0;
|
|
26907
26907
|
const isLinkNode = node.marks?.some((m2) => m2.type === "link");
|
|
@@ -26910,7 +26910,7 @@ const decode$q = (params2, decodedAttrs = {}) => {
|
|
|
26910
26910
|
...params2.extraParams,
|
|
26911
26911
|
linkProcessed: true
|
|
26912
26912
|
};
|
|
26913
|
-
return translator$
|
|
26913
|
+
return translator$1d.decode({ ...params2, extraParams });
|
|
26914
26914
|
}
|
|
26915
26915
|
const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
|
|
26916
26916
|
const runAttrs = runNodeForExport.attrs || {};
|
|
@@ -26966,7 +26966,7 @@ const decode$q = (params2, decodedAttrs = {}) => {
|
|
|
26966
26966
|
runs.push(trackedClone);
|
|
26967
26967
|
return;
|
|
26968
26968
|
}
|
|
26969
|
-
const runWrapper = { name: XML_NODE_NAME$
|
|
26969
|
+
const runWrapper = { name: XML_NODE_NAME$j, elements: [] };
|
|
26970
26970
|
applyBaseRunProps(runWrapper);
|
|
26971
26971
|
if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
|
|
26972
26972
|
runWrapper.elements.push(cloneXmlNode(child));
|
|
@@ -26974,7 +26974,7 @@ const decode$q = (params2, decodedAttrs = {}) => {
|
|
|
26974
26974
|
});
|
|
26975
26975
|
const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
|
|
26976
26976
|
if (!trackedRuns.length) {
|
|
26977
|
-
const emptyRun = { name: XML_NODE_NAME$
|
|
26977
|
+
const emptyRun = { name: XML_NODE_NAME$j, elements: [] };
|
|
26978
26978
|
applyBaseRunProps(emptyRun);
|
|
26979
26979
|
trackedRuns.push(emptyRun);
|
|
26980
26980
|
}
|
|
@@ -26988,16 +26988,16 @@ const decode$q = (params2, decodedAttrs = {}) => {
|
|
|
26988
26988
|
}
|
|
26989
26989
|
return trackedRuns;
|
|
26990
26990
|
};
|
|
26991
|
-
const config$
|
|
26992
|
-
xmlName: XML_NODE_NAME$
|
|
26991
|
+
const config$i = {
|
|
26992
|
+
xmlName: XML_NODE_NAME$j,
|
|
26993
26993
|
sdNodeOrKeyName: SD_KEY_NAME,
|
|
26994
26994
|
type: NodeTranslator.translatorTypes.NODE,
|
|
26995
|
-
encode: encode$
|
|
26996
|
-
decode: decode$
|
|
26997
|
-
attributes: validXmlAttributes$
|
|
26995
|
+
encode: encode$p,
|
|
26996
|
+
decode: decode$r,
|
|
26997
|
+
attributes: validXmlAttributes$d
|
|
26998
26998
|
};
|
|
26999
|
-
const translator$
|
|
27000
|
-
const translator$
|
|
26999
|
+
const translator$1c = NodeTranslator.from(config$i);
|
|
27000
|
+
const translator$1b = NodeTranslator.from({
|
|
27001
27001
|
xmlName: "w:cnfStyle",
|
|
27002
27002
|
sdNodeOrKeyName: "cnfStyle",
|
|
27003
27003
|
attributes: [
|
|
@@ -27023,7 +27023,7 @@ const translator$1a = NodeTranslator.from({
|
|
|
27023
27023
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
27024
27024
|
}
|
|
27025
27025
|
});
|
|
27026
|
-
const translator$
|
|
27026
|
+
const translator$1a = NodeTranslator.from({
|
|
27027
27027
|
xmlName: "w:shd",
|
|
27028
27028
|
sdNodeOrKeyName: "shading",
|
|
27029
27029
|
attributes: [
|
|
@@ -27045,8 +27045,8 @@ const translator$19 = NodeTranslator.from({
|
|
|
27045
27045
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
27046
27046
|
}
|
|
27047
27047
|
});
|
|
27048
|
-
const translator$
|
|
27049
|
-
const translator$
|
|
27048
|
+
const translator$19 = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
|
|
27049
|
+
const translator$18 = NodeTranslator.from(
|
|
27050
27050
|
createSingleAttrPropertyHandler(
|
|
27051
27051
|
"w:gridSpan",
|
|
27052
27052
|
null,
|
|
@@ -27055,39 +27055,39 @@ const translator$17 = NodeTranslator.from(
|
|
|
27055
27055
|
(v2) => integerToString(v2)
|
|
27056
27056
|
)
|
|
27057
27057
|
);
|
|
27058
|
-
const translator$
|
|
27059
|
-
const translator$
|
|
27060
|
-
const translator$
|
|
27061
|
-
const translator$
|
|
27062
|
-
const translator$
|
|
27063
|
-
const translator$
|
|
27064
|
-
const translator$
|
|
27065
|
-
const translator
|
|
27066
|
-
const translator
|
|
27067
|
-
const translator$
|
|
27068
|
-
const translator$
|
|
27069
|
-
const translator$
|
|
27070
|
-
const translator$
|
|
27071
|
-
const translator$
|
|
27072
|
-
const translator$
|
|
27073
|
-
const translator$
|
|
27074
|
-
const translator$
|
|
27058
|
+
const translator$17 = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
|
|
27059
|
+
const translator$16 = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
|
|
27060
|
+
const translator$15 = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
|
|
27061
|
+
const translator$14 = NodeTranslator.from(createBorderPropertyHandler("w:end"));
|
|
27062
|
+
const translator$13 = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
|
|
27063
|
+
const translator$12 = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
|
|
27064
|
+
const translator$11 = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
|
|
27065
|
+
const translator$10 = NodeTranslator.from(createBorderPropertyHandler("w:left"));
|
|
27066
|
+
const translator$$ = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
|
|
27067
|
+
const translator$_ = NodeTranslator.from(createBorderPropertyHandler("w:right"));
|
|
27068
|
+
const translator$Z = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
|
|
27069
|
+
const translator$Y = NodeTranslator.from(createBorderPropertyHandler("w:start"));
|
|
27070
|
+
const translator$X = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
|
|
27071
|
+
const translator$W = NodeTranslator.from(createBorderPropertyHandler("w:top"));
|
|
27072
|
+
const translator$V = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
|
|
27073
|
+
const translator$U = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
|
|
27074
|
+
const translator$T = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
|
|
27075
27075
|
const propertyTranslators$6 = [
|
|
27076
|
-
translator$
|
|
27077
|
-
translator$
|
|
27078
|
-
translator$$,
|
|
27079
|
-
translator$15,
|
|
27080
|
-
translator$13,
|
|
27081
|
-
translator$Z,
|
|
27082
|
-
translator$11,
|
|
27076
|
+
translator$W,
|
|
27077
|
+
translator$Y,
|
|
27083
27078
|
translator$10,
|
|
27084
|
-
translator$
|
|
27085
|
-
translator$
|
|
27079
|
+
translator$16,
|
|
27080
|
+
translator$14,
|
|
27081
|
+
translator$_,
|
|
27082
|
+
translator$12,
|
|
27083
|
+
translator$11,
|
|
27084
|
+
translator$U,
|
|
27085
|
+
translator$T
|
|
27086
27086
|
];
|
|
27087
|
-
const translator$
|
|
27087
|
+
const translator$S = NodeTranslator.from(
|
|
27088
27088
|
createNestedPropertiesTranslator("w:tcBorders", "borders", propertyTranslators$6)
|
|
27089
27089
|
);
|
|
27090
|
-
const translator$
|
|
27090
|
+
const translator$R = NodeTranslator.from(
|
|
27091
27091
|
createSingleAttrPropertyHandler(
|
|
27092
27092
|
"w:noWrap",
|
|
27093
27093
|
null,
|
|
@@ -27097,18 +27097,18 @@ const translator$Q = NodeTranslator.from(
|
|
|
27097
27097
|
)
|
|
27098
27098
|
);
|
|
27099
27099
|
const propertyTranslators$5 = [
|
|
27100
|
-
translator$
|
|
27101
|
-
translator$
|
|
27102
|
-
translator
|
|
27103
|
-
translator$
|
|
27104
|
-
translator$
|
|
27105
|
-
translator$
|
|
27100
|
+
translator$15,
|
|
27101
|
+
translator$13,
|
|
27102
|
+
translator$$,
|
|
27103
|
+
translator$Z,
|
|
27104
|
+
translator$X,
|
|
27105
|
+
translator$V
|
|
27106
27106
|
];
|
|
27107
|
-
const translator$
|
|
27107
|
+
const translator$Q = NodeTranslator.from(
|
|
27108
27108
|
createNestedPropertiesTranslator("w:tcMar", "cellMargins", propertyTranslators$5)
|
|
27109
27109
|
);
|
|
27110
|
-
const translator$
|
|
27111
|
-
const translator$
|
|
27110
|
+
const translator$P = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
|
|
27111
|
+
const translator$O = NodeTranslator.from(
|
|
27112
27112
|
createSingleAttrPropertyHandler(
|
|
27113
27113
|
"w:tcFitText",
|
|
27114
27114
|
null,
|
|
@@ -27117,8 +27117,8 @@ const translator$N = NodeTranslator.from(
|
|
|
27117
27117
|
(v2) => booleanToString(v2)
|
|
27118
27118
|
)
|
|
27119
27119
|
);
|
|
27120
|
-
const translator$
|
|
27121
|
-
const translator$
|
|
27120
|
+
const translator$N = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
|
|
27121
|
+
const translator$M = NodeTranslator.from(
|
|
27122
27122
|
createSingleAttrPropertyHandler(
|
|
27123
27123
|
"w:hideMark",
|
|
27124
27124
|
null,
|
|
@@ -27127,55 +27127,55 @@ const translator$L = NodeTranslator.from(
|
|
|
27127
27127
|
(v2) => booleanToString(v2)
|
|
27128
27128
|
)
|
|
27129
27129
|
);
|
|
27130
|
-
const translator$
|
|
27131
|
-
const XML_NODE_NAME$
|
|
27130
|
+
const translator$L = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
|
|
27131
|
+
const XML_NODE_NAME$i = "w:headers";
|
|
27132
27132
|
const SD_ATTR_KEY$3 = "headers";
|
|
27133
|
-
const encode$
|
|
27133
|
+
const encode$o = (params2) => {
|
|
27134
27134
|
const { nodes } = params2;
|
|
27135
27135
|
const node = nodes[0];
|
|
27136
|
-
const attributes = encodeProperties(node, { [translator$
|
|
27136
|
+
const attributes = encodeProperties(node, { [translator$L.xmlName]: translator$L }, true);
|
|
27137
27137
|
return {
|
|
27138
|
-
xmlName: XML_NODE_NAME$
|
|
27138
|
+
xmlName: XML_NODE_NAME$i,
|
|
27139
27139
|
sdNodeOrKeyName: SD_ATTR_KEY$3,
|
|
27140
27140
|
attributes
|
|
27141
27141
|
};
|
|
27142
27142
|
};
|
|
27143
|
-
const decode$
|
|
27143
|
+
const decode$q = (params2) => {
|
|
27144
27144
|
const { headers = [] } = params2.node.attrs || {};
|
|
27145
27145
|
const newNode = {
|
|
27146
|
-
name: XML_NODE_NAME$
|
|
27146
|
+
name: XML_NODE_NAME$i,
|
|
27147
27147
|
attributes: {},
|
|
27148
27148
|
elements: headers.map(
|
|
27149
|
-
(header) => translator$
|
|
27149
|
+
(header) => translator$L.decode({
|
|
27150
27150
|
node: { type: "header", attrs: header }
|
|
27151
27151
|
})
|
|
27152
27152
|
)
|
|
27153
27153
|
};
|
|
27154
27154
|
return newNode;
|
|
27155
27155
|
};
|
|
27156
|
-
const config$
|
|
27157
|
-
xmlName: XML_NODE_NAME$
|
|
27156
|
+
const config$h = {
|
|
27157
|
+
xmlName: XML_NODE_NAME$i,
|
|
27158
27158
|
sdNodeOrKeyName: SD_ATTR_KEY$3,
|
|
27159
|
-
encode: encode$
|
|
27160
|
-
decode: decode$
|
|
27159
|
+
encode: encode$o,
|
|
27160
|
+
decode: decode$q
|
|
27161
27161
|
};
|
|
27162
|
-
const translator$
|
|
27162
|
+
const translator$K = NodeTranslator.from(config$h);
|
|
27163
27163
|
const propertyTranslators$4 = [
|
|
27164
|
-
translator$
|
|
27164
|
+
translator$1b,
|
|
27165
|
+
translator$19,
|
|
27165
27166
|
translator$18,
|
|
27166
27167
|
translator$17,
|
|
27167
|
-
translator$
|
|
27168
|
+
translator$S,
|
|
27169
|
+
translator$1a,
|
|
27168
27170
|
translator$R,
|
|
27169
|
-
translator$19,
|
|
27170
27171
|
translator$Q,
|
|
27171
27172
|
translator$P,
|
|
27172
27173
|
translator$O,
|
|
27173
27174
|
translator$N,
|
|
27174
27175
|
translator$M,
|
|
27175
|
-
translator$
|
|
27176
|
-
translator$J
|
|
27176
|
+
translator$K
|
|
27177
27177
|
];
|
|
27178
|
-
const translator$
|
|
27178
|
+
const translator$J = NodeTranslator.from(
|
|
27179
27179
|
createNestedPropertiesTranslator("w:tcPr", "tableCellProperties", propertyTranslators$4)
|
|
27180
27180
|
);
|
|
27181
27181
|
function handleTableCellNode({
|
|
@@ -27193,7 +27193,7 @@ function handleTableCellNode({
|
|
|
27193
27193
|
const attributes = {};
|
|
27194
27194
|
const referencedStyles = _referencedStyles ?? { fontSize: null, fonts: {}, cellMargins: {} };
|
|
27195
27195
|
const tcPr = node.elements.find((el) => el.name === "w:tcPr");
|
|
27196
|
-
const tableCellProperties = tcPr ? translator$
|
|
27196
|
+
const tableCellProperties = tcPr ? translator$J.encode({ ...params2, nodes: [tcPr] }) ?? {} : {};
|
|
27197
27197
|
attributes["tableCellProperties"] = tableCellProperties;
|
|
27198
27198
|
if (rowBorders?.insideH) {
|
|
27199
27199
|
rowBorders["bottom"] = rowBorders.insideH;
|
|
@@ -27505,13 +27505,13 @@ function generateTableCellProperties(node) {
|
|
|
27505
27505
|
} else if (tableCellProperties?.borders) {
|
|
27506
27506
|
delete tableCellProperties.borders;
|
|
27507
27507
|
}
|
|
27508
|
-
const result = translator$
|
|
27508
|
+
const result = translator$J.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
|
|
27509
27509
|
return result;
|
|
27510
27510
|
}
|
|
27511
|
-
const XML_NODE_NAME$
|
|
27512
|
-
const SD_NODE_NAME$
|
|
27513
|
-
const validXmlAttributes$
|
|
27514
|
-
function encode$
|
|
27511
|
+
const XML_NODE_NAME$h = "w:tc";
|
|
27512
|
+
const SD_NODE_NAME$e = "tableCell";
|
|
27513
|
+
const validXmlAttributes$c = [];
|
|
27514
|
+
function encode$n(params2, encodedAttrs) {
|
|
27515
27515
|
const {
|
|
27516
27516
|
node,
|
|
27517
27517
|
table,
|
|
@@ -27538,30 +27538,30 @@ function encode$m(params2, encodedAttrs) {
|
|
|
27538
27538
|
}
|
|
27539
27539
|
return schemaNode;
|
|
27540
27540
|
}
|
|
27541
|
-
function decode$
|
|
27541
|
+
function decode$p(params2, decodedAttrs) {
|
|
27542
27542
|
const translated = translateTableCell(params2);
|
|
27543
27543
|
if (decodedAttrs && Object.keys(decodedAttrs).length) {
|
|
27544
27544
|
translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
|
|
27545
27545
|
}
|
|
27546
27546
|
return translated;
|
|
27547
27547
|
}
|
|
27548
|
-
const config$
|
|
27549
|
-
xmlName: XML_NODE_NAME$
|
|
27550
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
27548
|
+
const config$g = {
|
|
27549
|
+
xmlName: XML_NODE_NAME$h,
|
|
27550
|
+
sdNodeOrKeyName: SD_NODE_NAME$e,
|
|
27551
27551
|
type: NodeTranslator.translatorTypes.NODE,
|
|
27552
|
-
encode: encode$
|
|
27553
|
-
decode: decode$
|
|
27554
|
-
attributes: validXmlAttributes$
|
|
27552
|
+
encode: encode$n,
|
|
27553
|
+
decode: decode$p,
|
|
27554
|
+
attributes: validXmlAttributes$c
|
|
27555
27555
|
};
|
|
27556
|
-
const translator$
|
|
27557
|
-
const translator$
|
|
27556
|
+
const translator$I = NodeTranslator.from(config$g);
|
|
27557
|
+
const translator$H = NodeTranslator.from({
|
|
27558
27558
|
xmlName: "w:cantSplit",
|
|
27559
27559
|
sdNodeOrKeyName: "cantSplit",
|
|
27560
27560
|
encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
27561
27561
|
decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
|
|
27562
27562
|
});
|
|
27563
|
-
const translator$
|
|
27564
|
-
const translator$
|
|
27563
|
+
const translator$G = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
|
|
27564
|
+
const translator$F = NodeTranslator.from(
|
|
27565
27565
|
createSingleAttrPropertyHandler(
|
|
27566
27566
|
"w:gridAfter",
|
|
27567
27567
|
null,
|
|
@@ -27570,7 +27570,7 @@ const translator$E = NodeTranslator.from(
|
|
|
27570
27570
|
(v2) => integerToString(v2)
|
|
27571
27571
|
)
|
|
27572
27572
|
);
|
|
27573
|
-
const translator$
|
|
27573
|
+
const translator$E = NodeTranslator.from(
|
|
27574
27574
|
createSingleAttrPropertyHandler(
|
|
27575
27575
|
"w:gridBefore",
|
|
27576
27576
|
null,
|
|
@@ -27579,21 +27579,21 @@ const translator$D = NodeTranslator.from(
|
|
|
27579
27579
|
(v2) => integerToString(v2)
|
|
27580
27580
|
)
|
|
27581
27581
|
);
|
|
27582
|
-
const translator$
|
|
27582
|
+
const translator$D = NodeTranslator.from({
|
|
27583
27583
|
xmlName: "w:hidden",
|
|
27584
27584
|
sdNodeOrKeyName: "hidden",
|
|
27585
27585
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
27586
27586
|
decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
|
|
27587
27587
|
});
|
|
27588
|
-
const translator$
|
|
27589
|
-
const translator$
|
|
27590
|
-
const translator$
|
|
27588
|
+
const translator$C = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
|
|
27589
|
+
const translator$B = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
|
|
27590
|
+
const translator$A = NodeTranslator.from({
|
|
27591
27591
|
xmlName: "w:tblHeader",
|
|
27592
27592
|
sdNodeOrKeyName: "repeatHeader",
|
|
27593
27593
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
27594
27594
|
decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
|
|
27595
27595
|
});
|
|
27596
|
-
const translator$
|
|
27596
|
+
const translator$z = NodeTranslator.from({
|
|
27597
27597
|
xmlName: "w:trHeight",
|
|
27598
27598
|
sdNodeOrKeyName: "rowHeight",
|
|
27599
27599
|
encode: ({ nodes }) => {
|
|
@@ -27620,11 +27620,12 @@ const translator$y = NodeTranslator.from({
|
|
|
27620
27620
|
return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
|
|
27621
27621
|
}
|
|
27622
27622
|
});
|
|
27623
|
-
const translator$
|
|
27624
|
-
const translator$
|
|
27623
|
+
const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
|
|
27624
|
+
const translator$x = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
|
|
27625
27625
|
const propertyTranslators$3 = [
|
|
27626
|
+
translator$H,
|
|
27627
|
+
translator$1b,
|
|
27626
27628
|
translator$G,
|
|
27627
|
-
translator$1a,
|
|
27628
27629
|
translator$F,
|
|
27629
27630
|
translator$E,
|
|
27630
27631
|
translator$D,
|
|
@@ -27633,10 +27634,9 @@ const propertyTranslators$3 = [
|
|
|
27633
27634
|
translator$A,
|
|
27634
27635
|
translator$z,
|
|
27635
27636
|
translator$y,
|
|
27636
|
-
translator$x
|
|
27637
|
-
translator$w
|
|
27637
|
+
translator$x
|
|
27638
27638
|
];
|
|
27639
|
-
const translator$
|
|
27639
|
+
const translator$w = NodeTranslator.from(
|
|
27640
27640
|
createNestedPropertiesTranslator("w:trPr", "tableRowProperties", propertyTranslators$3, {
|
|
27641
27641
|
cantSplit: false,
|
|
27642
27642
|
hidden: false,
|
|
@@ -27705,17 +27705,17 @@ const isPlaceholderCell = (cell) => {
|
|
|
27705
27705
|
}
|
|
27706
27706
|
return false;
|
|
27707
27707
|
};
|
|
27708
|
-
const XML_NODE_NAME$
|
|
27709
|
-
const SD_NODE_NAME$
|
|
27710
|
-
const validXmlAttributes$
|
|
27708
|
+
const XML_NODE_NAME$g = "w:tr";
|
|
27709
|
+
const SD_NODE_NAME$d = "tableRow";
|
|
27710
|
+
const validXmlAttributes$b = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
|
|
27711
27711
|
(xmlName) => createAttributeHandler(xmlName)
|
|
27712
27712
|
);
|
|
27713
|
-
const encode$
|
|
27713
|
+
const encode$m = (params2, encodedAttrs) => {
|
|
27714
27714
|
const { row } = params2.extraParams;
|
|
27715
27715
|
let tableRowProperties = {};
|
|
27716
27716
|
const tPr = row.elements.find((el) => el.name === "w:trPr");
|
|
27717
27717
|
if (tPr) {
|
|
27718
|
-
tableRowProperties = translator$
|
|
27718
|
+
tableRowProperties = translator$w.encode({
|
|
27719
27719
|
...params2,
|
|
27720
27720
|
nodes: [tPr]
|
|
27721
27721
|
});
|
|
@@ -27752,7 +27752,7 @@ const encode$l = (params2, encodedAttrs) => {
|
|
|
27752
27752
|
skipOccupiedColumns();
|
|
27753
27753
|
const startColumn = currentColumnIndex;
|
|
27754
27754
|
const columnWidth = gridColumnWidths?.[startColumn] || null;
|
|
27755
|
-
const result = translator$
|
|
27755
|
+
const result = translator$I.encode({
|
|
27756
27756
|
...params2,
|
|
27757
27757
|
extraParams: {
|
|
27758
27758
|
...params2.extraParams,
|
|
@@ -27785,7 +27785,7 @@ const encode$l = (params2, encodedAttrs) => {
|
|
|
27785
27785
|
};
|
|
27786
27786
|
return newNode;
|
|
27787
27787
|
};
|
|
27788
|
-
const decode$
|
|
27788
|
+
const decode$o = (params2, decodedAttrs) => {
|
|
27789
27789
|
const { node } = params2;
|
|
27790
27790
|
const cells = node.content || [];
|
|
27791
27791
|
let leadingPlaceholders = 0;
|
|
@@ -27825,7 +27825,7 @@ const decode$n = (params2, decodedAttrs) => {
|
|
|
27825
27825
|
}
|
|
27826
27826
|
}
|
|
27827
27827
|
tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
|
|
27828
|
-
const trPr = translator$
|
|
27828
|
+
const trPr = translator$w.decode({
|
|
27829
27829
|
...params2,
|
|
27830
27830
|
node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
|
|
27831
27831
|
});
|
|
@@ -27837,15 +27837,15 @@ const decode$n = (params2, decodedAttrs) => {
|
|
|
27837
27837
|
elements
|
|
27838
27838
|
};
|
|
27839
27839
|
};
|
|
27840
|
-
const config$
|
|
27841
|
-
xmlName: XML_NODE_NAME$
|
|
27842
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
27840
|
+
const config$f = {
|
|
27841
|
+
xmlName: XML_NODE_NAME$g,
|
|
27842
|
+
sdNodeOrKeyName: SD_NODE_NAME$d,
|
|
27843
27843
|
type: NodeTranslator.translatorTypes.NODE,
|
|
27844
|
-
encode: encode$
|
|
27845
|
-
decode: decode$
|
|
27846
|
-
attributes: validXmlAttributes$
|
|
27844
|
+
encode: encode$m,
|
|
27845
|
+
decode: decode$o,
|
|
27846
|
+
attributes: validXmlAttributes$b
|
|
27847
27847
|
};
|
|
27848
|
-
const translator$
|
|
27848
|
+
const translator$v = NodeTranslator.from(config$f);
|
|
27849
27849
|
function parseTagValueJSON(json) {
|
|
27850
27850
|
if (typeof json !== "string") {
|
|
27851
27851
|
return {};
|
|
@@ -29168,32 +29168,32 @@ function translateAnchorNode(params2) {
|
|
|
29168
29168
|
elements: [...anchorElements, ...elementsWithWrap]
|
|
29169
29169
|
};
|
|
29170
29170
|
}
|
|
29171
|
-
const XML_NODE_NAME$
|
|
29172
|
-
const SD_NODE_NAME$
|
|
29173
|
-
const validXmlAttributes$
|
|
29174
|
-
function encode$
|
|
29171
|
+
const XML_NODE_NAME$f = "wp:anchor";
|
|
29172
|
+
const SD_NODE_NAME$c = ["image"];
|
|
29173
|
+
const validXmlAttributes$a = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
|
|
29174
|
+
function encode$l(params2) {
|
|
29175
29175
|
const { node } = params2.extraParams;
|
|
29176
29176
|
if (!node || !node.type) {
|
|
29177
29177
|
return null;
|
|
29178
29178
|
}
|
|
29179
29179
|
return handleAnchorNode(params2);
|
|
29180
29180
|
}
|
|
29181
|
-
function decode$
|
|
29181
|
+
function decode$n(params2) {
|
|
29182
29182
|
const { node } = params2;
|
|
29183
29183
|
if (!node || !node.type) {
|
|
29184
29184
|
return null;
|
|
29185
29185
|
}
|
|
29186
29186
|
return translateAnchorNode(params2);
|
|
29187
29187
|
}
|
|
29188
|
-
const config$
|
|
29189
|
-
xmlName: XML_NODE_NAME$
|
|
29190
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
29188
|
+
const config$e = {
|
|
29189
|
+
xmlName: XML_NODE_NAME$f,
|
|
29190
|
+
sdNodeOrKeyName: SD_NODE_NAME$c,
|
|
29191
29191
|
type: NodeTranslator.translatorTypes.NODE,
|
|
29192
|
-
encode: encode$
|
|
29193
|
-
decode: decode$
|
|
29194
|
-
attributes: validXmlAttributes$
|
|
29192
|
+
encode: encode$l,
|
|
29193
|
+
decode: decode$n,
|
|
29194
|
+
attributes: validXmlAttributes$a
|
|
29195
29195
|
};
|
|
29196
|
-
const translator$
|
|
29196
|
+
const translator$u = NodeTranslator.from(config$e);
|
|
29197
29197
|
function handleInlineNode(params2) {
|
|
29198
29198
|
const { node } = params2.extraParams;
|
|
29199
29199
|
if (node.name !== "wp:inline") {
|
|
@@ -29209,41 +29209,41 @@ function translateInlineNode(params2) {
|
|
|
29209
29209
|
elements: nodeElements.elements
|
|
29210
29210
|
};
|
|
29211
29211
|
}
|
|
29212
|
-
const XML_NODE_NAME$
|
|
29213
|
-
const SD_NODE_NAME$
|
|
29214
|
-
const validXmlAttributes$
|
|
29215
|
-
function encode$
|
|
29212
|
+
const XML_NODE_NAME$e = "wp:inline";
|
|
29213
|
+
const SD_NODE_NAME$b = ["image"];
|
|
29214
|
+
const validXmlAttributes$9 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
|
|
29215
|
+
function encode$k(params2) {
|
|
29216
29216
|
const { node } = params2.extraParams;
|
|
29217
29217
|
if (!node || !node.type) {
|
|
29218
29218
|
return null;
|
|
29219
29219
|
}
|
|
29220
29220
|
return handleInlineNode(params2);
|
|
29221
29221
|
}
|
|
29222
|
-
function decode$
|
|
29222
|
+
function decode$m(params2) {
|
|
29223
29223
|
const { node } = params2;
|
|
29224
29224
|
if (!node || !node.type) {
|
|
29225
29225
|
return null;
|
|
29226
29226
|
}
|
|
29227
29227
|
return translateInlineNode(params2);
|
|
29228
29228
|
}
|
|
29229
|
-
const config$
|
|
29230
|
-
xmlName: XML_NODE_NAME$
|
|
29231
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
29229
|
+
const config$d = {
|
|
29230
|
+
xmlName: XML_NODE_NAME$e,
|
|
29231
|
+
sdNodeOrKeyName: SD_NODE_NAME$b,
|
|
29232
29232
|
type: NodeTranslator.translatorTypes.NODE,
|
|
29233
|
-
encode: encode$
|
|
29234
|
-
decode: decode$
|
|
29235
|
-
attributes: validXmlAttributes$
|
|
29233
|
+
encode: encode$k,
|
|
29234
|
+
decode: decode$m,
|
|
29235
|
+
attributes: validXmlAttributes$9
|
|
29236
29236
|
};
|
|
29237
|
-
const translator$
|
|
29238
|
-
const XML_NODE_NAME$
|
|
29239
|
-
const SD_NODE_NAME$
|
|
29240
|
-
const validXmlAttributes$
|
|
29241
|
-
function encode$
|
|
29237
|
+
const translator$t = NodeTranslator.from(config$d);
|
|
29238
|
+
const XML_NODE_NAME$d = "w:drawing";
|
|
29239
|
+
const SD_NODE_NAME$a = [];
|
|
29240
|
+
const validXmlAttributes$8 = [];
|
|
29241
|
+
function encode$j(params2) {
|
|
29242
29242
|
const nodes = params2.nodes;
|
|
29243
29243
|
const node = nodes[0];
|
|
29244
29244
|
const translatorByChildName = {
|
|
29245
|
-
"wp:anchor": translator$
|
|
29246
|
-
"wp:inline": translator$
|
|
29245
|
+
"wp:anchor": translator$u,
|
|
29246
|
+
"wp:inline": translator$t
|
|
29247
29247
|
};
|
|
29248
29248
|
return node.elements.reduce((acc, child) => {
|
|
29249
29249
|
if (acc) return acc;
|
|
@@ -29252,12 +29252,12 @@ function encode$i(params2) {
|
|
|
29252
29252
|
return translator2.encode({ ...params2, extraParams: { node: child } }) || acc;
|
|
29253
29253
|
}, null);
|
|
29254
29254
|
}
|
|
29255
|
-
function decode$
|
|
29255
|
+
function decode$l(params2) {
|
|
29256
29256
|
const { node } = params2;
|
|
29257
29257
|
if (!node || !node.type) {
|
|
29258
29258
|
return null;
|
|
29259
29259
|
}
|
|
29260
|
-
const childTranslator = node.attrs.isAnchor ? translator$
|
|
29260
|
+
const childTranslator = node.attrs.isAnchor ? translator$u : translator$t;
|
|
29261
29261
|
const resultNode = childTranslator.decode(params2);
|
|
29262
29262
|
return wrapTextInRun(
|
|
29263
29263
|
{
|
|
@@ -29267,15 +29267,15 @@ function decode$k(params2) {
|
|
|
29267
29267
|
[]
|
|
29268
29268
|
);
|
|
29269
29269
|
}
|
|
29270
|
-
const config$
|
|
29271
|
-
xmlName: XML_NODE_NAME$
|
|
29272
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
29270
|
+
const config$c = {
|
|
29271
|
+
xmlName: XML_NODE_NAME$d,
|
|
29272
|
+
sdNodeOrKeyName: SD_NODE_NAME$a,
|
|
29273
29273
|
type: NodeTranslator.translatorTypes.NODE,
|
|
29274
|
-
encode: encode$
|
|
29275
|
-
decode: decode$
|
|
29276
|
-
attributes: validXmlAttributes$
|
|
29274
|
+
encode: encode$j,
|
|
29275
|
+
decode: decode$l,
|
|
29276
|
+
attributes: validXmlAttributes$8
|
|
29277
29277
|
};
|
|
29278
|
-
const translator$
|
|
29278
|
+
const translator$s = NodeTranslator.from(config$c);
|
|
29279
29279
|
class CommandService {
|
|
29280
29280
|
/**
|
|
29281
29281
|
* @param {import('./commands/types/index.js').CommandServiceOptions} props
|
|
@@ -30623,7 +30623,7 @@ function prepareTextAnnotation(params2) {
|
|
|
30623
30623
|
return getTextNodeForExport(attrs.displayLabel, [...marks, ...marksFromAttrs], params2);
|
|
30624
30624
|
}
|
|
30625
30625
|
function prepareImageAnnotation(params2, imageSize) {
|
|
30626
|
-
return translator$
|
|
30626
|
+
return translator$s.decode({
|
|
30627
30627
|
...params2,
|
|
30628
30628
|
imageSize
|
|
30629
30629
|
});
|
|
@@ -30947,10 +30947,10 @@ function generateSdtPrTagForStructuredContent({ node }) {
|
|
|
30947
30947
|
};
|
|
30948
30948
|
return result;
|
|
30949
30949
|
}
|
|
30950
|
-
const XML_NODE_NAME$
|
|
30951
|
-
const SD_NODE_NAME$
|
|
30952
|
-
const validXmlAttributes$
|
|
30953
|
-
function encode$
|
|
30950
|
+
const XML_NODE_NAME$c = "w:sdt";
|
|
30951
|
+
const SD_NODE_NAME$9 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
|
|
30952
|
+
const validXmlAttributes$7 = [];
|
|
30953
|
+
function encode$i(params2) {
|
|
30954
30954
|
const nodes = params2.nodes;
|
|
30955
30955
|
const node = nodes[0];
|
|
30956
30956
|
const { type: sdtType, handler: handler2 } = sdtNodeTypeStrategy(node);
|
|
@@ -30960,7 +30960,7 @@ function encode$h(params2) {
|
|
|
30960
30960
|
const result = handler2(params2);
|
|
30961
30961
|
return result;
|
|
30962
30962
|
}
|
|
30963
|
-
function decode$
|
|
30963
|
+
function decode$k(params2) {
|
|
30964
30964
|
const { node } = params2;
|
|
30965
30965
|
if (!node || !node.type) {
|
|
30966
30966
|
return null;
|
|
@@ -30978,15 +30978,15 @@ function decode$j(params2) {
|
|
|
30978
30978
|
const result = decoder();
|
|
30979
30979
|
return result;
|
|
30980
30980
|
}
|
|
30981
|
-
const config$
|
|
30982
|
-
xmlName: XML_NODE_NAME$
|
|
30983
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
30981
|
+
const config$b = {
|
|
30982
|
+
xmlName: XML_NODE_NAME$c,
|
|
30983
|
+
sdNodeOrKeyName: SD_NODE_NAME$9,
|
|
30984
30984
|
type: NodeTranslator.translatorTypes.NODE,
|
|
30985
|
-
encode: encode$
|
|
30986
|
-
decode: decode$
|
|
30987
|
-
attributes: validXmlAttributes$
|
|
30985
|
+
encode: encode$i,
|
|
30986
|
+
decode: decode$k,
|
|
30987
|
+
attributes: validXmlAttributes$7
|
|
30988
30988
|
};
|
|
30989
|
-
const translator$
|
|
30989
|
+
const translator$r = NodeTranslator.from(config$b);
|
|
30990
30990
|
function preProcessVerticalMergeCells(table, { editorSchema }) {
|
|
30991
30991
|
if (!table || !Array.isArray(table.content)) {
|
|
30992
30992
|
return table;
|
|
@@ -31027,17 +31027,17 @@ function preProcessVerticalMergeCells(table, { editorSchema }) {
|
|
|
31027
31027
|
}
|
|
31028
31028
|
return table;
|
|
31029
31029
|
}
|
|
31030
|
-
const translator$
|
|
31030
|
+
const translator$q = NodeTranslator.from({
|
|
31031
31031
|
xmlName: "w:bidiVisual",
|
|
31032
31032
|
sdNodeOrKeyName: "rightToLeft",
|
|
31033
31033
|
encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
|
|
31034
31034
|
decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
|
|
31035
31035
|
});
|
|
31036
|
-
const translator$
|
|
31037
|
-
const translator$
|
|
31038
|
-
const translator$
|
|
31039
|
-
const translator$
|
|
31040
|
-
const translator$
|
|
31036
|
+
const translator$p = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
|
|
31037
|
+
const translator$o = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
|
|
31038
|
+
const translator$n = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
|
|
31039
|
+
const translator$m = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
|
|
31040
|
+
const translator$l = NodeTranslator.from({
|
|
31041
31041
|
xmlName: "w:tblLook",
|
|
31042
31042
|
sdNodeOrKeyName: "tblLook",
|
|
31043
31043
|
attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
|
|
@@ -31049,16 +31049,16 @@ const translator$k = NodeTranslator.from({
|
|
|
31049
31049
|
return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
|
|
31050
31050
|
}
|
|
31051
31051
|
});
|
|
31052
|
-
const translator$
|
|
31053
|
-
const translator$
|
|
31054
|
-
const translator$
|
|
31052
|
+
const translator$k = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
|
|
31053
|
+
const translator$j = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
|
|
31054
|
+
const translator$i = NodeTranslator.from(
|
|
31055
31055
|
createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
|
|
31056
31056
|
);
|
|
31057
|
-
const translator$
|
|
31057
|
+
const translator$h = NodeTranslator.from(
|
|
31058
31058
|
createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
|
|
31059
31059
|
);
|
|
31060
|
-
const translator$
|
|
31061
|
-
const translator$
|
|
31060
|
+
const translator$g = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
|
|
31061
|
+
const translator$f = NodeTranslator.from({
|
|
31062
31062
|
xmlName: "w:tblpPr",
|
|
31063
31063
|
sdNodeOrKeyName: "floatingTableProperties",
|
|
31064
31064
|
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))),
|
|
@@ -31071,35 +31071,36 @@ const translator$e = NodeTranslator.from({
|
|
|
31071
31071
|
}
|
|
31072
31072
|
});
|
|
31073
31073
|
const propertyTranslators$2 = [
|
|
31074
|
-
translator$
|
|
31075
|
-
translator$
|
|
31074
|
+
translator$16,
|
|
31075
|
+
translator$14,
|
|
31076
|
+
translator$12,
|
|
31076
31077
|
translator$11,
|
|
31077
31078
|
translator$10,
|
|
31079
|
+
translator$_,
|
|
31080
|
+
translator$Y,
|
|
31081
|
+
translator$W
|
|
31082
|
+
];
|
|
31083
|
+
const translator$e = NodeTranslator.from(
|
|
31084
|
+
createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$2)
|
|
31085
|
+
);
|
|
31086
|
+
const propertyTranslators$1 = [
|
|
31087
|
+
translator$15,
|
|
31088
|
+
translator$13,
|
|
31078
31089
|
translator$$,
|
|
31079
31090
|
translator$Z,
|
|
31080
31091
|
translator$X,
|
|
31081
31092
|
translator$V
|
|
31082
31093
|
];
|
|
31083
31094
|
const translator$d = NodeTranslator.from(
|
|
31084
|
-
createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$2)
|
|
31085
|
-
);
|
|
31086
|
-
const propertyTranslators$1 = [
|
|
31087
|
-
translator$14,
|
|
31088
|
-
translator$12,
|
|
31089
|
-
translator$_,
|
|
31090
|
-
translator$Y,
|
|
31091
|
-
translator$W,
|
|
31092
|
-
translator$U
|
|
31093
|
-
];
|
|
31094
|
-
const translator$c = NodeTranslator.from(
|
|
31095
31095
|
createNestedPropertiesTranslator("w:tblCellMar", "cellMargins", propertyTranslators$1)
|
|
31096
31096
|
);
|
|
31097
31097
|
const propertyTranslators = [
|
|
31098
|
+
translator$q,
|
|
31099
|
+
translator$C,
|
|
31100
|
+
translator$1a,
|
|
31098
31101
|
translator$p,
|
|
31099
31102
|
translator$B,
|
|
31100
|
-
translator$19,
|
|
31101
31103
|
translator$o,
|
|
31102
|
-
translator$A,
|
|
31103
31104
|
translator$n,
|
|
31104
31105
|
translator$m,
|
|
31105
31106
|
translator$l,
|
|
@@ -31110,13 +31111,12 @@ const propertyTranslators = [
|
|
|
31110
31111
|
translator$g,
|
|
31111
31112
|
translator$f,
|
|
31112
31113
|
translator$e,
|
|
31113
|
-
translator$d
|
|
31114
|
-
translator$c
|
|
31114
|
+
translator$d
|
|
31115
31115
|
];
|
|
31116
|
-
const translator$
|
|
31116
|
+
const translator$c = NodeTranslator.from(
|
|
31117
31117
|
createNestedPropertiesTranslator("w:tblPr", "tableProperties", propertyTranslators)
|
|
31118
31118
|
);
|
|
31119
|
-
const translator$
|
|
31119
|
+
const translator$b = NodeTranslator.from(
|
|
31120
31120
|
createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
|
|
31121
31121
|
);
|
|
31122
31122
|
const DEFAULT_COLUMN_WIDTH_PX = 100;
|
|
@@ -31166,20 +31166,20 @@ const resolveFallbackColumnWidthTwips = (params2, totalColumns, cellMinWidthTwip
|
|
|
31166
31166
|
}
|
|
31167
31167
|
return Math.max(fallbackWidthTwips, cellMinWidthTwips);
|
|
31168
31168
|
};
|
|
31169
|
-
const XML_NODE_NAME$
|
|
31169
|
+
const XML_NODE_NAME$b = "w:tblGrid";
|
|
31170
31170
|
const SD_ATTR_KEY$2 = "grid";
|
|
31171
31171
|
const cellMinWidth = pixelsToTwips(10);
|
|
31172
|
-
const encode$
|
|
31172
|
+
const encode$h = (params2) => {
|
|
31173
31173
|
const { nodes } = params2;
|
|
31174
31174
|
const node = nodes[0];
|
|
31175
|
-
const attributes = encodeProperties(node, { [translator$
|
|
31175
|
+
const attributes = encodeProperties(node, { [translator$b.xmlName]: translator$b }, true);
|
|
31176
31176
|
return {
|
|
31177
|
-
xmlName: XML_NODE_NAME$
|
|
31177
|
+
xmlName: XML_NODE_NAME$b,
|
|
31178
31178
|
sdNodeOrKeyName: SD_ATTR_KEY$2,
|
|
31179
31179
|
attributes
|
|
31180
31180
|
};
|
|
31181
31181
|
};
|
|
31182
|
-
const decode$
|
|
31182
|
+
const decode$j = (params2) => {
|
|
31183
31183
|
const { grid: rawGrid } = params2.node.attrs || {};
|
|
31184
31184
|
const grid = Array.isArray(rawGrid) ? rawGrid : [];
|
|
31185
31185
|
const { firstRow = {} } = params2.extraParams || {};
|
|
@@ -31202,10 +31202,10 @@ const decode$i = (params2) => {
|
|
|
31202
31202
|
const roundedWidth = Math.round(numericWidth);
|
|
31203
31203
|
const minimumWidth = shouldEnforceMinimum ? cellMinWidth : 1;
|
|
31204
31204
|
const safeWidth = Math.max(roundedWidth, minimumWidth);
|
|
31205
|
-
const decoded = translator$
|
|
31205
|
+
const decoded = translator$b.decode({
|
|
31206
31206
|
node: { type: (
|
|
31207
31207
|
/** @type {string} */
|
|
31208
|
-
translator$
|
|
31208
|
+
translator$b.sdNodeOrKeyName
|
|
31209
31209
|
), attrs: { col: safeWidth } }
|
|
31210
31210
|
});
|
|
31211
31211
|
if (decoded) elements.push(decoded);
|
|
@@ -31245,19 +31245,19 @@ const decode$i = (params2) => {
|
|
|
31245
31245
|
columnIndex++;
|
|
31246
31246
|
}
|
|
31247
31247
|
const newNode = {
|
|
31248
|
-
name: XML_NODE_NAME$
|
|
31248
|
+
name: XML_NODE_NAME$b,
|
|
31249
31249
|
attributes: {},
|
|
31250
31250
|
elements
|
|
31251
31251
|
};
|
|
31252
31252
|
return newNode;
|
|
31253
31253
|
};
|
|
31254
|
-
const config$
|
|
31255
|
-
xmlName: XML_NODE_NAME$
|
|
31254
|
+
const config$a = {
|
|
31255
|
+
xmlName: XML_NODE_NAME$b,
|
|
31256
31256
|
sdNodeOrKeyName: SD_ATTR_KEY$2,
|
|
31257
|
-
encode: encode$
|
|
31258
|
-
decode: decode$
|
|
31257
|
+
encode: encode$h,
|
|
31258
|
+
decode: decode$j
|
|
31259
31259
|
};
|
|
31260
|
-
const translator$
|
|
31260
|
+
const translator$a = NodeTranslator.from(config$a);
|
|
31261
31261
|
const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
|
|
31262
31262
|
const DEFAULT_PAGE_MARGIN_TWIPS = 1440;
|
|
31263
31263
|
const DEFAULT_CONTENT_WIDTH_TWIPS = DEFAULT_PAGE_WIDTH_TWIPS - 2 * DEFAULT_PAGE_MARGIN_TWIPS;
|
|
@@ -31320,19 +31320,19 @@ const buildFallbackGridForTable = ({ params: params2, rows, tableWidth, tableWid
|
|
|
31320
31320
|
columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
|
|
31321
31321
|
};
|
|
31322
31322
|
};
|
|
31323
|
-
const XML_NODE_NAME$
|
|
31324
|
-
const SD_NODE_NAME$
|
|
31325
|
-
const encode$
|
|
31323
|
+
const XML_NODE_NAME$a = "w:tbl";
|
|
31324
|
+
const SD_NODE_NAME$8 = "table";
|
|
31325
|
+
const encode$g = (params2, encodedAttrs) => {
|
|
31326
31326
|
const { nodes } = params2;
|
|
31327
31327
|
const node = nodes[0];
|
|
31328
31328
|
const tblPr = node.elements.find((el) => el.name === "w:tblPr");
|
|
31329
31329
|
if (tblPr) {
|
|
31330
|
-
const encodedProperties = translator$
|
|
31330
|
+
const encodedProperties = translator$c.encode({ ...params2, nodes: [tblPr] });
|
|
31331
31331
|
encodedAttrs["tableProperties"] = encodedProperties || {};
|
|
31332
31332
|
}
|
|
31333
31333
|
const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
|
|
31334
31334
|
if (tblGrid) {
|
|
31335
|
-
encodedAttrs["grid"] = translator$
|
|
31335
|
+
encodedAttrs["grid"] = translator$a.encode({ ...params2, nodes: [tblGrid] }).attributes;
|
|
31336
31336
|
}
|
|
31337
31337
|
[
|
|
31338
31338
|
"tableStyleId",
|
|
@@ -31400,7 +31400,7 @@ const encode$f = (params2, encodedAttrs) => {
|
|
|
31400
31400
|
const totalColumns = columnWidths.length;
|
|
31401
31401
|
const activeRowSpans = totalColumns > 0 ? new Array(totalColumns).fill(0) : [];
|
|
31402
31402
|
rows.forEach((row, rowIndex) => {
|
|
31403
|
-
const result = translator$
|
|
31403
|
+
const result = translator$v.encode({
|
|
31404
31404
|
...params2,
|
|
31405
31405
|
nodes: [row],
|
|
31406
31406
|
extraParams: {
|
|
@@ -31454,13 +31454,13 @@ const encode$f = (params2, encodedAttrs) => {
|
|
|
31454
31454
|
attrs: encodedAttrs
|
|
31455
31455
|
};
|
|
31456
31456
|
};
|
|
31457
|
-
const decode$
|
|
31457
|
+
const decode$i = (params2, decodedAttrs) => {
|
|
31458
31458
|
params2.node = preProcessVerticalMergeCells(params2.node, params2);
|
|
31459
31459
|
const { node } = params2;
|
|
31460
31460
|
const elements = translateChildNodes(params2);
|
|
31461
31461
|
const firstRow = node.content?.find((n) => n.type === "tableRow");
|
|
31462
31462
|
const properties = node.attrs.grid;
|
|
31463
|
-
const element = translator$
|
|
31463
|
+
const element = translator$a.decode({
|
|
31464
31464
|
...params2,
|
|
31465
31465
|
node: { ...node, attrs: { ...node.attrs, grid: properties } },
|
|
31466
31466
|
extraParams: {
|
|
@@ -31470,7 +31470,7 @@ const decode$h = (params2, decodedAttrs) => {
|
|
|
31470
31470
|
if (element) elements.unshift(element);
|
|
31471
31471
|
if (node.attrs?.tableProperties) {
|
|
31472
31472
|
const properties2 = { ...node.attrs.tableProperties };
|
|
31473
|
-
const element2 = translator$
|
|
31473
|
+
const element2 = translator$c.decode({
|
|
31474
31474
|
...params2,
|
|
31475
31475
|
node: { ...node, attrs: { ...node.attrs, tableProperties: properties2 } }
|
|
31476
31476
|
});
|
|
@@ -31536,7 +31536,7 @@ function _getReferencedTableStyles(tableStyleReference, params2) {
|
|
|
31536
31536
|
if (baseTblPr && baseTblPr.elements) {
|
|
31537
31537
|
tblPr.elements.push(...baseTblPr.elements);
|
|
31538
31538
|
}
|
|
31539
|
-
const tableProperties = translator$
|
|
31539
|
+
const tableProperties = translator$c.encode({ ...params2, nodes: [tblPr] });
|
|
31540
31540
|
if (tableProperties) {
|
|
31541
31541
|
const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
|
|
31542
31542
|
if (borders) stylesToReturn.borders = borders;
|
|
@@ -31555,85 +31555,85 @@ function _getReferencedTableStyles(tableStyleReference, params2) {
|
|
|
31555
31555
|
}
|
|
31556
31556
|
return stylesToReturn;
|
|
31557
31557
|
}
|
|
31558
|
-
const config$
|
|
31559
|
-
xmlName: XML_NODE_NAME$
|
|
31560
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
31558
|
+
const config$9 = {
|
|
31559
|
+
xmlName: XML_NODE_NAME$a,
|
|
31560
|
+
sdNodeOrKeyName: SD_NODE_NAME$8,
|
|
31561
31561
|
type: NodeTranslator.translatorTypes.NODE,
|
|
31562
|
-
encode: encode$
|
|
31563
|
-
decode: decode$
|
|
31562
|
+
encode: encode$g,
|
|
31563
|
+
decode: decode$i,
|
|
31564
31564
|
attributes: []
|
|
31565
31565
|
};
|
|
31566
|
-
const translator$
|
|
31567
|
-
const encode$
|
|
31566
|
+
const translator$9 = NodeTranslator.from(config$9);
|
|
31567
|
+
const encode$f = (attributes) => {
|
|
31568
31568
|
return attributes["w:id"];
|
|
31569
31569
|
};
|
|
31570
|
-
const decode$
|
|
31570
|
+
const decode$h = (attrs) => {
|
|
31571
31571
|
return attrs.id;
|
|
31572
31572
|
};
|
|
31573
31573
|
const attrConfig$7 = Object.freeze({
|
|
31574
31574
|
xmlName: "w:id",
|
|
31575
31575
|
sdName: "id",
|
|
31576
|
-
encode: encode$
|
|
31577
|
-
decode: decode$
|
|
31576
|
+
encode: encode$f,
|
|
31577
|
+
decode: decode$h
|
|
31578
31578
|
});
|
|
31579
|
-
const encode$
|
|
31579
|
+
const encode$e = (attributes) => {
|
|
31580
31580
|
return attributes["w:name"];
|
|
31581
31581
|
};
|
|
31582
|
-
const decode$
|
|
31582
|
+
const decode$g = (attrs) => {
|
|
31583
31583
|
return attrs.name;
|
|
31584
31584
|
};
|
|
31585
31585
|
const attrConfig$6 = Object.freeze({
|
|
31586
31586
|
xmlName: "w:name",
|
|
31587
31587
|
sdName: "name",
|
|
31588
|
-
encode: encode$
|
|
31589
|
-
decode: decode$
|
|
31588
|
+
encode: encode$e,
|
|
31589
|
+
decode: decode$g
|
|
31590
31590
|
});
|
|
31591
|
-
const encode$
|
|
31591
|
+
const encode$d = (attributes) => {
|
|
31592
31592
|
return attributes["w:colFirst"];
|
|
31593
31593
|
};
|
|
31594
|
-
const decode$
|
|
31594
|
+
const decode$f = (attrs) => {
|
|
31595
31595
|
return attrs.colFirst;
|
|
31596
31596
|
};
|
|
31597
31597
|
const attrConfig$5 = Object.freeze({
|
|
31598
31598
|
xmlName: "w:colFirst",
|
|
31599
31599
|
sdName: "colFirst",
|
|
31600
|
-
encode: encode$
|
|
31601
|
-
decode: decode$
|
|
31600
|
+
encode: encode$d,
|
|
31601
|
+
decode: decode$f
|
|
31602
31602
|
});
|
|
31603
|
-
const encode$
|
|
31603
|
+
const encode$c = (attributes) => {
|
|
31604
31604
|
return attributes["w:colLast"];
|
|
31605
31605
|
};
|
|
31606
|
-
const decode$
|
|
31606
|
+
const decode$e = (attrs) => {
|
|
31607
31607
|
return attrs.colLast;
|
|
31608
31608
|
};
|
|
31609
31609
|
const attrConfig$4 = Object.freeze({
|
|
31610
31610
|
xmlName: "w:colLast",
|
|
31611
31611
|
sdName: "colLast",
|
|
31612
|
-
encode: encode$
|
|
31613
|
-
decode: decode$
|
|
31612
|
+
encode: encode$c,
|
|
31613
|
+
decode: decode$e
|
|
31614
31614
|
});
|
|
31615
|
-
const encode$
|
|
31615
|
+
const encode$b = (attributes) => {
|
|
31616
31616
|
return attributes["w:displacedByCustomXml"];
|
|
31617
31617
|
};
|
|
31618
|
-
const decode$
|
|
31618
|
+
const decode$d = (attrs) => {
|
|
31619
31619
|
return attrs.displacedByCustomXml;
|
|
31620
31620
|
};
|
|
31621
31621
|
const attrConfig$3 = Object.freeze({
|
|
31622
31622
|
xmlName: "w:displacedByCustomXml",
|
|
31623
31623
|
sdName: "displacedByCustomXml",
|
|
31624
|
-
encode: encode$
|
|
31625
|
-
decode: decode$
|
|
31624
|
+
encode: encode$b,
|
|
31625
|
+
decode: decode$d
|
|
31626
31626
|
});
|
|
31627
|
-
const validXmlAttributes$
|
|
31628
|
-
const XML_NODE_NAME$
|
|
31629
|
-
const SD_NODE_NAME$
|
|
31630
|
-
const encode$
|
|
31627
|
+
const validXmlAttributes$6 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
|
|
31628
|
+
const XML_NODE_NAME$9 = "w:bookmarkStart";
|
|
31629
|
+
const SD_NODE_NAME$7 = "bookmarkStart";
|
|
31630
|
+
const encode$a = (params2, encodedAttrs = {}) => {
|
|
31631
31631
|
return {
|
|
31632
31632
|
type: "bookmarkStart",
|
|
31633
31633
|
attrs: encodedAttrs
|
|
31634
31634
|
};
|
|
31635
31635
|
};
|
|
31636
|
-
const decode$
|
|
31636
|
+
const decode$c = (params2, decodedAttrs = {}) => {
|
|
31637
31637
|
const result = {
|
|
31638
31638
|
name: "w:bookmarkStart",
|
|
31639
31639
|
elements: []
|
|
@@ -31643,49 +31643,49 @@ const decode$b = (params2, decodedAttrs = {}) => {
|
|
|
31643
31643
|
}
|
|
31644
31644
|
return result;
|
|
31645
31645
|
};
|
|
31646
|
-
const config$
|
|
31647
|
-
xmlName: XML_NODE_NAME$
|
|
31648
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
31646
|
+
const config$8 = {
|
|
31647
|
+
xmlName: XML_NODE_NAME$9,
|
|
31648
|
+
sdNodeOrKeyName: SD_NODE_NAME$7,
|
|
31649
31649
|
type: NodeTranslator.translatorTypes.NODE,
|
|
31650
|
-
encode: encode$
|
|
31651
|
-
decode: decode$
|
|
31652
|
-
attributes: validXmlAttributes$
|
|
31650
|
+
encode: encode$a,
|
|
31651
|
+
decode: decode$c,
|
|
31652
|
+
attributes: validXmlAttributes$6
|
|
31653
31653
|
};
|
|
31654
|
-
const translator$
|
|
31655
|
-
const encode$
|
|
31654
|
+
const translator$8 = NodeTranslator.from(config$8);
|
|
31655
|
+
const encode$9 = (attributes) => {
|
|
31656
31656
|
return attributes["w:id"];
|
|
31657
31657
|
};
|
|
31658
|
-
const decode$
|
|
31658
|
+
const decode$b = (attrs) => {
|
|
31659
31659
|
return attrs.id;
|
|
31660
31660
|
};
|
|
31661
31661
|
const attrConfig$2 = Object.freeze({
|
|
31662
31662
|
xmlName: "w:id",
|
|
31663
31663
|
sdName: "id",
|
|
31664
|
-
encode: encode$
|
|
31665
|
-
decode: decode$
|
|
31664
|
+
encode: encode$9,
|
|
31665
|
+
decode: decode$b
|
|
31666
31666
|
});
|
|
31667
|
-
const encode$
|
|
31667
|
+
const encode$8 = (attributes) => {
|
|
31668
31668
|
return attributes["w:displacedByCustomXml"];
|
|
31669
31669
|
};
|
|
31670
|
-
const decode$
|
|
31670
|
+
const decode$a = (attrs) => {
|
|
31671
31671
|
return attrs.displacedByCustomXml;
|
|
31672
31672
|
};
|
|
31673
31673
|
const attrConfig$1 = Object.freeze({
|
|
31674
31674
|
xmlName: "w:displacedByCustomXml",
|
|
31675
31675
|
sdName: "displacedByCustomXml",
|
|
31676
|
-
encode: encode$
|
|
31677
|
-
decode: decode$
|
|
31676
|
+
encode: encode$8,
|
|
31677
|
+
decode: decode$a
|
|
31678
31678
|
});
|
|
31679
|
-
const validXmlAttributes$
|
|
31680
|
-
const XML_NODE_NAME$
|
|
31681
|
-
const SD_NODE_NAME$
|
|
31682
|
-
const encode$
|
|
31679
|
+
const validXmlAttributes$5 = [attrConfig$2, attrConfig$1];
|
|
31680
|
+
const XML_NODE_NAME$8 = "w:bookmarkEnd";
|
|
31681
|
+
const SD_NODE_NAME$6 = "bookmarkEnd";
|
|
31682
|
+
const encode$7 = (params2, encodedAttrs = {}) => {
|
|
31683
31683
|
return {
|
|
31684
31684
|
type: "bookmarkEnd",
|
|
31685
31685
|
attrs: encodedAttrs
|
|
31686
31686
|
};
|
|
31687
31687
|
};
|
|
31688
|
-
const decode$
|
|
31688
|
+
const decode$9 = (params2, decodedAttrs = {}) => {
|
|
31689
31689
|
const result = {
|
|
31690
31690
|
name: "w:bookmarkEnd",
|
|
31691
31691
|
elements: []
|
|
@@ -31695,27 +31695,27 @@ const decode$8 = (params2, decodedAttrs = {}) => {
|
|
|
31695
31695
|
}
|
|
31696
31696
|
return result;
|
|
31697
31697
|
};
|
|
31698
|
-
const config$
|
|
31699
|
-
xmlName: XML_NODE_NAME$
|
|
31700
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
31698
|
+
const config$7 = {
|
|
31699
|
+
xmlName: XML_NODE_NAME$8,
|
|
31700
|
+
sdNodeOrKeyName: SD_NODE_NAME$6,
|
|
31701
31701
|
type: NodeTranslator.translatorTypes.NODE,
|
|
31702
|
-
encode: encode$
|
|
31703
|
-
decode: decode$
|
|
31704
|
-
attributes: validXmlAttributes$
|
|
31702
|
+
encode: encode$7,
|
|
31703
|
+
decode: decode$9,
|
|
31704
|
+
attributes: validXmlAttributes$5
|
|
31705
31705
|
};
|
|
31706
|
-
const translator$
|
|
31707
|
-
const decode$
|
|
31706
|
+
const translator$7 = NodeTranslator.from(config$7);
|
|
31707
|
+
const decode$8 = (attrs) => attrs?.["w:id"];
|
|
31708
31708
|
const attrConfig = Object.freeze({
|
|
31709
31709
|
xmlName: "w:id",
|
|
31710
31710
|
sdName: "w:id",
|
|
31711
31711
|
// We do not translate it from 'w:id' to 'id' when encoding, so the name is the same
|
|
31712
31712
|
encode: () => {
|
|
31713
31713
|
},
|
|
31714
|
-
decode: decode$
|
|
31714
|
+
decode: decode$8
|
|
31715
31715
|
});
|
|
31716
|
-
const XML_NODE_NAME$
|
|
31717
|
-
const SD_NODE_NAME$
|
|
31718
|
-
const decode$
|
|
31716
|
+
const XML_NODE_NAME$7 = "w:commentRange";
|
|
31717
|
+
const SD_NODE_NAME$5 = "commentRange";
|
|
31718
|
+
const decode$7 = (params2) => {
|
|
31719
31719
|
const { node, comments, commentsExportType, exportedCommentDefs } = params2;
|
|
31720
31720
|
if (!node) return;
|
|
31721
31721
|
if (!comments) return;
|
|
@@ -31758,19 +31758,19 @@ const getCommentSchema = (type2, commentIndex) => {
|
|
|
31758
31758
|
};
|
|
31759
31759
|
};
|
|
31760
31760
|
const getConfig = (type2) => ({
|
|
31761
|
-
xmlName: `${XML_NODE_NAME$
|
|
31762
|
-
sdNodeOrKeyName: `${SD_NODE_NAME$
|
|
31761
|
+
xmlName: `${XML_NODE_NAME$7}${type2}`,
|
|
31762
|
+
sdNodeOrKeyName: `${SD_NODE_NAME$5}${type2}`,
|
|
31763
31763
|
type: NodeTranslator.translatorTypes.NODE,
|
|
31764
31764
|
encode: () => {
|
|
31765
31765
|
},
|
|
31766
|
-
decode: decode$
|
|
31766
|
+
decode: decode$7,
|
|
31767
31767
|
attributes: [attrConfig]
|
|
31768
31768
|
});
|
|
31769
31769
|
const commentRangeStartTranslator = NodeTranslator.from(getConfig("Start"));
|
|
31770
31770
|
const commentRangeEndTranslator = NodeTranslator.from(getConfig("End"));
|
|
31771
|
-
const XML_NODE_NAME$
|
|
31772
|
-
const SD_NODE_NAME$
|
|
31773
|
-
const encode$
|
|
31771
|
+
const XML_NODE_NAME$6 = "sd:pageReference";
|
|
31772
|
+
const SD_NODE_NAME$4 = "pageReference";
|
|
31773
|
+
const encode$6 = (params2) => {
|
|
31774
31774
|
const { nodes = [], nodeListHandler } = params2 || {};
|
|
31775
31775
|
const node = nodes[0];
|
|
31776
31776
|
const processedText = nodeListHandler.handler({
|
|
@@ -31787,7 +31787,7 @@ const encode$5 = (params2) => {
|
|
|
31787
31787
|
};
|
|
31788
31788
|
return processedNode;
|
|
31789
31789
|
};
|
|
31790
|
-
const decode$
|
|
31790
|
+
const decode$6 = (params2) => {
|
|
31791
31791
|
const { node } = params2;
|
|
31792
31792
|
const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
|
|
31793
31793
|
const contentNodes = (node.content ?? []).flatMap((n) => exportSchemaToJson({ ...params2, node: n }));
|
|
@@ -31860,17 +31860,17 @@ const decode$5 = (params2) => {
|
|
|
31860
31860
|
];
|
|
31861
31861
|
return translated;
|
|
31862
31862
|
};
|
|
31863
|
-
const config$
|
|
31864
|
-
xmlName: XML_NODE_NAME$
|
|
31865
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
31863
|
+
const config$6 = {
|
|
31864
|
+
xmlName: XML_NODE_NAME$6,
|
|
31865
|
+
sdNodeOrKeyName: SD_NODE_NAME$4,
|
|
31866
31866
|
type: NodeTranslator.translatorTypes.NODE,
|
|
31867
|
-
encode: encode$
|
|
31868
|
-
decode: decode$
|
|
31867
|
+
encode: encode$6,
|
|
31868
|
+
decode: decode$6
|
|
31869
31869
|
};
|
|
31870
|
-
const translator$
|
|
31871
|
-
const XML_NODE_NAME$
|
|
31872
|
-
const SD_NODE_NAME$
|
|
31873
|
-
const encode$
|
|
31870
|
+
const translator$6 = NodeTranslator.from(config$6);
|
|
31871
|
+
const XML_NODE_NAME$5 = "sd:tableOfContents";
|
|
31872
|
+
const SD_NODE_NAME$3 = "tableOfContents";
|
|
31873
|
+
const encode$5 = (params2) => {
|
|
31874
31874
|
const { nodes = [], nodeListHandler } = params2 || {};
|
|
31875
31875
|
const node = nodes[0];
|
|
31876
31876
|
const processedContent = nodeListHandler.handler({
|
|
@@ -31886,7 +31886,7 @@ const encode$4 = (params2) => {
|
|
|
31886
31886
|
};
|
|
31887
31887
|
return processedNode;
|
|
31888
31888
|
};
|
|
31889
|
-
const decode$
|
|
31889
|
+
const decode$5 = (params2) => {
|
|
31890
31890
|
const { node } = params2;
|
|
31891
31891
|
const contentNodes = node.content.map((n) => exportSchemaToJson({ ...params2, node: n }));
|
|
31892
31892
|
const tocBeginElements = [
|
|
@@ -31933,14 +31933,14 @@ const decode$4 = (params2) => {
|
|
|
31933
31933
|
}
|
|
31934
31934
|
return contentNodes;
|
|
31935
31935
|
};
|
|
31936
|
-
const config$
|
|
31937
|
-
xmlName: XML_NODE_NAME$
|
|
31938
|
-
sdNodeOrKeyName: SD_NODE_NAME$
|
|
31936
|
+
const config$5 = {
|
|
31937
|
+
xmlName: XML_NODE_NAME$5,
|
|
31938
|
+
sdNodeOrKeyName: SD_NODE_NAME$3,
|
|
31939
31939
|
type: NodeTranslator.translatorTypes.NODE,
|
|
31940
|
-
encode: encode$
|
|
31941
|
-
decode: decode$
|
|
31940
|
+
encode: encode$5,
|
|
31941
|
+
decode: decode$5
|
|
31942
31942
|
};
|
|
31943
|
-
const translator$
|
|
31943
|
+
const translator$5 = NodeTranslator.from(config$5);
|
|
31944
31944
|
function parseInlineStyles(styleString) {
|
|
31945
31945
|
if (!styleString) return {};
|
|
31946
31946
|
return styleString.split(";").filter((style2) => !!style2.trim()).reduce((acc, style2) => {
|
|
@@ -32076,7 +32076,7 @@ const handleDrawingNode = (params2) => {
|
|
|
32076
32076
|
if (mainNode.name === "w:drawing") node = mainNode;
|
|
32077
32077
|
else node = mainNode.elements.find((el) => el.name === "w:drawing");
|
|
32078
32078
|
if (!node) return { nodes: [], consumed: 0 };
|
|
32079
|
-
const schemaNode = translator$
|
|
32079
|
+
const schemaNode = translator$s.encode(params2);
|
|
32080
32080
|
const newNodes = schemaNode ? [schemaNode] : [];
|
|
32081
32081
|
return { nodes: newNodes, consumed: 1 };
|
|
32082
32082
|
};
|
|
@@ -32101,15 +32101,15 @@ const createTrackStyleMark = (marks) => {
|
|
|
32101
32101
|
}
|
|
32102
32102
|
return void 0;
|
|
32103
32103
|
};
|
|
32104
|
-
const XML_NODE_NAME$
|
|
32104
|
+
const XML_NODE_NAME$4 = "w:del";
|
|
32105
32105
|
const SD_ATTR_KEY$1 = "trackDelete";
|
|
32106
|
-
const validXmlAttributes$
|
|
32106
|
+
const validXmlAttributes$4 = [
|
|
32107
32107
|
createAttributeHandler("w:id", "id"),
|
|
32108
32108
|
createAttributeHandler("w:date", "date"),
|
|
32109
32109
|
createAttributeHandler("w:author", "author"),
|
|
32110
32110
|
createAttributeHandler("w:authorEmail", "authorEmail")
|
|
32111
32111
|
];
|
|
32112
|
-
const encode$
|
|
32112
|
+
const encode$4 = (params2, encodedAttrs = {}) => {
|
|
32113
32113
|
const { nodeListHandler, extraParams = {} } = params2;
|
|
32114
32114
|
const { node } = extraParams;
|
|
32115
32115
|
const subs = nodeListHandler.handler({
|
|
@@ -32125,7 +32125,7 @@ const encode$3 = (params2, encodedAttrs = {}) => {
|
|
|
32125
32125
|
});
|
|
32126
32126
|
return subs;
|
|
32127
32127
|
};
|
|
32128
|
-
function decode$
|
|
32128
|
+
function decode$4(params2) {
|
|
32129
32129
|
const { node } = params2;
|
|
32130
32130
|
if (!node || !node.type) {
|
|
32131
32131
|
return null;
|
|
@@ -32152,24 +32152,24 @@ function decode$3(params2) {
|
|
|
32152
32152
|
elements: [translatedTextNode]
|
|
32153
32153
|
};
|
|
32154
32154
|
}
|
|
32155
|
-
const config$
|
|
32156
|
-
xmlName: XML_NODE_NAME$
|
|
32155
|
+
const config$4 = {
|
|
32156
|
+
xmlName: XML_NODE_NAME$4,
|
|
32157
32157
|
sdNodeOrKeyName: SD_ATTR_KEY$1,
|
|
32158
32158
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
32159
|
-
encode: encode$
|
|
32160
|
-
decode: decode$
|
|
32161
|
-
attributes: validXmlAttributes$
|
|
32159
|
+
encode: encode$4,
|
|
32160
|
+
decode: decode$4,
|
|
32161
|
+
attributes: validXmlAttributes$4
|
|
32162
32162
|
};
|
|
32163
|
-
const translator$
|
|
32164
|
-
const XML_NODE_NAME$
|
|
32163
|
+
const translator$4 = NodeTranslator.from(config$4);
|
|
32164
|
+
const XML_NODE_NAME$3 = "w:ins";
|
|
32165
32165
|
const SD_ATTR_KEY = "trackInsert";
|
|
32166
|
-
const validXmlAttributes$
|
|
32166
|
+
const validXmlAttributes$3 = [
|
|
32167
32167
|
createAttributeHandler("w:id", "id"),
|
|
32168
32168
|
createAttributeHandler("w:date", "date"),
|
|
32169
32169
|
createAttributeHandler("w:author", "author"),
|
|
32170
32170
|
createAttributeHandler("w:authorEmail", "authorEmail")
|
|
32171
32171
|
];
|
|
32172
|
-
const encode$
|
|
32172
|
+
const encode$3 = (params2, encodedAttrs = {}) => {
|
|
32173
32173
|
const { nodeListHandler, extraParams = {} } = params2;
|
|
32174
32174
|
const { node } = extraParams;
|
|
32175
32175
|
const subs = nodeListHandler.handler({
|
|
@@ -32185,7 +32185,7 @@ const encode$2 = (params2, encodedAttrs = {}) => {
|
|
|
32185
32185
|
});
|
|
32186
32186
|
return subs;
|
|
32187
32187
|
};
|
|
32188
|
-
function decode$
|
|
32188
|
+
function decode$3(params2) {
|
|
32189
32189
|
const { node } = params2;
|
|
32190
32190
|
if (!node || !node.type) {
|
|
32191
32191
|
return null;
|
|
@@ -32210,15 +32210,15 @@ function decode$2(params2) {
|
|
|
32210
32210
|
elements: [translatedTextNode]
|
|
32211
32211
|
};
|
|
32212
32212
|
}
|
|
32213
|
-
const config$
|
|
32214
|
-
xmlName: XML_NODE_NAME$
|
|
32213
|
+
const config$3 = {
|
|
32214
|
+
xmlName: XML_NODE_NAME$3,
|
|
32215
32215
|
sdNodeOrKeyName: SD_ATTR_KEY,
|
|
32216
32216
|
type: NodeTranslator.translatorTypes.ATTRIBUTE,
|
|
32217
|
-
encode: encode$
|
|
32218
|
-
decode: decode$
|
|
32219
|
-
attributes: validXmlAttributes$
|
|
32217
|
+
encode: encode$3,
|
|
32218
|
+
decode: decode$3,
|
|
32219
|
+
attributes: validXmlAttributes$3
|
|
32220
32220
|
};
|
|
32221
|
-
const translator$
|
|
32221
|
+
const translator$3 = NodeTranslator.from(config$3);
|
|
32222
32222
|
const isTrackChangeElement = (node) => node?.name === "w:del" || node?.name === "w:ins";
|
|
32223
32223
|
const unwrapTrackChangeNode = (node) => {
|
|
32224
32224
|
if (!node) {
|
|
@@ -32257,7 +32257,7 @@ const handleTrackChangeNode = (params2) => {
|
|
|
32257
32257
|
};
|
|
32258
32258
|
switch (mainNode.name) {
|
|
32259
32259
|
case "w:del":
|
|
32260
|
-
result = translator$
|
|
32260
|
+
result = translator$4.encode({
|
|
32261
32261
|
extraParams: {
|
|
32262
32262
|
node: mainNode
|
|
32263
32263
|
},
|
|
@@ -32265,7 +32265,7 @@ const handleTrackChangeNode = (params2) => {
|
|
|
32265
32265
|
});
|
|
32266
32266
|
break;
|
|
32267
32267
|
case "w:ins":
|
|
32268
|
-
result = translator$
|
|
32268
|
+
result = translator$3.encode({
|
|
32269
32269
|
extraParams: {
|
|
32270
32270
|
node: mainNode
|
|
32271
32271
|
},
|
|
@@ -32279,8 +32279,118 @@ const trackChangeNodeHandlerEntity = {
|
|
|
32279
32279
|
handlerName: "trackChangeNodeHandler",
|
|
32280
32280
|
handler: handleTrackChangeNode
|
|
32281
32281
|
};
|
|
32282
|
-
const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$
|
|
32283
|
-
const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$
|
|
32282
|
+
const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$1d);
|
|
32283
|
+
const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$1c);
|
|
32284
|
+
const XML_NODE_NAME$2 = "w:t";
|
|
32285
|
+
const SD_NODE_NAME$2 = "text";
|
|
32286
|
+
const validXmlAttributes$2 = [createAttributeHandler("xml:space", "xmlSpace")];
|
|
32287
|
+
const encode$2 = (params2, encodedAttrs = {}) => {
|
|
32288
|
+
const { node } = params2.extraParams;
|
|
32289
|
+
const { elements, type: type2, attributes } = node;
|
|
32290
|
+
let text;
|
|
32291
|
+
if (elements.length === 1) {
|
|
32292
|
+
text = elements[0].text;
|
|
32293
|
+
const xmlSpace = encodedAttrs.xmlSpace ?? elements[0]?.attributes?.["xml:space"];
|
|
32294
|
+
if (xmlSpace !== "preserve" && typeof text === "string") {
|
|
32295
|
+
text = text.replace(/^\s+/, "").replace(/\s+$/, "");
|
|
32296
|
+
}
|
|
32297
|
+
text = text.replace(/\[\[sdspace\]\]/g, "");
|
|
32298
|
+
} else if (!elements.length && encodedAttrs.xmlSpace === "preserve") {
|
|
32299
|
+
text = " ";
|
|
32300
|
+
} else return null;
|
|
32301
|
+
return {
|
|
32302
|
+
type: "text",
|
|
32303
|
+
text,
|
|
32304
|
+
attrs: { type: type2, attributes: attributes || {} },
|
|
32305
|
+
marks: []
|
|
32306
|
+
};
|
|
32307
|
+
};
|
|
32308
|
+
const decode$2 = (params2, decodedAttrs = {}) => {
|
|
32309
|
+
const { node, extraParams } = params2;
|
|
32310
|
+
if (!node || !node.type) {
|
|
32311
|
+
return null;
|
|
32312
|
+
}
|
|
32313
|
+
const trackedMarks = ["trackDelete", "trackInsert"];
|
|
32314
|
+
const trackedMark = node.marks?.find((m2) => trackedMarks.includes(m2.type));
|
|
32315
|
+
if (trackedMark) {
|
|
32316
|
+
switch (trackedMark.type) {
|
|
32317
|
+
case "trackDelete":
|
|
32318
|
+
return translator$4.decode(params2);
|
|
32319
|
+
case "trackInsert":
|
|
32320
|
+
return translator$3.decode(params2);
|
|
32321
|
+
}
|
|
32322
|
+
}
|
|
32323
|
+
const isLinkNode = node.marks?.some((m2) => m2.type === "link");
|
|
32324
|
+
if (isLinkNode && !extraParams?.linkProcessed) {
|
|
32325
|
+
return translator$1d.decode(params2);
|
|
32326
|
+
}
|
|
32327
|
+
const { text, marks = [] } = node;
|
|
32328
|
+
return getTextNodeForExport(text, marks, params2);
|
|
32329
|
+
};
|
|
32330
|
+
const config$2 = {
|
|
32331
|
+
xmlName: XML_NODE_NAME$2,
|
|
32332
|
+
sdNodeOrKeyName: SD_NODE_NAME$2,
|
|
32333
|
+
type: NodeTranslator.translatorTypes.NODE,
|
|
32334
|
+
encode: encode$2,
|
|
32335
|
+
decode: decode$2,
|
|
32336
|
+
attributes: validXmlAttributes$2
|
|
32337
|
+
};
|
|
32338
|
+
const translator$2 = NodeTranslator.from(config$2);
|
|
32339
|
+
const handleTextNode = (params2) => {
|
|
32340
|
+
const { nodes, insideTrackChange } = params2;
|
|
32341
|
+
if (nodes.length === 0 || !(nodes[0].name === "w:t" || insideTrackChange && nodes[0].name === "w:delText")) {
|
|
32342
|
+
return { nodes: [], consumed: 0 };
|
|
32343
|
+
}
|
|
32344
|
+
const node = nodes[0];
|
|
32345
|
+
const resultNode = translator$2.encode({
|
|
32346
|
+
...params2,
|
|
32347
|
+
extraParams: {
|
|
32348
|
+
...params2.extraParams || {},
|
|
32349
|
+
node
|
|
32350
|
+
}
|
|
32351
|
+
});
|
|
32352
|
+
if (!resultNode) return { nodes: [], consumed: 0 };
|
|
32353
|
+
return {
|
|
32354
|
+
nodes: [resultNode],
|
|
32355
|
+
consumed: 1
|
|
32356
|
+
};
|
|
32357
|
+
};
|
|
32358
|
+
const textNodeHandlerEntity = {
|
|
32359
|
+
handlerName: "textNodeHandler",
|
|
32360
|
+
handler: handleTextNode
|
|
32361
|
+
};
|
|
32362
|
+
const handleParagraphNode = (params2) => {
|
|
32363
|
+
const { nodes } = params2;
|
|
32364
|
+
if (nodes.length === 0 || nodes[0].name !== "w:p") {
|
|
32365
|
+
return { nodes: [], consumed: 0 };
|
|
32366
|
+
}
|
|
32367
|
+
const schemaNode = translator$1p.encode(params2);
|
|
32368
|
+
const newNodes = schemaNode ? [schemaNode] : [];
|
|
32369
|
+
return { nodes: newNodes, consumed: 1 };
|
|
32370
|
+
};
|
|
32371
|
+
const paragraphNodeHandlerEntity = {
|
|
32372
|
+
handlerName: "paragraphNodeHandler",
|
|
32373
|
+
handler: handleParagraphNode
|
|
32374
|
+
};
|
|
32375
|
+
const handleSdtNode = (params2) => {
|
|
32376
|
+
const { nodes } = params2;
|
|
32377
|
+
if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
|
|
32378
|
+
return { nodes: [], consumed: 0 };
|
|
32379
|
+
}
|
|
32380
|
+
const result = translator$r.encode(params2);
|
|
32381
|
+
if (!result) {
|
|
32382
|
+
return { nodes: [], consumed: 0 };
|
|
32383
|
+
}
|
|
32384
|
+
const resultNodes = Array.isArray(result) ? result : [result];
|
|
32385
|
+
return {
|
|
32386
|
+
nodes: resultNodes,
|
|
32387
|
+
consumed: 1
|
|
32388
|
+
};
|
|
32389
|
+
};
|
|
32390
|
+
const sdtNodeHandlerEntity = {
|
|
32391
|
+
handlerName: "sdtNodeHandler",
|
|
32392
|
+
handler: handleSdtNode
|
|
32393
|
+
};
|
|
32284
32394
|
function parseProperties(node) {
|
|
32285
32395
|
const marks = [];
|
|
32286
32396
|
const unknownMarks = [];
|
|
@@ -32332,73 +32442,6 @@ function getElementName(element) {
|
|
|
32332
32442
|
const isPropertiesElement = (element) => {
|
|
32333
32443
|
return !!SuperConverter.propertyTypes[element.name || element.type];
|
|
32334
32444
|
};
|
|
32335
|
-
const handleTextNode = (params2) => {
|
|
32336
|
-
const { nodes, insideTrackChange } = params2;
|
|
32337
|
-
if (nodes.length === 0 || !(nodes[0].name === "w:t" || insideTrackChange && nodes[0].name === "w:delText")) {
|
|
32338
|
-
return { nodes: [], consumed: 0 };
|
|
32339
|
-
}
|
|
32340
|
-
const node = nodes[0];
|
|
32341
|
-
const { type: type2 } = node;
|
|
32342
|
-
const { attributes, elements, marks = [] } = parseProperties(node);
|
|
32343
|
-
let text;
|
|
32344
|
-
if (elements.length === 1) {
|
|
32345
|
-
text = elements[0].text;
|
|
32346
|
-
const xmlSpace = node.attributes?.["xml:space"] ?? elements[0]?.attributes?.["xml:space"];
|
|
32347
|
-
if (xmlSpace !== "preserve" && typeof text === "string") {
|
|
32348
|
-
text = text.replace(/^\s+/, "").replace(/\s+$/, "");
|
|
32349
|
-
}
|
|
32350
|
-
text = text.replace(/\[\[sdspace\]\]/g, "");
|
|
32351
|
-
} else if (!elements.length && "attributes" in node && node.attributes["xml:space"] === "preserve") {
|
|
32352
|
-
text = " ";
|
|
32353
|
-
} else return { nodes: [], consumed: 0 };
|
|
32354
|
-
return {
|
|
32355
|
-
nodes: [
|
|
32356
|
-
{
|
|
32357
|
-
type: getElementName(node),
|
|
32358
|
-
text,
|
|
32359
|
-
attrs: { type: type2, attributes: attributes || {} },
|
|
32360
|
-
marks
|
|
32361
|
-
}
|
|
32362
|
-
],
|
|
32363
|
-
consumed: 1
|
|
32364
|
-
};
|
|
32365
|
-
};
|
|
32366
|
-
const textNodeHandlerEntity = {
|
|
32367
|
-
handlerName: "textNodeHandler",
|
|
32368
|
-
handler: handleTextNode
|
|
32369
|
-
};
|
|
32370
|
-
const handleParagraphNode = (params2) => {
|
|
32371
|
-
const { nodes } = params2;
|
|
32372
|
-
if (nodes.length === 0 || nodes[0].name !== "w:p") {
|
|
32373
|
-
return { nodes: [], consumed: 0 };
|
|
32374
|
-
}
|
|
32375
|
-
const schemaNode = translator$1o.encode(params2);
|
|
32376
|
-
const newNodes = schemaNode ? [schemaNode] : [];
|
|
32377
|
-
return { nodes: newNodes, consumed: 1 };
|
|
32378
|
-
};
|
|
32379
|
-
const paragraphNodeHandlerEntity = {
|
|
32380
|
-
handlerName: "paragraphNodeHandler",
|
|
32381
|
-
handler: handleParagraphNode
|
|
32382
|
-
};
|
|
32383
|
-
const handleSdtNode = (params2) => {
|
|
32384
|
-
const { nodes } = params2;
|
|
32385
|
-
if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
|
|
32386
|
-
return { nodes: [], consumed: 0 };
|
|
32387
|
-
}
|
|
32388
|
-
const result = translator$q.encode(params2);
|
|
32389
|
-
if (!result) {
|
|
32390
|
-
return { nodes: [], consumed: 0 };
|
|
32391
|
-
}
|
|
32392
|
-
const resultNodes = Array.isArray(result) ? result : [result];
|
|
32393
|
-
return {
|
|
32394
|
-
nodes: resultNodes,
|
|
32395
|
-
consumed: 1
|
|
32396
|
-
};
|
|
32397
|
-
};
|
|
32398
|
-
const sdtNodeHandlerEntity = {
|
|
32399
|
-
handlerName: "sdtNodeHandler",
|
|
32400
|
-
handler: handleSdtNode
|
|
32401
|
-
};
|
|
32402
32445
|
const handleStandardNode = (params2) => {
|
|
32403
32446
|
const { nodes, docx, nodeListHandler } = params2;
|
|
32404
32447
|
if (!nodes || nodes.length === 0) {
|
|
@@ -32475,7 +32518,7 @@ const handler = (params2) => {
|
|
|
32475
32518
|
if (nodes.length === 0 || nodes[0].name !== "w:br") {
|
|
32476
32519
|
return { nodes: [], consumed: 0 };
|
|
32477
32520
|
}
|
|
32478
|
-
const result = translator$
|
|
32521
|
+
const result = translator$1s.encode(params2);
|
|
32479
32522
|
if (!result) return { nodes: [], consumed: 0 };
|
|
32480
32523
|
return {
|
|
32481
32524
|
nodes: [result],
|
|
@@ -32547,7 +32590,7 @@ const handleBookmarkStartNode = (params2) => {
|
|
|
32547
32590
|
if (isCustomMarkBookmark(nodes[0], params2.editor)) {
|
|
32548
32591
|
return handleBookmarkNode(params2);
|
|
32549
32592
|
}
|
|
32550
|
-
const node = translator$
|
|
32593
|
+
const node = translator$8.encode(params2);
|
|
32551
32594
|
if (!node) return { nodes: [], consumed: 0 };
|
|
32552
32595
|
return { nodes: [node], consumed: 1 };
|
|
32553
32596
|
};
|
|
@@ -32579,7 +32622,7 @@ const handleBookmarkEndNode = (params2) => {
|
|
|
32579
32622
|
if (!nodes.length || nodes[0].name !== "w:bookmarkEnd") {
|
|
32580
32623
|
return { nodes: [], consumed: 0 };
|
|
32581
32624
|
}
|
|
32582
|
-
const node = translator$
|
|
32625
|
+
const node = translator$7.encode(params2);
|
|
32583
32626
|
if (!node) return { nodes: [], consumed: 0 };
|
|
32584
32627
|
return { nodes: [node], consumed: 1 };
|
|
32585
32628
|
};
|
|
@@ -32778,7 +32821,7 @@ const autoTotalPageCountEntity = {
|
|
|
32778
32821
|
handlerName: "autoTotalPageCountEntity",
|
|
32779
32822
|
handler: handleAutoTotalPageNumber
|
|
32780
32823
|
};
|
|
32781
|
-
const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$
|
|
32824
|
+
const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$6);
|
|
32782
32825
|
const handlePictNode = (params2) => {
|
|
32783
32826
|
const { nodes } = params2;
|
|
32784
32827
|
if (!nodes.length || nodes[0].name !== "w:p") {
|
|
@@ -33172,15 +33215,15 @@ const handleTabNode = (params2) => {
|
|
|
33172
33215
|
if (!nodes.length || nodes[0].name !== "w:tab") {
|
|
33173
33216
|
return { nodes: [], consumed: 0 };
|
|
33174
33217
|
}
|
|
33175
|
-
const node = translator$
|
|
33218
|
+
const node = translator$1q.encode(params2);
|
|
33176
33219
|
return { nodes: [node], consumed: 1 };
|
|
33177
33220
|
};
|
|
33178
33221
|
const tabNodeEntityHandler = {
|
|
33179
33222
|
handlerName: "w:tabTranslator",
|
|
33180
33223
|
handler: handleTabNode
|
|
33181
33224
|
};
|
|
33182
|
-
const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$
|
|
33183
|
-
const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$
|
|
33225
|
+
const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$9);
|
|
33226
|
+
const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$5);
|
|
33184
33227
|
function preProcessPageInstruction(nodesToCombine) {
|
|
33185
33228
|
const pageNumNode = {
|
|
33186
33229
|
name: "sd:autoPageNumber",
|
|
@@ -34075,7 +34118,7 @@ function translateVRectContentBlock(params2) {
|
|
|
34075
34118
|
const XML_NODE_NAME = "w:pict";
|
|
34076
34119
|
const SD_NODE_NAME = ["shapeContainer", "contentBlock"];
|
|
34077
34120
|
const validXmlAttributes = [];
|
|
34078
|
-
function encode$
|
|
34121
|
+
function encode$1d(params2) {
|
|
34079
34122
|
const { node, pNode } = params2.extraParams;
|
|
34080
34123
|
const { type: pictType, handler: handler2 } = pictNodeTypeStrategy(node);
|
|
34081
34124
|
if (!handler2 || pictType === "unknown") {
|
|
@@ -34107,7 +34150,7 @@ const config = {
|
|
|
34107
34150
|
xmlName: XML_NODE_NAME,
|
|
34108
34151
|
sdNodeOrKeyName: SD_NODE_NAME,
|
|
34109
34152
|
type: NodeTranslator.translatorTypes.NODE,
|
|
34110
|
-
encode: encode$
|
|
34153
|
+
encode: encode$1d,
|
|
34111
34154
|
decode,
|
|
34112
34155
|
attributes: validXmlAttributes
|
|
34113
34156
|
};
|
|
@@ -34223,21 +34266,21 @@ function exportSchemaToJson(params2) {
|
|
|
34223
34266
|
doc: translateDocumentNode,
|
|
34224
34267
|
body: translateBodyNode,
|
|
34225
34268
|
heading: translateHeadingNode,
|
|
34226
|
-
paragraph: translator$
|
|
34227
|
-
run: translator$
|
|
34228
|
-
text:
|
|
34269
|
+
paragraph: translator$1p,
|
|
34270
|
+
run: translator$1c,
|
|
34271
|
+
text: translator$2,
|
|
34229
34272
|
bulletList: translateList,
|
|
34230
34273
|
orderedList: translateList,
|
|
34231
|
-
lineBreak: translator$
|
|
34232
|
-
table: translator$
|
|
34233
|
-
tableRow: translator$
|
|
34234
|
-
tableCell: translator$
|
|
34235
|
-
bookmarkStart: translator$
|
|
34236
|
-
bookmarkEnd: translator$
|
|
34237
|
-
fieldAnnotation: translator$
|
|
34238
|
-
tab: translator$
|
|
34239
|
-
image: translator$
|
|
34240
|
-
hardBreak: translator$
|
|
34274
|
+
lineBreak: translator$1s,
|
|
34275
|
+
table: translator$9,
|
|
34276
|
+
tableRow: translator$v,
|
|
34277
|
+
tableCell: translator$I,
|
|
34278
|
+
bookmarkStart: translator$8,
|
|
34279
|
+
bookmarkEnd: translator$7,
|
|
34280
|
+
fieldAnnotation: translator$r,
|
|
34281
|
+
tab: translator$1q,
|
|
34282
|
+
image: translator$s,
|
|
34283
|
+
hardBreak: translator$1s,
|
|
34241
34284
|
commentRangeStart: commentRangeStartTranslator,
|
|
34242
34285
|
commentRangeEnd: commentRangeEndTranslator,
|
|
34243
34286
|
commentReference: () => null,
|
|
@@ -34245,14 +34288,14 @@ function exportSchemaToJson(params2) {
|
|
|
34245
34288
|
shapeTextbox: translator,
|
|
34246
34289
|
contentBlock: translator,
|
|
34247
34290
|
vectorShape: translateVectorShape,
|
|
34248
|
-
structuredContent: translator$
|
|
34249
|
-
structuredContentBlock: translator$
|
|
34250
|
-
documentPartObject: translator$
|
|
34251
|
-
documentSection: translator$
|
|
34291
|
+
structuredContent: translator$r,
|
|
34292
|
+
structuredContentBlock: translator$r,
|
|
34293
|
+
documentPartObject: translator$r,
|
|
34294
|
+
documentSection: translator$r,
|
|
34252
34295
|
"page-number": translatePageNumberNode,
|
|
34253
34296
|
"total-page-number": translateTotalPageNumberNode,
|
|
34254
|
-
pageReference: translator$
|
|
34255
|
-
tableOfContents: translator$
|
|
34297
|
+
pageReference: translator$6,
|
|
34298
|
+
tableOfContents: translator$5
|
|
34256
34299
|
};
|
|
34257
34300
|
let handler2 = router[type2];
|
|
34258
34301
|
if (handler2 && "decode" in handler2 && typeof handler2.decode === "function") {
|
|
@@ -34585,25 +34628,6 @@ function getTextNodeForExport(text, marks, params2) {
|
|
|
34585
34628
|
}
|
|
34586
34629
|
return wrapTextInRun(textNodes, outputMarks);
|
|
34587
34630
|
}
|
|
34588
|
-
function translateTextNode(params2) {
|
|
34589
|
-
const { node, extraParams } = params2;
|
|
34590
|
-
const trackedMarks = [TrackInsertMarkName, TrackDeleteMarkName];
|
|
34591
|
-
const trackedMark = node.marks?.find((m2) => trackedMarks.includes(m2.type));
|
|
34592
|
-
if (trackedMark) {
|
|
34593
|
-
switch (trackedMark.type) {
|
|
34594
|
-
case "trackDelete":
|
|
34595
|
-
return translator$3.decode(params2);
|
|
34596
|
-
case "trackInsert":
|
|
34597
|
-
return translator$2.decode(params2);
|
|
34598
|
-
}
|
|
34599
|
-
}
|
|
34600
|
-
const isLinkNode = node.marks?.some((m2) => m2.type === "link");
|
|
34601
|
-
if (isLinkNode && !extraParams?.linkProcessed) {
|
|
34602
|
-
return translator$1c.decode(params2);
|
|
34603
|
-
}
|
|
34604
|
-
const { text, marks = [] } = node;
|
|
34605
|
-
return getTextNodeForExport(text, marks, params2);
|
|
34606
|
-
}
|
|
34607
34631
|
function wrapTextInRun(nodeOrNodes, marks) {
|
|
34608
34632
|
let elements = [];
|
|
34609
34633
|
if (Array.isArray(nodeOrNodes)) elements = nodeOrNodes;
|
|
@@ -34859,7 +34883,7 @@ function translateMark(mark) {
|
|
|
34859
34883
|
markElement.type = "element";
|
|
34860
34884
|
break;
|
|
34861
34885
|
case "underline": {
|
|
34862
|
-
const translated = translator$
|
|
34886
|
+
const translated = translator$1m.decode({
|
|
34863
34887
|
node: {
|
|
34864
34888
|
attrs: {
|
|
34865
34889
|
underlineType: attrs.underlineType ?? attrs.underline ?? null,
|
|
@@ -34923,7 +34947,7 @@ function translateMark(mark) {
|
|
|
34923
34947
|
break;
|
|
34924
34948
|
case "highlight": {
|
|
34925
34949
|
const highlightValue = attrs.color ?? attrs.highlight ?? null;
|
|
34926
|
-
const translated = translator$
|
|
34950
|
+
const translated = translator$1r.decode({ node: { attrs: { highlight: highlightValue } } });
|
|
34927
34951
|
return translated || {};
|
|
34928
34952
|
}
|
|
34929
34953
|
case "link":
|
|
@@ -38670,7 +38694,7 @@ var __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, "rea
|
|
|
38670
38694
|
var __privateAdd$1 = (obj, member, value) => member.has(obj) ? __typeError$1("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
38671
38695
|
var __privateSet = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
|
|
38672
38696
|
var __privateMethod$1 = (obj, member, method) => (__accessCheck$1(obj, member, "access private method"), method);
|
|
38673
|
-
var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn,
|
|
38697
|
+
var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, determineUnsupportedFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ListItemNodeView_instances, init_fn3, applyIndentStyling_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
|
|
38674
38698
|
var GOOD_LEAF_SIZE = 200;
|
|
38675
38699
|
var RopeSequence = function RopeSequence2() {
|
|
38676
38700
|
};
|
|
@@ -53068,8 +53092,9 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
53068
53092
|
/**
|
|
53069
53093
|
* Set the document mode
|
|
53070
53094
|
* @param {string} documentMode - The document mode ('editing', 'viewing', 'suggesting')
|
|
53095
|
+
* @param {string} caller - Calling context
|
|
53071
53096
|
*/
|
|
53072
|
-
setDocumentMode(documentMode) {
|
|
53097
|
+
setDocumentMode(documentMode, caller) {
|
|
53073
53098
|
if (this.options.isHeaderOrFooter || this.options.isChildEditor) return;
|
|
53074
53099
|
let cleanedMode = documentMode?.toLowerCase() || "editing";
|
|
53075
53100
|
if (!this.extensionService || !this.state) return;
|
|
@@ -53080,32 +53105,32 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
53080
53105
|
this.commands.toggleTrackChangesShowOriginal();
|
|
53081
53106
|
this.setEditable(false, false);
|
|
53082
53107
|
this.setOptions({ documentMode: "viewing" });
|
|
53083
|
-
|
|
53084
|
-
|
|
53085
|
-
|
|
53086
|
-
|
|
53087
|
-
|
|
53088
|
-
|
|
53108
|
+
if (caller !== "init")
|
|
53109
|
+
toggleHeaderFooterEditMode({
|
|
53110
|
+
editor: this,
|
|
53111
|
+
focusedSectionEditor: null,
|
|
53112
|
+
isEditMode: false,
|
|
53113
|
+
documentMode: cleanedMode
|
|
53114
|
+
});
|
|
53089
53115
|
if (pm) pm.classList.add("view-mode");
|
|
53090
53116
|
} else if (cleanedMode === "suggesting") {
|
|
53091
|
-
__privateMethod$1(this, _Editor_instances, registerPluginByNameIfNotExists_fn).call(this, "TrackChangesBase");
|
|
53092
53117
|
this.commands.disableTrackChangesShowOriginal();
|
|
53093
53118
|
this.commands.enableTrackChanges();
|
|
53094
53119
|
this.setOptions({ documentMode: "suggesting" });
|
|
53095
53120
|
this.setEditable(true, false);
|
|
53096
53121
|
if (pm) pm.classList.remove("view-mode");
|
|
53097
53122
|
} else if (cleanedMode === "editing") {
|
|
53098
|
-
__privateMethod$1(this, _Editor_instances, registerPluginByNameIfNotExists_fn).call(this, "TrackChangesBase");
|
|
53099
53123
|
this.commands.disableTrackChangesShowOriginal();
|
|
53100
53124
|
this.commands.disableTrackChanges();
|
|
53101
53125
|
this.setEditable(true, false);
|
|
53102
53126
|
this.setOptions({ documentMode: "editing" });
|
|
53103
|
-
|
|
53104
|
-
|
|
53105
|
-
|
|
53106
|
-
|
|
53107
|
-
|
|
53108
|
-
|
|
53127
|
+
if (caller !== "init")
|
|
53128
|
+
toggleHeaderFooterEditMode({
|
|
53129
|
+
editor: this,
|
|
53130
|
+
focusedSectionEditor: null,
|
|
53131
|
+
isEditMode: false,
|
|
53132
|
+
documentMode: cleanedMode
|
|
53133
|
+
});
|
|
53109
53134
|
if (pm) pm.classList.remove("view-mode");
|
|
53110
53135
|
}
|
|
53111
53136
|
}
|
|
@@ -53940,7 +53965,7 @@ init_fn = function() {
|
|
|
53940
53965
|
if (shouldMigrateListsOnInit) {
|
|
53941
53966
|
this.migrateListsToV2();
|
|
53942
53967
|
}
|
|
53943
|
-
this.setDocumentMode(this.options.documentMode);
|
|
53968
|
+
this.setDocumentMode(this.options.documentMode, "init");
|
|
53944
53969
|
if (!this.options.ydoc) {
|
|
53945
53970
|
if (!this.options.isChildEditor) {
|
|
53946
53971
|
__privateMethod$1(this, _Editor_instances, initPagination_fn).call(this);
|
|
@@ -54014,12 +54039,6 @@ insertNewFileData_fn = function() {
|
|
|
54014
54039
|
__privateMethod$1(this, _Editor_instances, initComments_fn).call(this);
|
|
54015
54040
|
}, 50);
|
|
54016
54041
|
};
|
|
54017
|
-
registerPluginByNameIfNotExists_fn = function(name) {
|
|
54018
|
-
const plugin2 = this.extensionService?.plugins.find((p) => p.key.startsWith(name));
|
|
54019
|
-
const hasPlugin = this.state?.plugins?.find((p) => p.key.startsWith(name));
|
|
54020
|
-
if (plugin2 && !hasPlugin) this.registerPlugin(plugin2);
|
|
54021
|
-
return plugin2?.key;
|
|
54022
|
-
};
|
|
54023
54042
|
createExtensionService_fn = function() {
|
|
54024
54043
|
const allowedExtensions = ["extension", "node", "mark"];
|
|
54025
54044
|
const coreExtensions = [Editable, Commands, EditorFocus, Keymap];
|
|
@@ -58632,7 +58651,8 @@ function orderedListSync(editor) {
|
|
|
58632
58651
|
const updateNodeViews = transactions.some((tr2) => tr2.getMeta("updatedListItemNodeViews"));
|
|
58633
58652
|
if (updateNodeViews || !hasInitialized) refreshAllListItemNodeViews();
|
|
58634
58653
|
const isFromPlugin = transactions.some((tr2) => tr2.getMeta("orderedListSync"));
|
|
58635
|
-
|
|
58654
|
+
const docChanged = transactions.some((tr2) => tr2.docChanged) && !oldState.doc.eq(newState.doc);
|
|
58655
|
+
if (isFromPlugin || !docChanged) {
|
|
58636
58656
|
return null;
|
|
58637
58657
|
}
|
|
58638
58658
|
hasInitialized = true;
|
|
@@ -65284,6 +65304,7 @@ const ImageRegistrationPlugin = ({ editor }) => {
|
|
|
65284
65304
|
},
|
|
65285
65305
|
appendTransaction: (trs, _oldState, state2) => {
|
|
65286
65306
|
let foundImages = [];
|
|
65307
|
+
if (!trs.some((tr) => tr.docChanged)) return null;
|
|
65287
65308
|
trs.forEach((tr) => {
|
|
65288
65309
|
if (tr.docChanged) {
|
|
65289
65310
|
tr.steps.forEach((step, index2) => {
|
|
@@ -65627,7 +65648,7 @@ const Image = Node$1.create({
|
|
|
65627
65648
|
return {
|
|
65628
65649
|
allowBase64: true,
|
|
65629
65650
|
htmlAttributes: {
|
|
65630
|
-
style: "display: inline-block;
|
|
65651
|
+
style: "display: inline-block;",
|
|
65631
65652
|
"aria-label": "Image node"
|
|
65632
65653
|
}
|
|
65633
65654
|
};
|
|
@@ -91900,89 +91921,89 @@ const _sfc_main = {
|
|
|
91900
91921
|
const SuperInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4d5cff52"]]);
|
|
91901
91922
|
const additionalHandlers = Object.freeze({
|
|
91902
91923
|
"mc:AlternateContent": translator$1,
|
|
91903
|
-
"sd:pageReference": translator$
|
|
91904
|
-
"sd:tableOfContents": translator$
|
|
91905
|
-
"w:b": translator$
|
|
91906
|
-
"w:bidiVisual": translator$
|
|
91907
|
-
"w:bookmarkEnd": translator$
|
|
91908
|
-
"w:bookmarkStart": translator$
|
|
91909
|
-
"w:bottom": translator$
|
|
91910
|
-
"w:br": translator$
|
|
91911
|
-
"w:cantSplit": translator$
|
|
91912
|
-
"w:cnfStyle": translator$
|
|
91913
|
-
"w:color": translator$
|
|
91914
|
-
"w:divId": translator$
|
|
91915
|
-
"w:drawing": translator$
|
|
91916
|
-
"w:end": translator$
|
|
91917
|
-
"w:gridAfter": translator$
|
|
91918
|
-
"w:gridBefore": translator$
|
|
91919
|
-
"w:gridCol": translator$
|
|
91920
|
-
"w:hidden": translator$
|
|
91921
|
-
"w:highlight": translator$
|
|
91922
|
-
"w:hyperlink": translator$
|
|
91923
|
-
"w:i": translator$
|
|
91924
|
-
"w:insideH": translator$
|
|
91925
|
-
"w:insideV": translator$
|
|
91926
|
-
"w:jc": translator$
|
|
91927
|
-
"w:left": translator
|
|
91928
|
-
"w:p": translator$
|
|
91929
|
-
"w:r": translator$
|
|
91930
|
-
"w:rFonts": translator$
|
|
91931
|
-
"w:rPr": translator$
|
|
91932
|
-
"w:rStyle": translator$
|
|
91933
|
-
"w:right": translator$
|
|
91934
|
-
"w:sdt": translator$
|
|
91935
|
-
"w:shd": translator$
|
|
91936
|
-
"w:start": translator$
|
|
91937
|
-
"w:strike": translator$
|
|
91938
|
-
"w:sz": translator$
|
|
91939
|
-
"w:szCs": translator$
|
|
91940
|
-
"w:tab": translator$
|
|
91941
|
-
"w:tbl": translator$
|
|
91942
|
-
"w:tblBorders": translator$
|
|
91943
|
-
"w:tblCaption": translator$
|
|
91944
|
-
"w:tblCellMar": translator$
|
|
91945
|
-
"w:tblCellSpacing": translator$
|
|
91946
|
-
"w:tblDescription": translator$
|
|
91947
|
-
"w:tblGrid": translator$
|
|
91948
|
-
"w:tblHeader": translator$
|
|
91949
|
-
"w:tblInd": translator$
|
|
91950
|
-
"w:tblLayout": translator$
|
|
91951
|
-
"w:tblLook": translator$
|
|
91952
|
-
"w:tblOverlap": translator$
|
|
91953
|
-
"w:tblPr": translator$
|
|
91954
|
-
"w:tblStyle": translator$
|
|
91955
|
-
"w:tblStyleColBandSize": translator$
|
|
91956
|
-
"w:tblStyleRowBandSize": translator$
|
|
91957
|
-
"w:tblW": translator$
|
|
91958
|
-
"w:tblpPr": translator$
|
|
91959
|
-
"w:tc": translator$
|
|
91960
|
-
"w:top": translator$
|
|
91961
|
-
"w:tr": translator$
|
|
91962
|
-
"w:trHeight": translator$
|
|
91963
|
-
"w:trPr": translator$
|
|
91964
|
-
"w:u": translator$
|
|
91965
|
-
"w:wAfter": translator$
|
|
91966
|
-
"w:wBefore": translator$
|
|
91967
|
-
"wp:anchor": translator$
|
|
91968
|
-
"wp:inline": translator$
|
|
91924
|
+
"sd:pageReference": translator$6,
|
|
91925
|
+
"sd:tableOfContents": translator$5,
|
|
91926
|
+
"w:b": translator$1o,
|
|
91927
|
+
"w:bidiVisual": translator$q,
|
|
91928
|
+
"w:bookmarkEnd": translator$7,
|
|
91929
|
+
"w:bookmarkStart": translator$8,
|
|
91930
|
+
"w:bottom": translator$16,
|
|
91931
|
+
"w:br": translator$1s,
|
|
91932
|
+
"w:cantSplit": translator$H,
|
|
91933
|
+
"w:cnfStyle": translator$1b,
|
|
91934
|
+
"w:color": translator$1k,
|
|
91935
|
+
"w:divId": translator$G,
|
|
91936
|
+
"w:drawing": translator$s,
|
|
91937
|
+
"w:end": translator$14,
|
|
91938
|
+
"w:gridAfter": translator$F,
|
|
91939
|
+
"w:gridBefore": translator$E,
|
|
91940
|
+
"w:gridCol": translator$b,
|
|
91941
|
+
"w:hidden": translator$D,
|
|
91942
|
+
"w:highlight": translator$1r,
|
|
91943
|
+
"w:hyperlink": translator$1d,
|
|
91944
|
+
"w:i": translator$1n,
|
|
91945
|
+
"w:insideH": translator$12,
|
|
91946
|
+
"w:insideV": translator$11,
|
|
91947
|
+
"w:jc": translator$C,
|
|
91948
|
+
"w:left": translator$10,
|
|
91949
|
+
"w:p": translator$1p,
|
|
91950
|
+
"w:r": translator$1c,
|
|
91951
|
+
"w:rFonts": translator$1j,
|
|
91952
|
+
"w:rPr": translator$1e,
|
|
91953
|
+
"w:rStyle": translator$1i,
|
|
91954
|
+
"w:right": translator$_,
|
|
91955
|
+
"w:sdt": translator$r,
|
|
91956
|
+
"w:shd": translator$1a,
|
|
91957
|
+
"w:start": translator$Y,
|
|
91958
|
+
"w:strike": translator$1l,
|
|
91959
|
+
"w:sz": translator$1h,
|
|
91960
|
+
"w:szCs": translator$1g,
|
|
91961
|
+
"w:tab": translator$1q,
|
|
91962
|
+
"w:tbl": translator$9,
|
|
91963
|
+
"w:tblBorders": translator$e,
|
|
91964
|
+
"w:tblCaption": translator$p,
|
|
91965
|
+
"w:tblCellMar": translator$d,
|
|
91966
|
+
"w:tblCellSpacing": translator$B,
|
|
91967
|
+
"w:tblDescription": translator$o,
|
|
91968
|
+
"w:tblGrid": translator$a,
|
|
91969
|
+
"w:tblHeader": translator$A,
|
|
91970
|
+
"w:tblInd": translator$n,
|
|
91971
|
+
"w:tblLayout": translator$m,
|
|
91972
|
+
"w:tblLook": translator$l,
|
|
91973
|
+
"w:tblOverlap": translator$k,
|
|
91974
|
+
"w:tblPr": translator$c,
|
|
91975
|
+
"w:tblStyle": translator$j,
|
|
91976
|
+
"w:tblStyleColBandSize": translator$i,
|
|
91977
|
+
"w:tblStyleRowBandSize": translator$h,
|
|
91978
|
+
"w:tblW": translator$g,
|
|
91979
|
+
"w:tblpPr": translator$f,
|
|
91980
|
+
"w:tc": translator$I,
|
|
91981
|
+
"w:top": translator$W,
|
|
91982
|
+
"w:tr": translator$v,
|
|
91983
|
+
"w:trHeight": translator$z,
|
|
91984
|
+
"w:trPr": translator$w,
|
|
91985
|
+
"w:u": translator$1m,
|
|
91986
|
+
"w:wAfter": translator$y,
|
|
91987
|
+
"w:wBefore": translator$x,
|
|
91988
|
+
"wp:anchor": translator$u,
|
|
91989
|
+
"wp:inline": translator$t,
|
|
91969
91990
|
"w:commentRangeStart": commentRangeStartTranslator,
|
|
91970
91991
|
"w:commentRangeEnd": commentRangeEndTranslator,
|
|
91971
|
-
"w:vMerge": translator$
|
|
91972
|
-
"w:gridSpan": translator$
|
|
91973
|
-
"w:vAlign": translator$
|
|
91974
|
-
"w:noWrap": translator$
|
|
91975
|
-
"w:tcFitText": translator$
|
|
91976
|
-
"w:tcW": translator$
|
|
91977
|
-
"w:hideMark": translator$
|
|
91978
|
-
"w:textDirection": translator$
|
|
91979
|
-
"w:tl2br": translator$
|
|
91980
|
-
"w:tr2bl": translator$
|
|
91981
|
-
"w:header": translator$
|
|
91982
|
-
"w:headers": translator$
|
|
91983
|
-
"w:tcBorders": translator$
|
|
91984
|
-
"w:tcMar": translator$
|
|
91985
|
-
"w:tcPr": translator$
|
|
91992
|
+
"w:vMerge": translator$17,
|
|
91993
|
+
"w:gridSpan": translator$18,
|
|
91994
|
+
"w:vAlign": translator$N,
|
|
91995
|
+
"w:noWrap": translator$R,
|
|
91996
|
+
"w:tcFitText": translator$O,
|
|
91997
|
+
"w:tcW": translator$19,
|
|
91998
|
+
"w:hideMark": translator$M,
|
|
91999
|
+
"w:textDirection": translator$P,
|
|
92000
|
+
"w:tl2br": translator$U,
|
|
92001
|
+
"w:tr2bl": translator$T,
|
|
92002
|
+
"w:header": translator$L,
|
|
92003
|
+
"w:headers": translator$K,
|
|
92004
|
+
"w:tcBorders": translator$S,
|
|
92005
|
+
"w:tcMar": translator$Q,
|
|
92006
|
+
"w:tcPr": translator$J
|
|
91986
92007
|
});
|
|
91987
92008
|
const baseHandlers = {
|
|
91988
92009
|
...runPropertyTranslators,
|