ooxml-ui 1.44.0 → 1.45.0

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 (149) hide show
  1. package/README.md +4 -0
  2. package/dist/base.d.ts +1 -0
  3. package/dist/chart/format-pane-3d.d.ts +1 -0
  4. package/dist/chart/format-pane-advanced-intent.d.ts +1 -0
  5. package/dist/chart/format-pane-analysis.d.ts +1 -0
  6. package/dist/chart/format-pane-axis.d.ts +1 -0
  7. package/dist/chart/format-pane-common.d.ts +1 -0
  8. package/dist/chart/format-pane-effects.d.ts +1 -0
  9. package/dist/chart/format-pane-fields.d.ts +1 -0
  10. package/dist/chart/format-pane-fill-kinds.d.ts +1 -0
  11. package/dist/chart/format-pane-fill-line.d.ts +1 -0
  12. package/dist/chart/format-pane-locales/es.d.ts +1 -0
  13. package/dist/chart/format-pane-model.d.ts +1 -0
  14. package/dist/chart/format-pane-options.d.ts +1 -0
  15. package/dist/chart/format-pane-space.d.ts +1 -0
  16. package/dist/chart/format-pane-text.d.ts +1 -0
  17. package/dist/chart/format-pane-types.d.ts +1 -0
  18. package/dist/chart/format-pane-view.d.ts +1 -0
  19. package/dist/chrome/find-bar.d.ts +2 -1
  20. package/dist/{chunk-NH5ZSZMI.js → chunk-2YRHRV4H.js} +1 -1
  21. package/dist/{chunk-JWBWLGEY.js → chunk-LPI7LT4B.js} +2 -2
  22. package/dist/{chunk-2ZYRZANE.js → chunk-MWDG776V.js} +1 -1
  23. package/dist/{chunk-I57TCM2Q.js → chunk-UEFVC6V4.js} +1 -1
  24. package/dist/{chunk-M4ARYL3L.js → chunk-ZTLP52FH.js} +1 -1
  25. package/dist/controls.d.ts +1 -0
  26. package/dist/controls.js +1 -1
  27. package/dist/docx.js +4 -4
  28. package/dist/embedding/region-host.d.ts +1 -0
  29. package/dist/files/save-progress-label.d.ts +1 -0
  30. package/dist/fonts/custom-fonts.d.ts +1 -0
  31. package/dist/form/color-swatches.d.ts +1 -0
  32. package/dist/image-native-size.d.ts +1 -0
  33. package/dist/index.js +4 -4
  34. package/dist/picture-artistic-filters.d.ts +1 -0
  35. package/dist/picture-artistic-preview.d.ts +1 -0
  36. package/dist/picture-paint.d.ts +1 -0
  37. package/dist/pptx/{chart-3d-view-scene-D6OJTZYC.mjs → chart-3d-view-scene-7LIMCTEM.mjs} +3 -3
  38. package/dist/pptx/{chart-3d-view-scene-PC2RUBL4.cjs → chart-3d-view-scene-RCWYLVC3.cjs} +38 -38
  39. package/dist/pptx/{chunk-W2QJX2ON.mjs → chunk-2P6TH4ZE.mjs} +3 -0
  40. package/dist/pptx/{chunk-H6M3FKNG.mjs → chunk-3DJZBAQ2.mjs} +1 -1
  41. package/dist/pptx/{chunk-BNPTGOEZ.mjs → chunk-6JTQ7AG6.mjs} +3 -3
  42. package/dist/pptx/{chunk-LK35P6RE.cjs → chunk-CWBVJ4DC.cjs} +1043 -427
  43. package/dist/pptx/{chunk-HWJKBKCW.cjs → chunk-FI2ATACZ.cjs} +3 -3
  44. package/dist/pptx/{chunk-EDIAPF6J.mjs → chunk-G5NEBI7N.mjs} +3 -3
  45. package/dist/pptx/{chunk-HB6CH2FF.cjs → chunk-GYI2TFSW.cjs} +3 -3
  46. package/dist/pptx/{chunk-D3DQS2J2.mjs → chunk-HGT3CA36.mjs} +796 -200
  47. package/dist/pptx/{chunk-2SO3BL67.cjs → chunk-HTFYAGHG.cjs} +238 -87
  48. package/dist/pptx/{chunk-2GDYTHUY.cjs → chunk-LOUVYGWX.cjs} +12 -12
  49. package/dist/pptx/{chunk-ZH35NTNU.cjs → chunk-MZCAYJ7H.cjs} +49 -49
  50. package/dist/pptx/{chunk-KYTG7WNC.mjs → chunk-S6P7UWGZ.mjs} +2 -2
  51. package/dist/pptx/{chunk-ZHVKGGLQ.cjs → chunk-UFJBHFSD.cjs} +3 -0
  52. package/dist/pptx/{chunk-TDALHSYV.mjs → chunk-XL5AF4U3.mjs} +211 -73
  53. package/dist/pptx/dom/elements/connector.d.ts.map +1 -1
  54. package/dist/pptx/dom/index.cjs +458 -449
  55. package/dist/pptx/dom/index.mjs +32 -23
  56. package/dist/pptx/export/html2canvas-clone.cjs +7 -7
  57. package/dist/pptx/export/html2canvas-clone.mjs +2 -2
  58. package/dist/pptx/i18n/index.cjs +6 -6
  59. package/dist/pptx/i18n/index.mjs +1 -1
  60. package/dist/pptx/i18n/translations-en.d.ts.map +1 -1
  61. package/dist/pptx/index.cjs +3547 -3459
  62. package/dist/pptx/index.mjs +6 -6
  63. package/dist/pptx/render/chart-combo-stock.cjs +4 -4
  64. package/dist/pptx/render/chart-combo-stock.mjs +2 -2
  65. package/dist/pptx/render/chart-overlays.cjs +8 -8
  66. package/dist/pptx/render/chart-overlays.mjs +2 -2
  67. package/dist/pptx/render/chart-surface-treemap.cjs +5 -5
  68. package/dist/pptx/render/chart-surface-treemap.mjs +2 -2
  69. package/dist/pptx/render/chart-view-model.cjs +45 -45
  70. package/dist/pptx/render/chart-view-model.mjs +2 -2
  71. package/dist/pptx/render/chart-waterfall-map.cjs +7 -7
  72. package/dist/pptx/render/chart-waterfall-map.mjs +2 -2
  73. package/dist/pptx/render/connector-dash.d.ts +15 -0
  74. package/dist/pptx/render/connector-dash.d.ts.map +1 -1
  75. package/dist/pptx/render/connector-path.d.ts +1 -1
  76. package/dist/pptx/render/connector-path.d.ts.map +1 -1
  77. package/dist/pptx/render/customization/customization-controller.d.ts +8 -0
  78. package/dist/pptx/render/customization/customization-controller.d.ts.map +1 -1
  79. package/dist/pptx/render/dash-pattern.d.ts +5 -56
  80. package/dist/pptx/render/dash-pattern.d.ts.map +1 -1
  81. package/dist/pptx/render/dash-square-cap.d.ts +34 -0
  82. package/dist/pptx/render/dash-square-cap.d.ts.map +1 -0
  83. package/dist/pptx/render/deck-webfont-outlines.d.ts +25 -0
  84. package/dist/pptx/render/deck-webfont-outlines.d.ts.map +1 -0
  85. package/dist/pptx/render/deck-webfont-readiness.d.ts +59 -0
  86. package/dist/pptx/render/deck-webfont-readiness.d.ts.map +1 -0
  87. package/dist/pptx/render/device-pixel-stroke.d.ts +1 -1
  88. package/dist/pptx/render/device-pixel-stroke.d.ts.map +1 -1
  89. package/dist/pptx/render/fill-style.d.ts +6 -0
  90. package/dist/pptx/render/fill-style.d.ts.map +1 -1
  91. package/dist/pptx/render/google-webfonts.d.ts +11 -1
  92. package/dist/pptx/render/google-webfonts.d.ts.map +1 -1
  93. package/dist/pptx/render/gradient-svg-image.d.ts +9 -0
  94. package/dist/pptx/render/gradient-svg-image.d.ts.map +1 -1
  95. package/dist/pptx/render/index.d.ts +4 -0
  96. package/dist/pptx/render/index.d.ts.map +1 -1
  97. package/dist/pptx/render/options/font-download-policy.d.ts +52 -0
  98. package/dist/pptx/render/options/font-download-policy.d.ts.map +1 -0
  99. package/dist/pptx/render/options/index.d.ts +1 -0
  100. package/dist/pptx/render/options/index.d.ts.map +1 -1
  101. package/dist/pptx/render/options/viewer-options-tabs-advanced.d.ts.map +1 -1
  102. package/dist/pptx/render/options/viewer-options.d.ts +2 -0
  103. package/dist/pptx/render/options/viewer-options.d.ts.map +1 -1
  104. package/dist/pptx/render/paragraph-baseline.d.ts +13 -2
  105. package/dist/pptx/render/paragraph-baseline.d.ts.map +1 -1
  106. package/dist/pptx/render/paragraph-run-build.d.ts.map +1 -1
  107. package/dist/pptx/render/paragraph-trailing-break.d.ts +15 -0
  108. package/dist/pptx/render/paragraph-trailing-break.d.ts.map +1 -0
  109. package/dist/pptx/render/shape-path-gradient-fill.d.ts +20 -0
  110. package/dist/pptx/render/shape-path-gradient-fill.d.ts.map +1 -0
  111. package/dist/pptx/render/silhouette-effects.d.ts.map +1 -1
  112. package/dist/pptx/render/stroke-outline.d.ts.map +1 -1
  113. package/dist/pptx/render/svg-attr-escape.d.ts +30 -0
  114. package/dist/pptx/render/svg-attr-escape.d.ts.map +1 -0
  115. package/dist/pptx/render/svg-gradient-paint.d.ts +6 -1
  116. package/dist/pptx/render/svg-gradient-paint.d.ts.map +1 -1
  117. package/dist/pptx/render/table-cell-baseline.d.ts +2 -1
  118. package/dist/pptx/render/table-cell-baseline.d.ts.map +1 -1
  119. package/dist/pptx/render/table-cell-paragraphs.d.ts.map +1 -1
  120. package/dist/pptx/render/text-body-top-snap.d.ts +43 -0
  121. package/dist/pptx/render/text-body-top-snap.d.ts.map +1 -0
  122. package/dist/pptx/render/text-design-tracking.d.ts +20 -0
  123. package/dist/pptx/render/text-design-tracking.d.ts.map +1 -0
  124. package/dist/pptx/render/text-line-height.d.ts +8 -0
  125. package/dist/pptx/render/text-line-height.d.ts.map +1 -1
  126. package/dist/pptx/render/text-metric-tracking.d.ts.map +1 -1
  127. package/dist/pptx/render/text-paragraphs.d.ts.map +1 -1
  128. package/dist/pptx/render/text-warp-arch-fit.d.ts +51 -0
  129. package/dist/pptx/render/text-warp-arch-fit.d.ts.map +1 -0
  130. package/dist/pptx/render/text-warp-arch.d.ts +53 -13
  131. package/dist/pptx/render/text-warp-arch.d.ts.map +1 -1
  132. package/dist/pptx/render/text-warp-envelope-measure.d.ts +5 -0
  133. package/dist/pptx/render/text-warp-envelope-measure.d.ts.map +1 -1
  134. package/dist/pptx/render/text-warp-outline-webfont-fetch.d.ts.map +1 -1
  135. package/dist/pptx/render/text-warp.d.ts +3 -1
  136. package/dist/pptx/render/text-warp.d.ts.map +1 -1
  137. package/dist/pptx/render/visual-effects.d.ts +2 -21
  138. package/dist/pptx/render/visual-effects.d.ts.map +1 -1
  139. package/dist/pptx/{smartart-insert-preview-55QCEISC.cjs → smartart-insert-preview-R7USUBIX.cjs} +8 -8
  140. package/dist/pptx/{smartart-insert-preview-GPBTE3HU.mjs → smartart-insert-preview-ZKVFXFSI.mjs} +7 -7
  141. package/dist/render-cache.d.ts +1 -0
  142. package/dist/ribbon/ribbon-group.d.ts +2 -1
  143. package/dist/ribbon/svg-preview.d.ts +1 -0
  144. package/dist/teams.js +2 -2
  145. package/dist/theme-bridge.d.ts +1 -0
  146. package/dist/theme.d.ts +1 -0
  147. package/dist/visio.js +23 -6
  148. package/dist/xlsx.js +7 -7
  149. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk2GDYTHUY_cjs = require('./chunk-2GDYTHUY.cjs');
3
+ var chunkLOUVYGWX_cjs = require('./chunk-LOUVYGWX.cjs');
4
4
  var chunkXOAXPD2W_cjs = require('./chunk-XOAXPD2W.cjs');
5
5
  var chunkW3X2UVYQ_cjs = require('./chunk-W3X2UVYQ.cjs');
6
6
  var chunkWSTWYZFM_cjs = require('./chunk-WSTWYZFM.cjs');
@@ -14,17 +14,17 @@ var chunkFFWLDANS_cjs = require('./chunk-FFWLDANS.cjs');
14
14
  var chunkZJFN5POF_cjs = require('./chunk-ZJFN5POF.cjs');
15
15
  var chunkOJFD3SHS_cjs = require('./chunk-OJFD3SHS.cjs');
16
16
  var chunkUSBRSEJK_cjs = require('./chunk-USBRSEJK.cjs');
17
- var chunk2SO3BL67_cjs = require('./chunk-2SO3BL67.cjs');
17
+ var chunkHTFYAGHG_cjs = require('./chunk-HTFYAGHG.cjs');
18
18
  var chunkFOE75Z6N_cjs = require('./chunk-FOE75Z6N.cjs');
19
19
  var chunkNTXHQHCS_cjs = require('./chunk-NTXHQHCS.cjs');
20
- var chunkHB6CH2FF_cjs = require('./chunk-HB6CH2FF.cjs');
21
- var chunkHWJKBKCW_cjs = require('./chunk-HWJKBKCW.cjs');
20
+ var chunkGYI2TFSW_cjs = require('./chunk-GYI2TFSW.cjs');
21
+ var chunkFI2ATACZ_cjs = require('./chunk-FI2ATACZ.cjs');
22
22
  var chunk3CYWRMYZ_cjs = require('./chunk-3CYWRMYZ.cjs');
23
23
  var chunkEW5DW5KR_cjs = require('./chunk-EW5DW5KR.cjs');
24
24
  var chunkUPN5FFKP_cjs = require('./chunk-UPN5FFKP.cjs');
25
25
  var chunkXZSGVMRN_cjs = require('./chunk-XZSGVMRN.cjs');
26
26
  var chunkU47LRWDT_cjs = require('./chunk-U47LRWDT.cjs');
27
- var chunkZHVKGGLQ_cjs = require('./chunk-ZHVKGGLQ.cjs');
27
+ var chunkUFJBHFSD_cjs = require('./chunk-UFJBHFSD.cjs');
28
28
  var chunk3RIGT7H6_cjs = require('./chunk-3RIGT7H6.cjs');
29
29
  var chunkPBZWDEXQ_cjs = require('./chunk-PBZWDEXQ.cjs');
30
30
  var pptx = require('ooxml-core/pptx');
