@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.
Files changed (34) hide show
  1. package/dist/chunks/{PdfViewer-CZjW8f3f.cjs → PdfViewer-DfV9m2w-.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-DD5F97cu.es.js → PdfViewer-XosZYIXN.es.js} +1 -1
  3. package/dist/chunks/{index-DykhO4QQ.es.js → index-C-bRwL21.es.js} +2 -2
  4. package/dist/chunks/{index-BnppcMmx.cjs → index-D6Of6iAY.cjs} +2 -2
  5. package/dist/chunks/{super-editor.es-DgZmzGBh.cjs → super-editor.es-CcOevWta.cjs} +890 -869
  6. package/dist/chunks/{super-editor.es-DYmxXX-J.es.js → super-editor.es-DIXtx-tf.es.js} +890 -869
  7. package/dist/core/types/index.d.ts +1 -1
  8. package/dist/core/types/index.d.ts.map +1 -1
  9. package/dist/stores/comments-store.d.ts +1 -1
  10. package/dist/super-editor/ai-writer.es.js +2 -2
  11. package/dist/super-editor/chunks/{converter-CSVDRdnO.js → converter-wp7RjeT9.js} +867 -843
  12. package/dist/super-editor/chunks/{docx-zipper-rJLEcjUK.js → docx-zipper-CcShJNvj.js} +1 -1
  13. package/dist/super-editor/chunks/{editor-CCcFa6pi.js → editor-BRaGPAFY.js} +23 -20
  14. package/dist/super-editor/chunks/{toolbar-BJMZP9uq.js → toolbar-CJn7VKcT.js} +2 -2
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/super-editor/src/core/Editor.d.ts +2 -1
  20. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/docxImporter.d.ts +1 -0
  21. package/dist/super-editor/super-editor/src/core/super-converter/v2/importer/types/index.d.ts +1 -0
  22. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/t/index.d.ts +1 -0
  23. package/dist/super-editor/super-editor/src/core/super-converter/v3/handlers/w/t/t-translator.d.ts +7 -0
  24. package/dist/super-editor/super-editor/src/core/super-converter/v3/node-translator/node-translator.d.ts +2 -1
  25. package/dist/super-editor/super-editor/src/extensions/track-changes/permission-helpers.d.ts +1 -1
  26. package/dist/super-editor/super-editor.es.js +6 -6
  27. package/dist/super-editor/toolbar.es.js +2 -2
  28. package/dist/super-editor.cjs +1 -1
  29. package/dist/super-editor.es.js +1 -1
  30. package/dist/superdoc.cjs +2 -2
  31. package/dist/superdoc.es.js +2 -2
  32. package/dist/superdoc.umd.js +890 -869
  33. package/dist/superdoc.umd.js.map +1 -1
  34. package/package.json +1 -1
@@ -24343,9 +24343,6 @@
24343
24343
  DOCUMENT_RELS_XML_DEF,
24344
24344
  CONTENT_TYPES
24345
24345
  };
