ooxml-core 1.26.1 → 1.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/{PptxHandler-AILFLRH7.cjs → PptxHandler-NHOKKZ4S.cjs} +3 -3
  2. package/dist/{PptxHandler-64BZOBWX.mjs → PptxHandler-OIR3ZY4Q.mjs} +2 -2
  3. package/dist/PptxHandler-TZJNIXPX.mjs +4 -0
  4. package/dist/{PresentationBuilder-RBQP6A37.cjs → PresentationBuilder-EX6DAE5X.cjs} +5 -5
  5. package/dist/{PresentationBuilder-EJY2TYWL.mjs → PresentationBuilder-RFTSZUPR.mjs} +2 -2
  6. package/dist/{PresentationBuilder-HBCCO2CF.mjs → PresentationBuilder-X5WFSHLB.mjs} +2 -2
  7. package/dist/{chunk-MU3XSASV.cjs → chunk-36TR3PER.cjs} +270 -13
  8. package/dist/{chunk-FZBAMWCJ.mjs → chunk-5KJAQKZG.mjs} +62 -275
  9. package/dist/{chunk-R7RL7W43.mjs → chunk-5NJPYCGO.mjs} +271 -17
  10. package/dist/{chunk-OQPT5IC3.mjs → chunk-BXZF7H5G.mjs} +4 -4
  11. package/dist/{chunk-NXTHB2M3.cjs → chunk-DMJIDRJE.cjs} +1139 -1352
  12. package/dist/{chunk-OTXJVFMY.mjs → chunk-GZ4DIXZZ.mjs} +62 -275
  13. package/dist/{chunk-2XMK5SXU.mjs → chunk-I57SMSU6.mjs} +268 -14
  14. package/dist/{chunk-WRFMS5CL.mjs → chunk-QIMNQDON.mjs} +1 -1
  15. package/dist/{chunk-DHAZSMC7.mjs → chunk-ZWTXVWMY.mjs} +1 -1
  16. package/dist/pptx/automation/index.cjs +352 -311
  17. package/dist/pptx/automation/index.d.ts +1 -1
  18. package/dist/pptx/automation/index.mjs +5 -5
  19. package/dist/pptx/chunks/index-D8DNpc1X.d.ts.map +1 -1
  20. package/dist/pptx/chunks/{index-CbFowkp4.d.ts → index-GWpMAY-f.d.ts} +16 -3
  21. package/dist/pptx/chunks/index-GWpMAY-f.d.ts.map +1 -0
  22. package/dist/pptx/cli/index.cjs +352 -311
  23. package/dist/pptx/cli/index.mjs +4 -4
  24. package/dist/pptx/converter/index.mjs +2 -2
  25. package/dist/pptx/editor/render/find-replace.cjs +14 -14
  26. package/dist/pptx/editor/render/find-replace.d.ts +1 -1
  27. package/dist/pptx/editor/render/find-replace.mjs +1 -1
  28. package/dist/pptx/editor/render/slide-operations.cjs +8 -8
  29. package/dist/pptx/editor/render/slide-operations.mjs +2 -2
  30. package/dist/pptx/index.cjs +354 -311
  31. package/dist/pptx/index.d.ts +2 -2
  32. package/dist/pptx/index.mjs +5 -5
  33. package/package.json +1 -1
  34. package/dist/PptxHandler-PMLQGMFQ.mjs +0 -4
  35. package/dist/pptx/chunks/index-CbFowkp4.d.ts.map +0 -1
@@ -59619,6 +59619,272 @@ var init_chart_data_sheet = __esm({
59619
59619
  }
59620
59620
  });
59621
59621
 
