@harbour-enterprises/superdoc 1.7.0-next.6 → 1.7.0-next.8

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.
@@ -6293,37 +6293,37 @@ class NodeTranslator {
6293
6293
  return `NodeTranslator(${this.xmlName}, priority=${this.priority})`;
6294
6294
  }
6295
6295
  }
6296
- const encode$11 = (attributes) => {
6296
+ const encode$13 = (attributes) => {
6297
6297
  return attributes["w:type"];
6298
6298
  };
6299
- const decode$13 = (attrs) => {
6299
+ const decode$15 = (attrs) => {
6300
6300
  const { lineBreakType } = attrs;
6301
6301
  return lineBreakType;
6302
6302
  };
6303
6303
  const attrConfig$B = Object.freeze({
6304
6304
  xmlName: "w:type",
6305
6305
  sdName: "lineBreakType",
6306
- encode: encode$11,
6307
- decode: decode$13
6306
+ encode: encode$13,
6307
+ decode: decode$15
6308
6308
  });
6309
- const encode$10 = (attributes) => {
6309
+ const encode$12 = (attributes) => {
6310
6310
  const xmlAttrValue = attributes["w:clear"];
6311
6311
  return xmlAttrValue;
6312
6312
  };
6313
- const decode$12 = (attrs) => {
6313
+ const decode$14 = (attrs) => {
6314
6314
  const { clear } = attrs;
6315
6315
  return clear;
6316
6316
  };
6317
6317
  const attrConfig$A = Object.freeze({
6318
6318
  xmlName: "w:clear",
6319
6319
  sdName: "clear",
6320
- encode: encode$10,
6321
- decode: decode$12
6320
+ encode: encode$12,
6321
+ decode: decode$14
6322
6322
  });
6323
6323
  const validXmlAttributes$j = [attrConfig$B, attrConfig$A];
6324
- const XML_NODE_NAME$t = "w:br";
6325
- const SD_NODE_NAME$n = "lineBreak";
6326
- const encode$$ = (_2, encodedAttrs) => {
6324
+ const XML_NODE_NAME$v = "w:br";
6325
+ const SD_NODE_NAME$p = "lineBreak";
6326
+ const encode$11 = (_2, encodedAttrs) => {
6327
6327
  const isPageBreak = encodedAttrs?.lineBreakType === "page";
6328
6328
  const translated = {
6329
6329
  type: isPageBreak ? "hardBreak" : "lineBreak"
@@ -6333,7 +6333,7 @@ const encode$$ = (_2, encodedAttrs) => {
6333
6333
  }
6334
6334
  return translated;
6335
6335
  };
6336
- const decode$11 = (params, decodedAttrs) => {
6336
+ const decode$13 = (params, decodedAttrs) => {
6337
6337
  const { node } = params;
6338
6338
  if (!node) return;
6339
6339
  const wBreak = { name: "w:br" };
@@ -6350,39 +6350,39 @@ const decode$11 = (params, decodedAttrs) => {
6350
6350
  };
6351
6351
  return translated;
6352
6352
  };
6353
- const config$s = {
6354
- xmlName: XML_NODE_NAME$t,
6355
- sdNodeOrKeyName: SD_NODE_NAME$n,
6353
+ const config$u = {
6354
+ xmlName: XML_NODE_NAME$v,
6355
+ sdNodeOrKeyName: SD_NODE_NAME$p,
6356
6356
  type: NodeTranslator.translatorTypes.NODE,
6357
- encode: encode$$,
6358
- decode: decode$11,
6357
+ encode: encode$11,
6358
+ decode: decode$13,
6359
6359
  attributes: validXmlAttributes$j
6360
6360
  };
6361
- const translator$2t = NodeTranslator.from(config$s);
6362
- const encode$_ = (attributes) => attributes?.["w:val"];
6363
- const decode$10 = (attrs) => attrs?.highlight;
6361
+ const translator$2v = NodeTranslator.from(config$u);
6362
+ const encode$10 = (attributes) => attributes?.["w:val"];
6363
+ const decode$12 = (attrs) => attrs?.highlight;
6364
6364
  const attrConfig$z = Object.freeze({
6365
6365
  xmlName: "w:val",
6366
6366
  sdName: "highlight",
6367
- encode: encode$_,
6368
- decode: decode$10
6367
+ encode: encode$10,
6368
+ decode: decode$12
6369
6369
  });
6370
6370
  const validXmlAttributes$i = [attrConfig$z];
6371
- const XML_NODE_NAME$s = "w:highlight";
6371
+ const XML_NODE_NAME$u = "w:highlight";
6372
6372
  const SD_ATTR_KEY$4 = "highlight";
6373
6373
  const DISABLED_TOKENS = /* @__PURE__ */ new Set(["transparent", "none", "inherit"]);
6374
- const encode$Z = (params, encodedAttrs = {}) => {
6374
+ const encode$$ = (params, encodedAttrs = {}) => {
6375
6375
  const { nodes } = params;
6376
6376
  const node = nodes?.[0];
6377
6377
  const value = encodedAttrs.highlight ?? node?.attributes?.["w:val"];
6378
6378
  return {
6379
6379
  type: "attr",
6380
- xmlName: XML_NODE_NAME$s,
6380
+ xmlName: XML_NODE_NAME$u,
6381
6381
  sdNodeOrKeyName: SD_ATTR_KEY$4,
6382
6382
  attributes: { "w:val": value ?? null }
6383
6383
  };
6384
6384
  };
6385
- const decode$$ = (params) => {
6385
+ const decode$11 = (params) => {
6386
6386
  const attrs = params?.node?.attrs || {};
6387
6387
  const highlightValue = attrs.highlight?.["w:val"] ?? attrs.highlight ?? attrs.color ?? null;
6388
6388
  if (!highlightValue) return void 0;
@@ -6390,14 +6390,14 @@ const decode$$ = (params) => {
6390
6390
  if (!normalizedValue) return void 0;
6391
6391
  if (DISABLED_TOKENS.has(normalizedValue)) {
6392
6392
  return {
6393
- name: XML_NODE_NAME$s,
6393
+ name: XML_NODE_NAME$u,
6394
6394
  attributes: { "w:val": "none" }
6395
6395
  };
6396
6396
  }
6397
6397
  const keyword = getDocxHighlightKeywordFromHex(highlightValue);
6398
6398
  if (keyword) {
6399
6399
  return {
6400
- name: XML_NODE_NAME$s,
6400
+ name: XML_NODE_NAME$u,
6401
6401
  attributes: { "w:val": keyword }
6402
6402
  };
6403
6403
  }
@@ -6412,64 +6412,64 @@ const decode$$ = (params) => {
6412
6412
  }
6413
6413
  };
6414
6414
  };
6415
- const config$r = {
6416
- xmlName: XML_NODE_NAME$s,
6415
+ const config$t = {
6416
+ xmlName: XML_NODE_NAME$u,
6417
6417
  sdNodeOrKeyName: SD_ATTR_KEY$4,
6418
6418
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
6419
- encode: encode$Z,
6420
- decode: decode$$,
6419
+ encode: encode$$,
6420
+ decode: decode$11,
6421
6421
  attributes: validXmlAttributes$i
6422
6422
  };
6423
- const translator$2s = NodeTranslator.from(config$r);
6424
- const encode$Y = (attributes) => {
6423
+ const translator$2u = NodeTranslator.from(config$t);
6424
+ const encode$_ = (attributes) => {
6425
6425
  return attributes["w:val"];
6426
6426
  };
6427
- const decode$_ = (attrs) => {
6427
+ const decode$10 = (attrs) => {
6428
6428
  const { tabType } = attrs || {};
6429
6429
  return tabType;
6430
6430
  };
6431
6431
  const attrConfig$y = Object.freeze({
6432
6432
  xmlName: "w:val",
6433
6433
  sdName: "tabType",
6434
- encode: encode$Y,
6435
- decode: decode$_
6434
+ encode: encode$_,
6435
+ decode: decode$10
6436
6436
  });
6437
- const encode$X = (attributes) => {
6437
+ const encode$Z = (attributes) => {
6438
6438
  return attributes["w:leader"];
6439
6439
  };
6440
- const decode$Z = (attrs) => {
6440
+ const decode$$ = (attrs) => {
6441
6441
  const { leader } = attrs || {};
6442
6442
  return leader;
6443
6443
  };
6444
6444
  const attrConfig$x = Object.freeze({
6445
6445
  xmlName: "w:leader",
6446
6446
  sdName: "leader",
6447
- encode: encode$X,
6448
- decode: decode$Z
6447
+ encode: encode$Z,
6448
+ decode: decode$$
6449
6449
  });
6450
- const encode$W = (attributes) => {
6450
+ const encode$Y = (attributes) => {
6451
6451
  if (attributes["w:pos"] != null) return parseInt(attributes["w:pos"]);
6452
6452
  return null;
6453
6453
  };
6454
- const decode$Y = (attrs) => {
6454
+ const decode$_ = (attrs) => {
6455
6455
  const { pos } = attrs || {};
6456
6456
  return pos?.toString();
6457
6457
  };
6458
6458
  const attrConfig$w = Object.freeze({
6459
6459
  xmlName: "w:pos",
6460
6460
  sdName: "pos",
6461
- encode: encode$W,
6462
- decode: decode$Y
6461
+ encode: encode$Y,
6462
+ decode: decode$_
6463
6463
  });
6464
6464
  const validXmlAttributes$h = [attrConfig$y, attrConfig$w, attrConfig$x];
6465
- const XML_NODE_NAME$r = "w:tab";
6466
- const SD_NODE_NAME$m = "tab";
6467
- const encode$V = (_2, encodedAttrs = {}) => {
6465
+ const XML_NODE_NAME$t = "w:tab";
6466
+ const SD_NODE_NAME$o = "tab";
6467
+ const encode$X = (_2, encodedAttrs = {}) => {
6468
6468
  const translated = { type: "tab" };
6469
6469
  if (encodedAttrs) translated.attrs = { ...encodedAttrs };
6470
6470
  return translated;
6471
6471
  };
6472
- function decode$X(params, decodedAttrs = {}) {
6472
+ function decode$Z(params, decodedAttrs = {}) {
6473
6473
  const { node } = params || {};
6474
6474
  if (!node) return;
6475
6475
  const wTab = { name: "w:tab", elements: [] };
@@ -6491,15 +6491,15 @@ function decode$X(params, decodedAttrs = {}) {
6491
6491
  }
6492
6492
  return translated;
6493
6493
  }
6494
- const config$q = {
6495
- xmlName: XML_NODE_NAME$r,
6496
- sdNodeOrKeyName: SD_NODE_NAME$m,
6494
+ const config$s = {
6495
+ xmlName: XML_NODE_NAME$t,
6496
+ sdNodeOrKeyName: SD_NODE_NAME$o,
6497
6497
  type: NodeTranslator.translatorTypes.NODE,
6498
- encode: encode$V,
6499
- decode: decode$X,
6498
+ encode: encode$X,
6499
+ decode: decode$Z,
6500
6500
  attributes: validXmlAttributes$h
6501
6501
  };
6502
- const translator$2r = NodeTranslator.from(config$q);
6502
+ const translator$2t = NodeTranslator.from(config$s);
6503
6503
  const carbonCopy = (obj) => {
6504
6504
  if (!obj) return void 0;
6505
6505
  try {
@@ -6825,54 +6825,54 @@ const integerToString = (value) => {
6825
6825
  const intValue = parseInteger(value);
6826
6826
  return intValue != void 0 ? String(intValue) : void 0;
6827
6827
  };
6828
- const translator$2q = NodeTranslator.from(createSingleBooleanPropertyHandler("w:b", "bold"));
6829
- const translator$2p = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bCs", "boldCs"));
6830
- const translator$2o = NodeTranslator.from(createBorderPropertyHandler("w:bdr", "borders"));
6831
- const translator$2n = NodeTranslator.from(createSingleBooleanPropertyHandler("w:i", "italic"));
6832
- const encode$U = (attributes) => attributes?.["w:val"];
6833
- const decode$W = (attrs) => attrs?.underline;
6828
+ const translator$2s = NodeTranslator.from(createSingleBooleanPropertyHandler("w:b", "bold"));
6829
+ const translator$2r = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bCs", "boldCs"));
6830
+ const translator$2q = NodeTranslator.from(createBorderPropertyHandler("w:bdr", "borders"));
6831
+ const translator$2p = NodeTranslator.from(createSingleBooleanPropertyHandler("w:i", "italic"));
6832
+ const encode$W = (attributes) => attributes?.["w:val"];
6833
+ const decode$Y = (attrs) => attrs?.underline;
6834
6834
  const attrConfig$v = Object.freeze({
6835
6835
  xmlName: "w:val",
6836
6836
  sdName: "underline",
6837
- encode: encode$U,
6838
- decode: decode$W
6837
+ encode: encode$W,
6838
+ decode: decode$Y
6839
6839
  });
6840
- const encode$T = (attributes) => attributes?.["w:color"];
6841
- const decode$V = (attrs) => attrs?.color;
6840
+ const encode$V = (attributes) => attributes?.["w:color"];
6841
+ const decode$X = (attrs) => attrs?.color;
6842
6842
  const attrConfig$u = Object.freeze({
6843
6843
  xmlName: "w:color",
6844
6844
  sdName: "color",
6845
- encode: encode$T,
6846
- decode: decode$V
6845
+ encode: encode$V,
6846
+ decode: decode$X
6847
6847
  });
6848
- const encode$S = (attributes) => attributes?.["w:themeColor"];
6849
- const decode$U = (attrs) => attrs?.themeColor;
6848
+ const encode$U = (attributes) => attributes?.["w:themeColor"];
6849
+ const decode$W = (attrs) => attrs?.themeColor;
6850
6850
  const attrConfig$t = Object.freeze({
6851
6851
  xmlName: "w:themeColor",
6852
6852
  sdName: "themeColor",
6853
- encode: encode$S,
6854
- decode: decode$U
6853
+ encode: encode$U,
6854
+ decode: decode$W
6855
6855
  });
6856
- const encode$R = (attributes) => attributes?.["w:themeTint"];
6857
- const decode$T = (attrs) => attrs?.themeTint;
6856
+ const encode$T = (attributes) => attributes?.["w:themeTint"];
6857
+ const decode$V = (attrs) => attrs?.themeTint;
6858
6858
  const attrConfig$s = Object.freeze({
6859
6859
  xmlName: "w:themeTint",
6860
6860
  sdName: "themeTint",
6861
- encode: encode$R,
6862
- decode: decode$T
6861
+ encode: encode$T,
6862
+ decode: decode$V
6863
6863
  });
6864
- const encode$Q = (attributes) => attributes?.["w:themeShade"];
6865
- const decode$S = (attrs) => attrs?.themeShade;
6864
+ const encode$S = (attributes) => attributes?.["w:themeShade"];
6865
+ const decode$U = (attrs) => attrs?.themeShade;
6866
6866
  const attrConfig$r = Object.freeze({
6867
6867
  xmlName: "w:themeShade",
6868
6868
  sdName: "themeShade",
6869
- encode: encode$Q,
6870
- decode: decode$S
6869
+ encode: encode$S,
6870
+ decode: decode$U
6871
6871
  });
6872
6872
  const validXmlAttributes$g = [attrConfig$v, attrConfig$u, attrConfig$t, attrConfig$s, attrConfig$r];
6873
- const XML_NODE_NAME$q = "w:u";
6873
+ const XML_NODE_NAME$s = "w:u";
6874
6874
  const SD_ATTR_KEY$3 = "underline";
6875
- const encode$P = (params, encodedAttrs = {}) => {
6875
+ const encode$R = (params, encodedAttrs = {}) => {
6876
6876
  const { nodes } = params;
6877
6877
  const node = nodes?.[0];
6878
6878
  const sourceAttrs = node?.attributes || {};
@@ -6888,12 +6888,12 @@ const encode$P = (params, encodedAttrs = {}) => {
6888
6888
  if (themeShade !== void 0 && themeShade !== null) attributes["w:themeShade"] = themeShade;
6889
6889
  return {
6890
6890
  type: "attr",
6891
- xmlName: XML_NODE_NAME$q,
6891
+ xmlName: XML_NODE_NAME$s,
6892
6892
  sdNodeOrKeyName: SD_ATTR_KEY$3,
6893
6893
  attributes
6894
6894
  };
6895
6895
  };
6896
- const decode$R = (params) => {
6896
+ const decode$T = (params) => {
6897
6897
  const attrs = params?.node?.attrs?.underline || params?.node?.attrs || {};
6898
6898
  const underlineType = attrs.underlineType ?? attrs.underline ?? attrs["w:val"] ?? null;
6899
6899
  const color = attrs.underlineColor ?? attrs.color ?? attrs["w:color"] ?? null;
@@ -6911,22 +6911,22 @@ const decode$R = (params) => {
6911
6911
  if (themeTint) attributes["w:themeTint"] = themeTint;
6912
6912
  if (themeShade) attributes["w:themeShade"] = themeShade;
6913
6913
  return {
6914
- name: XML_NODE_NAME$q,
6914
+ name: XML_NODE_NAME$s,
6915
6915
  attributes
6916
6916
  };
6917
6917
  };
6918
- const config$p = {
6919
- xmlName: XML_NODE_NAME$q,
6918
+ const config$r = {
6919
+ xmlName: XML_NODE_NAME$s,
6920
6920
  sdNodeOrKeyName: SD_ATTR_KEY$3,
6921
6921
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
6922
- encode: encode$P,
6923
- decode: decode$R,
6922
+ encode: encode$R,
6923
+ decode: decode$T,
6924
6924
  attributes: validXmlAttributes$g
6925
6925
  };
6926
- const translator$2m = NodeTranslator.from(config$p);
6927
- const translator$2l = NodeTranslator.from(createSingleBooleanPropertyHandler("w:strike"));
6928
- const translator$2k = NodeTranslator.from(createSingleBooleanPropertyHandler("w:dstrike"));
6929
- const translator$2j = NodeTranslator.from({
6926
+ const translator$2o = NodeTranslator.from(config$r);
6927
+ const translator$2n = NodeTranslator.from(createSingleBooleanPropertyHandler("w:strike"));
6928
+ const translator$2m = NodeTranslator.from(createSingleBooleanPropertyHandler("w:dstrike"));
6929
+ const translator$2l = NodeTranslator.from({
6930
6930
  xmlName: "w:color",
6931
6931
  sdNodeOrKeyName: "color",
6932
6932
  attributes: [
@@ -6943,7 +6943,7 @@ const translator$2j = NodeTranslator.from({
6943
6943
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
6944
6944
  }
6945
6945
  });
6946
- const translator$2i = NodeTranslator.from({
6946
+ const translator$2k = NodeTranslator.from({
6947
6947
  xmlName: "w:rFonts",
6948
6948
  sdNodeOrKeyName: "fontFamily",
6949
6949
  attributes: [
@@ -6974,16 +6974,16 @@ const translator$2i = NodeTranslator.from({
6974
6974
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
6975
6975
  }
6976
6976
  });
6977
- const translator$2h = NodeTranslator.from(createSingleAttrPropertyHandler("w:rStyle", "styleId"));
6978
- const translator$2g = NodeTranslator.from(createSingleIntegerPropertyHandler("w:sz", "fontSize"));
6979
- const translator$2f = NodeTranslator.from(createSingleIntegerPropertyHandler("w:szCs", "fontSizeCs"));
6980
- const translator$2e = NodeTranslator.from({
6977
+ const translator$2j = NodeTranslator.from(createSingleAttrPropertyHandler("w:rStyle", "styleId"));
6978
+ const translator$2i = NodeTranslator.from(createSingleIntegerPropertyHandler("w:sz", "fontSize"));
6979
+ const translator$2h = NodeTranslator.from(createSingleIntegerPropertyHandler("w:szCs", "fontSizeCs"));
6980
+ const translator$2g = NodeTranslator.from({
6981
6981
  xmlName: "w:caps",
6982
6982
  sdNodeOrKeyName: "textTransform",
6983
6983
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1") ? "uppercase" : "none",
6984
6984
  decode: ({ node }) => node.attrs["textTransform"] != null ? { name: "w:caps", attributes: { "w:val": booleanToString(node.attrs["textTransform"] === "uppercase") } } : void 0
6985
6985
  });
6986
- const translator$2d = NodeTranslator.from({
6986
+ const translator$2f = NodeTranslator.from({
6987
6987
  xmlName: "w:shd",
6988
6988
  sdNodeOrKeyName: "shading",
6989
6989
  attributes: [
@@ -7005,7 +7005,7 @@ const translator$2d = NodeTranslator.from({
7005
7005
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
7006
7006
  }
7007
7007
  });
7008
- const translator$2c = NodeTranslator.from({
7008
+ const translator$2e = NodeTranslator.from({
7009
7009
  xmlName: "w:lang",
7010
7010
  sdNodeOrKeyName: "lang",
7011
7011
  attributes: [createAttributeHandler("w:val"), createAttributeHandler("w:eastAsia"), createAttributeHandler("w:bidi")],
@@ -7017,24 +7017,24 @@ const translator$2c = NodeTranslator.from({
7017
7017
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
7018
7018
  }
7019
7019
  });
7020
- const translator$2b = NodeTranslator.from(createSingleIntegerPropertyHandler("w:spacing", "letterSpacing"));
7021
- const translator$2a = NodeTranslator.from(createSingleAttrPropertyHandler("w:vertAlign"));
7022
- const translator$29 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:smallCaps"));
7023
- const translator$28 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:snapToGrid"));
7024
- const translator$27 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:emboss"));
7025
- const translator$26 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:imprint"));
7026
- const translator$25 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:noProof"));
7027
- const translator$24 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:oMath"));
7028
- const translator$23 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:outline"));
7029
- const translator$22 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:shadow"));
7030
- const translator$21 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:vanish"));
7031
- const translator$20 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:specVanish"));
7032
- const translator$1$ = NodeTranslator.from(createSingleAttrPropertyHandler("w:effect"));
7033
- const translator$1_ = NodeTranslator.from(createSingleAttrPropertyHandler("w:em"));
7034
- const translator$1Z = NodeTranslator.from(createSingleAttrPropertyHandler("w:w"));
7035
- const translator$1Y = NodeTranslator.from(createSingleIntegerPropertyHandler("w:kern"));
7036
- const translator$1X = NodeTranslator.from(createSingleIntegerPropertyHandler("w:position"));
7037
- const translator$1W = NodeTranslator.from({
7020
+ const translator$2d = NodeTranslator.from(createSingleIntegerPropertyHandler("w:spacing", "letterSpacing"));
7021
+ const translator$2c = NodeTranslator.from(createSingleAttrPropertyHandler("w:vertAlign"));
7022
+ const translator$2b = NodeTranslator.from(createSingleBooleanPropertyHandler("w:smallCaps"));
7023
+ const translator$2a = NodeTranslator.from(createSingleBooleanPropertyHandler("w:snapToGrid"));
7024
+ const translator$29 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:emboss"));
7025
+ const translator$28 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:imprint"));
7026
+ const translator$27 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:noProof"));
7027
+ const translator$26 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:oMath"));
7028
+ const translator$25 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:outline"));
7029
+ const translator$24 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:shadow"));
7030
+ const translator$23 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:vanish"));
7031
+ const translator$22 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:specVanish"));
7032
+ const translator$21 = NodeTranslator.from(createSingleAttrPropertyHandler("w:effect"));
7033
+ const translator$20 = NodeTranslator.from(createSingleAttrPropertyHandler("w:em"));
7034
+ const translator$1$ = NodeTranslator.from(createSingleAttrPropertyHandler("w:w"));
7035
+ const translator$1_ = NodeTranslator.from(createSingleIntegerPropertyHandler("w:kern"));
7036
+ const translator$1Z = NodeTranslator.from(createSingleIntegerPropertyHandler("w:position"));
7037
+ const translator$1Y = NodeTranslator.from({
7038
7038
  xmlName: "w:fitText",
7039
7039
  sdNodeOrKeyName: "fitText",
7040
7040
  attributes: [createIntegerAttributeHandler("w:val"), createIntegerAttributeHandler("w:id")],
@@ -7046,7 +7046,7 @@ const translator$1W = NodeTranslator.from({
7046
7046
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
7047
7047
  }
7048
7048
  });
7049
- const translator$1V = NodeTranslator.from({
7049
+ const translator$1X = NodeTranslator.from({
7050
7050
  xmlName: "w:eastAsianLayout",
7051
7051
  sdNodeOrKeyName: "eastAsianLayout",
7052
7052
  attributes: [
@@ -7064,52 +7064,52 @@ const translator$1V = NodeTranslator.from({
7064
7064
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
7065
7065
  }
7066
7066
  });
7067
- const translator$1U = NodeTranslator.from(createSingleBooleanPropertyHandler("w:rtl"));
7068
- const translator$1T = NodeTranslator.from(createSingleBooleanPropertyHandler("w:cs"));
7069
- const translator$1S = NodeTranslator.from(createSingleBooleanPropertyHandler("w:iCs"));
7070
- const translator$1R = NodeTranslator.from(createSingleBooleanPropertyHandler("w:webHidden"));
7067
+ const translator$1W = NodeTranslator.from(createSingleBooleanPropertyHandler("w:rtl"));
7068
+ const translator$1V = NodeTranslator.from(createSingleBooleanPropertyHandler("w:cs"));
7069
+ const translator$1U = NodeTranslator.from(createSingleBooleanPropertyHandler("w:iCs"));
7070
+ const translator$1T = NodeTranslator.from(createSingleBooleanPropertyHandler("w:webHidden"));
7071
7071
  const propertyTranslators$c = [
7072
- translator$2p,
7072
+ translator$2r,
7073
+ translator$2s,
7073
7074
  translator$2q,
7074
- translator$2o,
7075
- translator$2e,
7076
- translator$2j,
7077
- translator$1T,
7078
- translator$2k,
7075
+ translator$2g,
7076
+ translator$2l,
7079
7077
  translator$1V,
7080
- translator$1$,
7078
+ translator$2m,
7079
+ translator$1X,
7080
+ translator$21,
7081
+ translator$20,
7082
+ translator$29,
7083
+ translator$1Y,
7084
+ translator$2k,
7085
+ translator$2h,
7086
+ translator$2i,
7087
+ translator$2u,
7088
+ translator$28,
7089
+ translator$2p,
7090
+ translator$1U,
7081
7091
  translator$1_,
7092
+ translator$2e,
7093
+ translator$2d,
7082
7094
  translator$27,
7083
- translator$1W,
7084
- translator$2i,
7085
- translator$2f,
7086
- translator$2g,
7087
- translator$2s,
7088
7095
  translator$26,
7089
- translator$2n,
7090
- translator$1S,
7091
- translator$1Y,
7092
- translator$2c,
7093
- translator$2b,
7094
7096
  translator$25,
7097
+ translator$1Z,
7098
+ translator$1W,
7099
+ translator$2j,
7095
7100
  translator$24,
7096
- translator$23,
7097
- translator$1X,
7098
- translator$1U,
7099
- translator$2h,
7100
- translator$22,
7101
- translator$2d,
7102
- translator$29,
7103
- translator$28,
7104
- translator$20,
7105
- translator$2l,
7106
- translator$2m,
7107
- translator$21,
7101
+ translator$2f,
7102
+ translator$2b,
7108
7103
  translator$2a,
7109
- translator$1R,
7110
- translator$1Z
7104
+ translator$22,
7105
+ translator$2n,
7106
+ translator$2o,
7107
+ translator$23,
7108
+ translator$2c,
7109
+ translator$1T,
7110
+ translator$1$
7111
7111
  ];
7112
- const translator$1Q = NodeTranslator.from(
7112
+ const translator$1S = NodeTranslator.from(
7113
7113
  createNestedPropertiesTranslator("w:rPr", "runProperties", propertyTranslators$c)
7114
7114
  );
7115
7115
  const SUPPORTED_ALTERNATE_CONTENT_REQUIRES = /* @__PURE__ */ new Set([
@@ -7126,10 +7126,10 @@ const SUPPORTED_ALTERNATE_CONTENT_REQUIRES = /* @__PURE__ */ new Set([
7126
7126
  "w16sdtfl",
7127
7127
  "w16se"
7128
7128
  ]);
7129
- const XML_NODE_NAME$p = "mc:AlternateContent";
7130
- const SD_NODE_NAME$l = [];
7129
+ const XML_NODE_NAME$r = "mc:AlternateContent";
7130
+ const SD_NODE_NAME$n = [];
7131
7131
  const validXmlAttributes$f = [];
7132
- function encode$O(params) {
7132
+ function encode$Q(params) {
7133
7133
  const { nodeListHandler } = params;
7134
7134
  const { node } = params.extraParams;
7135
7135
  if (!node || !node.type) {
@@ -7145,7 +7145,7 @@ function encode$O(params) {
7145
7145
  path: buildPath(params.path, node, branch)
7146
7146
  });
7147
7147
  }
7148
- function decode$Q(params) {
7148
+ function decode$S(params) {
7149
7149
  const { node } = params;
7150
7150
  const { drawingContent } = node.attrs;
7151
7151
  const drawing = {
@@ -7162,12 +7162,12 @@ function decode$Q(params) {
7162
7162
  elements: [choice]
7163
7163
  };
7164
7164
  }
7165
- const config$o = {
7166
- xmlName: XML_NODE_NAME$p,
7167
- sdNodeOrKeyName: SD_NODE_NAME$l,
7165
+ const config$q = {
7166
+ xmlName: XML_NODE_NAME$r,
7167
+ sdNodeOrKeyName: SD_NODE_NAME$n,
7168
7168
  type: NodeTranslator.translatorTypes.NODE,
7169
- encode: encode$O,
7170
- decode: decode$Q,
7169
+ encode: encode$Q,
7170
+ decode: decode$S,
7171
7171
  attributes: validXmlAttributes$f
7172
7172
  };
7173
7173
  function selectAlternateContentElements(node) {
@@ -7191,18 +7191,18 @@ function selectAlternateContentElements(node) {
7191
7191
  elements: carbonCopy(selectedElements)
7192
7192
  };
7193
7193
  }
7194
- const translator$1P = NodeTranslator.from(config$o);
7194
+ const translator$1R = NodeTranslator.from(config$q);
7195
7195
  function buildPath(existingPath = [], node, branch) {
7196
7196
  const path = [...existingPath];
7197
7197
  if (node) path.push(node);
7198
7198
  if (branch) path.push(branch);
7199
7199
  return path;
7200
7200
  }
7201
- const translator$1O = NodeTranslator.from(createSingleBooleanPropertyHandler("w:adjustRightInd"));
7202
- const translator$1N = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDE"));
7203
- const translator$1M = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDN"));
7204
- const translator$1L = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bidi", "rightToLeft"));
7205
- const translator$1K = NodeTranslator.from({
7201
+ const translator$1Q = NodeTranslator.from(createSingleBooleanPropertyHandler("w:adjustRightInd"));
7202
+ const translator$1P = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDE"));
7203
+ const translator$1O = NodeTranslator.from(createSingleBooleanPropertyHandler("w:autoSpaceDN"));
7204
+ const translator$1N = NodeTranslator.from(createSingleBooleanPropertyHandler("w:bidi", "rightToLeft"));
7205
+ const translator$1M = NodeTranslator.from({
7206
7206
  xmlName: "w:cnfStyle",
7207
7207
  sdNodeOrKeyName: "cnfStyle",
7208
7208
  attributes: [
@@ -7228,9 +7228,9 @@ const translator$1K = NodeTranslator.from({
7228
7228
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
7229
7229
  }
7230
7230
  });
7231
- const translator$1J = NodeTranslator.from(createSingleBooleanPropertyHandler("w:contextualSpacing"));
7232
- const translator$1I = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
7233
- const translator$1H = NodeTranslator.from({
7231
+ const translator$1L = NodeTranslator.from(createSingleBooleanPropertyHandler("w:contextualSpacing"));
7232
+ const translator$1K = NodeTranslator.from(createSingleAttrPropertyHandler("w:divId"));
7233
+ const translator$1J = NodeTranslator.from({
7234
7234
  xmlName: "w:framePr",
7235
7235
  sdNodeOrKeyName: "framePr",
7236
7236
  attributes: [
@@ -7258,7 +7258,7 @@ const translator$1H = NodeTranslator.from({
7258
7258
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
7259
7259
  }
7260
7260
  });
7261
- const translator$1G = NodeTranslator.from({
7261
+ const translator$1I = NodeTranslator.from({
7262
7262
  xmlName: "w:ind",
7263
7263
  sdNodeOrKeyName: "indent",
7264
7264
  attributes: [
@@ -7283,12 +7283,12 @@ const translator$1G = NodeTranslator.from({
7283
7283
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
7284
7284
  }
7285
7285
  });
7286
- const translator$1F = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
7287
- const translator$1E = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepLines"));
7288
- const translator$1D = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepNext"));
7289
- const translator$1C = NodeTranslator.from(createSingleBooleanPropertyHandler("w:kinsoku"));
7290
- const translator$1B = NodeTranslator.from(createSingleBooleanPropertyHandler("w:mirrorIndents"));
7291
- const translator$1A = NodeTranslator.from(createSingleIntegerPropertyHandler("w:ilvl"));
7286
+ const translator$1H = NodeTranslator.from(createSingleAttrPropertyHandler("w:jc", "justification"));
7287
+ const translator$1G = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepLines"));
7288
+ const translator$1F = NodeTranslator.from(createSingleBooleanPropertyHandler("w:keepNext"));
7289
+ const translator$1E = NodeTranslator.from(createSingleBooleanPropertyHandler("w:kinsoku"));
7290
+ const translator$1D = NodeTranslator.from(createSingleBooleanPropertyHandler("w:mirrorIndents"));
7291
+ const translator$1C = NodeTranslator.from(createSingleIntegerPropertyHandler("w:ilvl"));
7292
7292
  const createTrackStyleMark = (marks) => {
7293
7293
  const trackStyleMark = marks.find((mark) => mark.type === "trackFormat");
7294
7294
  if (trackStyleMark) {
@@ -7306,7 +7306,7 @@ const createTrackStyleMark = (marks) => {
7306
7306
  }
7307
7307
  return void 0;
7308
7308
  };
7309
- const XML_NODE_NAME$o = "w:ins";
7309
+ const XML_NODE_NAME$q = "w:ins";
7310
7310
  const SD_ATTR_KEY$2 = "trackInsert";
7311
7311
  const validXmlAttributes$e = [
7312
7312
  createAttributeHandler("w:id", "id"),
@@ -7314,7 +7314,7 @@ const validXmlAttributes$e = [
7314
7314
  createAttributeHandler("w:author", "author"),
7315
7315
  createAttributeHandler("w:authorEmail", "authorEmail")
7316
7316
  ];
7317
- const encode$N = (params, encodedAttrs = {}) => {
7317
+ const encode$P = (params, encodedAttrs = {}) => {
7318
7318
  const { nodeListHandler, extraParams = {}, converter } = params;
7319
7319
  const { node } = extraParams;
7320
7320
  if (encodedAttrs.id && converter?.trackedChangeIdMap?.has(encodedAttrs.id)) {
@@ -7343,7 +7343,7 @@ const encode$N = (params, encodedAttrs = {}) => {
7343
7343
  });
7344
7344
  return subs;
7345
7345
  };
7346
- function decode$P(params) {
7346
+ function decode$R(params) {
7347
7347
  const { node } = params;
7348
7348
  if (!node || !node.type) {
7349
7349
  return null;
@@ -7368,49 +7368,49 @@ function decode$P(params) {
7368
7368
  elements: [translatedTextNode]
7369
7369
  };
7370
7370
  }
7371
- const config$n = {
7372
- xmlName: XML_NODE_NAME$o,
7371
+ const config$p = {
7372
+ xmlName: XML_NODE_NAME$q,
7373
7373
  sdNodeOrKeyName: SD_ATTR_KEY$2,
7374
7374
  type: NodeTranslator.translatorTypes.ATTRIBUTE,
7375
- encode: encode$N,
7376
- decode: decode$P,
7375
+ encode: encode$P,
7376
+ decode: decode$R,
7377
7377
  attributes: validXmlAttributes$e
7378
7378
  };
7379
- const translator$1z = NodeTranslator.from(config$n);
7380
- const translator$1y = NodeTranslator.from(createSingleIntegerPropertyHandler("w:numId"));
7381
- const propertyTranslators$b = [translator$1P, translator$1A, translator$1z, translator$1y];
7382
- const translator$1x = NodeTranslator.from(
7379
+ const translator$1B = NodeTranslator.from(config$p);
7380
+ const translator$1A = NodeTranslator.from(createSingleIntegerPropertyHandler("w:numId"));
7381
+ const propertyTranslators$b = [translator$1R, translator$1C, translator$1B, translator$1A];
7382
+ const translator$1z = NodeTranslator.from(
7383
7383
  createNestedPropertiesTranslator("w:numPr", "numberingProperties", propertyTranslators$b)
7384
7384
  );
7385
- const translator$1w = NodeTranslator.from(
7385
+ const translator$1y = NodeTranslator.from(
7386
7386
  createSingleAttrPropertyHandler("w:outlineLvl", "outlineLvl", "w:val", parseInteger, integerToString)
7387
7387
  );
7388
- const translator$1v = NodeTranslator.from(createSingleBooleanPropertyHandler("w:overflowPunct"));
7389
- const translator$1u = NodeTranslator.from(createBorderPropertyHandler("w:bar"));
7390
- const translator$1t = NodeTranslator.from(createBorderPropertyHandler("w:between"));
7391
- const translator$1s = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
7392
- const translator$1r = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
7393
- const translator$1q = NodeTranslator.from(createBorderPropertyHandler("w:left"));
7394
- const translator$1p = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
7395
- const translator$1o = NodeTranslator.from(createBorderPropertyHandler("w:right"));
7396
- const translator$1n = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
7397
- const translator$1m = NodeTranslator.from(createBorderPropertyHandler("w:top"));
7398
- const translator$1l = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
7388
+ const translator$1x = NodeTranslator.from(createSingleBooleanPropertyHandler("w:overflowPunct"));
7389
+ const translator$1w = NodeTranslator.from(createBorderPropertyHandler("w:bar"));
7390
+ const translator$1v = NodeTranslator.from(createBorderPropertyHandler("w:between"));
7391
+ const translator$1u = NodeTranslator.from(createBorderPropertyHandler("w:bottom"));
7392
+ const translator$1t = NodeTranslator.from(createMeasurementPropertyHandler("w:bottom", "marginBottom"));
7393
+ const translator$1s = NodeTranslator.from(createBorderPropertyHandler("w:left"));
7394
+ const translator$1r = NodeTranslator.from(createMeasurementPropertyHandler("w:left", "marginLeft"));
7395
+ const translator$1q = NodeTranslator.from(createBorderPropertyHandler("w:right"));
7396
+ const translator$1p = NodeTranslator.from(createMeasurementPropertyHandler("w:right", "marginRight"));
7397
+ const translator$1o = NodeTranslator.from(createBorderPropertyHandler("w:top"));
7398
+ const translator$1n = NodeTranslator.from(createMeasurementPropertyHandler("w:top", "marginTop"));
7399
7399
  const propertyTranslators$a = [
7400
- translator$1P,
7400
+ translator$1R,
7401
+ translator$1w,
7402
+ translator$1v,
7401
7403
  translator$1u,
7402
- translator$1t,
7403
7404
  translator$1s,
7404
7405
  translator$1q,
7405
- translator$1o,
7406
- translator$1m
7406
+ translator$1o
7407
7407
  ];
7408
- const translator$1k = NodeTranslator.from(
7408
+ const translator$1m = NodeTranslator.from(
7409
7409
  createNestedPropertiesTranslator("w:pBdr", "borders", propertyTranslators$a)
7410
7410
  );
7411
- const translator$1j = NodeTranslator.from(createSingleAttrPropertyHandler("w:pStyle", "styleId"));
7412
- const translator$1i = NodeTranslator.from(createSingleBooleanPropertyHandler("w:pageBreakBefore"));
7413
- const translator$1h = NodeTranslator.from({
7411
+ const translator$1l = NodeTranslator.from(createSingleAttrPropertyHandler("w:pStyle", "styleId"));
7412
+ const translator$1k = NodeTranslator.from(createSingleBooleanPropertyHandler("w:pageBreakBefore"));
7413
+ const translator$1j = NodeTranslator.from({
7414
7414
  xmlName: "w:spacing",
7415
7415
  sdNodeOrKeyName: "spacing",
7416
7416
  attributes: [
@@ -7431,20 +7431,22 @@ const translator$1h = NodeTranslator.from({
7431
7431
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
7432
7432
  }
7433
7433
  });
7434
- const translator$1g = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressAutoHyphens"));
7435
- const translator$1f = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressLineNumbers"));
7436
- const translator$1e = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressOverlap"));
7437
- const propertyTranslators$9 = [translator$1P, translator$2r];
7438
- const translator$1d = NodeTranslator.from(
7434
+ const translator$1i = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressAutoHyphens"));
7435
+ const translator$1h = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressLineNumbers"));
7436
+ const translator$1g = NodeTranslator.from(createSingleBooleanPropertyHandler("w:suppressOverlap"));
7437
+ const propertyTranslators$9 = [translator$1R, translator$2t];
7438
+ const translator$1f = NodeTranslator.from(
7439
7439
  createNestedArrayPropertyHandler("w:tabs", "tabStops", propertyTranslators$9, { skipRun: true })
7440
7440
  );
7441
- const translator$1c = NodeTranslator.from(createSingleAttrPropertyHandler("w:textAlignment"));
7442
- const translator$1b = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
7443
- const translator$1a = NodeTranslator.from(createSingleAttrPropertyHandler("w:textboxTightWrap"));
7444
- const translator$19 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:topLinePunct"));
7445
- const translator$18 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:widowControl"));
7446
- const translator$17 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:wordWrap"));
7441
+ const translator$1e = NodeTranslator.from(createSingleAttrPropertyHandler("w:textAlignment"));
7442
+ const translator$1d = NodeTranslator.from(createSingleAttrPropertyHandler("w:textDirection"));
7443
+ const translator$1c = NodeTranslator.from(createSingleAttrPropertyHandler("w:textboxTightWrap"));
7444
+ const translator$1b = NodeTranslator.from(createSingleBooleanPropertyHandler("w:topLinePunct"));
7445
+ const translator$1a = NodeTranslator.from(createSingleBooleanPropertyHandler("w:widowControl"));
7446
+ const translator$19 = NodeTranslator.from(createSingleBooleanPropertyHandler("w:wordWrap"));
7447
7447
  const propertyTranslators$8 = [
7448
+ translator$1R,
7449
+ translator$1Q,
7448
7450
  translator$1P,
7449
7451
  translator$1O,
7450
7452
  translator$1N,
@@ -7458,16 +7460,16 @@ const propertyTranslators$8 = [
7458
7460
  translator$1F,
7459
7461
  translator$1E,
7460
7462
  translator$1D,
7461
- translator$1C,
7462
- translator$1B,
7463
+ translator$1z,
7464
+ translator$1y,
7463
7465
  translator$1x,
7464
- translator$1w,
7465
- translator$1v,
7466
+ translator$1m,
7467
+ translator$1l,
7466
7468
  translator$1k,
7469
+ translator$2f,
7470
+ translator$2a,
7467
7471
  translator$1j,
7468
7472
  translator$1i,
7469
- translator$2d,
7470
- translator$28,
7471
7473
  translator$1h,
7472
7474
  translator$1g,
7473
7475
  translator$1f,
@@ -7477,11 +7479,9 @@ const propertyTranslators$8 = [
7477
7479
  translator$1b,
7478
7480
  translator$1a,
7479
7481
  translator$19,
7480
- translator$18,
7481
- translator$17,
7482
- translator$1Q
7482
+ translator$1S
7483
7483
  ];
7484
- const translator$16 = NodeTranslator.from(
7484
+ const translator$18 = NodeTranslator.from(
7485
7485
  createNestedPropertiesTranslator("w:pPr", "paragraphProperties", propertyTranslators$8)
7486
7486
  );
7487
7487
  function getUnderlineCssString({ type = "single", color = null, thickness = null, approximate = true } = {}) {
@@ -7633,11 +7633,20 @@ function createFirstLineIndentHandler() {
7633
7633
  return source.firstLine;
7634
7634
  };
7635
7635
  }
7636
+ function createHangingIndentHandler() {
7637
+ return (target, source) => {
7638
+ if (target.firstLine != null && source.hanging != null) {
7639
+ delete target.firstLine;
7640
+ }
7641
+ return source.hanging;
7642
+ };
7643
+ }
7636
7644
  function combineIndentProperties(indentChain) {
7637
7645
  const indentOnly = indentChain.map((props) => props.indent != null ? { indent: props.indent } : {});
7638
7646
  return combineProperties$1(indentOnly, {
7639
7647
  specialHandling: {
7640
- firstLine: createFirstLineIndentHandler()
7648
+ firstLine: createFirstLineIndentHandler(),
7649
+ hanging: createHangingIndentHandler()
7641
7650
  }
7642
7651
  });
7643
7652
  }
@@ -7896,7 +7905,7 @@ function resolveDocxFontFamily(attributes, docx, toCssFontFamily) {
7896
7905
  }
7897
7906
  return resolved;
7898
7907
  }
7899
- const ooxmlResolver = createOoxmlResolver({ pPr: translator$16, rPr: translator$1Q });
7908
+ const ooxmlResolver = createOoxmlResolver({ pPr: translator$18, rPr: translator$1S });
7900
7909
  const getToCssFontFamily = () => {
7901
7910
  return SuperConverter.toCssFontFamily;
7902
7911
  };
@@ -8590,7 +8599,7 @@ function handleStyleChangeMarksV2(rPrChange, currentMarks, params) {
8590
8599
  let submarks = [];
8591
8600
  const rPr = rPrChange.elements?.find((el) => el.name === "w:rPr");
8592
8601
  if (rPr) {
8593
- const runProperties = translator$1Q.encode({ ...params, nodes: [rPr] });
8602
+ const runProperties = translator$1S.encode({ ...params, nodes: [rPr] });
8594
8603
  submarks = encodeMarksFromRPr(runProperties, params?.docx);
8595
8604
  }
8596
8605
  return [{ type: TrackFormatMarkName, attrs: { ...mappedAttributes, before: submarks, after: [...currentMarks] } }];
@@ -8759,7 +8768,7 @@ const handleParagraphNode$1 = (params) => {
8759
8768
  const pPr = node.elements?.find((el) => el.name === "w:pPr");
8760
8769
  let inlineParagraphProperties = {};
8761
8770
  if (pPr) {
8762
- inlineParagraphProperties = translator$16.encode({ ...params, nodes: [pPr] }) || {};
8771
+ inlineParagraphProperties = translator$18.encode({ ...params, nodes: [pPr] }) || {};
8763
8772
  }
8764
8773
  const insideTable = (params.path || []).some((ancestor) => ancestor.name === "w:tc");
8765
8774
  const tableStyleId = getTableStyleId(params.path || []);
@@ -8814,7 +8823,7 @@ function generateParagraphProperties(params) {
8814
8823
  const { node } = params;
8815
8824
  const { attrs = {} } = node;
8816
8825
  const paragraphProperties = carbonCopy(attrs.paragraphProperties || {});
8817
- let pPr = translator$16.decode({ node: { ...node, attrs: { paragraphProperties } } });
8826
+ let pPr = translator$18.decode({ node: { ...node, attrs: { paragraphProperties } } });
8818
8827
  const sectPr = node.attrs?.paragraphProperties?.sectPr;
8819
8828
  if (sectPr) {
8820
8829
  if (!pPr) {
@@ -8847,89 +8856,89 @@ function translateParagraphNode(params) {
8847
8856
  };
8848
8857
  return result;
8849
8858
  }
8850
- const encode$M = (attributes) => {
8859
+ const encode$O = (attributes) => {
8851
8860
  return attributes["w:rsidDel"];
8852
8861
  };
8853
- const decode$O = (attrs) => {
8862
+ const decode$Q = (attrs) => {
8854
8863
  return attrs.rsidDel;
8855
8864
  };
8856
8865
  const attrConfig$q = Object.freeze({
8857
8866
  xmlName: "w:rsidDel",
8858
8867
  sdName: "rsidDel",
8859
- encode: encode$M,
8860
- decode: decode$O
8868
+ encode: encode$O,
8869
+ decode: decode$Q
8861
8870
  });
8862
- const encode$L = (attributes) => {
8871
+ const encode$N = (attributes) => {
8863
8872
  return attributes["w:rsidP"];
8864
8873
  };
8865
- const decode$N = (attrs) => {
8874
+ const decode$P = (attrs) => {
8866
8875
  return attrs.rsidP;
8867
8876
  };
8868
8877
  const attrConfig$p = Object.freeze({
8869
8878
  xmlName: "w:rsidP",
8870
8879
  sdName: "rsidP",
8871
- encode: encode$L,
8872
- decode: decode$N
8880
+ encode: encode$N,
8881
+ decode: decode$P
8873
8882
  });
8874
- const encode$K = (attributes) => {
8883
+ const encode$M = (attributes) => {
8875
8884
  return attributes["w:rsidR"];
8876
8885
  };
8877
- const decode$M = (attrs) => {
8886
+ const decode$O = (attrs) => {
8878
8887
  return attrs.rsidR;
8879
8888
  };
8880
8889
  const attrConfig$o = Object.freeze({
8881
8890
  xmlName: "w:rsidR",
8882
8891
  sdName: "rsidR",
8883
- encode: encode$K,
8884
- decode: decode$M
8892
+ encode: encode$M,
8893
+ decode: decode$O
8885
8894
  });
8886
- const encode$J = (attributes) => {
8895
+ const encode$L = (attributes) => {
8887
8896
  return attributes["w:rsidRPr"];
8888
8897
  };
8889
- const decode$L = (attrs) => {
8898
+ const decode$N = (attrs) => {
8890
8899
  return attrs.rsidRPr;
8891
8900
  };
8892
8901
  const attrConfig$n = Object.freeze({
8893
8902
  xmlName: "w:rsidRPr",
8894
8903
  sdName: "rsidRPr",
8895
- encode: encode$J,
8896
- decode: decode$L
8904
+ encode: encode$L,
8905
+ decode: decode$N
8897
8906
  });
8898
- const encode$I = (attributes) => {
8907
+ const encode$K = (attributes) => {
8899
8908
  return attributes["w:rsidRDefault"];
8900
8909
  };
8901
- const decode$K = (attrs) => {
8910
+ const decode$M = (attrs) => {
8902
8911
  return attrs.rsidRDefault;
8903
8912
  };
8904
8913
  const attrConfig$m = Object.freeze({
8905
8914
  xmlName: "w:rsidRDefault",
8906
8915
  sdName: "rsidRDefault",
8907
- encode: encode$I,
8908
- decode: decode$K
8916
+ encode: encode$K,
8917
+ decode: decode$M
8909
8918
  });
8910
- const encode$H = (attributes) => {
8919
+ const encode$J = (attributes) => {
8911
8920
  return attributes["w14:paraId"];
8912
8921
  };
8913
- const decode$J = (attrs) => {
8922
+ const decode$L = (attrs) => {
8914
8923
  return attrs.paraId;
8915
8924
  };
8916
8925
  const attrConfig$l = Object.freeze({
8917
8926
  xmlName: "w14:paraId",
8918
8927
  sdName: "paraId",
8919
- encode: encode$H,
8920
- decode: decode$J
8928
+ encode: encode$J,
8929
+ decode: decode$L
8921
8930
  });
8922
- const encode$G = (attributes) => {
8931
+ const encode$I = (attributes) => {
8923
8932
  return attributes["w14:textId"];
8924
8933
  };
8925
- const decode$I = (attrs) => {
8934
+ const decode$K = (attrs) => {
8926
8935
  return attrs.textId;
8927
8936
  };
8928
8937
  const attrConfig$k = Object.freeze({
8929
8938
  xmlName: "w14:textId",
8930
8939
  sdName: "textId",
8931
- encode: encode$G,
8932
- decode: decode$I
8940
+ encode: encode$I,
8941
+ decode: decode$K
8933
8942
  });
8934
8943
  const validXmlAttributes$d = [
8935
8944
  attrConfig$l,
@@ -8940,9 +8949,9 @@ const validXmlAttributes$d = [
8940
8949
  attrConfig$n,
8941
8950
  attrConfig$q
8942
8951
  ];
8943
- const XML_NODE_NAME$n = "w:p";
8944
- const SD_NODE_NAME$k = "paragraph";
8945
- const encode$F = (params, encodedAttrs = {}) => {
8952
+ const XML_NODE_NAME$p = "w:p";
8953
+ const SD_NODE_NAME$m = "paragraph";
8954
+ const encode$H = (params, encodedAttrs = {}) => {
8946
8955
  const node = handleParagraphNode$1(params);
8947
8956
  if (!node) return void 0;
8948
8957
  if (encodedAttrs && Object.keys(encodedAttrs).length) {
@@ -8950,7 +8959,7 @@ const encode$F = (params, encodedAttrs = {}) => {
8950
8959
  }
8951
8960
  return node;
8952
8961
  };
8953
- const decode$H = (params, decodedAttrs = {}) => {
8962
+ const decode$J = (params, decodedAttrs = {}) => {
8954
8963
  const translated = translateParagraphNode(params);
8955
8964
  if (!translated) return void 0;
8956
8965
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -8958,15 +8967,15 @@ const decode$H = (params, decodedAttrs = {}) => {
8958
8967
  }
8959
8968
  return translated;
8960
8969
  };
8961
- const config$m = {
8962
- xmlName: XML_NODE_NAME$n,
8963
- sdNodeOrKeyName: SD_NODE_NAME$k,
8970
+ const config$o = {
8971
+ xmlName: XML_NODE_NAME$p,
8972
+ sdNodeOrKeyName: SD_NODE_NAME$m,
8964
8973
  type: NodeTranslator.translatorTypes.NODE,
8965
- encode: encode$F,
8966
- decode: decode$H,
8974
+ encode: encode$H,
8975
+ decode: decode$J,
8967
8976
  attributes: validXmlAttributes$d
8968
8977
  };
8969
- const translator$15 = NodeTranslator.from(config$m);
8978
+ const translator$17 = NodeTranslator.from(config$o);
8970
8979
  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;
8971
8980
  const containsEastAsianCharacters = (text) => EAST_ASIAN_CHARACTER_REGEX.test(text);
8972
8981
  const resolveFontFamily = (textStyleAttrs, text) => {
@@ -9139,8 +9148,8 @@ function generateRandom32BitHex() {
9139
9148
  const val = Math.floor(Math.random() * 2147483647);
9140
9149
  return val.toString(16).toUpperCase().padStart(8, "0");
9141
9150
  }
9142
- const XML_NODE_NAME$m = "w:hyperlink";
9143
- const SD_NODE_NAME$j = "link";
9151
+ const XML_NODE_NAME$o = "w:hyperlink";
9152
+ const SD_NODE_NAME$l = "link";
9144
9153
  const _createAttributeHandler = (xmlName, sdName) => ({
9145
9154
  xmlName,
9146
9155
  sdName,
@@ -9160,7 +9169,7 @@ const validXmlAttributes$c = [
9160
9169
  _createAttributeHandler("r:id", "rId"),
9161
9170
  _createAttributeHandler("w:tgtFrame", "target")
9162
9171
  ];
9163
- const encode$E = (params, encodedAttrs) => {
9172
+ const encode$G = (params, encodedAttrs) => {
9164
9173
  const { nodes, docx, nodeListHandler } = params;
9165
9174
  const node = nodes[0];
9166
9175
  let href = _resolveHref(docx, encodedAttrs, params.filename);
@@ -9196,7 +9205,7 @@ const _resolveHref = (docx, encodedAttrs, filename) => {
9196
9205
  }
9197
9206
  return href;
9198
9207
  };
9199
- function decode$G(params) {
9208
+ function decode$I(params) {
9200
9209
  const { hyperlinkGroup = [params.node] } = params.extraParams || {};
9201
9210
  const node = hyperlinkGroup[0];
9202
9211
  const linkMark = node.marks.find((m2) => m2.type === "link");
@@ -9245,53 +9254,53 @@ function _addNewLinkRelationship(params, link) {
9245
9254
  });
9246
9255
  return `rId${id}`;
9247
9256
  }
9248
- const config$l = {
9249
- xmlName: XML_NODE_NAME$m,
9250
- sdNodeOrKeyName: SD_NODE_NAME$j,
9257
+ const config$n = {
9258
+ xmlName: XML_NODE_NAME$o,
9259
+ sdNodeOrKeyName: SD_NODE_NAME$l,
9251
9260
  type: NodeTranslator.translatorTypes.NODE,
9252
- encode: encode$E,
9253
- decode: decode$G,
9261
+ encode: encode$G,
9262
+ decode: decode$I,
9254
9263
  attributes: validXmlAttributes$c
9255
9264
  };
9256
- const translator$14 = NodeTranslator.from(config$l);
9257
- const encode$D = (attributes) => {
9265
+ const translator$16 = NodeTranslator.from(config$n);
9266
+ const encode$F = (attributes) => {
9258
9267
  return attributes["w:rsidR"];
9259
9268
  };
9260
- const decode$F = (attrs) => {
9269
+ const decode$H = (attrs) => {
9261
9270
  return attrs.rsidR;
9262
9271
  };
9263
9272
  const attrConfig$j = Object.freeze({
9264
9273
  xmlName: "w:rsidR",
9265
9274
  sdName: "rsidR",
9266
- encode: encode$D,
9267
- decode: decode$F
9275
+ encode: encode$F,
9276
+ decode: decode$H
9268
9277
  });
9269
- const encode$C = (attributes) => {
9278
+ const encode$E = (attributes) => {
9270
9279
  return attributes["w:rsidRPr"];
9271
9280
  };
9272
- const decode$E = (attrs) => {
9281
+ const decode$G = (attrs) => {
9273
9282
  return attrs.rsidRPr;
9274
9283
  };
9275
9284
  const attrConfig$i = Object.freeze({
9276
9285
  xmlName: "w:rsidRPr",
9277
9286
  sdName: "rsidRPr",
9278
- encode: encode$C,
9279
- decode: decode$E
9287
+ encode: encode$E,
9288
+ decode: decode$G
9280
9289
  });
9281
- const encode$B = (attributes) => {
9290
+ const encode$D = (attributes) => {
9282
9291
  return attributes["w:rsidDel"];
9283
9292
  };
9284
- const decode$D = (attrs) => {
9293
+ const decode$F = (attrs) => {
9285
9294
  return attrs.rsidDel;
9286
9295
  };
9287
9296
  const attrConfig$h = Object.freeze({
9288
9297
  xmlName: "w:rsidDel",
9289
9298
  sdName: "rsidDel",
9290
- encode: encode$B,
9291
- decode: decode$D
9299
+ encode: encode$D,
9300
+ decode: decode$F
9292
9301
  });
9293
9302
  const validXmlAttributes$b = [attrConfig$j, attrConfig$i, attrConfig$h];
9294
- const XML_NODE_NAME$l = "w:r";
9303
+ const XML_NODE_NAME$n = "w:r";
9295
9304
  const SD_KEY_NAME = "run";
9296
9305
  const createRunNodeWithContent = (content, encodedAttrs, runLevelMarks, runProperties) => {
9297
9306
  const node = {
@@ -9304,13 +9313,13 @@ const createRunNodeWithContent = (content, encodedAttrs, runLevelMarks, runPrope
9304
9313
  }
9305
9314
  return node;
9306
9315
  };
9307
- const encode$A = (params, encodedAttrs = {}) => {
9316
+ const encode$C = (params, encodedAttrs = {}) => {
9308
9317
  const { nodes = [], nodeListHandler } = params || {};
9309
9318
  const runNode = nodes[0];
9310
9319
  if (!runNode) return void 0;
9311
9320
  const elements = Array.isArray(runNode.elements) ? runNode.elements : [];
9312
9321
  const rPrNode = elements.find((child) => child?.name === "w:rPr");
9313
- const runProperties = rPrNode ? translator$1Q.encode({ ...params, nodes: [rPrNode] }) : {};
9322
+ const runProperties = rPrNode ? translator$1S.encode({ ...params, nodes: [rPrNode] }) : {};
9314
9323
  const paragraphProperties = params?.extraParams?.paragraphProperties || {};
9315
9324
  const resolvedRunProperties = resolveRunProperties(params, runProperties ?? {}, paragraphProperties);
9316
9325
  const marksResult = encodeMarksFromRPr(resolvedRunProperties, params?.docx);
@@ -9373,7 +9382,7 @@ const encode$A = (params, encodedAttrs = {}) => {
9373
9382
  finalizeTextChunk();
9374
9383
  return splitRuns;
9375
9384
  };
9376
- const decode$C = (params, decodedAttrs = {}) => {
9385
+ const decode$E = (params, decodedAttrs = {}) => {
9377
9386
  const { node } = params || {};
9378
9387
  if (!node) return void 0;
9379
9388
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
@@ -9382,7 +9391,7 @@ const decode$C = (params, decodedAttrs = {}) => {
9382
9391
  ...params.extraParams,
9383
9392
  linkProcessed: true
9384
9393
  };
9385
- return translator$14.decode({ ...params, extraParams });
9394
+ return translator$16.decode({ ...params, extraParams });
9386
9395
  }
9387
9396
  const { runNode: runNodeForExport, trackingMarksByType } = prepareRunTrackingContext(node);
9388
9397
  const runAttrs = runNodeForExport.attrs || {};
@@ -9396,7 +9405,7 @@ const decode$C = (params, decodedAttrs = {}) => {
9396
9405
  exportParams.editor = { extensionService: { extensions: [] } };
9397
9406
  }
9398
9407
  const childElements = translateChildNodes(exportParams) || [];
9399
- let runPropertiesElement = translator$1Q.decode({
9408
+ let runPropertiesElement = translator$1S.decode({
9400
9409
  ...params,
9401
9410
  node: { attrs: { runProperties } }
9402
9411
  });
@@ -9444,7 +9453,7 @@ const decode$C = (params, decodedAttrs = {}) => {
9444
9453
  runs.push(commentRangeClone);
9445
9454
  return;
9446
9455
  }
9447
- const runWrapper = { name: XML_NODE_NAME$l, elements: [] };
9456
+ const runWrapper = { name: XML_NODE_NAME$n, elements: [] };
9448
9457
  applyBaseRunProps(runWrapper);
9449
9458
  if (!Array.isArray(runWrapper.elements)) runWrapper.elements = [];
9450
9459
  runWrapper.elements.push(cloneXmlNode(child));
@@ -9452,7 +9461,7 @@ const decode$C = (params, decodedAttrs = {}) => {
9452
9461
  });
9453
9462
  const trackedRuns = ensureTrackedWrapper(runs, trackingMarksByType);
9454
9463
  if (!trackedRuns.length) {
9455
- const emptyRun = { name: XML_NODE_NAME$l, elements: [] };
9464
+ const emptyRun = { name: XML_NODE_NAME$n, elements: [] };
9456
9465
  applyBaseRunProps(emptyRun);
9457
9466
  trackedRuns.push(emptyRun);
9458
9467
  }
@@ -9466,17 +9475,17 @@ const decode$C = (params, decodedAttrs = {}) => {
9466
9475
  }
9467
9476
  return trackedRuns;
9468
9477
  };
9469
- const config$k = {
9470
- xmlName: XML_NODE_NAME$l,
9478
+ const config$m = {
9479
+ xmlName: XML_NODE_NAME$n,
9471
9480
  sdNodeOrKeyName: SD_KEY_NAME,
9472
9481
  type: NodeTranslator.translatorTypes.NODE,
9473
- encode: encode$A,
9474
- decode: decode$C,
9482
+ encode: encode$C,
9483
+ decode: decode$E,
9475
9484
  attributes: validXmlAttributes$b
9476
9485
  };
9477
- const translator$13 = NodeTranslator.from(config$k);
9478
- const translator$12 = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
9479
- const translator$11 = NodeTranslator.from(
9486
+ const translator$15 = NodeTranslator.from(config$m);
9487
+ const translator$14 = NodeTranslator.from(createMeasurementPropertyHandler("w:tcW", "cellWidth"));
9488
+ const translator$13 = NodeTranslator.from(
9480
9489
  createSingleAttrPropertyHandler(
9481
9490
  "w:gridSpan",
9482
9491
  null,
@@ -9485,33 +9494,33 @@ const translator$11 = NodeTranslator.from(
9485
9494
  (v2) => integerToString(v2)
9486
9495
  )
9487
9496
  );
9488
- const translator$10 = NodeTranslator.from(
9497
+ const translator$12 = NodeTranslator.from(
9489
9498
  createSingleAttrPropertyHandler("w:vMerge", null, "w:val", (val) => !val ? "continue" : val)
9490
9499
  );
9491
- const translator$$ = NodeTranslator.from(createBorderPropertyHandler("w:end"));
9492
- const translator$_ = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
9493
- const translator$Z = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
9494
- const translator$Y = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
9495
- const translator$X = NodeTranslator.from(createBorderPropertyHandler("w:start"));
9496
- const translator$W = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
9497
- const translator$V = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
9498
- const translator$U = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
9500
+ const translator$11 = NodeTranslator.from(createBorderPropertyHandler("w:end"));
9501
+ const translator$10 = NodeTranslator.from(createMeasurementPropertyHandler("w:end", "marginEnd"));
9502
+ const translator$$ = NodeTranslator.from(createBorderPropertyHandler("w:insideH"));
9503
+ const translator$_ = NodeTranslator.from(createBorderPropertyHandler("w:insideV"));
9504
+ const translator$Z = NodeTranslator.from(createBorderPropertyHandler("w:start"));
9505
+ const translator$Y = NodeTranslator.from(createMeasurementPropertyHandler("w:start", "marginStart"));
9506
+ const translator$X = NodeTranslator.from(createBorderPropertyHandler("w:tl2br"));
9507
+ const translator$W = NodeTranslator.from(createBorderPropertyHandler("w:tr2bl"));
9499
9508
  const propertyTranslators$7 = [
9500
- translator$1m,
9501
- translator$X,
9502
- translator$1q,
9503
- translator$1s,
9504
- translator$$,
9505
9509
  translator$1o,
9506
9510
  translator$Z,
9507
- translator$Y,
9508
- translator$V,
9509
- translator$U
9511
+ translator$1s,
9512
+ translator$1u,
9513
+ translator$11,
9514
+ translator$1q,
9515
+ translator$$,
9516
+ translator$_,
9517
+ translator$X,
9518
+ translator$W
9510
9519
  ];
9511
- const translator$T = NodeTranslator.from(
9520
+ const translator$V = NodeTranslator.from(
9512
9521
  createNestedPropertiesTranslator("w:tcBorders", "borders", propertyTranslators$7)
9513
9522
  );
9514
- const translator$S = NodeTranslator.from(
9523
+ const translator$U = NodeTranslator.from(
9515
9524
  createSingleAttrPropertyHandler(
9516
9525
  "w:noWrap",
9517
9526
  null,
@@ -9521,17 +9530,17 @@ const translator$S = NodeTranslator.from(
9521
9530
  )
9522
9531
  );
9523
9532
  const propertyTranslators$6 = [
9533
+ translator$1t,
9534
+ translator$10,
9524
9535
  translator$1r,
9525
- translator$_,
9526
9536
  translator$1p,
9527
- translator$1n,
9528
- translator$W,
9529
- translator$1l
9537
+ translator$Y,
9538
+ translator$1n
9530
9539
  ];
9531
- const translator$R = NodeTranslator.from(
9540
+ const translator$T = NodeTranslator.from(
9532
9541
  createNestedPropertiesTranslator("w:tcMar", "cellMargins", propertyTranslators$6)
9533
9542
  );
9534
- const translator$Q = NodeTranslator.from(
9543
+ const translator$S = NodeTranslator.from(
9535
9544
  createSingleAttrPropertyHandler(
9536
9545
  "w:tcFitText",
9537
9546
  null,
@@ -9540,8 +9549,8 @@ const translator$Q = NodeTranslator.from(
9540
9549
  (v2) => booleanToString(v2)
9541
9550
  )
9542
9551
  );
9543
- const translator$P = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
9544
- const translator$O = NodeTranslator.from(
9552
+ const translator$R = NodeTranslator.from(createSingleAttrPropertyHandler("w:vAlign"));
9553
+ const translator$Q = NodeTranslator.from(
9545
9554
  createSingleAttrPropertyHandler(
9546
9555
  "w:hideMark",
9547
9556
  null,
@@ -9550,26 +9559,26 @@ const translator$O = NodeTranslator.from(
9550
9559
  (v2) => booleanToString(v2)
9551
9560
  )
9552
9561
  );
9553
- const translator$N = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
9554
- const translator$M = NodeTranslator.from(
9555
- createNestedArrayPropertyHandler("w:headers", "headers", [translator$N])
9562
+ const translator$P = NodeTranslator.from(createSingleAttrPropertyHandler("w:header"));
9563
+ const translator$O = NodeTranslator.from(
9564
+ createNestedArrayPropertyHandler("w:headers", "headers", [translator$P])
9556
9565
  );
9557
9566
  const propertyTranslators$5 = [
9558
- translator$1K,
9567
+ translator$1M,
9568
+ translator$14,
9569
+ translator$13,
9559
9570
  translator$12,
9560
- translator$11,
9561
- translator$10,
9571
+ translator$V,
9572
+ translator$2f,
9573
+ translator$U,
9562
9574
  translator$T,
9563
- translator$2d,
9575
+ translator$1d,
9564
9576
  translator$S,
9565
9577
  translator$R,
9566
- translator$1b,
9567
9578
  translator$Q,
9568
- translator$P,
9569
- translator$O,
9570
- translator$M
9579
+ translator$O
9571
9580
  ];
9572
- const translator$L = NodeTranslator.from(
9581
+ const translator$N = NodeTranslator.from(
9573
9582
  createNestedPropertiesTranslator("w:tcPr", "tableCellProperties", propertyTranslators$5)
9574
9583
  );
9575
9584
  function handleTableCellNode({
@@ -9593,7 +9602,7 @@ function handleTableCellNode({
9593
9602
  const attributes = {};
9594
9603
  const referencedStyles = _referencedStyles ?? { fontSize: null, fonts: {}, cellMargins: {} };
9595
9604
  const tcPr = node.elements.find((el) => el.name === "w:tcPr");
9596
- const tableCellProperties = tcPr ? translator$L.encode({ ...params, nodes: [tcPr] }) ?? {} : {};
9605
+ const tableCellProperties = tcPr ? translator$N.encode({ ...params, nodes: [tcPr] }) ?? {} : {};
9597
9606
  attributes["tableCellProperties"] = tableCellProperties;
9598
9607
  const effectiveTotalColumns = totalColumns ?? (allColumnWidths.length || 1);
9599
9608
  const effectiveTotalRows = totalRows ?? (table?.elements?.filter((el) => el.name === "w:tr").length || 1);
@@ -9983,13 +9992,13 @@ function generateTableCellProperties(node) {
9983
9992
  } else if (tableCellProperties?.borders) {
9984
9993
  delete tableCellProperties.borders;
9985
9994
  }
9986
- const result = translator$L.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
9995
+ const result = translator$N.decode({ node: { ...node, attrs: { ...node.attrs, tableCellProperties } } });
9987
9996
  return result;
9988
9997
  }
9989
- const XML_NODE_NAME$k = "w:tc";
9990
- const SD_NODE_NAME$i = "tableCell";
9998
+ const XML_NODE_NAME$m = "w:tc";
9999
+ const SD_NODE_NAME$k = "tableCell";
9991
10000
  const validXmlAttributes$a = [];
9992
- function encode$z(params, encodedAttrs) {
10001
+ function encode$B(params, encodedAttrs) {
9993
10002
  const {
9994
10003
  node,
9995
10004
  table,
@@ -10028,42 +10037,42 @@ function encode$z(params, encodedAttrs) {
10028
10037
  }
10029
10038
  return schemaNode;
10030
10039
  }
10031
- function decode$B(params, decodedAttrs) {
10040
+ function decode$D(params, decodedAttrs) {
10032
10041
  const translated = translateTableCell(params);
10033
10042
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
10034
10043
  translated.attributes = { ...translated.attributes || {}, ...decodedAttrs };
10035
10044
  }
10036
10045
  return translated;
10037
10046
  }
10038
- const config$j = {
10039
- xmlName: XML_NODE_NAME$k,
10040
- sdNodeOrKeyName: SD_NODE_NAME$i,
10047
+ const config$l = {
10048
+ xmlName: XML_NODE_NAME$m,
10049
+ sdNodeOrKeyName: SD_NODE_NAME$k,
10041
10050
  type: NodeTranslator.translatorTypes.NODE,
10042
- encode: encode$z,
10043
- decode: decode$B,
10051
+ encode: encode$B,
10052
+ decode: decode$D,
10044
10053
  attributes: validXmlAttributes$a
10045
10054
  };
10046
- const translator$K = NodeTranslator.from(config$j);
10055
+ const translator$M = NodeTranslator.from(config$l);
10047
10056
  const propertyTranslators$4 = [
10048
- translator$1s,
10057
+ translator$1u,
10058
+ translator$11,
10049
10059
  translator$$,
10050
- translator$Z,
10051
- translator$Y,
10060
+ translator$_,
10061
+ translator$1s,
10052
10062
  translator$1q,
10053
- translator$1o,
10054
- translator$X,
10055
- translator$1m
10063
+ translator$Z,
10064
+ translator$1o
10056
10065
  ];
10057
- const translator$J = NodeTranslator.from(
10066
+ const translator$L = NodeTranslator.from(
10058
10067
  createNestedPropertiesTranslator("w:tblBorders", "borders", propertyTranslators$4)
10059
10068
  );
10060
- const translator$I = NodeTranslator.from({
10069
+ const translator$K = NodeTranslator.from({
10061
10070
  xmlName: "w:cantSplit",
10062
10071
  sdNodeOrKeyName: "cantSplit",
10063
10072
  encode: ({ nodes }) => ["1", "true"].includes(nodes[0].attributes?.["w:val"] ?? "1"),
10064
10073
  decode: ({ node }) => node.attrs?.cantSplit ? { attributes: {} } : void 0
10065
10074
  });
10066
- const translator$H = NodeTranslator.from(
10075
+ const translator$J = NodeTranslator.from(
10067
10076
  createSingleAttrPropertyHandler(
10068
10077
  "w:gridAfter",
10069
10078
  null,
@@ -10072,7 +10081,7 @@ const translator$H = NodeTranslator.from(
10072
10081
  (v2) => integerToString(v2)
10073
10082
  )
10074
10083
  );
10075
- const translator$G = NodeTranslator.from(
10084
+ const translator$I = NodeTranslator.from(
10076
10085
  createSingleAttrPropertyHandler(
10077
10086
  "w:gridBefore",
10078
10087
  null,
@@ -10081,20 +10090,20 @@ const translator$G = NodeTranslator.from(
10081
10090
  (v2) => integerToString(v2)
10082
10091
  )
10083
10092
  );
10084
- const translator$F = NodeTranslator.from({
10093
+ const translator$H = NodeTranslator.from({
10085
10094
  xmlName: "w:hidden",
10086
10095
  sdNodeOrKeyName: "hidden",
10087
10096
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
10088
10097
  decode: ({ node }) => node.attrs.hidden ? { attributes: {} } : void 0
10089
10098
  });
10090
- const translator$E = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
10091
- const translator$D = NodeTranslator.from({
10099
+ const translator$G = NodeTranslator.from(createMeasurementPropertyHandler("w:tblCellSpacing", "tableCellSpacing"));
10100
+ const translator$F = NodeTranslator.from({
10092
10101
  xmlName: "w:tblHeader",
10093
10102
  sdNodeOrKeyName: "repeatHeader",
10094
10103
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
10095
10104
  decode: ({ node }) => node.attrs.repeatHeader ? { attributes: {} } : void 0
10096
10105
  });
10097
- const translator$C = NodeTranslator.from({
10106
+ const translator$E = NodeTranslator.from({
10098
10107
  xmlName: "w:trHeight",
10099
10108
  sdNodeOrKeyName: "rowHeight",
10100
10109
  encode: ({ nodes }) => {
@@ -10121,23 +10130,23 @@ const translator$C = NodeTranslator.from({
10121
10130
  return Object.keys(heightAttrs).length > 0 ? { attributes: heightAttrs } : void 0;
10122
10131
  }
10123
10132
  });
10124
- const translator$B = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
10125
- const translator$A = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
10133
+ const translator$D = NodeTranslator.from(createMeasurementPropertyHandler("w:wAfter"));
10134
+ const translator$C = NodeTranslator.from(createMeasurementPropertyHandler("w:wBefore"));
10126
10135
  const propertyTranslators$3 = [
10127
- translator$I,
10136
+ translator$K,
10137
+ translator$1M,
10128
10138
  translator$1K,
10129
- translator$1I,
10139
+ translator$J,
10140
+ translator$I,
10130
10141
  translator$H,
10142
+ translator$1H,
10131
10143
  translator$G,
10132
10144
  translator$F,
10133
- translator$1F,
10134
10145
  translator$E,
10135
10146
  translator$D,
10136
- translator$C,
10137
- translator$B,
10138
- translator$A
10147
+ translator$C
10139
10148
  ];
10140
- const translator$z = NodeTranslator.from(
10149
+ const translator$B = NodeTranslator.from(
10141
10150
  createNestedPropertiesTranslator("w:trPr", "tableRowProperties", propertyTranslators$3, {
10142
10151
  cantSplit: false,
10143
10152
  hidden: false,
@@ -10206,8 +10215,8 @@ const isPlaceholderCell = (cell) => {
10206
10215
  }
10207
10216
  return false;
10208
10217
  };
10209
- const XML_NODE_NAME$j = "w:tr";
10210
- const SD_NODE_NAME$h = "tableRow";
10218
+ const XML_NODE_NAME$l = "w:tr";
10219
+ const SD_NODE_NAME$j = "tableRow";
10211
10220
  const validXmlAttributes$9 = ["w:rsidDel", "w:rsidR", "w:rsidRPr", "w:rsidTr", "w14:paraId", "w14:textId"].map(
10212
10221
  (xmlName) => createAttributeHandler(xmlName)
10213
10222
  );
@@ -10216,12 +10225,12 @@ const getColspan$1 = (cell) => {
10216
10225
  const numericColspan = typeof rawColspan === "string" ? parseInt(rawColspan, 10) : rawColspan;
10217
10226
  return Number.isFinite(numericColspan) && numericColspan > 0 ? numericColspan : 1;
10218
10227
  };
10219
- const encode$y = (params, encodedAttrs) => {
10228
+ const encode$A = (params, encodedAttrs) => {
10220
10229
  const { row, tableLook } = params.extraParams;
10221
10230
  let tableRowProperties = {};
10222
10231
  const tPr = row.elements.find((el) => el.name === "w:trPr");
10223
10232
  if (tPr) {
10224
- tableRowProperties = translator$z.encode({
10233
+ tableRowProperties = translator$B.encode({
10225
10234
  ...params,
10226
10235
  nodes: [tPr]
10227
10236
  });
@@ -10265,7 +10274,7 @@ const encode$y = (params, encodedAttrs) => {
10265
10274
  skipOccupiedColumns();
10266
10275
  const startColumn = currentColumnIndex;
10267
10276
  const columnWidth = gridColumnWidths?.[startColumn] || null;
10268
- const result = translator$K.encode({
10277
+ const result = translator$M.encode({
10269
10278
  ...params,
10270
10279
  path: [...params.path || [], node],
10271
10280
  extraParams: {
@@ -10316,7 +10325,7 @@ function getRowBorders({ params, row, baseBorders }) {
10316
10325
  if (!tblBorders) {
10317
10326
  return rowBaseBorders;
10318
10327
  }
10319
- const rawOverrides = translator$J.encode({ ...params, nodes: [tblBorders] }) || {};
10328
+ const rawOverrides = translator$L.encode({ ...params, nodes: [tblBorders] }) || {};
10320
10329
  const overrides = processRawTableBorders(rawOverrides);
10321
10330
  if (!Object.keys(overrides).length) {
10322
10331
  return rowBaseBorders;
@@ -10338,7 +10347,7 @@ function processRawTableBorders(rawBorders) {
10338
10347
  });
10339
10348
  return borders;
10340
10349
  }
10341
- const decode$A = (params, decodedAttrs) => {
10350
+ const decode$C = (params, decodedAttrs) => {
10342
10351
  const { node } = params;
10343
10352
  const cells = node.content || [];
10344
10353
  let leadingPlaceholders = 0;
@@ -10398,7 +10407,7 @@ const decode$A = (params, decodedAttrs) => {
10398
10407
  }
10399
10408
  }
10400
10409
  tableRowProperties["cantSplit"] = node.attrs["cantSplit"];
10401
- const trPr = translator$z.decode({
10410
+ const trPr = translator$B.decode({
10402
10411
  ...params,
10403
10412
  node: { ...node, attrs: { ...node.attrs, tableRowProperties } }
10404
10413
  });
@@ -10410,15 +10419,15 @@ const decode$A = (params, decodedAttrs) => {
10410
10419
  elements
10411
10420
  };
10412
10421
  };
10413
- const config$i = {
10414
- xmlName: XML_NODE_NAME$j,
10415
- sdNodeOrKeyName: SD_NODE_NAME$h,
10422
+ const config$k = {
10423
+ xmlName: XML_NODE_NAME$l,
10424
+ sdNodeOrKeyName: SD_NODE_NAME$j,
10416
10425
  type: NodeTranslator.translatorTypes.NODE,
10417
- encode: encode$y,
10418
- decode: decode$A,
10426
+ encode: encode$A,
10427
+ decode: decode$C,
10419
10428
  attributes: validXmlAttributes$9
10420
10429
  };
10421
- const translator$y = NodeTranslator.from(config$i);
10430
+ const translator$A = NodeTranslator.from(config$k);
10422
10431
  function parseTagValueJSON(json) {
10423
10432
  if (typeof json !== "string") {
10424
10433
  return {};
@@ -19316,6 +19325,32 @@ function preProcessTocInstruction(nodesToCombine, instrText) {
19316
19325
  }
19317
19326
  ];
19318
19327
  }
19328
+ function preProcessIndexInstruction(nodesToCombine, instrText, _docx, instructionTokens = null) {
19329
+ return [
19330
+ {
19331
+ name: "sd:index",
19332
+ type: "element",
19333
+ attributes: {
19334
+ instruction: instrText,
19335
+ ...instructionTokens ? { instructionTokens } : {}
19336
+ },
19337
+ elements: nodesToCombine
19338
+ }
19339
+ ];
19340
+ }
19341
+ function preProcessXeInstruction(nodesToCombine, instrText, _docx, instructionTokens = null) {
19342
+ return [
19343
+ {
19344
+ name: "sd:indexEntry",
19345
+ type: "element",
19346
+ attributes: {
19347
+ instruction: instrText,
19348
+ ...instructionTokens ? { instructionTokens } : {}
19349
+ },
19350
+ elements: nodesToCombine
19351
+ }
19352
+ ];
19353
+ }
19319
19354
  const getInstructionPreProcessor = (instruction) => {
19320
19355
  const instructionType = instruction.split(" ")[0];
19321
19356
  switch (instructionType) {
@@ -19329,6 +19364,10 @@ const getInstructionPreProcessor = (instruction) => {
19329
19364
  return preProcessHyperlinkInstruction;
19330
19365
  case "TOC":
19331
19366
  return preProcessTocInstruction;
19367
+ case "INDEX":
19368
+ return preProcessIndexInstruction;
19369
+ case "XE":
19370
+ return preProcessXeInstruction;
19332
19371
  default:
19333
19372
  return null;
19334
19373
  }
@@ -19347,7 +19386,12 @@ const preProcessNodesForFldChar = (nodes = [], docx) => {
19347
19386
  const collectedNodes = collectedNodesStack.pop().filter((n) => n !== null);
19348
19387
  const rawCollectedNodes = rawCollectedNodesStack.pop().filter((n) => n !== null);
19349
19388
  const currentField = currentFieldStack.pop();
19350
- const combinedResult = _processCombinedNodesForFldChar(collectedNodes, currentField.instrText.trim(), docx);
19389
+ const combinedResult = _processCombinedNodesForFldChar(
19390
+ collectedNodes,
19391
+ currentField.instrText.trim(),
19392
+ docx,
19393
+ currentField.instructionTokens
19394
+ );
19351
19395
  const outputNodes = combinedResult.handled ? combinedResult.nodes : rawCollectedNodes;
19352
19396
  if (collectedNodesStack.length === 0) {
19353
19397
  processedNodes.push(...outputNodes);
@@ -19374,16 +19418,46 @@ const preProcessNodesForFldChar = (nodes = [], docx) => {
19374
19418
  const fldCharEl = node.elements?.find((el) => el.name === "w:fldChar");
19375
19419
  const fldType = fldCharEl?.attributes?.["w:fldCharType"];
19376
19420
  const instrTextEl = node.elements?.find((el) => el.name === "w:instrText");
19421
+ if (node.name === "w:fldSimple") {
19422
+ const instr = node.attributes?.["w:instr"];
19423
+ if (typeof instr === "string") {
19424
+ const instructionType = instr.trim().split(" ")[0];
19425
+ const instructionPreProcessor = getInstructionPreProcessor(instructionType);
19426
+ if (instructionPreProcessor) {
19427
+ const processed = instructionPreProcessor(node.elements ?? [], instr, docx, null);
19428
+ if (collecting) {
19429
+ collectedNodesStack[collectedNodesStack.length - 1].push(...processed);
19430
+ rawCollectedNodesStack[rawCollectedNodesStack.length - 1].push(...processed);
19431
+ } else {
19432
+ processedNodes.push(...processed);
19433
+ }
19434
+ continue;
19435
+ }
19436
+ }
19437
+ }
19377
19438
  if (fldType === "begin") {
19378
19439
  collectedNodesStack.push([]);
19379
19440
  rawCollectedNodesStack.push([rawNode]);
19380
- currentFieldStack.push({ instrText: "" });
19441
+ currentFieldStack.push({ instrText: "", instructionTokens: [], afterSeparate: false });
19381
19442
  continue;
19382
19443
  }
19383
- if (instrTextEl && collecting && currentFieldStack.length > 0) {
19384
- rawCollectedNodesStack[rawCollectedNodesStack.length - 1].push(rawNode);
19385
- currentFieldStack[currentFieldStack.length - 1].instrText += (instrTextEl.elements?.[0]?.text || "") + " ";
19386
- continue;
19444
+ if (collecting && currentFieldStack.length > 0) {
19445
+ const currentField = currentFieldStack[currentFieldStack.length - 1];
19446
+ if (!currentField.afterSeparate) {
19447
+ const instructionTokens = extractInstructionTokensFromNode(node);
19448
+ if (instructionTokens.length > 0) {
19449
+ rawCollectedNodesStack[rawCollectedNodesStack.length - 1].push(rawNode);
19450
+ currentField.instructionTokens.push(...instructionTokens);
19451
+ const instrTextValue = instrTextEl?.elements?.[0]?.text;
19452
+ if (instrTextValue != null) {
19453
+ currentField.instrText += `${instrTextValue} `;
19454
+ }
19455
+ if (instructionTokens.some((token) => token.type === "tab")) {
19456
+ currentField.instrText += " ";
19457
+ }
19458
+ continue;
19459
+ }
19460
+ }
19387
19461
  }
19388
19462
  if (fldType === "end") {
19389
19463
  if (collecting) {
@@ -19394,6 +19468,10 @@ const preProcessNodesForFldChar = (nodes = [], docx) => {
19394
19468
  } else if (fldType === "separate") {
19395
19469
  if (collecting) {
19396
19470
  rawCollectedNodesStack[rawCollectedNodesStack.length - 1].push(rawNode);
19471
+ const currentField = currentFieldStack[currentFieldStack.length - 1];
19472
+ if (currentField) {
19473
+ currentField.afterSeparate = true;
19474
+ }
19397
19475
  }
19398
19476
  continue;
19399
19477
  }
@@ -19436,14 +19514,28 @@ const preProcessNodesForFldChar = (nodes = [], docx) => {
19436
19514
  }
19437
19515
  return { processedNodes, unpairedBegin, unpairedEnd };
19438
19516
  };
19439
- const _processCombinedNodesForFldChar = (nodesToCombine = [], instrText, docx) => {
19517
+ const _processCombinedNodesForFldChar = (nodesToCombine = [], instrText, docx, instructionTokens) => {
19440
19518
  const instructionType = instrText.trim().split(" ")[0];
19441
19519
  const instructionPreProcessor = getInstructionPreProcessor(instructionType);
19442
19520
  if (instructionPreProcessor) {
19443
- return { nodes: instructionPreProcessor(nodesToCombine, instrText, docx), handled: true };
19521
+ return { nodes: instructionPreProcessor(nodesToCombine, instrText, docx, instructionTokens), handled: true };
19444
19522
  }
19445
19523
  return { nodes: nodesToCombine, handled: false };
19446
19524
  };
19525
+ const extractInstructionTokensFromNode = (node) => {
19526
+ const elements = Array.isArray(node?.elements) ? node.elements : [];
19527
+ const tokens = [];
19528
+ elements.forEach((el) => {
19529
+ if (el?.name === "w:instrText") {
19530
+ const text = (el.elements || []).map((child) => typeof child?.text === "string" ? child.text : "").join("");
19531
+ tokens.push({ type: "text", text });
19532
+ }
19533
+ if (el?.name === "w:tab") {
19534
+ tokens.push({ type: "tab" });
19535
+ }
19536
+ });
19537
+ return tokens;
19538
+ };
19447
19539
  const SKIP_FIELD_PROCESSING_NODE_NAMES = /* @__PURE__ */ new Set(["w:drawing", "w:pict"]);
19448
19540
  const shouldSkipFieldProcessing = (node) => SKIP_FIELD_PROCESSING_NODE_NAMES.has(node?.name);
19449
19541
  const preProcessPageFieldsOnly = (nodes = [], depth = 0) => {
@@ -19458,6 +19550,26 @@ const preProcessPageFieldsOnly = (nodes = [], depth = 0) => {
19458
19550
  }
19459
19551
  const fldCharEl = node.elements?.find((el) => el.name === "w:fldChar");
19460
19552
  const fldType = fldCharEl?.attributes?.["w:fldCharType"];
19553
+ if (node.name === "w:fldSimple") {
19554
+ const instrAttr = node.attributes?.["w:instr"] || "";
19555
+ const fieldType = instrAttr.trim().split(/\s+/)[0];
19556
+ if (fieldType === "PAGE" || fieldType === "NUMPAGES") {
19557
+ const preprocessor = fieldType === "PAGE" ? preProcessPageInstruction : preProcessNumPagesInstruction;
19558
+ const contentNodes = node.elements || [];
19559
+ let fieldRunRPr = null;
19560
+ for (const child of contentNodes) {
19561
+ const rPr = child.elements?.find((el) => el.name === "w:rPr");
19562
+ if (rPr) {
19563
+ fieldRunRPr = rPr;
19564
+ break;
19565
+ }
19566
+ }
19567
+ const processedField = preprocessor(contentNodes, instrAttr.trim(), fieldRunRPr);
19568
+ processedNodes.push(...processedField);
19569
+ i++;
19570
+ continue;
19571
+ }
19572
+ }
19461
19573
  if (fldType === "begin") {
19462
19574
  const fieldInfo = scanFieldSequence(nodes, i);
19463
19575
  if (fieldInfo && (fieldInfo.fieldType === "PAGE" || fieldInfo.fieldType === "NUMPAGES")) {
@@ -19620,11 +19732,11 @@ function resolveFontFamilyForTextBox(fontFamily, docx) {
19620
19732
  }
19621
19733
  function resolveParagraphPropertiesForTextBox(paragraph, params) {
19622
19734
  const pPr = paragraph.elements?.find((el) => el.name === "w:pPr");
19623
- const inlineParagraphProperties = pPr ? translator$16.encode({ ...params, nodes: [pPr] }) || {} : {};
19735
+ const inlineParagraphProperties = pPr ? translator$18.encode({ ...params, nodes: [pPr] }) || {} : {};
19624
19736
  return resolveParagraphProperties(params, inlineParagraphProperties, false, false, null);
19625
19737
  }
19626
19738
  function extractRunFormatting(rPr, paragraphProperties, params) {
19627
- const inlineRunProperties = rPr ? translator$1Q.encode({ ...params, nodes: [rPr] }) || {} : {};
19739
+ const inlineRunProperties = rPr ? translator$1S.encode({ ...params, nodes: [rPr] }) || {} : {};
19628
19740
  const resolvedRunProperties = resolveRunProperties(params, inlineRunProperties, paragraphProperties || {});
19629
19741
  const formatting = {};
19630
19742
  if (resolvedRunProperties.bold) formatting.bold = true;
@@ -25584,8 +25696,8 @@ function translateAnchorNode(params) {
25584
25696
  elements: mergedElements
25585
25697
  };
25586
25698
  }
25587
- const XML_NODE_NAME$i = "wp:anchor";
25588
- const SD_NODE_NAME$g = ["image", "shapeGroup", "vectorShape", "contentBlock"];
25699
+ const XML_NODE_NAME$k = "wp:anchor";
25700
+ const SD_NODE_NAME$i = ["image", "shapeGroup", "vectorShape", "contentBlock"];
25589
25701
  const validXmlAttributes$8 = [
25590
25702
  "distT",
25591
25703
  "distB",
@@ -25600,29 +25712,29 @@ const validXmlAttributes$8 = [
25600
25712
  "wp14:anchorId",
25601
25713
  "wp14:editId"
25602
25714
  ].map((xmlName) => createAttributeHandler(xmlName));
25603
- function encode$x(params) {
25715
+ function encode$z(params) {
25604
25716
  const { node } = params.extraParams;
25605
25717
  if (!node || !node.name) {
25606
25718
  return null;
25607
25719
  }
25608
25720
  return handleAnchorNode(params);
25609
25721
  }
25610
- function decode$z(params) {
25722
+ function decode$B(params) {
25611
25723
  const { node } = params;
25612
25724
  if (!node || !node.type) {
25613
25725
  return null;
25614
25726
  }
25615
25727
  return translateAnchorNode(params);
25616
25728
  }
25617
- const config$h = {
25618
- xmlName: XML_NODE_NAME$i,
25619
- sdNodeOrKeyName: SD_NODE_NAME$g,
25729
+ const config$j = {
25730
+ xmlName: XML_NODE_NAME$k,
25731
+ sdNodeOrKeyName: SD_NODE_NAME$i,
25620
25732
  type: NodeTranslator.translatorTypes.NODE,
25621
- encode: encode$x,
25622
- decode: decode$z,
25733
+ encode: encode$z,
25734
+ decode: decode$B,
25623
25735
  attributes: validXmlAttributes$8
25624
25736
  };
25625
- const translator$x = NodeTranslator.from(config$h);
25737
+ const translator$z = NodeTranslator.from(config$j);
25626
25738
  function handleInlineNode(params) {
25627
25739
  const { node } = params.extraParams;
25628
25740
  if (node.name !== "wp:inline") {
@@ -25649,43 +25761,43 @@ function translateInlineNode(params) {
25649
25761
  elements: mergedElements
25650
25762
  };
25651
25763
  }
25652
- const XML_NODE_NAME$h = "wp:inline";
25653
- const SD_NODE_NAME$f = ["image", "shapeGroup", "vectorShape", "contentBlock"];
25764
+ const XML_NODE_NAME$j = "wp:inline";
25765
+ const SD_NODE_NAME$h = ["image", "shapeGroup", "vectorShape", "contentBlock"];
25654
25766
  const validXmlAttributes$7 = ["distT", "distB", "distL", "distR", "wp14:anchorId", "wp14:editId"].map(
25655
25767
  (xmlName) => createAttributeHandler(xmlName)
25656
25768
  );
25657
- function encode$w(params) {
25769
+ function encode$y(params) {
25658
25770
  const { node } = params.extraParams;
25659
25771
  if (!node || !node.name) {
25660
25772
  return null;
25661
25773
  }
25662
25774
  return handleInlineNode(params);
25663
25775
  }
25664
- function decode$y(params) {
25776
+ function decode$A(params) {
25665
25777
  const { node } = params;
25666
25778
  if (!node || !node.type) {
25667
25779
  return null;
25668
25780
  }
25669
25781
  return translateInlineNode(params);
25670
25782
  }
25671
- const config$g = {
25672
- xmlName: XML_NODE_NAME$h,
25673
- sdNodeOrKeyName: SD_NODE_NAME$f,
25783
+ const config$i = {
25784
+ xmlName: XML_NODE_NAME$j,
25785
+ sdNodeOrKeyName: SD_NODE_NAME$h,
25674
25786
  type: NodeTranslator.translatorTypes.NODE,
25675
- encode: encode$w,
25676
- decode: decode$y,
25787
+ encode: encode$y,
25788
+ decode: decode$A,
25677
25789
  attributes: validXmlAttributes$7
25678
25790
  };
25679
- const translator$w = NodeTranslator.from(config$g);
25680
- const XML_NODE_NAME$g = "w:drawing";
25681
- const SD_NODE_NAME$e = [];
25791
+ const translator$y = NodeTranslator.from(config$i);
25792
+ const XML_NODE_NAME$i = "w:drawing";
25793
+ const SD_NODE_NAME$g = [];
25682
25794
  const validXmlAttributes$6 = [];
25683
- function encode$v(params) {
25795
+ function encode$x(params) {
25684
25796
  const nodes = params.nodes;
25685
25797
  const node = nodes[0];
25686
25798
  const translatorByChildName = {
25687
- "wp:anchor": translator$x,
25688
- "wp:inline": translator$w
25799
+ "wp:anchor": translator$z,
25800
+ "wp:inline": translator$y
25689
25801
  };
25690
25802
  const result = (node.elements || []).reduce((acc, child) => {
25691
25803
  if (acc) return acc;
@@ -25703,12 +25815,12 @@ function encode$v(params) {
25703
25815
  }
25704
25816
  };
25705
25817
  }
25706
- function decode$x(params) {
25818
+ function decode$z(params) {
25707
25819
  const { node } = params;
25708
25820
  if (!node || !node.type) {
25709
25821
  return null;
25710
25822
  }
25711
- const childTranslator = node.attrs.isAnchor ? translator$x : translator$w;
25823
+ const childTranslator = node.attrs.isAnchor ? translator$z : translator$y;
25712
25824
  const resultNode = childTranslator.decode(params);
25713
25825
  return wrapTextInRun(
25714
25826
  {
@@ -25718,15 +25830,15 @@ function decode$x(params) {
25718
25830
  []
25719
25831
  );
25720
25832
  }
25721
- const config$f = {
25722
- xmlName: XML_NODE_NAME$g,
25723
- sdNodeOrKeyName: SD_NODE_NAME$e,
25833
+ const config$h = {
25834
+ xmlName: XML_NODE_NAME$i,
25835
+ sdNodeOrKeyName: SD_NODE_NAME$g,
25724
25836
  type: NodeTranslator.translatorTypes.NODE,
25725
- encode: encode$v,
25726
- decode: decode$x,
25837
+ encode: encode$x,
25838
+ decode: decode$z,
25727
25839
  attributes: validXmlAttributes$6
25728
25840
  };
25729
- const translator$v = NodeTranslator.from(config$f);
25841
+ const translator$x = NodeTranslator.from(config$h);
25730
25842
  function getTextNodeForExport(text, marks, params) {
25731
25843
  const hasLeadingOrTrailingSpace = /^\s|\s$/.test(text);
25732
25844
  const space = hasLeadingOrTrailingSpace ? "preserve" : null;
@@ -25735,7 +25847,7 @@ function getTextNodeForExport(text, marks, params) {
25735
25847
  const textRunProperties = decodeRPrFromMarks(marks || []);
25736
25848
  const parentRunProperties = params.extraParams?.runProperties || {};
25737
25849
  const combinedRunProperties = combineRunProperties([parentRunProperties, textRunProperties]);
25738
- const rPrNode = translator$1Q.decode({ node: { attrs: { runProperties: combinedRunProperties } } });
25850
+ const rPrNode = translator$1S.decode({ node: { attrs: { runProperties: combinedRunProperties } } });
25739
25851
  textNodes.push({
25740
25852
  name: "w:t",
25741
25853
  elements: [{ text, type: "text" }],
@@ -26134,7 +26246,7 @@ function prepareTextAnnotation(params) {
26134
26246
  return getTextNodeForExport(attrs.displayLabel, [...marks, ...marksFromAttrs], params);
26135
26247
  }
26136
26248
  function prepareImageAnnotation(params, imageSize) {
26137
- return translator$v.decode({
26249
+ return translator$x.decode({
26138
26250
  ...params,
26139
26251
  imageSize
26140
26252
  });
@@ -26219,7 +26331,7 @@ function prepareUrlAnnotation(params) {
26219
26331
  }
26220
26332
  ]
26221
26333
  };
26222
- return translator$14.decode({
26334
+ return translator$16.decode({
26223
26335
  ...params,
26224
26336
  node: linkTextNode
26225
26337
  });
@@ -26557,10 +26669,10 @@ function generateSdtPrTagForStructuredContent({ node }) {
26557
26669
  };
26558
26670
  return result;
26559
26671
  }
26560
- const XML_NODE_NAME$f = "w:sdt";
26561
- const SD_NODE_NAME$d = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
26672
+ const XML_NODE_NAME$h = "w:sdt";
26673
+ const SD_NODE_NAME$f = ["fieldAnnotation", "structuredContent", "structuredContentBlock", "documentSection"];
26562
26674
  const validXmlAttributes$5 = [];
26563
- function encode$u(params) {
26675
+ function encode$w(params) {
26564
26676
  const nodes = params.nodes;
26565
26677
  const node = nodes[0];
26566
26678
  const { type: sdtType, handler: handler2 } = sdtNodeTypeStrategy(node);
@@ -26570,7 +26682,7 @@ function encode$u(params) {
26570
26682
  const result = handler2(params);
26571
26683
  return result;
26572
26684
  }
26573
- function decode$w(params) {
26685
+ function decode$y(params) {
26574
26686
  const { node } = params;
26575
26687
  if (!node || !node.type) {
26576
26688
  return null;
@@ -26588,15 +26700,15 @@ function decode$w(params) {
26588
26700
  const result = decoder();
26589
26701
  return result;
26590
26702
  }
26591
- const config$e = {
26592
- xmlName: XML_NODE_NAME$f,
26593
- sdNodeOrKeyName: SD_NODE_NAME$d,
26703
+ const config$g = {
26704
+ xmlName: XML_NODE_NAME$h,
26705
+ sdNodeOrKeyName: SD_NODE_NAME$f,
26594
26706
  type: NodeTranslator.translatorTypes.NODE,
26595
- encode: encode$u,
26596
- decode: decode$w,
26707
+ encode: encode$w,
26708
+ decode: decode$y,
26597
26709
  attributes: validXmlAttributes$5
26598
26710
  };
26599
- const translator$u = NodeTranslator.from(config$e);
26711
+ const translator$w = NodeTranslator.from(config$g);
26600
26712
  const getColspan = (cell) => {
26601
26713
  const rawColspan = cell?.attrs?.colspan;
26602
26714
  const numericColspan = typeof rawColspan === "string" ? parseInt(rawColspan, 10) : rawColspan;
@@ -26687,16 +26799,16 @@ function preProcessVerticalMergeCells(table, { editorSchema }) {
26687
26799
  }
26688
26800
  return table;
26689
26801
  }
26690
- const translator$t = NodeTranslator.from({
26802
+ const translator$v = NodeTranslator.from({
26691
26803
  xmlName: "w:bidiVisual",
26692
26804
  sdNodeOrKeyName: "rightToLeft",
26693
26805
  encode: ({ nodes }) => parseBoolean(nodes[0].attributes?.["w:val"] ?? "1"),
26694
26806
  decode: ({ node }) => node.attrs.rightToLeft ? { attributes: {} } : void 0
26695
26807
  });
26696
- const translator$s = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
26697
- const translator$r = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
26698
- const translator$q = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
26699
- const translator$p = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
26808
+ const translator$u = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblCaption", "caption"));
26809
+ const translator$t = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblDescription", "description"));
26810
+ const translator$s = NodeTranslator.from(createMeasurementPropertyHandler("w:tblInd", "tableIndent"));
26811
+ const translator$r = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblLayout", "tableLayout", "w:type"));
26700
26812
  const tblLookBitmask = Object.freeze({
26701
26813
  firstRow: 32,
26702
26814
  lastRow: 64,
@@ -26715,7 +26827,7 @@ const decodeTblLookVal = (val) => {
26715
26827
  if (!Number.isFinite(numeric)) return null;
26716
26828
  return Object.fromEntries(Object.entries(tblLookBitmask).map(([key, mask]) => [key, (numeric & mask) === mask]));
26717
26829
  };
26718
- const translator$o = NodeTranslator.from({
26830
+ const translator$q = NodeTranslator.from({
26719
26831
  xmlName: "w:tblLook",
26720
26832
  sdNodeOrKeyName: "tblLook",
26721
26833
  attributes: ["w:firstColumn", "w:firstRow", "w:lastColumn", "w:lastRow", "w:noHBand", "w:noVBand"].map((attr) => createAttributeHandler(attr, null, parseBoolean, booleanToString)).concat([createAttributeHandler("w:val")]),
@@ -26735,16 +26847,16 @@ const translator$o = NodeTranslator.from({
26735
26847
  return Object.keys(decodedAttrs).length > 0 ? { attributes: decodedAttrs } : void 0;
26736
26848
  }
26737
26849
  });
26738
- const translator$n = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
26739
- const translator$m = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
26740
- const translator$l = NodeTranslator.from(
26850
+ const translator$p = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblOverlap", "overlap"));
26851
+ const translator$o = NodeTranslator.from(createSingleAttrPropertyHandler("w:tblStyle", "tableStyleId"));
26852
+ const translator$n = NodeTranslator.from(
26741
26853
  createSingleAttrPropertyHandler("w:tblStyleColBandSize", "tableStyleColBandSize")
26742
26854
  );
26743
- const translator$k = NodeTranslator.from(
26855
+ const translator$m = NodeTranslator.from(
26744
26856
  createSingleAttrPropertyHandler("w:tblStyleRowBandSize", "tableStyleRowBandSize")
26745
26857
  );
26746
- const translator$j = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
26747
- const translator$i = NodeTranslator.from({
26858
+ const translator$l = NodeTranslator.from(createMeasurementPropertyHandler("w:tblW", "tableWidth"));
26859
+ const translator$k = NodeTranslator.from({
26748
26860
  xmlName: "w:tblpPr",
26749
26861
  sdNodeOrKeyName: "floatingTableProperties",
26750
26862
  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))),
@@ -26757,22 +26869,24 @@ const translator$i = NodeTranslator.from({
26757
26869
  }
26758
26870
  });
26759
26871
  const propertyTranslators$2 = [
26872
+ translator$1t,
26873
+ translator$10,
26760
26874
  translator$1r,
26761
- translator$_,
26762
26875
  translator$1p,
26763
- translator$1n,
26764
- translator$W,
26765
- translator$1l
26876
+ translator$Y,
26877
+ translator$1n
26766
26878
  ];
26767
- const translator$h = NodeTranslator.from(
26879
+ const translator$j = NodeTranslator.from(
26768
26880
  createNestedPropertiesTranslator("w:tblCellMar", "cellMargins", propertyTranslators$2)
26769
26881
  );
26770
26882
  const propertyTranslators$1 = [
26883
+ translator$v,
26884
+ translator$1H,
26885
+ translator$2f,
26886
+ translator$u,
26887
+ translator$G,
26771
26888
  translator$t,
26772
- translator$1F,
26773
- translator$2d,
26774
26889
  translator$s,
26775
- translator$E,
26776
26890
  translator$r,
26777
26891
  translator$q,
26778
26892
  translator$p,
@@ -26781,15 +26895,13 @@ const propertyTranslators$1 = [
26781
26895
  translator$m,
26782
26896
  translator$l,
26783
26897
  translator$k,
26784
- translator$j,
26785
- translator$i,
26786
- translator$J,
26787
- translator$h
26898
+ translator$L,
26899
+ translator$j
26788
26900
  ];
26789
- const translator$g = NodeTranslator.from(
26901
+ const translator$i = NodeTranslator.from(
26790
26902
  createNestedPropertiesTranslator("w:tblPr", "tableProperties", propertyTranslators$1)
26791
26903
  );
26792
- const translator$f = NodeTranslator.from(
26904
+ const translator$h = NodeTranslator.from(
26793
26905
  createSingleAttrPropertyHandler("w:gridCol", "col", "w:w", parseInteger, integerToString)
26794
26906
  );
26795
26907
  const DEFAULT_COLUMN_WIDTH_PX = 100;
@@ -26839,24 +26951,24 @@ const resolveFallbackColumnWidthTwips = (params, totalColumns, cellMinWidthTwips
26839
26951
  }
26840
26952
  return Math.max(fallbackWidthTwips, cellMinWidthTwips);
26841
26953
  };
26842
- const XML_NODE_NAME$e = "w:tblGrid";
26954
+ const XML_NODE_NAME$g = "w:tblGrid";
26843
26955
  const SD_ATTR_KEY$1 = "grid";
26844
26956
  const cellMinWidth = pixelsToTwips(10);
26845
- const encode$t = (params) => {
26957
+ const encode$v = (params) => {
26846
26958
  const { nodes } = params;
26847
26959
  const node = nodes[0];
26848
26960
  const attributes = encodeProperties(
26849
26961
  { ...params, nodes: [node] },
26850
- { [translator$f.xmlName]: translator$f },
26962
+ { [translator$h.xmlName]: translator$h },
26851
26963
  true
26852
26964
  );
26853
26965
  return {
26854
- xmlName: XML_NODE_NAME$e,
26966
+ xmlName: XML_NODE_NAME$g,
26855
26967
  sdNodeOrKeyName: SD_ATTR_KEY$1,
26856
26968
  attributes
26857
26969
  };
26858
26970
  };
26859
- const decode$v = (params) => {
26971
+ const decode$x = (params) => {
26860
26972
  const { grid: rawGrid } = params.node.attrs || {};
26861
26973
  const grid = Array.isArray(rawGrid) ? rawGrid : [];
26862
26974
  const { firstRow = {}, preferTableGrid = false, totalColumns: requestedColumns } = params.extraParams || {};
@@ -26889,10 +27001,10 @@ const decode$v = (params) => {
26889
27001
  const roundedWidth = Math.round(numericWidth);
26890
27002
  const minimumWidth = shouldEnforceMinimum ? cellMinWidth : 1;
26891
27003
  const safeWidth = Math.max(roundedWidth, minimumWidth);
26892
- const decoded = translator$f.decode({
27004
+ const decoded = translator$h.decode({
26893
27005
  node: { type: (
26894
27006
  /** @type {string} */
26895
- translator$f.sdNodeOrKeyName
27007
+ translator$h.sdNodeOrKeyName
26896
27008
  ), attrs: { col: safeWidth } }
26897
27009
  });
26898
27010
  if (decoded) elements.push(decoded);
@@ -26922,21 +27034,21 @@ const decode$v = (params) => {
26922
27034
  pushColumn(cellWidthTwips, { enforceMinimum });
26923
27035
  }
26924
27036
  const newNode = {
26925
- name: XML_NODE_NAME$e,
27037
+ name: XML_NODE_NAME$g,
26926
27038
  attributes: {},
26927
27039
  elements
26928
27040
  };
26929
27041
  return newNode;
26930
27042
  };
26931
- const config$d = {
26932
- xmlName: XML_NODE_NAME$e,
27043
+ const config$f = {
27044
+ xmlName: XML_NODE_NAME$g,
26933
27045
  sdNodeOrKeyName: SD_ATTR_KEY$1,
26934
- encode: encode$t,
26935
- decode: decode$v
27046
+ encode: encode$v,
27047
+ decode: decode$x
26936
27048
  };
26937
- const translator$e = NodeTranslator.from(config$d);
26938
- const propertyTranslators = [translator$g, translator$L];
26939
- const translator$d = NodeTranslator.from(
27049
+ const translator$g = NodeTranslator.from(config$f);
27050
+ const propertyTranslators = [translator$i, translator$N];
27051
+ const translator$f = NodeTranslator.from(
26940
27052
  createNestedPropertiesTranslator("w:tblStylePr", "tableStyleProperties", propertyTranslators)
26941
27053
  );
26942
27054
  const DEFAULT_PAGE_WIDTH_TWIPS = 12240;
@@ -27001,21 +27113,21 @@ const buildFallbackGridForTable = ({ params, rows, tableWidth, tableWidthMeasure
27001
27113
  columnWidths: Array(columnCount).fill(fallbackColumnWidthPx)
27002
27114
  };
27003
27115
  };
27004
- const XML_NODE_NAME$d = "w:tbl";
27005
- const SD_NODE_NAME$c = "table";
27006
- const encode$s = (params, encodedAttrs) => {
27116
+ const XML_NODE_NAME$f = "w:tbl";
27117
+ const SD_NODE_NAME$e = "table";
27118
+ const encode$u = (params, encodedAttrs) => {
27007
27119
  const { nodes } = params;
27008
27120
  const node = nodes[0];
27009
27121
  const tblPr = node.elements.find((el) => el.name === "w:tblPr");
27010
27122
  if (tblPr) {
27011
- const encodedProperties = translator$g.encode({ ...params, nodes: [tblPr] });
27123
+ const encodedProperties = translator$i.encode({ ...params, nodes: [tblPr] });
27012
27124
  encodedAttrs["tableProperties"] = encodedProperties || {};
27013
27125
  } else {
27014
27126
  encodedAttrs["tableProperties"] ||= {};
27015
27127
  }
27016
27128
  const tblGrid = node.elements.find((el) => el.name === "w:tblGrid");
27017
27129
  if (tblGrid) {
27018
- encodedAttrs["grid"] = translator$e.encode({ ...params, nodes: [tblGrid] }).attributes;
27130
+ encodedAttrs["grid"] = translator$g.encode({ ...params, nodes: [tblGrid] }).attributes;
27019
27131
  }
27020
27132
  [
27021
27133
  "tableStyleId",
@@ -27081,7 +27193,7 @@ const encode$s = (params, encodedAttrs) => {
27081
27193
  const totalRows = rows.length;
27082
27194
  const activeRowSpans = totalColumns > 0 ? new Array(totalColumns).fill(0) : [];
27083
27195
  rows.forEach((row, rowIndex) => {
27084
- const result = translator$y.encode({
27196
+ const result = translator$A.encode({
27085
27197
  ...params,
27086
27198
  path: [...params.path || [], node],
27087
27199
  nodes: [row],
@@ -27139,7 +27251,7 @@ const encode$s = (params, encodedAttrs) => {
27139
27251
  attrs: encodedAttrs
27140
27252
  };
27141
27253
  };
27142
- const decode$u = (params, decodedAttrs) => {
27254
+ const decode$w = (params, decodedAttrs) => {
27143
27255
  params.node = preProcessVerticalMergeCells(params.node, params);
27144
27256
  const { node } = params;
27145
27257
  const rawGrid = node.attrs?.grid;
@@ -27153,7 +27265,7 @@ const decode$u = (params, decodedAttrs) => {
27153
27265
  };
27154
27266
  const elements = translateChildNodes({ ...params, extraParams });
27155
27267
  const firstRow = node.content?.find((n) => n.type === "tableRow");
27156
- const element = translator$e.decode({
27268
+ const element = translator$g.decode({
27157
27269
  ...params,
27158
27270
  node: { ...node, attrs: { ...node.attrs, grid } },
27159
27271
  extraParams: {
@@ -27164,7 +27276,7 @@ const decode$u = (params, decodedAttrs) => {
27164
27276
  if (element) elements.unshift(element);
27165
27277
  if (node.attrs?.tableProperties) {
27166
27278
  const properties = { ...node.attrs.tableProperties };
27167
- const element2 = translator$g.decode({
27279
+ const element2 = translator$i.decode({
27168
27280
  ...params,
27169
27281
  node: { ...node, attrs: { ...node.attrs, tableProperties: properties } }
27170
27282
  });
@@ -27226,7 +27338,7 @@ function _getReferencedTableStyles(tableStyleReference, params) {
27226
27338
  if (baseTblPr && baseTblPr.elements) {
27227
27339
  tblPr.elements = [...baseTblPr.elements, ...tblPr.elements];
27228
27340
  }
27229
- const tableProperties = translator$g.encode({ ...params, nodes: [tblPr] });
27341
+ const tableProperties = translator$i.encode({ ...params, nodes: [tblPr] });
27230
27342
  if (tableProperties) {
27231
27343
  const borders = _processTableBorders(tableProperties.borders || {});
27232
27344
  if (borders || Object.keys(borders).length) stylesToReturn.borders = borders;
@@ -27246,7 +27358,7 @@ function _getReferencedTableStyles(tableStyleReference, params) {
27246
27358
  let styleProps = {};
27247
27359
  if (tblStylePr) {
27248
27360
  styleProps = tblStylePr.reduce((acc, el) => {
27249
- acc[el.attributes["w:type"]] = translator$d.encode({ ...params, nodes: [el] });
27361
+ acc[el.attributes["w:type"]] = translator$f.encode({ ...params, nodes: [el] });
27250
27362
  return acc;
27251
27363
  }, {});
27252
27364
  }
@@ -27255,85 +27367,85 @@ function _getReferencedTableStyles(tableStyleReference, params) {
27255
27367
  ...styleProps
27256
27368
  };
27257
27369
  }
27258
- const config$c = {
27259
- xmlName: XML_NODE_NAME$d,
27260
- sdNodeOrKeyName: SD_NODE_NAME$c,
27370
+ const config$e = {
27371
+ xmlName: XML_NODE_NAME$f,
27372
+ sdNodeOrKeyName: SD_NODE_NAME$e,
27261
27373
  type: NodeTranslator.translatorTypes.NODE,
27262
- encode: encode$s,
27263
- decode: decode$u,
27374
+ encode: encode$u,
27375
+ decode: decode$w,
27264
27376
  attributes: []
27265
27377
  };
27266
- const translator$c = NodeTranslator.from(config$c);
27267
- const encode$r = (attributes) => {
27378
+ const translator$e = NodeTranslator.from(config$e);
27379
+ const encode$t = (attributes) => {
27268
27380
  return attributes["w:id"];
27269
27381
  };
27270
- const decode$t = (attrs) => {
27382
+ const decode$v = (attrs) => {
27271
27383
  return attrs.id;
27272
27384
  };
27273
27385
  const attrConfig$g = Object.freeze({
27274
27386
  xmlName: "w:id",
27275
27387
  sdName: "id",
27276
- encode: encode$r,
27277
- decode: decode$t
27388
+ encode: encode$t,
27389
+ decode: decode$v
27278
27390
  });
27279
- const encode$q = (attributes) => {
27391
+ const encode$s = (attributes) => {
27280
27392
  return attributes["w:name"];
27281
27393
  };
27282
- const decode$s = (attrs) => {
27394
+ const decode$u = (attrs) => {
27283
27395
  return attrs.name;
27284
27396
  };
27285
27397
  const attrConfig$f = Object.freeze({
27286
27398
  xmlName: "w:name",
27287
27399
  sdName: "name",
27288
- encode: encode$q,
27289
- decode: decode$s
27400
+ encode: encode$s,
27401
+ decode: decode$u
27290
27402
  });
27291
- const encode$p = (attributes) => {
27403
+ const encode$r = (attributes) => {
27292
27404
  return attributes["w:colFirst"];
27293
27405
  };
27294
- const decode$r = (attrs) => {
27406
+ const decode$t = (attrs) => {
27295
27407
  return attrs.colFirst;
27296
27408
  };
27297
27409
  const attrConfig$e = Object.freeze({
27298
27410
  xmlName: "w:colFirst",
27299
27411
  sdName: "colFirst",
27300
- encode: encode$p,
27301
- decode: decode$r
27412
+ encode: encode$r,
27413
+ decode: decode$t
27302
27414
  });
27303
- const encode$o = (attributes) => {
27415
+ const encode$q = (attributes) => {
27304
27416
  return attributes["w:colLast"];
27305
27417
  };
27306
- const decode$q = (attrs) => {
27418
+ const decode$s = (attrs) => {
27307
27419
  return attrs.colLast;
27308
27420
  };
27309
27421
  const attrConfig$d = Object.freeze({
27310
27422
  xmlName: "w:colLast",
27311
27423
  sdName: "colLast",
27312
- encode: encode$o,
27313
- decode: decode$q
27424
+ encode: encode$q,
27425
+ decode: decode$s
27314
27426
  });
27315
- const encode$n = (attributes) => {
27427
+ const encode$p = (attributes) => {
27316
27428
  return attributes["w:displacedByCustomXml"];
27317
27429
  };
27318
- const decode$p = (attrs) => {
27430
+ const decode$r = (attrs) => {
27319
27431
  return attrs.displacedByCustomXml;
27320
27432
  };
27321
27433
  const attrConfig$c = Object.freeze({
27322
27434
  xmlName: "w:displacedByCustomXml",
27323
27435
  sdName: "displacedByCustomXml",
27324
- encode: encode$n,
27325
- decode: decode$p
27436
+ encode: encode$p,
27437
+ decode: decode$r
27326
27438
  });
27327
27439
  const bookmarkStartAttrConfigs = [attrConfig$g, attrConfig$f, attrConfig$e, attrConfig$d, attrConfig$c];
27328
- const XML_NODE_NAME$c = "w:bookmarkStart";
27329
- const SD_NODE_NAME$b = "bookmarkStart";
27330
- const encode$m = (params, encodedAttrs = {}) => {
27440
+ const XML_NODE_NAME$e = "w:bookmarkStart";
27441
+ const SD_NODE_NAME$d = "bookmarkStart";
27442
+ const encode$o = (params, encodedAttrs = {}) => {
27331
27443
  return {
27332
27444
  type: "bookmarkStart",
27333
27445
  attrs: encodedAttrs
27334
27446
  };
27335
27447
  };
27336
- const decode$o = (params, decodedAttrs = {}) => {
27448
+ const decode$q = (params, decodedAttrs = {}) => {
27337
27449
  const result = {
27338
27450
  name: "w:bookmarkStart",
27339
27451
  elements: []
@@ -27343,49 +27455,49 @@ const decode$o = (params, decodedAttrs = {}) => {
27343
27455
  }
27344
27456
  return result;
27345
27457
  };
27346
- const config$b = {
27347
- xmlName: XML_NODE_NAME$c,
27348
- sdNodeOrKeyName: SD_NODE_NAME$b,
27458
+ const config$d = {
27459
+ xmlName: XML_NODE_NAME$e,
27460
+ sdNodeOrKeyName: SD_NODE_NAME$d,
27349
27461
  type: NodeTranslator.translatorTypes.NODE,
27350
- encode: encode$m,
27351
- decode: decode$o,
27462
+ encode: encode$o,
27463
+ decode: decode$q,
27352
27464
  attributes: bookmarkStartAttrConfigs
27353
27465
  };
27354
- const translator$b = NodeTranslator.from(config$b);
27355
- const encode$l = (attributes) => {
27466
+ const translator$d = NodeTranslator.from(config$d);
27467
+ const encode$n = (attributes) => {
27356
27468
  return attributes["w:id"];
27357
27469
  };
27358
- const decode$n = (attrs) => {
27470
+ const decode$p = (attrs) => {
27359
27471
  return attrs.id;
27360
27472
  };
27361
27473
  const attrConfig$b = Object.freeze({
27362
27474
  xmlName: "w:id",
27363
27475
  sdName: "id",
27364
- encode: encode$l,
27365
- decode: decode$n
27476
+ encode: encode$n,
27477
+ decode: decode$p
27366
27478
  });
27367
- const encode$k = (attributes) => {
27479
+ const encode$m = (attributes) => {
27368
27480
  return attributes["w:displacedByCustomXml"];
27369
27481
  };
27370
- const decode$m = (attrs) => {
27482
+ const decode$o = (attrs) => {
27371
27483
  return attrs.displacedByCustomXml;
27372
27484
  };
27373
27485
  const attrConfig$a = Object.freeze({
27374
27486
  xmlName: "w:displacedByCustomXml",
27375
27487
  sdName: "displacedByCustomXml",
27376
- encode: encode$k,
27377
- decode: decode$m
27488
+ encode: encode$m,
27489
+ decode: decode$o
27378
27490
  });
27379
27491
  const bookmarkEndAttrConfigs = [attrConfig$b, attrConfig$a];
27380
- const XML_NODE_NAME$b = "w:bookmarkEnd";
27381
- const SD_NODE_NAME$a = "bookmarkEnd";
27382
- const encode$j = (params, encodedAttrs = {}) => {
27492
+ const XML_NODE_NAME$d = "w:bookmarkEnd";
27493
+ const SD_NODE_NAME$c = "bookmarkEnd";
27494
+ const encode$l = (params, encodedAttrs = {}) => {
27383
27495
  return {
27384
27496
  type: "bookmarkEnd",
27385
27497
  attrs: encodedAttrs
27386
27498
  };
27387
27499
  };
27388
- const decode$l = (params, decodedAttrs = {}) => {
27500
+ const decode$n = (params, decodedAttrs = {}) => {
27389
27501
  const result = {
27390
27502
  name: "w:bookmarkEnd",
27391
27503
  elements: []
@@ -27395,27 +27507,27 @@ const decode$l = (params, decodedAttrs = {}) => {
27395
27507
  }
27396
27508
  return result;
27397
27509
  };
27398
- const config$a = {
27399
- xmlName: XML_NODE_NAME$b,
27400
- sdNodeOrKeyName: SD_NODE_NAME$a,
27510
+ const config$c = {
27511
+ xmlName: XML_NODE_NAME$d,
27512
+ sdNodeOrKeyName: SD_NODE_NAME$c,
27401
27513
  type: NodeTranslator.translatorTypes.NODE,
27402
- encode: encode$j,
27403
- decode: decode$l,
27514
+ encode: encode$l,
27515
+ decode: decode$n,
27404
27516
  attributes: bookmarkEndAttrConfigs
27405
27517
  };
27406
- const translator$a = NodeTranslator.from(config$a);
27407
- const decode$k = (attrs) => attrs?.["w:id"];
27518
+ const translator$c = NodeTranslator.from(config$c);
27519
+ const decode$m = (attrs) => attrs?.["w:id"];
27408
27520
  const attrConfig$9 = Object.freeze({
27409
27521
  xmlName: "w:id",
27410
27522
  sdName: "w:id",
27411
27523
  // We do not translate it from 'w:id' to 'id' when encoding, so the name is the same
27412
27524
  encode: () => {
27413
27525
  },
27414
- decode: decode$k
27526
+ decode: decode$m
27415
27527
  });
27416
- const XML_NODE_NAME$a = "w:commentRange";
27417
- const SD_NODE_NAME$9 = "commentRange";
27418
- const decode$j = (params) => {
27528
+ const XML_NODE_NAME$c = "w:commentRange";
27529
+ const SD_NODE_NAME$b = "commentRange";
27530
+ const decode$l = (params) => {
27419
27531
  const { node, comments, commentsExportType, exportedCommentDefs } = params;
27420
27532
  if (!node) return;
27421
27533
  if (!comments) return;
@@ -27456,10 +27568,10 @@ const getCommentSchema = (type, commentIndex) => {
27456
27568
  };
27457
27569
  };
27458
27570
  const getConfig = (type) => {
27459
- const sdName = `${SD_NODE_NAME$9}${type}`;
27571
+ const sdName = `${SD_NODE_NAME$b}${type}`;
27460
27572
  const isStart = type === "Start";
27461
27573
  return {
27462
- xmlName: `${XML_NODE_NAME$a}${type}`,
27574
+ xmlName: `${XML_NODE_NAME$c}${type}`,
27463
27575
  sdNodeOrKeyName: sdName,
27464
27576
  type: NodeTranslator.translatorTypes.NODE,
27465
27577
  encode: ({ nodes }) => {
@@ -27471,84 +27583,84 @@ const getConfig = (type) => {
27471
27583
  attrs
27472
27584
  };
27473
27585
  },
27474
- decode: decode$j,
27586
+ decode: decode$l,
27475
27587
  attributes: [attrConfig$9]
27476
27588
  };
27477
27589
  };
27478
27590
  const commentRangeStartTranslator = NodeTranslator.from(getConfig("Start"));
27479
27591
  const commentRangeEndTranslator = NodeTranslator.from(getConfig("End"));
27480
- const encode$i = (attributes) => {
27592
+ const encode$k = (attributes) => {
27481
27593
  return attributes["w:id"];
27482
27594
  };
27483
- const decode$i = (attrs) => {
27595
+ const decode$k = (attrs) => {
27484
27596
  return attrs.id;
27485
27597
  };
27486
27598
  const attrConfig$8 = Object.freeze({
27487
27599
  xmlName: "w:id",
27488
27600
  sdName: "id",
27489
- encode: encode$i,
27490
- decode: decode$i
27601
+ encode: encode$k,
27602
+ decode: decode$k
27491
27603
  });
27492
- const encode$h = (attributes) => {
27604
+ const encode$j = (attributes) => {
27493
27605
  return attributes["w:edGrp"];
27494
27606
  };
27495
- const decode$h = (attrs) => {
27607
+ const decode$j = (attrs) => {
27496
27608
  return attrs.edGrp;
27497
27609
  };
27498
27610
  const attrConfig$7 = Object.freeze({
27499
27611
  xmlName: "w:edGrp",
27500
27612
  sdName: "edGrp",
27501
- encode: encode$h,
27502
- decode: decode$h
27613
+ encode: encode$j,
27614
+ decode: decode$j
27503
27615
  });
27504
- const encode$g = (attributes) => {
27616
+ const encode$i = (attributes) => {
27505
27617
  return attributes["w:ed"];
27506
27618
  };
27507
- const decode$g = (attrs) => {
27619
+ const decode$i = (attrs) => {
27508
27620
  return attrs.ed;
27509
27621
  };
27510
27622
  const attrConfig$6 = Object.freeze({
27511
27623
  xmlName: "w:ed",
27512
27624
  sdName: "ed",
27513
- encode: encode$g,
27514
- decode: decode$g
27625
+ encode: encode$i,
27626
+ decode: decode$i
27515
27627
  });
27516
- const encode$f = (attributes) => {
27628
+ const encode$h = (attributes) => {
27517
27629
  return parseInteger(attributes["w:colFirst"]);
27518
27630
  };
27519
- const decode$f = (attrs) => {
27631
+ const decode$h = (attrs) => {
27520
27632
  return integerToString(attrs.colFirst);
27521
27633
  };
27522
27634
  const attrConfig$5 = Object.freeze({
27523
27635
  xmlName: "w:colFirst",
27524
27636
  sdName: "colFirst",
27525
- encode: encode$f,
27526
- decode: decode$f
27637
+ encode: encode$h,
27638
+ decode: decode$h
27527
27639
  });
27528
- const encode$e = (attributes) => {
27640
+ const encode$g = (attributes) => {
27529
27641
  return parseInteger(attributes["w:colLast"]);
27530
27642
  };
27531
- const decode$e = (attrs) => {
27643
+ const decode$g = (attrs) => {
27532
27644
  return integerToString(attrs.colLast);
27533
27645
  };
27534
27646
  const attrConfig$4 = Object.freeze({
27535
27647
  xmlName: "w:colLast",
27536
27648
  sdName: "colLast",
27537
- encode: encode$e,
27538
- decode: decode$e
27649
+ encode: encode$g,
27650
+ decode: decode$g
27539
27651
  });
27540
27652
  const validXmlAttributes$4 = [attrConfig$8, attrConfig$7, attrConfig$6, attrConfig$5, attrConfig$4];
27541
- const XML_NODE_NAME$9 = "w:permStart";
27542
- const SD_NODE_NAME$8 = "permStart";
27543
- const encode$d = (params, encodedAttrs = {}) => {
27653
+ const XML_NODE_NAME$b = "w:permStart";
27654
+ const SD_NODE_NAME$a = "permStart";
27655
+ const encode$f = (params, encodedAttrs = {}) => {
27544
27656
  return {
27545
27657
  type: "permStart",
27546
27658
  attrs: encodedAttrs
27547
27659
  };
27548
27660
  };
27549
- const decode$d = (params, decodedAttrs = {}) => {
27661
+ const decode$f = (params, decodedAttrs = {}) => {
27550
27662
  const result = {
27551
- name: XML_NODE_NAME$9,
27663
+ name: XML_NODE_NAME$b,
27552
27664
  elements: []
27553
27665
  };
27554
27666
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -27556,51 +27668,51 @@ const decode$d = (params, decodedAttrs = {}) => {
27556
27668
  }
27557
27669
  return result;
27558
27670
  };
27559
- const config$9 = {
27560
- xmlName: XML_NODE_NAME$9,
27561
- sdNodeOrKeyName: SD_NODE_NAME$8,
27671
+ const config$b = {
27672
+ xmlName: XML_NODE_NAME$b,
27673
+ sdNodeOrKeyName: SD_NODE_NAME$a,
27562
27674
  type: NodeTranslator.translatorTypes.NODE,
27563
- encode: encode$d,
27564
- decode: decode$d,
27675
+ encode: encode$f,
27676
+ decode: decode$f,
27565
27677
  attributes: validXmlAttributes$4
27566
27678
  };
27567
- const translator$9 = NodeTranslator.from(config$9);
27568
- const encode$c = (attributes) => {
27679
+ const translator$b = NodeTranslator.from(config$b);
27680
+ const encode$e = (attributes) => {
27569
27681
  return attributes["w:id"];
27570
27682
  };
27571
- const decode$c = (attrs) => {
27683
+ const decode$e = (attrs) => {
27572
27684
  return attrs.id;
27573
27685
  };
27574
27686
  const attrConfig$3 = Object.freeze({
27575
27687
  xmlName: "w:id",
27576
27688
  sdName: "id",
27577
- encode: encode$c,
27578
- decode: decode$c
27689
+ encode: encode$e,
27690
+ decode: decode$e
27579
27691
  });
27580
- const encode$b = (attributes) => {
27692
+ const encode$d = (attributes) => {
27581
27693
  return attributes["w:displacedByCustomXml"];
27582
27694
  };
27583
- const decode$b = (attrs) => {
27695
+ const decode$d = (attrs) => {
27584
27696
  return attrs.displacedByCustomXml;
27585
27697
  };
27586
27698
  const attrConfig$2 = Object.freeze({
27587
27699
  xmlName: "w:displacedByCustomXml",
27588
27700
  sdName: "displacedByCustomXml",
27589
- encode: encode$b,
27590
- decode: decode$b
27701
+ encode: encode$d,
27702
+ decode: decode$d
27591
27703
  });
27592
27704
  const validXmlAttributes$3 = [attrConfig$3, attrConfig$2];
27593
- const XML_NODE_NAME$8 = "w:permEnd";
27594
- const SD_NODE_NAME$7 = "permEnd";
27595
- const encode$a = (params, encodedAttrs = {}) => {
27705
+ const XML_NODE_NAME$a = "w:permEnd";
27706
+ const SD_NODE_NAME$9 = "permEnd";
27707
+ const encode$c = (params, encodedAttrs = {}) => {
27596
27708
  return {
27597
27709
  type: "permEnd",
27598
27710
  attrs: encodedAttrs
27599
27711
  };
27600
27712
  };
27601
- const decode$a = (params, decodedAttrs = {}) => {
27713
+ const decode$c = (params, decodedAttrs = {}) => {
27602
27714
  const result = {
27603
- name: XML_NODE_NAME$8,
27715
+ name: XML_NODE_NAME$a,
27604
27716
  elements: []
27605
27717
  };
27606
27718
  if (decodedAttrs && Object.keys(decodedAttrs).length) {
@@ -27608,18 +27720,18 @@ const decode$a = (params, decodedAttrs = {}) => {
27608
27720
  }
27609
27721
  return result;
27610
27722
  };
27611
- const config$8 = {
27612
- xmlName: XML_NODE_NAME$8,
27613
- sdNodeOrKeyName: SD_NODE_NAME$7,
27723
+ const config$a = {
27724
+ xmlName: XML_NODE_NAME$a,
27725
+ sdNodeOrKeyName: SD_NODE_NAME$9,
27614
27726
  type: NodeTranslator.translatorTypes.NODE,
27615
- encode: encode$a,
27616
- decode: decode$a,
27727
+ encode: encode$c,
27728
+ decode: decode$c,
27617
27729
  attributes: validXmlAttributes$3
27618
27730
  };
27619
- const translator$8 = NodeTranslator.from(config$8);
27620
- const XML_NODE_NAME$7 = "sd:pageReference";
27621
- const SD_NODE_NAME$6 = "pageReference";
27622
- const encode$9 = (params) => {
27731
+ const translator$a = NodeTranslator.from(config$a);
27732
+ const XML_NODE_NAME$9 = "sd:pageReference";
27733
+ const SD_NODE_NAME$8 = "pageReference";
27734
+ const encode$b = (params) => {
27623
27735
  const { nodes = [], nodeListHandler } = params || {};
27624
27736
  const node = nodes[0];
27625
27737
  const processedText = nodeListHandler.handler({
@@ -27636,7 +27748,7 @@ const encode$9 = (params) => {
27636
27748
  };
27637
27749
  return processedNode;
27638
27750
  };
27639
- const decode$9 = (params) => {
27751
+ const decode$b = (params) => {
27640
27752
  const { node } = params;
27641
27753
  const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
27642
27754
  const contentNodes = (node.content ?? []).flatMap((n) => exportSchemaToJson({ ...params, node: n }));
@@ -27709,17 +27821,17 @@ const decode$9 = (params) => {
27709
27821
  ];
27710
27822
  return translated;
27711
27823
  };
27712
- const config$7 = {
27713
- xmlName: XML_NODE_NAME$7,
27714
- sdNodeOrKeyName: SD_NODE_NAME$6,
27824
+ const config$9 = {
27825
+ xmlName: XML_NODE_NAME$9,
27826
+ sdNodeOrKeyName: SD_NODE_NAME$8,
27715
27827
  type: NodeTranslator.translatorTypes.NODE,
27716
- encode: encode$9,
27717
- decode: decode$9
27828
+ encode: encode$b,
27829
+ decode: decode$b
27718
27830
  };
27719
- const translator$7 = NodeTranslator.from(config$7);
27720
- const XML_NODE_NAME$6 = "sd:tableOfContents";
27721
- const SD_NODE_NAME$5 = "tableOfContents";
27722
- const encode$8 = (params) => {
27831
+ const translator$9 = NodeTranslator.from(config$9);
27832
+ const XML_NODE_NAME$8 = "sd:tableOfContents";
27833
+ const SD_NODE_NAME$7 = "tableOfContents";
27834
+ const encode$a = (params) => {
27723
27835
  const { nodes = [], nodeListHandler } = params || {};
27724
27836
  const node = nodes[0];
27725
27837
  const processedContent = nodeListHandler.handler({
@@ -27735,7 +27847,7 @@ const encode$8 = (params) => {
27735
27847
  };
27736
27848
  return processedNode;
27737
27849
  };
27738
- const decode$8 = (params) => {
27850
+ const decode$a = (params) => {
27739
27851
  const { node } = params;
27740
27852
  const contentNodes = node.content.map((n) => exportSchemaToJson({ ...params, node: n }));
27741
27853
  const tocBeginElements = [
@@ -27782,6 +27894,188 @@ const decode$8 = (params) => {
27782
27894
  }
27783
27895
  return contentNodes;
27784
27896
  };
27897
+ const config$8 = {
27898
+ xmlName: XML_NODE_NAME$8,
27899
+ sdNodeOrKeyName: SD_NODE_NAME$7,
27900
+ type: NodeTranslator.translatorTypes.NODE,
27901
+ encode: encode$a,
27902
+ decode: decode$a
27903
+ };
27904
+ const translator$8 = NodeTranslator.from(config$8);
27905
+ const buildInstructionElements = (instruction, instructionTokens) => {
27906
+ const tokens = Array.isArray(instructionTokens) ? instructionTokens : [];
27907
+ if (tokens.length > 0) {
27908
+ return tokens.map((token) => {
27909
+ if (token?.type === "tab") {
27910
+ return { name: "w:tab", elements: [] };
27911
+ }
27912
+ const text = token?.text ?? "";
27913
+ return {
27914
+ name: "w:instrText",
27915
+ attributes: { "xml:space": "preserve" },
27916
+ elements: [{ type: "text", text }]
27917
+ };
27918
+ });
27919
+ }
27920
+ return [
27921
+ {
27922
+ name: "w:instrText",
27923
+ attributes: { "xml:space": "preserve" },
27924
+ elements: [{ type: "text", text: instruction ?? "" }]
27925
+ }
27926
+ ];
27927
+ };
27928
+ const XML_NODE_NAME$7 = "sd:index";
27929
+ const SD_NODE_NAME$6 = "index";
27930
+ const encode$9 = (params) => {
27931
+ const { nodes = [], nodeListHandler } = params || {};
27932
+ const node = nodes[0];
27933
+ const processedContent = nodeListHandler.handler({
27934
+ ...params,
27935
+ nodes: node.elements || []
27936
+ });
27937
+ return {
27938
+ type: "index",
27939
+ attrs: {
27940
+ instruction: node.attributes?.instruction || "",
27941
+ instructionTokens: node.attributes?.instructionTokens || null
27942
+ },
27943
+ content: processedContent
27944
+ };
27945
+ };
27946
+ const decode$9 = (params) => {
27947
+ const { node } = params;
27948
+ const contentNodes = (node.content ?? []).map((n) => exportSchemaToJson({ ...params, node: n }));
27949
+ const instructionElements = buildInstructionElements(node.attrs?.instruction, node.attrs?.instructionTokens);
27950
+ const indexBeginElements = [
27951
+ {
27952
+ name: "w:r",
27953
+ elements: [{ name: "w:fldChar", attributes: { "w:fldCharType": "begin" }, elements: [] }]
27954
+ },
27955
+ {
27956
+ name: "w:r",
27957
+ elements: instructionElements
27958
+ },
27959
+ { name: "w:r", elements: [{ name: "w:fldChar", attributes: { "w:fldCharType": "separate" }, elements: [] }] }
27960
+ ];
27961
+ if (contentNodes.length > 0) {
27962
+ const firstParagraph = contentNodes[0];
27963
+ let insertIndex = 0;
27964
+ if (firstParagraph.elements) {
27965
+ const pPrIndex = firstParagraph.elements.findIndex((el) => el.name === "w:pPr");
27966
+ insertIndex = pPrIndex >= 0 ? pPrIndex + 1 : 0;
27967
+ } else {
27968
+ firstParagraph.elements = [];
27969
+ }
27970
+ firstParagraph.elements.splice(insertIndex, 0, ...indexBeginElements);
27971
+ } else {
27972
+ contentNodes.push({
27973
+ name: "w:p",
27974
+ elements: indexBeginElements
27975
+ });
27976
+ }
27977
+ const indexEndElements = [
27978
+ { name: "w:r", elements: [{ name: "w:fldChar", attributes: { "w:fldCharType": "end" }, elements: [] }] }
27979
+ ];
27980
+ const lastParagraph = contentNodes[contentNodes.length - 1];
27981
+ if (lastParagraph.elements) {
27982
+ lastParagraph.elements.push(...indexEndElements);
27983
+ } else {
27984
+ lastParagraph.elements = [...indexEndElements];
27985
+ }
27986
+ return contentNodes;
27987
+ };
27988
+ const config$7 = {
27989
+ xmlName: XML_NODE_NAME$7,
27990
+ sdNodeOrKeyName: SD_NODE_NAME$6,
27991
+ type: NodeTranslator.translatorTypes.NODE,
27992
+ encode: encode$9,
27993
+ decode: decode$9
27994
+ };
27995
+ const translator$7 = NodeTranslator.from(config$7);
27996
+ const XML_NODE_NAME$6 = "sd:indexEntry";
27997
+ const SD_NODE_NAME$5 = "indexEntry";
27998
+ const encode$8 = (params) => {
27999
+ const { nodes = [], nodeListHandler } = params || {};
28000
+ const node = nodes[0];
28001
+ const processedText = nodeListHandler.handler({
28002
+ ...params,
28003
+ nodes: node.elements
28004
+ });
28005
+ return {
28006
+ type: "indexEntry",
28007
+ attrs: {
28008
+ instruction: node.attributes?.instruction || "",
28009
+ instructionTokens: node.attributes?.instructionTokens || null,
28010
+ marksAsAttrs: node.marks || []
28011
+ },
28012
+ content: processedText
28013
+ };
28014
+ };
28015
+ const decode$8 = (params) => {
28016
+ const { node } = params;
28017
+ const outputMarks = processOutputMarks(node.attrs?.marksAsAttrs || []);
28018
+ const contentNodes = (node.content ?? []).flatMap((n) => exportSchemaToJson({ ...params, node: n }));
28019
+ const instructionElements = buildInstructionElements(node.attrs?.instruction, node.attrs?.instructionTokens);
28020
+ return [
28021
+ {
28022
+ name: "w:r",
28023
+ elements: [
28024
+ {
28025
+ name: "w:rPr",
28026
+ elements: outputMarks
28027
+ },
28028
+ {
28029
+ name: "w:fldChar",
28030
+ attributes: {
28031
+ "w:fldCharType": "begin"
28032
+ }
28033
+ }
28034
+ ]
28035
+ },
28036
+ {
28037
+ name: "w:r",
28038
+ elements: [
28039
+ {
28040
+ name: "w:rPr",
28041
+ elements: outputMarks
28042
+ },
28043
+ ...instructionElements
28044
+ ]
28045
+ },
28046
+ {
28047
+ name: "w:r",
28048
+ elements: [
28049
+ {
28050
+ name: "w:rPr",
28051
+ elements: outputMarks
28052
+ },
28053
+ {
28054
+ name: "w:fldChar",
28055
+ attributes: {
28056
+ "w:fldCharType": "separate"
28057
+ }
28058
+ }
28059
+ ]
28060
+ },
28061
+ ...contentNodes,
28062
+ {
28063
+ name: "w:r",
28064
+ elements: [
28065
+ {
28066
+ name: "w:rPr",
28067
+ elements: outputMarks
28068
+ },
28069
+ {
28070
+ name: "w:fldChar",
28071
+ attributes: {
28072
+ "w:fldCharType": "end"
28073
+ }
28074
+ }
28075
+ ]
28076
+ }
28077
+ ];
28078
+ };
27785
28079
  const config$6 = {
27786
28080
  xmlName: XML_NODE_NAME$6,
27787
28081
  sdNodeOrKeyName: SD_NODE_NAME$5,
@@ -28029,7 +28323,7 @@ function handleVRectImport({ pNode, pict, params }) {
28029
28323
  if (isHorizontalRule) {
28030
28324
  schemaAttrs.horizontalRule = true;
28031
28325
  }
28032
- const pElement = translator$15.encode({
28326
+ const pElement = translator$17.encode({
28033
28327
  ...params,
28034
28328
  nodes: [{ ...pNode, elements: pNode.elements.filter((el) => el.name !== "w:r") }]
28035
28329
  });
@@ -28089,7 +28383,7 @@ const handleDrawingNode = (params) => {
28089
28383
  return { nodes: [], consumed: 0 };
28090
28384
  }
28091
28385
  const translatorParams = { ...params, nodes: [node] };
28092
- const schemaNode = translator$v.encode(translatorParams);
28386
+ const schemaNode = translator$x.encode(translatorParams);
28093
28387
  const newNodes = schemaNode ? [schemaNode] : [];
28094
28388
  return { nodes: newNodes, consumed: 1 };
28095
28389
  };
@@ -28217,7 +28511,7 @@ const handleTrackChangeNode = (params) => {
28217
28511
  });
28218
28512
  break;
28219
28513
  case "w:ins":
28220
- result = translator$1z.encode({
28514
+ result = translator$1B.encode({
28221
28515
  ...translatorParams,
28222
28516
  extraParams: {
28223
28517
  ...translatorParams.extraParams,
@@ -28232,8 +28526,8 @@ const trackChangeNodeHandlerEntity = {
28232
28526
  handlerName: "trackChangeNodeHandler",
28233
28527
  handler: handleTrackChangeNode
28234
28528
  };
28235
- const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$14);
28236
- const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$13);
28529
+ const hyperlinkNodeHandlerEntity = generateV2HandlerEntity("hyperlinkNodeHandler", translator$16);
28530
+ const runNodeHandlerEntity = generateV2HandlerEntity("runNodeHandler", translator$15);
28237
28531
  const XML_NODE_NAME$2 = "w:t";
28238
28532
  const SD_NODE_NAME$2 = "text";
28239
28533
  const validXmlAttributes$1 = [createAttributeHandler("xml:space", "xmlSpace")];
@@ -28278,12 +28572,12 @@ const decode$4 = (params) => {
28278
28572
  case "trackDelete":
28279
28573
  return translator$3.decode(params);
28280
28574
  case "trackInsert":
28281
- return translator$1z.decode(params);
28575
+ return translator$1B.decode(params);
28282
28576
  }
28283
28577
  }
28284
28578
  const isLinkNode = node.marks?.some((m2) => m2.type === "link");
28285
28579
  if (isLinkNode && !extraParams?.linkProcessed) {
28286
- return translator$14.decode(params);
28580
+ return translator$16.decode(params);
28287
28581
  }
28288
28582
  const { text, marks = [] } = node;
28289
28583
  return getTextNodeForExport(text, marks, params);
@@ -28325,7 +28619,7 @@ const handleParagraphNode = (params) => {
28325
28619
  if (nodes.length === 0 || nodes[0].name !== "w:p") {
28326
28620
  return { nodes: [], consumed: 0 };
28327
28621
  }
28328
- const schemaNode = translator$15.encode(params);
28622
+ const schemaNode = translator$17.encode(params);
28329
28623
  const newNodes = schemaNode ? [schemaNode] : [];
28330
28624
  return { nodes: newNodes, consumed: 1 };
28331
28625
  };
@@ -28338,7 +28632,7 @@ const handleSdtNode = (params) => {
28338
28632
  if (nodes.length === 0 || nodes[0].name !== "w:sdt") {
28339
28633
  return { nodes: [], consumed: 0 };
28340
28634
  }
28341
- const result = translator$u.encode(params);
28635
+ const result = translator$w.encode(params);
28342
28636
  if (!result) {
28343
28637
  return { nodes: [], consumed: 0 };
28344
28638
  }
@@ -28404,153 +28698,155 @@ const config$1 = {
28404
28698
  const translator$1 = NodeTranslator.from(config$1);
28405
28699
  const translatorList = Array.from(
28406
28700
  /* @__PURE__ */ new Set([
28407
- translator$1P,
28701
+ translator$1R,
28702
+ translator$9,
28703
+ translator$8,
28408
28704
  translator$7,
28409
28705
  translator$6,
28410
28706
  translator$5,
28411
28707
  translator$4,
28708
+ translator$1Q,
28709
+ translator$1P,
28412
28710
  translator$1O,
28413
- translator$1N,
28414
- translator$1M,
28711
+ translator$2s,
28712
+ translator$1w,
28713
+ translator$2r,
28415
28714
  translator$2q,
28715
+ translator$v,
28716
+ translator$c,
28717
+ translator$d,
28416
28718
  translator$1u,
28417
- translator$2p,
28418
- translator$2o,
28419
- translator$t,
28420
- translator$a,
28421
- translator$b,
28422
- translator$1s,
28423
- translator$2t,
28424
- translator$I,
28425
- translator$2e,
28719
+ translator$2v,
28720
+ translator$K,
28721
+ translator$2g,
28722
+ translator$1M,
28723
+ translator$2l,
28724
+ translator$1L,
28725
+ translator$1V,
28726
+ translator$3,
28426
28727
  translator$1K,
28427
- translator$2j,
28728
+ translator$x,
28729
+ translator$2m,
28730
+ translator$1X,
28731
+ translator$21,
28732
+ translator$20,
28733
+ translator$29,
28734
+ translator$11,
28735
+ translator$1,
28736
+ translator$1Y,
28428
28737
  translator$1J,
28429
- translator$1T,
28430
- translator$3,
28738
+ translator$J,
28739
+ translator$I,
28740
+ translator$h,
28741
+ translator$13,
28742
+ translator$P,
28743
+ translator$O,
28744
+ translator$H,
28745
+ translator$Q,
28746
+ translator$2u,
28747
+ translator$16,
28748
+ translator$2p,
28749
+ translator$1U,
28750
+ translator$1C,
28431
28751
  translator$1I,
28432
- translator$v,
28433
- translator$2k,
28434
- translator$1V,
28435
- translator$1$,
28436
- translator$1_,
28437
- translator$27,
28752
+ translator$28,
28753
+ translator$1B,
28438
28754
  translator$$,
28439
- translator$1,
28440
- translator$1W,
28755
+ translator$_,
28441
28756
  translator$1H,
28442
- translator$H,
28443
- translator$G,
28444
- translator$f,
28445
- translator$11,
28446
- translator$N,
28447
- translator$M,
28448
- translator$F,
28449
- translator$O,
28450
- translator$2s,
28451
- translator$14,
28452
- translator$2n,
28453
- translator$1S,
28454
- translator$1A,
28455
28757
  translator$1G,
28456
- translator$26,
28457
- translator$1z,
28458
- translator$Z,
28459
- translator$Y,
28460
28758
  translator$1F,
28759
+ translator$1_,
28461
28760
  translator$1E,
28761
+ translator$2e,
28762
+ translator$1s,
28462
28763
  translator$1D,
28463
- translator$1Y,
28464
- translator$1C,
28465
- translator$2c,
28466
- translator$1q,
28467
- translator$1B,
28764
+ translator$27,
28765
+ translator$U,
28766
+ translator$1A,
28767
+ translator$1z,
28468
28768
  translator$25,
28469
- translator$S,
28470
28769
  translator$1y,
28471
28770
  translator$1x,
28472
- translator$23,
28473
- translator$1w,
28474
- translator$1v,
28475
- translator$24,
28476
- translator$15,
28477
- translator$1i,
28771
+ translator$26,
28772
+ translator$17,
28478
28773
  translator$1k,
28479
- translator$1X,
28480
- translator$16,
28774
+ translator$1m,
28775
+ translator$1Z,
28776
+ translator$18,
28777
+ translator$1l,
28778
+ translator$b,
28779
+ translator$a,
28780
+ translator$15,
28781
+ translator$2k,
28782
+ translator$1S,
28783
+ translator$2j,
28784
+ translator$1W,
28785
+ translator$1q,
28786
+ translator$w,
28787
+ translator$24,
28788
+ translator$2f,
28789
+ translator$2b,
28790
+ translator$2a,
28481
28791
  translator$1j,
28482
- translator$9,
28483
- translator$8,
28484
- translator$13,
28485
- translator$2i,
28486
- translator$1Q,
28487
- translator$2h,
28488
- translator$1U,
28489
- translator$1o,
28490
- translator$u,
28491
- translator$22,
28492
- translator$2d,
28493
- translator$29,
28494
- translator$28,
28792
+ translator$1i,
28495
28793
  translator$1h,
28496
28794
  translator$1g,
28497
- translator$1f,
28498
- translator$1e,
28499
- translator$20,
28500
- translator$X,
28501
- translator$2l,
28502
- translator$2g,
28503
- translator$2f,
28795
+ translator$22,
28796
+ translator$Z,
28797
+ translator$2n,
28798
+ translator$2i,
28799
+ translator$2h,
28504
28800
  translator$2,
28505
- translator$2r,
28506
- translator$1d,
28507
- translator$c,
28508
- translator$J,
28801
+ translator$2t,
28802
+ translator$1f,
28803
+ translator$e,
28804
+ translator$L,
28805
+ translator$u,
28806
+ translator$j,
28807
+ translator$G,
28808
+ translator$t,
28809
+ translator$g,
28810
+ translator$F,
28509
28811
  translator$s,
28510
- translator$h,
28511
- translator$E,
28512
28812
  translator$r,
28513
- translator$e,
28514
- translator$D,
28515
28813
  translator$q,
28516
28814
  translator$p,
28815
+ translator$i,
28517
28816
  translator$o,
28518
28817
  translator$n,
28519
- translator$g,
28520
28818
  translator$m,
28521
28819
  translator$l,
28522
28820
  translator$k,
28523
- translator$j,
28524
- translator$i,
28525
- translator$K,
28821
+ translator$M,
28822
+ translator$V,
28823
+ translator$S,
28526
28824
  translator$T,
28527
- translator$Q,
28825
+ translator$N,
28826
+ translator$14,
28827
+ translator$1d,
28828
+ translator$X,
28829
+ translator$A,
28830
+ translator$W,
28831
+ translator$E,
28832
+ translator$B,
28833
+ translator$1e,
28834
+ translator$1c,
28835
+ translator$1b,
28836
+ translator$1o,
28837
+ translator$2o,
28528
28838
  translator$R,
28529
- translator$L,
28839
+ translator$23,
28840
+ translator$2c,
28530
28841
  translator$12,
28531
- translator$1b,
28532
- translator$V,
28533
- translator$y,
28534
- translator$U,
28842
+ translator$1$,
28843
+ translator$D,
28535
28844
  translator$C,
28536
- translator$z,
28537
- translator$1c,
28845
+ translator$1T,
28538
28846
  translator$1a,
28539
28847
  translator$19,
28540
- translator$1m,
28541
- translator$2m,
28542
- translator$P,
28543
- translator$21,
28544
- translator$2a,
28545
- translator$10,
28546
- translator$1Z,
28547
- translator$B,
28548
- translator$A,
28549
- translator$1R,
28550
- translator$18,
28551
- translator$17,
28552
- translator$x,
28553
- translator$w,
28848
+ translator$z,
28849
+ translator$y,
28554
28850
  commentRangeStartTranslator,
28555
28851
  commentRangeEndTranslator
28556
28852
  ])
@@ -28655,7 +28951,7 @@ const handler = (params) => {
28655
28951
  if (nodes.length === 0 || nodes[0].name !== "w:br") {
28656
28952
  return { nodes: [], consumed: 0 };
28657
28953
  }
28658
- const result = translator$2t.encode(params);
28954
+ const result = translator$2v.encode(params);
28659
28955
  if (!result) return { nodes: [], consumed: 0 };
28660
28956
  return {
28661
28957
  nodes: [result],
@@ -28703,7 +28999,7 @@ const handleBookmarkNode = (params) => {
28703
28999
  consumed: translatedText.length + 2
28704
29000
  };
28705
29001
  }
28706
- const encoded = translator$b.encode({ ...params, nodes: [node] });
29002
+ const encoded = translator$d.encode({ ...params, nodes: [node] });
28707
29003
  if (!encoded) {
28708
29004
  return { nodes: [], consumed: 0 };
28709
29005
  }
@@ -28717,7 +29013,7 @@ const handleBookmarkStartNode = (params) => {
28717
29013
  if (isCustomMarkBookmark(nodes[0], params.editor)) {
28718
29014
  return handleBookmarkNode(params);
28719
29015
  }
28720
- const node = translator$b.encode(params);
29016
+ const node = translator$d.encode(params);
28721
29017
  if (!node) return { nodes: [], consumed: 0 };
28722
29018
  return { nodes: [node], consumed: 1 };
28723
29019
  };
@@ -28749,7 +29045,7 @@ const handleBookmarkEndNode = (params) => {
28749
29045
  if (!nodes.length || nodes[0].name !== "w:bookmarkEnd") {
28750
29046
  return { nodes: [], consumed: 0 };
28751
29047
  }
28752
- const node = translator$a.encode(params);
29048
+ const node = translator$c.encode(params);
28753
29049
  if (!node) return { nodes: [], consumed: 0 };
28754
29050
  return { nodes: [node], consumed: 1 };
28755
29051
  };
@@ -28799,7 +29095,7 @@ const handleAlternateChoice = (params) => {
28799
29095
  ...currentNode,
28800
29096
  type: "element"
28801
29097
  };
28802
- const translated = translator$1P.encode({
29098
+ const translated = translator$1R.encode({
28803
29099
  ...params,
28804
29100
  nodes: [nodeForTranslator],
28805
29101
  extraParams: { ...params.extraParams || {}, node: nodeForTranslator }
@@ -28827,7 +29123,7 @@ const alternateChoiceHandler = {
28827
29123
  };
28828
29124
  const autoPageHandlerEntity = generateV2HandlerEntity("autoPageNumberHandler", translator$5);
28829
29125
  const autoTotalPageCountEntity = generateV2HandlerEntity("autoTotalPageCountEntity", translator$4);
28830
- const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$7);
29126
+ const pageReferenceEntity = generateV2HandlerEntity("pageReferenceNodeHandler", translator$9);
28831
29127
  const handlePictNode = (params) => {
28832
29128
  const { nodes } = params;
28833
29129
  if (!nodes.length || nodes[0].name !== "w:p") {
@@ -29797,7 +30093,7 @@ const handleTabNode = (params) => {
29797
30093
  if (!nodes.length || nodes[0].name !== "w:tab") {
29798
30094
  return { nodes: [], consumed: 0 };
29799
30095
  }
29800
- const node = translator$2r.encode(params);
30096
+ const node = translator$2t.encode(params);
29801
30097
  return { nodes: [node], consumed: 1 };
29802
30098
  };
29803
30099
  const tabNodeEntityHandler = {
@@ -29805,8 +30101,10 @@ const tabNodeEntityHandler = {
29805
30101
  handler: handleTabNode
29806
30102
  };
29807
30103
  const footnoteReferenceHandlerEntity = generateV2HandlerEntity("footnoteReferenceHandler", translator$1);
29808
- const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$c);
29809
- const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$6);
30104
+ const tableNodeHandlerEntity = generateV2HandlerEntity("tableNodeHandler", translator$e);
30105
+ const tableOfContentsHandlerEntity = generateV2HandlerEntity("tableOfContentsHandler", translator$8);
30106
+ const indexHandlerEntity = generateV2HandlerEntity("indexHandler", translator$7);
30107
+ const indexEntryHandlerEntity = generateV2HandlerEntity("indexEntryHandler", translator$6);
29810
30108
  const commentRangeStartHandlerEntity = generateV2HandlerEntity(
29811
30109
  "commentRangeStartHandler",
29812
30110
  commentRangeStartTranslator
@@ -29815,8 +30113,8 @@ const commentRangeEndHandlerEntity = generateV2HandlerEntity(
29815
30113
  "commentRangeEndHandler",
29816
30114
  commentRangeEndTranslator
29817
30115
  );
29818
- const permStartHandlerEntity = generateV2HandlerEntity("permStartHandler", translator$9);
29819
- const permEndHandlerEntity = generateV2HandlerEntity("permEndHandler", translator$8);
30116
+ const permStartHandlerEntity = generateV2HandlerEntity("permStartHandler", translator$b);
30117
+ const permEndHandlerEntity = generateV2HandlerEntity("permEndHandler", translator$a);
29820
30118
  const detectDocumentOrigin = (docx) => {
29821
30119
  const commentsExtended = docx["word/commentsExtended.xml"];
29822
30120
  if (commentsExtended) {
@@ -29956,6 +30254,8 @@ const defaultNodeListHandler = () => {
29956
30254
  footnoteReferenceHandlerEntity,
29957
30255
  tabNodeEntityHandler,
29958
30256
  tableOfContentsHandlerEntity,
30257
+ indexHandlerEntity,
30258
+ indexEntryHandlerEntity,
29959
30259
  autoPageHandlerEntity,
29960
30260
  autoTotalPageCountEntity,
29961
30261
  pageReferenceEntity,
@@ -31068,7 +31368,7 @@ function translateContentBlock(params) {
31068
31368
  if (vmlAttributes || horizontalRule) {
31069
31369
  return translateVRectContentBlock(params);
31070
31370
  }
31071
- const alternateContent = translator$1P.decode(params);
31371
+ const alternateContent = translator$1R.decode(params);
31072
31372
  return wrapTextInRun(alternateContent);
31073
31373
  }
31074
31374
  function translateVRectContentBlock(params) {
@@ -31535,23 +31835,23 @@ function exportSchemaToJson(params) {
31535
31835
  doc: translateDocumentNode,
31536
31836
  body: translateBodyNode,
31537
31837
  heading: translateHeadingNode,
31538
- paragraph: translator$15,
31539
- run: translator$13,
31838
+ paragraph: translator$17,
31839
+ run: translator$15,
31540
31840
  text: translator$2,
31541
- lineBreak: translator$2t,
31542
- table: translator$c,
31543
- tableRow: translator$y,
31544
- tableCell: translator$K,
31545
- bookmarkStart: translator$b,
31546
- bookmarkEnd: translator$a,
31547
- fieldAnnotation: translator$u,
31548
- tab: translator$2r,
31549
- image: translator$v,
31550
- hardBreak: translator$2t,
31841
+ lineBreak: translator$2v,
31842
+ table: translator$e,
31843
+ tableRow: translator$A,
31844
+ tableCell: translator$M,
31845
+ bookmarkStart: translator$d,
31846
+ bookmarkEnd: translator$c,
31847
+ fieldAnnotation: translator$w,
31848
+ tab: translator$2t,
31849
+ image: translator$x,
31850
+ hardBreak: translator$2v,
31551
31851
  commentRangeStart: commentRangeStartTranslator,
31552
31852
  commentRangeEnd: commentRangeEndTranslator,
31553
- permStart: translator$9,
31554
- permEnd: translator$8,
31853
+ permStart: translator$b,
31854
+ permEnd: translator$a,
31555
31855
  commentReference: () => null,
31556
31856
  footnoteReference: translator$1,
31557
31857
  shapeContainer: translator,
@@ -31559,14 +31859,16 @@ function exportSchemaToJson(params) {
31559
31859
  contentBlock: translator,
31560
31860
  vectorShape: translateVectorShape,
31561
31861
  shapeGroup: translateShapeGroup,
31562
- structuredContent: translator$u,
31563
- structuredContentBlock: translator$u,
31564
- documentPartObject: translator$u,
31565
- documentSection: translator$u,
31862
+ structuredContent: translator$w,
31863
+ structuredContentBlock: translator$w,
31864
+ documentPartObject: translator$w,
31865
+ documentSection: translator$w,
31566
31866
  "page-number": translator$5,
31567
31867
  "total-page-number": translator$4,
31568
- pageReference: translator$7,
31569
- tableOfContents: translator$6,
31868
+ pageReference: translator$9,
31869
+ tableOfContents: translator$8,
31870
+ index: translator$7,
31871
+ indexEntry: translator$6,
31570
31872
  passthroughBlock: translatePassthroughNode,
31571
31873
  passthroughInline: translatePassthroughNode
31572
31874
  };
@@ -31652,7 +31954,7 @@ function translateHeadingNode(params) {
31652
31954
  // Maps to Heading1, Heading2, etc. in Word
31653
31955
  }
31654
31956
  };
31655
- return translator$15.decode({ ...params, node: paragraphNode });
31957
+ return translator$17.decode({ ...params, node: paragraphNode });
31656
31958
  }
31657
31959
  function translateDocumentNode(params) {
31658
31960
  const bodyNode = {
@@ -31721,7 +32023,7 @@ function translateMark(mark) {
31721
32023
  markElement.type = "element";
31722
32024
  break;
31723
32025
  case "underline": {
31724
- const translated = translator$2m.decode({
32026
+ const translated = translator$2o.decode({
31725
32027
  node: {
31726
32028
  attrs: {
31727
32029
  underlineType: attrs.underlineType ?? attrs.underline ?? null,
@@ -31785,7 +32087,7 @@ function translateMark(mark) {
31785
32087
  break;
31786
32088
  case "highlight": {
31787
32089
  const highlightValue = attrs.color ?? attrs.highlight ?? null;
31788
- const translated = translator$2s.decode({ node: { attrs: { highlight: highlightValue } } });
32090
+ const translated = translator$2u.decode({ node: { attrs: { highlight: highlightValue } } });
31789
32091
  return translated || {};
31790
32092
  }
31791
32093
  case "strike":
@@ -31919,7 +32221,7 @@ const prepareCommentParaIds = (comment) => {
31919
32221
  return newComment;
31920
32222
  };
31921
32223
  const getCommentDefinition = (comment, commentId, allComments, editor) => {
31922
- const translatedText = translator$15.decode({ editor, node: comment.commentJSON });
32224
+ const translatedText = translator$17.decode({ editor, node: comment.commentJSON });
31923
32225
  const attributes = {
31924
32226
  "w:id": String(commentId),
31925
32227
  "w:author": comment.creatorName || comment.importedAuthor?.name,
@@ -32769,7 +33071,7 @@ class SuperConverter {
32769
33071
  static getStoredSuperdocVersion(docx) {
32770
33072
  return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
32771
33073
  }
32772
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.7.0-next.6") {
33074
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.7.0-next.8") {
32773
33075
  return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
32774
33076
  }
32775
33077
  /**
@@ -33457,8 +33759,8 @@ export {
33457
33759
  SelectionRange as Z,
33458
33760
  Transform as _,
33459
33761
  createDocFromHTML as a,
33460
- translator$1Q as a0,
33461
- translator$16 as a1,
33762
+ translator$1S as a0,
33763
+ translator$18 as a1,
33462
33764
  resolveDocxFontFamily as a2,
33463
33765
  combineIndentProperties as a3,
33464
33766
  _getReferencedTableStyles as a4,