24346
- const TrackInsertMarkName = "trackInsert";
24347
- const TrackDeleteMarkName = "trackDelete";
24348
- const TrackFormatMarkName = "trackFormat";
24349
24346
  const carbonCopy = (obj) => {
24350
24347
  if (!obj) return void 0;
24351
24348
  try {
@@ -32391,37 +32388,37 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32391
32388
  };
32392
32389
  __publicField$2(_NodeTranslator, "translatorTypes", TranslatorTypes);
32393
32390
  let NodeTranslator = _NodeTranslator;
32394
- const encode$1b = (attributes) => {
32391
+ const encode$1c = (attributes) => {
32395
32392
  return attributes["w:type"];
32396
32393
  };
32397
- const decode$13 = (attrs) => {
32394
+ const decode$14 = (attrs) => {
32398
32395
  const { lineBreakType } = attrs;
32399
32396
  return lineBreakType;
32400
32397
  };
32401
32398
  const attrConfig$G = Object.freeze({
32402
32399
  xmlName: "w:type",
32403
32400
  sdName: "lineBreakType",
32404
- encode: encode$1b,
32405
- decode: decode$13
32401
+ encode: encode$1c,
32402
+ decode: decode$14
32406
32403
  });
32407
- const encode$1a = (attributes) => {
32404
+ const encode$1b = (attributes) => {
32408
32405
  const xmlAttrValue = attributes["w:clear"];
32409
32406
  return xmlAttrValue;
32410
32407
  };
32411
- const decode$12 = (attrs) => {
32408
+ const decode$13 = (attrs) => {
32412
32409
  const { clear } = attrs;
32413
32410
  return clear;
32414
32411
  };
32415
32412
  const attrConfig$F = Object.freeze({
32416
32413
  xmlName: "w:clear",
32417
32414
  sdName: "clear",
32418
- encode: encode$1a,
32419
- decode: decode$12
32415
+ encode: encode$1b,
32416
+ decode: decode$13
32420
32417
  });
32421
- const validXmlAttributes$p = [attrConfig$G, attrConfig$F];
32422
- const XML_NODE_NAME$y = "w:br";
32423
- const SD_NODE_NAME$h = "lineBreak";
32424
- const encode$19 = (_2, encodedAttrs) => {
32418
+ const validXmlAttributes$q = [attrConfig$G, attrConfig$F];
32419
+ const XML_NODE_NAME$z = "w:br";
32420
+ const SD_NODE_NAME$i = "lineBreak";
32421
+ const encode$1a = (_2, encodedAttrs) => {
32425
32422
  const isPageBreak = encodedAttrs?.lineBreakType === "page";
32426
32423
  const translated = {
32427
32424
  type: isPageBreak ? "hardBreak" : "lineBreak"
@@ -32431,7 +32428,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32431
32428
  }
32432
32429
  return translated;
32433
32430
  };
32434
- const decode$11 = (params2, decodedAttrs) => {
32431
+ const decode$12 = (params2, decodedAttrs) => {
32435
32432
  const { node } = params2;
32436
32433
  if (!node) return;
32437
32434
  const wBreak = { name: "w:br" };
@@ -32448,39 +32445,39 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32448
32445
  };
32449
32446
  return translated;
32450
32447
  };
32451
- const config$x = {
32452
- xmlName: XML_NODE_NAME$y,
32453
- sdNodeOrKeyName: SD_NODE_NAME$h,
32448
+ const config$y = {
32449
+ xmlName: XML_NODE_NAME$z,
32450
+ sdNodeOrKeyName: SD_NODE_NAME$i,
32454
32451
  type: NodeTranslator.translatorTypes.NODE,
32455
- encode: encode$19,
32456
- decode: decode$11,
32457
- attributes: validXmlAttributes$p
32452
+ encode: encode$1a,
32453
+ decode: decode$12,
32454
+ attributes: validXmlAttributes$q
32458
32455
  };
32459
- const translator$1r = NodeTranslator.from(config$x);
32460
- const encode$18 = (attributes) => attributes?.["w:val"];
32461
- const decode$10 = (attrs) => attrs?.highlight;
32456
+ const translator$1s = NodeTranslator.from(config$y);
32457
+ const encode$19 = (attributes) => attributes?.["w:val"];
32458
+ const decode$11 = (attrs) => attrs?.highlight;
32462
32459
  const attrConfig$E = Object.freeze({
32463
32460
  xmlName: "w:val",
32464
32461
  sdName: "highlight",
32465
- encode: encode$18,
32466
- decode: decode$10
32462
+ encode: encode$19,
32463
+ decode: decode$11
32467
32464
  });
32468
- const validXmlAttributes$o = [attrConfig$E];
32469
- const XML_NODE_NAME$x = "w:highlight";
32465
+ const validXmlAttributes$p = [attrConfig$E];
32466
+ const XML_NODE_NAME$y = "w:highlight";
32470
32467
  const SD_ATTR_KEY$f = "highlight";
32471
32468
  const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
32472
- const encode$17 = (params2, encodedAttrs = {}) => {
32469
+ const encode$18 = (params2, encodedAttrs = {}) => {
32473
32470
  const { nodes } = params2;
32474
32471
  const node = nodes?.[0];
32475
32472
  const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
32476
32473
  return {
32477
32474
  type: "attr",
32478
- xmlName: XML_NODE_NAME$x,
32475
+ xmlName: XML_NODE_NAME$y,
32479
32476
  sdNodeOrKeyName: SD_ATTR_KEY$f,
32480
32477
  attributes: { "w:val": value ?? null }
32481
32478
  };
32482
32479
  };
32483
- const decode$$ = (params2) => {
32480
+ const decode$10 = (params2) => {
32484
32481
  const attrs = params2?.node?.attrs || {};
32485
32482
  const highlightValue = attrs.highlight ?? attrs.color ?? null;
32486
32483
  if (!highlightValue) return void 0;
@@ -32488,14 +32485,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32488
32485
  if (!normalizedValue) return void 0;
32489
32486
  if (DISABLED_TOKENS.has(normalizedValue)) {
32490
32487
  return {
32491
- name: XML_NODE_NAME$x,
32488
+ name: XML_NODE_NAME$y,
32492
32489
  attributes: { "w:val": "none" }
32493
32490
  };
32494
32491
  }
32495
32492
  const keyword = getDocxHighlightKeywordFromHex(highlightValue);
32496
32493
  if (keyword) {
32497
32494
  return {
32498
- name: XML_NODE_NAME$x,
32495
+ name: XML_NODE_NAME$y,
32499
32496
  attributes: { "w:val": keyword }
32500
32497
  };
32501
32498
  }
@@ -32510,63 +32507,63 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32510
32507
  }
32511
32508
  };
32512
32509
  };
32513
- const config$w = {
32514
- xmlName: XML_NODE_NAME$x,
32510
+ const config$x = {
32511
+ xmlName: XML_NODE_NAME$y,
32515
32512
  sdNodeOrKeyName: SD_ATTR_KEY$f,
32516
32513
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
32517
- encode: encode$17,
32518
- decode: decode$$,
32519
- attributes: validXmlAttributes$o
32514
+ encode: encode$18,
32515
+ decode: decode$10,
32516
+ attributes: validXmlAttributes$p
32520
32517
  };
32521
- const translator$1q = NodeTranslator.from(config$w);
32522
- const encode$16 = (attributes) => {
32518
+ const translator$1r = NodeTranslator.from(config$x);
32519
+ const encode$17 = (attributes) => {
32523
32520
  return attributes["w:val"];
32524
32521
  };
32525
- const decode$_ = (attrs) => {
32522
+ const decode$$ = (attrs) => {
32526
32523
  const { tabSize } = attrs || {};
32527
32524
  return tabSize;
32528
32525
  };
32529
32526
  const attrConfig$D = Object.freeze({
32530
32527
  xmlName: "w:val",
32531
32528
  sdName: "tabSize",
32532
- encode: encode$16,
32533
- decode: decode$_
32529
+ encode: encode$17,
32530
+ decode: decode$$
32534
32531
  });
32535
- const encode$15 = (attributes) => {
32532
+ const encode$16 = (attributes) => {
32536
32533
  return attributes["w:leader"];
32537
32534
  };
32538
- const decode$Z = (attrs) => {
32535
+ const decode$_ = (attrs) => {
32539
32536
  const { leader } = attrs || {};
32540
32537
  return leader;
32541
32538
  };
32542
32539
  const attrConfig$C = Object.freeze({
32543
32540
  xmlName: "w:leader",
32544
32541
  sdName: "leader",
32545
- encode: encode$15,
32546
- decode: decode$Z
32542
+ encode: encode$16,
32543
+ decode: decode$_
32547
32544
  });
32548
- const encode$14 = (attributes) => {
32545
+ const encode$15 = (attributes) => {
32549
32546
  return attributes["w:pos"];
32550
32547
  };
32551
- const decode$Y = (attrs) => {
32548
+ const decode$Z = (attrs) => {
32552
32549
  const { pos } = attrs || {};
32553
32550
  return pos;
32554
32551
  };
32555
32552
  const attrConfig$B = Object.freeze({
32556
32553
  xmlName: "w:pos",
32557
32554
  sdName: "pos",
32558
- encode: encode$14,
32559
- decode: decode$Y
32555
+ encode: encode$15,
32556
+ decode: decode$Z
32560
32557
  });
32561
- const validXmlAttributes$n = [attrConfig$D, attrConfig$B, attrConfig$C];
32562
- const XML_NODE_NAME$w = "w:tab";
32563
- const SD_NODE_NAME$g = "tab";
32564
- const encode$13 = (_2, encodedAttrs = {}) => {
32558
+ const validXmlAttributes$o = [attrConfig$D, attrConfig$B, attrConfig$C];
32559
+ const XML_NODE_NAME$x = "w:tab";
32560
+ const SD_NODE_NAME$h = "tab";
32561
+ const encode$14 = (_2, encodedAttrs = {}) => {
32565
32562
  const translated = { type: "tab" };
32566
32563
  if (encodedAttrs) translated.attrs = { ...encodedAttrs };
32567
32564
  return translated;
32568
32565
  };
32569
- const decode$X = (params2, decodedAttrs = {}) => {
32566
+ const decode$Y = (params2, decodedAttrs = {}) => {
32570
32567
  const { node } = params2 || {};
32571
32568
  if (!node) return;
32572
32569
  const wTab = { name: "w:tab" };
@@ -32582,15 +32579,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32582
32579
  }
32583
32580
  return translated;
32584
32581
  };
32585
- const config$v = {
32586
- xmlName: XML_NODE_NAME$w,
32587
- sdNodeOrKeyName: SD_NODE_NAME$g,
32582
+ const config$w = {
32583
+ xmlName: XML_NODE_NAME$x,
32584
+ sdNodeOrKeyName: SD_NODE_NAME$h,
32588
32585
  type: NodeTranslator.translatorTypes.NODE,
32589
- encode: encode$13,
32590
- decode: decode$X,
32591
- attributes: validXmlAttributes$n
32586
+ encode: encode$14,
32587
+ decode: decode$Y,
32588
+ attributes: validXmlAttributes$o
32592
32589
  };
32593
- const translator$1p = NodeTranslator.from(config$v);
32590
+ const translator$1q = NodeTranslator.from(config$w);
32594
32591
  const mergeTextNodes = (nodes) => {
32595
32592
  if (!nodes || !Array.isArray(nodes)) {
32596
32593
  return nodes;
@@ -32640,6 +32637,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
32640
32637
  const areAttrsEqual = (attrsA = {}, attrsB = {}) => {
32641
32638
  return objectIncludes(attrsA, attrsB);
32642
32639
  };
32640
+ const TrackInsertMarkName = "trackInsert";
32641
+ const TrackDeleteMarkName = "trackDelete";
32642
+ const TrackFormatMarkName = "trackFormat";
32643
32643
  function parseMarks(property2, unknownMarks = [], docx = null) {
32644
32644
  const marks = [];
32645
32645
  const seen = /* @__PURE__ */ new Set();
@@ -33108,91 +33108,91 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33108
33108
  }
33109
33109
  return schemaNode;
33110
33110
  };
33111
- const encode$12 = (attributes) => {
33111
+ const encode$13 = (attributes) => {
33112
33112
  return attributes["w:rsidDel"];
33113
33113
  };
33114
- const decode$W = (attrs) => {
33114
+ const decode$X = (attrs) => {
33115
33115
  return attrs.rsidDel;
33116
33116
  };
33117
33117
  const attrConfig$A = Object.freeze({
33118
33118
  xmlName: "w:rsidDel",
33119
33119
  sdName: "rsidDel",
33120
- encode: encode$12,
33121
- decode: decode$W
33120
+ encode: encode$13,
33121
+ decode: decode$X
33122
33122
  });
33123
- const encode$11 = (attributes) => {
33123
+ const encode$12 = (attributes) => {
33124
33124
  return attributes["w:rsidP"];
33125
33125
  };
33126
- const decode$V = (attrs) => {
33126
+ const decode$W = (attrs) => {
33127
33127
  return attrs.rsidP;
33128
33128
  };
33129
33129
  const attrConfig$z = Object.freeze({
33130
33130
  xmlName: "w:rsidP",
33131
33131
  sdName: "rsidP",
33132
- encode: encode$11,
33133
- decode: decode$V
33132
+ encode: encode$12,
33133
+ decode: decode$W
33134
33134
  });
33135
- const encode$10 = (attributes) => {
33135
+ const encode$11 = (attributes) => {
33136
33136
  return attributes["w:rsidR"];
33137
33137
  };
33138
- const decode$U = (attrs) => {
33138
+ const decode$V = (attrs) => {
33139
33139
  return attrs.rsidR;
33140
33140
  };
33141
33141
  const attrConfig$y = Object.freeze({
33142
33142
  xmlName: "w:rsidR",
33143
33143
  sdName: "rsidR",
33144
- encode: encode$10,
33145
- decode: decode$U
33144
+ encode: encode$11,
33145
+ decode: decode$V
33146
33146
  });
33147
- const encode$$ = (attributes) => {
33147
+ const encode$10 = (attributes) => {
33148
33148
  return attributes["w:rsidRPr"];
33149
33149
  };
33150
- const decode$T = (attrs) => {
33150
+ const decode$U = (attrs) => {
33151
33151
  return attrs.rsidRPr;
33152
33152
  };
33153
33153
  const attrConfig$x = Object.freeze({
33154
33154
  xmlName: "w:rsidRPr",
33155
33155
  sdName: "rsidRPr",
33156
- encode: encode$$,
33157
- decode: decode$T
33156
+ encode: encode$10,
33157
+ decode: decode$U
33158
33158
  });
33159
- const encode$_ = (attributes) => {
33159
+ const encode$$ = (attributes) => {
33160
33160
  return attributes["w:rsidRDefault"];
33161
33161
  };
33162
- const decode$S = (attrs) => {
33162
+ const decode$T = (attrs) => {
33163
33163
  return attrs.rsidRDefault;
33164
33164
  };
33165
33165
  const attrConfig$w = Object.freeze({
33166
33166
  xmlName: "w:rsidRDefault",
33167
33167
  sdName: "rsidRDefault",
33168
- encode: encode$_,
33169
- decode: decode$S
33168
+ encode: encode$$,
33169
+ decode: decode$T
33170
33170
  });
33171
- const encode$Z = (attributes) => {
33171
+ const encode$_ = (attributes) => {
33172
33172
  return attributes["w14:paraId"];
33173
33173
  };
33174
- const decode$R = (attrs) => {
33174
+ const decode$S = (attrs) => {
33175
33175
  return attrs.paraId;
33176
33176
  };
33177
33177
  const attrConfig$v = Object.freeze({
33178
33178
  xmlName: "w14:paraId",
33179
33179
  sdName: "paraId",
33180
- encode: encode$Z,
33181
- decode: decode$R
33180
+ encode: encode$_,
33181
+ decode: decode$S
33182
33182
  });
33183
- const encode$Y = (attributes) => {
33183
+ const encode$Z = (attributes) => {
33184
33184
  return attributes["w14:textId"];
33185
33185
  };
33186
- const decode$Q = (attrs) => {
33186
+ const decode$R = (attrs) => {
33187
33187
  return attrs.textId;
33188
33188
  };
33189
33189
  const attrConfig$u = Object.freeze({
33190
33190
  xmlName: "w14:textId",
33191
33191
  sdName: "textId",
33192
- encode: encode$Y,
33193
- decode: decode$Q
33192
+ encode: encode$Z,
33193
+ decode: decode$R
33194
33194
  });
33195
- const validXmlAttributes$m = [
33195
+ const validXmlAttributes$n = [
33196
33196
  attrConfig$v,
33197
33197
  attrConfig$u,
33198
33198
  attrConfig$y,
@@ -33201,9 +33201,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33201
33201
  attrConfig$x,
33202
33202
  attrConfig$A
33203
33203
  ];
33204
- const XML_NODE_NAME$v = "w:p";
33205
- const SD_NODE_NAME$f = "paragraph";
33206
- const encode$X = (params2, encodedAttrs = {}) => {
33204
+ const XML_NODE_NAME$w = "w:p";
33205
+ const SD_NODE_NAME$g = "paragraph";
33206
+ const encode$Y = (params2, encodedAttrs = {}) => {
33207
33207
  const node = handleParagraphNode$1(params2);
33208
33208
  if (!node) return void 0;
33209
33209
  if (encodedAttrs && Object.keys(encodedAttrs).length) {
@@ -33211,7 +33211,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33211
33211
  }
33212
33212
  return node;
33213
33213
  };
33214
- const decode$P = (params2, decodedAttrs = {}) => {
33214
+ const decode$Q = (params2, decodedAttrs = {}) => {
33215
33215
  const translated = translateParagraphNode(params2);
33216
33216
  if (!translated) return void 0;
33217
33217
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -33219,16 +33219,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33219
33219
  }
33220
33220
  return translated;
33221
33221
  };
33222
- const config$u = {
33223
- xmlName: XML_NODE_NAME$v,
33224
- sdNodeOrKeyName: SD_NODE_NAME$f,
33222
+ const config$v = {
33223
+ xmlName: XML_NODE_NAME$w,
33224
+ sdNodeOrKeyName: SD_NODE_NAME$g,
33225
33225
  type: NodeTranslator.translatorTypes.NODE,
33226
- encode: encode$X,
33227
- decode: decode$P,
33228
- attributes: validXmlAttributes$m
33226
+ encode: encode$Y,
33227
+ decode: decode$Q,
33228
+ attributes: validXmlAttributes$n
33229
33229
  };
33230
- const translator$1o = NodeTranslator.from(config$u);
33231
- const encode$W = (attributes) => {
33230
+ const translator$1p = NodeTranslator.from(config$v);
33231
+ const encode$X = (attributes) => {
33232
33232
  const raw = attributes?.["w:val"];
33233
33233
  if (raw === void 0 || raw === null) return void 0;
33234
33234
  if (typeof raw === "boolean") return raw;
@@ -33238,20 +33238,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33238
33238
  if (val === "1" || val === "true" || val === "on") return true;
33239
33239
  return void 0;
33240
33240
  };
33241
- const decode$O = (runProps) => {
33241
+ const decode$P = (runProps) => {
33242
33242
  if (runProps?.bold === false) return "0";
33243
33243
  return void 0;
33244
33244
  };
33245
33245
  const attrConfig$t = Object.freeze({
33246
33246
  xmlName: "w:val",
33247
33247
  sdName: "bold",
33248
- encode: encode$W,
33249
- decode: decode$O
33248
+ encode: encode$X,
33249
+ decode: decode$P
33250
33250
  });
33251
- const validXmlAttributes$l = [attrConfig$t];
33252
- const XML_NODE_NAME$u = "w:b";
33251
+ const validXmlAttributes$m = [attrConfig$t];
33252
+ const XML_NODE_NAME$v = "w:b";
33253
33253
  const SD_ATTR_KEY$e = "bold";
33254
- const encode$V = (params2, encodedAttrs = {}) => {
33254
+ const encode$W = (params2, encodedAttrs = {}) => {
33255
33255
  const { nodes } = params2;
33256
33256
  const node = nodes[0];
33257
33257
  if (!node) return void 0;
@@ -33263,85 +33263,85 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33263
33263
  else attributes = node.attributes || {};
33264
33264
  return {
33265
33265
  type: "attr",
33266
- xmlName: XML_NODE_NAME$u,
33266
+ xmlName: XML_NODE_NAME$v,
33267
33267
  sdNodeOrKeyName: SD_ATTR_KEY$e,
33268
33268
  attributes
33269
33269
  };
33270
33270
  };
33271
- const config$t = {
33272
- xmlName: XML_NODE_NAME$u,
33271
+ const config$u = {
33272
+ xmlName: XML_NODE_NAME$v,
33273
33273
  sdNodeOrKeyName: SD_ATTR_KEY$e,
33274
33274
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33275
- encode: encode$V,
33276
- attributes: validXmlAttributes$l
33275
+ encode: encode$W,
33276
+ attributes: validXmlAttributes$m
33277
33277
  };
33278
- const translator$1n = NodeTranslator.from(config$t);
33279
- const XML_NODE_NAME$t = "w:i";
33278
+ const translator$1o = NodeTranslator.from(config$u);
33279
+ const XML_NODE_NAME$u = "w:i";
33280
33280
  const SD_ATTR_KEY$d = "italic";
33281
- const encode$U = (params2) => {
33281
+ const encode$V = (params2) => {
33282
33282
  const { nodes } = params2;
33283
33283
  const node = nodes?.[0];
33284
33284
  if (!node) return void 0;
33285
33285
  return {
33286
33286
  type: "attr",
33287
- xmlName: XML_NODE_NAME$t,
33287
+ xmlName: XML_NODE_NAME$u,
33288
33288
  sdNodeOrKeyName: SD_ATTR_KEY$d,
33289
33289
  attributes: {
33290
33290
  "w:val": node.attributes?.["w:val"] ?? null
33291
33291
  }
33292
33292
  };
33293
33293
  };
33294
- const config$s = {
33295
- xmlName: XML_NODE_NAME$t,
33294
+ const config$t = {
33295
+ xmlName: XML_NODE_NAME$u,
33296
33296
  sdNodeOrKeyName: SD_ATTR_KEY$d,
33297
33297
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33298
- encode: encode$U
33298
+ encode: encode$V
33299
33299
  };
33300
- const translator$1m = NodeTranslator.from(config$s);
33301
- const encode$T = (attributes) => attributes?.["w:val"];
33302
- const decode$N = (attrs) => attrs?.underline;
33300
+ const translator$1n = NodeTranslator.from(config$t);
33301
+ const encode$U = (attributes) => attributes?.["w:val"];
33302
+ const decode$O = (attrs) => attrs?.underline;
33303
33303
  const attrConfig$s = Object.freeze({
33304
33304
  xmlName: "w:val",
33305
33305
  sdName: "underline",
33306
- encode: encode$T,
33307
- decode: decode$N
33306
+ encode: encode$U,
33307
+ decode: decode$O
33308
33308
  });
33309
- const encode$S = (attributes) => attributes?.["w:color"];
33310
- const decode$M = (attrs) => attrs?.color;
33309
+ const encode$T = (attributes) => attributes?.["w:color"];
33310
+ const decode$N = (attrs) => attrs?.color;
33311
33311
  const attrConfig$r = Object.freeze({
33312
33312
  xmlName: "w:color",
33313
33313
  sdName: "color",
33314
- encode: encode$S,
33315
- decode: decode$M
33314
+ encode: encode$T,
33315
+ decode: decode$N
33316
33316
  });
33317
- const encode$R = (attributes) => attributes?.["w:themeColor"];
33318
- const decode$L = (attrs) => attrs?.themeColor;
33317
+ const encode$S = (attributes) => attributes?.["w:themeColor"];
33318
+ const decode$M = (attrs) => attrs?.themeColor;
33319
33319
  const attrConfig$q = Object.freeze({
33320
33320
  xmlName: "w:themeColor",
33321
33321
  sdName: "themeColor",
33322
- encode: encode$R,
33323
- decode: decode$L
33322
+ encode: encode$S,
33323
+ decode: decode$M
33324
33324
  });
33325
- const encode$Q = (attributes) => attributes?.["w:themeTint"];
33326
- const decode$K = (attrs) => attrs?.themeTint;
33325
+ const encode$R = (attributes) => attributes?.["w:themeTint"];
33326
+ const decode$L = (attrs) => attrs?.themeTint;
33327
33327
  const attrConfig$p = Object.freeze({
33328
33328
  xmlName: "w:themeTint",
33329
33329
  sdName: "themeTint",
33330
- encode: encode$Q,
33331
- decode: decode$K
33330
+ encode: encode$R,
33331
+ decode: decode$L
33332
33332
  });
33333
- const encode$P = (attributes) => attributes?.["w:themeShade"];
33334
- const decode$J = (attrs) => attrs?.themeShade;
33333
+ const encode$Q = (attributes) => attributes?.["w:themeShade"];
33334
+ const decode$K = (attrs) => attrs?.themeShade;
33335
33335
  const attrConfig$o = Object.freeze({
33336
33336
  xmlName: "w:themeShade",
33337
33337
  sdName: "themeShade",
33338
- encode: encode$P,
33339
- decode: decode$J
33338
+ encode: encode$Q,
33339
+ decode: decode$K
33340
33340
  });
33341
- const validXmlAttributes$k = [attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o];
33342
- const XML_NODE_NAME$s = "w:u";
33341
+ const validXmlAttributes$l = [attrConfig$s, attrConfig$r, attrConfig$q, attrConfig$p, attrConfig$o];
33342
+ const XML_NODE_NAME$t = "w:u";
33343
33343
  const SD_ATTR_KEY$c = "underline";
33344
- const encode$O = (params2, encodedAttrs = {}) => {
33344
+ const encode$P = (params2, encodedAttrs = {}) => {
33345
33345
  const { nodes } = params2;
33346
33346
  const node = nodes?.[0];
33347
33347
  const sourceAttrs = node?.attributes || {};
@@ -33357,12 +33357,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33357
33357
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
33358
33358
  return {
33359
33359
  type: "attr",
33360
- xmlName: XML_NODE_NAME$s,
33360
+ xmlName: XML_NODE_NAME$t,
33361
33361
  sdNodeOrKeyName: SD_ATTR_KEY$c,
33362
33362
  attributes
33363
33363
  };
33364
33364
  };
33365
- const decode$I = (params2) => {
33365
+ const decode$J = (params2) => {
33366
33366
  const attrs = params2?.node?.attrs || {};
33367
33367
  const underlineType = attrs.underlineType ?? attrs.underline ?? null;
33368
33368
  const color = attrs.underlineColor ?? attrs.color ?? null;
@@ -33380,20 +33380,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33380
33380
  if (themeTint) attributes["w:themeTint"] = themeTint;
33381
33381
  if (themeShade) attributes["w:themeShade"] = themeShade;
33382
33382
  return {
33383
- name: XML_NODE_NAME$s,
33383
+ name: XML_NODE_NAME$t,
33384
33384
  attributes
33385
33385
  };
33386
33386
  };
33387
- const config$r = {
33388
- xmlName: XML_NODE_NAME$s,
33387
+ const config$s = {
33388
+ xmlName: XML_NODE_NAME$t,
33389
33389
  sdNodeOrKeyName: SD_ATTR_KEY$c,
33390
33390
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33391
- encode: encode$O,
33392
- decode: decode$I,
33393
- attributes: validXmlAttributes$k
33391
+ encode: encode$P,
33392
+ decode: decode$J,
33393
+ attributes: validXmlAttributes$l
33394
33394
  };
33395
- const translator$1l = NodeTranslator.from(config$r);
33396
- const encode$N = (attributes) => {
33395
+ const translator$1m = NodeTranslator.from(config$s);
33396
+ const encode$O = (attributes) => {
33397
33397
  const raw = attributes?.["w:val"];
33398
33398
  if (raw === void 0 || raw === null) return void 0;
33399
33399
  if (typeof raw === "boolean") return raw;
@@ -33403,20 +33403,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33403
33403
  if (val === "1" || val === "true" || val === "on") return true;
33404
33404
  return void 0;
33405
33405
  };
33406
- const decode$H = (attrs) => {
33406
+ const decode$I = (attrs) => {
33407
33407
  if (attrs?.strike === false) return "0";
33408
33408
  return void 0;
33409
33409
  };
33410
33410
  const attrConfig$n = Object.freeze({
33411
33411
  xmlName: "w:val",
33412
33412
  sdName: "strike",
33413
- encode: encode$N,
33414
- decode: decode$H
33413
+ encode: encode$O,
33414
+ decode: decode$I
33415
33415
  });
33416
- const validXmlAttributes$j = [attrConfig$n];
33417
- const XML_NODE_NAME$r = "w:strike";
33416
+ const validXmlAttributes$k = [attrConfig$n];
33417
+ const XML_NODE_NAME$s = "w:strike";
33418
33418
  const SD_ATTR_KEY$b = "strike";
33419
- const encode$M = (params2, encodedAttrs = {}) => {
33419
+ const encode$N = (params2, encodedAttrs = {}) => {
33420
33420
  const { nodes } = params2;
33421
33421
  const node = nodes?.[0];
33422
33422
  if (!node) return void 0;
@@ -33429,55 +33429,55 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33429
33429
  else if (val === true && attributes["w:val"] === void 0) delete attributes["w:val"];
33430
33430
  return {
33431
33431
  type: "attr",
33432
- xmlName: XML_NODE_NAME$r,
33432
+ xmlName: XML_NODE_NAME$s,
33433
33433
  sdNodeOrKeyName: SD_ATTR_KEY$b,
33434
33434
  attributes
33435
33435
  };
33436
33436
  };
33437
- const config$q = {
33438
- xmlName: XML_NODE_NAME$r,
33437
+ const config$r = {
33438
+ xmlName: XML_NODE_NAME$s,
33439
33439
  sdNodeOrKeyName: SD_ATTR_KEY$b,
33440
33440
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33441
- encode: encode$M,
33442
- attributes: validXmlAttributes$j
33441
+ encode: encode$N,
33442
+ attributes: validXmlAttributes$k
33443
33443
  };
33444
- const translator$1k = NodeTranslator.from(config$q);
33445
- const encode$L = (attributes) => attributes?.["w:val"];
33446
- const decode$G = (attrs) => attrs?.color;
33444
+ const translator$1l = NodeTranslator.from(config$r);
33445
+ const encode$M = (attributes) => attributes?.["w:val"];
33446
+ const decode$H = (attrs) => attrs?.color;
33447
33447
  const attrConfig$m = Object.freeze({
33448
33448
  xmlName: "w:val",
33449
33449
  sdName: "color",
33450
- encode: encode$L,
33451
- decode: decode$G
33450
+ encode: encode$M,
33451
+ decode: decode$H
33452
33452
  });
33453
- const encode$K = (attributes) => attributes?.["w:themeColor"];
33454
- const decode$F = (attrs) => attrs?.themeColor;
33453
+ const encode$L = (attributes) => attributes?.["w:themeColor"];
33454
+ const decode$G = (attrs) => attrs?.themeColor;
33455
33455
  const attrConfig$l = Object.freeze({
33456
33456
  xmlName: "w:themeColor",
33457
33457
  sdName: "themeColor",
33458
- encode: encode$K,
33459
- decode: decode$F
33458
+ encode: encode$L,
33459
+ decode: decode$G
33460
33460
  });
33461
- const encode$J = (attributes) => attributes?.["w:themeTint"];
33462
- const decode$E = (attrs) => attrs?.themeTint;
33461
+ const encode$K = (attributes) => attributes?.["w:themeTint"];
33462
+ const decode$F = (attrs) => attrs?.themeTint;
33463
33463
  const attrConfig$k = Object.freeze({
33464
33464
  xmlName: "w:themeTint",
33465
33465
  sdName: "themeTint",
33466
- encode: encode$J,
33467
- decode: decode$E
33466
+ encode: encode$K,
33467
+ decode: decode$F
33468
33468
  });
33469
- const encode$I = (attributes) => attributes?.["w:themeShade"];
33470
- const decode$D = (attrs) => attrs?.themeShade;
33469
+ const encode$J = (attributes) => attributes?.["w:themeShade"];
33470
+ const decode$E = (attrs) => attrs?.themeShade;
33471
33471
  const attrConfig$j = Object.freeze({
33472
33472
  xmlName: "w:themeShade",
33473
33473
  sdName: "themeShade",
33474
- encode: encode$I,
33475
- decode: decode$D
33474
+ encode: encode$J,
33475
+ decode: decode$E
33476
33476
  });
33477
- const validXmlAttributes$i = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j];
33478
- const XML_NODE_NAME$q = "w:color";
33477
+ const validXmlAttributes$j = [attrConfig$m, attrConfig$l, attrConfig$k, attrConfig$j];
33478
+ const XML_NODE_NAME$r = "w:color";
33479
33479
  const SD_ATTR_KEY$a = "color";
33480
- const encode$H = (params2, encodedAttrs = {}) => {
33480
+ const encode$I = (params2, encodedAttrs = {}) => {
33481
33481
  const { nodes } = params2;
33482
33482
  const node = nodes?.[0];
33483
33483
  const sourceAttrs = node?.attributes || {};
@@ -33492,63 +33492,63 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33492
33492
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
33493
33493
  return {
33494
33494
  type: "attr",
33495
- xmlName: XML_NODE_NAME$q,
33495
+ xmlName: XML_NODE_NAME$r,
33496
33496
  sdNodeOrKeyName: SD_ATTR_KEY$a,
33497
33497
  attributes
33498
33498
  };
33499
33499
  };
33500
- const config$p = {
33501
- xmlName: XML_NODE_NAME$q,
33500
+ const config$q = {
33501
+ xmlName: XML_NODE_NAME$r,
33502
33502
  sdNodeOrKeyName: SD_ATTR_KEY$a,
33503
33503
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33504
- encode: encode$H,
33505
- attributes: validXmlAttributes$i
33504
+ encode: encode$I,
33505
+ attributes: validXmlAttributes$j
33506
33506
  };
33507
- const translator$1j = NodeTranslator.from(config$p);
33508
- const encode$G = (attributes) => attributes?.["w:eastAsia"];
33509
- const decode$C = (attrs) => attrs?.eastAsia;
33507
+ const translator$1k = NodeTranslator.from(config$q);
33508
+ const encode$H = (attributes) => attributes?.["w:eastAsia"];
33509
+ const decode$D = (attrs) => attrs?.eastAsia;
33510
33510
  const attrConfig$i = Object.freeze({
33511
33511
  xmlName: "w:eastAsia",
33512
33512
  sdName: "eastAsia",
33513
- encode: encode$G,
33514
- decode: decode$C
33513
+ encode: encode$H,
33514
+ decode: decode$D
33515
33515
  });
33516
- const encode$F = (attributes) => attributes?.["w:ascii"];
33517
- const decode$B = (attrs) => attrs?.ascii;
33516
+ const encode$G = (attributes) => attributes?.["w:ascii"];
33517
+ const decode$C = (attrs) => attrs?.ascii;
33518
33518
  const attrConfig$h = Object.freeze({
33519
33519
  xmlName: "w:ascii",
33520
33520
  sdName: "ascii",
33521
- encode: encode$F,
33522
- decode: decode$B
33521
+ encode: encode$G,
33522
+ decode: decode$C
33523
33523
  });
33524
- const encode$E = (attributes) => attributes?.["w:hAnsi"];
33525
- const decode$A = (attrs) => attrs?.hAnsi;
33524
+ const encode$F = (attributes) => attributes?.["w:hAnsi"];
33525
+ const decode$B = (attrs) => attrs?.hAnsi;
33526
33526
  const attrConfig$g = Object.freeze({
33527
33527
  xmlName: "w:hAnsi",
33528
33528
  sdName: "hAnsi",
33529
- encode: encode$E,
33530
- decode: decode$A
33529
+ encode: encode$F,
33530
+ decode: decode$B
33531
33531
  });
33532
- const encode$D = (attributes) => attributes?.["w:cs"];
33533
- const decode$z = (attrs) => attrs?.cs;
33532
+ const encode$E = (attributes) => attributes?.["w:cs"];
33533
+ const decode$A = (attrs) => attrs?.cs;
33534
33534
  const attrConfig$f = Object.freeze({
33535
33535
  xmlName: "w:cs",
33536
33536
  sdName: "cs",
33537
- encode: encode$D,
33538
- decode: decode$z
33537
+ encode: encode$E,
33538
+ decode: decode$A
33539
33539
  });
33540
- const encode$C = (attributes) => attributes?.["w:val"];
33541
- const decode$y = (attrs) => attrs?.value;
33540
+ const encode$D = (attributes) => attributes?.["w:val"];
33541
+ const decode$z = (attrs) => attrs?.value;
33542
33542
  const attrConfig$e = Object.freeze({
33543
33543
  xmlName: "w:val",
33544
33544
  sdName: "value",
33545
- encode: encode$C,
33546
- decode: decode$y
33545
+ encode: encode$D,
33546
+ decode: decode$z
33547
33547
  });
33548
- const validXmlAttributes$h = [attrConfig$i, attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e];
33549
- const XML_NODE_NAME$p = "w:rFonts";
33548
+ const validXmlAttributes$i = [attrConfig$i, attrConfig$h, attrConfig$g, attrConfig$f, attrConfig$e];
33549
+ const XML_NODE_NAME$q = "w:rFonts";
33550
33550
  const SD_ATTR_KEY$9 = "fontFamily";
33551
- const encode$B = (params2, encodedAttrs = {}) => {
33551
+ const encode$C = (params2, encodedAttrs = {}) => {
33552
33552
  const { nodes } = params2;
33553
33553
  const node = nodes?.[0];
33554
33554
  const sourceAttrs = node?.attributes || {};
@@ -33582,109 +33582,109 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33582
33582
  }
33583
33583
  return {
33584
33584
  type: "attr",
33585
- xmlName: XML_NODE_NAME$p,
33585
+ xmlName: XML_NODE_NAME$q,
33586
33586
  sdNodeOrKeyName: SD_ATTR_KEY$9,
33587
33587
  attributes
33588
33588
  };
33589
33589
  };
33590
- const config$o = {
33591
- xmlName: XML_NODE_NAME$p,
33590
+ const config$p = {
33591
+ xmlName: XML_NODE_NAME$q,
33592
33592
  sdNodeOrKeyName: SD_ATTR_KEY$9,
33593
33593
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33594
- encode: encode$B,
33595
- attributes: validXmlAttributes$h
33594
+ encode: encode$C,
33595
+ attributes: validXmlAttributes$i
33596
33596
  };
33597
- const translator$1i = NodeTranslator.from(config$o);
33598
- const encode$A = (attributes) => attributes?.["w:val"];
33599
- const decode$x = (attrs) => attrs?.styleId;
33597
+ const translator$1j = NodeTranslator.from(config$p);
33598
+ const encode$B = (attributes) => attributes?.["w:val"];
33599
+ const decode$y = (attrs) => attrs?.styleId;
33600
33600
  const attrConfig$d = Object.freeze({
33601
33601
  xmlName: "w:val",
33602
33602
  sdName: "styleId",
33603
- encode: encode$A,
33604
- decode: decode$x
33603
+ encode: encode$B,
33604
+ decode: decode$y
33605
33605
  });
33606
- const validXmlAttributes$g = [attrConfig$d];
33607
- const XML_NODE_NAME$o = "w:rStyle";
33606
+ const validXmlAttributes$h = [attrConfig$d];
33607
+ const XML_NODE_NAME$p = "w:rStyle";
33608
33608
  const SD_ATTR_KEY$8 = "styleId";
33609
- const encode$z = (params2, encodedAttrs = {}) => {
33609
+ const encode$A = (params2, encodedAttrs = {}) => {
33610
33610
  const { nodes } = params2;
33611
33611
  const node = nodes?.[0];
33612
33612
  const value = encodedAttrs.styleId ?? node?.attributes?.["w:val"];
33613
33613
  return {
33614
33614
  type: "attr",
33615
- xmlName: XML_NODE_NAME$o,
33615
+ xmlName: XML_NODE_NAME$p,
33616
33616
  sdNodeOrKeyName: SD_ATTR_KEY$8,
33617
33617
  attributes: { "w:val": value ?? null }
33618
33618
  };
33619
33619
  };
33620
- const config$n = {
33621
- xmlName: XML_NODE_NAME$o,
33620
+ const config$o = {
33621
+ xmlName: XML_NODE_NAME$p,
33622
33622
  sdNodeOrKeyName: SD_ATTR_KEY$8,
33623
33623
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33624
- encode: encode$z,
33625
- attributes: validXmlAttributes$g
33624
+ encode: encode$A,
33625
+ attributes: validXmlAttributes$h
33626
33626
  };
33627
- const translator$1h = NodeTranslator.from(config$n);
33628
- const encode$y = (attributes) => attributes?.["w:val"];
33629
- const decode$w = (attrs) => attrs?.fontSize;
33627
+ const translator$1i = NodeTranslator.from(config$o);
33628
+ const encode$z = (attributes) => attributes?.["w:val"];
33629
+ const decode$x = (attrs) => attrs?.fontSize;
33630
33630
  const attrConfig$c = Object.freeze({
33631
33631
  xmlName: "w:val",
33632
33632
  sdName: "fontSize",
33633
- encode: encode$y,
33634
- decode: decode$w
33633
+ encode: encode$z,
33634
+ decode: decode$x
33635
33635
  });
33636
- const validXmlAttributes$f = [attrConfig$c];
33637
- const XML_NODE_NAME$n = "w:sz";
33636
+ const validXmlAttributes$g = [attrConfig$c];
33637
+ const XML_NODE_NAME$o = "w:sz";
33638
33638
  const SD_ATTR_KEY$7 = "fontSize";
33639
- const encode$x = (params2, encodedAttrs = {}) => {
33639
+ const encode$y = (params2, encodedAttrs = {}) => {
33640
33640
  const { nodes } = params2;
33641
33641
  const node = nodes?.[0];
33642
33642
  const value = encodedAttrs.fontSize ?? node?.attributes?.["w:val"];
33643
33643
  return {
33644
33644
  type: "attr",
33645
- xmlName: XML_NODE_NAME$n,
33645
+ xmlName: XML_NODE_NAME$o,
33646
33646
  sdNodeOrKeyName: SD_ATTR_KEY$7,
33647
33647
  attributes: { "w:val": value ?? null }
33648
33648
  };
33649
33649
  };
33650
- const config$m = {
33651
- xmlName: XML_NODE_NAME$n,
33650
+ const config$n = {
33651
+ xmlName: XML_NODE_NAME$o,
33652
33652
  sdNodeOrKeyName: SD_ATTR_KEY$7,
33653
33653
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33654
- encode: encode$x,
33655
- attributes: validXmlAttributes$f
33654
+ encode: encode$y,
33655
+ attributes: validXmlAttributes$g
33656
33656
  };
33657
- const translator$1g = NodeTranslator.from(config$m);
33658
- const encode$w = (attributes) => attributes?.["w:val"];
33659
- const decode$v = (attrs) => attrs?.fontSizeCs;
33657
+ const translator$1h = NodeTranslator.from(config$n);
33658
+ const encode$x = (attributes) => attributes?.["w:val"];
33659
+ const decode$w = (attrs) => attrs?.fontSizeCs;
33660
33660
  const attrConfig$b = Object.freeze({
33661
33661
  xmlName: "w:val",
33662
33662
  sdName: "fontSizeCs",
33663
- encode: encode$w,
33664
- decode: decode$v
33663
+ encode: encode$x,
33664
+ decode: decode$w
33665
33665
  });
33666
- const validXmlAttributes$e = [attrConfig$b];
33667
- const XML_NODE_NAME$m = "w:szCs";
33666
+ const validXmlAttributes$f = [attrConfig$b];
33667
+ const XML_NODE_NAME$n = "w:szCs";
33668
33668
  const SD_ATTR_KEY$6 = "fontSizeCs";
33669
- const encode$v = (params2, encodedAttrs = {}) => {
33669
+ const encode$w = (params2, encodedAttrs = {}) => {
33670
33670
  const { nodes } = params2;
33671
33671
  const node = nodes?.[0];
33672
33672
  const value = encodedAttrs.fontSizeCs ?? node?.attributes?.["w:val"];
33673
33673
  return {
33674
33674
  type: "attr",
33675
- xmlName: XML_NODE_NAME$m,
33675
+ xmlName: XML_NODE_NAME$n,
33676
33676
  sdNodeOrKeyName: SD_ATTR_KEY$6,
33677
33677
  attributes: { "w:val": value ?? null }
33678
33678
  };
33679
33679
  };
33680
- const config$l = {
33681
- xmlName: XML_NODE_NAME$m,
33680
+ const config$m = {
33681
+ xmlName: XML_NODE_NAME$n,
33682
33682
  sdNodeOrKeyName: SD_ATTR_KEY$6,
33683
33683
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33684
- encode: encode$v,
33685
- attributes: validXmlAttributes$e
33684
+ encode: encode$w,
33685
+ attributes: validXmlAttributes$f
33686
33686
  };
33687
- const translator$1f = NodeTranslator.from(config$l);
33687
+ const translator$1g = NodeTranslator.from(config$m);
33688
33688
  const generateV2HandlerEntity = (handlerName, translator2) => ({
33689
33689
  handlerName,
33690
33690
  handler: (params2) => {
@@ -33873,9 +33873,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33873
33873
  const intValue = parseInteger(value);
33874
33874
  return intValue != void 0 ? String(intValue) : void 0;
33875
33875
  };
33876
- const XML_NODE_NAME$l = "w:caps";
33876
+ const XML_NODE_NAME$m = "w:caps";
33877
33877
  const SD_ATTR_KEY$5 = "textTransform";
33878
- const encode$u = (params2, encodedAttrs = {}) => {
33878
+ const encode$v = (params2, encodedAttrs = {}) => {
33879
33879
  const { nodes } = params2;
33880
33880
  const node = nodes[0];
33881
33881
  if (!node) return void 0;
@@ -33887,31 +33887,31 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33887
33887
  }
33888
33888
  return {
33889
33889
  type: "attr",
33890
- xmlName: XML_NODE_NAME$l,
33890
+ xmlName: XML_NODE_NAME$m,
33891
33891
  sdNodeOrKeyName: SD_ATTR_KEY$5,
33892
33892
  attributes: { [SD_ATTR_KEY$5]: result }
33893
33893
  };
33894
33894
  };
33895
- const config$k = {
33896
- xmlName: XML_NODE_NAME$l,
33895
+ const config$l = {
33896
+ xmlName: XML_NODE_NAME$m,
33897
33897
  sdNodeOrKeyName: SD_ATTR_KEY$5,
33898
33898
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33899
- encode: encode$u,
33899
+ encode: encode$v,
33900
33900
  attributes: [createAttributeHandler("w:val")]
33901
33901
  };
33902
- const translator$1e = NodeTranslator.from(config$k);
33902
+ const translator$1f = NodeTranslator.from(config$l);
33903
33903
  const runPropertyTranslators = Object.freeze({
33904
- "w:b": translator$1n,
33905
- "w:i": translator$1m,
33906
- "w:u": translator$1l,
33907
- "w:strike": translator$1k,
33908
- "w:color": translator$1j,
33909
- "w:highlight": translator$1q,
33910
- "w:rFonts": translator$1i,
33911
- "w:rStyle": translator$1h,
33912
- "w:sz": translator$1g,
33913
- "w:szCs": translator$1f,
33914
- "w:caps": translator$1e
33904
+ "w:b": translator$1o,
33905
+ "w:i": translator$1n,
33906
+ "w:u": translator$1m,
33907
+ "w:strike": translator$1l,
33908
+ "w:color": translator$1k,
33909
+ "w:highlight": translator$1r,
33910
+ "w:rFonts": translator$1j,
33911
+ "w:rStyle": translator$1i,
33912
+ "w:sz": translator$1h,
33913
+ "w:szCs": translator$1g,
33914
+ "w:caps": translator$1f
33915
33915
  });
33916
33916
  const rawRunPropertyXmlNames = Object.freeze(["w:lang", "w:shd"]);
33917
33917
  const RAW_CHILD_NAME_SET = new Set(rawRunPropertyXmlNames);
@@ -33925,9 +33925,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33925
33925
  attributes: { ...candidate.attributes || {} }
33926
33926
  };
33927
33927
  };
33928
- const XML_NODE_NAME$k = "w:rPr";
33928
+ const XML_NODE_NAME$l = "w:rPr";
33929
33929
  const SD_ATTR_KEY$4 = "runProperties";
33930
- const encode$t = (params2) => {
33930
+ const encode$u = (params2) => {
33931
33931
  const { nodes } = params2;
33932
33932
  const node = nodes?.[0] || {};
33933
33933
  const contents = Array.isArray(node.elements) ? node.elements : [];
@@ -33961,16 +33961,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
33961
33961
  attributes: runPropsArray
33962
33962
  };
33963
33963
  };
33964
- const config$j = {
33965
- xmlName: XML_NODE_NAME$k,
33964
+ const config$k = {
33965
+ xmlName: XML_NODE_NAME$l,
33966
33966
  sdNodeOrKeyName: SD_ATTR_KEY$4,
33967
33967
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
33968
- encode: encode$t
33968
+ encode: encode$u
33969
33969
  };
33970
- const translator$1d = NodeTranslator.from(config$j);
33970
+ const translator$1e = NodeTranslator.from(config$k);
33971
33971
  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;
33972
33972
  const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
33973
- const collectRunProperties = (params2, rPrNode, translator2 = translator$1d) => {
33973
+ const collectRunProperties = (params2, rPrNode, translator2 = translator$1e) => {
33974
33974
  if (!rPrNode) return { entries: [], hadRPr: false, styleChangeMarks: [] };
33975
33975
  const result = translator2.encode({ ...params2, nodes: [rPrNode] }) || {};
33976
33976
  let entries = [];
@@ -34443,15 +34443,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34443
34443
  }
34444
34444
  return runs;
34445
34445
  };
34446
- const XML_NODE_NAME$j = "w:hyperlink";
34447
- const SD_NODE_NAME$e = "link";
34446
+ const XML_NODE_NAME$k = "w:hyperlink";
34447
+ const SD_NODE_NAME$f = "link";
34448
34448
  const _createAttributeHandler = (xmlName, sdName) => ({
34449
34449
  xmlName,
34450
34450
  sdName,
34451
34451
  encode: (attributes) => attributes[xmlName],
34452
34452
  decode: (attributes) => attributes[sdName]
34453
34453
  });
34454
- const validXmlAttributes$d = [
34454
+ const validXmlAttributes$e = [
34455
34455
  _createAttributeHandler("w:anchor", "anchor"),
34456
34456
  _createAttributeHandler("w:docLocation", "docLocation"),
34457
34457
  {
@@ -34464,7 +34464,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34464
34464
  _createAttributeHandler("r:id", "rId"),
34465
34465
  _createAttributeHandler("w:tgtFrame", "target")
34466
34466
  ];
34467
- const encode$s = (params2, encodedAttrs) => {
34467
+ const encode$t = (params2, encodedAttrs) => {
34468
34468
  const { nodes, docx, nodeListHandler } = params2;
34469
34469
  const node = nodes[0];
34470
34470
  let href = _resolveHref(docx, encodedAttrs);
@@ -34498,7 +34498,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34498
34498
  }
34499
34499
  return href;
34500
34500
  };
34501
- function decode$u(params2) {
34501
+ function decode$v(params2) {
34502
34502
  const { hyperlinkGroup = [params2.node] } = params2.extraParams || {};
34503
34503
  const node = hyperlinkGroup[0];
34504
34504
  const linkMark = node.marks.find((m2) => m2.type === "link");
@@ -34547,55 +34547,55 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34547
34547
  });
34548
34548
  return id;
34549
34549
  }
34550
- const config$i = {
34551
- xmlName: XML_NODE_NAME$j,
34552
- sdNodeOrKeyName: SD_NODE_NAME$e,
34550
+ const config$j = {
34551
+ xmlName: XML_NODE_NAME$k,
34552
+ sdNodeOrKeyName: SD_NODE_NAME$f,
34553
34553
  type: NodeTranslator.translatorTypes.NODE,
34554
- encode: encode$s,
34555
- decode: decode$u,
34556
- attributes: validXmlAttributes$d
34554
+ encode: encode$t,
34555
+ decode: decode$v,
34556
+ attributes: validXmlAttributes$e
34557
34557
  };
34558
- const translator$1c = NodeTranslator.from(config$i);
34559
- const encode$r = (attributes) => {
34558
+ const translator$1d = NodeTranslator.from(config$j);
34559
+ const encode$s = (attributes) => {
34560
34560
  return attributes["w:rsidR"];
34561
34561
  };
34562
- const decode$t = (attrs) => {
34562
+ const decode$u = (attrs) => {
34563
34563
  return attrs.rsidR;
34564
34564
  };
34565
34565
  const attrConfig$a = Object.freeze({
34566
34566
  xmlName: "w:rsidR",
34567
34567
  sdName: "rsidR",
34568
- encode: encode$r,
34569
- decode: decode$t
34568
+ encode: encode$s,
34569
+ decode: decode$u
34570
34570
  });
34571
- const encode$q = (attributes) => {
34571
+ const encode$r = (attributes) => {
34572
34572
  return attributes["w:rsidRPr"];
34573
34573
  };
34574
- const decode$s = (attrs) => {
34574
+ const decode$t = (attrs) => {
34575
34575
  return attrs.rsidRPr;
34576
34576
  };
34577
34577
  const attrConfig$9 = Object.freeze({
34578
34578
  xmlName: "w:rsidRPr",
34579
34579
  sdName: "rsidRPr",
34580
- encode: encode$q,
34581
- decode: decode$s
34580
+ encode: encode$r,
34581
+ decode: decode$t
34582
34582
  });
34583
- const encode$p = (attributes) => {
34583
+ const encode$q = (attributes) => {
34584
34584
  return attributes["w:rsidDel"];
34585
34585
  };
34586
- const decode$r = (attrs) => {
34586
+ const decode$s = (attrs) => {
34587
34587
  return attrs.rsidDel;
34588
34588
  };
34589
34589
  const attrConfig$8 = Object.freeze({
34590
34590
  xmlName: "w:rsidDel",
34591
34591
  sdName: "rsidDel",
34592
- encode: encode$p,
34593
- decode: decode$r
34592
+ encode: encode$q,
34593
+ decode: decode$s
34594
34594
  });
34595
- const validXmlAttributes$c = [attrConfig$a, attrConfig$9, attrConfig$8];
34596
- const XML_NODE_NAME$i = "w:r";
34595
+ const validXmlAttributes$d = [attrConfig$a, attrConfig$9, attrConfig$8];
34596
+ const XML_NODE_NAME$j = "w:r";
34597
34597
  const SD_KEY_NAME = "run";
34598
- const encode$o = (params2, encodedAttrs = {}) => {
34598
+ const encode$p = (params2, encodedAttrs = {}) => {
34599
34599
  const { nodes = [], nodeListHandler } = params2 || {};
34600
34600
  const runNode = nodes[0];
34601
34601
  if (!runNode) return void 0;
@@ -34643,7 +34643,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34643
34643
  }
34644
34644
  return runNodeResult;
34645
34645
  };
34646
- const decode$q = (params2, decodedAttrs = {}) => {
34646
+ const decode$r = (params2, decodedAttrs = {}) => {
34647
34647
  const { node } = params2 || {};
34648
34648
  if (!node) return void 0;
34649
34649
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
@@ -34652,7 +34652,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34652
34652
  ...params2.extraParams,
34653
34653
  linkProcessed: true
34654
34654
  };
34655
- return translator$1c.decode({ ...params2, extraParams });
34655
+ return translator$1d.decode({ ...params2, extraParams });
34656
34656
  }
34657
34657
  const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
34658
34658
  const runAttrs = runNodeForExport.attrs || {};
@@ -34708,7 +34708,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34708
34708
  runs.push(trackedClone);
34709
34709
  return;
34710
34710
  }
34711
- const runWrapper = { name: XML_NODE_NAME$i, elements: [] };
34711
+ const runWrapper = { name: XML_NODE_NAME$j, elements: [] };
34712
34712
  applyBaseRunProps(runWrapper);
34713
34713
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
34714
34714
  runWrapper.elements.push(cloneXmlNode(child));
@@ -34716,7 +34716,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34716
34716
  });
34717
34717
  const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
34718
34718
  if (!trackedRuns.length) {
34719
- const emptyRun = { name: XML_NODE_NAME$i, elements: [] };
34719
+ const emptyRun = { name: XML_NODE_NAME$j, elements: [] };
34720
34720
  applyBaseRunProps(emptyRun);
34721
34721
  trackedRuns.push(emptyRun);
34722
34722
  }
@@ -34730,16 +34730,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34730
34730
  }
34731
34731
  return trackedRuns;
34732
34732
  };
34733
- const config$h = {
34734
- xmlName: XML_NODE_NAME$i,
34733
+ const config$i = {
34734
+ xmlName: XML_NODE_NAME$j,
34735
34735
  sdNodeOrKeyName: SD_KEY_NAME,
34736
34736
  type: NodeTranslator.translatorTypes.NODE,
34737
- encode: encode$o,
34738
- decode: decode$q,
34739
- attributes: validXmlAttributes$c
34737
+ encode: encode$p,
34738
+ decode: decode$r,
34739
+ attributes: validXmlAttributes$d
34740
34740
  };
34741
- const translator$1b = NodeTranslator.from(config$h);
34742
- const translator$1a = NodeTranslator.from({
34741
+ const translator$1c = NodeTranslator.from(config$i);
34742
+ const translator$1b = NodeTranslator.from({
34743
34743
  xmlName: "w:cnfStyle",
34744
34744
  sdNodeOrKeyName: "cnfStyle",
34745
34745
  attributes: [
@@ -34765,7 +34765,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34765
34765
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
34766
34766
  }
34767
34767
  });
34768
- const translator$19 = NodeTranslator.from({
34768
+ const translator$1a = NodeTranslator.from({
34769
34769
  xmlName: "w:shd",
34770
34770
  sdNodeOrKeyName: "shading",
34771
34771
  attributes: [
@@ -34787,8 +34787,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34787
34787
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
34788
34788
  }
34789
34789
  });
34790
- const translator$18 = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
34791
- const translator$17 = NodeTranslator.from(
34790
+ const translator$19 = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
34791
+ const translator$18 = NodeTranslator.from(
34792
34792
  createSingleAttrPropertyHandler(
34793
34793
  "w:gridSpan",
34794
34794
  null,
@@ -34797,39 +34797,39 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34797
34797
  (v2) => integerToString(v2)
34798
34798
  )
34799
34799
  );
34800
- const translator$16 = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
34801
- const translator$15 = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
34802
- const translator$14 = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
34803
- const translator$13 = NodeTranslator.from(createBorderPropertyHandler("w:end"));
34804
- const translator$12 = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
34805
- const translator$11 = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
34806
- const translator$10 = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
34807
- const translator$$ = NodeTranslator.from(createBorderPropertyHandler("w:left"));
34808
- const translator$_ = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
34809
- const translator$Z = NodeTranslator.from(createBorderPropertyHandler("w:right"));
34810
- const translator$Y = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
34811
- const translator$X = NodeTranslator.from(createBorderPropertyHandler("w:start"));
34812
- const translator$W = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
34813
- const translator$V = NodeTranslator.from(createBorderPropertyHandler("w:top"));
34814
- const translator$U = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
34815
- const translator$T = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
34816
- const translator$S = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
34800
+ const translator$17 = NodeTranslator.from(createSingleAttrPropertyHandler("w:vMerge"));
34801
+ const translator$16 = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
34802
+ const translator$15 = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
34803
+ const translator$14 = NodeTranslator.from(createBorderPropertyHandler("w:end"));
34804
+ const translator$13 = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
34805
+ const translator$12 = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
34806
+ const translator$11 = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
34807
+ const translator$10 = NodeTranslator.from(createBorderPropertyHandler("w:left"));
34808
+ const translator$$ = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
34809
+ const translator$_ = NodeTranslator.from(createBorderPropertyHandler("w:right"));
34810
+ const translator$Z = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
34811
+ const translator$Y = NodeTranslator.from(createBorderPropertyHandler("w:start"));
34812
+ const translator$X = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
34813
+ const translator$W = NodeTranslator.from(createBorderPropertyHandler("w:top"));
34814
+ const translator$V = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
34815
+ const translator$U = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
34816
+ const translator$T = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
34817
34817
  const propertyTranslators$6 = [
34818
- translator$V,
34819
- translator$X,
34820
- translator$$,
34821
- translator$15,
34822
- translator$13,
34823
- translator$Z,
34824
- translator$11,
34818
+ translator$W,
34819
+ translator$Y,
34825
34820
  translator$10,
34826
- translator$T,
34827
- translator$S
34821
+ translator$16,
34822
+ translator$14,
34823
+ translator$_,
34824
+ translator$12,
34825
+ translator$11,
34826
+ translator$U,
34827
+ translator$T
34828
34828
  ];
34829
- const translator$R = NodeTranslator.from(
34829
+ const translator$S = NodeTranslator.from(
34830
34830
  createNestedPropertiesTranslator("w:tcBorders", "borders", propertyTranslators$6)
34831
34831
  );
34832
- const translator$Q = NodeTranslator.from(
34832
+ const translator$R = NodeTranslator.from(
34833
34833
  createSingleAttrPropertyHandler(
34834
34834
  "w:noWrap",
34835
34835
  null,
@@ -34839,18 +34839,18 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34839
34839
  )
34840
34840
  );
34841
34841
  const propertyTranslators$5 = [
34842
- translator$14,
34843
- translator$12,
34844
- translator$_,
34845
- translator$Y,
34846
- translator$W,
34847
- translator$U
34842
+ translator$15,
34843
+ translator$13,
34844
+ translator$$,
34845
+ translator$Z,
34846
+ translator$X,
34847
+ translator$V
34848
34848
  ];
34849
- const translator$P = NodeTranslator.from(
34849
+ const translator$Q = NodeTranslator.from(
34850
34850
  createNestedPropertiesTranslator("w:tcMar", "cellMargins", propertyTranslators$5)
34851
34851
  );
34852
- const translator$O = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
34853
- const translator$N = NodeTranslator.from(
34852
+ const translator$P = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
34853
+ const translator$O = NodeTranslator.from(
34854
34854
  createSingleAttrPropertyHandler(
34855
34855
  "w:tcFitText",
34856
34856
  null,
@@ -34859,8 +34859,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34859
34859
  (v2) => booleanToString(v2)
34860
34860
  )
34861
34861
  );
34862
- const translator$M = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
34863
- const translator$L = NodeTranslator.from(
34862
+ const translator$N = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
34863
+ const translator$M = NodeTranslator.from(
34864
34864
  createSingleAttrPropertyHandler(
34865
34865
  "w:hideMark",
34866
34866
  null,
@@ -34869,55 +34869,55 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34869
34869
  (v2) => booleanToString(v2)
34870
34870
  )
34871
34871
  );
34872
- const translator$K = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
34873
- const XML_NODE_NAME$h = "w:headers";
34872
+ const translator$L = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
34873
+ const XML_NODE_NAME$i = "w:headers";
34874
34874
  const SD_ATTR_KEY$3 = "headers";
34875
- const encode$n = (params2) => {
34875
+ const encode$o = (params2) => {
34876
34876
  const { nodes } = params2;
34877
34877
  const node = nodes[0];
34878
- const attributes = encodeProperties(node, { [translator$K.xmlName]: translator$K }, true);
34878
+ const attributes = encodeProperties(node, { [translator$L.xmlName]: translator$L }, true);
34879
34879
  return {
34880
- xmlName: XML_NODE_NAME$h,
34880
+ xmlName: XML_NODE_NAME$i,
34881
34881
  sdNodeOrKeyName: SD_ATTR_KEY$3,
34882
34882
  attributes
34883
34883
  };
34884
34884
  };
34885
- const decode$p = (params2) => {
34885
+ const decode$q = (params2) => {
34886
34886
  const { headers = [] } = params2.node.attrs || {};
34887
34887
  const newNode = {
34888
- name: XML_NODE_NAME$h,
34888
+ name: XML_NODE_NAME$i,
34889
34889
  attributes: {},
34890
34890
  elements: headers.map(
34891
- (header) => translator$K.decode({
34891
+ (header) => translator$L.decode({
34892
34892
  node: { type: "header", attrs: header }
34893
34893
  })
34894
34894
  )
34895
34895
  };
34896
34896
  return newNode;
34897
34897
  };
34898
- const config$g = {
34899
- xmlName: XML_NODE_NAME$h,
34898
+ const config$h = {
34899
+ xmlName: XML_NODE_NAME$i,
34900
34900
  sdNodeOrKeyName: SD_ATTR_KEY$3,
34901
- encode: encode$n,
34902
- decode: decode$p
34901
+ encode: encode$o,
34902
+ decode: decode$q
34903
34903
  };
34904
- const translator$J = NodeTranslator.from(config$g);
34904
+ const translator$K = NodeTranslator.from(config$h);
34905
34905
  const propertyTranslators$4 = [
34906
- translator$1a,
34906
+ translator$1b,
34907
+ translator$19,
34907
34908
  translator$18,
34908
34909
  translator$17,
34909
- translator$16,
34910
+ translator$S,
34911
+ translator$1a,
34910
34912
  translator$R,
34911
- translator$19,
34912
34913
  translator$Q,
34913
34914
  translator$P,
34914
34915
  translator$O,
34915
34916
  translator$N,
34916
34917
  translator$M,
34917
- translator$L,
34918
- translator$J
34918
+ translator$K
34919
34919
  ];
34920
- const translator$I = NodeTranslator.from(
34920
+ const translator$J = NodeTranslator.from(
34921
34921
  createNestedPropertiesTranslator("w:tcPr", "tableCellProperties", propertyTranslators$4)
34922
34922
  );
34923
34923
  function handleTableCellNode({
@@ -34935,7 +34935,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
34935
34935
  const attributes = {};
34936
34936
  const referencedStyles = _referencedStyles ?? { fontSize: null, fonts: {}, cellMargins: {} };
34937
34937
  const tcPr = node.elements.find((el) => el.name === "w:tcPr");
34938
- const tableCellProperties = tcPr ? translator$I.encode({ ...params2, nodes: [tcPr] }) ?? {} : {};
34938
+ const tableCellProperties = tcPr ? translator$J.encode({ ...params2, nodes: [tcPr] }) ?? {} : {};
34939
34939
  attributes["tableCellProperties"] = tableCellProperties;
34940
34940
  if (rowBorders?.insideH) {
34941
34941
  rowBorders["bottom"] = rowBorders.insideH;
@@ -35247,13 +35247,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35247
35247
  } else if (tableCellProperties?.borders) {
35248
35248
  delete tableCellProperties.borders;
35249
35249
  }
35250
- const result = translator$I.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
35250
+ const result = translator$J.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
35251
35251
  return result;
35252
35252
  }
35253
- const XML_NODE_NAME$g = "w:tc";
35254
- const SD_NODE_NAME$d = "tableCell";
35255
- const validXmlAttributes$b = [];
35256
- function encode$m(params2, encodedAttrs) {
35253
+ const XML_NODE_NAME$h = "w:tc";
35254
+ const SD_NODE_NAME$e = "tableCell";
35255
+ const validXmlAttributes$c = [];
35256
+ function encode$n(params2, encodedAttrs) {
35257
35257
  const {
35258
35258
  node,
35259
35259
  table,
@@ -35280,30 +35280,30 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35280
35280
  }
35281
35281
  return schemaNode;
35282
35282
  }
35283
- function decode$o(params2, decodedAttrs) {
35283
+ function decode$p(params2, decodedAttrs) {
35284
35284
  const translated = translateTableCell(params2);
35285
35285
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
35286
35286
  translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
35287
35287
  }
35288
35288
  return translated;
35289
35289
  }
35290
- const config$f = {
35291
- xmlName: XML_NODE_NAME$g,
35292
- sdNodeOrKeyName: SD_NODE_NAME$d,
35290
+ const config$g = {
35291
+ xmlName: XML_NODE_NAME$h,
35292
+ sdNodeOrKeyName: SD_NODE_NAME$e,
35293
35293
  type: NodeTranslator.translatorTypes.NODE,
35294
- encode: encode$m,
35295
- decode: decode$o,
35296
- attributes: validXmlAttributes$b
35294
+ encode: encode$n,
35295
+ decode: decode$p,
35296
+ attributes: validXmlAttributes$c
35297
35297
  };
35298
- const translator$H = NodeTranslator.from(config$f);
35299
- const translator$G = NodeTranslator.from({
35298
+ const translator$I = NodeTranslator.from(config$g);
35299
+ const translator$H = NodeTranslator.from({
35300
35300
  xmlName: "w:cantSplit",
35301
35301
  sdNodeOrKeyName: "cantSplit",
35302
35302
  encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
35303
35303
  decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
35304
35304
  });
35305
- const translator$F = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
35306
- const translator$E = NodeTranslator.from(
35305
+ const translator$G = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
35306
+ const translator$F = NodeTranslator.from(
35307
35307
  createSingleAttrPropertyHandler(
35308
35308
  "w:gridAfter",
35309
35309
  null,
@@ -35312,7 +35312,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35312
35312
  (v2) => integerToString(v2)
35313
35313
  )
35314
35314
  );
35315
- const translator$D = NodeTranslator.from(
35315
+ const translator$E = NodeTranslator.from(
35316
35316
  createSingleAttrPropertyHandler(
35317
35317
  "w:gridBefore",
35318
35318
  null,
@@ -35321,21 +35321,21 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35321
35321
  (v2) => integerToString(v2)
35322
35322
  )
35323
35323
  );
35324
- const translator$C = NodeTranslator.from({
35324
+ const translator$D = NodeTranslator.from({
35325
35325
  xmlName: "w:hidden",
35326
35326
  sdNodeOrKeyName: "hidden",
35327
35327
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
35328
35328
  decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
35329
35329
  });
35330
- const translator$B = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
35331
- const translator$A = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
35332
- const translator$z = NodeTranslator.from({
35330
+ const translator$C = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
35331
+ const translator$B = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
35332
+ const translator$A = NodeTranslator.from({
35333
35333
  xmlName: "w:tblHeader",
35334
35334
  sdNodeOrKeyName: "repeatHeader",
35335
35335
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
35336
35336
  decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
35337
35337
  });
35338
- const translator$y = NodeTranslator.from({
35338
+ const translator$z = NodeTranslator.from({
35339
35339
  xmlName: "w:trHeight",
35340
35340
  sdNodeOrKeyName: "rowHeight",
35341
35341
  encode: ({ nodes }) => {
@@ -35362,11 +35362,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35362
35362
  return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
35363
35363
  }
35364
35364
  });
35365
- const translator$x = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
35366
- const translator$w = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
35365
+ const translator$y = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
35366
+ const translator$x = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
35367
35367
  const propertyTranslators$3 = [
35368
+ translator$H,
35369
+ translator$1b,
35368
35370
  translator$G,
35369
- translator$1a,
35370
35371
  translator$F,
35371
35372
  translator$E,
35372
35373
  translator$D,
@@ -35375,10 +35376,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35375
35376
  translator$A,
35376
35377
  translator$z,
35377
35378
  translator$y,
35378
- translator$x,
35379
- translator$w
35379
+ translator$x
35380
35380
  ];
35381
- const translator$v = NodeTranslator.from(
35381
+ const translator$w = NodeTranslator.from(
35382
35382
  createNestedPropertiesTranslator("w:trPr", "tableRowProperties", propertyTranslators$3, {
35383
35383
  cantSplit: false,
35384
35384
  hidden: false,
@@ -35447,17 +35447,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35447
35447
  }
35448
35448
  return false;
35449
35449
  };
35450
- const XML_NODE_NAME$f = "w:tr";
35451
- const SD_NODE_NAME$c = "tableRow";
35452
- const validXmlAttributes$a = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
35450
+ const XML_NODE_NAME$g = "w:tr";
35451
+ const SD_NODE_NAME$d = "tableRow";
35452
+ const validXmlAttributes$b = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
35453
35453
  (xmlName) => createAttributeHandler(xmlName)
35454
35454
  );
35455
- const encode$l = (params2, encodedAttrs) => {
35455
+ const encode$m = (params2, encodedAttrs) => {
35456
35456
  const { row } = params2.extraParams;
35457
35457
  let tableRowProperties = {};
35458
35458
  const tPr = row.elements.find((el) => el.name === "w:trPr");
35459
35459
  if (tPr) {
35460
- tableRowProperties = translator$v.encode({
35460
+ tableRowProperties = translator$w.encode({
35461
35461
  ...params2,
35462
35462
  nodes: [tPr]
35463
35463
  });
@@ -35494,7 +35494,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35494
35494
  skipOccupiedColumns();
35495
35495
  const startColumn = currentColumnIndex;
35496
35496
  const columnWidth = gridColumnWidths?.[startColumn] || null;
35497
- const result = translator$H.encode({
35497
+ const result = translator$I.encode({
35498
35498
  ...params2,
35499
35499
  extraParams: {
35500
35500
  ...params2.extraParams,
@@ -35527,7 +35527,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35527
35527
  };
35528
35528
  return newNode;
35529
35529
  };
35530
- const decode$n = (params2, decodedAttrs) => {
35530
+ const decode$o = (params2, decodedAttrs) => {
35531
35531
  const { node } = params2;
35532
35532
  const cells = node.content || [];
35533
35533
  let leadingPlaceholders = 0;
@@ -35567,7 +35567,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35567
35567
  }
35568
35568
  }
35569
35569
  tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
35570
- const trPr = translator$v.decode({
35570
+ const trPr = translator$w.decode({
35571
35571
  ...params2,
35572
35572
  node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
35573
35573
  });
@@ -35579,15 +35579,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
35579
35579
  elements
35580
35580
  };
35581
35581
  };
35582
- const config$e = {
35583
- xmlName: XML_NODE_NAME$f,
35584
- sdNodeOrKeyName: SD_NODE_NAME$c,
35582
+ const config$f = {
35583
+ xmlName: XML_NODE_NAME$g,
35584
+ sdNodeOrKeyName: SD_NODE_NAME$d,
35585
35585
  type: NodeTranslator.translatorTypes.NODE,
35586
- encode: encode$l,
35587
- decode: decode$n,
35588
- attributes: validXmlAttributes$a
35586
+ encode: encode$m,
35587
+ decode: decode$o,
35588
+ attributes: validXmlAttributes$b
35589
35589
  };
35590
- const translator$u = NodeTranslator.from(config$e);
35590
+ const translator$v = NodeTranslator.from(config$f);
35591
35591
  function parseTagValueJSON(json) {
35592
35592
  if (typeof json !== "string") {
35593
35593
  return {};
@@ -36910,32 +36910,32 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36910
36910
  elements: [...anchorElements, ...elementsWithWrap]
36911
36911
  };
36912
36912
  }
36913
- const XML_NODE_NAME$e = "wp:anchor";
36914
- const SD_NODE_NAME$b = ["image"];
36915
- const validXmlAttributes$9 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
36916
- function encode$k(params2) {
36913
+ const XML_NODE_NAME$f = "wp:anchor";
36914
+ const SD_NODE_NAME$c = ["image"];
36915
+ const validXmlAttributes$a = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
36916
+ function encode$l(params2) {
36917
36917
  const { node } = params2.extraParams;
36918
36918
  if (!node || !node.type) {
36919
36919
  return null;
36920
36920
  }
36921
36921
  return handleAnchorNode(params2);
36922
36922
  }
36923
- function decode$m(params2) {
36923
+ function decode$n(params2) {
36924
36924
  const { node } = params2;
36925
36925
  if (!node || !node.type) {
36926
36926
  return null;
36927
36927
  }
36928
36928
  return translateAnchorNode(params2);
36929
36929
  }
36930
- const config$d = {
36931
- xmlName: XML_NODE_NAME$e,
36932
- sdNodeOrKeyName: SD_NODE_NAME$b,
36930
+ const config$e = {
36931
+ xmlName: XML_NODE_NAME$f,
36932
+ sdNodeOrKeyName: SD_NODE_NAME$c,
36933
36933
  type: NodeTranslator.translatorTypes.NODE,
36934
- encode: encode$k,
36935
- decode: decode$m,
36936
- attributes: validXmlAttributes$9
36934
+ encode: encode$l,
36935
+ decode: decode$n,
36936
+ attributes: validXmlAttributes$a
36937
36937
  };
36938
- const translator$t = NodeTranslator.from(config$d);
36938
+ const translator$u = NodeTranslator.from(config$e);
36939
36939
  function handleInlineNode(params2) {
36940
36940
  const { node } = params2.extraParams;
36941
36941
  if (node.name !== "wp:inline") {
@@ -36951,41 +36951,41 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36951
36951
  elements: nodeElements.elements
36952
36952
  };
36953
36953
  }
36954
- const XML_NODE_NAME$d = "wp:inline";
36955
- const SD_NODE_NAME$a = ["image"];
36956
- const validXmlAttributes$8 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
36957
- function encode$j(params2) {
36954
+ const XML_NODE_NAME$e = "wp:inline";
36955
+ const SD_NODE_NAME$b = ["image"];
36956
+ const validXmlAttributes$9 = ["distT", "distB", "distL", "distR"].map((xmlName) => createAttributeHandler(xmlName));
36957
+ function encode$k(params2) {
36958
36958
  const { node } = params2.extraParams;
36959
36959
  if (!node || !node.type) {
36960
36960
  return null;
36961
36961
  }
36962
36962
  return handleInlineNode(params2);
36963
36963
  }
36964
- function decode$l(params2) {
36964
+ function decode$m(params2) {
36965
36965
  const { node } = params2;
36966
36966
  if (!node || !node.type) {
36967
36967
  return null;
36968
36968
  }
36969
36969
  return translateInlineNode(params2);
36970
36970
  }
36971
- const config$c = {
36972
- xmlName: XML_NODE_NAME$d,
36973
- sdNodeOrKeyName: SD_NODE_NAME$a,
36971
+ const config$d = {
36972
+ xmlName: XML_NODE_NAME$e,
36973
+ sdNodeOrKeyName: SD_NODE_NAME$b,
36974
36974
  type: NodeTranslator.translatorTypes.NODE,
36975
- encode: encode$j,
36976
- decode: decode$l,
36977
- attributes: validXmlAttributes$8
36975
+ encode: encode$k,
36976
+ decode: decode$m,
36977
+ attributes: validXmlAttributes$9
36978
36978
  };
36979
- const translator$s = NodeTranslator.from(config$c);
36980
- const XML_NODE_NAME$c = "w:drawing";
36981
- const SD_NODE_NAME$9 = [];
36982
- const validXmlAttributes$7 = [];
36983
- function encode$i(params2) {
36979
+ const translator$t = NodeTranslator.from(config$d);
36980
+ const XML_NODE_NAME$d = "w:drawing";
36981
+ const SD_NODE_NAME$a = [];
36982
+ const validXmlAttributes$8 = [];
36983
+ function encode$j(params2) {
36984
36984
  const nodes = params2.nodes;
36985
36985
  const node = nodes[0];
36986
36986
  const translatorByChildName = {
36987
- "wp:anchor": translator$t,
36988
- "wp:inline": translator$s
36987
+ "wp:anchor": translator$u,
36988
+ "wp:inline": translator$t
36989
36989
  };
36990
36990
  return node.elements.reduce((acc, child) => {
36991
36991
  if (acc) return acc;
@@ -36994,12 +36994,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
36994
36994
  return translator2.encode({ ...params2, extraParams: { node: child } }) || acc;
36995
36995
  }, null);
36996
36996
  }
36997
- function decode$k(params2) {
36997
+ function decode$l(params2) {
36998
36998
  const { node } = params2;
36999
36999
  if (!node || !node.type) {
37000
37000
  return null;
37001
37001
  }
37002
- const childTranslator = node.attrs.isAnchor ? translator$t : translator$s;
37002
+ const childTranslator = node.attrs.isAnchor ? translator$u : translator$t;
37003
37003
  const resultNode = childTranslator.decode(params2);
37004
37004
  return wrapTextInRun(
37005
37005
  {
@@ -37009,15 +37009,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
37009
37009
  []
37010
37010
  );
37011
37011
  }
37012
- const config$b = {
37013
- xmlName: XML_NODE_NAME$c,
37014
- sdNodeOrKeyName: SD_NODE_NAME$9,
37012
+ const config$c = {
37013
+ xmlName: XML_NODE_NAME$d,
37014
+ sdNodeOrKeyName: SD_NODE_NAME$a,
37015
37015
  type: NodeTranslator.translatorTypes.NODE,
37016
- encode: encode$i,
37017
- decode: decode$k,
37018
- attributes: validXmlAttributes$7
37016
+ encode: encode$j,
37017
+ decode: decode$l,
37018
+ attributes: validXmlAttributes$8
37019
37019
  };
37020
- const translator$r = NodeTranslator.from(config$b);
37020
+ const translator$s = NodeTranslator.from(config$c);
37021
37021
  class CommandService {
37022
37022
  /**
37023
37023
  * @param {import('./commands/types/index.js').CommandServiceOptions} props
@@ -38365,7 +38365,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38365
38365
  return getTextNodeForExport(attrs.displayLabel, [...marks, ...marksFromAttrs], params2);
38366
38366
  }
38367
38367
  function prepareImageAnnotation(params2, imageSize) {
38368
- return translator$r.decode({
38368
+ return translator$s.decode({
38369
38369
  ...params2,
38370
38370
  imageSize
38371
38371
  });
@@ -38689,10 +38689,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38689
38689
  };
38690
38690
  return result;
38691
38691
  }
38692
- const XML_NODE_NAME$b = "w:sdt";
38693
- const SD_NODE_NAME$8 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
38694
- const validXmlAttributes$6 = [];
38695
- function encode$h(params2) {
38692
+ const XML_NODE_NAME$c = "w:sdt";
38693
+ const SD_NODE_NAME$9 = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
38694
+ const validXmlAttributes$7 = [];
38695
+ function encode$i(params2) {
38696
38696
  const nodes = params2.nodes;
38697
38697
  const node = nodes[0];
38698
38698
  const { type: sdtType, handler: handler2 } = sdtNodeTypeStrategy(node);
@@ -38702,7 +38702,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38702
38702
  const result = handler2(params2);
38703
38703
  return result;
38704
38704
  }
38705
- function decode$j(params2) {
38705
+ function decode$k(params2) {
38706
38706
  const { node } = params2;
38707
38707
  if (!node || !node.type) {
38708
38708
  return null;
@@ -38720,15 +38720,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38720
38720
  const result = decoder();
38721
38721
  return result;
38722
38722
  }
38723
- const config$a = {
38724
- xmlName: XML_NODE_NAME$b,
38725
- sdNodeOrKeyName: SD_NODE_NAME$8,
38723
+ const config$b = {
38724
+ xmlName: XML_NODE_NAME$c,
38725
+ sdNodeOrKeyName: SD_NODE_NAME$9,
38726
38726
  type: NodeTranslator.translatorTypes.NODE,
38727
- encode: encode$h,
38728
- decode: decode$j,
38729
- attributes: validXmlAttributes$6
38727
+ encode: encode$i,
38728
+ decode: decode$k,
38729
+ attributes: validXmlAttributes$7
38730
38730
  };
38731
- const translator$q = NodeTranslator.from(config$a);
38731
+ const translator$r = NodeTranslator.from(config$b);
38732
38732
  function preProcessVerticalMergeCells(table, { editorSchema }) {
38733
38733
  if (!table || !Array.isArray(table.content)) {
38734
38734
  return table;
@@ -38769,17 +38769,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38769
38769
  }
38770
38770
  return table;
38771
38771
  }
38772
- const translator$p = NodeTranslator.from({
38772
+ const translator$q = NodeTranslator.from({
38773
38773
  xmlName: "w:bidiVisual",
38774
38774
  sdNodeOrKeyName: "rightToLeft",
38775
38775
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
38776
38776
  decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
38777
38777
  });
38778
- const translator$o = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
38779
- const translator$n = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
38780
- const translator$m = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
38781
- const translator$l = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
38782
- const translator$k = NodeTranslator.from({
38778
+ const translator$p = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
38779
+ const translator$o = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
38780
+ const translator$n = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
38781
+ const translator$m = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
38782
+ const translator$l = NodeTranslator.from({
38783
38783
  xmlName: "w:tblLook",
38784
38784
  sdNodeOrKeyName: "tblLook",
38785
38785
  attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
@@ -38791,16 +38791,16 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38791
38791
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
38792
38792
  }
38793
38793
  });
38794
- const translator$j = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
38795
- const translator$i = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
38796
- const translator$h = NodeTranslator.from(
38794
+ const translator$k = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
38795
+ const translator$j = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
38796
+ const translator$i = NodeTranslator.from(
38797
38797
  createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
38798
38798
  );
38799
- const translator$g = NodeTranslator.from(
38799
+ const translator$h = NodeTranslator.from(
38800
38800
  createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
38801
38801
  );
38802
- const translator$f = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
38803
- const translator$e = NodeTranslator.from({
38802
+ const translator$g = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
38803
+ const translator$f = NodeTranslator.from({
38804
38804
  xmlName: "w:tblpPr",
38805
38805
  sdNodeOrKeyName: "floatingTableProperties",
38806
38806
  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))),
@@ -38813,35 +38813,36 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38813
38813
  }
38814
38814
  });
38815
38815
  const propertyTranslators$2 = [
38816
- translator$15,
38817
- translator$13,
38816
+ translator$16,
38817
+ translator$14,
38818
+ translator$12,
38818
38819
  translator$11,
38819
38820
  translator$10,
38821
+ translator$_,
38822
+ translator$Y,
38823
+ translator$W
38824
+ ];
38825
+ const translator$e = NodeTranslator.from(
38826
+ createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$2)
38827
+ );
38828
+ const propertyTranslators$1 = [
38829
+ translator$15,
38830
+ translator$13,
38820
38831
  translator$$,
38821
38832
  translator$Z,
38822
38833
  translator$X,
38823
38834
  translator$V
38824
38835
  ];
38825
38836
  const translator$d = NodeTranslator.from(
38826
- createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$2)
38827
- );
38828
- const propertyTranslators$1 = [
38829
- translator$14,
38830
- translator$12,
38831
- translator$_,
38832
- translator$Y,
38833
- translator$W,
38834
- translator$U
38835
- ];
38836
- const translator$c = NodeTranslator.from(
38837
38837
  createNestedPropertiesTranslator("w:tblCellMar", "cellMargins", propertyTranslators$1)
38838
38838
  );
38839
38839
  const propertyTranslators = [
38840
+ translator$q,
38841
+ translator$C,
38842
+ translator$1a,
38840
38843
  translator$p,
38841
38844
  translator$B,
38842
- translator$19,
38843
38845
  translator$o,
38844
- translator$A,
38845
38846
  translator$n,
38846
38847
  translator$m,
38847
38848
  translator$l,
@@ -38852,13 +38853,12 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38852
38853
  translator$g,
38853
38854
  translator$f,
38854
38855
  translator$e,
38855
- translator$d,
38856
- translator$c
38856
+ translator$d
38857
38857
  ];
38858
- const translator$b = NodeTranslator.from(
38858
+ const translator$c = NodeTranslator.from(
38859
38859
  createNestedPropertiesTranslator("w:tblPr", "tableProperties", propertyTranslators)
38860
38860
  );
38861
- const translator$a = NodeTranslator.from(
38861
+ const translator$b = NodeTranslator.from(
38862
38862
  createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
38863
38863
  );
38864
38864
  const DEFAULT_COLUMN_WIDTH_PX = 100;
@@ -38908,20 +38908,20 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38908
38908
  }
38909
38909
  return Math.max(fallbackWidthTwips, cellMinWidthTwips);
38910
38910
  };
38911
- const XML_NODE_NAME$a = "w:tblGrid";
38911
+ const XML_NODE_NAME$b = "w:tblGrid";
38912
38912
  const SD_ATTR_KEY$2 = "grid";
38913
38913
  const cellMinWidth = pixelsToTwips(10);
38914
- const encode$g = (params2) => {
38914
+ const encode$h = (params2) => {
38915
38915
  const { nodes } = params2;
38916
38916
  const node = nodes[0];
38917
- const attributes = encodeProperties(node, { [translator$a.xmlName]: translator$a }, true);
38917
+ const attributes = encodeProperties(node, { [translator$b.xmlName]: translator$b }, true);
38918
38918
  return {
38919
- xmlName: XML_NODE_NAME$a,
38919
+ xmlName: XML_NODE_NAME$b,
38920
38920
  sdNodeOrKeyName: SD_ATTR_KEY$2,
38921
38921
  attributes
38922
38922
  };
38923
38923
  };
38924
- const decode$i = (params2) => {
38924
+ const decode$j = (params2) => {
38925
38925
  const { grid: rawGrid } = params2.node.attrs || {};
38926
38926
  const grid = Array.isArray(rawGrid) ? rawGrid : [];
38927
38927
  const { firstRow = {} } = params2.extraParams || {};
@@ -38944,10 +38944,10 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38944
38944
  const roundedWidth = Math.round(numericWidth);
38945
38945
  const minimumWidth = shouldEnforceMinimum ? cellMinWidth : 1;
38946
38946
  const safeWidth = Math.max(roundedWidth, minimumWidth);
38947
- const decoded = translator$a.decode({
38947
+ const decoded = translator$b.decode({
38948
38948
  node: { type: (
38949
38949
  /** @type {string} */
38950
- translator$a.sdNodeOrKeyName
38950
+ translator$b.sdNodeOrKeyName
38951
38951
  ), attrs: { col: safeWidth } }
38952
38952
  });
38953
38953
  if (decoded) elements.push(decoded);
@@ -38987,19 +38987,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
38987
38987
  columnIndex++;
38988
38988
  }
38989
38989
  const newNode = {
38990
- name: XML_NODE_NAME$a,
38990
+ name: XML_NODE_NAME$b,
38991
38991
  attributes: {},
38992
38992
  elements
38993
38993
  };
38994
38994
  return newNode;
38995
38995
  };
38996
- const config$9 = {
38997
- xmlName: XML_NODE_NAME$a,
38996
+ const config$a = {
38997
+ xmlName: XML_NODE_NAME$b,
38998
38998
  sdNodeOrKeyName: SD_ATTR_KEY$2,
38999
- encode: encode$g,
39000
- decode: decode$i
38999
+ encode: encode$h,
39000
+ decode: decode$j
39001
39001
  };
39002
- const translator$9 = NodeTranslator.from(config$9);
39002
+ const translator$a = NodeTranslator.from(config$a);
39003
39003
  const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
39004
39004
  const DEFAULT_PAGE_MARGIN_TWIPS = 1440;
39005
39005
  const DEFAULT_CONTENT_WIDTH_TWIPS = DEFAULT_PAGE_WIDTH_TWIPS - 2 * DEFAULT_PAGE_MARGIN_TWIPS;
@@ -39062,19 +39062,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39062
39062
  columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
39063
39063
  };
39064
39064
  };
39065
- const XML_NODE_NAME$9 = "w:tbl";
39066
- const SD_NODE_NAME$7 = "table";
39067
- const encode$f = (params2, encodedAttrs) => {
39065
+ const XML_NODE_NAME$a = "w:tbl";
39066
+ const SD_NODE_NAME$8 = "table";
39067
+ const encode$g = (params2, encodedAttrs) => {
39068
39068
  const { nodes } = params2;
39069
39069
  const node = nodes[0];
39070
39070
  const tblPr = node.elements.find((el) => el.name === "w:tblPr");
39071
39071
  if (tblPr) {
39072
- const encodedProperties = translator$b.encode({ ...params2, nodes: [tblPr] });
39072
+ const encodedProperties = translator$c.encode({ ...params2, nodes: [tblPr] });
39073
39073
  encodedAttrs["tableProperties"] = encodedProperties || {};
39074
39074
  }
39075
39075
  const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
39076
39076
  if (tblGrid) {
39077
- encodedAttrs["grid"] = translator$9.encode({ ...params2, nodes: [tblGrid] }).attributes;
39077
+ encodedAttrs["grid"] = translator$a.encode({ ...params2, nodes: [tblGrid] }).attributes;
39078
39078
  }
39079
39079
  [
39080
39080
  "tableStyleId",
@@ -39142,7 +39142,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39142
39142
  const totalColumns = columnWidths.length;
39143
39143
  const activeRowSpans = totalColumns > 0 ? new Array(totalColumns).fill(0) : [];
39144
39144
  rows.forEach((row, rowIndex) => {
39145
- const result = translator$u.encode({
39145
+ const result = translator$v.encode({
39146
39146
  ...params2,
39147
39147
  nodes: [row],
39148
39148
  extraParams: {
@@ -39196,13 +39196,13 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39196
39196
  attrs: encodedAttrs
39197
39197
  };
39198
39198
  };
39199
- const decode$h = (params2, decodedAttrs) => {
39199
+ const decode$i = (params2, decodedAttrs) => {
39200
39200
  params2.node = preProcessVerticalMergeCells(params2.node, params2);
39201
39201
  const { node } = params2;
39202
39202
  const elements = translateChildNodes(params2);
39203
39203
  const firstRow = node.content?.find((n) => n.type === "tableRow");
39204
39204
  const properties = node.attrs.grid;
39205
- const element = translator$9.decode({
39205
+ const element = translator$a.decode({
39206
39206
  ...params2,
39207
39207
  node: { ...node, attrs: { ...node.attrs, grid: properties } },
39208
39208
  extraParams: {
@@ -39212,7 +39212,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39212
39212
  if (element) elements.unshift(element);
39213
39213
  if (node.attrs?.tableProperties) {
39214
39214
  const properties2 = { ...node.attrs.tableProperties };
39215
- const element2 = translator$b.decode({
39215
+ const element2 = translator$c.decode({
39216
39216
  ...params2,
39217
39217
  node: { ...node, attrs: { ...node.attrs, tableProperties: properties2 } }
39218
39218
  });
@@ -39278,7 +39278,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39278
39278
  if (baseTblPr && baseTblPr.elements) {
39279
39279
  tblPr.elements.push(...baseTblPr.elements);
39280
39280
  }
39281
- const tableProperties = translator$b.encode({ ...params2, nodes: [tblPr] });
39281
+ const tableProperties = translator$c.encode({ ...params2, nodes: [tblPr] });
39282
39282
  if (tableProperties) {
39283
39283
  const { borders, rowBorders } = _processTableBorders(tableProperties.borders || {});
39284
39284
  if (borders) stylesToReturn.borders = borders;
@@ -39297,85 +39297,85 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39297
39297
  }
39298
39298
  return stylesToReturn;
39299
39299
  }
39300
- const config$8 = {
39301
- xmlName: XML_NODE_NAME$9,
39302
- sdNodeOrKeyName: SD_NODE_NAME$7,
39300
+ const config$9 = {
39301
+ xmlName: XML_NODE_NAME$a,
39302
+ sdNodeOrKeyName: SD_NODE_NAME$8,
39303
39303
  type: NodeTranslator.translatorTypes.NODE,
39304
- encode: encode$f,
39305
- decode: decode$h,
39304
+ encode: encode$g,
39305
+ decode: decode$i,
39306
39306
  attributes: []
39307
39307
  };
39308
- const translator$8 = NodeTranslator.from(config$8);
39309
- const encode$e = (attributes) => {
39308
+ const translator$9 = NodeTranslator.from(config$9);
39309
+ const encode$f = (attributes) => {
39310
39310
  return attributes["w:id"];
39311
39311
  };
39312
- const decode$g = (attrs) => {
39312
+ const decode$h = (attrs) => {
39313
39313
  return attrs.id;
39314
39314
  };
39315
39315
  const attrConfig$7 = Object.freeze({
39316
39316
  xmlName: "w:id",
39317
39317
  sdName: "id",
39318
- encode: encode$e,
39319
- decode: decode$g
39318
+ encode: encode$f,
39319
+ decode: decode$h
39320
39320
  });
39321
- const encode$d = (attributes) => {
39321
+ const encode$e = (attributes) => {
39322
39322
  return attributes["w:name"];
39323
39323
  };
39324
- const decode$f = (attrs) => {
39324
+ const decode$g = (attrs) => {
39325
39325
  return attrs.name;
39326
39326
  };
39327
39327
  const attrConfig$6 = Object.freeze({
39328
39328
  xmlName: "w:name",
39329
39329
  sdName: "name",
39330
- encode: encode$d,
39331
- decode: decode$f
39330
+ encode: encode$e,
39331
+ decode: decode$g
39332
39332
  });
39333
- const encode$c = (attributes) => {
39333
+ const encode$d = (attributes) => {
39334
39334
  return attributes["w:colFirst"];
39335
39335
  };
39336
- const decode$e = (attrs) => {
39336
+ const decode$f = (attrs) => {
39337
39337
  return attrs.colFirst;
39338
39338
  };
39339
39339
  const attrConfig$5 = Object.freeze({
39340
39340
  xmlName: "w:colFirst",
39341
39341
  sdName: "colFirst",
39342
- encode: encode$c,
39343
- decode: decode$e
39342
+ encode: encode$d,
39343
+ decode: decode$f
39344
39344
  });
39345
- const encode$b = (attributes) => {
39345
+ const encode$c = (attributes) => {
39346
39346
  return attributes["w:colLast"];
39347
39347
  };
39348
- const decode$d = (attrs) => {
39348
+ const decode$e = (attrs) => {
39349
39349
  return attrs.colLast;
39350
39350
  };
39351
39351
  const attrConfig$4 = Object.freeze({
39352
39352
  xmlName: "w:colLast",
39353
39353
  sdName: "colLast",
39354
- encode: encode$b,
39355
- decode: decode$d
39354
+ encode: encode$c,
39355
+ decode: decode$e
39356
39356
  });
39357
- const encode$a = (attributes) => {
39357
+ const encode$b = (attributes) => {
39358
39358
  return attributes["w:displacedByCustomXml"];
39359
39359
  };
39360
- const decode$c = (attrs) => {
39360
+ const decode$d = (attrs) => {
39361
39361
  return attrs.displacedByCustomXml;
39362
39362
  };
39363
39363
  const attrConfig$3 = Object.freeze({
39364
39364
  xmlName: "w:displacedByCustomXml",
39365
39365
  sdName: "displacedByCustomXml",
39366
- encode: encode$a,
39367
- decode: decode$c
39366
+ encode: encode$b,
39367
+ decode: decode$d
39368
39368
  });
39369
- const validXmlAttributes$5 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
39370
- const XML_NODE_NAME$8 = "w:bookmarkStart";
39371
- const SD_NODE_NAME$6 = "bookmarkStart";
39372
- const encode$9 = (params2, encodedAttrs = {}) => {
39369
+ const validXmlAttributes$6 = [attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4, attrConfig$3];
39370
+ const XML_NODE_NAME$9 = "w:bookmarkStart";
39371
+ const SD_NODE_NAME$7 = "bookmarkStart";
39372
+ const encode$a = (params2, encodedAttrs = {}) => {
39373
39373
  return {
39374
39374
  type: "bookmarkStart",
39375
39375
  attrs: encodedAttrs
39376
39376
  };
39377
39377
  };
39378
- const decode$b = (params2, decodedAttrs = {}) => {
39378
+ const decode$c = (params2, decodedAttrs = {}) => {
39379
39379
  const result = {
39380
39380
  name: "w:bookmarkStart",
39381
39381
  elements: []
@@ -39385,49 +39385,49 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39385
39385
  }
39386
39386
  return result;
39387
39387
  };
39388
- const config$7 = {
39389
- xmlName: XML_NODE_NAME$8,
39390
- sdNodeOrKeyName: SD_NODE_NAME$6,
39388
+ const config$8 = {
39389
+ xmlName: XML_NODE_NAME$9,
39390
+ sdNodeOrKeyName: SD_NODE_NAME$7,
39391
39391
  type: NodeTranslator.translatorTypes.NODE,
39392
- encode: encode$9,
39393
- decode: decode$b,
39394
- attributes: validXmlAttributes$5
39392
+ encode: encode$a,
39393
+ decode: decode$c,
39394
+ attributes: validXmlAttributes$6
39395
39395
  };
39396
- const translator$7 = NodeTranslator.from(config$7);
39397
- const encode$8 = (attributes) => {
39396
+ const translator$8 = NodeTranslator.from(config$8);
39397
+ const encode$9 = (attributes) => {
39398
39398
  return attributes["w:id"];
39399
39399
  };
39400
- const decode$a = (attrs) => {
39400
+ const decode$b = (attrs) => {
39401
39401
  return attrs.id;
39402
39402
  };
39403
39403
  const attrConfig$2 = Object.freeze({
39404
39404
  xmlName: "w:id",
39405
39405
  sdName: "id",
39406
- encode: encode$8,
39407
- decode: decode$a
39406
+ encode: encode$9,
39407
+ decode: decode$b
39408
39408
  });
39409
- const encode$7 = (attributes) => {
39409
+ const encode$8 = (attributes) => {
39410
39410
  return attributes["w:displacedByCustomXml"];
39411
39411
  };
39412
- const decode$9 = (attrs) => {
39412
+ const decode$a = (attrs) => {
39413
39413
  return attrs.displacedByCustomXml;
39414
39414
  };
39415
39415
  const attrConfig$1 = Object.freeze({
39416
39416
  xmlName: "w:displacedByCustomXml",
39417
39417
  sdName: "displacedByCustomXml",
39418
- encode: encode$7,
39419
- decode: decode$9
39418
+ encode: encode$8,
39419
+ decode: decode$a
39420
39420
  });
39421
- const validXmlAttributes$4 = [attrConfig$2, attrConfig$1];
39422
- const XML_NODE_NAME$7 = "w:bookmarkEnd";
39423
- const SD_NODE_NAME$5 = "bookmarkEnd";
39424
- const encode$6 = (params2, encodedAttrs = {}) => {
39421
+ const validXmlAttributes$5 = [attrConfig$2, attrConfig$1];
39422
+ const XML_NODE_NAME$8 = "w:bookmarkEnd";
39423
+ const SD_NODE_NAME$6 = "bookmarkEnd";
39424
+ const encode$7 = (params2, encodedAttrs = {}) => {
39425
39425
  return {
39426
39426
  type: "bookmarkEnd",
39427
39427
  attrs: encodedAttrs
39428
39428
  };
39429
39429
  };
39430
- const decode$8 = (params2, decodedAttrs = {}) => {
39430
+ const decode$9 = (params2, decodedAttrs = {}) => {
39431
39431
  const result = {
39432
39432
  name: "w:bookmarkEnd",
39433
39433
  elements: []
@@ -39437,27 +39437,27 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39437
39437
  }
39438
39438
  return result;
39439
39439
  };
39440
- const config$6 = {
39441
- xmlName: XML_NODE_NAME$7,
39442
- sdNodeOrKeyName: SD_NODE_NAME$5,
39440
+ const config$7 = {
39441
+ xmlName: XML_NODE_NAME$8,
39442
+ sdNodeOrKeyName: SD_NODE_NAME$6,
39443
39443
  type: NodeTranslator.translatorTypes.NODE,
39444
- encode: encode$6,
39445
- decode: decode$8,
39446
- attributes: validXmlAttributes$4
39444
+ encode: encode$7,
39445
+ decode: decode$9,
39446
+ attributes: validXmlAttributes$5
39447
39447
  };
39448
- const translator$6 = NodeTranslator.from(config$6);
39449
- const decode$7 = (attrs) => attrs?.["w:id"];
39448
+ const translator$7 = NodeTranslator.from(config$7);
39449
+ const decode$8 = (attrs) => attrs?.["w:id"];
39450
39450
  const attrConfig = Object.freeze({
39451
39451
  xmlName: "w:id",
39452
39452
  sdName: "w:id",
39453
39453
  // We do not translate it from 'w:id' to 'id' when encoding, so the name is the same
39454
39454
  encode: () => {
39455
39455
  },
39456
- decode: decode$7
39456
+ decode: decode$8
39457
39457
  });
39458
- const XML_NODE_NAME$6 = "w:commentRange";
39459
- const SD_NODE_NAME$4 = "commentRange";
39460
- const decode$6 = (params2) => {
39458
+ const XML_NODE_NAME$7 = "w:commentRange";
39459
+ const SD_NODE_NAME$5 = "commentRange";
39460
+ const decode$7 = (params2) => {
39461
39461
  const { node, comments, commentsExportType, exportedCommentDefs } = params2;
39462
39462
  if (!node) return;
39463
39463
  if (!comments) return;
@@ -39500,19 +39500,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39500
39500
  };
39501
39501
  };
39502
39502
  const getConfig = (type2) => ({
39503
- xmlName: `${XML_NODE_NAME$6}${type2}`,
39504
- sdNodeOrKeyName: `${SD_NODE_NAME$4}${type2}`,
39503
+ xmlName: `${XML_NODE_NAME$7}${type2}`,
39504
+ sdNodeOrKeyName: `${SD_NODE_NAME$5}${type2}`,
39505
39505
  type: NodeTranslator.translatorTypes.NODE,
39506
39506
  encode: () => {
39507
39507
  },
39508
- decode: decode$6,
39508
+ decode: decode$7,
39509
39509
  attributes: [attrConfig]
39510
39510
  });
39511
39511
  const commentRangeStartTranslator = NodeTranslator.from(getConfig("Start"));
39512
39512
  const commentRangeEndTranslator = NodeTranslator.from(getConfig("End"));
39513
- const XML_NODE_NAME$5 = "sd:pageReference";
39514
- const SD_NODE_NAME$3 = "pageReference";
39515
- const encode$5 = (params2) => {
39513
+ const XML_NODE_NAME$6 = "sd:pageReference";
39514
+ const SD_NODE_NAME$4 = "pageReference";
39515
+ const encode$6 = (params2) => {
39516
39516
  const { nodes = [], nodeListHandler } = params2 || {};
39517
39517
  const node = nodes[0];
39518
39518
  const processedText = nodeListHandler.handler({
@@ -39529,7 +39529,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39529
39529
  };
39530
39530
  return processedNode;
39531
39531
  };
39532
- const decode$5 = (params2) => {
39532
+ const decode$6 = (params2) => {
39533
39533
  const { node } = params2;
39534
39534
  const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
39535
39535
  const contentNodes = (node.content ?? []).flatMap((n) => exportSchemaToJson({ ...params2, node: n }));
@@ -39602,17 +39602,17 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39602
39602
  ];
39603
39603
  return translated;
39604
39604
  };
39605
- const config$5 = {
39606
- xmlName: XML_NODE_NAME$5,
39607
- sdNodeOrKeyName: SD_NODE_NAME$3,
39605
+ const config$6 = {
39606
+ xmlName: XML_NODE_NAME$6,
39607
+ sdNodeOrKeyName: SD_NODE_NAME$4,
39608
39608
  type: NodeTranslator.translatorTypes.NODE,
39609
- encode: encode$5,
39610
- decode: decode$5
39609
+ encode: encode$6,
39610
+ decode: decode$6
39611
39611
  };
39612
- const translator$5 = NodeTranslator.from(config$5);
39613
- const XML_NODE_NAME$4 = "sd:tableOfContents";
39614
- const SD_NODE_NAME$2 = "tableOfContents";
39615
- const encode$4 = (params2) => {
39612
+ const translator$6 = NodeTranslator.from(config$6);
39613
+ const XML_NODE_NAME$5 = "sd:tableOfContents";
39614
+ const SD_NODE_NAME$3 = "tableOfContents";
39615
+ const encode$5 = (params2) => {
39616
39616
  const { nodes = [], nodeListHandler } = params2 || {};
39617
39617
  const node = nodes[0];
39618
39618
  const processedContent = nodeListHandler.handler({
@@ -39628,7 +39628,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39628
39628
  };
39629
39629
  return processedNode;
39630
39630
  };
39631
- const decode$4 = (params2) => {
39631
+ const decode$5 = (params2) => {
39632
39632
  const { node } = params2;
39633
39633
  const contentNodes = node.content.map((n) => exportSchemaToJson({ ...params2, node: n }));
39634
39634
  const tocBeginElements = [
@@ -39675,14 +39675,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39675
39675
  }
39676
39676
  return contentNodes;
39677
39677
  };
39678
- const config$4 = {
39679
- xmlName: XML_NODE_NAME$4,
39680
- sdNodeOrKeyName: SD_NODE_NAME$2,
39678
+ const config$5 = {
39679
+ xmlName: XML_NODE_NAME$5,
39680
+ sdNodeOrKeyName: SD_NODE_NAME$3,
39681
39681
  type: NodeTranslator.translatorTypes.NODE,
39682
- encode: encode$4,
39683
- decode: decode$4
39682
+ encode: encode$5,
39683
+ decode: decode$5
39684
39684
  };
39685
- const translator$4 = NodeTranslator.from(config$4);
39685
+ const translator$5 = NodeTranslator.from(config$5);
39686
39686
  function parseInlineStyles(styleString) {
39687
39687
  if (!styleString) return {};
39688
39688
  return styleString.split(";").filter((style2) => !!style2.trim()).reduce((acc, style2) => {
@@ -39818,7 +39818,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39818
39818
  if (mainNode.name === "w:drawing") node = mainNode;
39819
39819
  else node = mainNode.elements.find((el) => el.name === "w:drawing");
39820
39820
  if (!node) return { nodes: [], consumed: 0 };
39821
- const schemaNode = translator$r.encode(params2);
39821
+ const schemaNode = translator$s.encode(params2);
39822
39822
  const newNodes = schemaNode ? [schemaNode] : [];
39823
39823
  return { nodes: newNodes, consumed: 1 };
39824
39824
  };
@@ -39843,15 +39843,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39843
39843
  }
39844
39844
  return void 0;
39845
39845
  };
39846
- const XML_NODE_NAME$3 = "w:del";
39846
+ const XML_NODE_NAME$4 = "w:del";
39847
39847
  const SD_ATTR_KEY$1 = "trackDelete";
39848
- const validXmlAttributes$3 = [
39848
+ const validXmlAttributes$4 = [
39849
39849
  createAttributeHandler("w:id", "id"),
39850
39850
  createAttributeHandler("w:date", "date"),
39851
39851
  createAttributeHandler("w:author", "author"),
39852
39852
  createAttributeHandler("w:authorEmail", "authorEmail")
39853
39853
  ];
39854
- const encode$3 = (params2, encodedAttrs = {}) => {
39854
+ const encode$4 = (params2, encodedAttrs = {}) => {
39855
39855
  const { nodeListHandler, extraParams = {} } = params2;
39856
39856
  const { node } = extraParams;
39857
39857
  const subs = nodeListHandler.handler({
@@ -39867,7 +39867,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39867
39867
  });
39868
39868
  return subs;
39869
39869
  };
39870
- function decode$3(params2) {
39870
+ function decode$4(params2) {
39871
39871
  const { node } = params2;
39872
39872
  if (!node || !node.type) {
39873
39873
  return null;
@@ -39894,24 +39894,24 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39894
39894
  elements: [translatedTextNode]
39895
39895
  };
39896
39896
  }
39897
- const config$3 = {
39898
- xmlName: XML_NODE_NAME$3,
39897
+ const config$4 = {
39898
+ xmlName: XML_NODE_NAME$4,
39899
39899
  sdNodeOrKeyName: SD_ATTR_KEY$1,
39900
39900
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
39901
- encode: encode$3,
39902
- decode: decode$3,
39903
- attributes: validXmlAttributes$3
39901
+ encode: encode$4,
39902
+ decode: decode$4,
39903
+ attributes: validXmlAttributes$4
39904
39904
  };
39905
- const translator$3 = NodeTranslator.from(config$3);
39906
- const XML_NODE_NAME$2 = "w:ins";
39905
+ const translator$4 = NodeTranslator.from(config$4);
39906
+ const XML_NODE_NAME$3 = "w:ins";
39907
39907
  const SD_ATTR_KEY = "trackInsert";
39908
- const validXmlAttributes$2 = [
39908
+ const validXmlAttributes$3 = [
39909
39909
  createAttributeHandler("w:id", "id"),
39910
39910
  createAttributeHandler("w:date", "date"),
39911
39911
  createAttributeHandler("w:author", "author"),
39912
39912
  createAttributeHandler("w:authorEmail", "authorEmail")
39913
39913
  ];
39914
- const encode$2 = (params2, encodedAttrs = {}) => {
39914
+ const encode$3 = (params2, encodedAttrs = {}) => {
39915
39915
  const { nodeListHandler, extraParams = {} } = params2;
39916
39916
  const { node } = extraParams;
39917
39917
  const subs = nodeListHandler.handler({
@@ -39927,7 +39927,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39927
39927
  });
39928
39928
  return subs;
39929
39929
  };
39930
- function decode$2(params2) {
39930
+ function decode$3(params2) {
39931
39931
  const { node } = params2;
39932
39932
  if (!node || !node.type) {
39933
39933
  return null;
@@ -39952,15 +39952,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39952
39952
  elements: [translatedTextNode]
39953
39953
  };
39954
39954
  }
39955
- const config$2 = {
39956
- xmlName: XML_NODE_NAME$2,
39955
+ const config$3 = {
39956
+ xmlName: XML_NODE_NAME$3,
39957
39957
  sdNodeOrKeyName: SD_ATTR_KEY,
39958
39958
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
39959
- encode: encode$2,
39960
- decode: decode$2,
39961
- attributes: validXmlAttributes$2
39959
+ encode: encode$3,
39960
+ decode: decode$3,
39961
+ attributes: validXmlAttributes$3
39962
39962
  };
39963
- const translator$2 = NodeTranslator.from(config$2);
39963
+ const translator$3 = NodeTranslator.from(config$3);
39964
39964
  const isTrackChangeElement = (node) => node?.name === "w:del" || node?.name === "w:ins";
39965
39965
  const unwrapTrackChangeNode = (node) => {
39966
39966
  if (!node) {
@@ -39999,7 +39999,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39999
39999
  };
40000
40000
  switch (mainNode.name) {
40001
40001
  case "w:del":
40002
- result = translator$3.encode({
40002
+ result = translator$4.encode({
40003
40003
  extraParams: {
40004
40004
  node: mainNode
40005
40005
  },
@@ -40007,7 +40007,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
40007
40007
  });
40008
40008
  break;
40009
40009
  case "w:ins":
40010
- result = translator$2.encode({
40010
+ result = translator$3.encode({
40011
40011
  extraParams: {
40012
40012
  node: mainNode
40013
40013
  },
@@ -40021,8 +40021,118 @@ Please report this to https://github.com/markedjs/marked.`, e) {
40021
40021
  handlerName: "trackChangeNodeHandler",
40022
40022
  handler: handleTrackChangeNode
40023
40023
  };
40024
- const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$1c);
40025
- const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$1b);
40024
+ const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$1d);
40025
+ const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$1c);
40026
+ const XML_NODE_NAME$2 = "w:t";
40027
+ const SD_NODE_NAME$2 = "text";
40028
+ const validXmlAttributes$2 = [createAttributeHandler("xml:space", "xmlSpace")];
40029
+ const encode$2 = (params2, encodedAttrs = {}) => {
40030
+ const { node } = params2.extraParams;
40031
+ const { elements, type: type2, attributes } = node;
40032
+ let text;
40033
+ if (elements.length === 1) {
40034
+ text = elements[0].text;
40035
+ const xmlSpace = encodedAttrs.xmlSpace ?? elements[0]?.attributes?.["xml:space"];
40036
+ if (xmlSpace !== "preserve" && typeof text === "string") {
40037
+ text = text.replace(/^\s+/, "").replace(/\s+$/, "");
40038
+ }
40039
+ text = text.replace(/\[\[sdspace\]\]/g, "");
40040
+ } else if (!elements.length && encodedAttrs.xmlSpace === "preserve") {
40041
+ text = " ";
40042
+ } else return null;
40043
+ return {
40044
+ type: "text",
40045
+ text,
40046
+ attrs: { type: type2, attributes: attributes || {} },
40047
+ marks: []
40048
+ };
40049
+ };
40050
+ const decode$2 = (params2, decodedAttrs = {}) => {
40051
+ const { node, extraParams } = params2;
40052
+ if (!node || !node.type) {
40053
+ return null;
40054
+ }
40055
+ const trackedMarks = ["trackDelete", "trackInsert"];
40056
+ const trackedMark = node.marks?.find((m2) => trackedMarks.includes(m2.type));
40057
+ if (trackedMark) {
40058
+ switch (trackedMark.type) {
40059
+ case "trackDelete":
40060
+ return translator$4.decode(params2);
40061
+ case "trackInsert":
40062
+ return translator$3.decode(params2);
40063
+ }
40064
+ }
40065
+ const isLinkNode = node.marks?.some((m2) => m2.type === "link");
40066
+ if (isLinkNode && !extraParams?.linkProcessed) {
40067
+ return translator$1d.decode(params2);
40068
+ }
40069
+ const { text, marks = [] } = node;
40070
+ return getTextNodeForExport(text, marks, params2);
40071
+ };
40072
+ const config$2 = {
40073
+ xmlName: XML_NODE_NAME$2,
40074
+ sdNodeOrKeyName: SD_NODE_NAME$2,
40075
+ type: NodeTranslator.translatorTypes.NODE,
40076
+ encode: encode$2,
40077
+ decode: decode$2,
40078
+ attributes: validXmlAttributes$2
40079
+ };
40080
+ const translator$2 = NodeTranslator.from(config$2);
40081
+ const handleTextNode = (params2) => {
40082
+ const { nodes, insideTrackChange } = params2;
40083
+ if (nodes.length === 0 || !(nodes[0].name === "w:t" || insideTrackChange && nodes[0].name === "w:delText")) {
40084
+ return { nodes: [], consumed: 0 };
40085
+ }
40086
+ const node = nodes[0];
40087
+ const resultNode = translator$2.encode({
40088
+ ...params2,
40089
+ extraParams: {
40090
+ ...params2.extraParams || {},
40091
+ node
40092
+ }
40093
+ });
40094
+ if (!resultNode) return { nodes: [], consumed: 0 };
40095
+ return {
40096
+ nodes: [resultNode],
40097
+ consumed: 1
40098
+ };
40099
+ };
40100
+ const textNodeHandlerEntity = {
40101
+ handlerName: "textNodeHandler",
40102
+ handler: handleTextNode
40103
+ };
40104
+ const handleParagraphNode = (params2) => {
40105
+ const { nodes } = params2;
40106
+ if (nodes.length === 0 || nodes[0].name !== "w:p") {
40107
+ return { nodes: [], consumed: 0 };
40108
+ }
40109
+ const schemaNode = translator$1p.encode(params2);
40110
+ const newNodes = schemaNode ? [schemaNode] : [];
40111
+ return { nodes: newNodes, consumed: 1 };
40112
+ };
40113
+ const paragraphNodeHandlerEntity = {
40114
+ handlerName: "paragraphNodeHandler",
40115
+ handler: handleParagraphNode
40116
+ };
40117
+ const handleSdtNode = (params2) => {
40118
+ const { nodes } = params2;
40119
+ if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
40120
+ return { nodes: [], consumed: 0 };
40121
+ }
40122
+ const result = translator$r.encode(params2);
40123
+ if (!result) {
40124
+ return { nodes: [], consumed: 0 };
40125
+ }
40126
+ const resultNodes = Array.isArray(result) ? result : [result];
40127
+ return {
40128
+ nodes: resultNodes,
40129
+ consumed: 1
40130
+ };
40131
+ };
40132
+ const sdtNodeHandlerEntity = {
40133
+ handlerName: "sdtNodeHandler",
40134
+ handler: handleSdtNode
40135
+ };
40026
40136
  function parseProperties(node) {
40027
40137
  const marks = [];
40028
40138
  const unknownMarks = [];
@@ -40074,73 +40184,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
40074
40184
  const isPropertiesElement = (element) => {
40075
40185
  return !!SuperConverter.propertyTypes[element.name || element.type];
40076
40186
  };
40077
- const handleTextNode = (params2) => {
40078
- const { nodes, insideTrackChange } = params2;
40079
- if (nodes.length === 0 || !(nodes[0].name === "w:t" || insideTrackChange && nodes[0].name === "w:delText")) {
40080
- return { nodes: [], consumed: 0 };
40081
- }
40082
- const node = nodes[0];
40083
- const { type: type2 } = node;
40084
- const { attributes, elements, marks = [] } = parseProperties(node);
40085
- let text;
40086
- if (elements.length === 1) {
40087
- text = elements[0].text;
40088
- const xmlSpace = node.attributes?.["xml:space"] ?? elements[0]?.attributes?.["xml:space"];
40089
- if (xmlSpace !== "preserve" && typeof text === "string") {
40090
- text = text.replace(/^\s+/, "").replace(/\s+$/, "");
40091
- }
40092
- text = text.replace(/\[\[sdspace\]\]/g, "");
40093
- } else if (!elements.length && "attributes" in node && node.attributes["xml:space"] === "preserve") {
40094
- text = " ";
40095
- } else return { nodes: [], consumed: 0 };
40096
- return {
40097
- nodes: [
40098
- {
40099
- type: getElementName(node),
40100
- text,
40101
- attrs: { type: type2, attributes: attributes || {} },
40102
- marks
40103
- }
40104
- ],
40105
- consumed: 1
40106
- };
40107
- };
40108
- const textNodeHandlerEntity = {
40109
- handlerName: "textNodeHandler",
40110
- handler: handleTextNode
40111
- };
40112
- const handleParagraphNode = (params2) => {
40113
- const { nodes } = params2;
40114
- if (nodes.length === 0 || nodes[0].name !== "w:p") {
40115
- return { nodes: [], consumed: 0 };
40116
- }
40117
- const schemaNode = translator$1o.encode(params2);
40118
- const newNodes = schemaNode ? [schemaNode] : [];
40119
- return { nodes: newNodes, consumed: 1 };
40120
- };
40121
- const paragraphNodeHandlerEntity = {
40122
- handlerName: "paragraphNodeHandler",
40123
- handler: handleParagraphNode
40124
- };
40125
- const handleSdtNode = (params2) => {
40126
- const { nodes } = params2;
40127
- if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
40128
- return { nodes: [], consumed: 0 };
40129
- }
40130
- const result = translator$q.encode(params2);
40131
- if (!result) {
40132
- return { nodes: [], consumed: 0 };
40133
- }
40134
- const resultNodes = Array.isArray(result) ? result : [result];
40135
- return {
40136
- nodes: resultNodes,
40137
- consumed: 1
40138
- };
40139
- };
40140
- const sdtNodeHandlerEntity = {
40141
- handlerName: "sdtNodeHandler",
40142
- handler: handleSdtNode
40143
- };
40144
40187
  const handleStandardNode = (params2) => {
40145
40188
  const { nodes, docx, nodeListHandler } = params2;
40146
40189
  if (!nodes || nodes.length === 0) {
@@ -40217,7 +40260,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
40217
40260
  if (nodes.length === 0 || nodes[0].name !== "w:br") {
40218
40261
  return { nodes: [], consumed: 0 };
40219
40262
  }
40220
- const result = translator$1r.encode(params2);
40263
+ const result = translator$1s.encode(params2);
40221
40264
  if (!result) return { nodes: [], consumed: 0 };
40222
40265
  return {
40223
40266
  nodes: [result],
@@ -40289,7 +40332,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
40289
40332
  if (isCustomMarkBookmark(nodes[0], params2.editor)) {
40290
40333
  return handleBookmarkNode(params2);
40291
40334
  }
40292
- const node = translator$7.encode(params2);
40335
+ const node = translator$8.encode(params2);
40293
40336
  if (!node) return { nodes: [], consumed: 0 };
40294
40337
  return { nodes: [node], consumed: 1 };
40295
40338
  };
@@ -40321,7 +40364,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
40321
40364
  if (!nodes.length || nodes[0].name !== "w:bookmarkEnd") {
40322
40365
  return { nodes: [], consumed: 0 };
40323
40366
  }
40324
- const node = translator$6.encode(params2);
40367
+ const node = translator$7.encode(params2);
40325
40368
  if (!node) return { nodes: [], consumed: 0 };
40326
40369
  return { nodes: [node], consumed: 1 };
40327
40370
  };
@@ -40520,7 +40563,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
40520
40563
  handlerName: "autoTotalPageCountEntity",
40521
40564
  handler: handleAutoTotalPageNumber
40522
40565
  };
40523
- const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$5);
40566
+ const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$6);
40524
40567
  const handlePictNode = (params2) => {
40525
40568
  const { nodes } = params2;
40526
40569
  if (!nodes.length || nodes[0].name !== "w:p") {
@@ -40887,15 +40930,15 @@ Please report this to https://github.com/markedjs/marked.`, e) {
40887
40930
  if (!nodes.length || nodes[0].name !== "w:tab") {
40888
40931
  return { nodes: [], consumed: 0 };
40889
40932
  }
40890
- const node = translator$1p.encode(params2);
40933
+ const node = translator$1q.encode(params2);
40891
40934
  return { nodes: [node], consumed: 1 };
40892
40935
  };
40893
40936
  const tabNodeEntityHandler = {
40894
40937
  handlerName: "w:tabTranslator",
40895
40938
  handler: handleTabNode
40896
40939
  };
40897
- const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$8);
40898
- const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$4);
40940
+ const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$9);
40941
+ const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$5);
40899
40942
  function preProcessPageInstruction(nodesToCombine) {
40900
40943
  const pageNumNode = {
40901
40944
  name: "sd:autoPageNumber",
@@ -41790,7 +41833,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41790
41833
  const XML_NODE_NAME = "w:pict";
41791
41834
  const SD_NODE_NAME = ["shapeContainer", "contentBlock"];
41792
41835
  const validXmlAttributes = [];
41793
- function encode$1c(params2) {
41836
+ function encode$1d(params2) {
41794
41837
  const { node, pNode } = params2.extraParams;
41795
41838
  const { type: pictType, handler: handler2 } = pictNodeTypeStrategy(node);
41796
41839
  if (!handler2 || pictType === "unknown") {
@@ -41822,7 +41865,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41822
41865
  xmlName: XML_NODE_NAME,
41823
41866
  sdNodeOrKeyName: SD_NODE_NAME,
41824
41867
  type: NodeTranslator.translatorTypes.NODE,
41825
- encode: encode$1c,
41868
+ encode: encode$1d,
41826
41869
  decode,
41827
41870
  attributes: validXmlAttributes
41828
41871
  };
@@ -41938,21 +41981,21 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41938
41981
  doc: translateDocumentNode,
41939
41982
  body: translateBodyNode,
41940
41983
  heading: translateHeadingNode,
41941
- paragraph: translator$1o,
41942
- run: translator$1b,
41943
- text: translateTextNode,
41984
+ paragraph: translator$1p,
41985
+ run: translator$1c,
41986
+ text: translator$2,
41944
41987
  bulletList: translateList,
41945
41988
  orderedList: translateList,
41946
- lineBreak: translator$1r,
41947
- table: translator$8,
41948
- tableRow: translator$u,
41949
- tableCell: translator$H,
41950
- bookmarkStart: translator$7,
41951
- bookmarkEnd: translator$6,
41952
- fieldAnnotation: translator$q,
41953
- tab: translator$1p,
41954
- image: translator$r,
41955
- hardBreak: translator$1r,
41989
+ lineBreak: translator$1s,
41990
+ table: translator$9,
41991
+ tableRow: translator$v,
41992
+ tableCell: translator$I,
41993
+ bookmarkStart: translator$8,
41994
+ bookmarkEnd: translator$7,
41995
+ fieldAnnotation: translator$r,
41996
+ tab: translator$1q,
41997
+ image: translator$s,
41998
+ hardBreak: translator$1s,
41956
41999
  commentRangeStart: commentRangeStartTranslator,
41957
42000
  commentRangeEnd: commentRangeEndTranslator,
41958
42001
  commentReference: () => null,
@@ -41960,14 +42003,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
41960
42003
  shapeTextbox: translator,
41961
42004
  contentBlock: translator,
41962
42005
  vectorShape: translateVectorShape,
41963
- structuredContent: translator$q,
41964
- structuredContentBlock: translator$q,
41965
- documentPartObject: translator$q,
41966
- documentSection: translator$q,
42006
+ structuredContent: translator$r,
42007
+ structuredContentBlock: translator$r,
42008
+ documentPartObject: translator$r,
42009
+ documentSection: translator$r,
41967
42010
  "page-number": translatePageNumberNode,
41968
42011
  "total-page-number": translateTotalPageNumberNode,
41969
- pageReference: translator$5,
41970
- tableOfContents: translator$4
42012
+ pageReference: translator$6,
42013
+ tableOfContents: translator$5
41971
42014
  };
41972
42015
  let handler2 = router[type2];
41973
42016
  if (handler2 && "decode" in handler2 && typeof handler2.decode === "function") {
@@ -42300,25 +42343,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
42300
42343
  }
42301
42344
  return wrapTextInRun(textNodes, outputMarks);
42302
42345
  }
42303
- function translateTextNode(params2) {
42304
- const { node, extraParams } = params2;
42305
- const trackedMarks = [TrackInsertMarkName, TrackDeleteMarkName];
42306
- const trackedMark = node.marks?.find((m2) => trackedMarks.includes(m2.type));
42307
- if (trackedMark) {
42308
- switch (trackedMark.type) {
42309
- case "trackDelete":
42310
- return translator$3.decode(params2);
42311
- case "trackInsert":
42312
- return translator$2.decode(params2);
42313
- }
42314
- }
42315
- const isLinkNode = node.marks?.some((m2) => m2.type === "link");
42316
- if (isLinkNode && !extraParams?.linkProcessed) {
42317
- return translator$1c.decode(params2);
42318
- }
42319
- const { text, marks = [] } = node;
42320
- return getTextNodeForExport(text, marks, params2);
42321
- }
42322
42346
  function wrapTextInRun(nodeOrNodes, marks) {
42323
42347
  let elements = [];
42324
42348
  if (Array.isArray(nodeOrNodes)) elements = nodeOrNodes;
@@ -42574,7 +42598,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
42574
42598
  markElement.type = "element";
42575
42599
  break;
42576
42600
  case "underline": {
42577
- const translated = translator$1l.decode({
42601
+ const translated = translator$1m.decode({
42578
42602
  node: {
42579
42603
  attrs: {
42580
42604
  underlineType: attrs.underlineType ?? attrs.underline ?? null,
@@ -42638,7 +42662,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
42638
42662
  break;
42639
42663
  case "highlight": {
42640
42664
  const highlightValue = attrs.color ?? attrs.highlight ?? null;
42641
- const translated = translator$1q.decode({ node: { attrs: { highlight: highlightValue } } });
42665
+ const translated = translator$1r.decode({ node: { attrs: { highlight: highlightValue } } });
42642
42666
  return translated || {};
42643
42667
  }
42644
42668
  case "link":
@@ -46385,7 +46409,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
46385
46409
  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);
46386
46410
  var __privateSet = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
46387
46411
  var __privateMethod$1 = (obj, member, method) => (__accessCheck$1(obj, member, "access private method"), method);
46388
- var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, 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;
46412
+ 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;
46389
46413
  var GOOD_LEAF_SIZE = 200;
46390
46414
  var RopeSequence = function RopeSequence2() {
46391
46415
  };
@@ -60783,8 +60807,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
60783
60807
  /**
60784
60808
  * Set the document mode
60785
60809
  * @param {string} documentMode - The document mode ('editing', 'viewing', 'suggesting')
60810
+ * @param {string} caller - Calling context
60786
60811
  */
60787
- setDocumentMode(documentMode) {
60812
+ setDocumentMode(documentMode, caller) {
60788
60813
  if (this.options.isHeaderOrFooter || this.options.isChildEditor) return;
60789
60814
  let cleanedMode = documentMode?.toLowerCase() || "editing";
60790
60815
  if (!this.extensionService || !this.state) return;
@@ -60795,32 +60820,32 @@ Please report this to https://github.com/markedjs/marked.`, e) {
60795
60820
  this.commands.toggleTrackChangesShowOriginal();
60796
60821
  this.setEditable(false, false);
60797
60822
  this.setOptions({ documentMode: "viewing" });
60798
- toggleHeaderFooterEditMode({
60799
- editor: this,
60800
- focusedSectionEditor: null,
60801
- isEditMode: false,
60802
- documentMode: cleanedMode
60803
- });
60823
+ if (caller !== "init")
60824
+ toggleHeaderFooterEditMode({
60825
+ editor: this,
60826
+ focusedSectionEditor: null,
60827
+ isEditMode: false,
60828
+ documentMode: cleanedMode
60829
+ });
60804
60830
  if (pm) pm.classList.add("view-mode");
60805
60831
  } else if (cleanedMode === "suggesting") {
60806
- __privateMethod$1(this, _Editor_instances, registerPluginByNameIfNotExists_fn).call(this, "TrackChangesBase");
60807
60832
  this.commands.disableTrackChangesShowOriginal();
60808
60833
  this.commands.enableTrackChanges();
60809
60834
  this.setOptions({ documentMode: "suggesting" });
60810
60835
  this.setEditable(true, false);
60811
60836
  if (pm) pm.classList.remove("view-mode");
60812
60837
  } else if (cleanedMode === "editing") {
60813
- __privateMethod$1(this, _Editor_instances, registerPluginByNameIfNotExists_fn).call(this, "TrackChangesBase");
60814
60838
  this.commands.disableTrackChangesShowOriginal();
60815
60839
  this.commands.disableTrackChanges();
60816
60840
  this.setEditable(true, false);
60817
60841
  this.setOptions({ documentMode: "editing" });
60818
- toggleHeaderFooterEditMode({
60819
- editor: this,
60820
- focusedSectionEditor: null,
60821
- isEditMode: false,
60822
- documentMode: cleanedMode
60823
- });
60842
+ if (caller !== "init")
60843
+ toggleHeaderFooterEditMode({
60844
+ editor: this,
60845
+ focusedSectionEditor: null,
60846
+ isEditMode: false,
60847
+ documentMode: cleanedMode
60848
+ });
60824
60849
  if (pm) pm.classList.remove("view-mode");
60825
60850
  }
60826
60851
  }
@@ -61655,7 +61680,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
61655
61680
  if (shouldMigrateListsOnInit) {
61656
61681
  this.migrateListsToV2();
61657
61682
  }
61658
- this.setDocumentMode(this.options.documentMode);
61683
+ this.setDocumentMode(this.options.documentMode, "init");
61659
61684
  if (!this.options.ydoc) {
61660
61685
  if (!this.options.isChildEditor) {
61661
61686
  __privateMethod$1(this, _Editor_instances, initPagination_fn).call(this);
@@ -61729,12 +61754,6 @@ Please report this to https://github.com/markedjs/marked.`, e) {
61729
61754
  __privateMethod$1(this, _Editor_instances, initComments_fn).call(this);
61730
61755
  }, 50);
61731
61756
  };
61732
- registerPluginByNameIfNotExists_fn = function(name) {
61733
- const plugin2 = this.extensionService?.plugins.find((p2) => p2.key.startsWith(name));
61734
- const hasPlugin = this.state?.plugins?.find((p2) => p2.key.startsWith(name));
61735
- if (plugin2 && !hasPlugin) this.registerPlugin(plugin2);
61736
- return plugin2?.key;
61737
- };
61738
61757
  createExtensionService_fn = function() {
61739
61758
  const allowedExtensions = ["extension", "node", "mark"];
61740
61759
  const coreExtensions = [Editable, Commands, EditorFocus, Keymap];
@@ -66347,7 +66366,8 @@ Please report this to https://github.com/markedjs/marked.`, e) {
66347
66366
  const updateNodeViews = transactions.some((tr2) => tr2.getMeta("updatedListItemNodeViews"));
66348
66367
  if (updateNodeViews || !hasInitialized) refreshAllListItemNodeViews();
66349
66368
  const isFromPlugin = transactions.some((tr2) => tr2.getMeta("orderedListSync"));
66350
- if (isFromPlugin || !transactions.some((tr2) => tr2.docChanged)) {
66369
+ const docChanged = transactions.some((tr2) => tr2.docChanged) && !oldState.doc.eq(newState.doc);
66370
+ if (isFromPlugin || !docChanged) {
66351
66371
  return null;
66352
66372
  }
66353
66373
  hasInitialized = true;
@@ -72999,6 +73019,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
72999
73019
  },
73000
73020
  appendTransaction: (trs, _oldState, state2) => {
73001
73021
  let foundImages = [];
73022
+ if (!trs.some((tr) => tr.docChanged)) return null;
73002
73023
  trs.forEach((tr) => {
73003
73024
  if (tr.docChanged) {
73004
73025
  tr.steps.forEach((step, index2) => {
@@ -73342,7 +73363,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
73342
73363
  return {
73343
73364
  allowBase64: true,
73344
73365
  htmlAttributes: {
73345
- style: "display: inline-block; content-visibility: auto; contain-intrinsic-size: auto 600px;",
73366
+ style: "display: inline-block;",
73346
73367
  "aria-label": "Image node"
73347
73368
  }
73348
73369
  };
@@ -99615,89 +99636,89 @@ ${style2}
99615
99636
  const SuperInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$i, [["__scopeId", "data-v-4d5cff52"]]);
99616
99637
  const additionalHandlers = Object.freeze({
99617
99638
  "mc:AlternateContent": translator$1,
99618
- "sd:pageReference": translator$5,
99619
- "sd:tableOfContents": translator$4,
99620
- "w:b": translator$1n,
99621
- "w:bidiVisual": translator$p,
99622
- "w:bookmarkEnd": translator$6,
99623
- "w:bookmarkStart": translator$7,
99624
- "w:bottom": translator$15,
99625
- "w:br": translator$1r,
99626
- "w:cantSplit": translator$G,
99627
- "w:cnfStyle": translator$1a,
99628
- "w:color": translator$1j,
99629
- "w:divId": translator$F,
99630
- "w:drawing": translator$r,
99631
- "w:end": translator$13,
99632
- "w:gridAfter": translator$E,
99633
- "w:gridBefore": translator$D,
99634
- "w:gridCol": translator$a,
99635
- "w:hidden": translator$C,
99636
- "w:highlight": translator$1q,
99637
- "w:hyperlink": translator$1c,
99638
- "w:i": translator$1m,
99639
- "w:insideH": translator$11,
99640
- "w:insideV": translator$10,
99641
- "w:jc": translator$B,
99642
- "w:left": translator$$,
99643
- "w:p": translator$1o,
99644
- "w:r": translator$1b,
99645
- "w:rFonts": translator$1i,
99646
- "w:rPr": translator$1d,
99647
- "w:rStyle": translator$1h,
99648
- "w:right": translator$Z,
99649
- "w:sdt": translator$q,
99650
- "w:shd": translator$19,
99651
- "w:start": translator$X,
99652
- "w:strike": translator$1k,
99653
- "w:sz": translator$1g,
99654
- "w:szCs": translator$1f,
99655
- "w:tab": translator$1p,
99656
- "w:tbl": translator$8,
99657
- "w:tblBorders": translator$d,
99658
- "w:tblCaption": translator$o,
99659
- "w:tblCellMar": translator$c,
99660
- "w:tblCellSpacing": translator$A,
99661
- "w:tblDescription": translator$n,
99662
- "w:tblGrid": translator$9,
99663
- "w:tblHeader": translator$z,
99664
- "w:tblInd": translator$m,
99665
- "w:tblLayout": translator$l,
99666
- "w:tblLook": translator$k,
99667
- "w:tblOverlap": translator$j,
99668
- "w:tblPr": translator$b,
99669
- "w:tblStyle": translator$i,
99670
- "w:tblStyleColBandSize": translator$h,
99671
- "w:tblStyleRowBandSize": translator$g,
99672
- "w:tblW": translator$f,
99673
- "w:tblpPr": translator$e,
99674
- "w:tc": translator$H,
99675
- "w:top": translator$V,
99676
- "w:tr": translator$u,
99677
- "w:trHeight": translator$y,
99678
- "w:trPr": translator$v,
99679
- "w:u": translator$1l,
99680
- "w:wAfter": translator$x,
99681
- "w:wBefore": translator$w,
99682
- "wp:anchor": translator$t,
99683
- "wp:inline": translator$s,
99639
+ "sd:pageReference": translator$6,
99640
+ "sd:tableOfContents": translator$5,
99641
+ "w:b": translator$1o,
99642
+ "w:bidiVisual": translator$q,
99643
+ "w:bookmarkEnd": translator$7,
99644
+ "w:bookmarkStart": translator$8,
99645
+ "w:bottom": translator$16,
99646
+ "w:br": translator$1s,
99647
+ "w:cantSplit": translator$H,
99648
+ "w:cnfStyle": translator$1b,
99649
+ "w:color": translator$1k,
99650
+ "w:divId": translator$G,
99651
+ "w:drawing": translator$s,
99652
+ "w:end": translator$14,
99653
+ "w:gridAfter": translator$F,
99654
+ "w:gridBefore": translator$E,
99655
+ "w:gridCol": translator$b,
99656
+ "w:hidden": translator$D,
99657
+ "w:highlight": translator$1r,
99658
+ "w:hyperlink": translator$1d,
99659
+ "w:i": translator$1n,
99660
+ "w:insideH": translator$12,
99661
+ "w:insideV": translator$11,
99662
+ "w:jc": translator$C,
99663
+ "w:left": translator$10,
99664
+ "w:p": translator$1p,
99665
+ "w:r": translator$1c,
99666
+ "w:rFonts": translator$1j,
99667
+ "w:rPr": translator$1e,
99668
+ "w:rStyle": translator$1i,
99669
+ "w:right": translator$_,
99670
+ "w:sdt": translator$r,
99671
+ "w:shd": translator$1a,
99672
+ "w:start": translator$Y,
99673
+ "w:strike": translator$1l,
99674
+ "w:sz": translator$1h,
99675
+ "w:szCs": translator$1g,
99676
+ "w:tab": translator$1q,
99677
+ "w:tbl": translator$9,
99678
+ "w:tblBorders": translator$e,
99679
+ "w:tblCaption": translator$p,
99680
+ "w:tblCellMar": translator$d,
99681
+ "w:tblCellSpacing": translator$B,
99682
+ "w:tblDescription": translator$o,
99683
+ "w:tblGrid": translator$a,
99684
+ "w:tblHeader": translator$A,
99685
+ "w:tblInd": translator$n,
99686
+ "w:tblLayout": translator$m,
99687
+ "w:tblLook": translator$l,
99688
+ "w:tblOverlap": translator$k,
99689
+ "w:tblPr": translator$c,
99690
+ "w:tblStyle": translator$j,
99691
+ "w:tblStyleColBandSize": translator$i,
99692
+ "w:tblStyleRowBandSize": translator$h,
99693
+ "w:tblW": translator$g,
99694
+ "w:tblpPr": translator$f,
99695
+ "w:tc": translator$I,
99696
+ "w:top": translator$W,
99697
+ "w:tr": translator$v,
99698
+ "w:trHeight": translator$z,
99699
+ "w:trPr": translator$w,
99700
+ "w:u": translator$1m,
99701
+ "w:wAfter": translator$y,
99702
+ "w:wBefore": translator$x,
99703
+ "wp:anchor": translator$u,
99704
+ "wp:inline": translator$t,
99684
99705
  "w:commentRangeStart": commentRangeStartTranslator,
99685
99706
  "w:commentRangeEnd": commentRangeEndTranslator,
99686
- "w:vMerge": translator$16,
99687
- "w:gridSpan": translator$17,
99688
- "w:vAlign": translator$M,
99689
- "w:noWrap": translator$Q,
99690
- "w:tcFitText": translator$N,
99691
- "w:tcW": translator$18,
99692
- "w:hideMark": translator$L,
99693
- "w:textDirection": translator$O,
99694
- "w:tl2br": translator$T,
99695
- "w:tr2bl": translator$S,
99696
- "w:header": translator$K,
99697
- "w:headers": translator$J,
99698
- "w:tcBorders": translator$R,
99699
- "w:tcMar": translator$P,
99700
- "w:tcPr": translator$I
99707
+ "w:vMerge": translator$17,
99708
+ "w:gridSpan": translator$18,
99709
+ "w:vAlign": translator$N,
99710
+ "w:noWrap": translator$R,
99711
+ "w:tcFitText": translator$O,
99712
+ "w:tcW": translator$19,
99713
+ "w:hideMark": translator$M,
99714
+ "w:textDirection": translator$P,
99715
+ "w:tl2br": translator$U,
99716
+ "w:tr2bl": translator$T,
99717
+ "w:header": translator$L,
99718
+ "w:headers": translator$K,
99719
+ "w:tcBorders": translator$S,
99720
+ "w:tcMar": translator$Q,
99721
+ "w:tcPr": translator$J
99701
99722
  });
99702
99723
  const baseHandlers = {
99703
99724
  ...runPropertyTranslators,