@@ -335,7 +335,7 @@ function buildHollowHitOutline(element) {
335
335
  if (!isHollowShapeElement(element)) {
336
336
  return buildSilhouetteHitArea(element);
337
337
  }
338
- const d = chunk2SO3BL67_cjs.outlinePathData(chunk2SO3BL67_cjs.getResolvedShapeClipPath(element), element.width, element.height);
338
+ const d = chunkHTFYAGHG_cjs.outlinePathData(chunkHTFYAGHG_cjs.getResolvedShapeClipPath(element), element.width, element.height);
339
339
  if (!d) {
340
340
  return void 0;
341
341
  }
@@ -352,10 +352,10 @@ function passesClicksThroughBox(element) {
352
352
  return isHollowShapeElement(element) || buildSilhouetteHitArea(element) !== void 0;
353
353
  }
354
354
  function buildSilhouetteHitArea(element) {
355
- if (element.type !== "shape" || !chunk2SO3BL67_cjs.usesSilhouetteEffects(element)) {
355
+ if (element.type !== "shape" || !chunkHTFYAGHG_cjs.usesSilhouetteEffects(element)) {
356
356
  return void 0;
357
357
  }
358
- const d = chunk2SO3BL67_cjs.outlinePathData(chunk2SO3BL67_cjs.getResolvedShapeClipPath(element), element.width, element.height);
358
+ const d = chunkHTFYAGHG_cjs.outlinePathData(chunkHTFYAGHG_cjs.getResolvedShapeClipPath(element), element.width, element.height);
359
359
  if (!d) {
360
360
  return void 0;
361
361
  }
@@ -426,21 +426,21 @@ function mapPresentationWheel(input, buffer) {
426
426
 
427
427
  // src/pptx/render/shape-geometry-cascade.ts
428
428
  function resolveShapeGeometry(element) {
429
- const decision = chunk2SO3BL67_cjs.resolveBaseShapeGeometry(element);
430
- if (decision.kind === "clipPath" && chunk2SO3BL67_cjs.usesSilhouetteEffects(element)) {
429
+ const decision = chunkHTFYAGHG_cjs.resolveBaseShapeGeometry(element);
430
+ if (decision.kind === "clipPath" && chunkHTFYAGHG_cjs.usesSilhouetteEffects(element)) {
431
431
  return { kind: "none" };
432
432
  }
433
433
  return decision;
434
434
  }
435
435
  function getSilhouetteFillLayer(element) {
436
- if (!chunk2SO3BL67_cjs.silhouetteFillsLayer(element) || !pptx.hasShapeProperties(element) || !element.shapeStyle) {
436
+ if (!chunkHTFYAGHG_cjs.silhouetteFillsLayer(element) || !pptx.hasShapeProperties(element) || !element.shapeStyle) {
437
437
  return void 0;
438
438
  }
439
- const geometry = chunk2SO3BL67_cjs.resolveBaseShapeGeometry(element);
439
+ const geometry = chunkHTFYAGHG_cjs.resolveBaseShapeGeometry(element);
440
440
  if (geometry.kind !== "clipPath") {
441
441
  return void 0;
442
442
  }
443
- const fill3 = chunk2SO3BL67_cjs.resolveComputedFill(element.shapeStyle, element);
443
+ const fill3 = chunkHTFYAGHG_cjs.resolveComputedFill(element.shapeStyle, element);
444
444
  const style = {
445
445
  position: "absolute",
446
446
  inset: "0",
@@ -721,11 +721,11 @@ function getAnimationColorBaseStyle(element, options = {}) {
721
721
  }
722
722
  const style = {};
723
723
  if (options.animatesFill) {
724
- const fill3 = chunk2SO3BL67_cjs.getComputedFillStyle(element, options.parentGroupFill);
724
+ const fill3 = chunkHTFYAGHG_cjs.getComputedFillStyle(element, options.parentGroupFill);
725
725
  style[ANIMATION_COLOR_BASE_PROPERTIES.fill] = fill3?.backgroundColor ?? element.shapeStyle?.fillColor ?? "currentColor";
726
726
  }
727
727
  if (options.animatesStroke) {
728
- const stroke = chunk2SO3BL67_cjs.getComputedStrokeStyle(element);
728
+ const stroke = chunkHTFYAGHG_cjs.getComputedStrokeStyle(element);
729
729
  style[ANIMATION_COLOR_BASE_PROPERTIES.stroke] = stroke.borderColor ?? element.shapeStyle?.strokeColor ?? "currentColor";
730
730
  }
731
731
  style[ANIMATION_COLOR_BASE_PROPERTIES.color] = (pptx.hasTextProperties(element) ? element.textStyle?.color : void 0) ?? "currentColor";
@@ -783,13 +783,13 @@ function getPictureShadowFilter(element) {
783
783
  if (!pptx.isImageLikeElement(element) || !pptx.hasShapeProperties(element)) {
784
784
  return void 0;
785
785
  }
786
- return chunk2SO3BL67_cjs.getCompositeOuterShadowFilterCss(element.shapeStyle, { rotation: element.rotation });
786
+ return chunkHTFYAGHG_cjs.getCompositeOuterShadowFilterCss(element.shapeStyle, { rotation: element.rotation });
787
787
  }
788
788
  function hasPictureFrame(element) {
789
789
  if (!pptx.isImageLikeElement(element)) {
790
790
  return false;
791
791
  }
792
- return chunk2SO3BL67_cjs.buildStrokeOutline(element) !== void 0 || getPictureShadowFilter(element) !== void 0;
792
+ return chunkHTFYAGHG_cjs.buildStrokeOutline(element) !== void 0 || getPictureShadowFilter(element) !== void 0;
793
793
  }
794
794
  function getPictureFrameLayers(element, clip) {
795
795
  const clipStyle = {
@@ -853,7 +853,7 @@ function buildMirrorTiledBackground(src, flip, scaleX, scaleY, nativeSize) {
853
853
  const flipY = flip === "y" || flip === "xy";
854
854
  const cols = flipX ? 2 : 1;
855
855
  const rows = flipY ? 2 : 1;
856
- const href = chunk2SO3BL67_cjs.escapeSvgAttr(src);
856
+ const href = chunkHTFYAGHG_cjs.escapeSvgAttr(src);
857
857
  const images = [];
858
858
  for (let cy = 0; cy < rows; cy++) {
859
859
  for (let cx = 0; cx < cols; cx++) {
@@ -940,7 +940,7 @@ function probeNativeImageSize(src) {
940
940
  }).then((size2) => {
941
941
  if (pendingProbes.get(src) === probe) pendingProbes.delete(src);
942
942
  if (size2 && epoch === cacheEpoch) {
943
- chunk2SO3BL67_cjs.setBoundedRenderCache(sizeCache, src, size2, CACHE_MAX);
943
+ chunkHTFYAGHG_cjs.setBoundedRenderCache(sizeCache, src, size2, CACHE_MAX);
944
944
  }
945
945
  return size2;
946
946
  });
@@ -959,7 +959,7 @@ function getGroupChildParentFill(group, inheritedFill) {
959
959
  if (group.type !== "group") {
960
960
  return void 0;
961
961
  }
962
- chunk2SO3BL67_cjs.registerGroupChildren(group);
962
+ chunkHTFYAGHG_cjs.registerGroupChildren(group);
963
963
  const own = group.groupFill;
964
964
  return own && own.fillMode !== "group" ? own : inheritedFill;
965
965
  }
@@ -967,7 +967,7 @@ function resolveGroupChildFill(child, parentGroupFill) {
967
967
  if (!parentGroupFill || !pptx.hasShapeProperties(child) || child.shapeStyle?.fillMode !== "group") {
968
968
  return void 0;
969
969
  }
970
- return chunk2SO3BL67_cjs.getComputedFillStyle(child, parentGroupFill);
970
+ return chunkHTFYAGHG_cjs.getComputedFillStyle(child, parentGroupFill);
971
971
  }
972
972
 
973
973
  // src/pptx/render/verified-text-rect-presets.ts
@@ -1267,8 +1267,8 @@ var CENTRED_EPSILON_PX = 0.01;
1267
1267
  function textRectCentreX(element) {
1268
1268
  const ts = pptx.hasTextProperties(element) ? element.textStyle : void 0;
1269
1269
  const rect3 = resolveTextBodyRectPadding(element);
1270
- const left = rect3.left + (ts?.bodyInsetLeft ?? chunk2SO3BL67_cjs.DEFAULT_BODY_INSET_LR_PX);
1271
- const right = rect3.right + (ts?.bodyInsetRight ?? chunk2SO3BL67_cjs.DEFAULT_BODY_INSET_LR_PX);
1270
+ const left = rect3.left + (ts?.bodyInsetLeft ?? chunkHTFYAGHG_cjs.DEFAULT_BODY_INSET_LR_PX);
1271
+ const right = rect3.right + (ts?.bodyInsetRight ?? chunkHTFYAGHG_cjs.DEFAULT_BODY_INSET_LR_PX);
1272
1272
  return (left + element.width - right) / 2;
1273
1273
  }
1274
1274
  function getTextCompensationOrigin(element) {
@@ -1276,7 +1276,7 @@ function getTextCompensationOrigin(element) {
1276
1276
  return Math.abs(centre2 - element.width / 2) <= CENTRED_EPSILON_PX ? "center" : `${Math.round(centre2 * 1e3) / 1e3}px 50%`;
1277
1277
  }
1278
1278
  function getTextCompensationStyle(element) {
1279
- const transform = chunk2SO3BL67_cjs.getTextCompensationTransform(element);
1279
+ const transform = chunkHTFYAGHG_cjs.getTextCompensationTransform(element);
1280
1280
  return transform ? { transform, transformOrigin: getTextCompensationOrigin(element) } : void 0;
1281
1281
  }
1282
1282
  function getFrameInverseTransform(element) {
@@ -1329,9 +1329,9 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
1329
1329
  }
1330
1330
  if (colorNode["a:scrgbClr"]) {
1331
1331
  const scrgb = colorNode["a:scrgbClr"];
1332
- const red = chunk2SO3BL67_cjs.parseDrawingPercent(scrgb["@_r"]);
1333
- const green = chunk2SO3BL67_cjs.parseDrawingPercent(scrgb["@_g"]);
1334
- const blue = chunk2SO3BL67_cjs.parseDrawingPercent(scrgb["@_b"]);
1332
+ const red = chunkHTFYAGHG_cjs.parseDrawingPercent(scrgb["@_r"]);
1333
+ const green = chunkHTFYAGHG_cjs.parseDrawingPercent(scrgb["@_g"]);
1334
+ const blue = chunkHTFYAGHG_cjs.parseDrawingPercent(scrgb["@_b"]);
1335
1335
  if (red !== void 0 && green !== void 0 && blue !== void 0) {
1336
1336
  const toHex2 = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
1337
1337
  const base2 = `#${toHex2(red * 255)}${toHex2(green * 255)}${toHex2(blue * 255)}`;
@@ -1371,8 +1371,8 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
1371
1371
  const lumRaw = Number.parseFloat(String(hslNode["@_lum"] ?? ""));
1372
1372
  if (Number.isFinite(hueRaw) && Number.isFinite(satRaw) && Number.isFinite(lumRaw)) {
1373
1373
  const h = hueRaw / 6e4;
1374
- const s = chunk2SO3BL67_cjs.clampUnitInterval(satRaw / 1e5);
1375
- const l = chunk2SO3BL67_cjs.clampUnitInterval(lumRaw / 1e5);
1374
+ const s = chunkHTFYAGHG_cjs.clampUnitInterval(satRaw / 1e5);
1375
+ const l = chunkHTFYAGHG_cjs.clampUnitInterval(lumRaw / 1e5);
1376
1376
  const rgb = pptx.hslToRgb(h, s, l);
1377
1377
  const toHex2 = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
1378
1378
  const base2 = `#${toHex2(rgb.r)}${toHex2(rgb.g)}${toHex2(rgb.b)}`;
@@ -1412,11 +1412,11 @@ function parseDrawingColorOpacity(colorNode) {
1412
1412
  if (!colorChoice) {
1413
1413
  return void 0;
1414
1414
  }
1415
- const alpha = chunk2SO3BL67_cjs.parseDrawingPercent(colorChoice["a:alpha"]?.["@_val"]);
1416
- const alphaMod = chunk2SO3BL67_cjs.parseDrawingPercent(
1415
+ const alpha = chunkHTFYAGHG_cjs.parseDrawingPercent(colorChoice["a:alpha"]?.["@_val"]);
1416
+ const alphaMod = chunkHTFYAGHG_cjs.parseDrawingPercent(
1417
1417
  colorChoice["a:alphaMod"]?.["@_val"]
1418
1418
  );
1419
- const alphaOff = chunk2SO3BL67_cjs.parseDrawingPercent(
1419
+ const alphaOff = chunkHTFYAGHG_cjs.parseDrawingPercent(
1420
1420
  colorChoice["a:alphaOff"]?.["@_val"]
1421
1421
  );
1422
1422
  if (alpha === void 0 && alphaMod === void 0 && alphaOff === void 0) {
@@ -1429,7 +1429,7 @@ function parseDrawingColorOpacity(colorNode) {
1429
1429
  if (alphaOff !== void 0) {
1430
1430
  opacity += alphaOff;
1431
1431
  }
1432
- return chunk2SO3BL67_cjs.clampUnitInterval(opacity);
1432
+ return chunkHTFYAGHG_cjs.clampUnitInterval(opacity);
1433
1433
  }
1434
1434
  function splitRunByScriptFont(text4, fonts, baseFontFamily, nestedDecoration) {
1435
1435
  const pieces = text$1.segmentByFont(text4, fonts);
@@ -1445,7 +1445,7 @@ function getFrameEffectStyle(element) {
1445
1445
  if (element.type !== "group" && element.type !== "chart") {
1446
1446
  return void 0;
1447
1447
  }
1448
- const fx2 = chunk2SO3BL67_cjs.getComputedEffectStyle(element);
1448
+ const fx2 = chunkHTFYAGHG_cjs.getComputedEffectStyle(element);
1449
1449
  const style = {};
1450
1450
  if (fx2.filter) {
1451
1451
  style.filter = fx2.filter;
@@ -1821,7 +1821,7 @@ function buildPatternOverlayTile(pattern) {
1821
1821
  if (!pattern) {
1822
1822
  return void 0;
1823
1823
  }
1824
- const tile9 = chunk2SO3BL67_cjs.getPatternTile(
1824
+ const tile9 = chunkHTFYAGHG_cjs.getPatternTile(
1825
1825
  pattern.preset,
1826
1826
  pattern.foreground ?? "#000000",
1827
1827
  pattern.background ?? "#ffffff"
@@ -2014,8 +2014,8 @@ var GRAYSCALE_LUMINANCE_MATRIX = [
2014
2014
  0
2015
2015
  ].join(" ");
2016
2016
  function buildDuotoneFilterMarkup(color1, color2) {
2017
- const c1 = chunk2SO3BL67_cjs.hexToRgbUnit(color1);
2018
- const c2 = chunk2SO3BL67_cjs.hexToRgbUnit(color2);
2017
+ const c1 = chunkHTFYAGHG_cjs.hexToRgbUnit(color1);
2018
+ const c2 = chunkHTFYAGHG_cjs.hexToRgbUnit(color2);
2019
2019
  return `<feColorMatrix type="matrix" values="${GRAYSCALE_LUMINANCE_MATRIX}"/><feComponentTransfer><feFuncR type="linear" slope="${c2.r - c1.r}" intercept="${c1.r}"/><feFuncG type="linear" slope="${c2.g - c1.g}" intercept="${c1.g}"/><feFuncB type="linear" slope="${c2.b - c1.b}" intercept="${c1.b}"/></feComponentTransfer>`;
2020
2020
  }
2021
2021
  function getDuotoneImageFilter(element, elementId = pptx.isImageLikeElement(element) ? element.id : "") {
@@ -2113,7 +2113,7 @@ function buildImageAlphaFilterMarkup(effects) {
2113
2113
  );
2114
2114
  }
2115
2115
  if (effects.clrRepl) {
2116
- const c = chunk2SO3BL67_cjs.hexToRgbUnit(effects.clrRepl.color);
2116
+ const c = chunkHTFYAGHG_cjs.hexToRgbUnit(effects.clrRepl.color);
2117
2117
  next2(
2118
2118
  (inp, out) => `<feColorMatrix in="${inp}" result="${out}" type="matrix" values="0 0 0 0 ${c.r} 0 0 0 0 ${c.g} 0 0 0 0 ${c.b} 0 0 0 1 0"/>`
2119
2119
  );
@@ -2202,27 +2202,50 @@ function getImageBackgroundRemoval(element) {
2202
2202
  // src/pptx/render/text-warp-arch.ts
2203
2203
  var ARCH_DEFAULT_ADJ = 108e5;
2204
2204
  var ARCH_FRAME_INSET = { up: 6.3, down: 8.5 };
2205
- function archEllipsePath(width, height, t2, adj, half) {
2206
- if (adj !== void 0 && adj !== ARCH_DEFAULT_ADJ) {
2207
- return void 0;
2208
- }
2209
- const scale3 = Math.max(0.1, 1 + (0.5 - t2) * 0.7);
2210
- const rx = width / 2 * scale3;
2211
- const ry = height / 2 * scale3;
2212
- const cy = height / 2 + ARCH_FRAME_INSET[half];
2205
+ function normalizeWarpAngle(adj) {
2206
+ const turn = 216e5;
2207
+ return (adj % turn + turn) % turn / 6e4;
2208
+ }
2209
+ function archOnUpperHalf(adj, half) {
2210
+ const degrees = normalizeWarpAngle(adj ?? (half === "up" ? ARCH_DEFAULT_ADJ : 0));
2211
+ return degrees >= 90 && degrees < 270;
2212
+ }
2213
+ function archEllipseRadii(width, height, outward) {
2214
+ return { rx: Math.max(1, width / 2 + outward), ry: Math.max(1, height / 2 + outward) };
2215
+ }
2216
+ var WARP_ARC_LINE_PITCH_EM = 1.2;
2217
+ function warpLineOutward(preset2, lineIndex, lineCount, gap) {
2218
+ const steps = preset2 === "textArchDown" ? lineIndex : lineCount - 1 - lineIndex;
2219
+ return Math.max(0, steps) * gap;
2220
+ }
2221
+ function archEllipsePath(width, height, outward, adj, half) {
2222
+ const { rx, ry } = archEllipseRadii(width, height, outward);
2223
+ const turned2 = archOnUpperHalf(adj, half) !== (half === "up");
2224
+ const inset3 = ARCH_FRAME_INSET[half];
2213
2225
  const x0 = width / 2 - rx;
2214
2226
  const x1 = width / 2 + rx;
2215
- return `M ${x0},${cy} A ${rx},${ry} 0 0,${half === "up" ? 1 : 0} ${x1},${cy}`;
2227
+ const sweep = half === "up" ? 1 : 0;
2228
+ if (!turned2) {
2229
+ const cy2 = height / 2 + inset3;
2230
+ return `M ${x0},${cy2} A ${rx},${ry} 0 0,${sweep} ${x1},${cy2}`;
2231
+ }
2232
+ const cy = height / 2 - inset3;
2233
+ return `M ${x1},${cy} A ${rx},${ry} 0 0,${sweep} ${x0},${cy}`;
2216
2234
  }
2217
2235
  var CIRCLE_DEFAULT_ADJ = 108e5;
2218
2236
  var CIRCLE_FIT = { dx: 2.25, dy: 1, drx: 3, dry: -12.75, degrees: -9.5 };
2219
- function circleEllipsePath(width, height, t2, adj) {
2220
- const scale3 = Math.max(0.1, 1 + (0.5 - t2) * 0.7);
2221
- const rx = width / 2 * scale3 + CIRCLE_FIT.drx;
2222
- const ry = height / 2 * scale3 + CIRCLE_FIT.dry;
2237
+ function circleLoopRadii(width, height, outward) {
2238
+ return {
2239
+ rx: Math.max(1, width / 2 + CIRCLE_FIT.drx + outward),
2240
+ ry: Math.max(1, height / 2 + CIRCLE_FIT.dry + outward)
2241
+ };
2242
+ }
2243
+ function circleEllipsePath(width, height, outward, adj) {
2244
+ const { rx, ry } = circleLoopRadii(width, height, outward);
2223
2245
  const cx = width / 2 + CIRCLE_FIT.dx;
2224
2246
  const cy = height / 2 + CIRCLE_FIT.dy;
2225
- const degrees = (adj ?? CIRCLE_DEFAULT_ADJ) % 216e5 / 6e4 + CIRCLE_FIT.degrees;
2247
+ const startsLeft = normalizeWarpAngle(adj ?? CIRCLE_DEFAULT_ADJ) >= 180;
2248
+ const degrees = (startsLeft ? 180 : 0) + CIRCLE_FIT.degrees;
2226
2249
  const angle = degrees * (Math.PI / 180);
2227
2250
  const x0 = cx + rx * Math.cos(angle);
2228
2251
  const y0 = cy + ry * Math.sin(angle);
@@ -2374,34 +2397,14 @@ var SVG_WARP_PRESETS = /* @__PURE__ */ new Set([
2374
2397
  "textPlain"
2375
2398
  ]);
2376
2399
  var clamp4 = (n) => Math.max(0, Math.min(n, 4));
2377
- function archUpPath(w, h, t2, adj) {
2378
- const arch = archEllipsePath(w, h, t2, adj, "up");
2379
- if (arch) {
2380
- return arch;
2381
- }
2382
- const adjNorm = adj !== void 0 ? Math.max(0, Math.min(adj / 216e5, 1)) : 0.5;
2383
- const maxArch = 0.85 * adjNorm / 0.5;
2384
- const archH = h * Math.max(0, maxArch - t2 * 0.7);
2385
- if (archH < 1) {
2386
- return `M 0,${h} L ${w},${h}`;
2387
- }
2388
- return `M 0,${h} A ${w / 2},${archH} 0 0,1 ${w},${h}`;
2400
+ function archUpPath(w, h, _t, adj) {
2401
+ return archEllipsePath(w, h, 0, adj, "up");
2389
2402
  }
2390
- function archDownPath(w, h, t2, adj) {
2391
- const arch = archEllipsePath(w, h, t2, adj, "down");
2392
- if (arch) {
2393
- return arch;
2394
- }
2395
- const adjNorm = adj !== void 0 ? Math.max(0, Math.min(adj / 216e5, 1)) : 0.5;
2396
- const baseDepth = 0.15 * adjNorm / 0.5;
2397
- const archH = h * (baseDepth + t2 * 0.7);
2398
- if (archH < 1) {
2399
- return `M 0,0 L ${w},0`;
2400
- }
2401
- return `M 0,0 A ${w / 2},${archH} 0 0,0 ${w},0`;
2403
+ function archDownPath(w, h, _t, adj) {
2404
+ return archEllipsePath(w, h, 0, adj, "down");
2402
2405
  }
2403
- function circlePath(w, h, t2, adj) {
2404
- return circleEllipsePath(w, h, t2, adj);
2406
+ function circlePath(w, h, _t, adj) {
2407
+ return circleEllipsePath(w, h, 0, adj);
2405
2408
  }
2406
2409
  function wave1Path(w, h, t2, adj, adj2) {
2407
2410
  const yMid = h * (0.25 + t2 * 0.5);
@@ -2483,15 +2486,8 @@ function canDownPath(w, h, t2, adj) {
2483
2486
  }
2484
2487
  return `M 0,0 A ${w / 2},${archH} 0 0,0 ${w},0`;
2485
2488
  }
2486
- function buttonPath(w, h, t2, adj) {
2487
- const arch = archEllipsePath(w, h, t2, adj, "up");
2488
- if (arch) {
2489
- return arch;
2490
- }
2491
- const yBase = h * (0.1 + t2 * 0.8);
2492
- const intensity = adj !== void 0 ? clamp4(adj / 18750) : 1;
2493
- const bulge = h * 0.11 * intensity + h * 0.08 * intensity * (0.5 - t2);
2494
- return `M 0,${yBase} Q ${w / 2},${yBase - bulge} ${w},${yBase}`;
2489
+ function buttonPath(w, h, _t, adj) {
2490
+ return archEllipsePath(w, h, 0, adj, "up");
2495
2491
  }
2496
2492
  function ringInsidePath(w, h, t2, adj) {
2497
2493
  const cx = w / 2;
@@ -2745,8 +2741,18 @@ function hasTextWarp(element) {
2745
2741
  }
2746
2742
  return shouldUseSvgWarp(element.textStyle?.textWarpPreset);
2747
2743
  }
2748
- function buildWarpPath(preset2, width, height, lineIndex, lineCount, adj, adj2) {
2744
+ function buildWarpPath(preset2, width, height, lineIndex, lineCount, adj, adj2, lineGap = 0) {
2749
2745
  const t2 = lineCount <= 1 ? 0.5 : lineIndex / (lineCount - 1);
2746
+ const outward = warpLineOutward(preset2, lineIndex, lineCount, lineGap);
2747
+ if (preset2 === "textArchUp" || preset2 === "textButton") {
2748
+ return archEllipsePath(width, height, outward, adj, "up");
2749
+ }
2750
+ if (preset2 === "textArchDown") {
2751
+ return archEllipsePath(width, height, outward, adj, "down");
2752
+ }
2753
+ if (preset2 === "textCircle") {
2754
+ return circleEllipsePath(width, height, outward, adj);
2755
+ }
2750
2756
  const generator = WARP_PATH_GENERATORS[preset2];
2751
2757
  if (generator) {
2752
2758
  return generator(width, height, t2, adj, adj2);
@@ -4968,7 +4974,89 @@ function fontStyleShorthand(fontFamily, italic) {
4968
4974
  return resolveFontItalic(fontFamily, italic) ? "italic " : "";
4969
4975
  }
4970
4976
 
4971
- // src/pptx/render/text-warp-run-paint.ts
4977
+ // src/pptx/render/text-warp-envelope-measure.ts
4978
+ var measureCtx;
4979
+ function getMeasureCtx() {
4980
+ if (measureCtx !== void 0) {
4981
+ return measureCtx;
4982
+ }
4983
+ if (typeof document === "undefined") {
4984
+ measureCtx = null;
4985
+ return null;
4986
+ }
4987
+ measureCtx = document.createElement("canvas").getContext("2d");
4988
+ return measureCtx;
4989
+ }
4990
+ function envelopeFontSizePx(font) {
4991
+ return font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx : chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE;
4992
+ }
4993
+ function toCanvasFont(font, sizePx = envelopeFontSizePx(font)) {
4994
+ const family2 = font.fontFamily || chunkHTFYAGHG_cjs.DEFAULT_FONT_FAMILY;
4995
+ return `${fontStyleShorthand(family2, font.italic)}${fontWeightShorthand(family2, font.bold)}${sizePx}px ${family2}`;
4996
+ }
4997
+ function enableKerning(ctx) {
4998
+ const kerning = ctx;
4999
+ if ("fontKerning" in kerning) {
5000
+ kerning.fontKerning = "normal";
5001
+ }
5002
+ }
5003
+ function measureGlyphAdvances(text4, font) {
5004
+ const chars = [...text4];
5005
+ const ctx = getMeasureCtx();
5006
+ if (!ctx) {
5007
+ return chars.map(() => envelopeFontSizePx(font) * 0.55);
5008
+ }
5009
+ ctx.font = toCanvasFont(font);
5010
+ enableKerning(ctx);
5011
+ const starts = [];
5012
+ let prefix = "";
5013
+ for (const char of chars) {
5014
+ prefix += char;
5015
+ starts.push(ctx.measureText(prefix).width - ctx.measureText(char).width);
5016
+ }
5017
+ const total = ctx.measureText(text4).width;
5018
+ const advances = starts.map(
5019
+ (start, i) => Math.max(0, (i + 1 < starts.length ? starts[i + 1] : total) - start)
5020
+ );
5021
+ return advances;
5022
+ }
5023
+ function measureTextAdvance(text4, font) {
5024
+ const ctx = getMeasureCtx();
5025
+ if (!ctx) {
5026
+ return void 0;
5027
+ }
5028
+ ctx.font = toCanvasFont(font);
5029
+ enableKerning(ctx);
5030
+ return ctx.measureText(text4).width;
5031
+ }
5032
+ function measureGlyphInk(char, font) {
5033
+ const ctx = getMeasureCtx();
5034
+ if (!ctx) {
5035
+ return void 0;
5036
+ }
5037
+ ctx.font = toCanvasFont(font);
5038
+ const m = ctx.measureText(char);
5039
+ const { actualBoundingBoxLeft, actualBoundingBoxRight } = m;
5040
+ const { actualBoundingBoxAscent, actualBoundingBoxDescent } = m;
5041
+ const values = [
5042
+ actualBoundingBoxLeft,
5043
+ actualBoundingBoxRight,
5044
+ actualBoundingBoxAscent,
5045
+ actualBoundingBoxDescent
5046
+ ];
5047
+ if (!values.every((v) => typeof v === "number" && Number.isFinite(v))) {
5048
+ return void 0;
5049
+ }
5050
+ return {
5051
+ left: -actualBoundingBoxLeft,
5052
+ right: actualBoundingBoxRight,
5053
+ ascent: actualBoundingBoxAscent,
5054
+ descent: actualBoundingBoxDescent
5055
+ };
5056
+ }
5057
+ function resetGlyphEnvelopeMeasureCache() {
5058
+ measureCtx = void 0;
5059
+ }
4972
5060
  var HYPERLINK_COLOR2 = "#0563C1";
4973
5061
  function resolveWarpRunPaint(segment, elementStyle, fallbackColor = "#000000", defaultFontSizePx = 18) {
4974
5062
  const s = segment?.style ?? {};
@@ -4978,11 +5066,11 @@ function resolveWarpRunPaint(segment, elementStyle, fallbackColor = "#000000", d
4978
5066
  s.strikethrough ? "line-through" : ""
4979
5067
  ].filter(Boolean);
4980
5068
  return {
4981
- fill: chunk2SO3BL67_cjs.normalizeHexColor(
5069
+ fill: chunkHTFYAGHG_cjs.normalizeHexColor(
4982
5070
  s.color || elementStyle?.color,
4983
5071
  s.hyperlink ? HYPERLINK_COLOR2 : fallbackColor
4984
5072
  ),
4985
- fontFamily: family2 ? pptx.getSubstituteFontFamily(family2) : chunk2SO3BL67_cjs.DEFAULT_FONT_FAMILY,
5073
+ fontFamily: family2 ? pptx.getSubstituteFontFamily(family2) : chunkHTFYAGHG_cjs.DEFAULT_FONT_FAMILY,
4986
5074
  fontSizePx: s.fontSize ?? elementStyle?.fontSize ?? defaultFontSizePx,
4987
5075
  fontWeight: fontWeightAttribute(family2, s.bold ?? elementStyle?.bold),
4988
5076
  fontStyle: resolveFontItalic(family2, s.italic ?? elementStyle?.italic) ? "italic" : void 0,
@@ -4990,6 +5078,98 @@ function resolveWarpRunPaint(segment, elementStyle, fallbackColor = "#000000", d
4990
5078
  };
4991
5079
  }
4992
5080
 
5081
+ // src/pptx/render/text-warp-arch-fit.ts
5082
+ var RAD = Math.PI / 180;
5083
+ var STEPS = 180;
5084
+ function arcLength(speed, half) {
5085
+ let length = 0;
5086
+ let previous = speed(-half);
5087
+ for (let i = 1; i <= STEPS; i++) {
5088
+ const current = speed(-half + 2 * half * i / STEPS);
5089
+ length += (previous + current) / 2 * (2 * half / STEPS);
5090
+ previous = current;
5091
+ }
5092
+ return length;
5093
+ }
5094
+ function archFitSweep(adj, half) {
5095
+ const degrees = normalizeWarpAngle(adj ?? (half === "up" ? 180 * 6e4 : 0));
5096
+ const onUpperHalf = degrees >= 90 && degrees < 270;
5097
+ const angle = onUpperHalf ? degrees : (degrees + 180) % 360;
5098
+ return angle <= 180 ? 180 : Math.max(0, Math.min(180, 540 - 2 * angle));
5099
+ }
5100
+ function circleFitSweep(adj) {
5101
+ const degrees = normalizeWarpAngle(adj ?? 180 * 6e4);
5102
+ return Math.min(360, 2 * (degrees >= 180 ? 360 - degrees : 180 - degrees));
5103
+ }
5104
+ function warpFitCapacity(preset2, width, height, outward, adj) {
5105
+ if (preset2 === "textArchUp" || preset2 === "textButton" || preset2 === "textArchDown") {
5106
+ const half = preset2 === "textArchDown" ? "down" : "up";
5107
+ const { rx, ry } = archEllipseRadii(width, height, outward);
5108
+ return arcLength(
5109
+ (psi) => Math.hypot(rx * Math.cos(psi), ry * Math.sin(psi)),
5110
+ archFitSweep(adj, half) * RAD / 2
5111
+ );
5112
+ }
5113
+ if (preset2 === "textCircle") {
5114
+ const { rx, ry } = circleLoopRadii(width, height, outward);
5115
+ return arcLength(
5116
+ (psi) => Math.hypot(rx * Math.sin(psi), ry * Math.cos(psi)),
5117
+ circleFitSweep(adj) * RAD / 2
5118
+ );
5119
+ }
5120
+ return void 0;
5121
+ }
5122
+ function warpFitScale(capacity, textWidth) {
5123
+ if (!capacity || !textWidth || textWidth <= capacity) {
5124
+ return 1;
5125
+ }
5126
+ return Math.max(0.01, capacity / textWidth);
5127
+ }
5128
+ function measureWarpParagraphWidth(segments, elementStyle) {
5129
+ let total = 0;
5130
+ for (const segment of segments) {
5131
+ const paint = resolveWarpRunPaint(segment, elementStyle, "#000000", chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE);
5132
+ const weight = paint.fontWeight;
5133
+ const width = measureTextAdvance(segment.text, {
5134
+ fontFamily: paint.fontFamily,
5135
+ fontSizePx: paint.fontSizePx,
5136
+ bold: weight === "bold" || weight !== void 0 && Number(weight) >= 600,
5137
+ italic: paint.fontStyle === "italic"
5138
+ });
5139
+ if (width === void 0) {
5140
+ return void 0;
5141
+ }
5142
+ total += width;
5143
+ }
5144
+ return total;
5145
+ }
5146
+ function warpParagraphLayouts(preset2, width, height, paragraphs2, adj, adj2, elementStyle) {
5147
+ let largest = 0;
5148
+ for (const paragraph2 of paragraphs2) {
5149
+ for (const segment of paragraph2.segments) {
5150
+ largest = Math.max(
5151
+ largest,
5152
+ resolveWarpRunPaint(segment, elementStyle, "#000000", chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE).fontSizePx
5153
+ );
5154
+ }
5155
+ }
5156
+ const gap = largest * WARP_ARC_LINE_PITCH_EM;
5157
+ const count = paragraphs2.length;
5158
+ return paragraphs2.map((paragraph2, index) => {
5159
+ const capacity = warpFitCapacity(
5160
+ preset2,
5161
+ width,
5162
+ height,
5163
+ warpLineOutward(preset2, index, count, gap),
5164
+ adj
5165
+ );
5166
+ return {
5167
+ d: buildWarpPath(preset2, width, height, index, count, adj, adj2, gap),
5168
+ fitScale: capacity === void 0 ? 1 : warpFitScale(capacity, measureWarpParagraphWidth(paragraph2.segments, elementStyle))
5169
+ };
5170
+ });
5171
+ }
5172
+
4993
5173
  // src/pptx/render/text-warp-preset-definitions-extra.ts
4994
5174
  var line = (startY, endY) => ({ type: "line", startY, endY });
4995
5175
  var cubic = (startY, ctrl1Y, ctrl2Y, endY) => ({
@@ -5705,81 +5885,6 @@ var NOMINAL_ENVELOPE_BAND = {
5705
5885
  bottom: BOTTOM_MARGIN
5706
5886
  };
5707
5887
 
5708
- // src/pptx/render/text-warp-envelope-measure.ts
5709
- var measureCtx;
5710
- function getMeasureCtx() {
5711
- if (measureCtx !== void 0) {
5712
- return measureCtx;
5713
- }
5714
- if (typeof document === "undefined") {
5715
- measureCtx = null;
5716
- return null;
5717
- }
5718
- measureCtx = document.createElement("canvas").getContext("2d");
5719
- return measureCtx;
5720
- }
5721
- function envelopeFontSizePx(font) {
5722
- return font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx : chunk2SO3BL67_cjs.DEFAULT_TEXT_FONT_SIZE;
5723
- }
5724
- function toCanvasFont(font, sizePx = envelopeFontSizePx(font)) {
5725
- const family2 = font.fontFamily || chunk2SO3BL67_cjs.DEFAULT_FONT_FAMILY;
5726
- return `${fontStyleShorthand(family2, font.italic)}${fontWeightShorthand(family2, font.bold)}${sizePx}px ${family2}`;
5727
- }
5728
- function enableKerning(ctx) {
5729
- const kerning = ctx;
5730
- if ("fontKerning" in kerning) {
5731
- kerning.fontKerning = "normal";
5732
- }
5733
- }
5734
- function measureGlyphAdvances(text4, font) {
5735
- const chars = [...text4];
5736
- const ctx = getMeasureCtx();
5737
- if (!ctx) {
5738
- return chars.map(() => envelopeFontSizePx(font) * 0.55);
5739
- }
5740
- ctx.font = toCanvasFont(font);
5741
- enableKerning(ctx);
5742
- const starts = [];
5743
- let prefix = "";
5744
- for (const char of chars) {
5745
- prefix += char;
5746
- starts.push(ctx.measureText(prefix).width - ctx.measureText(char).width);
5747
- }
5748
- const total = ctx.measureText(text4).width;
5749
- const advances = starts.map(
5750
- (start, i) => Math.max(0, (i + 1 < starts.length ? starts[i + 1] : total) - start)
5751
- );
5752
- return advances;
5753
- }
5754
- function measureGlyphInk(char, font) {
5755
- const ctx = getMeasureCtx();
5756
- if (!ctx) {
5757
- return void 0;
5758
- }
5759
- ctx.font = toCanvasFont(font);
5760
- const m = ctx.measureText(char);
5761
- const { actualBoundingBoxLeft, actualBoundingBoxRight } = m;
5762
- const { actualBoundingBoxAscent, actualBoundingBoxDescent } = m;
5763
- const values = [
5764
- actualBoundingBoxLeft,
5765
- actualBoundingBoxRight,
5766
- actualBoundingBoxAscent,
5767
- actualBoundingBoxDescent
5768
- ];
5769
- if (!values.every((v) => typeof v === "number" && Number.isFinite(v))) {
5770
- return void 0;
5771
- }
5772
- return {
5773
- left: -actualBoundingBoxLeft,
5774
- right: actualBoundingBoxRight,
5775
- ascent: actualBoundingBoxAscent,
5776
- descent: actualBoundingBoxDescent
5777
- };
5778
- }
5779
- function resetGlyphEnvelopeMeasureCache() {
5780
- measureCtx = void 0;
5781
- }
5782
-
5783
5888
  // src/pptx/render/text-warp-polygon-clip.ts
5784
5889
  function ellipsePolygon(cx, cy, rx, ry, vertices = 192) {
5785
5890
  const points = [];
@@ -5963,8 +6068,8 @@ function envelopeWrapWidth(boxWidth, body) {
5963
6068
  if (!body || body.textWrap === "none") {
5964
6069
  return void 0;
5965
6070
  }
5966
- const left = body.bodyInsetLeft ?? chunk2SO3BL67_cjs.DEFAULT_BODY_INSET_LR_PX;
5967
- const right = body.bodyInsetRight ?? chunk2SO3BL67_cjs.DEFAULT_BODY_INSET_LR_PX;
6071
+ const left = body.bodyInsetLeft ?? chunkHTFYAGHG_cjs.DEFAULT_BODY_INSET_LR_PX;
6072
+ const right = body.bodyInsetRight ?? chunkHTFYAGHG_cjs.DEFAULT_BODY_INSET_LR_PX;
5968
6073
  return Math.max(0, boxWidth - left - right);
5969
6074
  }
5970
6075
  function sumAdvances(items) {
@@ -7018,7 +7123,7 @@ function parseOpenTypeFont(buffer, module = loadedModule) {
7018
7123
 
7019
7124
  // src/pptx/render/text-warp-glyph-outline-lookup.ts
7020
7125
  var WHITESPACE_RE3 = /^\s$/u;
7021
- function extractGlyphOutlineCommands(font, char, x, y, fontSizePx) {
7126
+ function extractGlyphOutlineCommands(font, char, x, y, fontSizePx2) {
7022
7127
  if (!char) {
7023
7128
  return void 0;
7024
7129
  }
@@ -7029,7 +7134,7 @@ function extractGlyphOutlineCommands(font, char, x, y, fontSizePx) {
7029
7134
  if (!font.hasChar(char)) {
7030
7135
  return void 0;
7031
7136
  }
7032
- const path = font.getPath(char, x, y, fontSizePx);
7137
+ const path = font.getPath(char, x, y, fontSizePx2);
7033
7138
  return path.commands.map((cmd) => {
7034
7139
  switch (cmd.type) {
7035
7140
  case "M":
@@ -7055,7 +7160,7 @@ function createGlyphOutlineLookup(cache3) {
7055
7160
  }
7056
7161
  const parsed = cache3.get(font.fontFamily, font.bold, font.italic);
7057
7162
  if (parsed) {
7058
- const size2 = font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx : chunk2SO3BL67_cjs.DEFAULT_TEXT_FONT_SIZE;
7163
+ const size2 = font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx : chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE;
7059
7164
  const commands = extractGlyphOutlineCommands(parsed, char, x, y, size2);
7060
7165
  if (commands) {
7061
7166
  return commands;
@@ -7420,17 +7525,47 @@ function pickBlock(blocks, family2, targetWeight, italic) {
7420
7525
  }
7421
7526
  return candidates.find((b) => coversBasicLatin(b.unicodeRange)) ?? candidates[0];
7422
7527
  }
7528
+ var fetchCaches = /* @__PURE__ */ new WeakMap();
7529
+ function fetchOnce(fetchImpl, url, kind) {
7530
+ let cache3 = fetchCaches.get(fetchImpl);
7531
+ if (!cache3) {
7532
+ cache3 = /* @__PURE__ */ new Map();
7533
+ fetchCaches.set(fetchImpl, cache3);
7534
+ }
7535
+ const key = `${kind}:${url}`;
7536
+ const cached = cache3.get(key);
7537
+ if (cached) {
7538
+ return cached;
7539
+ }
7540
+ const pending3 = (async () => {
7541
+ try {
7542
+ const response = await fetchImpl(url);
7543
+ if (!response.ok) {
7544
+ return void 0;
7545
+ }
7546
+ return kind === "text" ? await response.text() : new Uint8Array(await response.arrayBuffer());
7547
+ } catch {
7548
+ return void 0;
7549
+ }
7550
+ })();
7551
+ cache3.set(key, pending3);
7552
+ void pending3.then((value) => {
7553
+ if (value === void 0) {
7554
+ cache3.delete(key);
7555
+ }
7556
+ });
7557
+ return pending3;
7558
+ }
7423
7559
  async function fetchGoogleWebfontOutlineBytes(cssHref, referencedFamily, bold, italic, fetchImpl) {
7424
7560
  const canonical = resolveGoogleFontsFace(referencedFamily)?.family ?? findMetricCompatibleGoogleFontsFamily(referencedFamily);
7425
7561
  if (!canonical) {
7426
7562
  return void 0;
7427
7563
  }
7428
7564
  try {
7429
- const cssResponse = await fetchImpl(cssHref);
7430
- if (!cssResponse.ok) {
7565
+ const css = await fetchOnce(fetchImpl, cssHref, "text");
7566
+ if (css === void 0) {
7431
7567
  return void 0;
7432
7568
  }
7433
- const css = await cssResponse.text();
7434
7569
  const weight = resolveFontWeight(referencedFamily, bold);
7435
7570
  const block = pickBlock(
7436
7571
  parseFontFaceBlocks(css),
@@ -7441,11 +7576,7 @@ async function fetchGoogleWebfontOutlineBytes(cssHref, referencedFamily, bold, i
7441
7576
  if (!block) {
7442
7577
  return void 0;
7443
7578
  }
7444
- const fontResponse = await fetchImpl(block.url);
7445
- if (!fontResponse.ok) {
7446
- return void 0;
7447
- }
7448
- return new Uint8Array(await fontResponse.arrayBuffer());
7579
+ return await fetchOnce(fetchImpl, block.url, "bytes");
7449
7580
  } catch {
7450
7581
  return void 0;
7451
7582
  }
@@ -7662,7 +7793,7 @@ function renderLineSparkline(data) {
7662
7793
  }).join(" ");
7663
7794
  return [
7664
7795
  `<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="${h}" viewBox="0 0 ${w} ${h}">`,
7665
- `<polyline points="${chunk2SO3BL67_cjs.escapeSvgAttr(points)}" fill="none" stroke="${chunk2SO3BL67_cjs.escapeSvgAttr(color)}" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>`,
7796
+ `<polyline points="${chunkHTFYAGHG_cjs.escapeSvgAttr(points)}" fill="none" stroke="${chunkHTFYAGHG_cjs.escapeSvgAttr(color)}" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/>`,
7666
7797
  `</svg>`
7667
7798
  ].join("");
7668
7799
  }
@@ -7686,7 +7817,7 @@ function renderBarSparkline(data) {
7686
7817
  const barTop = Math.min(zeroY, valY);
7687
7818
  const barHeight = Math.max(0.5, Math.abs(zeroY - valY));
7688
7819
  const fill3 = v < 0 ? negColor : color;
7689
- return `<rect x="${x.toFixed(2)}" y="${barTop.toFixed(2)}" width="${barWidth.toFixed(2)}" height="${barHeight.toFixed(2)}" fill="${chunk2SO3BL67_cjs.escapeSvgAttr(fill3)}"/>`;
7820
+ return `<rect x="${x.toFixed(2)}" y="${barTop.toFixed(2)}" width="${barWidth.toFixed(2)}" height="${barHeight.toFixed(2)}" fill="${chunkHTFYAGHG_cjs.escapeSvgAttr(fill3)}"/>`;
7690
7821
  }).join("");
7691
7822
  return [
7692
7823
  `<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="${h}" viewBox="0 0 ${w} ${h}">`,
@@ -7711,7 +7842,7 @@ function renderWinLossSparkline(data) {
7711
7842
  const barTop = isPositive ? PADDING : PADDING + halfH;
7712
7843
  const barHeight = halfH;
7713
7844
  const fill3 = isPositive ? color : negColor;
7714
- return `<rect x="${x.toFixed(2)}" y="${barTop.toFixed(2)}" width="${barWidth.toFixed(2)}" height="${barHeight.toFixed(2)}" fill="${chunk2SO3BL67_cjs.escapeSvgAttr(fill3)}"/>`;
7845
+ return `<rect x="${x.toFixed(2)}" y="${barTop.toFixed(2)}" width="${barWidth.toFixed(2)}" height="${barHeight.toFixed(2)}" fill="${chunkHTFYAGHG_cjs.escapeSvgAttr(fill3)}"/>`;
7715
7846
  }).join("");
7716
7847
  return [
7717
7848
  `<svg xmlns="http://www.w3.org/2000/svg" width="${w}" height="${h}" viewBox="0 0 ${w} ${h}">`,
@@ -7907,7 +8038,7 @@ var COMBO_SERIES_TYPE_OPTIONS = [
7907
8038
  function patchChartData(data, patch) {
7908
8039
  const { chartType, ...rest } = patch;
7909
8040
  if (chartType === "pareto") {
7910
- return { ...chunk2SO3BL67_cjs.applyParetoConversion(data), ...rest };
8041
+ return { ...chunkHTFYAGHG_cjs.applyParetoConversion(data), ...rest };
7911
8042
  }
7912
8043
  if (chartType && chartType !== data.chartType) {
7913
8044
  const adapted = pptx.chartDataChangeType(data, chartType);
@@ -7969,8 +8100,8 @@ function buildParetoInsertData() {
7969
8100
  layout: "histogram",
7970
8101
  binCount: PARETO_BIN_COUNT
7971
8102
  };
7972
- const bins = chunk2SO3BL67_cjs.computeHistogramBins(PARETO_VALUES, histogramOptions);
7973
- const ordered = chunk2SO3BL67_cjs.orderParetoEntries(
8103
+ const bins = chunkHTFYAGHG_cjs.computeHistogramBins(PARETO_VALUES, histogramOptions);
8104
+ const ordered = chunkHTFYAGHG_cjs.orderParetoEntries(
7974
8105
  bins.map((bin, index) => ({ value: bin.value, label: bin.label, sourcePointIndex: index }))
7975
8106
  );
7976
8107
  return {
@@ -7983,7 +8114,7 @@ function buildParetoInsertData() {
7983
8114
  },
7984
8115
  {
7985
8116
  name: "Cumulative %",
7986
- values: chunk2SO3BL67_cjs.cumulativePercentOfTotal(ordered.map((entry6) => entry6.value)),
8117
+ values: chunkHTFYAGHG_cjs.cumulativePercentOfTotal(ordered.map((entry6) => entry6.value)),
7987
8118
  histogramOptions: { layout: "pareto" }
7988
8119
  }
7989
8120
  ]
@@ -8246,7 +8377,7 @@ var FILL_PATTERN_LABEL_KEYS = {
8246
8377
  trellis: "pptx.fillPatterns.trellis",
8247
8378
  zigZag: "pptx.fillPatterns.zigZag"
8248
8379
  };
8249
- var PATTERN_PRESET_OPTIONS = chunk2SO3BL67_cjs.OOXML_PATTERN_PRESETS.map(
8380
+ var PATTERN_PRESET_OPTIONS = chunkHTFYAGHG_cjs.OOXML_PATTERN_PRESETS.map(
8250
8381
  (value) => ({ value, labelKey: FILL_PATTERN_LABEL_KEYS[value] })
8251
8382
  );
8252
8383
 
@@ -8492,7 +8623,7 @@ function applyChartElementToggle(chartData, key, checked) {
8492
8623
  style: { ...chartData.style, ...chartDataLabelsTogglePatch(chartData.style, checked) }
8493
8624
  });
8494
8625
  case "gridlines":
8495
- return patchChartData(chartData, chunk2SO3BL67_cjs.chartGridlinesPatch(chartData, checked));
8626
+ return patchChartData(chartData, chunkHTFYAGHG_cjs.chartGridlinesPatch(chartData, checked));
8496
8627
  case "axes":
8497
8628
  return patchChartData(chartData, chartAxesVisibilityPatch(chartData, checked));
8498
8629
  case "axisTitles":
@@ -8531,7 +8662,7 @@ function buildElements(chartData) {
8531
8662
  {
8532
8663
  key: "gridlines",
8533
8664
  labelKey: "pptx.chart.showGridlines",
8534
- checked: chunk2SO3BL67_cjs.chartGridlinesState(chartData)
8665
+ checked: chunkHTFYAGHG_cjs.chartGridlinesState(chartData)
8535
8666
  },
8536
8667
  {
8537
8668
  key: "dataLabels",
@@ -10575,17 +10706,17 @@ function chartEventPathElements(event) {
10575
10706
  }
10576
10707
  function findChartPartElementInEvent(event) {
10577
10708
  for (const el of chartEventPathElements(event)) {
10578
- if (el.getAttribute(chunk2GDYTHUY_cjs.CHART_PART_ATTR) !== null) {
10709
+ if (el.getAttribute(chunkLOUVYGWX_cjs.CHART_PART_ATTR) !== null) {
10579
10710
  return el;
10580
10711
  }
10581
10712
  }
10582
10713
  return null;
10583
10714
  }
10584
10715
  function findChartPartInEvent(event) {
10585
- return chunk2GDYTHUY_cjs.chartPartFromElement(findChartPartElementInEvent(event));
10716
+ return chunkLOUVYGWX_cjs.chartPartFromElement(findChartPartElementInEvent(event));
10586
10717
  }
10587
10718
  function isChartTitleEvent(event) {
10588
- return findChartPartElementInEvent(event)?.getAttribute(chunk2GDYTHUY_cjs.CHART_PART_ATTR) === "title";
10719
+ return findChartPartElementInEvent(event)?.getAttribute(chunkLOUVYGWX_cjs.CHART_PART_ATTR) === "title";
10589
10720
  }
10590
10721
 
10591
10722
  // src/pptx/render/chart-format/chart-format-hit-test.ts
@@ -10593,7 +10724,7 @@ function inBox(p, box) {
10593
10724
  return p.x >= box.left && p.x <= box.right && p.y >= box.top && p.y <= box.bottom;
10594
10725
  }
10595
10726
  function hitsText(p, texts) {
10596
- return (texts ?? []).some((text4) => !text4.transform && inBox(p, chunk2SO3BL67_cjs.chartTextBox(text4)));
10727
+ return (texts ?? []).some((text4) => !text4.transform && inBox(p, chunkHTFYAGHG_cjs.chartTextBox(text4)));
10597
10728
  }
10598
10729
  function nearLine(p, line5, tolerance) {
10599
10730
  const dx = line5.x2 - line5.x1;
@@ -10606,7 +10737,7 @@ function nearLine(p, line5, tolerance) {
10606
10737
  }
10607
10738
  function chartFormatTargetAtPoint(vm, data, point) {
10608
10739
  if (data.style?.hasLegend !== false && vm.legend.length > 0) {
10609
- const hitLegend = chunk2SO3BL67_cjs.computeChartLegendLayout(vm).some(
10740
+ const hitLegend = chunkHTFYAGHG_cjs.computeChartLegendLayout(vm).some(
10610
10741
  (item4) => inBox(point, {
10611
10742
  left: item4.x - 3,
10612
10743
  top: item4.y - 9,
@@ -10621,12 +10752,12 @@ function chartFormatTargetAtPoint(vm, data, point) {
10621
10752
  if (data.style?.hasDataLabels && hitsText(point, vm.dataLabels)) {
10622
10753
  return "dataLabels";
10623
10754
  }
10624
- const valueAxis = chunk2SO3BL67_cjs.chartAxisIndex(data, ["valAx"]);
10625
- const categoryAxis = chunk2SO3BL67_cjs.chartAxisIndex(data, ["catAx", "dateAx"]);
10755
+ const valueAxis = chunkHTFYAGHG_cjs.chartAxisIndex(data, ["valAx"]);
10756
+ const categoryAxis = chunkHTFYAGHG_cjs.chartAxisIndex(data, ["catAx", "dateAx"]);
10626
10757
  if (valueAxis >= 0 && hitsText(point, vm.axisLabels)) {
10627
10758
  return `axis:${valueAxis}`;
10628
10759
  }
10629
- const secondaryValue = chunk2SO3BL67_cjs.chartAxisIndex(data, ["valAx"], 1);
10760
+ const secondaryValue = chunkHTFYAGHG_cjs.chartAxisIndex(data, ["valAx"], 1);
10630
10761
  if (secondaryValue >= 0 && hitsText(point, vm.secondaryAxisLabels)) {
10631
10762
  return `axis:${secondaryValue}`;
10632
10763
  }
@@ -10638,7 +10769,7 @@ function chartFormatTargetAtPoint(vm, data, point) {
10638
10769
  return `majorGridlines:${valueAxis}`;
10639
10770
  }
10640
10771
  }
10641
- const bounds = chunk2SO3BL67_cjs.chartPlotBounds(vm);
10772
+ const bounds = chunkHTFYAGHG_cjs.chartPlotBounds(vm);
10642
10773
  if (bounds && inBox(point, bounds)) {
10643
10774
  return "plotArea";
10644
10775
  }
@@ -10667,7 +10798,7 @@ function chartPartUnderPointer(event, host2) {
10667
10798
  if (!host2.contains(node)) {
10668
10799
  continue;
10669
10800
  }
10670
- const part2 = node.closest(`[${chunk2GDYTHUY_cjs.CHART_PART_ATTR}]`);
10801
+ const part2 = node.closest(`[${chunkLOUVYGWX_cjs.CHART_PART_ATTR}]`);
10671
10802
  if (part2) {
10672
10803
  return part2;
10673
10804
  }
@@ -10692,12 +10823,12 @@ function chartFormatTargetFromEvent(event, host2, element) {
10692
10823
  return "chartArea";
10693
10824
  }
10694
10825
  const part2 = findChartPartElementInEvent(event) ?? chartPartUnderPointer(event, host2);
10695
- const role = part2?.getAttribute(chunk2GDYTHUY_cjs.CHART_PART_ATTR);
10826
+ const role = part2?.getAttribute(chunkLOUVYGWX_cjs.CHART_PART_ATTR);
10696
10827
  if (role === "title") {
10697
10828
  return "title";
10698
10829
  }
10699
10830
  if (role === "dataPoint" || role === "series") {
10700
- const series = Number(part2?.getAttribute(chunk2GDYTHUY_cjs.CHART_PART_SERIES_ATTR));
10831
+ const series = Number(part2?.getAttribute(chunkLOUVYGWX_cjs.CHART_PART_SERIES_ATTR));
10701
10832
  if (Number.isInteger(series) && element.chartData.series[series]) {
10702
10833
  return `series:${series}`;
10703
10834
  }
@@ -10706,7 +10837,7 @@ function chartFormatTargetFromEvent(event, host2, element) {
10706
10837
  if (!svg2) {
10707
10838
  return "chartArea";
10708
10839
  }
10709
- const vm = chunk2SO3BL67_cjs.buildChartViewModel(element);
10840
+ const vm = chunkHTFYAGHG_cjs.buildChartViewModel(element);
10710
10841
  return chartFormatTargetAtPoint(
10711
10842
  vm,
10712
10843
  element.chartData,
@@ -11172,14 +11303,14 @@ function advanceChartMarkDrag(state, clientX, clientY, rect3) {
11172
11303
  return null;
11173
11304
  }
11174
11305
  const travelled = Math.hypot(clientX - state.startClientX, clientY - state.startClientY);
11175
- if (!state.moved && travelled < chunk2GDYTHUY_cjs.CHART_DRAG_THRESHOLD_PX) {
11306
+ if (!state.moved && travelled < chunkLOUVYGWX_cjs.CHART_DRAG_THRESHOLD_PX) {
11176
11307
  return null;
11177
11308
  }
11178
11309
  if (rect3.width === 0 || rect3.height === 0) {
11179
11310
  return null;
11180
11311
  }
11181
11312
  state.moved = true;
11182
- const pointer = clientPointToViewBox(clientX, clientY, rect3, state.svgWidth, state.svgHeight), value = chunk2GDYTHUY_cjs.resolveChartDragValue(state.geometry, pointer), chartData = chunk2GDYTHUY_cjs.withChartPointValue(
11313
+ const pointer = clientPointToViewBox(clientX, clientY, rect3, state.svgWidth, state.svgHeight), value = chunkLOUVYGWX_cjs.resolveChartDragValue(state.geometry, pointer), chartData = chunkLOUVYGWX_cjs.withChartPointValue(
11183
11314
  state.baseChartData,
11184
11315
  state.part.seriesIndex,
11185
11316
  state.part.pointIndex,
@@ -14155,7 +14286,7 @@ var EXIT_KEYFRAME_DEFINITIONS = {
14155
14286
 
14156
14287
  // src/pptx/render/animation-circle-iris.ts
14157
14288
  var IRIS_BAND = 0.127;
14158
- var STEPS = 30;
14289
+ var STEPS2 = 30;
14159
14290
  var HALF_DIAGONAL_PCT = 100 * Math.SQRT2;
14160
14291
  function irisRadiusAt(progress) {
14161
14292
  const remaining = 1 - Math.max(0, Math.min(1, progress));
@@ -14170,8 +14301,8 @@ function irisDecl(progress) {
14170
14301
  }
14171
14302
  function buildKeyframes4() {
14172
14303
  const stops = [];
14173
- for (let index = 0; index <= STEPS; index += 1) {
14174
- const progress = index / STEPS;
14304
+ for (let index = 0; index <= STEPS2; index += 1) {
14305
+ const progress = index / STEPS2;
14175
14306
  stops.push(` ${(progress * 100).toFixed(2)}% { ${irisDecl(progress)} opacity: 1; }`);
14176
14307
  }
14177
14308
  return `@keyframes pptx-circleOut {
@@ -20317,7 +20448,7 @@ function getBevelLightingFilterMarkup(elementId, shape3d, scene3d) {
20317
20448
  return markup;
20318
20449
  }).join("");
20319
20450
  const id = getBevelLightingFilterId(elementId);
20320
- const filterMarkup = `<filter id="${chunk2SO3BL67_cjs.escapeSvgAttr(id)}" x="-30%" y="-30%" width="160%" height="160%" color-interpolation-filters="sRGB">${primitives}</filter>`;
20451
+ const filterMarkup = `<filter id="${chunkHTFYAGHG_cjs.escapeSvgAttr(id)}" x="-30%" y="-30%" width="160%" height="160%" color-interpolation-filters="sRGB">${primitives}</filter>`;
20321
20452
  return { id, cssReference: `url(#${id})`, filterMarkup };
20322
20453
  }
20323
20454
  function getBevelLightingSvgFilter(el) {
@@ -22273,7 +22404,7 @@ function borderToCss(border, resolve) {
22273
22404
  const width = border.width ?? 1;
22274
22405
  const dash = border.compound === "dbl" && width >= 3 ? "double" : ooxmlDashToCssBorderStyle(border.dash);
22275
22406
  const color = border.color ?? resolve(border.fill) ?? "#000000";
22276
- return chunkHWJKBKCW_cjs.screenBorder(width, dash, color);
22407
+ return chunkFI2ATACZ_cjs.screenBorder(width, dash, color);
22277
22408
  }
22278
22409
  function collectSections(entry6, tableData, pos) {
22279
22410
  const { rowIndex, cellIndex, rowCount, columnCount } = pos;
@@ -22743,7 +22874,7 @@ function gradientCssFromFill(fill3, colorScheme) {
22743
22874
  position: stop.position
22744
22875
  }))
22745
22876
  };
22746
- return chunk2SO3BL67_cjs.buildGradientCss(shapeLike);
22877
+ return chunkHTFYAGHG_cjs.buildGradientCss(shapeLike);
22747
22878
  }
22748
22879
  function applyStyleFill(fill3, colorScheme, css, fallback) {
22749
22880
  if (fill3?.noFill) {
@@ -22769,13 +22900,13 @@ function applyStyleFill(fill3, colorScheme, css, fallback) {
22769
22900
  }
22770
22901
  }
22771
22902
  if (fill3?.pattern) {
22772
- const fg = chunk2SO3BL67_cjs.normalizeHexColor(
22903
+ const fg = chunkHTFYAGHG_cjs.normalizeHexColor(
22773
22904
  resolveStyleFillColor(fill3.pattern.foreground, colorScheme),
22774
22905
  "#000000"
22775
- ), bg = chunk2SO3BL67_cjs.normalizeHexColor(
22906
+ ), bg = chunkHTFYAGHG_cjs.normalizeHexColor(
22776
22907
  resolveStyleFillColor(fill3.pattern.background, colorScheme),
22777
22908
  "#ffffff"
22778
- ), svg2 = chunk2SO3BL67_cjs.getPatternSvg(fill3.pattern.preset, fg, bg);
22909
+ ), svg2 = chunkHTFYAGHG_cjs.getPatternSvg(fill3.pattern.preset, fg, bg);
22779
22910
  clearBackground(css);
22780
22911
  if (svg2) {
22781
22912
  css.backgroundImage = `url("data:image/svg+xml,${encodeURIComponent(svg2)}")`;
@@ -22784,7 +22915,7 @@ function applyStyleFill(fill3, colorScheme, css, fallback) {
22784
22915
  return true;
22785
22916
  }
22786
22917
  const resolved2 = resolveStyleFillColor(fill3, colorScheme);
22787
- const color = (resolved2 && fill3?.alpha !== void 0 ? chunk2SO3BL67_cjs.colorWithOpacity(resolved2, fill3.alpha / 1e5) : resolved2) ?? fallback;
22918
+ const color = (resolved2 && fill3?.alpha !== void 0 ? chunkHTFYAGHG_cjs.colorWithOpacity(resolved2, fill3.alpha / 1e5) : resolved2) ?? fallback;
22788
22919
  if (color) {
22789
22920
  layerSolidColor(css, color);
22790
22921
  return true;
@@ -22881,7 +23012,7 @@ function tableStyleShadowCss(entry6) {
22881
23012
  if (!shadow) {
22882
23013
  return void 0;
22883
23014
  }
22884
- return chunk2SO3BL67_cjs.getOuterShadowCss({
23015
+ return chunkHTFYAGHG_cjs.getOuterShadowCss({
22885
23016
  shadowColor: shadow.color,
22886
23017
  shadowOpacity: shadow.opacity,
22887
23018
  shadowBlur: shadow.blur,
@@ -23155,6 +23286,51 @@ function splitWordsForUnderline(text4) {
23155
23286
  }
23156
23287
  return pieces;
23157
23288
  }
23289
+ var STEPS_PER_PX = 6;
23290
+ var MAX_TRACKING_EM = 0.15;
23291
+ var paintedCache = /* @__PURE__ */ new Map();
23292
+ var hookInstalled = false;
23293
+ function deckFamilyOf(fontFamily) {
23294
+ const first = fontFamily?.split(",")[0]?.trim().replace(/^["']|["']$/g, "");
23295
+ return first || void 0;
23296
+ }
23297
+ function isFamilyPainted(ctx, family2) {
23298
+ const cached = paintedCache.get(family2);
23299
+ if (cached !== void 0) {
23300
+ return cached;
23301
+ }
23302
+ if (!hookInstalled && typeof document !== "undefined") {
23303
+ hookInstalled = true;
23304
+ document.fonts?.addEventListener?.("loadingdone", () => paintedCache.clear());
23305
+ }
23306
+ const probe = "mmmmmmmmmmlliWW1234";
23307
+ const width = (font) => {
23308
+ ctx.font = font;
23309
+ return ctx.measureText(probe).width;
23310
+ };
23311
+ const painted = width(`72px "${family2}", monospace`) !== width("72px monospace") || width(`72px "${family2}", serif`) !== width("72px serif");
23312
+ paintedCache.set(family2, painted);
23313
+ return painted;
23314
+ }
23315
+ function resolveDesignTrackingPx(ctx, text4, deckFamily, sizePx, bold, natural) {
23316
+ if (!deckFamily || !text$1.hasDesignAdvances(deckFamily) || isFamilyPainted(ctx, deckFamily)) {
23317
+ return void 0;
23318
+ }
23319
+ const chars = [...text4];
23320
+ let target = 0;
23321
+ for (const char of chars) {
23322
+ const em = text$1.designTextWidthEm(char, deckFamily, bold);
23323
+ if (em === void 0) {
23324
+ return void 0;
23325
+ }
23326
+ target += Math.round(em * sizePx * STEPS_PER_PX) / STEPS_PER_PX;
23327
+ }
23328
+ const limit = MAX_TRACKING_EM * sizePx;
23329
+ return Math.min(limit, Math.max(-limit, (target - natural) / chars.length));
23330
+ }
23331
+ function resetDesignTrackingCache() {
23332
+ paintedCache.clear();
23333
+ }
23158
23334
 
23159
23335
  // src/pptx/render/text-metric-tracking.ts
23160
23336
  var ADVANCE_STEPS_PER_PX = 6;
@@ -23185,8 +23361,8 @@ function getMeasureContext() {
23185
23361
  return measureContext2;
23186
23362
  }
23187
23363
  function toCanvasFont2(font) {
23188
- const size2 = font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx : chunk2SO3BL67_cjs.DEFAULT_TEXT_FONT_SIZE;
23189
- const family2 = font.fontFamily || chunk2SO3BL67_cjs.DEFAULT_FONT_FAMILY;
23364
+ const size2 = font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx : chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE;
23365
+ const family2 = font.fontFamily || chunkHTFYAGHG_cjs.DEFAULT_FONT_FAMILY;
23190
23366
  return `${fontStyleShorthand(family2, font.italic)}${fontWeightShorthand(family2, font.bold)}${size2}px ${family2}`;
23191
23367
  }
23192
23368
  function advancesOf(ctx, canvasFont, chars) {
@@ -23218,6 +23394,23 @@ function resolveMetricTrackingPx(text4, font) {
23218
23394
  return 0;
23219
23395
  }
23220
23396
  const chars = [...text4];
23397
+ ctx.font = canvasFont;
23398
+ ctx.fontKerning = "auto";
23399
+ const substituted = resolveDesignTrackingPx(
23400
+ ctx,
23401
+ text4,
23402
+ deckFamilyOf(font.fontFamily),
23403
+ font.fontSizePx && font.fontSizePx > 0 ? font.fontSizePx : chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE,
23404
+ font.bold === true,
23405
+ ctx.measureText(text4).width
23406
+ );
23407
+ if (substituted !== void 0) {
23408
+ if (trackingCache.size >= MAX_CACHE_ENTRIES) {
23409
+ trackingCache = /* @__PURE__ */ new Map();
23410
+ }
23411
+ trackingCache.set(key, substituted);
23412
+ return substituted;
23413
+ }
23221
23414
  let powerPoint = 0;
23222
23415
  for (const advance of advancesOf(ctx, canvasFont, chars)) {
23223
23416
  powerPoint += Math.round(advance * ADVANCE_STEPS_PER_PX);
@@ -23277,6 +23470,7 @@ function resolveTrackedTextWidth(text4, font, naturalWidth) {
23277
23470
  return tracking === 0 ? naturalWidth : naturalWidth + tracking * [...text4].length;
23278
23471
  }
23279
23472
  function resetMetricTrackingCache() {
23473
+ resetDesignTrackingCache();
23280
23474
  trackingCache = /* @__PURE__ */ new Map();
23281
23475
  measureContext2 = void 0;
23282
23476
  }
@@ -23379,7 +23573,7 @@ function resolveTextOutlineDashCss(s, fillColor) {
23379
23573
  if (s.textFillGradient || s.textFillPattern || s.textFillBlipUrl || s.highlightColor) {
23380
23574
  return void 0;
23381
23575
  }
23382
- const strokeColor = chunk2SO3BL67_cjs.normalizeHexColor(s.textOutlineColor, fillColor ?? "#000000");
23576
+ const strokeColor = chunkHTFYAGHG_cjs.normalizeHexColor(s.textOutlineColor, fillColor ?? "#000000");
23383
23577
  return {
23384
23578
  WebkitTextStroke: `${width}px transparent`,
23385
23579
  WebkitTextFillColor: s.textFillNone ? "transparent" : fillColor ?? "currentColor",
@@ -23406,18 +23600,22 @@ function hollowTextFillStyle(s, painted = {}) {
23406
23600
 
23407
23601
  // src/pptx/render/text-line-height.ts
23408
23602
  var DEFAULT_LINE_HEIGHT = 1.2;
23603
+ function exactPitchPoints(points) {
23604
+ const whole = Math.round(points);
23605
+ return whole > 0 ? whole : points;
23606
+ }
23409
23607
  function resolveLineHeight(textStyle, hasItalicRuns2) {
23410
23608
  if (typeof textStyle?.lineSpacingExactPt === "number" && textStyle.lineSpacingExactPt > 0) {
23411
- return `${textStyle.lineSpacingExactPt}pt`;
23609
+ return `${exactPitchPoints(textStyle.lineSpacingExactPt)}pt`;
23412
23610
  }
23413
23611
  return proportionalLineHeight(textStyle?.lineSpacing, textStyle?.compatibleLineSpacing);
23414
23612
  }
23415
23613
  function proportionalLineHeight(lineSpacing, compatLineSpacing = false) {
23416
23614
  return typeof lineSpacing === "number" && lineSpacing > 0 ? lineSpacing * DEFAULT_LINE_HEIGHT : DEFAULT_LINE_HEIGHT;
23417
23615
  }
23418
- function lineHeightToPx(fontSizePx, lineHeight) {
23616
+ function lineHeightToPx(fontSizePx2, lineHeight) {
23419
23617
  if (typeof lineHeight === "number") {
23420
- return fontSizePx * lineHeight;
23618
+ return fontSizePx2 * lineHeight;
23421
23619
  }
23422
23620
  if (typeof lineHeight === "string") {
23423
23621
  const match = /^([\d.]+)(pt|px)$/u.exec(lineHeight);
@@ -23426,7 +23624,7 @@ function lineHeightToPx(fontSizePx, lineHeight) {
23426
23624
  return match[2] === "pt" ? value * (96 / 72) : value;
23427
23625
  }
23428
23626
  }
23429
- return fontSizePx * DEFAULT_LINE_HEIGHT;
23627
+ return fontSizePx2 * DEFAULT_LINE_HEIGHT;
23430
23628
  }
23431
23629
 
23432
23630
  // src/pptx/render/text-style-helpers.ts
@@ -23526,14 +23724,14 @@ var BASELINE_FONT_SCALE = 0.65;
23526
23724
  function resolveLetterSpacing(s, text4, font) {
23527
23725
  return pieceLetterSpacing(authoredLetterSpacingPx(s), resolveMetricTrackingPx(text4, font));
23528
23726
  }
23529
- function resolveFontKerning(kerning, fontSizePx) {
23727
+ function resolveFontKerning(kerning, fontSizePx2) {
23530
23728
  if (typeof kerning !== "number") {
23531
23729
  return void 0;
23532
23730
  }
23533
23731
  if (kerning === 0) {
23534
23732
  return "none";
23535
23733
  }
23536
- const fontSizePt = (fontSizePx ?? 0) * (72 / 96);
23734
+ const fontSizePt = (fontSizePx2 ?? 0) * (72 / 96);
23537
23735
  return fontSizePt >= kerning / 100 ? "normal" : "none";
23538
23736
  }
23539
23737
  function applyExtraRunProps(style, s, text4, font) {
@@ -23546,13 +23744,13 @@ function applyExtraRunProps(style, s, text4, font) {
23546
23744
  style.fontKerning = fontKerning;
23547
23745
  }
23548
23746
  if (s.highlightColor) {
23549
- style.backgroundColor = chunk2SO3BL67_cjs.normalizeHexColor(s.highlightColor, "transparent");
23747
+ style.backgroundColor = chunkHTFYAGHG_cjs.normalizeHexColor(s.highlightColor, "transparent");
23550
23748
  }
23551
23749
  if (s.underlineColor) {
23552
- style.textDecorationColor = chunk2SO3BL67_cjs.normalizeHexColor(s.underlineColor);
23750
+ style.textDecorationColor = chunkHTFYAGHG_cjs.normalizeHexColor(s.underlineColor);
23553
23751
  }
23554
23752
  if (s.textOutlineWidth) {
23555
- style.WebkitTextStroke = s.textOutlineColor ? `${s.textOutlineWidth}px ${chunk2SO3BL67_cjs.normalizeHexColor(s.textOutlineColor, "#000000")}` : `${s.textOutlineWidth}px currentColor`;
23753
+ style.WebkitTextStroke = s.textOutlineColor ? `${s.textOutlineWidth}px ${chunkHTFYAGHG_cjs.normalizeHexColor(s.textOutlineColor, "#000000")}` : `${s.textOutlineWidth}px currentColor`;
23556
23754
  style.paintOrder = "stroke fill";
23557
23755
  }
23558
23756
  if (s.textCaps === "all") {
@@ -23593,7 +23791,7 @@ function segmentStyleToCss(seg, fontScale = 1, context3 = {}) {
23593
23791
  if (s.color) {
23594
23792
  style.color = textRunColor(s.color, s.colorRef?.alpha);
23595
23793
  } else if (s.hyperlink) {
23596
- style.color = chunk2SO3BL67_cjs.HYPERLINK_COLOR;
23794
+ style.color = chunkHTFYAGHG_cjs.HYPERLINK_COLOR;
23597
23795
  }
23598
23796
  const renderedFamily = typeof style.fontFamily === "string" ? style.fontFamily : context3.blockFont?.fontFamily;
23599
23797
  style.fontWeight = fontWeightAttribute(renderedFamily, s.bold) ?? "normal";
@@ -23706,9 +23904,9 @@ function cellPatternFillCss(style) {
23706
23904
  if (style.fillMode !== "pattern" || !style.patternFillPreset) {
23707
23905
  return null;
23708
23906
  }
23709
- const fg = chunk2SO3BL67_cjs.normalizeHexColor(style.patternFillForeground, "#000000");
23710
- const bg = chunk2SO3BL67_cjs.normalizeHexColor(style.patternFillBackground, "#ffffff");
23711
- const svgMarkup = chunk2SO3BL67_cjs.getPatternSvg(style.patternFillPreset, fg, bg);
23907
+ const fg = chunkHTFYAGHG_cjs.normalizeHexColor(style.patternFillForeground, "#000000");
23908
+ const bg = chunkHTFYAGHG_cjs.normalizeHexColor(style.patternFillBackground, "#ffffff");
23909
+ const svgMarkup = chunkHTFYAGHG_cjs.getPatternSvg(style.patternFillPreset, fg, bg);
23712
23910
  if (svgMarkup) {
23713
23911
  const encoded = encodeURIComponent(svgMarkup);
23714
23912
  return {
@@ -23883,7 +24081,7 @@ function cellStyleToCss(style) {
23883
24081
  const w = edge2.width ?? 1;
23884
24082
  const c = edge2.color ?? style.borderColor ?? "#000000";
23885
24083
  const s = ooxmlDashToCssBorderStyle(edge2.dash);
23886
- css[edge2.prefix] = chunkHWJKBKCW_cjs.screenBorder(w, s, c);
24084
+ css[edge2.prefix] = chunkFI2ATACZ_cjs.screenBorder(w, s, c);
23887
24085
  }
23888
24086
  }
23889
24087
  Object.assign(css, cellPaddingCss(style));
@@ -24139,7 +24337,7 @@ function tableCellCss(tableData, cell, position, context3, base2) {
24139
24337
  );
24140
24338
  const css = { ...base2, ...band, ...cellStyleToCss(cell?.style) };
24141
24339
  if (css.color === void 0) {
24142
- css.color = chunk2SO3BL67_cjs.DEFAULT_TEXT_COLOR;
24340
+ css.color = chunkHTFYAGHG_cjs.DEFAULT_TEXT_COLOR;
24143
24341
  }
24144
24342
  const result = { ...TABLE_CELL_TEXT_DEFAULTS, ...css };
24145
24343
  insetPaddingForBorders(result, cell?.style);
@@ -24347,19 +24545,21 @@ function matchGoogleWebfontFragments(families) {
24347
24545
  weights.add(Math.max(700, face.weight));
24348
24546
  }
24349
24547
  }
24350
- return [...weightsByFamily].map(([family2, weights]) => buildGoogleFontsFragment(family2, weights));
24548
+ return [...weightsByFamily].sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([family2, weights]) => buildGoogleFontsFragment(family2, weights));
24351
24549
  }
24352
24550
  async function resolveGoogleWebfontHref(slides, embeddedFonts, isLocallyInstalled = isFontFamilyInstalledLocally, googleFontsBaseUrl) {
24353
24551
  if (googleFontsBaseUrl === null) {
24354
24552
  return null;
24355
24553
  }
24356
- const referenced = collectReferencedFontFamilies(slides);
24357
- const candidates = selectGoogleWebfontFamilies(
24358
- referenced,
24554
+ const candidates = selectGoogleWebfontCandidates(slides, embeddedFonts, isLocallyInstalled);
24555
+ return buildGoogleFontsHref(matchGoogleWebfontFragments(candidates), googleFontsBaseUrl);
24556
+ }
24557
+ function selectGoogleWebfontCandidates(slides, embeddedFonts, isLocallyInstalled = isFontFamilyInstalledLocally) {
24558
+ return selectGoogleWebfontFamilies(
24559
+ collectReferencedFontFamilies(slides),
24359
24560
  selectTrustedEmbeddedFonts(embeddedFonts).map((font) => font.name),
24360
24561
  (family2) => !resolvedFamilies.has(family2) && isLocallyInstalled(family2)
24361
24562
  );
24362
- return buildGoogleFontsHref(matchGoogleWebfontFragments(candidates), googleFontsBaseUrl);
24363
24563
  }
24364
24564
 
24365
24565
  // src/pptx/render/font-settled.ts
@@ -24424,6 +24624,28 @@ function fontState(font) {
24424
24624
  }
24425
24625
  return installed2 ? "settled" : "missing";
24426
24626
  }
24627
+ var LARGE_TEXT_PX = 32;
24628
+ var SNAP_OFFSET_PX = 0.3;
24629
+ function bodyTopOf(element) {
24630
+ if (!pptx.hasTextProperties(element)) {
24631
+ return void 0;
24632
+ }
24633
+ const style = element.textStyle;
24634
+ const anchor = style?.vAlign ?? "top";
24635
+ if (anchor !== "top" || element.rotation || element.flipHorizontal || element.flipVertical || style?.textDirection && style.textDirection !== "horizontal") {
24636
+ return void 0;
24637
+ }
24638
+ const placement = chunkHTFYAGHG_cjs.snapPlacement(element);
24639
+ if (!placement) {
24640
+ return void 0;
24641
+ }
24642
+ const padding = resolveTextBodyRectPadding(element).top + (style?.bodyInsetTop ?? chunkHTFYAGHG_cjs.DEFAULT_BODY_INSET_TB_PX);
24643
+ return { painted: placement.y + padding, exact: placement.exact.y + padding };
24644
+ }
24645
+ function bodyTopSnapShift(top, sizePx) {
24646
+ const offset = sizePx >= LARGE_TEXT_PX ? SNAP_OFFSET_PX : 0;
24647
+ return Math.round(top.exact + offset) - top.painted;
24648
+ }
24427
24649
 
24428
24650
  // src/pptx/render/paragraph-baseline.ts
24429
24651
  var SINGLE_PITCH = 1.2;
@@ -24452,6 +24674,23 @@ function cssBaseline(boxes) {
24452
24674
  })
24453
24675
  );
24454
24676
  }
24677
+ var isDigit = (text4, index) => {
24678
+ const code = text4.charCodeAt(index);
24679
+ return code >= 48 && code <= 57;
24680
+ };
24681
+ function fontSizePx(font) {
24682
+ for (let at = font.indexOf("px"); at >= 0; at = font.indexOf("px", at + 2)) {
24683
+ let start = at;
24684
+ while (start > 0 && isDigit(font, start - 1)) start--;
24685
+ if (start === at) continue;
24686
+ if (start > 1 && font[start - 1] === "." && isDigit(font, start - 2)) {
24687
+ start--;
24688
+ while (start > 0 && isDigit(font, start - 1)) start--;
24689
+ }
24690
+ return Number.parseFloat(font.slice(start, at));
24691
+ }
24692
+ return Number.NaN;
24693
+ }
24455
24694
  var context;
24456
24695
  var cache = /* @__PURE__ */ new Map();
24457
24696
  var measureFontBoxWithCanvas = (font) => {
@@ -24478,7 +24717,7 @@ var measureFontBoxWithCanvas = (font) => {
24478
24717
  if (state !== "settled") {
24479
24718
  return { ...box, provisional: true, ...state === "loading" ? { loading: true } : {} };
24480
24719
  }
24481
- const size2 = Number.parseFloat(/(\d+(?:\.\d+)?)px/u.exec(font)?.[1] ?? "");
24720
+ const size2 = fontSizePx(font);
24482
24721
  const gap = typoLineGapEm(firstFontFamily(font)) * size2;
24483
24722
  if (gap > 0) {
24484
24723
  box.lineGap = gap;
@@ -24547,9 +24786,16 @@ function resolveParagraphBaseline(input) {
24547
24786
  const familyOf2 = (run2) => ownFamily(run2.style.fontFamily) ?? strutFamily;
24548
24787
  const size2 = sizeOf2(first);
24549
24788
  const family2 = familyOf2(first);
24550
- if (!(size2 > 0) || runs.some((run2) => sizeOf2(run2) !== size2 || familyOf2(run2) !== family2)) {
24789
+ if (runs.some((run2) => !(sizeOf2(run2) > 0) || familyOf2(run2) !== family2)) {
24551
24790
  return void 0;
24552
24791
  }
24792
+ if (runs.some((run2) => sizeOf2(run2) !== size2)) {
24793
+ return mixedSizeBaseline(
24794
+ input,
24795
+ runs.map((run2) => ({ run: run2, size: sizeOf2(run2) })),
24796
+ family2
24797
+ );
24798
+ }
24553
24799
  const strut = measure2(`normal ${strutSizePx}px ${strutFamily}`);
24554
24800
  const text4 = measure2(runFont(first, size2, family2));
24555
24801
  const reference = referenceBox(
@@ -24577,12 +24823,50 @@ function resolveParagraphBaseline(input) {
24577
24823
  const provisional = Boolean(strut.provisional || text4.provisional || reference.provisional);
24578
24824
  const loading3 = Boolean(strut.loading || text4.loading || reference.loading);
24579
24825
  const extentDelta = loading3 ? void 0 : lastLineExtentDelta(size2, pitch, reference);
24826
+ const baseShift = baselineShiftOf({ size: size2, pitch, boxes, reference, strutSizePx, loading: loading3 });
24827
+ const snap = input.bodyTop ? bodyTopSnapShift(input.bodyTop, size2) : 0;
24828
+ const total = Math.round(((baseShift ?? 0) + snap) * 100) / 100;
24580
24829
  return {
24581
- shift: baselineShiftOf({ size: size2, pitch, boxes, reference, strutSizePx, loading: loading3 }),
24830
+ shift: Math.abs(total) < MIN_SHIFT_PX ? void 0 : total,
24582
24831
  provisional,
24583
24832
  ...extentDelta === void 0 ? {} : { extentDelta }
24584
24833
  };
24585
24834
  }
24835
+ function mixedSizeBaseline(input, sized, family2) {
24836
+ const { lineHeight, strutSizePx, strutFamily, measure: measure2 = measureFontBoxWithCanvas } = input;
24837
+ if (typeof lineHeight !== "string" || !/^[\d.]+(?:pt|px)$/u.test(lineHeight.trim())) {
24838
+ return void 0;
24839
+ }
24840
+ const pitch = lineHeightToPx(strutSizePx, lineHeight.trim());
24841
+ if (!sized.every(({ size: size2 }) => pitch > size2 * SINGLE_PITCH * (1 + SINGLE_EPSILON))) {
24842
+ return void 0;
24843
+ }
24844
+ const strut = measure2(`normal ${strutSizePx}px ${strutFamily}`);
24845
+ if (!strut || strut.loading) {
24846
+ return void 0;
24847
+ }
24848
+ const boxes = [{ lineHeight: pitch, font: strut }];
24849
+ for (const { run: run2, size: size2 } of sized) {
24850
+ const font = measure2(runFont(run2, size2, family2));
24851
+ if (!font || font.loading) {
24852
+ return void 0;
24853
+ }
24854
+ boxes.push({ lineHeight: pxOf(run2.style.lineHeight) ?? pitch, font });
24855
+ }
24856
+ const largest = sized.reduce((a, b) => b.size > a.size ? b : a);
24857
+ const reference = referenceBox(
24858
+ measure2(referenceFont(largest.run.style, family2)),
24859
+ firstFontFamily(`1px ${family2}`)
24860
+ );
24861
+ const extentDelta = reference && !reference.loading ? lastLineExtentDelta(largest.size, pitch, reference) : void 0;
24862
+ const snap = input.bodyTop ? bodyTopSnapShift(input.bodyTop, largest.size) : 0;
24863
+ const total = Math.round((BASELINE_SHARE * pitch - cssBaseline(boxes) + snap) * 100) / 100;
24864
+ return {
24865
+ shift: Math.abs(total) < MIN_SHIFT_PX ? void 0 : total,
24866
+ provisional: false,
24867
+ ...extentDelta === void 0 ? {} : { extentDelta }
24868
+ };
24869
+ }
24586
24870
  function lastLineExtentDelta(size2, pitch, reference) {
24587
24871
  const descent = powerPointDescent(size2, reference);
24588
24872
  const delta = powerPointBaseline(pitch, size2, descent) + descent - pitch;
@@ -24598,7 +24882,7 @@ function bodyLineHeight(style) {
24598
24882
  }
24599
24883
  return resolveLineHeight(style);
24600
24884
  }
24601
- function applyParagraphBaselineShift(paragraph2, body, block, measure2) {
24885
+ function applyParagraphBaselineShift(paragraph2, body, block, measure2, bodyTop) {
24602
24886
  if (body?.textDirection && body.textDirection !== "horizontal" || body?.compatibleLineSpacing || body?.autoFitMode === "shrink") {
24603
24887
  return;
24604
24888
  }
@@ -24607,7 +24891,8 @@ function applyParagraphBaselineShift(paragraph2, body, block, measure2) {
24607
24891
  lineHeight: paragraph2.lineHeight ?? bodyLineHeight(body),
24608
24892
  strutSizePx: paragraph2.strutFontSizePx ?? block.fontSizePx,
24609
24893
  strutFamily: block.fontFamily,
24610
- ...measure2 ? { measure: measure2 } : {}
24894
+ ...measure2 ? { measure: measure2 } : {},
24895
+ ...bodyTop ? { bodyTop } : {}
24611
24896
  };
24612
24897
  const placement = baselinePlacementStyle(input);
24613
24898
  if (!placement) {
@@ -24655,7 +24940,8 @@ function encodePendingBaseline(input) {
24655
24940
  style,
24656
24941
  lineHeight: input.lineHeight,
24657
24942
  strutSizePx: input.strutSizePx,
24658
- strutFamily: input.strutFamily
24943
+ strutFamily: input.strutFamily,
24944
+ ...input.bodyTop ? { bodyTop: input.bodyTop } : {}
24659
24945
  })
24660
24946
  );
24661
24947
  }
@@ -24666,7 +24952,8 @@ function decodePendingBaseline(value) {
24666
24952
  runs: [{ text: "x", style: data.style }],
24667
24953
  lineHeight: data.lineHeight,
24668
24954
  strutSizePx: data.strutSizePx,
24669
- strutFamily: data.strutFamily
24955
+ strutFamily: data.strutFamily,
24956
+ ...data.bodyTop ? { bodyTop: data.bodyTop } : {}
24670
24957
  };
24671
24958
  } catch {
24672
24959
  return void 0;
@@ -24770,7 +25057,7 @@ function resolveParagraphSpacing(input) {
24770
25057
  const exactPt = lineSource?.lineSpacingExactPt;
24771
25058
  const multiplier = lineSource?.lineSpacing;
24772
25059
  if (typeof exactPt === "number" && exactPt > 0) {
24773
- out.lineHeight = `${exactPt * PT_TO_PX}px`;
25060
+ out.lineHeight = `${exactPitchPoints(exactPt) * PT_TO_PX}px`;
24774
25061
  out.runLineHeight = FIXED_SPACING_RUN_LINE_HEIGHT;
24775
25062
  } else if (typeof multiplier === "number" && multiplier > 0) {
24776
25063
  const proportional = proportionalLineHeight(multiplier, bodyStyle?.compatibleLineSpacing);
@@ -24828,7 +25115,7 @@ function cellBaselinePlacement(input) {
24828
25115
  runs,
24829
25116
  lineHeight: input.lineHeight ?? lineHeightOf(cellCss),
24830
25117
  strutSizePx,
24831
- strutFamily: typeof cellCss.fontFamily === "string" ? cellCss.fontFamily : chunk2SO3BL67_cjs.DEFAULT_FONT_FAMILY,
25118
+ strutFamily: typeof cellCss.fontFamily === "string" ? cellCss.fontFamily : chunkHTFYAGHG_cjs.DEFAULT_FONT_FAMILY,
24832
25119
  ...input.measure ? { measure: input.measure } : {}
24833
25120
  });
24834
25121
  }
@@ -24982,9 +25269,13 @@ function cellParagraphBlocks(cell, options = {}) {
24982
25269
  (_, index) => paragraphLayoutCss(paragraphs2[index], follows[index], index === 0, index === groups.length - 1)
24983
25270
  );
24984
25271
  addSpaceBefore(layouts);
25272
+ const laidOut = groups.map((group, index) => {
25273
+ const { runLineHeight } = layouts[index];
25274
+ return runLineHeight === void 0 ? group : group.map((run2) => ({ ...run2, lineHeight: runLineHeight }));
25275
+ });
24985
25276
  const placements = groups.map(
24986
25277
  (group, index) => hasContentRuns(group) ? cellBaselinePlacement({
24987
- runs: group,
25278
+ runs: laidOut[index],
24988
25279
  lineHeight: layouts[index].css.lineHeight,
24989
25280
  strutPt: strutFontSizePt(group),
24990
25281
  cellCss: options.cellCss,
@@ -25001,7 +25292,7 @@ function cellParagraphBlocks(cell, options = {}) {
25001
25292
  return void 0;
25002
25293
  }
25003
25294
  return groups.map((group, index) => {
25004
- const { css, runLineHeight } = layouts[index];
25295
+ const { css } = layouts[index];
25005
25296
  const placement = placements[index];
25006
25297
  if (placement) {
25007
25298
  Object.assign(css, placement.style);
@@ -25025,8 +25316,7 @@ function cellParagraphBlocks(cell, options = {}) {
25025
25316
  if (strutPt !== void 0) {
25026
25317
  css.fontSize = `${strutPt}pt`;
25027
25318
  }
25028
- const runs2 = runLineHeight === void 0 ? group : group.map((run2) => ({ ...run2, lineHeight: runLineHeight }));
25029
- return { css, runs: runs2 };
25319
+ return { css, runs: laidOut[index] };
25030
25320
  });
25031
25321
  }
25032
25322
 
@@ -25185,7 +25475,7 @@ var GRADIENT_TYPE_OPTIONS = [
25185
25475
  { value: "linear", i18nKey: "pptx.table.gradientLinear" },
25186
25476
  { value: "radial", i18nKey: "pptx.table.gradientRadial" }
25187
25477
  ];
25188
- var PATTERN_OPTIONS = chunk2SO3BL67_cjs.OOXML_PATTERN_PRESETS.slice(0, 20);
25478
+ var PATTERN_OPTIONS = chunkHTFYAGHG_cjs.OOXML_PATTERN_PRESETS.slice(0, 20);
25189
25479
 
25190
25480
  // src/pptx/render/table-resize.ts
25191
25481
  var MIN_COLUMN_PROPORTION = 0.03;
@@ -25930,10 +26220,10 @@ function imageFitTransformParts(el) {
25930
26220
  return { placement: "", crop: "" };
25931
26221
  }
25932
26222
  return fitTransformsFromInsets({
25933
- cropLeft: chunk2SO3BL67_cjs.clampCropValue(el.cropLeft),
25934
- cropTop: chunk2SO3BL67_cjs.clampCropValue(el.cropTop),
25935
- cropRight: chunk2SO3BL67_cjs.clampCropValue(el.cropRight),
25936
- cropBottom: chunk2SO3BL67_cjs.clampCropValue(el.cropBottom),
26223
+ cropLeft: chunkHTFYAGHG_cjs.clampCropValue(el.cropLeft),
26224
+ cropTop: chunkHTFYAGHG_cjs.clampCropValue(el.cropTop),
26225
+ cropRight: chunkHTFYAGHG_cjs.clampCropValue(el.cropRight),
26226
+ cropBottom: chunkHTFYAGHG_cjs.clampCropValue(el.cropBottom),
25937
26227
  fillRectLeft: el.fillRectLeft ?? 0,
25938
26228
  fillRectTop: el.fillRectTop ?? 0,
25939
26229
  fillRectRight: el.fillRectRight ?? 0,
@@ -25957,10 +26247,10 @@ function fitTransformsFromInsets(insets) {
25957
26247
  if (hasCrop2) {
25958
26248
  const horizontalScale = cropLeft + cropRight >= 0.99 ? 0.99 / (cropLeft + cropRight) : 1;
25959
26249
  const verticalScale = cropTop + cropBottom >= 0.99 ? 0.99 / (cropTop + cropBottom) : 1;
25960
- cropLeft = chunk2SO3BL67_cjs.clampCropValue(cropLeft * horizontalScale);
25961
- cropRight = chunk2SO3BL67_cjs.clampCropValue(cropRight * horizontalScale);
25962
- cropTop = chunk2SO3BL67_cjs.clampCropValue(cropTop * verticalScale);
25963
- cropBottom = chunk2SO3BL67_cjs.clampCropValue(cropBottom * verticalScale);
26250
+ cropLeft = chunkHTFYAGHG_cjs.clampCropValue(cropLeft * horizontalScale);
26251
+ cropRight = chunkHTFYAGHG_cjs.clampCropValue(cropRight * horizontalScale);
26252
+ cropTop = chunkHTFYAGHG_cjs.clampCropValue(cropTop * verticalScale);
26253
+ cropBottom = chunkHTFYAGHG_cjs.clampCropValue(cropBottom * verticalScale);
25964
26254
  const remainingWidth = Math.max(0.01, 1 - cropLeft - cropRight);
25965
26255
  const remainingHeight = Math.max(0.01, 1 - cropTop - cropBottom);
25966
26256
  const tx = Math.round(-cropLeft / remainingWidth * 1e4) / 100;
@@ -26316,7 +26606,7 @@ function resolveShadeToTitleBackgroundImage(slide, slideWidthPx, slideHeightPx)
26316
26606
  if (stops.length === 0) {
26317
26607
  return void 0;
26318
26608
  }
26319
- return chunk2SO3BL67_cjs.buildRectPathGradientImage(stops, void 0, fillToRect);
26609
+ return chunkHTFYAGHG_cjs.buildRectPathGradientImage(stops, void 0, fillToRect);
26320
26610
  }
26321
26611
 
26322
26612
  // src/pptx/render/slide-background.ts
@@ -26338,7 +26628,7 @@ function getSlideBackgroundStyle(slide, slideSize) {
26338
26628
  style["background-repeat"] = "no-repeat";
26339
26629
  }
26340
26630
  } else if (pattern) {
26341
- const svg2 = chunk2SO3BL67_cjs.getPatternSvg(
26631
+ const svg2 = chunkHTFYAGHG_cjs.getPatternSvg(
26342
26632
  pattern.preset,
26343
26633
  pattern.fgColor ?? solid ?? "#000000",
26344
26634
  pattern.bgColor ?? DEFAULT_SLIDE_BACKGROUND
@@ -28940,7 +29230,7 @@ function createTemplateContext(options = {}) {
28940
29230
  const scheme = { ...pptx.DEFAULT_SCHEME_COLOR_MAP, ...options.scheme ?? {} };
28941
29231
  let counter = 0;
28942
29232
  const idFor = options.idFor ?? ((index) => `template-el-${Date.now()}-${index}`);
28943
- const dictionary = chunkZHVKGGLQ_cjs.translationsEn;
29233
+ const dictionary = chunkUFJBHFSD_cjs.translationsEn;
28944
29234
  const translate2 = options.translate ?? ((key) => dictionary[key] ?? key);
28945
29235
  return {
28946
29236
  scheme,
@@ -29785,16 +30075,16 @@ function applyUnderlineVariant(style, seg) {
29785
30075
  // src/pptx/render/text-tab-layout.ts
29786
30076
  var EPS = 0.01;
29787
30077
  var FALLBACK_STEP_PX = 48;
29788
- function buildTabContext(tabStops, defaultTabSize, fontSizePx, fontFamily, bold, italic, options = {}) {
30078
+ function buildTabContext(tabStops, defaultTabSize, fontSizePx2, fontFamily, bold, italic, options = {}) {
29789
30079
  if (!tabStops || tabStops.length === 0) {
29790
30080
  return void 0;
29791
30081
  }
29792
- const font = `${fontStyleShorthand(fontFamily, italic)}${resolveFontWeight(fontFamily, bold)} ${fontSizePx}px ${fontFamily}`;
30082
+ const font = `${fontStyleShorthand(fontFamily, italic)}${resolveFontWeight(fontFamily, bold)} ${fontSizePx2}px ${fontFamily}`;
29793
30083
  return {
29794
30084
  tabStops,
29795
30085
  defaultTabSize: typeof defaultTabSize === "number" && defaultTabSize > 0 ? defaultTabSize : 0,
29796
30086
  font,
29797
- runFont: { fontFamily, fontSizePx, bold, italic },
30087
+ runFont: { fontFamily, fontSizePx: fontSizePx2, bold, italic },
29798
30088
  decimalSeparator: text$1.decimalSeparatorForLanguage(options.language),
29799
30089
  rtl: options.rtl === true
29800
30090
  };
@@ -29958,12 +30248,12 @@ function buildRunTabLines(text4, ctx, nestedDecoration, measure2 = (t2) => measu
29958
30248
  // src/pptx/render/paragraph-run-enrich.ts
29959
30249
  function resolveRunExtrasContext(input) {
29960
30250
  const { seg, runFont: runFont3, blockFont, blockScriptStyle, tabStops, defaultTabSize, rtl } = input;
29961
- const baseFontFamily = runFont3.fontFamily ?? blockFont.fontFamily ?? chunk2SO3BL67_cjs.DEFAULT_FONT_FAMILY;
30251
+ const baseFontFamily = runFont3.fontFamily ?? blockFont.fontFamily ?? chunkHTFYAGHG_cjs.DEFAULT_FONT_FAMILY;
29962
30252
  const scriptFonts = text$1.resolveScriptFontSet(seg.style, blockScriptStyle, baseFontFamily);
29963
30253
  const tabContext = tabStops && tabStops.length > 0 ? buildTabContext(
29964
30254
  tabStops,
29965
30255
  defaultTabSize,
29966
- runFont3.fontSizePx ?? blockFont.fontSizePx ?? chunk2SO3BL67_cjs.DEFAULT_TEXT_FONT_SIZE,
30256
+ runFont3.fontSizePx ?? blockFont.fontSizePx ?? chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE,
29967
30257
  baseFontFamily,
29968
30258
  Boolean(seg.style?.bold),
29969
30259
  Boolean(seg.style?.italic),
@@ -29995,8 +30285,8 @@ function resolveRunReflection(segStyle, blockFont) {
29995
30285
  if (!segStyle) {
29996
30286
  return void 0;
29997
30287
  }
29998
- const height = typeof segStyle.fontSize === "number" ? segStyle.fontSize : blockFont.fontSizePx ?? chunk2SO3BL67_cjs.DEFAULT_TEXT_FONT_SIZE;
29999
- return chunk2SO3BL67_cjs.getTextReflectionWrapperStyle(segStyle, height);
30288
+ const height = typeof segStyle.fontSize === "number" ? segStyle.fontSize : blockFont.fontSizePx ?? chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE;
30289
+ return chunkHTFYAGHG_cjs.getTextReflectionWrapperStyle(segStyle, height);
30000
30290
  }
30001
30291
  function applyRunReflection(run2, reflection2) {
30002
30292
  if (reflection2) {
@@ -30131,6 +30421,27 @@ function resolveParagraphStrutFontSize(segments, bodyFontSize, fontScale = 1) {
30131
30421
  return scaleFontSizeForAutoFit(smallest, fontScale);
30132
30422
  }
30133
30423
 
30424
+ // src/pptx/render/paragraph-trailing-break.ts
30425
+ var ZERO_WIDTH_SPACE2 = "\u200B";
30426
+ function appendTrailingBreakLine(runs) {
30427
+ const last = runs[runs.length - 1];
30428
+ if (!last || last.text !== "\n") {
30429
+ return;
30430
+ }
30431
+ const style = {};
30432
+ for (const key of ["fontSize", "fontFamily", "fontWeight", "fontStyle", "lineHeight"]) {
30433
+ const value = last.style[key];
30434
+ if (value !== void 0) {
30435
+ Object.assign(style, { [key]: value });
30436
+ }
30437
+ }
30438
+ runs.push({
30439
+ text: ZERO_WIDTH_SPACE2,
30440
+ style,
30441
+ ...last.segmentIndex !== void 0 ? { segmentIndex: last.segmentIndex } : {}
30442
+ });
30443
+ }
30444
+
30134
30445
  // src/pptx/render/text-font-alignment.ts
30135
30446
  function fontAlignmentVerticalAlign(fontAlgn) {
30136
30447
  switch (fontAlgn) {
@@ -30162,12 +30473,12 @@ function buildTextShadowCss(style) {
30162
30473
  const ox = style.textShadowOffsetX ?? 0;
30163
30474
  const oy = style.textShadowOffsetY ?? 0;
30164
30475
  const blur = style.textShadowBlur ?? 4;
30165
- const color = chunk2SO3BL67_cjs.normalizeHexColor(style.textShadowColor, "#000000");
30476
+ const color = chunkHTFYAGHG_cjs.normalizeHexColor(style.textShadowColor, "#000000");
30166
30477
  const opacity = style.textShadowOpacity ?? 0.5;
30167
30478
  const r = parseInt(color.slice(1, 3), 16);
30168
30479
  const g = parseInt(color.slice(3, 5), 16);
30169
30480
  const b = parseInt(color.slice(5, 7), 16);
30170
- const cssBlur = Math.round(blur * chunk2SO3BL67_cjs.TEXT_SHADOW_BLUR_TO_CSS * 10) / 10;
30481
+ const cssBlur = Math.round(blur * chunkHTFYAGHG_cjs.TEXT_SHADOW_BLUR_TO_CSS * 10) / 10;
30171
30482
  shadows.push(`${ox}px ${oy}px ${cssBlur}px rgba(${r},${g},${b},${opacity})`);
30172
30483
  }
30173
30484
  if (style.textPresetShadowName && style.textPresetShadowColor) {
@@ -30176,7 +30487,7 @@ function buildTextShadowCss(style) {
30176
30487
  const dirRad = dir * Math.PI / 180;
30177
30488
  const psOx = Math.round(Math.cos(dirRad) * dist2 * 100) / 100;
30178
30489
  const psOy = Math.round(Math.sin(dirRad) * dist2 * 100) / 100;
30179
- const psColor = chunk2SO3BL67_cjs.normalizeHexColor(style.textPresetShadowColor, "#000000");
30490
+ const psColor = chunkHTFYAGHG_cjs.normalizeHexColor(style.textPresetShadowColor, "#000000");
30180
30491
  const psOpacity = style.textPresetShadowOpacity ?? 0.5;
30181
30492
  const psR = parseInt(psColor.slice(1, 3), 16);
30182
30493
  const psG = parseInt(psColor.slice(3, 5), 16);
@@ -30193,7 +30504,7 @@ function buildTextInnerShadowCss(style) {
30193
30504
  const ox = style.textInnerShadowOffsetX ?? 0;
30194
30505
  const oy = style.textInnerShadowOffsetY ?? 0;
30195
30506
  const blur = style.textInnerShadowBlur ?? 3;
30196
- const color = chunk2SO3BL67_cjs.normalizeHexColor(style.textInnerShadowColor, "#000000");
30507
+ const color = chunkHTFYAGHG_cjs.normalizeHexColor(style.textInnerShadowColor, "#000000");
30197
30508
  const opacity = style.textInnerShadowOpacity ?? 0.5;
30198
30509
  const r = parseInt(color.slice(1, 3), 16);
30199
30510
  const g = parseInt(color.slice(3, 5), 16);
@@ -30240,12 +30551,12 @@ function buildTextGlowFilter(style) {
30240
30551
  return void 0;
30241
30552
  }
30242
30553
  const radius = style.textGlowRadius ?? 6;
30243
- const color = chunk2SO3BL67_cjs.normalizeHexColor(style.textGlowColor, "#ffff00");
30554
+ const color = chunkHTFYAGHG_cjs.normalizeHexColor(style.textGlowColor, "#ffff00");
30244
30555
  const opacity = style.textGlowOpacity ?? 0.6;
30245
30556
  const r = parseInt(color.slice(1, 3), 16);
30246
30557
  const g = parseInt(color.slice(3, 5), 16);
30247
30558
  const b = parseInt(color.slice(5, 7), 16);
30248
- return chunk2SO3BL67_cjs.glowFilterLengths(radius).map((blur) => `drop-shadow(0 0 ${blur}px rgba(${r},${g},${b},${Math.min(1, opacity)}))`).join(" ");
30559
+ return chunkHTFYAGHG_cjs.glowFilterLengths(radius).map((blur) => `drop-shadow(0 0 ${blur}px rgba(${r},${g},${b},${Math.min(1, opacity)}))`).join(" ");
30249
30560
  }
30250
30561
 
30251
30562
  // src/pptx/render/text-fill.ts
@@ -30259,9 +30570,9 @@ function buildTextFillCss(style) {
30259
30570
  };
30260
30571
  }
30261
30572
  if (style.textFillPattern) {
30262
- const fg = chunk2SO3BL67_cjs.normalizeHexColor(style.textFillPatternForeground, "#000000");
30263
- const bg = chunk2SO3BL67_cjs.normalizeHexColor(style.textFillPatternBackground, "#ffffff");
30264
- const svgPattern = chunk2SO3BL67_cjs.getPatternSvg(style.textFillPattern, fg, bg);
30573
+ const fg = chunkHTFYAGHG_cjs.normalizeHexColor(style.textFillPatternForeground, "#000000");
30574
+ const bg = chunkHTFYAGHG_cjs.normalizeHexColor(style.textFillPatternBackground, "#ffffff");
30575
+ const svgPattern = chunkHTFYAGHG_cjs.getPatternSvg(style.textFillPattern, fg, bg);
30265
30576
  if (svgPattern) {
30266
30577
  const encoded = encodeURIComponent(svgPattern);
30267
30578
  return {
@@ -30406,15 +30717,15 @@ function resolveRunRuby(segment, baseFontSizePx, blockFont, baseColor) {
30406
30717
  return void 0;
30407
30718
  }
30408
30719
  const authoredFamily = segment.rubyStyle?.fontFamily ?? segment.style?.fontFamily;
30409
- const baseSize = Number.isFinite(baseFontSizePx) ? baseFontSizePx : chunk2SO3BL67_cjs.DEFAULT_TEXT_FONT_SIZE;
30720
+ const baseSize = Number.isFinite(baseFontSizePx) ? baseFontSizePx : chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE;
30410
30721
  const style = {
30411
30722
  fontSize: `${segment.rubyFontSize ?? baseSize * RUBY_SIZE_RATIO}px`,
30412
- fontFamily: authoredFamily ? pptx.getSubstituteFontFamily(authoredFamily) : blockFont.fontFamily ?? chunk2SO3BL67_cjs.DEFAULT_FONT_FAMILY,
30723
+ fontFamily: authoredFamily ? pptx.getSubstituteFontFamily(authoredFamily) : blockFont.fontFamily ?? chunkHTFYAGHG_cjs.DEFAULT_FONT_FAMILY,
30413
30724
  textAlign: rubyTextAlign(segment.rubyAlignment)
30414
30725
  };
30415
30726
  const color = segment.rubyStyle?.color;
30416
30727
  if (color) {
30417
- style.color = chunk2SO3BL67_cjs.normalizeHexColor(color, baseColor);
30728
+ style.color = chunkHTFYAGHG_cjs.normalizeHexColor(color, baseColor);
30418
30729
  }
30419
30730
  return { text: text4, style };
30420
30731
  }
@@ -30487,7 +30798,7 @@ function buildParagraphRuns(input) {
30487
30798
  bodyFontSizeRaw,
30488
30799
  fontScale
30489
30800
  );
30490
- const fallbackFontSize = strutFontSize ?? blockFont.fontSizePx ?? chunk2SO3BL67_cjs.DEFAULT_TEXT_FONT_SIZE;
30801
+ const fallbackFontSize = strutFontSize ?? blockFont.fontSizePx ?? chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE;
30491
30802
  equationStyle.fontSize = `${fallbackFontSize}px`;
30492
30803
  }
30493
30804
  runs.push({
@@ -30524,7 +30835,7 @@ function buildParagraphRuns(input) {
30524
30835
  });
30525
30836
  const ruby = resolveRunRuby(
30526
30837
  seg,
30527
- typeof seg.style?.fontSize === "number" ? seg.style.fontSize : blockFont.fontSizePx ?? chunk2SO3BL67_cjs.DEFAULT_TEXT_FONT_SIZE,
30838
+ typeof seg.style?.fontSize === "number" ? seg.style.fontSize : blockFont.fontSizePx ?? chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE,
30528
30839
  blockFont,
30529
30840
  typeof style.color === "string" ? style.color : void 0
30530
30841
  );
@@ -30572,6 +30883,7 @@ function buildParagraphRuns(input) {
30572
30883
  }
30573
30884
  }
30574
30885
  stitchContinuousGradientFill(runs);
30886
+ appendTrailingBreakLine(runs);
30575
30887
  return runs;
30576
30888
  }
30577
30889
 
@@ -30616,8 +30928,8 @@ function withRunLineHeight(runs, lineHeight) {
30616
30928
  }
30617
30929
  function resolveBlockFont(textStyle, fontScale) {
30618
30930
  return {
30619
- fontFamily: textStyle?.fontFamily ? pptx.getSubstituteFontFamily(textStyle.fontFamily, pptx.parsePanoseString(textStyle.latinFontPanose)) : chunk2SO3BL67_cjs.DEFAULT_FONT_FAMILY,
30620
- fontSizePx: (textStyle?.fontSize || chunk2SO3BL67_cjs.DEFAULT_TEXT_FONT_SIZE) * fontScale
30931
+ fontFamily: textStyle?.fontFamily ? pptx.getSubstituteFontFamily(textStyle.fontFamily, pptx.parsePanoseString(textStyle.latinFontPanose)) : chunkHTFYAGHG_cjs.DEFAULT_FONT_FAMILY,
30932
+ fontSizePx: (textStyle?.fontSize || chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE) * fontScale
30621
30933
  };
30622
30934
  }
30623
30935
  function buildParagraphs(element, fieldContext, segmentOverrides, options) {
@@ -30630,6 +30942,7 @@ function buildParagraphs(element, fieldContext, segmentOverrides, options) {
30630
30942
  }
30631
30943
  const fontScale = resolveAutoFitFontScale(element.textStyle);
30632
30944
  const blockFont = resolveBlockFont(element.textStyle, fontScale);
30945
+ const bodyTop = bodyTopOf(element);
30633
30946
  const blockScriptStyle = element.textStyle;
30634
30947
  const tabStops = element.textStyle?.tabStops;
30635
30948
  const paragraphIndents = element.paragraphIndents;
@@ -30746,7 +31059,7 @@ function buildParagraphs(element, fieldContext, segmentOverrides, options) {
30746
31059
  if (Object.keys(paragraphStyle).length > 0) {
30747
31060
  para.paragraphStyle = paragraphStyle;
30748
31061
  }
30749
- applyParagraphBaselineShift(para, bodyStyle, blockFont);
31062
+ applyParagraphBaselineShift(para, bodyStyle, blockFont, void 0, bodyTop);
30750
31063
  if (para.baselineProvisional) {
30751
31064
  armBaselineSettle();
30752
31065
  }
@@ -33179,14 +33492,14 @@ function readFrame(element, options = {}) {
33179
33492
  }
33180
33493
  const fontScale = resolveAutoFitFontScale(ts);
33181
33494
  const block = {
33182
- family: ts?.fontFamily ? pptx.getSubstituteFontFamily(ts.fontFamily) : chunk2SO3BL67_cjs.DEFAULT_FONT_FAMILY,
33183
- size: (ts?.fontSize || chunk2SO3BL67_cjs.DEFAULT_TEXT_FONT_SIZE) * fontScale
33495
+ family: ts?.fontFamily ? pptx.getSubstituteFontFamily(ts.fontFamily) : chunkHTFYAGHG_cjs.DEFAULT_FONT_FAMILY,
33496
+ size: (ts?.fontSize || chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE) * fontScale
33184
33497
  };
33185
33498
  const rect3 = resolveTextBodyRectPadding(element);
33186
- const left = (ts?.bodyInsetLeft ?? chunk2SO3BL67_cjs.DEFAULT_BODY_INSET_LR_PX) + rect3.left;
33187
- const right = (ts?.bodyInsetRight ?? chunk2SO3BL67_cjs.DEFAULT_BODY_INSET_LR_PX) + rect3.right;
33188
- const top = (ts?.bodyInsetTop ?? chunk2SO3BL67_cjs.DEFAULT_BODY_INSET_TB_PX) + rect3.top;
33189
- const bottom = (ts?.bodyInsetBottom ?? chunk2SO3BL67_cjs.DEFAULT_BODY_INSET_TB_PX) + rect3.bottom;
33499
+ const left = (ts?.bodyInsetLeft ?? chunkHTFYAGHG_cjs.DEFAULT_BODY_INSET_LR_PX) + rect3.left;
33500
+ const right = (ts?.bodyInsetRight ?? chunkHTFYAGHG_cjs.DEFAULT_BODY_INSET_LR_PX) + rect3.right;
33501
+ const top = (ts?.bodyInsetTop ?? chunkHTFYAGHG_cjs.DEFAULT_BODY_INSET_TB_PX) + rect3.top;
33502
+ const bottom = (ts?.bodyInsetBottom ?? chunkHTFYAGHG_cjs.DEFAULT_BODY_INSET_TB_PX) + rect3.bottom;
33190
33503
  if (element.flipHorizontal && !flipReadsUnflipped(left, right)) {
33191
33504
  return void 0;
33192
33505
  }
@@ -33766,17 +34079,17 @@ function hasItalicRuns(element) {
33766
34079
  );
33767
34080
  }
33768
34081
  function buildTextBlockStyle(element, options = {}) {
33769
- const fallbackColor = options.fallbackColor ?? chunk2SO3BL67_cjs.DEFAULT_TEXT_COLOR;
34082
+ const fallbackColor = options.fallbackColor ?? chunkHTFYAGHG_cjs.DEFAULT_TEXT_COLOR;
33770
34083
  if (!pptx.hasTextProperties(element)) {
33771
34084
  return { color: fallbackColor };
33772
34085
  }
33773
34086
  const ts = element.textStyle;
33774
34087
  const italic = hasItalicRuns(element);
33775
34088
  const isRtl = ts?.rtl === true;
33776
- const bodyTop = ts?.bodyInsetTop ?? chunk2SO3BL67_cjs.DEFAULT_BODY_INSET_TB_PX;
33777
- const bodyBottom = ts?.bodyInsetBottom ?? chunk2SO3BL67_cjs.DEFAULT_BODY_INSET_TB_PX;
33778
- const bodyLeft = ts?.bodyInsetLeft ?? chunk2SO3BL67_cjs.DEFAULT_BODY_INSET_LR_PX;
33779
- const bodyRight = ts?.bodyInsetRight ?? chunk2SO3BL67_cjs.DEFAULT_BODY_INSET_LR_PX;
34089
+ const bodyTop = ts?.bodyInsetTop ?? chunkHTFYAGHG_cjs.DEFAULT_BODY_INSET_TB_PX;
34090
+ const bodyBottom = ts?.bodyInsetBottom ?? chunkHTFYAGHG_cjs.DEFAULT_BODY_INSET_TB_PX;
34091
+ const bodyLeft = ts?.bodyInsetLeft ?? chunkHTFYAGHG_cjs.DEFAULT_BODY_INSET_LR_PX;
34092
+ const bodyRight = ts?.bodyInsetRight ?? chunkHTFYAGHG_cjs.DEFAULT_BODY_INSET_LR_PX;
33780
34093
  const hasParagraphIndents = (element.paragraphIndents?.length ?? 0) > 0;
33781
34094
  const bodyIndent = hasParagraphIndents ? 0 : ts?.paragraphIndent || 0;
33782
34095
  const bodyMarginLeft = hasParagraphIndents ? 0 : ts?.paragraphMarginLeft || 0;
@@ -33808,17 +34121,17 @@ function buildTextBlockStyle(element, options = {}) {
33808
34121
  style.transformOrigin = compensation?.transformOrigin ?? "center";
33809
34122
  }
33810
34123
  }
33811
- style.color = ts?.hyperlink ? chunk2SO3BL67_cjs.normalizeHexColor(ts?.color, chunk2SO3BL67_cjs.HYPERLINK_COLOR) : chunk2SO3BL67_cjs.normalizeHexColor(ts?.color, fallbackColor);
34124
+ style.color = ts?.hyperlink ? chunkHTFYAGHG_cjs.normalizeHexColor(ts?.color, chunkHTFYAGHG_cjs.HYPERLINK_COLOR) : chunkHTFYAGHG_cjs.normalizeHexColor(ts?.color, fallbackColor);
33812
34125
  if (!hasTextSegments && ts?.highlightColor) {
33813
- style.backgroundColor = chunk2SO3BL67_cjs.normalizeHexColor(ts.highlightColor, void 0);
34126
+ style.backgroundColor = chunkHTFYAGHG_cjs.normalizeHexColor(ts.highlightColor, void 0);
33814
34127
  }
33815
34128
  style.textAlign = resolveCssTextAlign(ts?.align, isRtl) ?? "left";
33816
34129
  style.direction = toCssVerticalDirection(ts?.textDirection) ?? (isRtl ? "rtl" : bodyLayoutStyle?.direction ?? "ltr");
33817
34130
  if (isRtl) {
33818
34131
  style.unicodeBidi = "plaintext";
33819
34132
  }
33820
- style.fontSize = ts?.fontSize || chunk2SO3BL67_cjs.DEFAULT_TEXT_FONT_SIZE;
33821
- style.fontFamily = ts?.fontFamily ? pptx.getSubstituteFontFamily(ts.fontFamily, pptx.parsePanoseString(ts.latinFontPanose)) : chunk2SO3BL67_cjs.DEFAULT_FONT_FAMILY;
34133
+ style.fontSize = ts?.fontSize || chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE;
34134
+ style.fontFamily = ts?.fontFamily ? pptx.getSubstituteFontFamily(ts.fontFamily, pptx.parsePanoseString(ts.latinFontPanose)) : chunkHTFYAGHG_cjs.DEFAULT_FONT_FAMILY;
33822
34135
  style.fontWeight = resolveFontWeight(ts?.fontFamily, ts?.bold);
33823
34136
  style.fontStyle = resolveFontItalic(ts?.fontFamily, ts?.italic) ? "italic" : "normal";
33824
34137
  style.textDecorationLine = decorations.length > 0 ? decorations.join(" ") : "none";
@@ -33858,7 +34171,7 @@ function buildTextBlockStyle(element, options = {}) {
33858
34171
  text: element.text ?? "",
33859
34172
  width: element.width,
33860
34173
  height: element.height,
33861
- defaultFontSize: chunk2SO3BL67_cjs.DEFAULT_TEXT_FONT_SIZE
34174
+ defaultFontSize: chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE
33862
34175
  });
33863
34176
  if (autoFit.fontSize !== void 0) {
33864
34177
  style.fontSize = autoFit.fontSize;
@@ -33866,8 +34179,8 @@ function buildTextBlockStyle(element, options = {}) {
33866
34179
  if (autoFit.lineHeight !== void 0) {
33867
34180
  style.lineHeight = autoFit.lineHeight;
33868
34181
  }
33869
- const fontSizePx = typeof style.fontSize === "number" ? style.fontSize : chunk2SO3BL67_cjs.DEFAULT_TEXT_FONT_SIZE;
33870
- const lineHeightPx = lineHeightToPx(fontSizePx, style.lineHeight);
34182
+ const fontSizePx2 = typeof style.fontSize === "number" ? style.fontSize : chunkHTFYAGHG_cjs.DEFAULT_TEXT_FONT_SIZE;
34183
+ const lineHeightPx = lineHeightToPx(fontSizePx2, style.lineHeight);
33871
34184
  const contentHeightPx = element.height - style.paddingTop - style.paddingBottom;
33872
34185
  Object.assign(style, resolveVertOverflowEllipsisStyle(ts, contentHeightPx, lineHeightPx));
33873
34186
  Object.assign(
@@ -34433,7 +34746,7 @@ function interpolatePaths(from, to, t2) {
34433
34746
  // src/pptx/render/morph-outline-blend.ts
34434
34747
  var MAX_POINTS = 400;
34435
34748
  function ringOf(commands) {
34436
- const subpaths = chunk2SO3BL67_cjs.flattenPath(serializeSvgPath([...commands]));
34749
+ const subpaths = chunkHTFYAGHG_cjs.flattenPath(serializeSvgPath([...commands]));
34437
34750
  const ring = subpaths?.length === 1 ? [...subpaths[0] ?? []] : void 0;
34438
34751
  const first = ring?.[0];
34439
34752
  const last = ring?.[ring.length - 1];
@@ -34519,7 +34832,7 @@ function axisOf(type, index) {
34519
34832
  return index % 2 === 0 ? "x" : "y";
34520
34833
  }
34521
34834
  function outlineCommands(element) {
34522
- const d = chunk2SO3BL67_cjs.outlinePathData(chunk2SO3BL67_cjs.getResolvedShapeClipPath(element), element.width, element.height);
34835
+ const d = chunkHTFYAGHG_cjs.outlinePathData(chunkHTFYAGHG_cjs.getResolvedShapeClipPath(element), element.width, element.height);
34523
34836
  const commands = d ? parseSvgPath(d) : [];
34524
34837
  return commands.length > 0 ? commands : void 0;
34525
34838
  }
@@ -34726,7 +35039,7 @@ function lineWidth(el) {
34726
35039
  function isCarriedLine(element) {
34727
35040
  if (element.type !== "connector" || !pptx.hasShapeProperties(element)) return false;
34728
35041
  const style = element.shapeStyle;
34729
- return !chunk2SO3BL67_cjs.connectorNeedsPath(element.shapeType) && lineWidth(element) > 0 && chunk2SO3BL67_cjs.getCompoundLineOffsets(style?.compoundLine, lineWidth(element)).length === 1;
35042
+ return !chunkHTFYAGHG_cjs.connectorNeedsPath(element.shapeType) && lineWidth(element) > 0 && chunkHTFYAGHG_cjs.getCompoundLineOffsets(style?.compoundLine, lineWidth(element)).length === 1;
34730
35043
  }
34731
35044
  function buildMorphLineCarry(from, to, half) {
34732
35045
  if (!isCarriedLine(from) || !isCarriedLine(to)) return void 0;
@@ -34800,7 +35113,7 @@ ${carry.keyframes}
34800
35113
  var UNIT = 1e3;
34801
35114
  function isCarriedPathConnector(element) {
34802
35115
  if (element.type !== "connector" || !pptx.hasShapeProperties(element)) return false;
34803
- return chunk2SO3BL67_cjs.connectorNeedsPath(element.shapeType) && lineWidth(element) > 0 && chunk2SO3BL67_cjs.getCompoundLineOffsets(element.shapeStyle?.compoundLine, lineWidth(element)).length === 1;
35116
+ return chunkHTFYAGHG_cjs.connectorNeedsPath(element.shapeType) && lineWidth(element) > 0 && chunkHTFYAGHG_cjs.getCompoundLineOffsets(element.shapeStyle?.compoundLine, lineWidth(element)).length === 1;
34804
35117
  }
34805
35118
  function unitRoute(element) {
34806
35119
  if (!pptx.hasShapeProperties(element)) return void 0;
@@ -34892,7 +35205,7 @@ ${keyframes}
34892
35205
  }
34893
35206
  ];
34894
35207
  }
34895
- var MORPH_PROGRESS_PROPERTY = `@property ${chunk2SO3BL67_cjs.MORPH_PROGRESS_VAR} {
35208
+ var MORPH_PROGRESS_PROPERTY = `@property ${chunkHTFYAGHG_cjs.MORPH_PROGRESS_VAR} {
34896
35209
  syntax: '<number>';
34897
35210
  inherits: true;
34898
35211
  initial-value: 1;
@@ -34902,9 +35215,9 @@ function rawParams(element) {
34902
35215
  return void 0;
34903
35216
  }
34904
35217
  const style = element.shapeStyle;
34905
- const shadows = chunk2SO3BL67_cjs.resolveOuterShadowLayers(style, element.rotation);
34906
- const glow = chunk2SO3BL67_cjs.resolveGlow(style);
34907
- const inner3 = chunk2SO3BL67_cjs.resolveInnerShadow(style);
35218
+ const shadows = chunkHTFYAGHG_cjs.resolveOuterShadowLayers(style, element.rotation);
35219
+ const glow = chunkHTFYAGHG_cjs.resolveGlow(style);
35220
+ const inner3 = chunkHTFYAGHG_cjs.resolveInnerShadow(style);
34908
35221
  if (shadows.length === 0 && !glow && !inner3) {
34909
35222
  return void 0;
34910
35223
  }
@@ -34937,7 +35250,7 @@ function scaleParams(params, kx, ky) {
34937
35250
  };
34938
35251
  }
34939
35252
  function registerSilhouetteDissolve(from, to, painter = "alone") {
34940
- const own = chunk2SO3BL67_cjs.getSilhouetteEffectParams(to);
35253
+ const own = chunkHTFYAGHG_cjs.getSilhouetteEffectParams(to);
34941
35254
  if (!own) {
34942
35255
  return false;
34943
35256
  }
@@ -34950,7 +35263,7 @@ function registerSilhouetteDissolve(from, to, painter = "alone") {
34950
35263
  if (JSON.stringify(out) === JSON.stringify(own)) {
34951
35264
  return false;
34952
35265
  }
34953
- chunk2SO3BL67_cjs.registerSilhouetteMorph(to.id, own, out, { width: to.width, height: to.height });
35266
+ chunkHTFYAGHG_cjs.registerSilhouetteMorph(to.id, own, out, { width: to.width, height: to.height });
34954
35267
  return true;
34955
35268
  }
34956
35269
 
@@ -35233,8 +35546,8 @@ function morphEffectsDiffer(from, to) {
35233
35546
  if (from.type !== "shape" || to.type !== "shape") {
35234
35547
  return false;
35235
35548
  }
35236
- const a = chunk2SO3BL67_cjs.getComputedEffectStyle(from);
35237
- const b = chunk2SO3BL67_cjs.getComputedEffectStyle(to);
35549
+ const a = chunkHTFYAGHG_cjs.getComputedEffectStyle(from);
35550
+ const b = chunkHTFYAGHG_cjs.getComputedEffectStyle(to);
35238
35551
  return (a.boxShadow ?? "") !== (b.boxShadow ?? "") || (a.filter ?? "") !== (b.filter ?? "");
35239
35552
  }
35240
35553
  function progressStops() {
@@ -35314,8 +35627,8 @@ function glowTrack(glowA, glowB, painter) {
35314
35627
  };
35315
35628
  }
35316
35629
  function buildMorphEffectCarry(from, to, half, painter = "alone") {
35317
- const a = chunk2SO3BL67_cjs.getComputedEffectStyle(from);
35318
- const b = chunk2SO3BL67_cjs.getComputedEffectStyle(to);
35630
+ const a = chunkHTFYAGHG_cjs.getComputedEffectStyle(from);
35631
+ const b = chunkHTFYAGHG_cjs.getComputedEffectStyle(to);
35319
35632
  const local = half === "to" ? to : from;
35320
35633
  const width = Math.max(local.width, 1);
35321
35634
  const height = Math.max(local.height, 1);
@@ -35327,7 +35640,7 @@ function buildMorphEffectCarry(from, to, half, painter = "alone") {
35327
35640
  const tracks = [];
35328
35641
  if (half === "to" && registerSilhouetteDissolve(from, to, painter)) {
35329
35642
  return {
35330
- keyframes: bakeStops(progressStops(), (p) => [`${chunk2SO3BL67_cjs.MORPH_PROGRESS_VAR}: ${round7(p)}`]),
35643
+ keyframes: bakeStops(progressStops(), (p) => [`${chunkHTFYAGHG_cjs.MORPH_PROGRESS_VAR}: ${round7(p)}`]),
35331
35644
  prelude: MORPH_PROGRESS_PROPERTY
35332
35645
  };
35333
35646
  }
@@ -35363,7 +35676,7 @@ function buildMorphEffectCarry(from, to, half, painter = "alone") {
35363
35676
  function morphArrowSignature(style) {
35364
35677
  const record = style ?? {};
35365
35678
  return ["Start", "End"].map((end) => {
35366
- const type = chunk2SO3BL67_cjs.normalizeArrow(record[`connector${end}Arrow`]);
35679
+ const type = chunkHTFYAGHG_cjs.normalizeArrow(record[`connector${end}Arrow`]);
35367
35680
  if (!type) return "";
35368
35681
  const width = record[`connector${end}ArrowWidth`] ?? "med";
35369
35682
  const length = record[`connector${end}ArrowLength`] ?? "med";
@@ -35377,7 +35690,7 @@ function morphLineEndsBreakPair(from, to) {
35377
35690
  const b = to.shapeStyle ?? {};
35378
35691
  if (dashed(a) !== dashed(b)) return true;
35379
35692
  return ["Start", "End"].some(
35380
- (end) => Boolean(chunk2SO3BL67_cjs.normalizeArrow(a[`connector${end}Arrow`])) !== Boolean(chunk2SO3BL67_cjs.normalizeArrow(b[`connector${end}Arrow`]))
35693
+ (end) => Boolean(chunkHTFYAGHG_cjs.normalizeArrow(a[`connector${end}Arrow`])) !== Boolean(chunkHTFYAGHG_cjs.normalizeArrow(b[`connector${end}Arrow`]))
35381
35694
  );
35382
35695
  }
35383
35696
 
@@ -35392,11 +35705,11 @@ function morphGeometryBreaksPair(from, to) {
35392
35705
  return a !== void 0 && b !== void 0 && a !== b || morphLineEndsBreakPair(from, to);
35393
35706
  }
35394
35707
  function tracedCompoundOffsets(element) {
35395
- const outline = chunk2SO3BL67_cjs.buildStrokeOutline(element);
35708
+ const outline = chunkHTFYAGHG_cjs.buildStrokeOutline(element);
35396
35709
  if (!outline || outline.markers || !pptx.hasShapeProperties(element)) {
35397
35710
  return void 0;
35398
35711
  }
35399
- const offsets2 = chunk2SO3BL67_cjs.getCompoundLineOffsets(element.shapeStyle?.compoundLine, outline.strokeWidth);
35712
+ const offsets2 = chunkHTFYAGHG_cjs.getCompoundLineOffsets(element.shapeStyle?.compoundLine, outline.strokeWidth);
35400
35713
  return offsets2.length > 1 && outline.strands.length === offsets2.length && outline.strands.every((strand) => strand.offset === 0) ? offsets2 : void 0;
35401
35714
  }
35402
35715
  function compoundLineOf(element) {
@@ -35412,7 +35725,7 @@ function bakeStrandStops(progress, offsets2, join, userPathAt) {
35412
35725
  for (const p of progress) {
35413
35726
  const { d, scale: scale3 } = userPathAt(p);
35414
35727
  for (const [i, offset] of offsets2.entries()) {
35415
- const strand = offset === 0 ? d : chunk2SO3BL67_cjs.compoundStrandPath(d, offset, join);
35728
+ const strand = offset === 0 ? d : chunkHTFYAGHG_cjs.compoundStrandPath(d, offset, join);
35416
35729
  if (!strand) {
35417
35730
  return void 0;
35418
35731
  }
@@ -35457,7 +35770,7 @@ function lineWidth2(element) {
35457
35770
  return pptx.hasShapeProperties(element) ? Math.max(0, element.shapeStyle?.strokeWidth ?? 0) : 0;
35458
35771
  }
35459
35772
  function carriesOutline(element) {
35460
- const outline = chunk2SO3BL67_cjs.buildStrokeOutline(element);
35773
+ const outline = chunkHTFYAGHG_cjs.buildStrokeOutline(element);
35461
35774
  return Boolean(
35462
35775
  outline && !outline.markers && outline.strands[0]?.d === void 0 && outline.strands.every((strand) => strand.offset === 0)
35463
35776
  );
@@ -35496,28 +35809,28 @@ function buildMorphShapeCarry(from, to, half) {
35496
35809
  lerp2(w0 / from.height, w1 / to.height, p) * H / wl
35497
35810
  ] : [1, 1];
35498
35811
  const decision = resolveShapeGeometry(local);
35499
- const straddle = chunk2SO3BL67_cjs.straddlingStrokeWidth(local);
35812
+ const straddle = chunkHTFYAGHG_cjs.straddlingStrokeWidth(local);
35500
35813
  const spread = (u0, u1) => Math.max(u0 / u1, u1 / u0);
35501
35814
  const progress = !stroked ? stopProgress(1, 1) : spread(w0 / from.width, w1 / to.width) >= spread(w0 / from.height, w1 / to.height) ? stopProgress(w0 / from.width, w1 / to.width) : stopProgress(w0 / from.height, w1 / to.height);
35502
35815
  if (reshaped && decision.kind === "borderRadius") {
35503
35816
  startDeclarations.push("border-radius: 0");
35504
35817
  endDeclarations.push("border-radius: 0");
35505
35818
  }
35506
- const silhouette = chunk2SO3BL67_cjs.usesSilhouetteEffects(local);
35819
+ const silhouette = chunkHTFYAGHG_cjs.usesSilhouetteEffects(local);
35507
35820
  const clipKeyframes = !silhouette && (decision.kind === "clipPath" || reshaped) ? bakeStops(progress, (p) => {
35508
35821
  const [ax, ay] = scaleAt2(p);
35509
35822
  const user = geometryAt(a, b, from, to, p, W / ax, H / ay);
35510
- const widened = straddle > 0 ? chunk2SO3BL67_cjs.outsetClipPathForStroke(
35823
+ const widened = straddle > 0 ? chunkHTFYAGHG_cjs.outsetClipPathForStroke(
35511
35824
  `path('${user}')`,
35512
35825
  straddle,
35513
35826
  W / ax,
35514
35827
  H / ay,
35515
- chunk2SO3BL67_cjs.outlineStrokeJoin(local)
35828
+ chunkHTFYAGHG_cjs.outlineStrokeJoin(local)
35516
35829
  ) : `path('${user}')`;
35517
35830
  const inner3 = /^path\('(.*)'\)$/su.exec(widened)?.[1] ?? user;
35518
35831
  return [`clip-path: path('${scalePath(inner3, ax, ay)}')`];
35519
35832
  }) : void 0;
35520
- const outlineStrandKeyframes = stroked && strandOffsets ? bakeStrandStops(progress, strandOffsets, chunk2SO3BL67_cjs.outlineStrokeJoin(local), (p) => {
35833
+ const outlineStrandKeyframes = stroked && strandOffsets ? bakeStrandStops(progress, strandOffsets, chunkHTFYAGHG_cjs.outlineStrokeJoin(local), (p) => {
35521
35834
  const [ax, ay] = scaleAt2(p);
35522
35835
  return {
35523
35836
  d: geometryAt(a, b, from, to, p, W / ax, H / ay),
@@ -35534,7 +35847,7 @@ function buildMorphShapeCarry(from, to, half) {
35534
35847
  }) : void 0;
35535
35848
  const vector = local.type === "shape" ? local : void 0;
35536
35849
  const pathUnits = vector?.pathData && vector.pathWidth && vector.pathHeight ? [vector.pathWidth / W, vector.pathHeight / H] : void 0;
35537
- const silhouetteFill = silhouette && chunk2SO3BL67_cjs.silhouetteFillsOverlay(local) && chunk2SO3BL67_cjs.buildSubpathFillOverlay(local)?.paints.length === 1;
35850
+ const silhouetteFill = silhouette && chunkHTFYAGHG_cjs.silhouetteFillsOverlay(local) && chunkHTFYAGHG_cjs.buildSubpathFillOverlay(local)?.paints.length === 1;
35538
35851
  const units = pathUnits ?? (silhouetteFill ? [1, 1] : void 0);
35539
35852
  const customKeyframes = units ? bakeStops(progress, (p) => [
35540
35853
  `d: path('${scalePath(geometryAt(a, b, from, to, p, W, H), units[0] ?? 1, units[1] ?? 1)}')`
@@ -37001,7 +37314,7 @@ function resolveElementOutline(element) {
37001
37314
  const height = Math.max(element.height, 1);
37002
37315
  const shapeType = element.shapeType;
37003
37316
  const adjustments = element.shapeAdjustments;
37004
- const clip = chunk2SO3BL67_cjs.getResolvedShapeClipPathFor(shapeType, width, height, adjustments);
37317
+ const clip = chunkHTFYAGHG_cjs.getResolvedShapeClipPathFor(shapeType, width, height, adjustments);
37005
37318
  if (clip) {
37006
37319
  const poly3 = clipPathToPolygon(clip, width, height);
37007
37320
  if (poly3.length >= 3) {
@@ -37141,8 +37454,8 @@ function buildClipKeyframeBody(from, to, steps) {
37141
37454
  if (fromRing.length === 0 || toRing.length === 0) {
37142
37455
  return null;
37143
37456
  }
37144
- const stroke = chunk2SO3BL67_cjs.straddlingStrokeWidth(to);
37145
- const join = chunk2SO3BL67_cjs.outlineStrokeJoin(to);
37457
+ const stroke = chunkHTFYAGHG_cjs.straddlingStrokeWidth(to);
37458
+ const join = chunkHTFYAGHG_cjs.outlineStrokeJoin(to);
37146
37459
  const lines = [];
37147
37460
  for (let s = 0; s <= steps; s++) {
37148
37461
  const t2 = s / steps;
@@ -37151,7 +37464,7 @@ function buildClipKeyframeBody(from, to, steps) {
37151
37464
  return null;
37152
37465
  }
37153
37466
  const clip = `path('${d}')`;
37154
- const widened = stroke > 0 ? chunk2SO3BL67_cjs.outsetClipPathForStroke(clip, stroke, to.width, to.height, join) : clip;
37467
+ const widened = stroke > 0 ? chunkHTFYAGHG_cjs.outsetClipPathForStroke(clip, stroke, to.width, to.height, join) : clip;
37155
37468
  const pct4 = Number((s / steps * 100).toFixed(2));
37156
37469
  lines.push(` ${pct4}% {
37157
37470
  clip-path: ${widened};
@@ -40547,23 +40860,26 @@ function connectorSnapTransform(element, straight, strandCount, strokeWidth) {
40547
40860
  return void 0;
40548
40861
  }
40549
40862
  const axis = element.height <= 0 ? "h" : element.width <= 0 ? "v" : void 0;
40550
- const place = axis ? chunk2SO3BL67_cjs.snapPlacement(element) : void 0;
40551
- return axis && place ? chunkHWJKBKCW_cjs.snappedStrokeTransform(axis, place.x, place.y, strokeWidth, void 0, place.exact) : void 0;
40863
+ const place = axis ? chunkHTFYAGHG_cjs.snapPlacement(element) : void 0;
40864
+ const dashed2 = chunkHTFYAGHG_cjs.isDashedStroke(
40865
+ element.shapeStyle?.strokeDash
40866
+ );
40867
+ return axis && place ? chunkFI2ATACZ_cjs.snappedStrokeTransform(axis, place.x, place.y, strokeWidth, void 0, place.exact, dashed2) : void 0;
40552
40868
  }
40553
40869
  function buildConnectorGeometry(element, zIndex, routing) {
40554
40870
  const ss = pptx.hasShapeProperties(element) ? element.shapeStyle : void 0;
40555
40871
  const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
40556
- const strokeColor = ss?.strokeColor ?? chunk2SO3BL67_cjs.DEFAULT_STROKE_COLOR;
40872
+ const strokeColor = ss?.strokeColor ?? chunkHTFYAGHG_cjs.DEFAULT_STROKE_COLOR;
40557
40873
  const strokeOpacity = ss?.strokeOpacity ?? 1;
40558
- const dashArray = chunk2SO3BL67_cjs.buildDashArray(
40874
+ const dashArray = chunkHTFYAGHG_cjs.buildDashArray(
40559
40875
  ss?.strokeDash,
40560
40876
  strokeWidth,
40561
40877
  ss?.customDashSegments,
40562
40878
  ss?.lineCap
40563
40879
  );
40564
- const strokeLinecap = chunk2SO3BL67_cjs.svgLineCap(ss?.lineCap, dashArray !== void 0);
40565
- const compoundOffsets = chunk2SO3BL67_cjs.getCompoundLineOffsets(ss?.compoundLine, strokeWidth);
40566
- const compoundWidths = chunk2SO3BL67_cjs.getCompoundLineWidths(ss?.compoundLine, strokeWidth);
40880
+ const strokeLinecap = chunkHTFYAGHG_cjs.svgLineCap(ss?.lineCap, dashArray !== void 0);
40881
+ const compoundOffsets = chunkHTFYAGHG_cjs.getCompoundLineOffsets(ss?.compoundLine, strokeWidth);
40882
+ const compoundWidths = chunkHTFYAGHG_cjs.getCompoundLineWidths(ss?.compoundLine, strokeWidth);
40567
40883
  const svgW = Math.max(element.width, 1);
40568
40884
  const svgH = Math.max(element.height, 1);
40569
40885
  const shapeType = element.shapeType;
@@ -40572,8 +40888,8 @@ function buildConnectorGeometry(element, zIndex, routing) {
40572
40888
  const y1 = coreGeometry?.startY ?? 0;
40573
40889
  const x2 = coreGeometry?.endX ?? svgW;
40574
40890
  const y2 = coreGeometry?.endY ?? svgH;
40575
- let pathD = chunk2SO3BL67_cjs.connectorKind(shapeType) === "straight" ? void 0 : coreGeometry?.pathData;
40576
- if (routing && routing.obstacles.length > 0 && chunk2SO3BL67_cjs.connectorKind(shapeType) === "bent" && (element.width > 0 || element.height > 0)) {
40891
+ let pathD = chunkHTFYAGHG_cjs.connectorKind(shapeType) === "straight" ? void 0 : coreGeometry?.pathData;
40892
+ if (routing && routing.obstacles.length > 0 && chunkHTFYAGHG_cjs.connectorKind(shapeType) === "bent" && (element.width > 0 || element.height > 0)) {
40577
40893
  const start = { x: element.x + x1, y: element.y + y1 };
40578
40894
  const end = { x: element.x + x2, y: element.y + y2 };
40579
40895
  const waypoints = geometry.routeOrthogonalConnector(start, end, routing.obstacles, {
@@ -40588,13 +40904,24 @@ function buildConnectorGeometry(element, zIndex, routing) {
40588
40904
  const markerSeed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
40589
40905
  const startMarkerId = `${markerSeed}-start`;
40590
40906
  const endMarkerId = `${markerSeed}-end`;
40591
- const startArrow = chunk2SO3BL67_cjs.normalizeArrow(ss?.connectorStartArrow);
40592
- const endArrow = chunk2SO3BL67_cjs.normalizeArrow(ss?.connectorEndArrow);
40593
- const startMarker = startArrow ? chunk2SO3BL67_cjs.markerPath(startArrow, ss?.connectorStartArrowWidth, ss?.connectorStartArrowLength) : null;
40594
- const endMarker = endArrow ? chunk2SO3BL67_cjs.markerPath(endArrow, ss?.connectorEndArrowWidth, ss?.connectorEndArrowLength) : null;
40907
+ const startArrow = chunkHTFYAGHG_cjs.normalizeArrow(ss?.connectorStartArrow);
40908
+ const endArrow = chunkHTFYAGHG_cjs.normalizeArrow(ss?.connectorEndArrow);
40909
+ const startMarker = startArrow ? chunkHTFYAGHG_cjs.markerPath(startArrow, ss?.connectorStartArrowWidth, ss?.connectorStartArrowLength) : null;
40910
+ const endMarker = endArrow ? chunkHTFYAGHG_cjs.markerPath(endArrow, ss?.connectorEndArrowWidth, ss?.connectorEndArrowLength) : null;
40595
40911
  const startMarkerRef = startMarker ? `url(#${startMarkerId})` : null;
40596
40912
  const endMarkerRef = endMarker ? `url(#${endMarkerId})` : null;
40597
40913
  const wrapperStyle = buildWrapperStyle(element, zIndex);
40914
+ const straight = pathD === void 0;
40915
+ const hitPath = pathD ?? `M${x1},${y1} L${x2},${y2}`;
40916
+ const capped = chunkHTFYAGHG_cjs.connectorSquareCapPath(
40917
+ hitPath,
40918
+ ss,
40919
+ strokeWidth,
40920
+ compoundOffsets.length > 1 || !!startMarker || !!endMarker
40921
+ );
40922
+ if (capped !== void 0) {
40923
+ pathD = capped;
40924
+ }
40598
40925
  return {
40599
40926
  strokeWidth,
40600
40927
  strokeColor,
@@ -40619,19 +40946,14 @@ function buildConnectorGeometry(element, zIndex, routing) {
40619
40946
  // A straight connector has no `pathD`, so the hit target falls back to its
40620
40947
  // endpoints; both forms are a `path`, which keeps the binding templates to
40621
40948
  // a single node instead of a line/path branch of their own.
40622
- hitPathD: pathD ?? `M${x1},${y1} L${x2},${y2}`,
40949
+ hitPathD: hitPath,
40623
40950
  hitStrokeWidth: connectorHitStrokeWidth(strokeWidth),
40624
40951
  wrapperStyle,
40625
- snapTransform: connectorSnapTransform(
40626
- element,
40627
- pathD === void 0,
40628
- compoundOffsets.length,
40629
- strokeWidth
40630
- )
40952
+ snapTransform: connectorSnapTransform(element, straight, compoundOffsets.length, strokeWidth)
40631
40953
  };
40632
40954
  }
40633
40955
  function buildConnectorPathD(shapeType, x1, y1, x2, y2, bend, bend2 = 0.5, bend3 = 0.5) {
40634
- const kind = chunk2SO3BL67_cjs.connectorKind(shapeType);
40956
+ const kind = chunkHTFYAGHG_cjs.connectorKind(shapeType);
40635
40957
  if (kind === "straight") {
40636
40958
  return void 0;
40637
40959
  }
@@ -46902,7 +47224,7 @@ function drawingShapeMeshOpacity(shape) {
46902
47224
  // src/pptx/render/svg-text-lines.ts
46903
47225
  var LINE_HEIGHT_RATIO = 1.2;
46904
47226
  function centeredSvgTextLines(text4, fontSize, options = {}) {
46905
- const lines = options.maxWidth !== void 0 ? chunk2SO3BL67_cjs.wrapTextByEstimatedWidth(text4, options.maxWidth, fontSize) : text4.split("\n").filter((line5) => line5.length > 0);
47227
+ const lines = options.maxWidth !== void 0 ? chunkHTFYAGHG_cjs.wrapTextByEstimatedWidth(text4, options.maxWidth, fontSize) : text4.split("\n").filter((line5) => line5.length > 0);
46906
47228
  const centerY = options.centerY ?? 0;
46907
47229
  if (lines.length === 0) {
46908
47230
  return [{ text: "", y: centerY }];
@@ -47556,7 +47878,7 @@ function smartArtPictureImage(shape) {
47556
47878
  }
47557
47879
  );
47558
47880
  svg2.setAttribute("xmlns", "http://www.w3.org/2000/svg");
47559
- const geometry = chunk2SO3BL67_cjs.getPresetShapeVectorGeometry(
47881
+ const geometry = chunkHTFYAGHG_cjs.getPresetShapeVectorGeometry(
47560
47882
  shape.shapeType,
47561
47883
  shape.width,
47562
47884
  shape.height,
@@ -47670,7 +47992,7 @@ function projectDrawingShapes(elementId, shapes, viewBox, palette, style) {
47670
47992
  const cy = relY + shape.height / 2;
47671
47993
  const stroke = shape.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none");
47672
47994
  const transform = drawingShapeTransform(shape, cx, cy);
47673
- const presetGeometry = kind === "path" ? chunk2SO3BL67_cjs.getPresetShapeVectorGeometry(
47995
+ const presetGeometry = kind === "path" ? chunkHTFYAGHG_cjs.getPresetShapeVectorGeometry(
47674
47996
  shape.shapeType,
47675
47997
  shape.width,
47676
47998
  shape.height,
@@ -48364,7 +48686,7 @@ function buildObliqueLabels(layout, input) {
48364
48686
  const { w, h, d } = layout.box;
48365
48687
  const span = layout.range.max - layout.range.min;
48366
48688
  const fontSize = input.fontSize;
48367
- for (const v of chunk2SO3BL67_cjs.axisTickValues({ ...layout.range, span })) {
48689
+ for (const v of chunkHTFYAGHG_cjs.axisTickValues({ ...layout.range, span })) {
48368
48690
  const p = (v - layout.range.min) * layout.valueScale;
48369
48691
  if (layout.horizontal) {
48370
48692
  const at = screen2(layout, p, 0, 0);
@@ -48510,22 +48832,22 @@ function computeObliqueBarLayout(element, vm) {
48510
48832
  const rotX = (chartData.view3D?.rotX ?? 15) * Math.PI / 180;
48511
48833
  const rotY = (chartData.view3D?.rotY ?? 20) * Math.PI / 180;
48512
48834
  const shear = { x: Math.sin(rotY), y: -Math.sin(rotX) };
48513
- const gapWidth = (chartData.barGapWidth ?? chunk2SO3BL67_cjs.DEFAULT_BAR_GAP_WIDTH) / 100;
48835
+ const gapWidth = (chartData.barGapWidth ?? chunkHTFYAGHG_cjs.DEFAULT_BAR_GAP_WIDTH) / 100;
48514
48836
  const gapDepth = (chartData.gapDepth ?? DEFAULT_GAP_DEPTH) / 100;
48515
48837
  const slots = grouping === "clustered" ? nSer : 1;
48516
48838
  const rows = grouping === "standard" ? nSer : 1;
48517
48839
  const labelFont = vm.axisLabels[0]?.fontSize ?? 16;
48518
48840
  const catLabels = chartData.categories.length > 0 ? chartData.categories : Array.from({ length: nCat }, (_, i) => String(i + 1));
48519
- const widest = (texts) => texts.reduce((m, t2) => Math.max(m, chunk2SO3BL67_cjs.estimateTextWidth(t2, labelFont)), 0);
48841
+ const widest = (texts) => texts.reduce((m, t2) => Math.max(m, chunkHTFYAGHG_cjs.estimateTextWidth(t2, labelFont)), 0);
48520
48842
  const top = vm.title ? TOP_WITH_TITLE : TOP_NO_TITLE;
48521
48843
  const hasBottomLegend = chartData.style?.hasLegend !== false && (chartData.style?.legendPosition ?? "b") === "b";
48522
48844
  const bottom = vm.svgHeight - (hasBottomLegend ? BOTTOM_WITH_LEGEND : BOTTOM_NO_LEGEND);
48523
48845
  const regionH = Math.max(1, bottom - top);
48524
48846
  const provisional = valueRange(chartData, grouping, nCat, regionH);
48525
- const valueTexts = chunk2SO3BL67_cjs.axisTickValues({
48847
+ const valueTexts = chunkHTFYAGHG_cjs.axisTickValues({
48526
48848
  ...provisional,
48527
48849
  span: provisional.max - provisional.min
48528
- }).map((v) => chunk2GDYTHUY_cjs.formatValueLabel(chartData, grouping, v));
48850
+ }).map((v) => chunkLOUVYGWX_cjs.formatValueLabel(chartData, grouping, v));
48529
48851
  const leftBand = (horizontal ? widest(catLabels) : widest(valueTexts)) + (horizontal ? OBLIQUE_CATEGORY_LABEL_GAP : OBLIQUE_VALUE_LABEL_GAP);
48530
48852
  const seriesLabelW = grouping === "standard" && !horizontal ? widest(chartData.series.map((s) => s.name)) : 0;
48531
48853
  const seriesOverhang = (depth2) => seriesLabelW > 0 ? Math.max(0, OBLIQUE_CATEGORY_LABEL_GAP + seriesLabelW - depth2 * shear.x / (2 * rows)) : 0;
@@ -48581,13 +48903,13 @@ function computeObliqueBarLayout(element, vm) {
48581
48903
  gridlines: [],
48582
48904
  labels: []
48583
48905
  };
48584
- layout.bars = chunk2GDYTHUY_cjs.buildBars(chartData, vm, layout, { nCat, slots, rows, gapWidth, gapDepth });
48585
- layout.gridlines = chunk2GDYTHUY_cjs.buildGridlines(layout);
48906
+ layout.bars = chunkLOUVYGWX_cjs.buildBars(chartData, vm, layout, { nCat, slots, rows, gapWidth, gapDepth });
48907
+ layout.gridlines = chunkLOUVYGWX_cjs.buildGridlines(layout);
48586
48908
  layout.labels = buildObliqueLabels(layout, {
48587
48909
  fontSize: labelFont,
48588
48910
  categories: catLabels,
48589
48911
  seriesNames: chartData.series.map((s) => s.name),
48590
- valueText: (v) => chunk2GDYTHUY_cjs.formatValueLabel(chartData, grouping, v)
48912
+ valueText: (v) => chunkLOUVYGWX_cjs.formatValueLabel(chartData, grouping, v)
48591
48913
  });
48592
48914
  return layout;
48593
48915
  }
@@ -48600,7 +48922,7 @@ function buildPerspGridlines(box, range, horizontal) {
48600
48922
  { from: [w, 0, 0], to: [w, 0, d] }
48601
48923
  ];
48602
48924
  const span = range.max - range.min;
48603
- for (const v of chunk2SO3BL67_cjs.axisTickValues({ ...range, span })) {
48925
+ for (const v of chunkHTFYAGHG_cjs.axisTickValues({ ...range, span })) {
48604
48926
  const t2 = (v - range.min) / span;
48605
48927
  if (horizontal) {
48606
48928
  const x = t2 * w;
@@ -48626,11 +48948,11 @@ function buildPerspLabels(layout, input) {
48626
48948
  const span = range.max - range.min;
48627
48949
  const labels = [];
48628
48950
  const fontSize = input.fontSize;
48629
- for (const v of chunk2SO3BL67_cjs.axisTickValues({ ...range, span })) {
48951
+ for (const v of chunkHTFYAGHG_cjs.axisTickValues({ ...range, span })) {
48630
48952
  const t2 = (v - range.min) / span;
48631
- const text4 = input.percent ? `${Math.round(v * 100)}%` : chunk2SO3BL67_cjs.formatAxisValueWithUnits(v, input.valueAxis);
48953
+ const text4 = input.percent ? `${Math.round(v * 100)}%` : chunkHTFYAGHG_cjs.formatAxisValueWithUnits(v, input.valueAxis);
48632
48954
  if (layout.horizontal) {
48633
- const at = chunk2GDYTHUY_cjs.perspToScreen(view2, [t2 * w, 0, 0]);
48955
+ const at = chunkLOUVYGWX_cjs.perspToScreen(view2, [t2 * w, 0, 0]);
48634
48956
  labels.push({
48635
48957
  role: "value",
48636
48958
  text: text4,
@@ -48640,7 +48962,7 @@ function buildPerspLabels(layout, input) {
48640
48962
  fontSize
48641
48963
  });
48642
48964
  } else {
48643
- const at = chunk2GDYTHUY_cjs.perspToScreen(view2, [0, t2 * h, 0]);
48965
+ const at = chunkLOUVYGWX_cjs.perspToScreen(view2, [0, t2 * h, 0]);
48644
48966
  labels.push({ role: "value", text: text4, x: at.x - VALUE_GAP2, y: at.y, anchor: "end", fontSize });
48645
48967
  }
48646
48968
  }
@@ -48650,7 +48972,7 @@ function buildPerspLabels(layout, input) {
48650
48972
  return;
48651
48973
  }
48652
48974
  if (layout.horizontal) {
48653
- const at2 = chunk2GDYTHUY_cjs.perspToScreen(view2, [0, pos, 0]);
48975
+ const at2 = chunkLOUVYGWX_cjs.perspToScreen(view2, [0, pos, 0]);
48654
48976
  labels.push({
48655
48977
  role: "category",
48656
48978
  text: text4,
@@ -48661,7 +48983,7 @@ function buildPerspLabels(layout, input) {
48661
48983
  });
48662
48984
  return;
48663
48985
  }
48664
- const at = chunk2GDYTHUY_cjs.perspToScreen(view2, [pos, 0, 0]);
48986
+ const at = chunkLOUVYGWX_cjs.perspToScreen(view2, [pos, 0, 0]);
48665
48987
  labels.push({
48666
48988
  role: "category",
48667
48989
  text: text4,
@@ -48674,7 +48996,7 @@ function buildPerspLabels(layout, input) {
48674
48996
  const rows = input.seriesNames.length;
48675
48997
  input.seriesNames.forEach((text4, s) => {
48676
48998
  const z = layout.kind === "surface" ? rows > 1 ? s / (rows - 1) * d : d / 2 : (s + 0.5) / rows * d;
48677
- const at = chunk2GDYTHUY_cjs.perspToScreen(view2, [w, 0, z]);
48999
+ const at = chunkLOUVYGWX_cjs.perspToScreen(view2, [w, 0, z]);
48678
49000
  labels.push({
48679
49001
  role: "series",
48680
49002
  text: text4,
@@ -48767,7 +49089,7 @@ function computePerspChartLayout(element, vm, options = {}) {
48767
49089
  const valAx = chartData.axes?.find((a) => a.axisType === "valAx");
48768
49090
  const midCat = (valAx?.crossBetween ?? (kind === "area" || kind === "surface" ? "midCat" : "between")) === "midCat";
48769
49091
  const view3D = chartData.view3D;
48770
- const gapWidth = (chartData.barGapWidth ?? chunk2SO3BL67_cjs.DEFAULT_BAR_GAP_WIDTH) / 100;
49092
+ const gapWidth = (chartData.barGapWidth ?? chunkHTFYAGHG_cjs.DEFAULT_BAR_GAP_WIDTH) / 100;
48771
49093
  const gapDepth = (chartData.gapDepth ?? DEFAULT_GAP_DEPTH2) / 100;
48772
49094
  const slot = 1 / nCat;
48773
49095
  const rows = kind === "surface" ? nSer : grouping === "standard" ? nSer : 1;
@@ -48780,9 +49102,9 @@ function computePerspChartLayout(element, vm, options = {}) {
48780
49102
  const valueExtent = horizontal ? 1 : baseHeight * heightScale;
48781
49103
  const catExtent = horizontal ? HORIZONTAL_CATEGORY_EXTENT * heightScale : 1;
48782
49104
  const box = horizontal ? { w: valueExtent, h: catExtent, d } : { w: 1, h: valueExtent, d };
48783
- const camera = options.oblique ? chunk2GDYTHUY_cjs.perspObliqueCameraFor(box, view3D?.rotX ?? 15, view3D?.rotY ?? 20) : chunk2GDYTHUY_cjs.perspCameraFor(box, view3D?.rotX ?? 15, view3D?.rotY ?? 20, view3D?.perspective ?? void 0);
49105
+ const camera = options.oblique ? chunkLOUVYGWX_cjs.perspObliqueCameraFor(box, view3D?.rotX ?? 15, view3D?.rotY ?? 20) : chunkLOUVYGWX_cjs.perspCameraFor(box, view3D?.rotX ?? 15, view3D?.rotY ?? 20, view3D?.perspective ?? void 0);
48784
49106
  const hasLegend = chartData.style?.hasLegend !== false && (chartData.style?.legendPosition ?? "b") === "b";
48785
- const view2 = chunk2GDYTHUY_cjs.fitPerspView(camera, {
49107
+ const view2 = chunkLOUVYGWX_cjs.fitPerspView(camera, {
48786
49108
  left: RECT_LEFT,
48787
49109
  right: vm.svgWidth - (rows > 1 ? RECT_RIGHT_WITH_SERIES : RECT_RIGHT_NO_SERIES),
48788
49110
  top: vm.title ? RECT_TOP_WITH_TITLE : RECT_TOP_NO_TITLE,
@@ -48841,7 +49163,7 @@ function buildBarGeometry(element, vm) {
48841
49163
  }
48842
49164
  var PERSP_BOX_TYPES = /* @__PURE__ */ new Set(["line3D", "area3D", "surface", "bar3D"]);
48843
49165
  function buildPieGeometry(element, vm) {
48844
- const layout = chunk2GDYTHUY_cjs.computePieChartLayout(element, chunk2GDYTHUY_cjs.widenPieViewModel(vm, element));
49166
+ const layout = chunkLOUVYGWX_cjs.computePieChartLayout(element, chunkLOUVYGWX_cjs.widenPieViewModel(vm, element));
48845
49167
  return layout ? { kind: "pie", layout } : null;
48846
49168
  }
48847
49169
  function buildPerspGeometry(element, vm, oblique) {
@@ -48861,7 +49183,7 @@ function buildChart3DSpecForElement(element) {
48861
49183
  if (!chartData || !is3DChartType(chartType)) {
48862
49184
  return null;
48863
49185
  }
48864
- const vm = chunk2SO3BL67_cjs.buildChartViewModel(element);
49186
+ const vm = chunkHTFYAGHG_cjs.buildChartViewModel(element);
48865
49187
  const projection = chart.resolveChart3DProjection(chartType, chartData.view3D);
48866
49188
  const geometry = chartType === "bar3D" && projection.mode === "oblique" ? buildBarGeometry(element, vm) : PERSP_BOX_TYPES.has(chartType) && (projection.mode === "perspective" || chartType !== "bar3D") ? buildPerspGeometry(element, vm, projection.mode === "oblique") : chartType === "pie3D" ? buildPieGeometry(element, vm) : null;
48867
49189
  if (!geometry) {
@@ -50554,7 +50876,7 @@ function colorField2(section2, key) {
50554
50876
  kind: "color",
50555
50877
  labelKey: "pptx.textEffects.color",
50556
50878
  testId: fxId(section2, "color"),
50557
- read: (ts) => chunk2SO3BL67_cjs.normalizeHexColor(ts?.[key], ON_DEFAULTS[key]),
50879
+ read: (ts) => chunkHTFYAGHG_cjs.normalizeHexColor(ts?.[key], ON_DEFAULTS[key]),
50558
50880
  write: (_ts, v) => ({ [key]: String(v) })
50559
50881
  };
50560
50882
  }
@@ -50858,6 +51180,238 @@ function syncGoogleWebfontStylesheet(doc, id, href) {
50858
51180
  }
50859
51181
  return link;
50860
51182
  }
51183
+ var DECK_WEBFONT_TIMEOUT_MS = 8e3;
51184
+ var DECK_WEBFONT_PROGRESS_DELAY_MS = 400;
51185
+ var MAX_SAMPLE_CHARS = 256;
51186
+ function collectRuns(element, runs) {
51187
+ if (pptx.hasTextProperties(element)) {
51188
+ const base2 = element.textStyle;
51189
+ const segments = element.textSegments ?? [];
51190
+ if (segments.length === 0 && base2?.fontFamily) {
51191
+ runs.push({
51192
+ family: base2.fontFamily,
51193
+ bold: base2.bold,
51194
+ italic: base2.italic,
51195
+ text: element.text ?? ""
51196
+ });
51197
+ }
51198
+ for (const segment of segments) {
51199
+ runs.push({
51200
+ family: segment.style?.fontFamily ?? base2?.fontFamily,
51201
+ bold: segment.style?.bold ?? base2?.bold,
51202
+ italic: segment.style?.italic ?? base2?.italic,
51203
+ text: segment.text ?? ""
51204
+ });
51205
+ }
51206
+ }
51207
+ if (element.type === "group") {
51208
+ for (const child of element.children ?? []) {
51209
+ collectRuns(child, runs);
51210
+ }
51211
+ }
51212
+ if (element.type === "table") {
51213
+ for (const row2 of element.tableData?.rows ?? []) {
51214
+ for (const cell of row2.cells ?? []) {
51215
+ for (const run2 of cell.textRuns ?? []) {
51216
+ runs.push({
51217
+ family: run2.fontFamily ?? cell.style?.fontFamily,
51218
+ bold: run2.bold ?? cell.style?.bold,
51219
+ italic: run2.italic ?? cell.style?.italic,
51220
+ text: run2.text ?? ""
51221
+ });
51222
+ }
51223
+ }
51224
+ }
51225
+ }
51226
+ }
51227
+ function servedFamily(family2) {
51228
+ return resolveGoogleFontsFace(family2)?.family ?? findMetricCompatibleGoogleFontsFamily(family2);
51229
+ }
51230
+ function quoteFamily(family2) {
51231
+ return `"${family2.replace(/[\\"]/gu, "\\$&")}"`;
51232
+ }
51233
+ function collectDeckWebfontFaces(slides, candidates) {
51234
+ const wanted = new Set(candidates);
51235
+ const unavailable = candidates.filter((family2) => servedFamily(family2) === null);
51236
+ const runs = [];
51237
+ for (const slide of slides) {
51238
+ for (const element of slide.elements ?? []) {
51239
+ collectRuns(element, runs);
51240
+ }
51241
+ }
51242
+ const faces = /* @__PURE__ */ new Map();
51243
+ const byFont = /* @__PURE__ */ new Map();
51244
+ for (const run2 of runs) {
51245
+ if (!run2.family || !wanted.has(run2.family)) {
51246
+ continue;
51247
+ }
51248
+ const served = servedFamily(run2.family);
51249
+ if (served === null) {
51250
+ continue;
51251
+ }
51252
+ const weight = resolveFontWeight(run2.family, run2.bold);
51253
+ const style = resolveFontItalic(run2.family, run2.italic) ? "italic " : "";
51254
+ const font = `${style}${weight} 16px ${quoteFamily(served)}`;
51255
+ let face = byFont.get(font);
51256
+ if (!face) {
51257
+ face = { family: served, font, chars: /* @__PURE__ */ new Set() };
51258
+ byFont.set(font, face);
51259
+ const list2 = faces.get(served);
51260
+ if (list2) {
51261
+ list2.push(face);
51262
+ } else {
51263
+ faces.set(served, [face]);
51264
+ }
51265
+ }
51266
+ for (const char of run2.text) {
51267
+ if (face.chars.size >= MAX_SAMPLE_CHARS) {
51268
+ break;
51269
+ }
51270
+ if (char.trim() !== "") {
51271
+ face.chars.add(char);
51272
+ }
51273
+ }
51274
+ }
51275
+ return { faces, unavailable };
51276
+ }
51277
+ function stylesheetSettled(link) {
51278
+ if (link.sheet) {
51279
+ return Promise.resolve();
51280
+ }
51281
+ return new Promise((resolve) => {
51282
+ link.addEventListener("load", () => resolve(), { once: true });
51283
+ link.addEventListener("error", () => resolve(), { once: true });
51284
+ });
51285
+ }
51286
+ async function loadFace(fonts, face) {
51287
+ try {
51288
+ await fonts.load(face.font, face.chars.size > 0 ? [...face.chars].join("") : "x");
51289
+ } catch {
51290
+ }
51291
+ }
51292
+ async function prepareDeckWebfonts(options) {
51293
+ const {
51294
+ document: doc,
51295
+ linkId,
51296
+ slides,
51297
+ embeddedFonts,
51298
+ googleFontsBase,
51299
+ onProgress,
51300
+ timeoutMs = DECK_WEBFONT_TIMEOUT_MS,
51301
+ progressDelayMs = DECK_WEBFONT_PROGRESS_DELAY_MS,
51302
+ isLocallyInstalled = isFontFamilyInstalledLocally
51303
+ } = options;
51304
+ if (googleFontsBase === null) {
51305
+ return { href: null, families: [], unavailable: [], timedOut: false };
51306
+ }
51307
+ const href = await resolveGoogleWebfontHref(
51308
+ slides,
51309
+ embeddedFonts,
51310
+ isLocallyInstalled,
51311
+ googleFontsBase
51312
+ );
51313
+ const candidates = selectGoogleWebfontCandidates(slides, embeddedFonts, isLocallyInstalled);
51314
+ const { faces, unavailable } = collectDeckWebfontFaces(slides, candidates);
51315
+ const families = [...faces.keys()];
51316
+ const link = syncGoogleWebfontStylesheet(doc, linkId, href);
51317
+ const fontSet = doc.fonts;
51318
+ if (!link || families.length === 0 || !fontSet || typeof fontSet.load !== "function") {
51319
+ return { href, families, unavailable, timedOut: false };
51320
+ }
51321
+ let loaded2 = 0;
51322
+ let reporting = false;
51323
+ const report = () => {
51324
+ if (reporting) {
51325
+ onProgress?.({ loaded: loaded2, total: families.length, families });
51326
+ }
51327
+ };
51328
+ const download = (async () => {
51329
+ await stylesheetSettled(link);
51330
+ await Promise.all(
51331
+ [...faces.values()].map(async (familyFaces) => {
51332
+ await Promise.all(familyFaces.map((face) => loadFace(fontSet, face)));
51333
+ loaded2 += 1;
51334
+ report();
51335
+ })
51336
+ );
51337
+ })();
51338
+ let finished = false;
51339
+ const timers = [];
51340
+ const timedOut = await Promise.race([
51341
+ download.then(() => false),
51342
+ new Promise((resolve) => {
51343
+ timers.push(setTimeout(() => resolve(true), timeoutMs));
51344
+ timers.push(
51345
+ setTimeout(() => {
51346
+ if (!finished) {
51347
+ reporting = true;
51348
+ report();
51349
+ }
51350
+ }, progressDelayMs)
51351
+ );
51352
+ })
51353
+ ]);
51354
+ finished = true;
51355
+ reporting = false;
51356
+ for (const timer of timers) {
51357
+ clearTimeout(timer);
51358
+ }
51359
+ return { href, families, unavailable, timedOut };
51360
+ }
51361
+ function collectEnvelopeFonts(element, fonts) {
51362
+ if (pptx.hasTextProperties(element) && hasGlyphEnvelope(element.textStyle?.textWarpPreset)) {
51363
+ collectFontsFromElement(element, fonts);
51364
+ }
51365
+ if (element.type === "group") {
51366
+ for (const child of element.children ?? []) {
51367
+ collectEnvelopeFonts(child, fonts);
51368
+ }
51369
+ }
51370
+ }
51371
+ function collectGlyphEnvelopeFontFamilies(slides) {
51372
+ const fonts = /* @__PURE__ */ new Set();
51373
+ for (const slide of slides) {
51374
+ for (const element of slide.elements ?? []) {
51375
+ collectEnvelopeFonts(element, fonts);
51376
+ }
51377
+ }
51378
+ return fonts;
51379
+ }
51380
+ var VARIANTS = [
51381
+ { bold: false, italic: false },
51382
+ { bold: true, italic: false }
51383
+ ];
51384
+ async function loadDeckWebfontOutlines(options) {
51385
+ const { slides, embeddedFonts, googleFontsBase, cache: cache3, isCancelled = () => false } = options;
51386
+ const fetchImpl = options.fetchImpl ?? (typeof fetch === "function" ? fetch : void 0);
51387
+ if (!fetchImpl) {
51388
+ return false;
51389
+ }
51390
+ const families = selectGoogleWebfontFamilies(
51391
+ collectGlyphEnvelopeFontFamilies(slides),
51392
+ selectTrustedEmbeddedFonts(embeddedFonts).map((font) => font.name)
51393
+ );
51394
+ if (families.length === 0) {
51395
+ return false;
51396
+ }
51397
+ const href = await resolveGoogleWebfontHref(slides, embeddedFonts, void 0, googleFontsBase);
51398
+ if (!href || isCancelled()) {
51399
+ return false;
51400
+ }
51401
+ let registeredAny = false;
51402
+ for (const family2 of families) {
51403
+ for (const { bold, italic } of VARIANTS) {
51404
+ if (isCancelled()) {
51405
+ return false;
51406
+ }
51407
+ const bytes = await fetchGoogleWebfontOutlineBytes(href, family2, bold, italic, fetchImpl);
51408
+ if (bytes && !isCancelled() && cache3.registerFontBytes(family2, bold, italic, bytes)) {
51409
+ registeredAny = true;
51410
+ }
51411
+ }
51412
+ }
51413
+ return registeredAny && !isCancelled();
51414
+ }
50861
51415
  var LOAD_LIMIT_MESSAGE_KEYS = Object.freeze({
50862
51416
  maxInputBytes: "pptx.viewer.loadLimit.maxInputBytes",
50863
51417
  maxUncompressedBytes: "pptx.viewer.loadLimit.maxUncompressedBytes",
@@ -54497,7 +55051,7 @@ function localPaths(el) {
54497
55051
  if (el.type !== "shape" && el.type !== "text") {
54498
55052
  return [rectPath(width, height)];
54499
55053
  }
54500
- const live4 = chunk2SO3BL67_cjs.resolveLiveCustomGeometryPath(el);
55054
+ const live4 = chunkHTFYAGHG_cjs.resolveLiveCustomGeometryPath(el);
54501
55055
  if (live4) {
54502
55056
  return [{ d: live4.pathData, sx: width / live4.pathWidth, sy: height / live4.pathHeight }];
54503
55057
  }
@@ -55619,7 +56173,7 @@ function getCachedResult(key) {
55619
56173
  return colorChangeCache.get(key);
55620
56174
  }
55621
56175
  function setCachedResult(key, dataUrl) {
55622
- chunk2SO3BL67_cjs.setBoundedRenderCache(colorChangeCache, key, dataUrl, CACHE_MAX2);
56176
+ chunkHTFYAGHG_cjs.setBoundedRenderCache(colorChangeCache, key, dataUrl, CACHE_MAX2);
55623
56177
  }
55624
56178
  function clearColorChangeCache() {
55625
56179
  colorChangeCache.clear();
@@ -55642,7 +56196,7 @@ async function resolveColorChangedImageSource(src, clrChange) {
55642
56196
  if (cached) {
55643
56197
  return cached;
55644
56198
  }
55645
- const epoch = chunk2SO3BL67_cjs.getPptxRenderCacheEpoch();
56199
+ const epoch = chunkHTFYAGHG_cjs.getPptxRenderCacheEpoch();
55646
56200
  try {
55647
56201
  const result = await applyColorChange(
55648
56202
  src,
@@ -55651,7 +56205,7 @@ async function resolveColorChangedImageSource(src, clrChange) {
55651
56205
  tolerance,
55652
56206
  Boolean(clrChange.clrToTransparent)
55653
56207
  );
55654
- if (epoch === chunk2SO3BL67_cjs.getPptxRenderCacheEpoch()) setCachedResult(key, result.dataUrl);
56208
+ if (epoch === chunkHTFYAGHG_cjs.getPptxRenderCacheEpoch()) setCachedResult(key, result.dataUrl);
55655
56209
  return result.dataUrl;
55656
56210
  } catch {
55657
56211
  return src;
@@ -55729,7 +56283,7 @@ function getDuotoneCachedResult(key) {
55729
56283
  return duotoneCache.get(key);
55730
56284
  }
55731
56285
  function setDuotoneCachedResult(key, dataUrl) {
55732
- chunk2SO3BL67_cjs.setBoundedRenderCache(duotoneCache, key, dataUrl, DUOTONE_CACHE_MAX);
56286
+ chunkHTFYAGHG_cjs.setBoundedRenderCache(duotoneCache, key, dataUrl, DUOTONE_CACHE_MAX);
55733
56287
  }
55734
56288
  function clearDuotoneCache() {
55735
56289
  duotoneCache.clear();
@@ -55779,9 +56333,9 @@ var DUOTONE_PRESETS = [
55779
56333
 
55780
56334
  // src/pptx/render/render-cache-lifecycle.ts
55781
56335
  function releasePptxRenderCaches() {
55782
- chunk2SO3BL67_cjs.invalidatePptxRenderCacheEpoch();
56336
+ chunkHTFYAGHG_cjs.invalidatePptxRenderCacheEpoch();
55783
56337
  clearNativeImageSizeCache();
55784
- chunk2SO3BL67_cjs.clearBarFacePicturePixelCache();
56338
+ chunkHTFYAGHG_cjs.clearBarFacePicturePixelCache();
55785
56339
  clearColorChangeCache();
55786
56340
  clearDuotoneCache();
55787
56341
  }
@@ -56734,12 +57288,12 @@ var SVG_NS = "http://www.w3.org/2000/svg";
56734
57288
  function refreshSilhouetteMorphFilters(root) {
56735
57289
  for (const filter of root.querySelectorAll('filter[id^="shape-fx-"]')) {
56736
57290
  const id = filter.closest("[data-pptx-morph-fx]")?.getAttribute("data-pptx-morph-fx") ?? filter.closest("[data-element-id]")?.getAttribute("data-element-id");
56737
- const entry6 = id ? chunk2SO3BL67_cjs.silhouetteMorphEntry(id) : void 0;
56738
- if (!entry6 || filter.innerHTML.includes(chunk2SO3BL67_cjs.MORPH_PROGRESS_VAR)) {
57291
+ const entry6 = id ? chunkHTFYAGHG_cjs.silhouetteMorphEntry(id) : void 0;
57292
+ if (!entry6 || filter.innerHTML.includes(chunkHTFYAGHG_cjs.MORPH_PROGRESS_VAR)) {
56739
57293
  continue;
56740
57294
  }
56741
57295
  const holder = filter.ownerDocument.createElementNS(SVG_NS, "svg");
56742
- holder.innerHTML = chunk2SO3BL67_cjs.buildSilhouetteFilterMarkup(
57296
+ holder.innerHTML = chunkHTFYAGHG_cjs.buildSilhouetteFilterMarkup(
56743
57297
  filter.id,
56744
57298
  entry6.width,
56745
57299
  entry6.height,
@@ -58041,12 +58595,12 @@ function insertChartPreviewSvg(doc, value, size2, tile9, translate2) {
58041
58595
  }
58042
58596
  );
58043
58597
  const data = element.chartData;
58044
- if (!data || chunk2SO3BL67_cjs.resolveChartKind(data.chartType) === "unsupported") return "";
58045
- const kind = chunk2SO3BL67_cjs.resolveChartKind(data.chartType);
58598
+ if (!data || chunkHTFYAGHG_cjs.resolveChartKind(data.chartType) === "unsupported") return "";
58599
+ const kind = chunkHTFYAGHG_cjs.resolveChartKind(data.chartType);
58046
58600
  const square = kind === "pie" || kind === "doughnut" || kind === "radar" || kind === "regionMap";
58047
- const svg2 = chunk2GDYTHUY_cjs.renderChartViewModelSvg(
58601
+ const svg2 = chunkLOUVYGWX_cjs.renderChartViewModelSvg(
58048
58602
  doc,
58049
- chunk2SO3BL67_cjs.buildChartViewModel({ ...element, chartData: chunk2SO3BL67_cjs.withResolvedPalette(data) }),
58603
+ chunkHTFYAGHG_cjs.buildChartViewModel({ ...element, chartData: chunkHTFYAGHG_cjs.withResolvedPalette(data) }),
58050
58604
  square ? "xMidYMid meet" : "none",
58051
58605
  translate2
58052
58606
  );
@@ -63205,6 +63759,28 @@ function lockExternalContentSetting(locked, host2) {
63205
63759
  }
63206
63760
  return { ...locked, [EXTERNAL_CONTENT_SETTING_ID]: host2 };
63207
63761
  }
63762
+
63763
+ // src/pptx/render/options/font-download-policy.ts
63764
+ var FONT_DOWNLOAD_SETTING_ID = "trust.allowFontDownloads";
63765
+ function resolveEffectiveGoogleFonts(host2, options) {
63766
+ if (host2 !== void 0) {
63767
+ return host2;
63768
+ }
63769
+ return options.trust.allowFontDownloads ? void 0 : false;
63770
+ }
63771
+ function resolveFontDownloadBase(host2, options) {
63772
+ return resolveGoogleFontsCss2Base(resolveEffectiveGoogleFonts(host2, options));
63773
+ }
63774
+ function hostFontDownloadLock(host2) {
63775
+ return host2 === void 0 ? void 0 : resolveGoogleFontsCss2Base(host2) !== null;
63776
+ }
63777
+ function lockFontDownloadSetting(locked, host2) {
63778
+ const value = hostFontDownloadLock(host2);
63779
+ if (value === void 0) {
63780
+ return locked;
63781
+ }
63782
+ return { ...locked, [FONT_DOWNLOAD_SETTING_ID]: value };
63783
+ }
63208
63784
  var HOST_REGION_ATTRIBUTE = "data-office-region";
63209
63785
  var HostRegionHost = class {
63210
63786
  #container;
@@ -63401,6 +63977,7 @@ var DEFAULT_VIEWER_OPTIONS = {
63401
63977
  trust: {
63402
63978
  openInProtectedView: false,
63403
63979
  allowExternalContent: true,
63980
+ allowFontDownloads: true,
63404
63981
  confirmExternalHyperlinks: true
63405
63982
  }
63406
63983
  };
@@ -63743,6 +64320,9 @@ var TRUST_TAB = {
63743
64320
  toggle("trust", "allowExternalContent", "pptx.options.trust.allowExternalContent", {
63744
64321
  infoKey: "pptx.options.trust.allowExternalContentInfo"
63745
64322
  }),
64323
+ toggle("trust", "allowFontDownloads", "pptx.options.trust.allowFontDownloads", {
64324
+ infoKey: "pptx.options.trust.allowFontDownloadsInfo"
64325
+ }),
63746
64326
  toggle("trust", "confirmExternalHyperlinks", "pptx.options.trust.confirmHyperlinks")
63747
64327
  ]
63748
64328
  }
@@ -65805,24 +66385,30 @@ function withRecordEntry(record, key, value) {
65805
66385
  }
65806
66386
 
65807
66387
  // src/pptx/render/customization/customization-controller.ts
65808
- function stateOf(customization, allowExternalContent) {
66388
+ function stateOf(customization, host2) {
65809
66389
  const resolved2 = resolveCustomization(customization);
66390
+ const { allowExternalContent, allowFontDownloads } = host2;
66391
+ if (allowExternalContent === void 0 && allowFontDownloads === void 0) {
66392
+ return { customization, ...host2, resolved: resolved2 };
66393
+ }
66394
+ let lockedSettings = lockExternalContentSetting(resolved2.lockedSettings, allowExternalContent);
66395
+ if (allowFontDownloads !== void 0) {
66396
+ lockedSettings = { ...lockedSettings, [FONT_DOWNLOAD_SETTING_ID]: allowFontDownloads };
66397
+ }
66398
+ return { customization, ...host2, resolved: { ...resolved2, lockedSettings } };
66399
+ }
66400
+ function hostLocksOf(state) {
65810
66401
  return {
65811
- customization,
65812
- allowExternalContent,
65813
- resolved: allowExternalContent === void 0 ? resolved2 : {
65814
- ...resolved2,
65815
- lockedSettings: lockExternalContentSetting(
65816
- resolved2.lockedSettings,
65817
- allowExternalContent
65818
- )
65819
- }
66402
+ allowExternalContent: state.allowExternalContent,
66403
+ allowFontDownloads: state.allowFontDownloads
65820
66404
  };
65821
66405
  }
65822
66406
  function createCustomizationController(initial) {
65823
- const store = createViewerStore(stateOf({ ...initial }, void 0));
66407
+ const store = createViewerStore(
66408
+ stateOf({ ...initial }, { allowExternalContent: void 0, allowFontDownloads: void 0 })
66409
+ );
65824
66410
  const current = () => store.getState().customization;
65825
- const set = (next2) => store.setState(stateOf(next2, store.getState().allowExternalContent));
66411
+ const set = (next2) => store.setState(stateOf(next2, hostLocksOf(store.getState())));
65826
66412
  const update = (patch) => set(mergeCustomization(current(), patch));
65827
66413
  const ribbon = (edit) => {
65828
66414
  const next2 = { ...current().ribbon };
@@ -65911,7 +66497,17 @@ function createCustomizationController(initial) {
65911
66497
  setAllowExternalContent: (allow) => {
65912
66498
  const next2 = typeof allow === "boolean" ? allow : void 0;
65913
66499
  if (next2 !== store.getState().allowExternalContent) {
65914
- store.setState(stateOf(current(), next2));
66500
+ store.setState(
66501
+ stateOf(current(), { ...hostLocksOf(store.getState()), allowExternalContent: next2 })
66502
+ );
66503
+ }
66504
+ },
66505
+ setGoogleFonts: (host2) => {
66506
+ const next2 = hostFontDownloadLock(host2);
66507
+ if (next2 !== store.getState().allowFontDownloads) {
66508
+ store.setState(
66509
+ stateOf(current(), { ...hostLocksOf(store.getState()), allowFontDownloads: next2 })
66510
+ );
65915
66511
  }
65916
66512
  }
65917
66513
  };
@@ -66735,7 +67331,7 @@ function axisTitle(current, show) {
66735
67331
  return show ? current || chart.CHART_QUICK_LAYOUT_AXIS_TITLE : void 0;
66736
67332
  }
66737
67333
  function applyChartQuickLayout(chartData, layout) {
66738
- const withGrid = patchChartData(chartData, chunk2SO3BL67_cjs.chartGridlinesPatch(chartData, layout.majorGridlines));
67334
+ const withGrid = patchChartData(chartData, chunkHTFYAGHG_cjs.chartGridlinesPatch(chartData, layout.majorGridlines));
66739
67335
  const axes = (withGrid.axes ?? []).map((axis) => {
66740
67336
  if (axis.axisType === "valAx") {
66741
67337
  return {
@@ -66789,7 +67385,7 @@ function matchesLayout(chartData, layout) {
66789
67385
  const legend = style.hasLegend ? style.legendPosition ?? "r" : null;
66790
67386
  const isBar = chartData.chartType === "bar" || chartData.chartType === "bar3D";
66791
67387
  const barMatches = !isBar || (chartData.barGapWidth ?? 150) === layout.gapWidth && (chartData.barOverlap ?? 0) === layout.overlap;
66792
- return barMatches && Boolean(style.hasTitle) === layout.title && legend === layout.legend && Boolean(style.hasDataLabels) === layout.dataLabels && Boolean(chartData.dataTable) === layout.dataTable && Boolean(catAxis?.titleText) === layout.catAxisTitle && Boolean(valAxis?.titleText) === layout.valAxisTitle && chunk2SO3BL67_cjs.chartGridlinesState(chartData) === layout.majorGridlines && Boolean(valAxis?.minorGridlines) === layout.minorGridlines && !valAxis?.deleted === layout.valueAxis;
67388
+ return barMatches && Boolean(style.hasTitle) === layout.title && legend === layout.legend && Boolean(style.hasDataLabels) === layout.dataLabels && Boolean(chartData.dataTable) === layout.dataTable && Boolean(catAxis?.titleText) === layout.catAxisTitle && Boolean(valAxis?.titleText) === layout.valAxisTitle && chunkHTFYAGHG_cjs.chartGridlinesState(chartData) === layout.majorGridlines && Boolean(valAxis?.minorGridlines) === layout.minorGridlines && !valAxis?.deleted === layout.valueAxis;
66793
67389
  }
66794
67390
  var CHART_QUICK_LAYOUT_GALLERY = {
66795
67391
  build(ctx) {
@@ -73958,7 +74554,7 @@ function isSeriesUsingSecondaryAxis(chartData, seriesIndex) {
73958
74554
  if (!series) {
73959
74555
  return false;
73960
74556
  }
73961
- return chunk2SO3BL67_cjs.isSeriesOnSecondaryAxis(series, chartData.axes);
74557
+ return chunkHTFYAGHG_cjs.isSeriesOnSecondaryAxis(series, chartData.axes);
73962
74558
  }
73963
74559
  function resolveSecondaryAxisId(chartData, useSecondary) {
73964
74560
  const axPos = useSecondary ? "r" : "l";
@@ -74255,7 +74851,7 @@ function getCropShapeClipPath(cropShape, width, height) {
74255
74851
  return void 0;
74256
74852
  }
74257
74853
  const presetName = CROP_SHAPE_ALIASES[cropShape] ?? cropShape;
74258
- return chunk2SO3BL67_cjs.getResolvedShapeClipPathFor(presetName, width, height);
74854
+ return chunkHTFYAGHG_cjs.getResolvedShapeClipPathFor(presetName, width, height);
74259
74855
  }
74260
74856
 
74261
74857
  // src/pptx/render/activex-overlay-view.ts
@@ -74617,14 +75213,14 @@ async function buildForeignObjectSvgBody(element, doc, options) {
74617
75213
  backgroundColor,
74618
75214
  readComputedStyle = (el) => window.getComputedStyle(el)
74619
75215
  } = options;
74620
- await chunkHB6CH2FF_cjs.settleThreeViews(element);
75216
+ await chunkGYI2TFSW_cjs.settleThreeViews(element);
74621
75217
  const clone = element.cloneNode(true);
74622
- chunkHWJKBKCW_cjs.withAuthoredStrokeWidths(
75218
+ chunkFI2ATACZ_cjs.withAuthoredStrokeWidths(
74623
75219
  element,
74624
75220
  () => inlineComputedStylesOnClone(element, clone, readComputedStyle)
74625
75221
  );
74626
- chunkHB6CH2FF_cjs.snapshotThreeViewsIntoClone(element, clone);
74627
- chunkHB6CH2FF_cjs.prepareExportClone(clone);
75222
+ chunkGYI2TFSW_cjs.snapshotThreeViewsIntoClone(element, clone);
75223
+ chunkGYI2TFSW_cjs.prepareExportClone(clone);
74628
75224
  const [{ allEmbedded: imagesEmbedded }, externalFonts] = await Promise.all([
74629
75225
  embedImagesOnClone(clone),
74630
75226
  collectExternalFontFaceCss(doc, fetchAsDataUrl)
@@ -74632,7 +75228,7 @@ async function buildForeignObjectSvgBody(element, doc, options) {
74632
75228
  const allEmbedded = imagesEmbedded && externalFonts.allEmbedded;
74633
75229
  const fontFaceCss = [collectFontFaceCss(doc), externalFonts.css].filter(Boolean).join("\n\n");
74634
75230
  const defs = fontFaceCss ? `<defs><style type="text/css">${cssCdata(fontFaceCss)}</style></defs>` : "";
74635
- const bgRect = backgroundColor ? `<rect width="${width}" height="${height}" fill="${chunk2SO3BL67_cjs.escapeSvgAttr(backgroundColor)}" />` : "";
75231
+ const bgRect = backgroundColor ? `<rect width="${width}" height="${height}" fill="${chunkHTFYAGHG_cjs.escapeSvgAttr(backgroundColor)}" />` : "";
74636
75232
  const bodyMarkup = [
74637
75233
  defs,
74638
75234
  bgRect,
@@ -84757,13 +85353,13 @@ function chartSpaceFormatSource(space, options = {}) {
84757
85353
  labelOptions: labels
84758
85354
  };
84759
85355
  }
84760
- var chartFormatLocale = (value) => i18n.normalizeLocale(value, chunkZHVKGGLQ_cjs.CHART_FORMAT_LOCALES, "en");
85356
+ var chartFormatLocale = (value) => i18n.normalizeLocale(value, chunkUFJBHFSD_cjs.CHART_FORMAT_LOCALES, "en");
84761
85357
  function chartFormatTranslator(locale, override) {
84762
- const strings = chunkZHVKGGLQ_cjs.CHART_FORMAT_STRINGS[chartFormatLocale(locale)];
85358
+ const strings = chunkUFJBHFSD_cjs.CHART_FORMAT_STRINGS[chartFormatLocale(locale)];
84763
85359
  return (key, params, fallback) => {
84764
85360
  const own = override?.(key, params, fallback);
84765
85361
  if (own && own !== key) return own;
84766
- return strings[key] ?? chunkZHVKGGLQ_cjs.CHART_FORMAT_STRINGS.en[key] ?? key;
85362
+ return strings[key] ?? chunkUFJBHFSD_cjs.CHART_FORMAT_STRINGS.en[key] ?? key;
84767
85363
  };
84768
85364
  }
84769
85365
 
@@ -87211,7 +87807,7 @@ var OfficeUiSelect = class extends OfficeElement {
87211
87807
  var defineSelect = definer("office-ui-select", () => OfficeUiSelect);
87212
87808
 
87213
87809
  // raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/chrome/status-bar.css?raw
87214
- var status_bar_default = ":host {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n min-height: var(--office-status-bar-height);\n padding: 0 var(--office-space-2);\n font-size: var(--office-font-size-xs);\n background: var(--office-surface);\n color: var(--office-foreground);\n border-top: var(--office-border-width) solid var(--office-border);\n font-family: var(--office-font);\n}\n::slotted([slot='end']) {\n margin-inline-start: auto;\n}\n.bar {\n display: contents;\n}\n[hidden] {\n display: none !important;\n}\n:host([data-controlled]) {\n display: block;\n flex: none;\n padding: 0;\n gap: 0;\n}\n:host([data-controlled]) .bar {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: var(--office-space-1);\n width: 100%;\n min-height: var(--office-status-bar-height);\n padding: var(--office-space-0) var(--office-space-2);\n color: var(--office-muted-foreground);\n}\n:host([data-controlled]) ::slotted([slot='end']) {\n margin-inline-start: 0;\n}\n.items {\n display: flex;\n flex: 0 1 auto;\n align-items: center;\n min-width: 0;\n overflow: hidden;\n}\n.item {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n/* The page counter is the one text that stays whole. */\n.item[aria-live] {\n flex: none;\n}\n.item + .item::before {\n content: '';\n display: inline-block;\n width: var(--office-border-width);\n height: var(--office-space-3);\n margin: 0 var(--office-space-2);\n vertical-align: middle;\n background: var(--office-border);\n opacity: var(--office-status-bar-separator-opacity);\n}\n.item.sr,\n.item.sr::before {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.item.sr::before {\n display: none;\n}\n.item.saving {\n color: var(--office-warning);\n}\n.item.error {\n color: var(--office-danger);\n}\n.spacer {\n flex: 1;\n}\n.toggles,\n.group {\n display: flex;\n align-items: center;\n gap: var(--office-space-0);\n}\n.sep {\n flex: none;\n width: var(--office-border-width);\n height: var(--office-space-3);\n margin: 0 var(--office-space-0);\n background: var(--office-border);\n opacity: var(--office-status-bar-separator-opacity);\n}\n.bar button {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--office-space-1);\n min-width: var(--office-control-height-xs);\n min-height: var(--office-control-height-xs);\n padding: var(--office-space-1);\n border: 0;\n border-radius: var(--office-radius-sm);\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n touch-action: manipulation;\n}\n.bar button:hover {\n background: var(--office-selected);\n color: var(--office-foreground);\n}\n.bar button[aria-pressed='true'] {\n color: var(--office-accent);\n}\n.bar button:active {\n opacity: 0.8;\n}\n.bar button:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n.bar svg {\n flex: none;\n width: var(--office-icon-size);\n height: var(--office-icon-size);\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.toggle svg,\n.zoom-step svg {\n width: var(--office-icon-size-sm);\n height: var(--office-icon-size-sm);\n}\n.zoom-fit {\n min-width: var(--office-zoom-value-width);\n font-variant-numeric: tabular-nums;\n}\n@media (max-width: 767px) {\n .narrow-hide,\n .toggle .label {\n display: none !important;\n }\n}\n@media (pointer: coarse) {\n .bar button {\n min-width: var(--office-touch-target, 44px);\n min-height: var(--office-touch-target, 44px);\n }\n}\n@media (forced-colors: active) {\n :host {\n background: Canvas;\n color: CanvasText;\n border-top-color: CanvasText;\n }\n .bar button {\n color: ButtonText;\n }\n .bar button:hover {\n background: Highlight;\n color: HighlightText;\n }\n .bar button[aria-pressed='true'] {\n border: var(--office-border-width) solid Highlight;\n }\n .bar button:focus-visible {\n outline-color: Highlight;\n }\n .sep,\n .item + .item::before {\n background: CanvasText;\n }\n}\n";
87810
+ var status_bar_default = ":host {\n display: flex;\n align-items: center;\n gap: var(--office-space-3);\n min-height: var(--office-status-bar-height);\n padding: 0 var(--office-space-2);\n font-size: var(--office-font-size-xs);\n background: var(--office-surface);\n color: var(--office-foreground);\n border-top: var(--office-border-width) solid var(--office-border);\n font-family: var(--office-font);\n}\n::slotted([slot='end']) {\n margin-inline-start: auto;\n}\n.bar {\n display: contents;\n}\n[hidden] {\n display: none !important;\n}\n:host([data-controlled]) {\n display: block;\n flex: none;\n padding: 0;\n gap: 0;\n}\n:host([data-controlled]) .bar {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: var(--office-space-1);\n width: 100%;\n min-height: var(--office-status-bar-height);\n padding: var(--office-space-0) var(--office-space-2);\n color: var(--office-muted-foreground);\n}\n:host([data-controlled]) ::slotted([slot='end']) {\n margin-inline-start: 0;\n}\n.items {\n display: flex;\n flex: 0 1 auto;\n align-items: center;\n min-width: 0;\n overflow: hidden;\n}\n.item {\n flex: 0 1 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n/* The page counter is the one text that stays whole. */\n.item[aria-live] {\n flex: none;\n}\n.item + .item::before {\n content: '';\n display: inline-block;\n width: var(--office-border-width);\n height: var(--office-space-3);\n margin: 0 var(--office-space-2);\n vertical-align: middle;\n background: var(--office-border);\n opacity: var(--office-status-bar-separator-opacity);\n}\n.item.sr,\n.item.sr::before {\n position: absolute;\n width: var(--office-space-px);\n height: var(--office-space-px);\n margin: calc(-1 * var(--office-space-px));\n padding: 0;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n}\n.item.sr::before {\n display: none;\n}\n.item.saving {\n color: var(--office-warning);\n}\n.item.error {\n color: var(--office-danger);\n}\n.spacer {\n flex: 1;\n}\n.toggles,\n.group {\n display: flex;\n align-items: center;\n gap: var(--office-space-0);\n}\n.sep {\n flex: none;\n width: var(--office-border-width);\n height: var(--office-space-3);\n margin: 0 var(--office-space-0);\n background: var(--office-border);\n opacity: var(--office-status-bar-separator-opacity);\n}\n.bar button {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--office-space-1);\n min-width: var(--office-control-height-xs);\n min-height: var(--office-control-height-xs);\n padding: var(--office-space-1);\n border: 0;\n border-radius: var(--office-radius-sm);\n background: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n touch-action: manipulation;\n}\n.bar button:hover {\n background: var(--office-selected);\n color: var(--office-foreground);\n}\n.bar button[aria-pressed='true'] {\n color: var(--office-accent);\n}\n.bar button:active {\n opacity: 0.8;\n}\n.bar button:focus-visible {\n outline: var(--office-focus-width) solid var(--office-ring);\n outline-offset: var(--office-focus-offset);\n}\n.bar svg {\n flex: none;\n width: var(--office-icon-size);\n height: var(--office-icon-size);\n fill: none;\n stroke: currentColor;\n stroke-width: var(--office-icon-stroke);\n stroke-linecap: round;\n stroke-linejoin: round;\n}\n.toggle svg,\n.zoom-step svg {\n width: var(--office-icon-size-sm);\n height: var(--office-icon-size-sm);\n}\n.zoom-fit {\n min-width: var(--office-zoom-value-width);\n font-variant-numeric: tabular-nums;\n}\n@media (max-width: 767px) {\n .narrow-hide,\n .toggle .label {\n display: none !important;\n }\n}\n@media (pointer: coarse) {\n .bar button {\n min-width: var(--office-touch-target, 44px);\n min-height: var(--office-touch-target, 44px);\n }\n}\n@media (forced-colors: active) {\n :host {\n background: Canvas;\n color: CanvasText;\n border-top-color: CanvasText;\n }\n .bar button {\n color: ButtonText;\n }\n .bar button:hover {\n background: Highlight;\n color: HighlightText;\n }\n .bar button[aria-pressed='true'] {\n border: var(--office-border-width) solid Highlight;\n }\n .bar button:focus-visible {\n outline-color: Highlight;\n }\n .sep,\n .item + .item::before {\n background: CanvasText;\n }\n}\n";
87215
87811
 
87216
87812
  // src/chrome/status-bar.ts
87217
87813
  var OfficeUiStatusBar = class extends OfficeElement {
@@ -87981,7 +88577,7 @@ var OfficeUiChartPicker = class extends OfficeElement {
87981
88577
  var defineChartPicker = definer("office-ui-chart-picker", () => OfficeUiChartPicker);
87982
88578
 
87983
88579
  // src/chart/data-sheet-keys.ts
87984
- var STEPS2 = {
88580
+ var STEPS3 = {
87985
88581
  ArrowUp: [-1, 0],
87986
88582
  ArrowDown: [1, 0],
87987
88583
  ArrowLeft: [0, -1],
@@ -87995,7 +88591,7 @@ function step(row2, col, [dr, dc], rows, cols) {
87995
88591
  }
87996
88592
  function chartDataSheetKeyAction(key, mode, row2, col, rows, cols) {
87997
88593
  if (key.ctrlKey || key.metaKey || key.altKey) return { type: "native" };
87998
- const arrow = STEPS2[key.key];
88594
+ const arrow = STEPS3[key.key];
87999
88595
  if (arrow) {
88000
88596
  return mode === "edit" ? { type: "native" } : { type: "move", ...step(row2, col, arrow, rows, cols) };
88001
88597
  }
@@ -89884,7 +90480,7 @@ function definePptxInsertSmartArtDialog(registry2) {
89884
90480
  if (this.#live || this.#draw) {
89885
90481
  return;
89886
90482
  }
89887
- this.#live = import('./smartart-insert-preview-55QCEISC.cjs').then((module) => {
90483
+ this.#live = import('./smartart-insert-preview-R7USUBIX.cjs').then((module) => {
89888
90484
  if (this.#draw || !this.#picker) {
89889
90485
  return;
89890
90486
  }
@@ -95441,7 +96037,7 @@ function applyChart3DDrag(bridge, detail) {
95441
96037
  return;
95442
96038
  }
95443
96039
  bridge.commitChartData(
95444
- chunk2GDYTHUY_cjs.withChartPointValue(bridge.chartData, part2.seriesIndex, part2.pointIndex, value)
96040
+ chunkLOUVYGWX_cjs.withChartPointValue(bridge.chartData, part2.seriesIndex, part2.pointIndex, value)
95445
96041
  );
95446
96042
  }
95447
96043
  function detailOf(event) {
@@ -95950,7 +96546,7 @@ function calculateNotesPageLayout(slideWidth, slideHeight) {
95950
96546
  };
95951
96547
  }
95952
96548
  function wrapNotesText(text4, maxWidth, fontSize) {
95953
- return chunk2SO3BL67_cjs.wrapTextByEstimatedWidth(text4, maxWidth, fontSize, { keepBlankLines: true });
96549
+ return chunkHTFYAGHG_cjs.wrapTextByEstimatedWidth(text4, maxWidth, fontSize, { keepBlankLines: true });
95954
96550
  }
95955
96551
  function calculateContinuationPageMaxLines() {
95956
96552
  const contentHeight = NOTES_PAGE_H - 2 * NOTES_MARGIN;
@@ -98824,6 +99420,8 @@ exports.CURSOR_PALETTE = CURSOR_PALETTE;
98824
99420
  exports.DATA_LABEL_CONTENT_OPTIONS = DATA_LABEL_CONTENT_OPTIONS;
98825
99421
  exports.DATA_LABEL_POSITION_OPTIONS = DATA_LABEL_POSITION_OPTIONS;
98826
99422
  exports.DEBOUNCE_MS = DEBOUNCE_MS;
99423
+ exports.DECK_WEBFONT_PROGRESS_DELAY_MS = DECK_WEBFONT_PROGRESS_DELAY_MS;
99424
+ exports.DECK_WEBFONT_TIMEOUT_MS = DECK_WEBFONT_TIMEOUT_MS;
98827
99425
  exports.DEFAULT_ANIMATION_TIMING_CURVE = DEFAULT_ANIMATION_TIMING_CURVE;
98828
99426
  exports.DEFAULT_BOUNDS = DEFAULT_BOUNDS;
98829
99427
  exports.DEFAULT_BROADCAST_SERVER_URL = DEFAULT_BROADCAST_SERVER_URL;
@@ -98919,6 +99517,7 @@ exports.FILL_PATTERN_LABEL_KEYS = FILL_PATTERN_LABEL_KEYS;
98919
99517
  exports.FIXED_SPACING_RUN_LINE_HEIGHT = FIXED_SPACING_RUN_LINE_HEIGHT;
98920
99518
  exports.FIXED_TAB_GALLERIES = FIXED_TAB_GALLERIES;
98921
99519
  exports.FLY_SUBTYPE_TO_EDGE = FLY_SUBTYPE_TO_EDGE;
99520
+ exports.FONT_DOWNLOAD_SETTING_ID = FONT_DOWNLOAD_SETTING_ID;
98922
99521
  exports.FONT_EMBEDDING_UNAVAILABLE_KEY = FONT_EMBEDDING_UNAVAILABLE_KEY;
98923
99522
  exports.FOREIGN_OBJECT_SVG_DATA_URL_PREFIX = FOREIGN_OBJECT_SVG_DATA_URL_PREFIX;
98924
99523
  exports.FRAGMENT_TRANSITION_KEYFRAMES = FRAGMENT_TRANSITION_KEYFRAMES;
@@ -99431,6 +100030,7 @@ exports.applyTransitionSoundFile = applyTransitionSoundFile;
99431
100030
  exports.applyTransitionStockSound = applyTransitionStockSound;
99432
100031
  exports.applyUnderlineVariant = applyUnderlineVariant;
99433
100032
  exports.applyUniformCellPaddingPatch = applyUniformCellPaddingPatch;
100033
+ exports.archFitSweep = archFitSweep;
99434
100034
  exports.armBaselineSettle = armBaselineSettle;
99435
100035
  exports.armEditorKeyboard = armEditorKeyboard;
99436
100036
  exports.arrangeAlignAction = arrangeAlignAction;
@@ -99701,6 +100301,7 @@ exports.chartThreeViewSpec = chartThreeViewSpec;
99701
100301
  exports.checkModifyPassword = checkModifyPassword;
99702
100302
  exports.checkerboardDecl = checkerboardDecl;
99703
100303
  exports.choices = choices2;
100304
+ exports.circleFitSweep = circleFitSweep;
99704
100305
  exports.circleOutline = circleOutline;
99705
100306
  exports.clampCursorPosition = clampCursorPosition;
99706
100307
  exports.clampFlyoutPosition = clampFlyoutPosition;
@@ -99754,10 +100355,12 @@ exports.collectAccessibilityIssues = collectAccessibilityIssues;
99754
100355
  exports.collectChartBuildInfo = collectChartBuildInfo;
99755
100356
  exports.collectCoherent3DOffNodeIds = collectCoherent3DOffNodeIds;
99756
100357
  exports.collectConnectorSiteCandidates = collectConnectorSiteCandidates;
100358
+ exports.collectDeckWebfontFaces = collectDeckWebfontFaces;
99757
100359
  exports.collectDiagramBuildInfo = collectDiagramBuildInfo;
99758
100360
  exports.collectExternalFontFaceCss = collectExternalFontFaceCss;
99759
100361
  exports.collectFontFaceCss = collectFontFaceCss;
99760
100362
  exports.collectFontsFromElement = collectFontsFromElement;
100363
+ exports.collectGlyphEnvelopeFontFamilies = collectGlyphEnvelopeFontFamilies;
99761
100364
  exports.collectReferencedFontFamilies = collectReferencedFontFamilies;
99762
100365
  exports.collectUsedFonts = collectUsedFonts;
99763
100366
  exports.colorDistance = colorDistance;
@@ -100046,6 +100649,7 @@ exports.escapeSvgText = escapeSvgText;
100046
100649
  exports.escapeXml = escapeXml;
100047
100650
  exports.evenColumnWidths = evenColumnWidths;
100048
100651
  exports.evenRowHeights = evenRowHeights;
100652
+ exports.exactPitchPoints = exactPitchPoints;
100049
100653
  exports.executeMediaCommandInDom = executeMediaCommandInDom;
100050
100654
  exports.expandCapabilities = expandCapabilities;
100051
100655
  exports.expandTextBuildAnimations = expandTextBuildAnimations;
@@ -100113,6 +100717,7 @@ exports.fontFamilyItems = fontFamilyItems;
100113
100717
  exports.fontHomeControls = fontHomeControls;
100114
100718
  exports.fontMimeForFormat = fontMimeForFormat;
100115
100719
  exports.fontPickerHomeControls = fontPickerHomeControls;
100720
+ exports.fontSizePx = fontSizePx;
100116
100721
  exports.fontStyleShorthand = fontStyleShorthand;
100117
100722
  exports.fontWeightAttribute = fontWeightAttribute;
100118
100723
  exports.fontWeightShorthand = fontWeightShorthand;
@@ -100349,6 +100954,7 @@ exports.homeLaunchers = homeLaunchers;
100349
100954
  exports.homeShapeGalleryItems = homeShapeGalleryItems;
100350
100955
  exports.homeShapeValue = homeShapeValue;
100351
100956
  exports.homeSnapshotTranslator = homeSnapshotTranslator;
100957
+ exports.hostFontDownloadLock = hostFontDownloadLock;
100352
100958
  exports.hostMenuLabel = hostMenuLabel;
100353
100959
  exports.hslToRgb = hslToRgb;
100354
100960
  exports.imageAdjustmentsPatch = imageAdjustmentsPatch;
@@ -100493,10 +101099,12 @@ exports.listCommentLocations = listCommentLocations;
100493
101099
  exports.listMediaBookmarkOptions = listMediaBookmarkOptions;
100494
101100
  exports.listenForOutlineViewDismiss = listenForOutlineViewDismiss;
100495
101101
  exports.loadAudienceContent = loadAudienceContent;
101102
+ exports.loadDeckWebfontOutlines = loadDeckWebfontOutlines;
100496
101103
  exports.loadPresentationDeck = loadPresentationDeck;
100497
101104
  exports.loadSessionDeck = loadSessionDeck;
100498
101105
  exports.loadedThemeName = loadedThemeName;
100499
101106
  exports.lockExternalContentSetting = lockExternalContentSetting;
101107
+ exports.lockFontDownloadSetting = lockFontDownloadSetting;
100500
101108
  exports.makeCloneId = makeCloneId;
100501
101109
  exports.mapAwarenessCursors = mapAwarenessCursors;
100502
101110
  exports.mapCustomizedEditorKey = mapCustomizedEditorKey;
@@ -100541,6 +101149,7 @@ exports.measurePreviewGeometry = measurePreviewGeometry;
100541
101149
  exports.measureSvgViewportRect = measureSvgViewportRect;
100542
101150
  exports.measureTextWidth = measureTextWidth;
100543
101151
  exports.measureViewportClientSize = measureViewportClientSize;
101152
+ exports.measureWarpParagraphWidth = measureWarpParagraphWidth;
100544
101153
  exports.mediaControlBarEnabled = mediaControlBarEnabled;
100545
101154
  exports.mediaControlBarVisible = mediaControlBarVisible;
100546
101155
  exports.mediaFallbackIcon = mediaFallbackIcon;
@@ -100734,6 +101343,7 @@ exports.pptxChartFormatSource = pptxChartFormatSource;
100734
101343
  exports.pptxLoadErrorMessage = pptxLoadErrorMessage;
100735
101344
  exports.pptxOptionsLabels = pptxOptionsLabels;
100736
101345
  exports.prefersReducedMotion = prefersReducedMotion;
101346
+ exports.prepareDeckWebfonts = prepareDeckWebfonts;
100737
101347
  exports.prepareElementForInsertion = prepareElementForInsertion;
100738
101348
  exports.prepareElementUpdateBatch = prepareElementUpdateBatch;
100739
101349
  exports.prepareElementsForPaste = prepareElementsForPaste;
@@ -100918,6 +101528,7 @@ exports.resolveEastAsianBreakOptions = resolveEastAsianBreakOptions;
100918
101528
  exports.resolveEditPointsAvailability = resolveEditPointsAvailability;
100919
101529
  exports.resolveEffect = resolveEffect;
100920
101530
  exports.resolveEffectiveEndCondition = resolveEffectiveEndCondition;
101531
+ exports.resolveEffectiveGoogleFonts = resolveEffectiveGoogleFonts;
100921
101532
  exports.resolveEffectiveHiddenActions = resolveEffectiveHiddenActions;
100922
101533
  exports.resolveEffectiveStartCondition = resolveEffectiveStartCondition;
100923
101534
  exports.resolveElementActionAffordance = resolveElementActionAffordance;
@@ -100931,6 +101542,7 @@ exports.resolveExportCaptureDecision = resolveExportCaptureDecision;
100931
101542
  exports.resolveFieldDateText = resolveFieldDateText;
100932
101543
  exports.resolveFilterEffect = resolveFilterEffect;
100933
101544
  exports.resolveFilterPresetSubtype = resolveFilterPresetSubtype;
101545
+ exports.resolveFontDownloadBase = resolveFontDownloadBase;
100934
101546
  exports.resolveFontItalic = resolveFontItalic;
100935
101547
  exports.resolveFontKerning = resolveFontKerning;
100936
101548
  exports.resolveFontRefIdx = resolveFontRefIdx;
@@ -101137,6 +101749,7 @@ exports.segmentsToEditorHtml = segmentsToEditorHtml;
101137
101749
  exports.segmentsToParagraphs = segmentsToParagraphs;
101138
101750
  exports.segmentsToPlainText = segmentsToPlainText;
101139
101751
  exports.select = select;
101752
+ exports.selectGoogleWebfontCandidates = selectGoogleWebfontCandidates;
101140
101753
  exports.selectGoogleWebfontFamilies = selectGoogleWebfontFamilies;
101141
101754
  exports.selectSorterSlide = selectSorterSlide;
101142
101755
  exports.selectTrustedEmbeddedFonts = selectTrustedEmbeddedFonts;
@@ -101370,6 +101983,9 @@ exports.viewerPreferencesFromViewProperties = viewerPreferencesFromViewPropertie
101370
101983
  exports.viewerZoomPercent = viewerZoomPercent;
101371
101984
  exports.visibleContextualTabs = visibleContextualTabs;
101372
101985
  exports.visibleRibbonAddIns = visibleRibbonAddIns;
101986
+ exports.warpFitCapacity = warpFitCapacity;
101987
+ exports.warpFitScale = warpFitScale;
101988
+ exports.warpParagraphLayouts = warpParagraphLayouts;
101373
101989
  exports.warpPreviewPath = warpPreviewPath;
101374
101990
  exports.wasWrittenByThisPage = wasWrittenByThisPage;
101375
101991
  exports.wheelDecl = wheelDecl;