ooxml-core 1.29.0 → 1.30.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 (308) hide show
  1. package/dist/{PptxHandler-CZG6ISCZ.cjs → PptxHandler-3OLZT5YW.cjs} +3 -3
  2. package/dist/{PptxHandler-QIHYALOV.mjs → PptxHandler-FJHKJEZU.mjs} +2 -2
  3. package/dist/PptxHandler-LOFY2PRO.mjs +4 -0
  4. package/dist/{PresentationBuilder-UAINQZA2.mjs → PresentationBuilder-23M6WQK3.mjs} +2 -2
  5. package/dist/{PresentationBuilder-66EU3N3O.cjs → PresentationBuilder-LVIVJZIL.cjs} +5 -5
  6. package/dist/{PresentationBuilder-5YM2L7DA.mjs → PresentationBuilder-W5VRPFLM.mjs} +2 -2
  7. package/dist/automation/index.cjs +4250 -3145
  8. package/dist/automation/index.mjs +4250 -3145
  9. package/dist/chart/box-distribution.d.ts +10 -0
  10. package/dist/chart/box-distribution.d.ts.map +1 -0
  11. package/dist/chart/data-table-layout.d.ts +8 -0
  12. package/dist/chart/data-table-layout.d.ts.map +1 -0
  13. package/dist/chart/date-axis.d.ts +3 -0
  14. package/dist/chart/date-axis.d.ts.map +1 -0
  15. package/dist/chart/date-format.d.ts +39 -0
  16. package/dist/chart/date-format.d.ts.map +1 -0
  17. package/dist/chart/edit/chartex-action.d.ts.map +1 -1
  18. package/dist/chart/edit/chartex-axis.d.ts.map +1 -1
  19. package/dist/chart/edit/chartex-structure.d.ts.map +1 -1
  20. package/dist/chart/edit/chartex.d.ts +3 -1
  21. package/dist/chart/edit/chartex.d.ts.map +1 -1
  22. package/dist/chart/edit/draft.d.ts.map +1 -1
  23. package/dist/chart/funnel-geometry.d.ts +15 -0
  24. package/dist/chart/funnel-geometry.d.ts.map +1 -0
  25. package/dist/chart/index.cjs +1392 -404
  26. package/dist/chart/index.d.ts +6 -0
  27. package/dist/chart/index.d.ts.map +1 -1
  28. package/dist/chart/index.mjs +1379 -405
  29. package/dist/chart/line-path.d.ts +30 -0
  30. package/dist/chart/line-path.d.ts.map +1 -0
  31. package/dist/chart/manual-layout.d.ts +15 -0
  32. package/dist/chart/manual-layout.d.ts.map +1 -1
  33. package/dist/chart/render/chart-svg-analysis.d.ts +2 -0
  34. package/dist/chart/render/chart-svg-analysis.d.ts.map +1 -1
  35. package/dist/chart/render/chart-svg-bars.d.ts.map +1 -1
  36. package/dist/chart/render/chart-svg-box.d.ts +5 -0
  37. package/dist/chart/render/chart-svg-box.d.ts.map +1 -0
  38. package/dist/chart/render/chart-svg-cartesian.d.ts +3 -1
  39. package/dist/chart/render/chart-svg-cartesian.d.ts.map +1 -1
  40. package/dist/chart/render/chart-svg-data-table.d.ts +11 -0
  41. package/dist/chart/render/chart-svg-data-table.d.ts.map +1 -0
  42. package/dist/chart/render/chart-svg-date-axis.d.ts +9 -0
  43. package/dist/chart/render/chart-svg-date-axis.d.ts.map +1 -0
  44. package/dist/chart/render/chart-svg-funnel.d.ts +4 -0
  45. package/dist/chart/render/chart-svg-funnel.d.ts.map +1 -0
  46. package/dist/chart/render/chart-svg-labels.d.ts +16 -16
  47. package/dist/chart/render/chart-svg-labels.d.ts.map +1 -1
  48. package/dist/chart/render/chart-svg-line.d.ts +5 -0
  49. package/dist/chart/render/chart-svg-line.d.ts.map +1 -0
  50. package/dist/chart/render/chart-svg-plot-layout.d.ts +6 -0
  51. package/dist/chart/render/chart-svg-plot-layout.d.ts.map +1 -0
  52. package/dist/chart/render/chart-svg-plots.d.ts +2 -1
  53. package/dist/chart/render/chart-svg-plots.d.ts.map +1 -1
  54. package/dist/chart/render/chart-svg-radial.d.ts.map +1 -1
  55. package/dist/chart/render/chart-svg-slice-labels.d.ts +18 -0
  56. package/dist/chart/render/chart-svg-slice-labels.d.ts.map +1 -0
  57. package/dist/chart/render/chart-svg-xy.d.ts +2 -1
  58. package/dist/chart/render/chart-svg-xy.d.ts.map +1 -1
  59. package/dist/chart/render/chart-svg.d.ts.map +1 -1
  60. package/dist/chart/render/chart-title-text.d.ts +3 -1
  61. package/dist/chart/render/chart-title-text.d.ts.map +1 -1
  62. package/dist/chart/render/chart-view-analysis.d.ts +2 -1
  63. package/dist/chart/render/chart-view-analysis.d.ts.map +1 -1
  64. package/dist/chart/render/chart-view-data-table.d.ts +13 -0
  65. package/dist/chart/render/chart-view-data-table.d.ts.map +1 -0
  66. package/dist/chart/render/chart-view-labels.d.ts +6 -1
  67. package/dist/chart/render/chart-view-labels.d.ts.map +1 -1
  68. package/dist/chart/render/chart-view-series.d.ts.map +1 -1
  69. package/dist/chart/render/chart-view.d.ts +13 -0
  70. package/dist/chart/render/chart-view.d.ts.map +1 -1
  71. package/dist/chart/render/render-space.d.ts.map +1 -1
  72. package/dist/chart/render/summary-ex-series.d.ts +5 -0
  73. package/dist/chart/render/summary-ex-series.d.ts.map +1 -0
  74. package/dist/chart/render/summary-from-chartex.d.ts.map +1 -1
  75. package/dist/chart/render/summary-from-space.d.ts +1 -1
  76. package/dist/chart/render/summary-from-space.d.ts.map +1 -1
  77. package/dist/chart/render/summary-labels.d.ts.map +1 -1
  78. package/dist/chart/render/summary.d.ts +14 -1
  79. package/dist/chart/render/summary.d.ts.map +1 -1
  80. package/dist/{chunk-BBK3UB7M.mjs → chunk-5YZFO55V.mjs} +4 -4
  81. package/dist/{chunk-T7HBA3CW.cjs → chunk-7T3SJQA6.cjs} +11 -9
  82. package/dist/{chunk-XROY25LN.cjs → chunk-7XYVFUB3.cjs} +4 -0
  83. package/dist/{chunk-GUNTIFGT.cjs → chunk-CZXM4ZJH.cjs} +158 -26
  84. package/dist/{chunk-RYOJHYA3.mjs → chunk-DJ3CDTMX.mjs} +157 -27
  85. package/dist/{chunk-KBER3RAP.mjs → chunk-HDHUJM5M.mjs} +229 -227
  86. package/dist/{chunk-XCRDAVFN.mjs → chunk-HK7DVTEF.mjs} +237 -95
  87. package/dist/{chunk-6C4NLBLB.mjs → chunk-JZ64GVIB.mjs} +1 -1
  88. package/dist/{chunk-3UMDVJRN.mjs → chunk-NBMXEVHL.mjs} +4 -1
  89. package/dist/{chunk-TVJL7QIG.cjs → chunk-OGEL4Z4S.cjs} +8 -1
  90. package/dist/{chunk-HRU3KOE5.mjs → chunk-OORQCSVA.mjs} +5 -3
  91. package/dist/{chunk-7RJYOVQU.mjs → chunk-R7NS42KQ.mjs} +5 -2
  92. package/dist/{chunk-I2CGNAP2.cjs → chunk-SCK5U362.cjs} +1390 -1388
  93. package/dist/{chunk-DWEQWFQU.mjs → chunk-SCTM27HK.mjs} +229 -227
  94. package/dist/{chunk-PDZ4GQLI.mjs → chunk-UVYWAI4M.mjs} +1 -1
  95. package/dist/{chunk-DXOBT2JE.mjs → chunk-UZWV2HAJ.mjs} +8 -2
  96. package/dist/{chunk-IETFPVLN.cjs → chunk-XTUX5RMG.cjs} +15 -12
  97. package/dist/diagram/drawing.d.ts.map +1 -1
  98. package/dist/diagram/index.cjs +1218 -592
  99. package/dist/diagram/index.mjs +1218 -592
  100. package/dist/diagram/load.d.ts.map +1 -1
  101. package/dist/diagram/relationships.d.ts +1 -0
  102. package/dist/diagram/relationships.d.ts.map +1 -1
  103. package/dist/diagram/types.d.ts +2 -0
  104. package/dist/diagram/types.d.ts.map +1 -1
  105. package/dist/docx/diagram.d.ts.map +1 -1
  106. package/dist/docx/drawing.d.ts.map +1 -1
  107. package/dist/docx/embedded.cjs +1850 -1138
  108. package/dist/docx/embedded.mjs +1850 -1138
  109. package/dist/docx/index.cjs +3312 -1713
  110. package/dist/docx/index.mjs +3312 -1713
  111. package/dist/docx/layout/adapter.d.ts.map +1 -1
  112. package/dist/docx/layout/fonts.d.ts +1 -1
  113. package/dist/docx/layout/fonts.d.ts.map +1 -1
  114. package/dist/docx/layout/index.cjs +1933 -518
  115. package/dist/docx/layout/index.mjs +1933 -518
  116. package/dist/docx/layout/script-fonts.d.ts +6 -0
  117. package/dist/docx/layout/script-fonts.d.ts.map +1 -0
  118. package/dist/docx/load/index.cjs +1853 -1141
  119. package/dist/docx/load/index.mjs +1853 -1141
  120. package/dist/docx/parse.d.ts.map +1 -1
  121. package/dist/docx/shape-model.d.ts +2 -0
  122. package/dist/docx/shape-model.d.ts.map +1 -1
  123. package/dist/docx/shape-parse.d.ts.map +1 -1
  124. package/dist/docx/shape-svg.d.ts.map +1 -1
  125. package/dist/docx/ui/index.cjs +1763 -593
  126. package/dist/docx/ui/index.mjs +1763 -593
  127. package/dist/docx/write-shape.d.ts.map +1 -1
  128. package/dist/drawingml/custom-geometry.d.ts +5 -0
  129. package/dist/drawingml/custom-geometry.d.ts.map +1 -0
  130. package/dist/drawingml/drawing-fill.d.ts.map +1 -1
  131. package/dist/drawingml/drawing-geometry.d.ts.map +1 -1
  132. package/dist/drawingml/image-content-type.d.ts +2 -0
  133. package/dist/drawingml/image-content-type.d.ts.map +1 -0
  134. package/dist/drawingml/index.cjs +1128 -179
  135. package/dist/drawingml/index.d.ts +9 -0
  136. package/dist/drawingml/index.d.ts.map +1 -1
  137. package/dist/drawingml/index.mjs +1110 -180
  138. package/dist/drawingml/path-data.d.ts +4 -0
  139. package/dist/drawingml/path-data.d.ts.map +1 -0
  140. package/dist/drawingml/picture-crop.d.ts +8 -0
  141. package/dist/drawingml/picture-crop.d.ts.map +1 -0
  142. package/dist/drawingml/picture-effects.d.ts +37 -0
  143. package/dist/drawingml/picture-effects.d.ts.map +1 -0
  144. package/dist/drawingml/picture-fill.d.ts +7 -0
  145. package/dist/drawingml/picture-fill.d.ts.map +1 -0
  146. package/dist/drawingml/read-3d-values.d.ts +8 -0
  147. package/dist/drawingml/read-3d-values.d.ts.map +1 -0
  148. package/dist/drawingml/read-text-3d.d.ts +8 -0
  149. package/dist/drawingml/read-text-3d.d.ts.map +1 -0
  150. package/dist/drawingml/read-text-body.d.ts.map +1 -1
  151. package/dist/drawingml/scene3d-coordinate.d.ts +45 -0
  152. package/dist/drawingml/scene3d-coordinate.d.ts.map +1 -0
  153. package/dist/drawingml/scene3d-presets.d.ts +12 -0
  154. package/dist/drawingml/scene3d-presets.d.ts.map +1 -0
  155. package/dist/drawingml/text-3d-model.d.ts +71 -0
  156. package/dist/drawingml/text-3d-model.d.ts.map +1 -0
  157. package/dist/drawingml/text-model.d.ts +3 -0
  158. package/dist/drawingml/text-model.d.ts.map +1 -1
  159. package/dist/drawingml/types.d.ts +3 -0
  160. package/dist/drawingml/types.d.ts.map +1 -1
  161. package/dist/drawingml/write-pattern-picture.d.ts.map +1 -1
  162. package/dist/drawingml/write-text-3d.d.ts +6 -0
  163. package/dist/drawingml/write-text-3d.d.ts.map +1 -0
  164. package/dist/drawingml/write-text-body.d.ts.map +1 -1
  165. package/dist/geometry/element-transform.d.ts +3 -0
  166. package/dist/geometry/element-transform.d.ts.map +1 -1
  167. package/dist/geometry/index.cjs +69 -4
  168. package/dist/geometry/index.d.ts +2 -0
  169. package/dist/geometry/index.d.ts.map +1 -1
  170. package/dist/geometry/index.mjs +66 -5
  171. package/dist/geometry/picture-crop.d.ts +21 -0
  172. package/dist/geometry/picture-crop.d.ts.map +1 -0
  173. package/dist/geometry/resize-aspect.d.ts +12 -0
  174. package/dist/geometry/resize-aspect.d.ts.map +1 -0
  175. package/dist/index.cjs +4201 -2058
  176. package/dist/index.mjs +4201 -2058
  177. package/dist/opc/index.cjs +9 -6
  178. package/dist/opc/index.mjs +9 -6
  179. package/dist/opc/safe-href.d.ts +10 -3
  180. package/dist/opc/safe-href.d.ts.map +1 -1
  181. package/dist/pptx/automation/index.cjs +615 -360
  182. package/dist/pptx/automation/index.d.ts +6 -6
  183. package/dist/pptx/automation/index.mjs +5 -5
  184. package/dist/pptx/chunks/{elements-CCEghtE_.d.ts → elements-mSCZ84Tc.d.ts} +4 -4
  185. package/dist/pptx/chunks/elements-mSCZ84Tc.d.ts.map +1 -0
  186. package/dist/pptx/chunks/{index-D90lhgiE.d.ts → index-BQDcu_0a.d.ts} +19 -111
  187. package/dist/pptx/chunks/index-BQDcu_0a.d.ts.map +1 -0
  188. package/dist/pptx/chunks/{index-CmnbpSCL.d.ts → index-CBV1oHN7.d.ts} +5 -5
  189. package/dist/pptx/chunks/{index-CmnbpSCL.d.ts.map → index-CBV1oHN7.d.ts.map} +1 -1
  190. package/dist/pptx/chunks/{index-DJIPX0Ge.d.ts → index-PdM5zpmu.d.ts} +5 -5
  191. package/dist/pptx/chunks/{index-DJIPX0Ge.d.ts.map → index-PdM5zpmu.d.ts.map} +1 -1
  192. package/dist/pptx/chunks/{smart-art-BLBSej3J.d.ts → smart-art-DLumQo90.d.ts} +135 -103
  193. package/dist/pptx/chunks/smart-art-DLumQo90.d.ts.map +1 -0
  194. package/dist/pptx/chunks/{text-D49FKllA.d.ts → text-P9xVnXXf.d.ts} +49 -60
  195. package/dist/pptx/chunks/text-P9xVnXXf.d.ts.map +1 -0
  196. package/dist/pptx/chunks/{text-operations-DZ1IgDJN.d.ts → text-operations-hyPODwIQ.d.ts} +4 -4
  197. package/dist/pptx/chunks/{text-operations-DZ1IgDJN.d.ts.map → text-operations-hyPODwIQ.d.ts.map} +1 -1
  198. package/dist/pptx/cli/index.cjs +611 -356
  199. package/dist/pptx/cli/index.d.ts +1 -1
  200. package/dist/pptx/cli/index.mjs +4 -4
  201. package/dist/pptx/converter/index.cjs +102 -67
  202. package/dist/pptx/converter/index.d.ts +1 -1
  203. package/dist/pptx/converter/index.mjs +2 -2
  204. package/dist/pptx/editor/render/collaboration-assets.cjs +15 -11
  205. package/dist/pptx/editor/render/collaboration-assets.d.ts +2 -2
  206. package/dist/pptx/editor/render/collaboration-assets.mjs +1 -1
  207. package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +5 -5
  208. package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +3 -3
  209. package/dist/pptx/editor/render/collaboration-reconcile.cjs +9 -9
  210. package/dist/pptx/editor/render/collaboration-reconcile.d.ts.map +1 -1
  211. package/dist/pptx/editor/render/collaboration-reconcile.mjs +3 -3
  212. package/dist/pptx/editor/render/collaboration-sync.cjs +29 -25
  213. package/dist/pptx/editor/render/collaboration-sync.d.ts +7 -0
  214. package/dist/pptx/editor/render/collaboration-sync.d.ts.map +1 -1
  215. package/dist/pptx/editor/render/collaboration-sync.mjs +2 -2
  216. package/dist/pptx/editor/render/find-replace.cjs +14 -14
  217. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  218. package/dist/pptx/editor/render/find-replace.mjs +1 -1
  219. package/dist/pptx/editor/render/font-family-update.d.ts +1 -1
  220. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +1 -1
  221. package/dist/pptx/editor/render/slide-operations.cjs +8 -8
  222. package/dist/pptx/editor/render/slide-operations.mjs +2 -2
  223. package/dist/pptx/editor/render/table-cell-edit.cjs +8 -4
  224. package/dist/pptx/editor/render/table-cell-edit.d.ts +5 -0
  225. package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
  226. package/dist/pptx/editor/render/table-cell-edit.mjs +1 -1
  227. package/dist/pptx/editor/render/table-cell-merge.cjs +3 -3
  228. package/dist/pptx/editor/render/table-cell-merge.mjs +1 -1
  229. package/dist/pptx/editor/render/table-data-grid-ops.cjs +2 -2
  230. package/dist/pptx/editor/render/table-data-grid-ops.mjs +1 -1
  231. package/dist/pptx/editor/render/table-merge.cjs +5 -5
  232. package/dist/pptx/editor/render/table-merge.mjs +1 -1
  233. package/dist/pptx/editor/render/text-content-style.d.ts +1 -1
  234. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +2 -2
  235. package/dist/pptx/editor/render/text-style-scope.d.ts +2 -2
  236. package/dist/pptx/editor/render/update-text-segment-style.d.ts +1 -1
  237. package/dist/pptx/index.cjs +677 -418
  238. package/dist/pptx/index.d.ts +8 -8
  239. package/dist/pptx/index.mjs +5 -5
  240. package/dist/pptx/node/index.d.ts +1 -1
  241. package/dist/pptx/smartart-layouts/index.d.ts +1 -1
  242. package/dist/teams/index.cjs +1816 -1049
  243. package/dist/teams/index.mjs +1816 -1049
  244. package/dist/text/font-style-name.d.ts +11 -0
  245. package/dist/text/font-style-name.d.ts.map +1 -0
  246. package/dist/text/font-substitution-map.d.ts +3 -0
  247. package/dist/text/font-substitution-map.d.ts.map +1 -0
  248. package/dist/text/font-substitution.d.ts +34 -0
  249. package/dist/text/font-substitution.d.ts.map +1 -0
  250. package/dist/text/index.cjs +460 -0
  251. package/dist/text/index.d.ts +3 -0
  252. package/dist/text/index.d.ts.map +1 -1
  253. package/dist/text/index.mjs +443 -1
  254. package/dist/text/metric-font-family.d.ts +7 -0
  255. package/dist/text/metric-font-family.d.ts.map +1 -0
  256. package/dist/text/panose.d.ts +55 -0
  257. package/dist/text/panose.d.ts.map +1 -0
  258. package/dist/text/script-fonts.d.ts +26 -0
  259. package/dist/text/script-fonts.d.ts.map +1 -0
  260. package/dist/visio/edit-geometry-admission.d.ts +1 -1
  261. package/dist/visio/edit-geometry-admission.d.ts.map +1 -1
  262. package/dist/visio/edit-group-resize.d.ts +26 -0
  263. package/dist/visio/edit-group-resize.d.ts.map +1 -0
  264. package/dist/visio/edit-recalculate-index.d.ts +2 -0
  265. package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
  266. package/dist/visio/edit-resize-anchor.d.ts.map +1 -1
  267. package/dist/visio/edit-resize-plan.d.ts +14 -0
  268. package/dist/visio/edit-resize-plan.d.ts.map +1 -0
  269. package/dist/visio/edit-scope.d.ts.map +1 -1
  270. package/dist/visio/index.cjs +1326 -389
  271. package/dist/visio/index.mjs +1326 -389
  272. package/dist/visio/ui/geometry-expectation.d.ts +17 -0
  273. package/dist/visio/ui/geometry-expectation.d.ts.map +1 -0
  274. package/dist/visio/ui/guides.d.ts +2 -0
  275. package/dist/visio/ui/guides.d.ts.map +1 -1
  276. package/dist/visio/ui/index.cjs +1582 -411
  277. package/dist/visio/ui/index.d.ts +2 -0
  278. package/dist/visio/ui/index.d.ts.map +1 -1
  279. package/dist/visio/ui/index.mjs +1579 -412
  280. package/dist/visio/ui/selection-resize.d.ts +19 -0
  281. package/dist/visio/ui/selection-resize.d.ts.map +1 -0
  282. package/dist/visio/ui/shape-move.d.ts +1 -1
  283. package/dist/visio/ui/shape-move.d.ts.map +1 -1
  284. package/dist/visio/ui/shape-resize.d.ts.map +1 -1
  285. package/dist/xlsx/edit/drawings.d.ts +5 -0
  286. package/dist/xlsx/edit/drawings.d.ts.map +1 -1
  287. package/dist/xlsx/edit/session.d.ts.map +1 -1
  288. package/dist/xlsx/edit/types.d.ts +4 -0
  289. package/dist/xlsx/edit/types.d.ts.map +1 -1
  290. package/dist/xlsx/index.cjs +3908 -2256
  291. package/dist/xlsx/index.mjs +3908 -2256
  292. package/dist/xlsx/layout/chart-view.d.ts.map +1 -1
  293. package/dist/xlsx/load/index.cjs +2003 -1239
  294. package/dist/xlsx/load/index.mjs +2003 -1239
  295. package/dist/xlsx/model.d.ts +4 -0
  296. package/dist/xlsx/model.d.ts.map +1 -1
  297. package/dist/xlsx/read/chart.d.ts.map +1 -1
  298. package/dist/xlsx/read/drawing.d.ts.map +1 -1
  299. package/dist/xlsx/read/smart-art.d.ts.map +1 -1
  300. package/dist/xlsx/ui/index.cjs +3880 -2228
  301. package/dist/xlsx/ui/index.mjs +3880 -2228
  302. package/dist/xlsx/write/drawing.d.ts.map +1 -1
  303. package/package.json +1 -1
  304. package/dist/PptxHandler-DSXSXMEG.mjs +0 -4
  305. package/dist/pptx/chunks/elements-CCEghtE_.d.ts.map +0 -1
  306. package/dist/pptx/chunks/index-D90lhgiE.d.ts.map +0 -1
  307. package/dist/pptx/chunks/smart-art-BLBSej3J.d.ts.map +0 -1
  308. package/dist/pptx/chunks/text-D49FKllA.d.ts.map +0 -1