59622
+ // pptx/core/utils/modern-comment-mention-read.ts
59623
+ function readCommentMentions(node2, authorName) {
59624
+ if (!node2) {
59625
+ return void 0;
59626
+ }
59627
+ const found = [];
59628
+ for (const list3 of mentionChildrenNamed(node2, "mentionLst")) {
59629
+ for (const entry2 of mentionChildrenNamed(list3, "mention")) {
59630
+ const mention = readMention(entry2, authorName);
59631
+ if (mention) {
59632
+ found.push(mention);
59633
+ }
59634
+ }
59635
+ }
59636
+ for (const extension of mentionChildrenNamed(mentionChildrenNamed(node2, "extLst")[0], "ext")) {
59637
+ const uri = String(extension["@_uri"] || "");
59638
+ for (const list3 of mentionChildrenNamed(extension, "mentionLst")) {
59639
+ for (const entry2 of mentionChildrenNamed(list3, "mention")) {
59640
+ const mention = readMention(entry2, authorName, uri);
59641
+ if (mention) {
59642
+ found.push(mention);
59643
+ }
59644
+ }
59645
+ }
59646
+ }
59647
+ found.sort((a, b) => a.startIndex - b.startIndex);
59648
+ return found.length > 0 ? found : void 0;
59649
+ }
59650
+ var mentionLocalName, mentionNodesOf, mentionChildrenNamed, MENTION_PERSON_KEYS, MENTION_LENGTH_KEYS, attribute5, integer2, readMention;
59651
+ var init_modern_comment_mention_read = __esm({
59652
+ "pptx/core/utils/modern-comment-mention-read.ts"() {
59653
+ mentionLocalName = (key2) => key2.split(":").pop() || key2;
59654
+ mentionNodesOf = (value) => {
59655
+ if (Array.isArray(value)) {
59656
+ return value.filter((entry2) => Boolean(entry2) && typeof entry2 === "object");
59657
+ }
59658
+ return value && typeof value === "object" ? [value] : [];
59659
+ };
59660
+ mentionChildrenNamed = (node2, name) => {
59661
+ if (!node2) {
59662
+ return [];
59663
+ }
59664
+ const result = [];
59665
+ for (const [key2, value] of Object.entries(node2)) {
59666
+ if (!key2.startsWith("@_") && mentionLocalName(key2) === name) {
59667
+ result.push(...mentionNodesOf(value));
59668
+ }
59669
+ }
59670
+ return result;
59671
+ };
59672
+ MENTION_PERSON_KEYS = [
59673
+ "@_mentionpersonId",
59674
+ "@_mentionPersonId",
59675
+ "@_personId",
59676
+ "@_authorId"
59677
+ ];
59678
+ MENTION_LENGTH_KEYS = ["@_length", "@_mentionCharCount", "@_len"];
59679
+ attribute5 = (node2, keys) => {
59680
+ for (const key2 of keys) {
59681
+ const value = node2[key2];
59682
+ if (value !== void 0 && value !== null && String(value).length > 0) {
59683
+ return String(value);
59684
+ }
59685
+ }
59686
+ return void 0;
59687
+ };
59688
+ integer2 = (value) => {
59689
+ if (value === void 0) {
59690
+ return void 0;
59691
+ }
59692
+ const parsed = Number.parseInt(value, 10);
59693
+ return Number.isFinite(parsed) && parsed >= 0 ? parsed : void 0;
59694
+ };
59695
+ readMention = (node2, authorName, containerUri) => {
59696
+ const personId = attribute5(node2, MENTION_PERSON_KEYS);
59697
+ const startIndex = integer2(attribute5(node2, ["@_startIndex"]));
59698
+ const length = integer2(attribute5(node2, MENTION_LENGTH_KEYS));
59699
+ if (!personId || startIndex === void 0 || length === void 0 || length === 0) {
59700
+ return void 0;
59701
+ }
59702
+ return {
59703
+ personId,
59704
+ startIndex,
59705
+ length,
59706
+ id: attribute5(node2, ["@_mentionId", "@_id"]),
59707
+ authorName: authorName(personId),
59708
+ containerUri,
59709
+ rawXml: node2
59710
+ };
59711
+ };
59712
+ }
59713
+ });
59714
+
59715
+ // pptx/core/utils/modern-comment-mentions.ts
59716
+ function rebaseCommentMentions(mentions, oldText, newText, loaded) {
59717
+ if (!mentions || mentions.length === 0) {
59718
+ return void 0;
59719
+ }
59720
+ if (oldText === newText) {
59721
+ return mentions;
59722
+ }
59723
+ const prefix = commonPrefixLength(oldText, newText);
59724
+ const suffix = commonSuffixLength(
59725
+ oldText,
59726
+ newText,
59727
+ Math.min(oldText.length, newText.length) - prefix
59728
+ );
59729
+ const changeEnd = oldText.length - suffix;
59730
+ const delta2 = newText.length - oldText.length;
59731
+ const result = [];
59732
+ for (const mention of mentions) {
59733
+ const start = mention.startIndex;
59734
+ const end = start + mention.length;
59735
+ const coverage = loaded ? loadedCoverage(mention, loaded, oldText) : [];
59736
+ if (coverage === void 0 || coverage.includes(newText.slice(start, end))) {
59737
+ if (start >= 0 && mention.length > 0 && end <= newText.length) {
59738
+ result.push(mention);
59739
+ }
59740
+ continue;
59741
+ }
59742
+ const span = oldText.slice(start, end);
59743
+ if (span.length !== mention.length) {
59744
+ continue;
59745
+ }
59746
+ let next = -1;
59747
+ if (end <= prefix) {
59748
+ next = start;
59749
+ } else if (start >= changeEnd) {
59750
+ next = start + delta2;
59751
+ }
59752
+ if (next >= 0 && newText.slice(next, next + mention.length) === span) {
59753
+ result.push(next === start ? mention : { ...mention, startIndex: next });
59754
+ continue;
59755
+ }
59756
+ const relocated = nearestOccurrence(newText, span, next >= 0 ? next : start);
59757
+ if (relocated >= 0) {
59758
+ result.push({ ...mention, startIndex: relocated });
59759
+ }
59760
+ }
59761
+ return result.length > 0 ? result : void 0;
59762
+ }
59763
+ function buildMentionListNode(mentions) {
59764
+ if (!mentions || mentions.length === 0) {
59765
+ return void 0;
59766
+ }
59767
+ return { "p188:mention": mentions.map(buildMention) };
59768
+ }
59769
+ function applyCommentMentions(node2, mentions, extension, replace) {
59770
+ if (!replace) {
59771
+ return extension;
59772
+ }
59773
+ const { direct, byUri } = groupByContainer(mentions);
59774
+ const directList = buildMentionListNode(direct);
59775
+ if (directList) {
59776
+ node2["p188:mentionLst"] = directList;
59777
+ }
59778
+ if (!extension) {
59779
+ return void 0;
59780
+ }
59781
+ const rebuilt = stripMentionLists(extension);
59782
+ const extensionKey = Object.keys(rebuilt).find((key2) => mentionLocalName(key2) === "ext") || "p188:ext";
59783
+ const entries = mentionNodesOf(rebuilt[extensionKey]).map((entry2) => {
59784
+ const list3 = buildMentionListNode(byUri.get(String(entry2["@_uri"] || "")));
59785
+ const next = stripMentionLists(entry2);
59786
+ if (list3) {
59787
+ next["p188:mentionLst"] = list3;
59788
+ }
59789
+ return next;
59790
+ });
59791
+ if (entries.length > 0) {
59792
+ rebuilt[extensionKey] = entries.length === 1 ? entries[0] : entries;
59793
+ }
59794
+ return rebuilt;
59795
+ }
59796
+ var commonPrefixLength, commonSuffixLength, nearestOccurrence, loadedCoverage, buildMention, stripMentionLists, groupByContainer;
59797
+ var init_modern_comment_mentions = __esm({
59798
+ "pptx/core/utils/modern-comment-mentions.ts"() {
59799
+ init_modern_comment_mention_read();
59800
+ init_modern_comment_mention_read();
59801
+ commonPrefixLength = (a, b) => {
59802
+ const max = Math.min(a.length, b.length);
59803
+ let index2 = 0;
59804
+ while (index2 < max && a[index2] === b[index2]) {
59805
+ index2 += 1;
59806
+ }
59807
+ return index2;
59808
+ };
59809
+ commonSuffixLength = (a, b, limit) => {
59810
+ let index2 = 0;
59811
+ while (index2 < limit && a[a.length - 1 - index2] === b[b.length - 1 - index2]) {
59812
+ index2 += 1;
59813
+ }
59814
+ return index2;
59815
+ };
59816
+ nearestOccurrence = (text2, span, hint) => {
59817
+ let best = -1;
59818
+ let bestDistance = Number.POSITIVE_INFINITY;
59819
+ let at2 = text2.indexOf(span);
59820
+ while (at2 !== -1) {
59821
+ const distance = Math.abs(at2 - hint);
59822
+ if (distance < bestDistance) {
59823
+ best = at2;
59824
+ bestDistance = distance;
59825
+ }
59826
+ at2 = text2.indexOf(span, at2 + 1);
59827
+ }
59828
+ return best;
59829
+ };
59830
+ loadedCoverage = (mention, loaded, oldText) => {
59831
+ const records = loaded.filter(
59832
+ (record3) => mention.id ? record3.id === mention.id : !record3.id && record3.personId === mention.personId && record3.length === mention.length
59833
+ );
59834
+ if (records.length === 0) {
59835
+ return void 0;
59836
+ }
59837
+ return records.map(
59838
+ (record3) => oldText.slice(record3.startIndex, record3.startIndex + record3.length)
59839
+ );
59840
+ };
59841
+ buildMention = (mention) => {
59842
+ const node2 = {};
59843
+ for (const [key2, value] of Object.entries(mention.rawXml || {})) {
59844
+ if (key2.startsWith("@_")) {
59845
+ node2[key2] = value;
59846
+ }
59847
+ }
59848
+ const personKey = MENTION_PERSON_KEYS.find((key2) => node2[key2] !== void 0) || "@_mentionpersonId";
59849
+ const lengthKey = MENTION_LENGTH_KEYS.find((key2) => node2[key2] !== void 0) || "@_length";
59850
+ node2[personKey] = mention.personId;
59851
+ node2[lengthKey] = String(mention.length);
59852
+ node2["@_startIndex"] = String(mention.startIndex);
59853
+ if (mention.id) {
59854
+ const idKey = node2["@_id"] !== void 0 && node2["@_mentionId"] === void 0 ? "@_id" : "@_mentionId";
59855
+ node2[idKey] = mention.id;
59856
+ }
59857
+ return node2;
59858
+ };
59859
+ stripMentionLists = (node2) => {
59860
+ const result = {};
59861
+ for (const [key2, value] of Object.entries(node2)) {
59862
+ if (key2.startsWith("@_") || mentionLocalName(key2) !== "mentionLst") {
59863
+ result[key2] = value;
59864
+ }
59865
+ }
59866
+ return result;
59867
+ };
59868
+ groupByContainer = (mentions) => {
59869
+ const direct = [];
59870
+ const byUri = /* @__PURE__ */ new Map();
59871
+ for (const mention of mentions || []) {
59872
+ if (!mention.containerUri) {
59873
+ direct.push(mention);
59874
+ continue;
59875
+ }
59876
+ const bucket = byUri.get(mention.containerUri);
59877
+ if (bucket) {
59878
+ bucket.push(mention);
59879
+ } else {
59880
+ byUri.set(mention.containerUri, [mention]);
59881
+ }
59882
+ }
59883
+ return { direct, byUri };
59884
+ };
59885
+ }
59886
+ });
59887
+
59622
59888
  // pptx/core/utils/index.ts