@@ -45472,32 +45472,6 @@ var init_hierarchy = __esm({
45472
45472
  }
45473
45473
  });
45474
45474
 
45475
- // drawingml/dom.ts
45476
- function attributeReader(element2) {
45477
- return (name) => {
45478
- if (!element2) return void 0;
45479
- const direct = element2.getAttribute(name);
45480
- if (direct !== null) return direct;
45481
- const attributes3 = element2.attributes;
45482
- for (let index = 0; index < attributes3.length; index++) {
45483
- const candidate = attributes3.item(index);
45484
- if (candidate && candidate.localName === name) return candidate.value;
45485
- }
45486
- return void 0;
45487
- };
45488
- }
45489
- function booleanAttribute(element2, name) {
45490
- const value = attributeReader(element2)(name)?.trim().toLowerCase();
45491
- if (value === "1" || value === "true") return true;
45492
- if (value === "0" || value === "false") return false;
45493
- return void 0;
45494
- }
45495
- var init_dom = __esm({
45496
- "drawingml/dom.ts"() {
45497
- init_xml2();
45498
- }
45499
- });
45500
-
45501
45475
  // color/contrast.ts
45502
45476
  var init_contrast = __esm({
45503
45477
  "color/contrast.ts"() {
@@ -45540,6 +45514,32 @@ var init_color2 = __esm({
45540
45514
  init_theme_palette();
45541
45515
  }
45542
45516
  });
45517
+
45518
+ // drawingml/dom.ts
45519
+ function attributeReader(element2) {
45520
+ return (name) => {
45521
+ if (!element2) return void 0;
45522
+ const direct = element2.getAttribute(name);
45523
+ if (direct !== null) return direct;
45524
+ const attributes3 = element2.attributes;
45525
+ for (let index = 0; index < attributes3.length; index++) {
45526
+ const candidate = attributes3.item(index);
45527
+ if (candidate && candidate.localName === name) return candidate.value;
45528
+ }
45529
+ return void 0;
45530
+ };
45531
+ }
45532
+ function booleanAttribute(element2, name) {
45533
+ const value = attributeReader(element2)(name)?.trim().toLowerCase();
45534
+ if (value === "1" || value === "true") return true;
45535
+ if (value === "0" || value === "false") return false;
45536
+ return void 0;
45537
+ }
45538
+ var init_dom = __esm({
45539
+ "drawingml/dom.ts"() {
45540
+ init_xml2();
45541
+ }
45542
+ });
45543
45543
  var init_ordered_color_transforms = __esm({
45544
45544
  "drawingml/ordered-color-transforms.ts"() {
45545
45545
  init_color2();
@@ -45713,6 +45713,354 @@ var init_drawing_color = __esm({
45713
45713
  }
45714
45714
  });
45715
45715
 
45716
+ // drawingml/scene3d-presets.ts
45717
+ var CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS;
45718
+ var init_scene3d_presets = __esm({
45719
+ "drawingml/scene3d-presets.ts"() {
45720
+ CAMERA_PRESETS = /* @__PURE__ */ new Set([
45721
+ "legacyObliqueTopLeft",
45722
+ "legacyObliqueTop",
45723
+ "legacyObliqueTopRight",
45724
+ "legacyObliqueLeft",
45725
+ "legacyObliqueFront",
45726
+ "legacyObliqueRight",
45727
+ "legacyObliqueBottomLeft",
45728
+ "legacyObliqueBottom",
45729
+ "legacyObliqueBottomRight",
45730
+ "legacyPerspectiveTopLeft",
45731
+ "legacyPerspectiveTop",
45732
+ "legacyPerspectiveTopRight",
45733
+ "legacyPerspectiveLeft",
45734
+ "legacyPerspectiveFront",
45735
+ "legacyPerspectiveRight",
45736
+ "legacyPerspectiveBottomLeft",
45737
+ "legacyPerspectiveBottom",
45738
+ "legacyPerspectiveBottomRight",
45739
+ "orthographicFront",
45740
+ "isometricTopUp",
45741
+ "isometricTopDown",
45742
+ "isometricBottomUp",
45743
+ "isometricBottomDown",
45744
+ "isometricLeftUp",
45745
+ "isometricLeftDown",
45746
+ "isometricRightUp",
45747
+ "isometricRightDown",
45748
+ "isometricOffAxis1Left",
45749
+ "isometricOffAxis1Right",
45750
+ "isometricOffAxis1Top",
45751
+ "isometricOffAxis2Left",
45752
+ "isometricOffAxis2Right",
45753
+ "isometricOffAxis2Top",
45754
+ "isometricOffAxis3Left",
45755
+ "isometricOffAxis3Right",
45756
+ "isometricOffAxis3Bottom",
45757
+ "isometricOffAxis4Left",
45758
+ "isometricOffAxis4Right",
45759
+ "isometricOffAxis4Bottom",
45760
+ "obliqueTopLeft",
45761
+ "obliqueTop",
45762
+ "obliqueTopRight",
45763
+ "obliqueLeft",
45764
+ "obliqueRight",
45765
+ "obliqueBottomLeft",
45766
+ "obliqueBottom",
45767
+ "obliqueBottomRight",
45768
+ "perspectiveFront",
45769
+ "perspectiveLeft",
45770
+ "perspectiveRight",
45771
+ "perspectiveAbove",
45772
+ "perspectiveBelow",
45773
+ "perspectiveAboveLeftFacing",
45774
+ "perspectiveAboveRightFacing",
45775
+ "perspectiveContrastingLeftFacing",
45776
+ "perspectiveContrastingRightFacing",
45777
+ "perspectiveHeroicLeftFacing",
45778
+ "perspectiveHeroicRightFacing",
45779
+ "perspectiveHeroicExtremeLeftFacing",
45780
+ "perspectiveHeroicExtremeRightFacing",
45781
+ "perspectiveRelaxed",
45782
+ "perspectiveRelaxedModerately"
45783
+ ]);
45784
+ LIGHT_RIGS = /* @__PURE__ */ new Set([
45785
+ "legacyFlat1",
45786
+ "legacyFlat2",
45787
+ "legacyFlat3",
45788
+ "legacyFlat4",
45789
+ "legacyNormal1",
45790
+ "legacyNormal2",
45791
+ "legacyNormal3",
45792
+ "legacyNormal4",
45793
+ "legacyHarsh1",
45794
+ "legacyHarsh2",
45795
+ "legacyHarsh3",
45796
+ "legacyHarsh4",
45797
+ "threePt",
45798
+ "balanced",
45799
+ "soft",
45800
+ "harsh",
45801
+ "flood",
45802
+ "contrasting",
45803
+ "morning",
45804
+ "sunrise",
45805
+ "sunset",
45806
+ "chilly",
45807
+ "freezing",
45808
+ "flat",
45809
+ "twoPt",
45810
+ "glow",
45811
+ "brightRoom"
45812
+ ]);
45813
+ LIGHT_DIRECTIONS = /* @__PURE__ */ new Set(["tl", "t", "tr", "l", "r", "bl", "b", "br"]);
45814
+ }
45815
+ });
45816
+
45817
+ // drawingml/picture-effects.ts
45818
+ function picturePercentage(value) {
45819
+ const text2 = String(value ?? "").trim();
45820
+ if (!text2) return void 0;
45821
+ const percent = text2.endsWith("%");
45822
+ const n = Number(percent ? text2.slice(0, -1) : text2) / (percent ? 100 : 1e5);
45823
+ return Number.isFinite(n) ? n : void 0;
45824
+ }
45825
+ function readPictureEffect(name, attribute7) {
45826
+ if (name === "grayscl") return { kind: "grayscale" };
45827
+ if (name === "lum") {
45828
+ const brightness = picturePercentage(attribute7("bright"));
45829
+ const contrast = picturePercentage(attribute7("contrast"));
45830
+ for (const [name2, value] of [
45831
+ ["bright", brightness],
45832
+ ["contrast", contrast]
45833
+ ]) {
45834
+ const raw2 = attribute7(name2);
45835
+ if (raw2 !== void 0 && raw2 !== null && (value === void 0 || Math.abs(value) > 1))
45836
+ return void 0;
45837
+ }
45838
+ return {
45839
+ kind: "luminance",
45840
+ ...brightness !== void 0 ? { brightness } : {},
45841
+ ...contrast !== void 0 ? { contrast } : {}
45842
+ };
45843
+ }
45844
+ if (name === "alphaModFix") {
45845
+ const raw2 = attribute7("amt");
45846
+ const amount = raw2 === void 0 || raw2 === null ? 1 : picturePercentage(raw2);
45847
+ if (amount !== void 0 && amount >= 0) return { kind: "alphaModFix", amount };
45848
+ }
45849
+ return void 0;
45850
+ }
45851
+ function parsePictureEffects(blip) {
45852
+ if (!blip) return [];
45853
+ return elements(blip).map((node) => ({
45854
+ ...(node.namespaceURI === NS.a ? readPictureEffect(node.localName, (name) => node.getAttribute(name)) : void 0) ?? { kind: "unsupported", name: node.localName },
45855
+ sourceXml: buildXml(node)
45856
+ }));
45857
+ }
45858
+ function applyPictureEffects(blip, effects2) {
45859
+ if (JSON.stringify(parsePictureEffects(blip)) === JSON.stringify(effects2)) return;
45860
+ const nodes = effects2.map((effect) => {
45861
+ const name = effect.kind === "grayscale" ? "grayscl" : effect.kind === "luminance" ? "lum" : effect.kind === "unsupported" ? effect.name : effect.kind;
45862
+ const source = effect.sourceXml ? parseXml(effect.sourceXml).documentElement : void 0;
45863
+ if (effect.kind === "unsupported" && !source)
45864
+ throw new Error("An unsupported picture effect needs source XML");
45865
+ const node = source ? blip.ownerDocument.importNode(source, true) : blip.ownerDocument.createElementNS(NS.a, `a:${name}`);
45866
+ if (effect.kind !== "unsupported" && (node.namespaceURI !== NS.a || node.localName !== name))
45867
+ throw new Error("Picture effect source does not match its kind");
45868
+ const set2 = (name2, value) => {
45869
+ const original = picturePercentage(node.getAttribute(name2));
45870
+ if (value === void 0) node.removeAttribute(name2);
45871
+ else if (value !== original) {
45872
+ if (!Number.isFinite(value)) throw new RangeError("Picture effect must be finite");
45873
+ node.setAttribute(name2, String(Math.round(value * 1e5)));
45874
+ }
45875
+ };
45876
+ if (effect.kind === "luminance") {
45877
+ if ([effect.brightness, effect.contrast].some(
45878
+ (value) => value !== void 0 && (!Number.isFinite(value) || Math.abs(value) > 1)
45879
+ ))
45880
+ throw new RangeError("Picture luminance must be between -1 and 1");
45881
+ set2("bright", effect.brightness);
45882
+ set2("contrast", effect.contrast);
45883
+ }
45884
+ if (effect.kind === "alphaModFix") {
45885
+ if (effect.amount < 0) throw new RangeError("Picture alpha must be nonnegative");
45886
+ set2("amt", effect.amount);
45887
+ }
45888
+ return node;
45889
+ });
45890
+ for (const node of elements(blip)) blip.removeChild(node);
45891
+ for (const node of nodes) blip.appendChild(node);
45892
+ }
45893
+ var init_picture_effects = __esm({
45894
+ "drawingml/picture-effects.ts"() {
45895
+ init_xml2();
45896
+ }
45897
+ });
45898
+
45899
+ // drawingml/read-3d-values.ts
45900
+ function readScene3DValues(node, read) {
45901
+ const out = {};
45902
+ const camera = read.child(node, "camera");
45903
+ const light = read.child(node, "lightRig");
45904
+ for (const [key2, source, attribute7, choices] of [
45905
+ ["cameraPreset", camera, "prst", CAMERA_PRESETS],
45906
+ ["lightRigType", light, "rig", LIGHT_RIGS],
45907
+ ["lightRigDirection", light, "dir", LIGHT_DIRECTIONS]
45908
+ ]) {
45909
+ const token2 = String(read.attribute(source, attribute7) ?? "").trim();
45910
+ if (choices.has(token2)) out[key2] = token2;
45911
+ }
45912
+ const fov = integer(read.attribute(camera, "fov"));
45913
+ if (fov !== void 0 && fov >= 0 && fov <= 108e5) out.cameraFieldOfView = fov;
45914
+ const zoom = picturePercentage(read.attribute(camera, "zoom"));
45915
+ if (zoom !== void 0 && zoom > 0) out.cameraZoom = zoom;
45916
+ for (const [prefix, source] of [
45917
+ ["camera", camera],
45918
+ ["lightRig", light]
45919
+ ]) {
45920
+ const rot = read.child(source, "rot");
45921
+ for (const [axis, key2] of [
45922
+ ["lat", "RotX"],
45923
+ ["lon", "RotY"],
45924
+ ["rev", "RotZ"]
45925
+ ]) {
45926
+ const value = integer(read.attribute(rot, axis));
45927
+ if (value !== void 0 && value >= 0 && value < 216e5) out[`${prefix}${key2}`] = value;
45928
+ }
45929
+ }
45930
+ const backdrop = read.child(node, "backdrop");
45931
+ if (backdrop !== void 0) {
45932
+ out.hasBackdrop = true;
45933
+ for (const [name, prefix, attr6] of [
45934
+ ["anchor", "backdropAnchor", ""],
45935
+ ["norm", "backdropNormal", "d"],
45936
+ ["up", "backdropUp", "d"]
45937
+ ]) {
45938
+ const point2 = read.child(backdrop, name);
45939
+ for (const [axis, suffix] of [
45940
+ ["x", "X"],
45941
+ ["y", "Y"],
45942
+ ["z", "Z"]
45943
+ ]) {
45944
+ const value = integer(read.attribute(point2, `${attr6}${axis}`));
45945
+ if (value !== void 0) out[`${prefix}${suffix}`] = value;
45946
+ }
45947
+ }
45948
+ }
45949
+ return out;
45950
+ }
45951
+ function readText3DValues(node, read) {
45952
+ const out = {};
45953
+ for (const [key2, attribute7] of [
45954
+ ["extrusionHeight", "extrusionH"],
45955
+ ["contourWidth", "contourW"],
45956
+ ["z", "z"]
45957
+ ]) {
45958
+ const value = integer(read.attribute(node, attribute7));
45959
+ if (value !== void 0) out[key2] = value;
45960
+ }
45961
+ const material = String(read.attribute(node, "prstMaterial") ?? "").trim();
45962
+ if (material) out.presetMaterial = material;
45963
+ for (const [name, prefix] of [
45964
+ ["bevelT", "bevelTop"],
45965
+ ["bevelB", "bevelBottom"]
45966
+ ]) {
45967
+ const bevel2 = read.child(node, name);
45968
+ if (!bevel2) continue;
45969
+ out[`${prefix}Type`] = String(read.attribute(bevel2, "prst") || "circle").trim();
45970
+ for (const [attribute7, suffix] of [
45971
+ ["w", "Width"],
45972
+ ["h", "Height"]
45973
+ ]) {
45974
+ const value = integer(read.attribute(bevel2, attribute7));
45975
+ if (value !== void 0) out[`${prefix}${suffix}`] = value;
45976
+ }
45977
+ }
45978
+ return out;
45979
+ }
45980
+ var integer;
45981
+ var init_read_3d_values = __esm({
45982
+ "drawingml/read-3d-values.ts"() {
45983
+ init_scene3d_presets();
45984
+ init_picture_effects();
45985
+ integer = (value) => {
45986
+ if (value === void 0 || value === null || String(value).trim() === "") return void 0;
45987
+ const n = Number(value);
45988
+ return Number.isSafeInteger(n) ? n : void 0;
45989
+ };
45990
+ }
45991
+ });
45992
+
45993
+ // drawingml/picture-crop.ts
45994
+ function parsePictureCrop(blipFill) {
45995
+ const rect2 = first(blipFill, "srcRect", NS.a);
45996
+ if (!rect2) return void 0;
45997
+ const result = {};
45998
+ for (const [attr6, key2] of Object.entries(SIDES2)) {
45999
+ const raw2 = rect2.getAttribute(attr6);
46000
+ if (raw2 === null || !raw2.trim()) continue;
46001
+ const percent = raw2.endsWith("%");
46002
+ const value = Number(percent ? raw2.slice(0, -1) : raw2) / (percent ? 100 : 1e5);
46003
+ if (Number.isFinite(value)) result[key2] = value;
46004
+ }
46005
+ return result;
46006
+ }
46007
+ function applyPictureCrop(blipFill, crop) {
46008
+ let rect2 = first(blipFill, "srcRect", NS.a);
46009
+ if (!rect2 && crop && Object.values(crop).some((value) => value !== void 0)) {
46010
+ rect2 = blipFill.ownerDocument.createElementNS(NS.a, "a:srcRect");
46011
+ const blip = first(blipFill, "blip", NS.a);
46012
+ blipFill.insertBefore(rect2, blip?.nextSibling ?? blipFill.firstChild);
46013
+ }
46014
+ if (!rect2) return;
46015
+ for (const [attr6, key2] of Object.entries(SIDES2)) {
46016
+ const value = crop?.[key2];
46017
+ if (value === void 0) rect2.removeAttribute(attr6);
46018
+ else {
46019
+ if (!Number.isFinite(value)) throw new RangeError("Picture crop must be finite");
46020
+ rect2.setAttribute(attr6, String(Math.round(value * 1e5)));
46021
+ }
46022
+ }
46023
+ }
46024
+ var SIDES2;
46025
+ var init_picture_crop = __esm({
46026
+ "drawingml/picture-crop.ts"() {
46027
+ init_dom();
46028
+ SIDES2 = { l: "cropLeft", t: "cropTop", r: "cropRight", b: "cropBottom" };
46029
+ }
46030
+ });
46031
+
46032
+ // drawingml/picture-fill.ts
46033
+ function parseDrawingPictureFill(fill3) {
46034
+ const blip = first(fill3, "blip", NS.a);
46035
+ const relId = blip?.getAttributeNS(NS.r, "embed") || blip?.getAttribute("r:embed") || void 0;
46036
+ const linkRelId = blip?.getAttributeNS(NS.r, "link") || void 0;
46037
+ const crop = parsePictureCrop(fill3);
46038
+ const effects2 = parsePictureEffects(blip);
46039
+ const tile = first(fill3, "tile", NS.a);
46040
+ const rect2 = first(first(fill3, "stretch", NS.a), "fillRect", NS.a);
46041
+ const unsupported2 = [
46042
+ ...tile ? ["tile"] : [],
46043
+ ...rect2 && ["l", "t", "r", "b"].some((key2) => Number(rect2.getAttribute(key2) ?? 0) !== 0) ? ["fillRect"] : [],
46044
+ ...fill3.getAttribute("rotWithShape") === "0" || fill3.getAttribute("rotWithShape") === "false" ? ["rotWithShape"] : []
46045
+ ];
46046
+ return {
46047
+ kind: "picture",
46048
+ sourceXml: buildXml(fill3),
46049
+ ...relId ? { relId } : {},
46050
+ ...linkRelId ? { linkRelId } : {},
46051
+ ...crop ? { crop } : {},
46052
+ ...effects2.length ? { effects: effects2 } : {},
46053
+ ...unsupported2.length ? { unsupportedPicture: unsupported2 } : {}
46054
+ };
46055
+ }
46056
+ var init_picture_fill = __esm({
46057
+ "drawingml/picture-fill.ts"() {
46058
+ init_xml2();
46059
+ init_picture_crop();
46060
+ init_picture_effects();
46061
+ }
46062
+ });
46063
+
45716
46064
  // drawingml/drawing-fill.ts
45717
46065
  function fillElementOf(properties) {
45718
46066
  return properties ? elements(properties).find(
@@ -45775,17 +46123,8 @@ function parseDrawingFill(properties) {
45775
46123
  ...background ? { background } : {}
45776
46124
  };
45777
46125
  }
45778
- case "blipFill": {
45779
- const blip = first(fill3, "blip", NS.a);
45780
- const relId = blip?.getAttributeNS(NS.r, "embed") || blip?.getAttribute("r:embed") || void 0;
45781
- const linkRelId = blip?.getAttributeNS(NS.r, "link") || void 0;
45782
- return {
45783
- kind: "picture",
45784
- sourceXml: buildXml(fill3),
45785
- ...relId ? { relId } : {},
45786
- ...linkRelId ? { linkRelId } : {}
45787
- };
45788
- }
46126
+ case "blipFill":
46127
+ return parseDrawingPictureFill(fill3);
45789
46128
  default:
45790
46129
  return { kind: "unsupported", element: fill3.localName };
45791
46130
  }
@@ -45843,6 +46182,7 @@ function drawingDashLength(value) {
45843
46182
  var FILL_ELEMENTS;
45844
46183
  var init_drawing_fill = __esm({
45845
46184
  "drawingml/drawing-fill.ts"() {
46185
+ init_picture_fill();
45846
46186
  init_drawing_color();
45847
46187
  init_dom();
45848
46188
  init_xml2();
@@ -47298,6 +47638,10 @@ function drawingPatternPictureXml(fill3) {
47298
47638
  else if (blip.getAttributeNS(NS.r, attribute7) !== value)
47299
47639
  blip.setAttributeNS(NS.r, `r:${attribute7}`, value);
47300
47640
  }
47641
+ if (fill3.crop !== void 0 && JSON.stringify(before?.kind === "picture" ? before.crop : void 0) !== JSON.stringify(fill3.crop))
47642
+ applyPictureCrop(root, fill3.crop);
47643
+ if (fill3.effects !== void 0 && JSON.stringify(before?.kind === "picture" ? before.effects ?? [] : []) !== JSON.stringify(fill3.effects ?? []))
47644
+ applyPictureEffects(blip, fill3.effects ?? []);
47301
47645
  if (!fill3.sourceXml) {
47302
47646
  const stretch = doc.createElementNS(NS.a, "a:stretch");
47303
47647
  stretch.appendChild(doc.createElementNS(NS.a, "a:fillRect"));
@@ -47308,6 +47652,8 @@ function drawingPatternPictureXml(fill3) {
47308
47652
  }
47309
47653
  var init_write_pattern_picture = __esm({
47310
47654
  "drawingml/write-pattern-picture.ts"() {
47655
+ init_picture_crop();
47656
+ init_picture_effects();
47311
47657
  init_xml2();
47312
47658
  init_patch_color();
47313
47659
  init_drawing_fill();
@@ -47724,6 +48070,26 @@ var init_drawing_effects = __esm({
47724
48070
  }
47725
48071
  });
47726
48072
 
48073
+ // drawingml/scene3d-coordinate.ts
48074
+ function roundCoordinate(value) {
48075
+ return Math.round(value);
48076
+ }
48077
+ function scaleVectorToIntegers(x, y, z) {
48078
+ const allInts = Number.isInteger(x) && Number.isInteger(y) && Number.isInteger(z);
48079
+ const scale = allInts ? 1 : FRACTIONAL_VECTOR_SCALE;
48080
+ return {
48081
+ x: Math.round(x * scale),
48082
+ y: Math.round(y * scale),
48083
+ z: Math.round(z * scale)
48084
+ };
48085
+ }
48086
+ var FRACTIONAL_VECTOR_SCALE;
48087
+ var init_scene3d_coordinate = __esm({
48088
+ "drawingml/scene3d-coordinate.ts"() {
48089
+ FRACTIONAL_VECTOR_SCALE = 1e6;
48090
+ }
48091
+ });
48092
+
47727
48093
  // drawingml/write-run-properties.ts
47728
48094
  var RUN_PROPERTIES_ORDER;
47729
48095
  var init_write_run_properties = __esm({
@@ -60824,130 +61190,10 @@ var init_zoom_utils = __esm({
60824
61190
  }
60825
61191
  });
60826
61192
 
60827
- // pptx/core/utils/font-substitution.ts
60828
- function stripFontStyleSuffix(fontName) {
60829
- let name = fontName.trim();
60830
- let stripped = false;
60831
- let previous = "";
60832
- let tokens = 0;
60833
- for (; ; ) {
60834
- const idx = name.lastIndexOf(" ");
60835
- if (idx <= 0) {
60836
- break;
60837
- }
60838
- const token2 = name.slice(idx + 1).toLowerCase().replace(/-/g, "");
60839
- const prefix = FONT_WEIGHT_PREFIX_TOKENS.has(token2) && FONT_PREFIXED_WEIGHT_TOKENS.has(previous);
60840
- if (!prefix && (tokens >= 2 || !FONT_STYLE_SUFFIX_TOKENS.has(token2))) {
60841
- break;
60842
- }
60843
- name = name.slice(0, idx).trim();
60844
- stripped = true;
60845
- previous = prefix ? "" : token2;
60846
- if (!prefix) {
60847
- tokens++;
60848
- }
60849
- }
60850
- return stripped && name.length > 0 ? name : void 0;
60851
- }
60852
- function parsePanoseString(panoseStr) {
60853
- if (!panoseStr) {
60854
- return void 0;
60855
- }
60856
- const cleaned = panoseStr.trim();
60857
- if (cleaned.length !== 20) {
60858
- return void 0;
60859
- }
60860
- if (!/^[0-9a-fA-F]{20}$/.test(cleaned)) {
60861
- return void 0;
60862
- }
60863
- const bytes = [];
60864
- for (let i2 = 0; i2 < 20; i2 += 2) {
60865
- bytes.push(parseInt(cleaned.substring(i2, i2 + 2), 16));
60866
- }
60867
- return bytes;
60868
- }
60869
- function parsePanoseBytes(data) {
60870
- if (!data || data.length !== 10) {
60871
- return void 0;
60872
- }
60873
- return Array.from(data);
60874
- }
60875
- function classifyPanose(panose) {
60876
- if (!panose || panose.length < 4) {
60877
- return "sans-serif";
60878
- }
60879
- const familyType = panose[0];
60880
- const serifStyle = panose[1];
60881
- const proportion = panose[3];
60882
- if (proportion === exports.PANOSE_MONOSPACE_PROPORTION) {
60883
- return "monospace";
60884
- }
60885
- const family = exports.PANOSE_FAMILY_MAP[familyType];
60886
- if (familyType === 2) {
60887
- if (exports.PANOSE_SANS_SERIF_STYLES.has(serifStyle)) {
60888
- return "sans-serif";
60889
- }
60890
- return "serif";
60891
- }
60892
- return family ?? "sans-serif";
60893
- }
60894
- function getPanoseWeight(panose) {
60895
- if (!panose || panose.length < 3) {
60896
- return void 0;
60897
- }
60898
- const weight = panose[2];
60899
- return exports.PANOSE_WEIGHT_MAP[weight];
60900
- }
60901
- function getSubstituteFontFamily(fontName, panose) {
60902
- const trimmed2 = fontName.trim();
60903
- if (!trimmed2) {
60904
- return "sans-serif";
60905
- }
60906
- return buildFontFamilyString(trimmed2, getSubstituteFonts(trimmed2, panose));
60907
- }
60908
- function getSubstituteFonts(fontName, panose) {
60909
- const trimmed2 = fontName.trim();
60910
- if (!trimmed2) {
60911
- return ["sans-serif"];
60912
- }
60913
- const baseName = stripFontStyleSuffix(trimmed2);
60914
- const basePrefix = baseName ? [baseName] : [];
60915
- const directSubs = exports.FONT_SUBSTITUTION_MAP[trimmed2] ?? (baseName ? exports.FONT_SUBSTITUTION_MAP[baseName] : void 0);
60916
- if (directSubs) {
60917
- return [...basePrefix, ...directSubs];
60918
- }
60919
- if (panose && panose.length >= 4) {
60920
- const genericFamily = classifyPanose(panose);
60921
- const concreteFonts = GENERIC_FAMILY_CONCRETE_FONTS[genericFamily];
60922
- if (concreteFonts) {
60923
- return [...basePrefix, ...concreteFonts];
60924
- }
60925
- }
60926
- return [...basePrefix, "sans-serif"];
60927
- }
60928
- function hasDirectSubstitution(fontName) {
60929
- return fontName.trim() in exports.FONT_SUBSTITUTION_MAP;
60930
- }
60931
- function buildFontFamilyString(primary, fallbacks) {
60932
- const parts = [quoteFontName(primary)];
60933
- for (const fb of fallbacks) {
60934
- const quoted = quoteFontName(fb);
60935
- if (!parts.includes(quoted)) {
60936
- parts.push(quoted);
60937
- }
60938
- }
60939
- return parts.join(", ");
60940
- }
60941
- function quoteFontName(name) {
60942
- const trimmed2 = name.trim();
60943
- if (CSS_GENERIC_FAMILIES.has(trimmed2.toLowerCase())) {
60944
- return trimmed2;
60945
- }
60946
- return `"${trimmed2}"`;
60947
- }
60948
- exports.FONT_SUBSTITUTION_MAP = void 0; var FONT_STYLE_SUFFIX_TOKENS, FONT_WEIGHT_PREFIX_TOKENS, FONT_PREFIXED_WEIGHT_TOKENS; exports.PANOSE_FAMILY_MAP = void 0; exports.PANOSE_SANS_SERIF_STYLES = void 0; exports.PANOSE_MONOSPACE_PROPORTION = void 0; exports.PANOSE_WEIGHT_MAP = void 0; var GENERIC_FAMILY_CONCRETE_FONTS, CSS_GENERIC_FAMILIES;
60949
- var init_font_substitution = __esm({
60950
- "pptx/core/utils/font-substitution.ts"() {
61193
+ // text/font-substitution-map.ts
61194
+ exports.FONT_SUBSTITUTION_MAP = void 0;
61195
+ var init_font_substitution_map = __esm({
61196
+ "text/font-substitution-map.ts"() {
60951
61197
  exports.FONT_SUBSTITUTION_MAP = {
60952
61198
  // Microsoft Office default fonts. The Aptos family became the Office
60953
61199
  // default and its metrics were drawn to sit close to Calibri, so falling
@@ -61108,6 +61354,37 @@ var init_font_substitution = __esm({
61108
61354
  Constantia: ["Liberation Serif", "Palatino", "serif"],
61109
61355
  Corbel: ["Liberation Sans", "Lucida Grande", "sans-serif"]
61110
61356
  };
61357
+ }
61358
+ });
61359
+
61360
+ // text/font-style-name.ts
61361
+ function stripFontStyleSuffix(fontName) {
61362
+ let name = fontName.trim();
61363
+ let stripped = false;
61364
+ let previous = "";
61365
+ let tokens = 0;
61366
+ for (; ; ) {
61367
+ const idx = name.lastIndexOf(" ");
61368
+ if (idx <= 0) {
61369
+ break;
61370
+ }
61371
+ const token2 = name.slice(idx + 1).toLowerCase().replace(/-/g, "");
61372
+ const prefix = FONT_WEIGHT_PREFIX_TOKENS.has(token2) && FONT_PREFIXED_WEIGHT_TOKENS.has(previous);
61373
+ if (!prefix && (tokens >= 2 || !FONT_STYLE_SUFFIX_TOKENS.has(token2))) {
61374
+ break;
61375
+ }
61376
+ name = name.slice(0, idx).trim();
61377
+ stripped = true;
61378
+ previous = prefix ? "" : token2;
61379
+ if (!prefix) {
61380
+ tokens++;
61381
+ }
61382
+ }
61383
+ return stripped && name.length > 0 ? name : void 0;
61384
+ }
61385
+ var FONT_STYLE_SUFFIX_TOKENS, FONT_WEIGHT_PREFIX_TOKENS, FONT_PREFIXED_WEIGHT_TOKENS;
61386
+ var init_font_style_name = __esm({
61387
+ "text/font-style-name.ts"() {
61111
61388
  FONT_STYLE_SUFFIX_TOKENS = /* @__PURE__ */ new Set([
61112
61389
  "regular",
61113
61390
  "normal",
@@ -61135,11 +61412,67 @@ var init_font_substitution = __esm({
61135
61412
  ]);
61136
61413
  FONT_WEIGHT_PREFIX_TOKENS = /* @__PURE__ */ new Set(["semi", "demi", "extra", "ultra"]);
61137
61414
  FONT_PREFIXED_WEIGHT_TOKENS = /* @__PURE__ */ new Set(["bold", "light", "black"]);
61415
+ }
61416
+ });
61417
+
61418
+ // text/panose.ts
61419
+ function parsePanoseString(panoseStr) {
61420
+ if (!panoseStr) {
61421
+ return void 0;
61422
+ }
61423
+ const cleaned = panoseStr.trim();
61424
+ if (cleaned.length !== 20) {
61425
+ return void 0;
61426
+ }
61427
+ if (!/^[0-9a-fA-F]{20}$/.test(cleaned)) {
61428
+ return void 0;
61429
+ }
61430
+ const bytes = [];
61431
+ for (let i2 = 0; i2 < 20; i2 += 2) {
61432
+ bytes.push(parseInt(cleaned.substring(i2, i2 + 2), 16));
61433
+ }
61434
+ return bytes;
61435
+ }
61436
+ function parsePanoseBytes(data) {
61437
+ if (!data || data.length !== 10) {
61438
+ return void 0;
61439
+ }
61440
+ return Array.from(data);
61441
+ }
61442
+ function classifyPanose(panose) {
61443
+ if (!panose || panose.length < 4) {
61444
+ return "sans-serif";
61445
+ }
61446
+ const familyType = panose[0] ?? 0;
61447
+ const serifStyle = panose[1] ?? 0;
61448
+ const proportion = panose[3];
61449
+ if (proportion === exports.PANOSE_MONOSPACE_PROPORTION) {
61450
+ return "monospace";
61451
+ }
61452
+ const family = exports.PANOSE_FAMILY_MAP[familyType];
61453
+ if (familyType === 2) {
61454
+ if (exports.PANOSE_SANS_SERIF_STYLES.has(serifStyle)) {
61455
+ return "sans-serif";
61456
+ }
61457
+ return "serif";
61458
+ }
61459
+ return family ?? "sans-serif";
61460
+ }
61461
+ function getPanoseWeight(panose) {
61462
+ if (!panose || panose.length < 3) {
61463
+ return void 0;
61464
+ }
61465
+ const weight = panose[2];
61466
+ return weight === void 0 ? void 0 : exports.PANOSE_WEIGHT_MAP[weight];
61467
+ }
61468
+ exports.PANOSE_FAMILY_MAP = void 0; exports.PANOSE_SANS_SERIF_STYLES = void 0; exports.PANOSE_MONOSPACE_PROPORTION = void 0; exports.PANOSE_WEIGHT_MAP = void 0;
61469
+ var init_panose = __esm({
61470
+ "text/panose.ts"() {
61138
61471
  exports.PANOSE_FAMILY_MAP = {
61139
61472
  0: "sans-serif",
61140
- // Any — default to sans-serif
61473
+ // Any - default to sans-serif
61141
61474
  1: "sans-serif",
61142
- // No Fit — default to sans-serif
61475
+ // No Fit - default to sans-serif
61143
61476
  2: "serif",
61144
61477
  // Latin Text (most serif fonts)
61145
61478
  3: "cursive",
@@ -61184,6 +61517,71 @@ var init_font_substitution = __esm({
61184
61517
  11: 900
61185
61518
  // Extra Black / Nord
61186
61519
  };
61520
+ }
61521
+ });
61522
+
61523
+ // text/font-substitution.ts
61524
+ function lookupFontSubstitutes(name) {
61525
+ return canonicalSubstitutes.get(name.trim().toLowerCase());
61526
+ }
61527
+ function getSubstituteFontFamily(fontName, panose) {
61528
+ const trimmed2 = fontName.trim();
61529
+ if (!trimmed2) {
61530
+ return "sans-serif";
61531
+ }
61532
+ return buildFontFamilyString(trimmed2, getSubstituteFonts(trimmed2, panose));
61533
+ }
61534
+ function getSubstituteFonts(fontName, panose) {
61535
+ const trimmed2 = fontName.trim();
61536
+ if (!trimmed2) {
61537
+ return ["sans-serif"];
61538
+ }
61539
+ const baseName = stripFontStyleSuffix(trimmed2);
61540
+ const basePrefix = baseName ? [baseName] : [];
61541
+ const directSubs = lookupFontSubstitutes(trimmed2) ?? (baseName ? lookupFontSubstitutes(baseName) : void 0);
61542
+ if (directSubs) {
61543
+ return [...basePrefix, ...directSubs];
61544
+ }
61545
+ if (panose && panose.length >= 4) {
61546
+ const genericFamily = classifyPanose(panose);
61547
+ const concreteFonts = GENERIC_FAMILY_CONCRETE_FONTS[genericFamily];
61548
+ if (concreteFonts) {
61549
+ return [...basePrefix, ...concreteFonts];
61550
+ }
61551
+ }
61552
+ return [...basePrefix, "sans-serif"];
61553
+ }
61554
+ function hasDirectSubstitution(fontName) {
61555
+ return lookupFontSubstitutes(fontName) !== void 0;
61556
+ }
61557
+ function buildFontFamilyString(primary, fallbacks) {
61558
+ const parts = [quoteFontName(primary)];
61559
+ for (const fb of fallbacks) {
61560
+ const quoted = quoteFontName(fb);
61561
+ if (!parts.includes(quoted)) {
61562
+ parts.push(quoted);
61563
+ }
61564
+ }
61565
+ return parts.join(", ");
61566
+ }
61567
+ function quoteFontName(name) {
61568
+ const trimmed2 = name.trim();
61569
+ if (CSS_GENERIC_FAMILIES.has(trimmed2.toLowerCase())) {
61570
+ return trimmed2;
61571
+ }
61572
+ return `"${trimmed2.replace(/["\\\r\n\f]/g, "")}"`;
61573
+ }
61574
+ var canonicalSubstitutes, GENERIC_FAMILY_CONCRETE_FONTS, CSS_GENERIC_FAMILIES;
61575
+ var init_font_substitution = __esm({
61576
+ "text/font-substitution.ts"() {
61577
+ init_font_substitution_map();
61578
+ init_font_style_name();
61579
+ init_panose();
61580
+ init_font_substitution_map();
61581
+ init_panose();
61582
+ canonicalSubstitutes = new Map(
61583
+ Object.entries(exports.FONT_SUBSTITUTION_MAP).map(([name, fonts]) => [name.toLowerCase(), fonts])
61584
+ );
61187
61585
  GENERIC_FAMILY_CONCRETE_FONTS = {
61188
61586
  serif: ["Times New Roman", "Georgia", "serif"],
61189
61587
  "sans-serif": ["Arial", "Helvetica", "sans-serif"],
@@ -61209,6 +61607,13 @@ var init_font_substitution = __esm({
61209
61607
  }
61210
61608
  });
61211
61609
 
61610
+ // pptx/core/utils/font-substitution.ts
61611
+ var init_font_substitution2 = __esm({
61612
+ "pptx/core/utils/font-substitution.ts"() {
61613
+ init_font_substitution();
61614
+ }
61615
+ });
61616
+
61212
61617
  // pptx/core/utils/pptx-validator-conformance-xml.ts
61213
61618
  function rootTag(xml) {
61214
61619
  return xml.match(/<(?!\?|!)([\w.-]+:[\w.-]+|[\w.-]+)(?:\s|\/?>)/)?.[1];
@@ -66833,22 +67238,9 @@ var init_animation_preset_catalog = __esm({
66833
67238
  });
66834
67239
 
66835
67240
  // pptx/core/utils/scene3d-coordinate.ts
66836
- function roundCoordinate(value) {
66837
- return Math.round(value);
66838
- }
66839
- function scaleVectorToIntegers(x, y, z) {
66840
- const allInts = Number.isInteger(x) && Number.isInteger(y) && Number.isInteger(z);
66841
- const scale = allInts ? 1 : FRACTIONAL_VECTOR_SCALE;
66842
- return {
66843
- x: Math.round(x * scale),
66844
- y: Math.round(y * scale),
66845
- z: Math.round(z * scale)
66846
- };
66847
- }
66848
- var FRACTIONAL_VECTOR_SCALE;
66849
- var init_scene3d_coordinate = __esm({
67241
+ var init_scene3d_coordinate2 = __esm({
66850
67242
  "pptx/core/utils/scene3d-coordinate.ts"() {
66851
- FRACTIONAL_VECTOR_SCALE = 1e6;
67243
+ init_scene3d_coordinate();
66852
67244
  }
66853
67245
  });
66854
67246
 
@@ -66936,10 +67328,10 @@ function asXml(value) {
66936
67328
  return value !== null && typeof value === "object" ? value : void 0;
66937
67329
  }
66938
67330
  function nonNegativeInteger(value) {
66939
- const parsed = integer(value);
67331
+ const parsed = integer2(value);
66940
67332
  return parsed !== void 0 && parsed >= 0 ? parsed : void 0;
66941
67333
  }
66942
- function integer(value) {
67334
+ function integer2(value) {
66943
67335
  if (value === void 0 || value === null || !/^-?\d+$/.test(String(value))) {
66944
67336
  return void 0;
66945
67337
  }
@@ -66947,11 +67339,11 @@ function integer(value) {
66947
67339
  return Number.isSafeInteger(parsed) ? parsed : void 0;
66948
67340
  }
66949
67341
  function coordinate(value) {
66950
- const parsed = integer(value);
67342
+ const parsed = integer2(value);
66951
67343
  return parsed !== void 0 && parsed >= -27273042329600 && parsed <= 27273042316900 ? parsed : void 0;
66952
67344
  }
66953
67345
  function positiveFixedAngle(value) {
66954
- const parsed = integer(value);
67346
+ const parsed = integer2(value);
66955
67347
  return parsed !== void 0 && parsed >= 0 && parsed < 216e5 ? parsed : void 0;
66956
67348
  }
66957
67349
  function parseBoolean3(value) {
@@ -67803,7 +68195,7 @@ function writeShape3d(spPr, shapeStyle) {
67803
68195
  }
67804
68196
  var init_save_shape_effects = __esm({
67805
68197
  "pptx/core/core/runtime/save-shape-effects.ts"() {
67806
- init_scene3d_coordinate();
68198
+ init_scene3d_coordinate2();
67807
68199
  init_effect_dag_containers();
67808
68200
  init_effect_list_roundtrip();
67809
68201
  init_authored_shape_style();
@@ -72344,7 +72736,7 @@ function readCommentMentions(node, authorName) {
72344
72736
  found.sort((a, b) => a.startIndex - b.startIndex);
72345
72737
  return found.length > 0 ? found : void 0;
72346
72738
  }
72347
- var mentionLocalName, mentionNodesOf, mentionChildrenNamed, MENTION_PERSON_KEYS, MENTION_LENGTH_KEYS, attribute5, integer2, readMention;
72739
+ var mentionLocalName, mentionNodesOf, mentionChildrenNamed, MENTION_PERSON_KEYS, MENTION_LENGTH_KEYS, attribute5, integer3, readMention;
72348
72740
  var init_modern_comment_mention_read = __esm({
72349
72741
  "pptx/core/utils/modern-comment-mention-read.ts"() {
72350
72742
  mentionLocalName = (key2) => key2.split(":").pop() || key2;
@@ -72382,7 +72774,7 @@ var init_modern_comment_mention_read = __esm({
72382
72774
  }
72383
72775
  return void 0;
72384
72776
  };
72385
- integer2 = (value) => {
72777
+ integer3 = (value) => {
72386
72778
  if (value === void 0) {
72387
72779
  return void 0;
72388
72780
  }
@@ -72391,8 +72783,8 @@ var init_modern_comment_mention_read = __esm({
72391
72783
  };
72392
72784
  readMention = (node, authorName, containerUri) => {
72393
72785
  const personId = attribute5(node, MENTION_PERSON_KEYS);
72394
- const startIndex = integer2(attribute5(node, ["@_startIndex"]));
72395
- const length = integer2(attribute5(node, MENTION_LENGTH_KEYS));
72786
+ const startIndex = integer3(attribute5(node, ["@_startIndex"]));
72787
+ const length = integer3(attribute5(node, MENTION_LENGTH_KEYS));
72396
72788
  if (!personId || startIndex === void 0 || length === void 0 || length === 0) {
72397
72789
  return void 0;
72398
72790
  }
@@ -72683,7 +73075,7 @@ var init_utils = __esm({
72683
73075
  init_body_properties_parser();
72684
73076
  init_linked_text_box_utils();
72685
73077
  init_zoom_utils();
72686
- init_font_substitution();
73078
+ init_font_substitution2();
72687
73079
  init_pptx_validator();
72688
73080
  init_theme_switching();
72689
73081
  init_theme_variants();
@@ -78557,7 +78949,7 @@ var init_effect_style_extractor_fill_overlay = __esm({
78557
78949
  });
78558
78950
 
78559
78951
  // pptx/core/core/builders/effect-style-extractor-reflection.ts
78560
- function integer3(value) {
78952
+ function integer4(value) {
78561
78953
  if (value === void 0 || value === null || value === "") {
78562
78954
  return void 0;
78563
78955
  }
@@ -78574,19 +78966,19 @@ function boolean2(value) {
78574
78966
  return void 0;
78575
78967
  }
78576
78968
  function fixedFraction(value) {
78577
- const parsed = integer3(value);
78969
+ const parsed = integer4(value);
78578
78970
  return parsed !== void 0 && parsed >= 0 && parsed <= 1e5 ? parsed / 1e5 : void 0;
78579
78971
  }
78580
78972
  function extractReflectionAttributes(node, emuPerPx) {
78581
- const blur = integer3(node["@_blurRad"]);
78582
- const distance = integer3(node["@_dist"]);
78583
- const startOpacity = integer3(node["@_stA"]);
78584
- const endOpacity = integer3(node["@_endA"]);
78585
- const startPosition = integer3(node["@_stPos"]);
78586
- const endPosition = integer3(node["@_endPos"]);
78587
- const direction = integer3(node["@_dir"]);
78588
- const rotation = integer3(node["@_rot"]);
78589
- const fadeDirection = integer3(node["@_fadeDir"]);
78973
+ const blur = integer4(node["@_blurRad"]);
78974
+ const distance = integer4(node["@_dist"]);
78975
+ const startOpacity = integer4(node["@_stA"]);
78976
+ const endOpacity = integer4(node["@_endA"]);
78977
+ const startPosition = integer4(node["@_stPos"]);
78978
+ const endPosition = integer4(node["@_endPos"]);
78979
+ const direction = integer4(node["@_dir"]);
78980
+ const rotation = integer4(node["@_rot"]);
78981
+ const fadeDirection = integer4(node["@_fadeDir"]);
78590
78982
  const alignment = String(node["@_algn"] ?? "").trim();
78591
78983
  return {
78592
78984
  reflectionBlurRadius: blur !== void 0 && blur >= 0 ? blur / emuPerPx : void 0,
@@ -78598,10 +78990,10 @@ function extractReflectionAttributes(node, emuPerPx) {
78598
78990
  reflectionRotation: rotation !== void 0 ? rotation / 6e4 : void 0,
78599
78991
  reflectionDistance: distance !== void 0 && distance >= 0 ? distance / emuPerPx : void 0,
78600
78992
  reflectionFadeDirection: fadeDirection !== void 0 ? fadeDirection / 6e4 : void 0,
78601
- reflectionScaleX: integer3(node["@_sx"]),
78602
- reflectionScaleY: integer3(node["@_sy"]),
78603
- reflectionSkewX: integer3(node["@_kx"]),
78604
- reflectionSkewY: integer3(node["@_ky"]),
78993
+ reflectionScaleX: integer4(node["@_sx"]),
78994
+ reflectionScaleY: integer4(node["@_sy"]),
78995
+ reflectionSkewX: integer4(node["@_kx"]),
78996
+ reflectionSkewY: integer4(node["@_ky"]),
78605
78997
  reflectionAlignment: VALID_ALIGNMENTS.has(alignment) ? alignment : void 0,
78606
78998
  reflectionRotateWithShape: boolean2(node["@_rotWithShape"])
78607
78999
  };
@@ -114047,6 +114439,7 @@ function firstChartGroup(space) {
114047
114439
  return group;
114048
114440
  }
114049
114441
  function assignOrDelete(target, key2, value) {
114442
+ if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") return;
114050
114443
  if (value === void 0) delete target[key2];
114051
114444
  else target[key2] = value;
114052
114445
  }
@@ -114234,6 +114627,11 @@ function chartExSeriesAt(space, index) {
114234
114627
  if (!series) throw new RangeError(`No chart series at index ${String(index)}`);
114235
114628
  return series;
114236
114629
  }
114630
+ function chartExAxisAt(space, index) {
114631
+ const axis = typeof index === "number" && Number.isSafeInteger(index) ? space.plotArea.axes.find((_, position4) => position4 === index) : void 0;
114632
+ if (!axis) throw new RangeError(`No chart axis at index ${String(index)}`);
114633
+ return axis;
114634
+ }
114237
114635
  function setChartExTitle(space, text2) {
114238
114636
  return editChartExSpace(space, (draft) => {
114239
114637
  if (text2 === void 0) {
@@ -115296,6 +115694,42 @@ var init_summary_from_chartex = __esm({
115296
115694
  }
115297
115695
  });
115298
115696
 
115697
+ // chart/funnel-geometry.ts
115698
+ var init_funnel_geometry = __esm({
115699
+ "chart/funnel-geometry.ts"() {
115700
+ }
115701
+ });
115702
+
115703
+ // chart/box-distribution.ts
115704
+ var init_box_distribution = __esm({
115705
+ "chart/box-distribution.ts"() {
115706
+ }
115707
+ });
115708
+
115709
+ // chart/data-table-layout.ts
115710
+ var init_data_table_layout = __esm({
115711
+ "chart/data-table-layout.ts"() {
115712
+ }
115713
+ });
115714
+
115715
+ // chart/date-axis.ts
115716
+ var init_date_axis = __esm({
115717
+ "chart/date-axis.ts"() {
115718
+ }
115719
+ });
115720
+
115721
+ // chart/date-format.ts
115722
+ var init_date_format = __esm({
115723
+ "chart/date-format.ts"() {
115724
+ }
115725
+ });
115726
+
115727
+ // chart/line-path.ts
115728
+ var init_line_path = __esm({
115729
+ "chart/line-path.ts"() {
115730
+ }
115731
+ });
115732
+
115299
115733
  // chart/render/chart-svg-markers.ts
115300
115734
  var init_chart_svg_markers = __esm({
115301
115735
  "chart/render/chart-svg-markers.ts"() {
@@ -117874,15 +118308,14 @@ var init_chartex_intent = __esm({
117874
118308
 
117875
118309
  // chart/edit/chartex-axis.ts
117876
118310
  function editChartExAxis(space, index, edit) {
117877
- if (!Number.isSafeInteger(index) || !space.plotArea.axes[index])
117878
- throw new RangeError("No ChartEx axis at index.");
118311
+ chartExAxisAt(space, index);
117879
118312
  for (const key2 of ["min", "max", "majorUnit", "minorUnit"]) {
117880
118313
  const value = edit[key2];
117881
118314
  if (value !== void 0 && value !== null && (!Number.isFinite(value) || (key2 === "majorUnit" || key2 === "minorUnit") && value <= 0))
117882
118315
  throw new RangeError("Invalid ChartEx axis scaling.");
117883
118316
  }
117884
118317
  return editChartExSpace(space, (draft) => {
117885
- const axis = draft.plotArea.axes[index];
118318
+ const axis = chartExAxisAt(draft, index);
117886
118319
  for (const key2 of ["min", "max", "majorUnit", "minorUnit"])
117887
118320
  if (edit[key2] !== void 0) {
117888
118321
  if (axis.scaling?.kind !== "val")
@@ -118860,6 +119293,12 @@ var init_chart2 = __esm({
118860
119293
  init_data_sheet();
118861
119294
  init_workbook2();
118862
119295
  init_keep_source();
119296
+ init_line_path();
119297
+ init_date_axis();
119298
+ init_date_format();
119299
+ init_data_table_layout();
119300
+ init_funnel_geometry();
119301
+ init_box_distribution();
118863
119302
  }
118864
119303
  });
118865
119304
 
@@ -124715,103 +125154,9 @@ var init_paragraph_bullet_overrides = __esm({
124715
125154
  });
124716
125155
 
124717
125156
  // pptx/core/utils/text-body-scene3d-presets.ts
124718
- var CAMERA_PRESETS, LIGHT_RIGS, LIGHT_DIRECTIONS;
124719
125157
  var init_text_body_scene3d_presets = __esm({
124720
125158
  "pptx/core/utils/text-body-scene3d-presets.ts"() {
124721
- CAMERA_PRESETS = /* @__PURE__ */ new Set([
124722
- "legacyObliqueTopLeft",
124723
- "legacyObliqueTop",
124724
- "legacyObliqueTopRight",
124725
- "legacyObliqueLeft",
124726
- "legacyObliqueFront",
124727
- "legacyObliqueRight",
124728
- "legacyObliqueBottomLeft",
124729
- "legacyObliqueBottom",
124730
- "legacyObliqueBottomRight",
124731
- "legacyPerspectiveTopLeft",
124732
- "legacyPerspectiveTop",
124733
- "legacyPerspectiveTopRight",
124734
- "legacyPerspectiveLeft",
124735
- "legacyPerspectiveFront",
124736
- "legacyPerspectiveRight",
124737
- "legacyPerspectiveBottomLeft",
124738
- "legacyPerspectiveBottom",
124739
- "legacyPerspectiveBottomRight",
124740
- "orthographicFront",
124741
- "isometricTopUp",
124742
- "isometricTopDown",
124743
- "isometricBottomUp",
124744
- "isometricBottomDown",
124745
- "isometricLeftUp",
124746
- "isometricLeftDown",
124747
- "isometricRightUp",
124748
- "isometricRightDown",
124749
- "isometricOffAxis1Left",
124750
- "isometricOffAxis1Right",
124751
- "isometricOffAxis1Top",
124752
- "isometricOffAxis2Left",
124753
- "isometricOffAxis2Right",
124754
- "isometricOffAxis2Top",
124755
- "isometricOffAxis3Left",
124756
- "isometricOffAxis3Right",
124757
- "isometricOffAxis3Bottom",
124758
- "isometricOffAxis4Left",
124759
- "isometricOffAxis4Right",
124760
- "isometricOffAxis4Bottom",
124761
- "obliqueTopLeft",
124762
- "obliqueTop",
124763
- "obliqueTopRight",
124764
- "obliqueLeft",
124765
- "obliqueRight",
124766
- "obliqueBottomLeft",
124767
- "obliqueBottom",
124768
- "obliqueBottomRight",
124769
- "perspectiveFront",
124770
- "perspectiveLeft",
124771
- "perspectiveRight",
124772
- "perspectiveAbove",
124773
- "perspectiveBelow",
124774
- "perspectiveAboveLeftFacing",
124775
- "perspectiveAboveRightFacing",
124776
- "perspectiveContrastingLeftFacing",
124777
- "perspectiveContrastingRightFacing",
124778
- "perspectiveHeroicLeftFacing",
124779
- "perspectiveHeroicRightFacing",
124780
- "perspectiveHeroicExtremeLeftFacing",
124781
- "perspectiveHeroicExtremeRightFacing",
124782
- "perspectiveRelaxed",
124783
- "perspectiveRelaxedModerately"
124784
- ]);
124785
- LIGHT_RIGS = /* @__PURE__ */ new Set([
124786
- "legacyFlat1",
124787
- "legacyFlat2",
124788
- "legacyFlat3",
124789
- "legacyFlat4",
124790
- "legacyNormal1",
124791
- "legacyNormal2",
124792
- "legacyNormal3",
124793
- "legacyNormal4",
124794
- "legacyHarsh1",
124795
- "legacyHarsh2",
124796
- "legacyHarsh3",
124797
- "legacyHarsh4",
124798
- "threePt",
124799
- "balanced",
124800
- "soft",
124801
- "harsh",
124802
- "flood",
124803
- "contrasting",
124804
- "morning",
124805
- "sunrise",
124806
- "sunset",
124807
- "chilly",
124808
- "freezing",
124809
- "flat",
124810
- "twoPt",
124811
- "glow",
124812
- "brightRoom"
124813
- ]);
124814
- LIGHT_DIRECTIONS = /* @__PURE__ */ new Set(["tl", "t", "tr", "l", "r", "bl", "b", "br"]);
125159
+ init_scene3d_presets();
124815
125160
  }
124816
125161
  });
124817
125162
 
@@ -124822,31 +125167,13 @@ function parseTextBodyScene3d(bodyPr, style) {
124822
125167
  return;
124823
125168
  }
124824
125169
  style.textBodyScene3dXml = cloneXmlObject(scene);
124825
- const camera = child27(scene, "camera");
124826
- const light = child27(scene, "lightRig");
124827
- const typed = {
124828
- cameraPreset: enumToken(camera?.["@_prst"], CAMERA_PRESETS),
124829
- lightRigType: enumToken(light?.["@_rig"], LIGHT_RIGS),
124830
- lightRigDirection: enumToken(light?.["@_dir"], LIGHT_DIRECTIONS)
124831
- };
124832
- const fov = finiteInt(camera?.["@_fov"]);
124833
- if (fov !== void 0 && fov >= 0 && fov <= 108e5) {
124834
- typed.cameraFieldOfView = fov;
124835
- }
124836
- const zoom = percentage(camera?.["@_zoom"]);
124837
- if (zoom !== void 0) {
124838
- typed.cameraZoom = zoom;
124839
- }
124840
- applyRotation(typed, camera, "camera");
124841
- applyRotation(typed, light, "lightRig");
124842
- const backdrop = child27(scene, "backdrop");
124843
- if (backdrop) {
124844
- typed.hasBackdrop = true;
124845
- applyPoint(typed, child27(backdrop, "anchor"), "backdropAnchor");
124846
- applyPoint(typed, child27(backdrop, "norm"), "backdropNormal", "d");
124847
- applyPoint(typed, child27(backdrop, "up"), "backdropUp", "d");
124848
- }
124849
- style.textBodyScene3d = typed;
125170
+ const typed = readScene3DValues(scene, { child: child27, attribute: (node, name) => node?.[`@_${name}`] });
125171
+ style.textBodyScene3d = {
125172
+ cameraPreset: void 0,
125173
+ lightRigType: void 0,
125174
+ lightRigDirection: void 0,
125175
+ ...typed
125176
+ };
124850
125177
  }
124851
125178
  function applyTextBodyScene3d(bodyPr, style) {
124852
125179
  const existingKey = childKey2(bodyPr, "scene3d");
@@ -124912,11 +125239,12 @@ function applyTextBodyScene3d(bodyPr, style) {
124912
125239
  }
124913
125240
  bodyPr[existingKey ?? "a:scene3d"] = ordered2(scene, ["camera", "lightRig", "backdrop", "extLst"]);
124914
125241
  }
124915
- var localName20, childKey2, child27, finiteInt, percentage, enumToken, applyRotation, applyPoint, setAttrs, setChild4, ordered2, rotationXml, anchorXml, vectorXml;
125242
+ var localName20, childKey2, child27, enumToken, setAttrs, setChild4, ordered2, rotationXml, anchorXml, vectorXml;
124916
125243
  var init_text_body_scene3d = __esm({
124917
125244
  "pptx/core/utils/text-body-scene3d.ts"() {
125245
+ init_read_3d_values();
124918
125246
  init_clone_utils();
124919
- init_scene3d_coordinate();
125247
+ init_scene3d_coordinate2();
124920
125248
  init_text_body_scene3d_presets();
124921
125249
  localName20 = (key2) => key2.replace(/^@_/, "").split(":").pop() ?? key2;
124922
125250
  childKey2 = (node, local) => Object.keys(node).find((key2) => !key2.startsWith("@_") && localName20(key2) === local);
@@ -124927,49 +125255,10 @@ var init_text_body_scene3d = __esm({
124927
125255
  const key2 = childKey2(node, local);
124928
125256
  return key2 ? node[key2] : void 0;
124929
125257
  };
124930
- finiteInt = (value) => {
124931
- const parsed = Number(value);
124932
- return Number.isInteger(parsed) ? parsed : void 0;
124933
- };
124934
- percentage = (value) => {
124935
- if (typeof value === "string" && value.endsWith("%")) {
124936
- const parsed2 = Number(value.slice(0, -1));
124937
- return Number.isFinite(parsed2) && parsed2 > 0 ? parsed2 / 100 : void 0;
124938
- }
124939
- const parsed = finiteInt(value);
124940
- return parsed !== void 0 && parsed > 0 ? parsed / 1e5 : void 0;
124941
- };
124942
125258
  enumToken = (value, allowed) => {
124943
125259
  const token2 = String(value ?? "").trim();
124944
125260
  return allowed.has(token2) ? token2 : void 0;
124945
125261
  };
124946
- applyRotation = (target, node, prefix) => {
124947
- const rot = child27(node, "rot");
124948
- const x = finiteInt(rot?.["@_lat"]);
124949
- const y = finiteInt(rot?.["@_lon"]);
124950
- const z = finiteInt(rot?.["@_rev"]);
124951
- if (x !== void 0) {
124952
- target[`${prefix}RotX`] = x;
124953
- }
124954
- if (y !== void 0) {
124955
- target[`${prefix}RotY`] = y;
124956
- }
124957
- if (z !== void 0) {
124958
- target[`${prefix}RotZ`] = z;
124959
- }
124960
- };
124961
- applyPoint = (target, node, prefix, attrPrefix = "") => {
124962
- for (const [axis, suffix] of [
124963
- ["x", "X"],
124964
- ["y", "Y"],
124965
- ["z", "Z"]
124966
- ]) {
124967
- const value = finiteInt(node?.[`@_${attrPrefix}${axis}`]);
124968
- if (value !== void 0) {
124969
- target[`${prefix}${suffix}`] = value;
124970
- }
124971
- }
124972
- };
124973
125262
  setAttrs = (node, attrs3) => {
124974
125263
  for (const [key2, value] of Object.entries(attrs3)) {
124975
125264
  if (value !== void 0) {
@@ -124997,6 +125286,10 @@ var init_text_body_scene3d = __esm({
124997
125286
  return result;
124998
125287
  };
124999
125288
  rotationXml = (x, y, z) => {
125289
+ if ([x, y, z].some(
125290
+ (value) => value !== void 0 && (!Number.isSafeInteger(value) || value < 0 || value >= 216e5)
125291
+ ))
125292
+ throw new RangeError("Invalid 3D rotation angle");
125000
125293
  if (![x, y, z].some(Number.isInteger)) {
125001
125294
  return void 0;
125002
125295
  }
@@ -125025,29 +125318,6 @@ var init_text_body_scene3d = __esm({
125025
125318
  });
125026
125319
 
125027
125320
  // pptx/core/utils/text-body-sp3d.ts
125028
- function intAttr2(value) {
125029
- if (value === void 0 || value === null) {
125030
- return void 0;
125031
- }
125032
- const parsed = parseInt(String(value), 10);
125033
- return Number.isFinite(parsed) ? parsed : void 0;
125034
- }
125035
- function applyBevel(bevel2, t3d, prefix) {
125036
- if (!bevel2) {
125037
- return;
125038
- }
125039
- t3d[`${prefix}Type`] = String(
125040
- bevel2["@_prst"] || "circle"
125041
- ).trim();
125042
- const width = intAttr2(bevel2["@_w"]);
125043
- if (width !== void 0) {
125044
- t3d[`${prefix}Width`] = width;
125045
- }
125046
- const height = intAttr2(bevel2["@_h"]);
125047
- if (height !== void 0) {
125048
- t3d[`${prefix}Height`] = height;
125049
- }
125050
- }
125051
125321
  function parseTextBodySp3d(bodyPr, style, parseColor) {
125052
125322
  if (bodyPr["a:flatTx"] !== void 0) {
125053
125323
  style.flatText = true;
@@ -125057,27 +125327,23 @@ function parseTextBodySp3d(bodyPr, style, parseColor) {
125057
125327
  if (!sp3d) {
125058
125328
  return;
125059
125329
  }
125060
- const t3d = {};
125061
- const extrusionHeight = intAttr2(sp3d["@_extrusionH"]);
125062
- if (extrusionHeight !== void 0) {
125063
- t3d.extrusionHeight = extrusionHeight;
125064
- }
125330
+ const values = readText3DValues(sp3d, {
125331
+ attribute: (node, name) => node?.[`@_${name}`],
125332
+ child: (node, name) => node?.[`a:${name}`]
125333
+ });
125334
+ const { z: _z, contourWidth: _contourWidth, ...scalars } = values;
125335
+ const t3d = scalars;
125065
125336
  const extrusionColor = parseColor(sp3d["a:extrusionClr"]);
125066
125337
  if (extrusionColor) {
125067
125338
  t3d.extrusionColor = extrusionColor;
125068
125339
  }
125069
- const material = String(sp3d["@_prstMaterial"] || "").trim();
125070
- if (material) {
125071
- t3d.presetMaterial = material;
125072
- }
125073
- applyBevel(sp3d["a:bevelT"], t3d, "bevelTop");
125074
- applyBevel(sp3d["a:bevelB"], t3d, "bevelBottom");
125075
125340
  if (Object.keys(t3d).length > 0) {
125076
125341
  style.text3d = t3d;
125077
125342
  }
125078
125343
  }
125079
125344
  var init_text_body_sp3d = __esm({
125080
125345
  "pptx/core/utils/text-body-sp3d.ts"() {
125346
+ init_read_3d_values();
125081
125347
  }
125082
125348
  });
125083
125349
 
@@ -138655,8 +138921,8 @@ function parsePercent(value, fixed) {
138655
138921
  if (!text2) {
138656
138922
  return void 0;
138657
138923
  }
138658
- const strict = text2.endsWith("%");
138659
- const parsed = Number(strict ? text2.slice(0, -1) : text2) / (strict ? 1 : 1e3);
138924
+ const fraction = picturePercentage(text2);
138925
+ const parsed = fraction === void 0 ? NaN : fraction * 100;
138660
138926
  if (!Number.isFinite(parsed) || parsed < 0 || fixed && parsed > 100) {
138661
138927
  return void 0;
138662
138928
  }
@@ -138781,6 +139047,7 @@ function applyImageAlphaEffects(blip, effects2, parseColor) {
138781
139047
  var localName26;
138782
139048
  var init_image_alpha_effects = __esm({
138783
139049
  "pptx/core/core/runtime/image-alpha-effects.ts"() {
139050
+ init_picture_effects();
138784
139051
  init_color_xml_preservation();
138785
139052
  localName26 = (key2) => key2.split(":").at(-1) ?? key2;
138786
139053
  }
@@ -142166,6 +142433,7 @@ var init_PptxHandlerRuntimeTableStylesAndActions = __esm({
142166
142433
  var PptxHandlerRuntime5;
142167
142434
  var init_PptxHandlerRuntimeImageEffects = __esm({
142168
142435
  "pptx/core/core/runtime/PptxHandlerRuntimeImageEffects.ts"() {
142436
+ init_picture_effects();
142169
142437
  init_xml_access();
142170
142438
  init_image_a14_effects();
142171
142439
  init_image_a14_effects_model();
@@ -142214,20 +142482,11 @@ var init_PptxHandlerRuntimeImageEffects = __esm({
142214
142482
  }
142215
142483
  const lumNode = blip["a:lum"];
142216
142484
  if (lumNode) {
142485
+ const neutral = readPictureEffect("lum", (name) => lumNode[`@_${name}`]);
142217
142486
  const lumEffect = {};
142218
- const lumBright = lumNode["@_bright"];
142219
- const lumContrast = lumNode["@_contrast"];
142220
- if (lumBright !== void 0) {
142221
- const v = parseInt(String(lumBright)) / 1e3;
142222
- if (Number.isFinite(v)) {
142223
- lumEffect.bright = v;
142224
- }
142225
- }
142226
- if (lumContrast !== void 0) {
142227
- const v = parseInt(String(lumContrast)) / 1e3;
142228
- if (Number.isFinite(v)) {
142229
- lumEffect.contrast = v;
142230
- }
142487
+ if (neutral?.kind === "luminance") {
142488
+ if (neutral.brightness !== void 0) lumEffect.bright = neutral.brightness * 100;
142489
+ if (neutral.contrast !== void 0) lumEffect.contrast = neutral.contrast * 100;
142231
142490
  }
142232
142491
  effects2.lum = lumEffect;
142233
142492
  hasAny2 = true;
@@ -192220,7 +192479,7 @@ var SmartArtElementProcessor = class {
192220
192479
  };
192221
192480
 
192222
192481
  // pptx/converter/elements/TableElementProcessor.ts
192223
- init_font_substitution();
192482
+ init_font_substitution2();
192224
192483
  var SAFE_CSS_NAMED_COLORS = /* @__PURE__ */ new Set([
192225
192484
  "black",
192226
192485
  "silver",
@@ -192600,7 +192859,7 @@ ${htmlRows.join("\n")}
192600
192859
  init_type_guards();
192601
192860
 
192602
192861
  // pptx/converter/ShapeTextRenderer.ts
192603
- init_font_substitution();
192862
+ init_font_substitution2();
192604
192863
  var DEFAULT_FONT_SIZE = 18;
192605
192864
  var FALLBACK_PAD_FACTOR = 0.06;
192606
192865
  function drawTextSegments(ctx, segments, bodyStyle, w, h2, scaleFactor = 1) {