59623
59889
  var init_utils = __esm({
59624
59890
  "pptx/core/utils/index.ts"() {
@@ -64097,7 +64363,7 @@ var init_effect_style_extractor_fill_overlay = __esm({
64097
64363
  });
64098
64364
 
64099
64365
  // pptx/core/core/builders/effect-style-extractor-reflection.ts
64100
- function integer2(value) {
64366
+ function integer3(value) {
64101
64367
  if (value === void 0 || value === null || value === "") {
64102
64368
  return void 0;
64103
64369
  }
@@ -64114,19 +64380,19 @@ function boolean2(value) {
64114
64380
  return void 0;
64115
64381
  }
64116
64382
  function fixedFraction(value) {
64117
- const parsed = integer2(value);
64383
+ const parsed = integer3(value);
64118
64384
  return parsed !== void 0 && parsed >= 0 && parsed <= 1e5 ? parsed / 1e5 : void 0;
64119
64385
  }
64120
64386
  function extractReflectionAttributes(node2, emuPerPx) {
64121
- const blur = integer2(node2["@_blurRad"]);
64122
- const distance = integer2(node2["@_dist"]);
64123
- const startOpacity = integer2(node2["@_stA"]);
64124
- const endOpacity = integer2(node2["@_endA"]);
64125
- const startPosition = integer2(node2["@_stPos"]);
64126
- const endPosition = integer2(node2["@_endPos"]);
64127
- const direction = integer2(node2["@_dir"]);
64128
- const rotation = integer2(node2["@_rot"]);
64129
- const fadeDirection = integer2(node2["@_fadeDir"]);
64387
+ const blur = integer3(node2["@_blurRad"]);
64388
+ const distance = integer3(node2["@_dist"]);
64389
+ const startOpacity = integer3(node2["@_stA"]);
64390
+ const endOpacity = integer3(node2["@_endA"]);
64391
+ const startPosition = integer3(node2["@_stPos"]);
64392
+ const endPosition = integer3(node2["@_endPos"]);
64393
+ const direction = integer3(node2["@_dir"]);
64394
+ const rotation = integer3(node2["@_rot"]);
64395
+ const fadeDirection = integer3(node2["@_fadeDir"]);
64130
64396
  const alignment = String(node2["@_algn"] ?? "").trim();
64131
64397
  return {
64132
64398
  reflectionBlurRadius: blur !== void 0 && blur >= 0 ? blur / emuPerPx : void 0,
@@ -64138,10 +64404,10 @@ function extractReflectionAttributes(node2, emuPerPx) {
64138
64404
  reflectionRotation: rotation !== void 0 ? rotation / 6e4 : void 0,
64139
64405
  reflectionDistance: distance !== void 0 && distance >= 0 ? distance / emuPerPx : void 0,
64140
64406
  reflectionFadeDirection: fadeDirection !== void 0 ? fadeDirection / 6e4 : void 0,
64141
- reflectionScaleX: integer2(node2["@_sx"]),
64142
- reflectionScaleY: integer2(node2["@_sy"]),
64143
- reflectionSkewX: integer2(node2["@_kx"]),
64144
- reflectionSkewY: integer2(node2["@_ky"]),
64407
+ reflectionScaleX: integer3(node2["@_sx"]),
64408
+ reflectionScaleY: integer3(node2["@_sy"]),
64409
+ reflectionSkewX: integer3(node2["@_kx"]),
64410
+ reflectionSkewY: integer3(node2["@_ky"]),
64145
64411
  reflectionAlignment: VALID_ALIGNMENTS.has(alignment) ? alignment : void 0,
64146
64412
  reflectionRotateWithShape: boolean2(node2["@_rotWithShape"])
64147
64413
  };
@@ -95463,7 +95729,10 @@ async function resolveBulletImage(imageRelId, slidePath, resolver) {
95463
95729
  if (!target) {
95464
95730
  return void 0;
95465
95731
  }
95466
- if (target.startsWith("http://") || target.startsWith("https://") || target.startsWith("data:")) {
95732
+ if (target.startsWith("http://") || target.startsWith("https://")) {
95733
+ return resolver.allowExternalImages ? target : void 0;
95734
+ }
95735
+ if (target.startsWith("data:")) {
95467
95736
  return target;
95468
95737
  }
95469
95738
  const imagePath = resolver.resolveImagePath(slidePath, target);
@@ -98204,7 +98473,7 @@ function malformed(context, element, value) {
98204
98473
  function cBool(context, parent, local) {
98205
98474
  const element = cChild(parent, local);
98206
98475
  if (!element) return void 0;
98207
- const raw2 = attribute5(element, "val");
98476
+ const raw2 = attribute6(element, "val");
98208
98477
  if (raw2 === void 0) return true;
98209
98478
  const value = raw2.trim().toLowerCase();
98210
98479
  if (value === "1" || value === "true") return true;
@@ -98214,7 +98483,7 @@ function cBool(context, parent, local) {
98214
98483
  }
98215
98484
  function cNumber(context, parent, local) {
98216
98485
  const element = cChild(parent, local);
98217
- const raw2 = attribute5(element, "val");
98486
+ const raw2 = attribute6(element, "val");
98218
98487
  if (!element || raw2 === void 0) return void 0;
98219
98488
  const value = raw2.trim() ? Number(raw2) : Number.NaN;
98220
98489
  if (Number.isFinite(value)) return value;
@@ -98223,7 +98492,7 @@ function cNumber(context, parent, local) {
98223
98492
  }
98224
98493
  function cEnum(context, parent, local, allowed) {
98225
98494
  const element = cChild(parent, local);
98226
- const raw2 = attribute5(element, "val");
98495
+ const raw2 = attribute6(element, "val");
98227
98496
  if (!element || raw2 === void 0) return void 0;
98228
98497
  if (allowed.includes(raw2)) return raw2;
98229
98498
  malformed(context, element, raw2);
@@ -98280,9 +98549,9 @@ function chartLines(parent, local) {
98280
98549
  }
98281
98550
  function numberFormat(parent) {
98282
98551
  const element = cChild(parent, "numFmt");
98283
- const formatCode2 = attribute5(element, "formatCode");
98552
+ const formatCode2 = attribute6(element, "formatCode");
98284
98553
  if (formatCode2 === void 0) return void 0;
98285
- const linked = attribute5(element, "sourceLinked");
98554
+ const linked = attribute6(element, "sourceLinked");
98286
98555
  return {
98287
98556
  formatCode: formatCode2,
98288
98557
  ...linked === "1" || linked === "true" ? { sourceLinked: true } : {},
@@ -98306,7 +98575,7 @@ function assignDefined(target, values) {
98306
98575
  if (value !== void 0) target[key2] = value;
98307
98576
  return target;
98308
98577
  }
98309
- var cChild, attribute5, cVal, path, textProperties;
98578
+ var cChild, attribute6, cVal, path, textProperties;
98310
98579
  var init_parse_util = __esm({
98311
98580
  "chart/parse-util.ts"() {
98312
98581
  init_xml2();
@@ -98315,8 +98584,8 @@ var init_parse_util = __esm({
98315
98584
  init_manual_layout();
98316
98585
  init_xml_fragment();
98317
98586
  cChild = (parent, local) => first(parent, local, NS.c);
98318
- attribute5 = (element, name) => element?.hasAttribute(name) ? element.getAttribute(name) ?? void 0 : void 0;
98319
- cVal = (parent, local) => attribute5(cChild(parent, local), "val");
98587
+ attribute6 = (element, name) => element?.hasAttribute(name) ? element.getAttribute(name) ?? void 0 : void 0;
98588
+ cVal = (parent, local) => attribute6(cChild(parent, local), "val");
98320
98589
  path = (element) => `c:${element.parentNode?.localName ?? ""}/c:${element.localName}`;
98321
98590
  textProperties = (parent) => chartTextBody(cChild(parent, "txPr"));
98322
98591
  }
@@ -98328,9 +98597,9 @@ function parseCache(node2) {
98328
98597
  type: node2.localName === "numCache" || node2.localName === "numLit" ? "number" : "string",
98329
98598
  points: children2(node2, "pt", NS.c).map((pt2) => {
98330
98599
  const point2 = { value: cChild(pt2, "v")?.textContent ?? "" };
98331
- const index2 = Number(attribute5(pt2, "idx") ?? Number.NaN);
98600
+ const index2 = Number(attribute6(pt2, "idx") ?? Number.NaN);
98332
98601
  if (Number.isInteger(index2) && index2 >= 0) point2.index = index2;
98333
- const formatCode3 = attribute5(pt2, "formatCode");
98602
+ const formatCode3 = attribute6(pt2, "formatCode");
98334
98603
  if (formatCode3 !== void 0) point2.formatCode = formatCode3;
98335
98604
  return point2;
98336
98605
  })
@@ -98533,10 +98802,10 @@ function readDisplayNaAsBlank(chartExtLst) {
98533
98802
  return void 0;
98534
98803
  }
98535
98804
  for (const ext of elements(root)) {
98536
- if (ext.localName !== "ext" || attribute5(ext, "uri") !== DATA_DISPLAY_OPTIONS_URI) continue;
98805
+ if (ext.localName !== "ext" || attribute6(ext, "uri") !== DATA_DISPLAY_OPTIONS_URI) continue;
98537
98806
  const flag2 = first(first(ext, "dataDisplayOptions16", C16R3), "dispNaAsBlank", C16R3);
98538
98807
  if (!flag2) continue;
98539
- const raw2 = attribute5(flag2, "val")?.trim().toLowerCase();
98808
+ const raw2 = attribute6(flag2, "val")?.trim().toLowerCase();
98540
98809
  return raw2 === void 0 || raw2 === "1" || raw2 === "true";
98541
98810
  }
98542
98811
  return void 0;
@@ -98781,7 +99050,7 @@ function customSplit(context, element) {
98781
99050
  if (!element) return void 0;
98782
99051
  reportUnmodelled(context, element, /* @__PURE__ */ new Set(["secondPiePt"]));
98783
99052
  return children2(element, "secondPiePt", NS.c).flatMap((point2) => {
98784
- const raw2 = attribute5(point2, "val")?.trim();
99053
+ const raw2 = attribute6(point2, "val")?.trim();
98785
99054
  const index2 = raw2 ? Number(raw2) : Number.NaN;
98786
99055
  return Number.isInteger(index2) && index2 >= 0 ? [index2] : [];
98787
99056
  });
@@ -98802,7 +99071,7 @@ function parseGroup(context, element) {
98802
99071
  is3D,
98803
99072
  series: children2(element, "ser", NS.c).map((ser) => parseSeries(context, ser)),
98804
99073
  axisIds: children2(element, "axId", NS.c).flatMap((axis) => {
98805
- const raw2 = attribute5(axis, "val")?.trim();
99074
+ const raw2 = attribute6(axis, "val")?.trim();
98806
99075
  const id = raw2 ? Number(raw2) : Number.NaN;
98807
99076
  return Number.isFinite(id) ? [id] : [];
98808
99077
  })
@@ -99084,7 +99353,7 @@ function chartStyle(context, space) {
99084
99353
  }
99085
99354
  function c14Style(space) {
99086
99355
  for (const alternate of children2(space, "AlternateContent", NS.mc)) {
99087
- const raw2 = attribute5(first(first(alternate, "Choice", NS.mc), "style", NS.c14, false), "val");
99356
+ const raw2 = attribute6(first(first(alternate, "Choice", NS.mc), "style", NS.c14, false), "val");
99088
99357
  const value = raw2?.trim() ? Number(raw2) : Number.NaN;
99089
99358
  if (Number.isFinite(value)) return value;
99090
99359
  }
@@ -99773,7 +100042,7 @@ function malformed2(context, where, value) {
99773
100042
  });
99774
100043
  }
99775
100044
  function boolAttribute(context, element, name) {
99776
- const raw2 = attribute5(element, name);
100045
+ const raw2 = attribute6(element, name);
99777
100046
  if (!element || raw2 === void 0) return void 0;
99778
100047
  const value = raw2.trim().toLowerCase();
99779
100048
  if (value === "1" || value === "true") return true;
@@ -99782,7 +100051,7 @@ function boolAttribute(context, element, name) {
99782
100051
  return void 0;
99783
100052
  }
99784
100053
  function numberAttribute(context, element, name) {
99785
- const raw2 = attribute5(element, name);
100054
+ const raw2 = attribute6(element, name);
99786
100055
  if (!element || raw2 === void 0) return void 0;
99787
100056
  const value = raw2.trim() ? Number(raw2) : Number.NaN;
99788
100057
  if (Number.isFinite(value)) return value;
@@ -99792,11 +100061,11 @@ function numberAttribute(context, element, name) {
99792
100061
  function indexAttribute(context, element, name) {
99793
100062
  const value = numberAttribute(context, element, name);
99794
100063
  if (value === void 0 || Number.isInteger(value) && value >= 0) return value;
99795
- malformed2(context, path2(element, name), attribute5(element, name) ?? "");
100064
+ malformed2(context, path2(element, name), attribute6(element, name) ?? "");
99796
100065
  return void 0;
99797
100066
  }
99798
100067
  function autoNumberAttribute(context, element, name) {
99799
- return attribute5(element, name)?.trim() === "auto" ? "auto" : numberAttribute(context, element, name);
100068
+ return attribute6(element, name)?.trim() === "auto" ? "auto" : numberAttribute(context, element, name);
99800
100069
  }
99801
100070
  function reportUnmodelled2(context, element, handled) {
99802
100071
  for (const child31 of elements(element)) {
@@ -99827,9 +100096,9 @@ function lines(parent, local) {
99827
100096
  }
99828
100097
  function numberFormat2(parent) {
99829
100098
  const element = cxChild(parent, "numFmt");
99830
- const formatCode2 = attribute5(element, "formatCode");
100099
+ const formatCode2 = attribute6(element, "formatCode");
99831
100100
  if (formatCode2 === void 0) return void 0;
99832
- const linked = attribute5(element, "sourceLinked");
100101
+ const linked = attribute6(element, "sourceLinked");
99833
100102
  return {
99834
100103
  formatCode: formatCode2,
99835
100104
  ...linked === "1" || linked === "true" ? { sourceLinked: true } : {},
@@ -99840,7 +100109,7 @@ function formula(parent, local) {
99840
100109
  const element = cxChild(parent, local);
99841
100110
  if (!element) return void 0;
99842
100111
  const out = { formula: element.textContent ?? "" };
99843
- const direction = attribute5(element, "dir");
100112
+ const direction = attribute6(element, "dir");
99844
100113
  if (direction !== void 0) out.direction = direction;
99845
100114
  return out;
99846
100115
  }
@@ -99874,8 +100143,8 @@ function parseLevel(context, element) {
99874
100143
  { points: points7 },
99875
100144
  {
99876
100145
  pointCount: indexAttribute(context, element, "ptCount"),
99877
- formatCode: attribute5(element, "formatCode"),
99878
- name: attribute5(element, "name"),
100146
+ formatCode: attribute6(element, "formatCode"),
100147
+ name: attribute6(element, "name"),
99879
100148
  extLst: extensionList2(element)
99880
100149
  }
99881
100150
  );
@@ -99888,7 +100157,7 @@ function parseDimension(context, element) {
99888
100157
  levels: cxChildren(element, "lvl").map((level2) => parseLevel(context, level2))
99889
100158
  },
99890
100159
  {
99891
- type: attribute5(element, "type"),
100160
+ type: attribute6(element, "type"),
99892
100161
  formula: formula(element, "f"),
99893
100162
  nameFormula: formula(element, "nf"),
99894
100163
  extLst: extensionList2(element)
@@ -99945,8 +100214,8 @@ function parseTitle2(context, element) {
99945
100214
  tx: parseText2(context, cxChild(element, "tx")),
99946
100215
  spPr: shapeProperties2(element),
99947
100216
  txPr: textProperties2(element),
99948
- position: attribute5(element, "pos"),
99949
- align: attribute5(element, "align"),
100217
+ position: attribute6(element, "pos"),
100218
+ align: attribute6(element, "align"),
99950
100219
  overlay: boolAttribute(context, element, "overlay"),
99951
100220
  extLst: extensionList2(element)
99952
100221
  }
@@ -99957,8 +100226,8 @@ function parseLegend2(context, element) {
99957
100226
  return assignDefined(
99958
100227
  {},
99959
100228
  {
99960
- position: attribute5(element, "pos"),
99961
- align: attribute5(element, "align"),
100229
+ position: attribute6(element, "pos"),
100230
+ align: attribute6(element, "align"),
99962
100231
  overlay: boolAttribute(context, element, "overlay"),
99963
100232
  spPr: shapeProperties2(element),
99964
100233
  txPr: textProperties2(element),
@@ -100007,7 +100276,7 @@ function parseUnits(context, element) {
100007
100276
  return assignDefined(
100008
100277
  {},
100009
100278
  {
100010
- unit: attribute5(element, "unit"),
100279
+ unit: attribute6(element, "unit"),
100011
100280
  label: label ? parseTitle2(context, label) : void 0,
100012
100281
  extLst: extensionList2(element)
100013
100282
  }
@@ -100058,7 +100327,7 @@ var init_parse_axis = __esm({
100058
100327
  "txPr",
100059
100328
  "extLst"
100060
100329
  ]);
100061
- tickMarks = (element) => element ? assignDefined({}, { type: attribute5(element, "type") }) : void 0;
100330
+ tickMarks = (element) => element ? assignDefined({}, { type: attribute6(element, "type") }) : void 0;
100062
100331
  }
100063
100332
  });
100064
100333
 
@@ -100077,7 +100346,7 @@ function labelVisibility(context, element) {
100077
100346
  function labelOptions2(context, element) {
100078
100347
  const separator = cxChild(element, "separator");
100079
100348
  return {
100080
- position: attribute5(element, "pos"),
100349
+ position: attribute6(element, "pos"),
100081
100350
  numberFormat: numberFormat2(element),
100082
100351
  spPr: shapeProperties2(element),
100083
100352
  txPr: textProperties2(element),
@@ -100110,7 +100379,7 @@ function parseBinning(context, element) {
100110
100379
  return assignDefined(
100111
100380
  {},
100112
100381
  {
100113
- intervalClosed: attribute5(element, "intervalClosed"),
100382
+ intervalClosed: attribute6(element, "intervalClosed"),
100114
100383
  underflow: autoNumberAttribute(context, element, "underflow"),
100115
100384
  overflow: autoNumberAttribute(context, element, "overflow"),
100116
100385
  binSize: scalar4("binSize"),
@@ -100123,11 +100392,11 @@ function parseGeography(context, element) {
100123
100392
  return assignDefined(
100124
100393
  {},
100125
100394
  {
100126
- projectionType: attribute5(element, "projectionType"),
100127
- viewedRegionType: attribute5(element, "viewedRegionType"),
100128
- cultureLanguage: attribute5(element, "cultureLanguage"),
100129
- cultureRegion: attribute5(element, "cultureRegion"),
100130
- attribution: attribute5(element, "attribution"),
100395
+ projectionType: attribute6(element, "projectionType"),
100396
+ viewedRegionType: attribute6(element, "viewedRegionType"),
100397
+ cultureLanguage: attribute6(element, "cultureLanguage"),
100398
+ cultureRegion: attribute6(element, "cultureRegion"),
100399
+ attribution: attribute6(element, "attribution"),
100131
100400
  geoCacheXml: rawChild2(element, "geoCache"),
100132
100401
  extLst: extensionList2(element)
100133
100402
  }
@@ -100143,8 +100412,8 @@ function parseLayout(context, element) {
100143
100412
  return assignDefined(
100144
100413
  {},
100145
100414
  {
100146
- parentLabelLayout: attribute5(cxChild(element, "parentLabelLayout"), "val"),
100147
- regionLabelLayout: attribute5(cxChild(element, "regionLabelLayout"), "val"),
100415
+ parentLabelLayout: attribute6(cxChild(element, "parentLabelLayout"), "val"),
100416
+ regionLabelLayout: attribute6(cxChild(element, "regionLabelLayout"), "val"),
100148
100417
  visibility: visibility ? assignDefined(
100149
100418
  {},
100150
100419
  Object.fromEntries(
@@ -100156,7 +100425,7 @@ function parseLayout(context, element) {
100156
100425
  geography: geography ? parseGeography(context, geography) : void 0,
100157
100426
  statistics: statistics ? assignDefined(
100158
100427
  {},
100159
- { quartileMethod: attribute5(statistics, "quartileMethod") }
100428
+ { quartileMethod: attribute6(statistics, "quartileMethod") }
100160
100429
  ) : void 0,
100161
100430
  subtotals: subtotals ? cxChildren(subtotals, "idx").map((idx) => indexAttribute(context, idx, "val")).filter((index2) => index2 !== void 0) : void 0,
100162
100431
  extLst: extensionList2(element)
@@ -100181,11 +100450,11 @@ function parseSeries2(context, element) {
100181
100450
  const layout = cxChild(element, "layoutPr");
100182
100451
  const axisIds = cxChildren(element, "axisId").map((axis) => indexAttribute(context, axis, "val")).filter((id) => id !== void 0);
100183
100452
  return assignDefined(
100184
- { layoutId: attribute5(element, "layoutId") ?? "", dataPoints, axisIds },
100453
+ { layoutId: attribute6(element, "layoutId") ?? "", dataPoints, axisIds },
100185
100454
  {
100186
100455
  hidden: boolAttribute(context, element, "hidden"),
100187
100456
  ownerIndex: numberAttribute(context, element, "ownerIdx"),
100188
- uniqueId: attribute5(element, "uniqueId"),
100457
+ uniqueId: attribute6(element, "uniqueId"),
100189
100458
  formatIndex: numberAttribute(context, element, "formatIdx"),
100190
100459
  tx: parseText2(context, cxChild(element, "tx")),
100191
100460
  spPr: shapeProperties2(element),
@@ -103915,254 +104184,6 @@ var init_modern_comment_fields = __esm({
103915
104184
  }
103916
104185
  });
103917
104186
 
103918
- // pptx/core/utils/modern-comment-mention-read.ts
103919
- function readCommentMentions(node2, authorName) {
103920
- if (!node2) {
103921
- return void 0;
103922
- }
103923
- const found = [];
103924
- for (const list3 of mentionChildrenNamed(node2, "mentionLst")) {
103925
- for (const entry2 of mentionChildrenNamed(list3, "mention")) {
103926
- const mention = readMention(entry2, authorName);
103927
- if (mention) {
103928
- found.push(mention);
103929
- }
103930
- }
103931
- }
103932
- for (const extension of mentionChildrenNamed(mentionChildrenNamed(node2, "extLst")[0], "ext")) {
103933
- const uri = String(extension["@_uri"] || "");
103934
- for (const list3 of mentionChildrenNamed(extension, "mentionLst")) {
103935
- for (const entry2 of mentionChildrenNamed(list3, "mention")) {
103936
- const mention = readMention(entry2, authorName, uri);
103937
- if (mention) {
103938
- found.push(mention);
103939
- }
103940
- }
103941
- }
103942
- }
103943
- found.sort((a, b) => a.startIndex - b.startIndex);
103944
- return found.length > 0 ? found : void 0;
103945
- }
103946
- var mentionLocalName, mentionNodesOf, mentionChildrenNamed, MENTION_PERSON_KEYS, MENTION_LENGTH_KEYS, attribute6, integer3, readMention;
103947
- var init_modern_comment_mention_read = __esm({
103948
- "pptx/core/utils/modern-comment-mention-read.ts"() {
103949
- mentionLocalName = (key2) => key2.split(":").pop() || key2;
103950
- mentionNodesOf = (value) => {
103951
- if (Array.isArray(value)) {
103952
- return value.filter((entry2) => Boolean(entry2) && typeof entry2 === "object");
103953
- }
103954
- return value && typeof value === "object" ? [value] : [];
103955
- };
103956
- mentionChildrenNamed = (node2, name) => {
103957
- if (!node2) {
103958
- return [];
103959
- }
103960
- const result = [];
103961
- for (const [key2, value] of Object.entries(node2)) {
103962
- if (!key2.startsWith("@_") && mentionLocalName(key2) === name) {
103963
- result.push(...mentionNodesOf(value));
103964
- }
103965
- }
103966
- return result;
103967
- };
103968
- MENTION_PERSON_KEYS = [
103969
- "@_mentionpersonId",
103970
- "@_mentionPersonId",
103971
- "@_personId",
103972
- "@_authorId"
103973
- ];
103974
- MENTION_LENGTH_KEYS = ["@_length", "@_mentionCharCount", "@_len"];
103975
- attribute6 = (node2, keys) => {
103976
- for (const key2 of keys) {
103977
- const value = node2[key2];
103978
- if (value !== void 0 && value !== null && String(value).length > 0) {
103979
- return String(value);
103980
- }
103981
- }
103982
- return void 0;
103983
- };
103984
- integer3 = (value) => {
103985
- if (value === void 0) {
103986
- return void 0;
103987
- }
103988
- const parsed = Number.parseInt(value, 10);
103989
- return Number.isFinite(parsed) && parsed >= 0 ? parsed : void 0;
103990
- };
103991
- readMention = (node2, authorName, containerUri) => {
103992
- const personId = attribute6(node2, MENTION_PERSON_KEYS);
103993
- const startIndex = integer3(attribute6(node2, ["@_startIndex"]));
103994
- const length = integer3(attribute6(node2, MENTION_LENGTH_KEYS));
103995
- if (!personId || startIndex === void 0 || length === void 0 || length === 0) {
103996
- return void 0;
103997
- }
103998
- return {
103999
- personId,
104000
- startIndex,
104001
- length,
104002
- id: attribute6(node2, ["@_mentionId", "@_id"]),
104003
- authorName: authorName(personId),
104004
- containerUri,
104005
- rawXml: node2
104006
- };
104007
- };
104008
- }
104009
- });
104010
-
104011
- // pptx/core/utils/modern-comment-mentions.ts
104012
- function rebaseCommentMentions(mentions, oldText, newText) {
104013
- if (!mentions || mentions.length === 0) {
104014
- return void 0;
104015
- }
104016
- if (oldText === newText) {
104017
- return mentions;
104018
- }
104019
- const prefix = commonPrefixLength(oldText, newText);
104020
- const suffix = commonSuffixLength(
104021
- oldText,
104022
- newText,
104023
- Math.min(oldText.length, newText.length) - prefix
104024
- );
104025
- const changeEnd = oldText.length - suffix;
104026
- const delta2 = newText.length - oldText.length;
104027
- const result = [];
104028
- for (const mention of mentions) {
104029
- const start = mention.startIndex;
104030
- const end = start + mention.length;
104031
- const span = oldText.slice(start, end);
104032
- if (span.length !== mention.length) {
104033
- continue;
104034
- }
104035
- let next = -1;
104036
- if (end <= prefix) {
104037
- next = start;
104038
- } else if (start >= changeEnd) {
104039
- next = start + delta2;
104040
- }
104041
- if (next >= 0 && newText.slice(next, next + mention.length) === span) {
104042
- result.push(next === start ? mention : { ...mention, startIndex: next });
104043
- continue;
104044
- }
104045
- const relocated = nearestOccurrence(newText, span, next >= 0 ? next : start);
104046
- if (relocated >= 0) {
104047
- result.push({ ...mention, startIndex: relocated });
104048
- }
104049
- }
104050
- return result.length > 0 ? result : void 0;
104051
- }
104052
- function buildMentionListNode(mentions) {
104053
- if (!mentions || mentions.length === 0) {
104054
- return void 0;
104055
- }
104056
- return { "p188:mention": mentions.map(buildMention) };
104057
- }
104058
- function applyCommentMentions(node2, mentions, extension, replace) {
104059
- if (!replace) {
104060
- return extension;
104061
- }
104062
- const { direct, byUri } = groupByContainer(mentions);
104063
- const directList = buildMentionListNode(direct);
104064
- if (directList) {
104065
- node2["p188:mentionLst"] = directList;
104066
- }
104067
- if (!extension) {
104068
- return void 0;
104069
- }
104070
- const rebuilt = stripMentionLists(extension);
104071
- const extensionKey = Object.keys(rebuilt).find((key2) => mentionLocalName(key2) === "ext") || "p188:ext";
104072
- const entries = mentionNodesOf(rebuilt[extensionKey]).map((entry2) => {
104073
- const list3 = buildMentionListNode(byUri.get(String(entry2["@_uri"] || "")));
104074
- const next = stripMentionLists(entry2);
104075
- if (list3) {
104076
- next["p188:mentionLst"] = list3;
104077
- }
104078
- return next;
104079
- });
104080
- if (entries.length > 0) {
104081
- rebuilt[extensionKey] = entries.length === 1 ? entries[0] : entries;
104082
- }
104083
- return rebuilt;
104084
- }
104085
- var commonPrefixLength, commonSuffixLength, nearestOccurrence, buildMention, stripMentionLists, groupByContainer;
104086
- var init_modern_comment_mentions = __esm({
104087
- "pptx/core/utils/modern-comment-mentions.ts"() {
104088
- init_modern_comment_mention_read();
104089
- init_modern_comment_mention_read();
104090
- commonPrefixLength = (a, b) => {
104091
- const max = Math.min(a.length, b.length);
104092
- let index2 = 0;
104093
- while (index2 < max && a[index2] === b[index2]) {
104094
- index2 += 1;
104095
- }
104096
- return index2;
104097
- };
104098
- commonSuffixLength = (a, b, limit) => {
104099
- let index2 = 0;
104100
- while (index2 < limit && a[a.length - 1 - index2] === b[b.length - 1 - index2]) {
104101
- index2 += 1;
104102
- }
104103
- return index2;
104104
- };
104105
- nearestOccurrence = (text2, span, hint) => {
104106
- let best = -1;
104107
- let bestDistance = Number.POSITIVE_INFINITY;
104108
- let at2 = text2.indexOf(span);
104109
- while (at2 !== -1) {
104110
- const distance = Math.abs(at2 - hint);
104111
- if (distance < bestDistance) {
104112
- best = at2;
104113
- bestDistance = distance;
104114
- }
104115
- at2 = text2.indexOf(span, at2 + 1);
104116
- }
104117
- return best;
104118
- };
104119
- buildMention = (mention) => {
104120
- const node2 = {};
104121
- for (const [key2, value] of Object.entries(mention.rawXml || {})) {
104122
- if (key2.startsWith("@_")) {
104123
- node2[key2] = value;
104124
- }
104125
- }
104126
- const personKey = MENTION_PERSON_KEYS.find((key2) => node2[key2] !== void 0) || "@_mentionpersonId";
104127
- const lengthKey = MENTION_LENGTH_KEYS.find((key2) => node2[key2] !== void 0) || "@_length";
104128
- node2[personKey] = mention.personId;
104129
- node2[lengthKey] = String(mention.length);
104130
- node2["@_startIndex"] = String(mention.startIndex);
104131
- if (mention.id) {
104132
- const idKey = node2["@_id"] !== void 0 && node2["@_mentionId"] === void 0 ? "@_id" : "@_mentionId";
104133
- node2[idKey] = mention.id;
104134
- }
104135
- return node2;
104136
- };
104137
- stripMentionLists = (node2) => {
104138
- const result = {};
104139
- for (const [key2, value] of Object.entries(node2)) {
104140
- if (key2.startsWith("@_") || mentionLocalName(key2) !== "mentionLst") {
104141
- result[key2] = value;
104142
- }
104143
- }
104144
- return result;
104145
- };
104146
- groupByContainer = (mentions) => {
104147
- const direct = [];
104148
- const byUri = /* @__PURE__ */ new Map();
104149
- for (const mention of mentions || []) {
104150
- if (!mention.containerUri) {
104151
- direct.push(mention);
104152
- continue;
104153
- }
104154
- const bucket = byUri.get(mention.containerUri);
104155
- if (bucket) {
104156
- bucket.push(mention);
104157
- } else {
104158
- byUri.set(mention.containerUri, [mention]);
104159
- }
104160
- }
104161
- return { direct, byUri };
104162
- };
104163
- }
104164
- });
104165
-
104166
104187
  // pptx/core/utils/modern-comment-text-body.ts
104167
104188
  function flattenBodyText(node2) {
104168
104189
  if (!node2) {
@@ -104556,7 +104577,13 @@ var init_modern_comment_xml = __esm({
104556
104577
  const originalBody = child23(raw2, "txBody");
104557
104578
  node2["p188:txBody"] = applyModernCommentText(originalBody, comment.text);
104558
104579
  const originalText = originalBody ? flattenBodyText(originalBody).join("\n") : comment.text;
104559
- const mentions = rebaseCommentMentions(comment.mentions, originalText, comment.text);
104580
+ const loadedMentions = raw2 ? readCommentMentions(raw2, () => void 0) : void 0;
104581
+ const mentions = rebaseCommentMentions(
104582
+ comment.mentions,
104583
+ originalText,
104584
+ comment.text,
104585
+ loadedMentions ?? []
104586
+ );
104560
104587
  const extension = applyCommentMentions(node2, mentions, child23(raw2, "extLst"), ownsMentions);
104561
104588
  if (extension) {
104562
104589
  node2["p188:extLst"] = extension;
@@ -138073,7 +138100,13 @@ var init_PptxHandlerRuntimeElementParsing = __esm({
138073
138100
  if (posterRId && relsMap) {
138074
138101
  const posterTarget = relsMap.get(posterRId);
138075
138102
  if (posterTarget) {
138076
- if (posterTarget.startsWith("http://") || posterTarget.startsWith("https://") || posterTarget.startsWith("data:")) {
138103
+ if (posterTarget.startsWith("http://") || posterTarget.startsWith("https://")) {
138104
+ if (this.allowExternalImages === true) {
138105
+ posterImage = posterTarget;
138106
+ imagePath = posterTarget;
138107
+ imageData = posterTarget;
138108
+ }
138109
+ } else if (posterTarget.startsWith("data:")) {
138077
138110
  posterImage = posterTarget;
138078
138111
  imagePath = posterTarget;
138079
138112
  imageData = posterTarget;
@@ -139259,7 +139292,12 @@ var init_PptxHandlerRuntimeShapeImageFill = __esm({
139259
139292
  const slideRels = this.slideRelsMap.get(slidePath);
139260
139293
  const target = slideRels?.get(relId);
139261
139294
  if (target) {
139262
- if (target.startsWith("http://") || target.startsWith("https://") || target.startsWith("data:")) {
139295
+ if (target.startsWith("http://") || target.startsWith("https://")) {
139296
+ if (this.allowExternalImages === true) {
139297
+ imagePath = target;
139298
+ imageData = target;
139299
+ }
139300
+ } else if (target.startsWith("data:")) {
139263
139301
  imagePath = target;
139264
139302
  imageData = target;
139265
139303
  } else {
@@ -139732,7 +139770,9 @@ var init_PptxHandlerRuntimeBulletParsing = __esm({
139732
139770
  const target = slideRels?.get(imageRelId);
139733
139771
  let imageDataUrl;
139734
139772
  if (target) {
139735
- if (target.startsWith("http://") || target.startsWith("https://") || target.startsWith("data:")) {
139773
+ if (target.startsWith("http://") || target.startsWith("https://")) {
139774
+ imageDataUrl = this.allowExternalImages === true ? target : void 0;
139775
+ } else if (target.startsWith("data:")) {
139736
139776
  imageDataUrl = target;
139737
139777
  } else {
139738
139778
  const imagePath = this.resolveImagePath(slidePath, target);
@@ -149462,6 +149502,7 @@ var init_PptxHandlerRuntimeLoadSession = __esm({
149462
149502
  async enrichBulletPictureElementsWithEmbeddedData(elements3, slidePath) {
149463
149503
  await enrichBulletPictureImages(elements3, slidePath, {
149464
149504
  slideRelsMap: this.slideRelsMap,
149505
+ allowExternalImages: this.allowExternalImages === true,
149465
149506
  resolveImagePath: (path4, target) => this.resolveImagePath(path4, target),
149466
149507
  getImageData: (imagePath) => this.getImageData(imagePath)
149467
149508
  });