ooxml-core 1.50.2 → 1.51.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 (361) hide show
  1. package/README.md +11 -0
  2. package/dist/{PptxHandler-PVQW47CY.mjs → PptxHandler-6GRVJRHP.mjs} +2 -2
  3. package/dist/PptxHandler-E6QYPF7X.mjs +8 -0
  4. package/dist/PptxHandler-UNQVCIGM.cjs +17 -0
  5. package/dist/PresentationBuilder-DVDJSV5R.mjs +8 -0
  6. package/dist/PresentationBuilder-F5UWRF6H.cjs +25 -0
  7. package/dist/{PresentationBuilder-ZOOVSBPR.mjs → PresentationBuilder-T6YKWPF7.mjs} +2 -2
  8. package/dist/automation/index.cjs +5806 -4494
  9. package/dist/automation/index.mjs +5806 -4494
  10. package/dist/chunk-25IJEN7R.cjs +36 -0
  11. package/dist/chunk-25JN3ZQM.mjs +58 -0
  12. package/dist/{chunk-7XYVFUB3.cjs → chunk-2IO523MM.cjs} +1 -0
  13. package/dist/{chunk-53KMIHYN.mjs → chunk-4LUZHBTT.mjs} +83 -31
  14. package/dist/chunk-554UZLPS.mjs +237 -0
  15. package/dist/{chunk-VLKUMQGT.mjs → chunk-63RAF3TS.mjs} +1 -1
  16. package/dist/{chunk-7UM5IFPR.mjs → chunk-6IUYKP77.mjs} +1 -1
  17. package/dist/{chunk-VK2G4BGX.mjs → chunk-BIMV5FVL.mjs} +481 -193
  18. package/dist/{chunk-CODMW5KF.cjs → chunk-CVUMILG3.cjs} +1 -0
  19. package/dist/{chunk-NBMXEVHL.mjs → chunk-FX6WL42B.mjs} +1 -0
  20. package/dist/chunk-GI4Y6BBX.mjs +21 -0
  21. package/dist/{chunk-MX2GFMZS.mjs → chunk-GZL4ERW3.mjs} +1 -1
  22. package/dist/chunk-HWL2AGLD.cjs +98 -0
  23. package/dist/chunk-HZAB3YDO.cjs +234 -0
  24. package/dist/chunk-IDATIFCG.mjs +226 -0
  25. package/dist/chunk-LO55N7VL.cjs +247 -0
  26. package/dist/{chunk-FFLU4LUQ.cjs → chunk-LUBPW5NP.cjs} +1629 -1609
  27. package/dist/chunk-MUNEIE2J.cjs +62 -0
  28. package/dist/{chunk-ZCKEKP7N.mjs → chunk-RYUADJV6.mjs} +4 -4
  29. package/dist/chunk-TOBK5FC4.mjs +88 -0
  30. package/dist/chunk-UV4LMGVZ.mjs +31 -0
  31. package/dist/{chunk-O3YGBYGZ.mjs → chunk-VRVHM6TJ.mjs} +1 -0
  32. package/dist/chunk-W7LVJC32.cjs +25 -0
  33. package/dist/chunk-WAZ7T2BL.cjs +169 -0
  34. package/dist/{chunk-3OKY56UM.mjs → chunk-YX33WEKS.mjs} +411 -391
  35. package/dist/docx/auto-number-fields.d.ts +22 -0
  36. package/dist/docx/auto-number-fields.d.ts.map +1 -0
  37. package/dist/docx/block-parser.d.ts.map +1 -1
  38. package/dist/docx/character-styles.d.ts.map +1 -1
  39. package/dist/docx/clipboard/css.d.ts +21 -0
  40. package/dist/docx/clipboard/css.d.ts.map +1 -0
  41. package/dist/docx/clipboard/html-tokens.d.ts +38 -0
  42. package/dist/docx/clipboard/html-tokens.d.ts.map +1 -0
  43. package/dist/docx/clipboard/index.d.ts +6 -0
  44. package/dist/docx/clipboard/index.d.ts.map +1 -0
  45. package/dist/docx/clipboard/word-fields.d.ts +13 -0
  46. package/dist/docx/clipboard/word-fields.d.ts.map +1 -0
  47. package/dist/docx/clipboard/word-fragment.d.ts +14 -0
  48. package/dist/docx/clipboard/word-fragment.d.ts.map +1 -0
  49. package/dist/docx/clipboard/word-html.d.ts +22 -0
  50. package/dist/docx/clipboard/word-html.d.ts.map +1 -0
  51. package/dist/docx/clipboard/word-list-scan.d.ts +25 -0
  52. package/dist/docx/clipboard/word-list-scan.d.ts.map +1 -0
  53. package/dist/docx/clipboard/word-lists.d.ts +13 -0
  54. package/dist/docx/clipboard/word-lists.d.ts.map +1 -0
  55. package/dist/docx/clipboard/word-runs.d.ts +18 -0
  56. package/dist/docx/clipboard/word-runs.d.ts.map +1 -0
  57. package/dist/docx/clipboard/word-styles.d.ts +35 -0
  58. package/dist/docx/clipboard/word-styles.d.ts.map +1 -0
  59. package/dist/docx/compare/build.d.ts +48 -0
  60. package/dist/docx/compare/build.d.ts.map +1 -0
  61. package/dist/docx/compare/compare.d.ts +18 -0
  62. package/dist/docx/compare/compare.d.ts.map +1 -0
  63. package/dist/docx/compare/context.d.ts +42 -0
  64. package/dist/docx/compare/context.d.ts.map +1 -0
  65. package/dist/docx/compare/diff.d.ts +20 -0
  66. package/dist/docx/compare/diff.d.ts.map +1 -0
  67. package/dist/docx/compare/index.d.ts +4 -0
  68. package/dist/docx/compare/index.d.ts.map +1 -0
  69. package/dist/docx/compare/slide.d.ts +9 -0
  70. package/dist/docx/compare/slide.d.ts.map +1 -0
  71. package/dist/docx/compare/spans.d.ts +13 -0
  72. package/dist/docx/compare/spans.d.ts.map +1 -0
  73. package/dist/docx/compare/story.d.ts +7 -0
  74. package/dist/docx/compare/story.d.ts.map +1 -0
  75. package/dist/docx/compare/table.d.ts +23 -0
  76. package/dist/docx/compare/table.d.ts.map +1 -0
  77. package/dist/docx/compare/tokens.d.ts +50 -0
  78. package/dist/docx/compare/tokens.d.ts.map +1 -0
  79. package/dist/docx/compare/types.d.ts +51 -0
  80. package/dist/docx/compare/types.d.ts.map +1 -0
  81. package/dist/docx/compatibility.d.ts +46 -0
  82. package/dist/docx/compatibility.d.ts.map +1 -0
  83. package/dist/docx/computed-fields.d.ts +39 -0
  84. package/dist/docx/computed-fields.d.ts.map +1 -0
  85. package/dist/docx/doc-property-field.d.ts +17 -0
  86. package/dist/docx/doc-property-field.d.ts.map +1 -0
  87. package/dist/docx/document-parts.d.ts +2 -0
  88. package/dist/docx/document-parts.d.ts.map +1 -1
  89. package/dist/docx/drawing-wrap.d.ts +21 -0
  90. package/dist/docx/drawing-wrap.d.ts.map +1 -0
  91. package/dist/docx/drawing.d.ts.map +1 -1
  92. package/dist/docx/embedded.cjs +3965 -2313
  93. package/dist/docx/embedded.mjs +3965 -2313
  94. package/dist/docx/field-format.d.ts +45 -0
  95. package/dist/docx/field-format.d.ts.map +1 -0
  96. package/dist/docx/field-result-spans.d.ts +62 -0
  97. package/dist/docx/field-result-spans.d.ts.map +1 -0
  98. package/dist/docx/field-runs.d.ts.map +1 -1
  99. package/dist/docx/field-stories.d.ts +9 -0
  100. package/dist/docx/field-stories.d.ts.map +1 -0
  101. package/dist/docx/find-stories.d.ts +27 -0
  102. package/dist/docx/find-stories.d.ts.map +1 -0
  103. package/dist/docx/highlight.d.ts +19 -0
  104. package/dist/docx/highlight.d.ts.map +1 -1
  105. package/dist/docx/hyperlink.d.ts +7 -0
  106. package/dist/docx/hyperlink.d.ts.map +1 -1
  107. package/dist/docx/index.cjs +7359 -3476
  108. package/dist/docx/index.d.ts +13 -1
  109. package/dist/docx/index.d.ts.map +1 -1
  110. package/dist/docx/index.mjs +7327 -3476
  111. package/dist/docx/inline-model.d.ts +21 -0
  112. package/dist/docx/inline-model.d.ts.map +1 -1
  113. package/dist/docx/inline-slots.d.ts.map +1 -1
  114. package/dist/docx/inspect-document.d.ts +21 -0
  115. package/dist/docx/inspect-document.d.ts.map +1 -0
  116. package/dist/docx/kinsoku-settings.d.ts +9 -0
  117. package/dist/docx/kinsoku-settings.d.ts.map +1 -0
  118. package/dist/docx/layout/adapt-table-floating.d.ts +11 -0
  119. package/dist/docx/layout/adapt-table-floating.d.ts.map +1 -0
  120. package/dist/docx/layout/adapt-table.d.ts.map +1 -1
  121. package/dist/docx/layout/adapter.d.ts.map +1 -1
  122. package/dist/docx/layout/computed-field-runs.d.ts +8 -0
  123. package/dist/docx/layout/computed-field-runs.d.ts.map +1 -0
  124. package/dist/docx/layout/floats.d.ts +3 -1
  125. package/dist/docx/layout/floats.d.ts.map +1 -1
  126. package/dist/docx/layout/flow-floating-table.d.ts +13 -0
  127. package/dist/docx/layout/flow-floating-table.d.ts.map +1 -0
  128. package/dist/docx/layout/flow-table.d.ts +1 -1
  129. package/dist/docx/layout/flow-table.d.ts.map +1 -1
  130. package/dist/docx/layout/index.cjs +2280 -941
  131. package/dist/docx/layout/index.mjs +2276 -942
  132. package/dist/docx/layout/input.d.ts +50 -0
  133. package/dist/docx/layout/input.d.ts.map +1 -1
  134. package/dist/docx/layout/layout.d.ts.map +1 -1
  135. package/dist/docx/layout/page-cursor.d.ts.map +1 -1
  136. package/dist/docx/layout/page-flow.d.ts.map +1 -1
  137. package/dist/docx/layout/paragraph-layout.d.ts.map +1 -1
  138. package/dist/docx/layout/paragraph-tokens.d.ts +6 -0
  139. package/dist/docx/layout/paragraph-tokens.d.ts.map +1 -1
  140. package/dist/docx/layout/result.d.ts +12 -0
  141. package/dist/docx/layout/result.d.ts.map +1 -1
  142. package/dist/docx/layout/section-flow.d.ts.map +1 -1
  143. package/dist/docx/layout/table-autofit-distribute.d.ts +18 -0
  144. package/dist/docx/layout/table-autofit-distribute.d.ts.map +1 -0
  145. package/dist/docx/layout/table-autofit-measure.d.ts +15 -0
  146. package/dist/docx/layout/table-autofit-measure.d.ts.map +1 -0
  147. package/dist/docx/layout/table-autofit.d.ts +10 -0
  148. package/dist/docx/layout/table-autofit.d.ts.map +1 -0
  149. package/dist/docx/layout/table-cell-layout.d.ts.map +1 -1
  150. package/dist/docx/layout/text-breaks.d.ts +38 -13
  151. package/dist/docx/layout/text-breaks.d.ts.map +1 -1
  152. package/dist/docx/layout/wrap.d.ts +1 -1
  153. package/dist/docx/layout/wrap.d.ts.map +1 -1
  154. package/dist/docx/list-number-fields.d.ts +25 -0
  155. package/dist/docx/list-number-fields.d.ts.map +1 -0
  156. package/dist/docx/load/index.cjs +4355 -2703
  157. package/dist/docx/load/index.mjs +4355 -2703
  158. package/dist/docx/model-paragraph.d.ts +12 -1
  159. package/dist/docx/model-paragraph.d.ts.map +1 -1
  160. package/dist/docx/model.d.ts +26 -1
  161. package/dist/docx/model.d.ts.map +1 -1
  162. package/dist/docx/note-convert.d.ts +45 -0
  163. package/dist/docx/note-convert.d.ts.map +1 -0
  164. package/dist/docx/numbering-counters.d.ts +17 -0
  165. package/dist/docx/numbering-counters.d.ts.map +1 -0
  166. package/dist/docx/numbering-format.d.ts +11 -2
  167. package/dist/docx/numbering-format.d.ts.map +1 -1
  168. package/dist/docx/outline-numbering.d.ts +6 -0
  169. package/dist/docx/outline-numbering.d.ts.map +1 -0
  170. package/dist/docx/package-information-save.d.ts +9 -0
  171. package/dist/docx/package-information-save.d.ts.map +1 -0
  172. package/dist/docx/package-information.d.ts +43 -0
  173. package/dist/docx/package-information.d.ts.map +1 -0
  174. package/dist/docx/package-properties.d.ts +5 -0
  175. package/dist/docx/package-properties.d.ts.map +1 -0
  176. package/dist/docx/paragraph-styles.d.ts +2 -0
  177. package/dist/docx/paragraph-styles.d.ts.map +1 -1
  178. package/dist/docx/parse-revisions.d.ts +2 -0
  179. package/dist/docx/parse-revisions.d.ts.map +1 -1
  180. package/dist/docx/parse-table-floating.d.ts +5 -0
  181. package/dist/docx/parse-table-floating.d.ts.map +1 -0
  182. package/dist/docx/parse-table.d.ts.map +1 -1
  183. package/dist/docx/parse.d.ts.map +1 -1
  184. package/dist/docx/part-relationships.d.ts.map +1 -1
  185. package/dist/docx/personal-information.d.ts +18 -0
  186. package/dist/docx/personal-information.d.ts.map +1 -0
  187. package/dist/docx/picture-crop-edit.d.ts +18 -0
  188. package/dist/docx/picture-crop-edit.d.ts.map +1 -0
  189. package/dist/docx/picture-watermark.d.ts +29 -0
  190. package/dist/docx/picture-watermark.d.ts.map +1 -0
  191. package/dist/docx/relationship-allocator.d.ts.map +1 -1
  192. package/dist/docx/remove-document-information.d.ts +8 -0
  193. package/dist/docx/remove-document-information.d.ts.map +1 -0
  194. package/dist/docx/revision-commands.d.ts +6 -1
  195. package/dist/docx/revision-commands.d.ts.map +1 -1
  196. package/dist/docx/revision-ids.d.ts.map +1 -1
  197. package/dist/docx/run-language.d.ts +9 -0
  198. package/dist/docx/run-language.d.ts.map +1 -0
  199. package/dist/docx/run-properties-snapshot.d.ts +9 -0
  200. package/dist/docx/run-properties-snapshot.d.ts.map +1 -0
  201. package/dist/docx/run-style-model.d.ts +4 -0
  202. package/dist/docx/run-style-model.d.ts.map +1 -1
  203. package/dist/docx/save-modified.d.ts +2 -1
  204. package/dist/docx/save-modified.d.ts.map +1 -1
  205. package/dist/docx/save.d.ts.map +1 -1
  206. package/dist/docx/style-ref-fields.d.ts +1 -8
  207. package/dist/docx/style-ref-fields.d.ts.map +1 -1
  208. package/dist/docx/symbol-field.d.ts +21 -0
  209. package/dist/docx/symbol-field.d.ts.map +1 -0
  210. package/dist/docx/table-cell-write.d.ts.map +1 -1
  211. package/dist/docx/table-defaults.d.ts +2 -0
  212. package/dist/docx/table-defaults.d.ts.map +1 -1
  213. package/dist/docx/table-margins.d.ts +18 -0
  214. package/dist/docx/table-margins.d.ts.map +1 -0
  215. package/dist/docx/table-model.d.ts +23 -0
  216. package/dist/docx/table-model.d.ts.map +1 -1
  217. package/dist/docx/table-structure-check.d.ts.map +1 -1
  218. package/dist/docx/table-styles.d.ts.map +1 -1
  219. package/dist/docx/ui/index.cjs +787 -435
  220. package/dist/docx/ui/index.d.ts +1 -0
  221. package/dist/docx/ui/index.d.ts.map +1 -1
  222. package/dist/docx/ui/index.mjs +784 -436
  223. package/dist/docx/ui/inline-content-schema.d.ts.map +1 -1
  224. package/dist/docx/ui/paragraph-attributes.d.ts +6 -0
  225. package/dist/docx/ui/paragraph-attributes.d.ts.map +1 -1
  226. package/dist/docx/ui/ribbon-action-ids.d.ts +1 -1
  227. package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -1
  228. package/dist/docx/ui/ribbon-legacy-labels.d.ts +1 -1
  229. package/dist/docx/ui/ribbon-legacy-labels.d.ts.map +1 -1
  230. package/dist/docx/ui/run-adapter.d.ts.map +1 -1
  231. package/dist/docx/ui/schema-marks.d.ts +2 -19
  232. package/dist/docx/ui/schema-marks.d.ts.map +1 -1
  233. package/dist/docx/ui/track-run-formatting.d.ts.map +1 -1
  234. package/dist/docx/ui/yjs-document-attributes.d.ts +5 -0
  235. package/dist/docx/ui/yjs-document-attributes.d.ts.map +1 -1
  236. package/dist/docx/write-drawing-wrap.d.ts +22 -0
  237. package/dist/docx/write-drawing-wrap.d.ts.map +1 -0
  238. package/dist/docx/write-drawing.d.ts.map +1 -1
  239. package/dist/docx/write-revisions.d.ts +3 -1
  240. package/dist/docx/write-revisions.d.ts.map +1 -1
  241. package/dist/docx/write-shape.d.ts.map +1 -1
  242. package/dist/docx/write-table-properties.d.ts.map +1 -1
  243. package/dist/docx/write.d.ts.map +1 -1
  244. package/dist/drawingml/html-text-paste.d.ts +28 -0
  245. package/dist/drawingml/html-text-paste.d.ts.map +1 -0
  246. package/dist/drawingml/html-text-style.d.ts +18 -0
  247. package/dist/drawingml/html-text-style.d.ts.map +1 -0
  248. package/dist/drawingml/index.cjs +762 -0
  249. package/dist/drawingml/index.d.ts +1 -0
  250. package/dist/drawingml/index.d.ts.map +1 -1
  251. package/dist/drawingml/index.mjs +760 -1
  252. package/dist/index.cjs +1147 -251
  253. package/dist/index.mjs +1147 -251
  254. package/dist/pptx/automation/index.cjs +561 -180
  255. package/dist/pptx/automation/index.d.ts +4 -4
  256. package/dist/pptx/automation/index.mjs +6 -5
  257. package/dist/pptx/chunks/{index-BCy58n13.d.ts → index-8ZfPndYR.d.ts} +2 -2
  258. package/dist/pptx/chunks/{index-BCy58n13.d.ts.map → index-8ZfPndYR.d.ts.map} +1 -1
  259. package/dist/pptx/chunks/{index-OwiX5IVw.d.ts → index-DVhD9Kd5.d.ts} +4 -4
  260. package/dist/pptx/chunks/{index-OwiX5IVw.d.ts.map → index-DVhD9Kd5.d.ts.map} +1 -1
  261. package/dist/pptx/chunks/{index-oQHWAO7M.d.ts → index-DsUnUj-V.d.ts} +5 -5
  262. package/dist/pptx/chunks/{index-oQHWAO7M.d.ts.map → index-DsUnUj-V.d.ts.map} +1 -1
  263. package/dist/pptx/chunks/{index-AZN38e6S.d.ts → index-xB7MDLI7.d.ts} +4 -4
  264. package/dist/pptx/chunks/{index-AZN38e6S.d.ts.map → index-xB7MDLI7.d.ts.map} +1 -1
  265. package/dist/pptx/chunks/{presentation-DOaYIW-l.d.ts → presentation-BvnVkFPJ.d.ts} +26 -2
  266. package/dist/pptx/chunks/{presentation-DOaYIW-l.d.ts.map → presentation-BvnVkFPJ.d.ts.map} +1 -1
  267. package/dist/pptx/chunks/{text-operations-CYSXno9L.d.ts → text-operations-D7TCPhlv.d.ts} +2 -2
  268. package/dist/pptx/chunks/{text-operations-CYSXno9L.d.ts.map → text-operations-D7TCPhlv.d.ts.map} +1 -1
  269. package/dist/pptx/cli/index.cjs +504 -124
  270. package/dist/pptx/cli/index.d.ts +1 -1
  271. package/dist/pptx/cli/index.mjs +4 -4
  272. package/dist/pptx/converter/index.d.ts +1 -1
  273. package/dist/pptx/converter/index.mjs +2 -2
  274. package/dist/pptx/editor/render/custom-show-operations.cjs +2 -2
  275. package/dist/pptx/editor/render/custom-show-operations.mjs +1 -1
  276. package/dist/pptx/editor/render/find-replace.cjs +16 -15
  277. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  278. package/dist/pptx/editor/render/find-replace.mjs +3 -2
  279. package/dist/pptx/editor/render/font-family-update.d.ts +2 -2
  280. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +2 -2
  281. package/dist/pptx/editor/render/segments-text-edit.cjs +159 -0
  282. package/dist/pptx/editor/render/segments-text-edit.d.ts +26 -0
  283. package/dist/pptx/editor/render/segments-text-edit.d.ts.map +1 -0
  284. package/dist/pptx/editor/render/segments-text-edit.mjs +156 -0
  285. package/dist/pptx/editor/render/slide-operations.cjs +12 -9
  286. package/dist/pptx/editor/render/slide-operations.mjs +6 -3
  287. package/dist/pptx/editor/render/table-cell-edit.cjs +5 -5
  288. package/dist/pptx/editor/render/table-cell-edit.d.ts.map +1 -1
  289. package/dist/pptx/editor/render/table-cell-edit.mjs +1 -1
  290. package/dist/pptx/editor/render/table-cell-merge.cjs +3 -3
  291. package/dist/pptx/editor/render/table-cell-merge.mjs +1 -1
  292. package/dist/pptx/editor/render/table-cell-rich-text.cjs +41 -0
  293. package/dist/pptx/editor/render/table-cell-rich-text.d.ts +50 -0
  294. package/dist/pptx/editor/render/table-cell-rich-text.d.ts.map +1 -0
  295. package/dist/pptx/editor/render/table-cell-rich-text.mjs +8 -0
  296. package/dist/pptx/editor/render/table-cell-source.cjs +23 -0
  297. package/dist/pptx/editor/render/table-cell-source.d.ts +31 -0
  298. package/dist/pptx/editor/render/table-cell-source.d.ts.map +1 -0
  299. package/dist/pptx/editor/render/table-cell-source.mjs +6 -0
  300. package/dist/pptx/editor/render/table-cells-text-style.cjs +116 -0
  301. package/dist/pptx/editor/render/table-cells-text-style.d.ts +37 -0
  302. package/dist/pptx/editor/render/table-cells-text-style.d.ts.map +1 -0
  303. package/dist/pptx/editor/render/table-cells-text-style.mjs +113 -0
  304. package/dist/pptx/editor/render/table-data-grid-ops.cjs +40 -94
  305. package/dist/pptx/editor/render/table-data-grid-ops.mjs +3 -88
  306. package/dist/pptx/editor/render/table-grid-fill.cjs +30 -0
  307. package/dist/pptx/editor/render/table-grid-fill.d.ts +34 -0
  308. package/dist/pptx/editor/render/table-grid-fill.d.ts.map +1 -0
  309. package/dist/pptx/editor/render/table-grid-fill.mjs +28 -0
  310. package/dist/pptx/editor/render/table-layout.cjs +6 -6
  311. package/dist/pptx/editor/render/table-layout.d.ts +2 -2
  312. package/dist/pptx/editor/render/table-layout.d.ts.map +1 -1
  313. package/dist/pptx/editor/render/table-layout.mjs +1 -1
  314. package/dist/pptx/editor/render/table-merge.cjs +5 -5
  315. package/dist/pptx/editor/render/table-merge.mjs +1 -1
  316. package/dist/pptx/editor/render/text-content-style.d.ts +2 -2
  317. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +2 -2
  318. package/dist/pptx/editor/render/text-style-scope.d.ts +2 -2
  319. package/dist/pptx/editor/render/update-text-segment-style.d.ts +2 -2
  320. package/dist/pptx/index.cjs +519 -201
  321. package/dist/pptx/index.d.ts +7 -7
  322. package/dist/pptx/index.mjs +5 -5
  323. package/dist/pptx/node/index.d.ts +1 -1
  324. package/dist/pptx/smartart-layouts/index.d.ts +2 -2
  325. package/dist/teams/index.cjs +35 -25
  326. package/dist/teams/index.mjs +35 -25
  327. package/dist/text/complex-breaks.d.ts +24 -0
  328. package/dist/text/complex-breaks.d.ts.map +1 -0
  329. package/dist/text/east-asian.d.ts +32 -0
  330. package/dist/text/east-asian.d.ts.map +1 -0
  331. package/dist/text/html-tokens.d.ts +45 -0
  332. package/dist/text/html-tokens.d.ts.map +1 -0
  333. package/dist/text/index.cjs +477 -62
  334. package/dist/text/index.d.ts +5 -0
  335. package/dist/text/index.d.ts.map +1 -1
  336. package/dist/text/index.mjs +456 -63
  337. package/dist/text/kinsoku.d.ts +55 -0
  338. package/dist/text/kinsoku.d.ts.map +1 -0
  339. package/dist/text/truetype/embedding.d.ts +42 -0
  340. package/dist/text/truetype/embedding.d.ts.map +1 -0
  341. package/dist/text/windows-1252.d.ts +10 -0
  342. package/dist/text/windows-1252.d.ts.map +1 -0
  343. package/dist/xlsx/collab/index.cjs +10 -6
  344. package/dist/xlsx/collab/index.mjs +10 -6
  345. package/dist/xlsx/edit/clipboard-html-parse.d.ts +1 -0
  346. package/dist/xlsx/edit/clipboard-html-parse.d.ts.map +1 -1
  347. package/dist/xlsx/formula/functions/text-convert.d.ts.map +1 -1
  348. package/dist/xlsx/index.cjs +96 -51
  349. package/dist/xlsx/index.mjs +96 -51
  350. package/dist/xlsx/load/index.cjs +10 -6
  351. package/dist/xlsx/load/index.mjs +10 -6
  352. package/dist/xlsx/ui/index.cjs +97 -52
  353. package/dist/xlsx/ui/index.mjs +97 -52
  354. package/package.json +1 -1
  355. package/dist/PptxHandler-72NTA5ZY.cjs +0 -14
  356. package/dist/PptxHandler-O4IJ3TKZ.mjs +0 -5
  357. package/dist/PresentationBuilder-ORM22QGC.mjs +0 -5
  358. package/dist/PresentationBuilder-T2ETYT3L.cjs +0 -22
  359. package/dist/chunk-X4RL5AZ7.cjs +0 -120
  360. package/dist/{chunk-PRGXRAAU.mjs → chunk-4Y76EAKK.mjs} +131 -131
  361. package/dist/{chunk-EN3KSEW5.cjs → chunk-MMULWQOM.cjs} +131 -131
@@ -13407,6 +13407,15 @@ var init_dash_pattern = __esm({
13407
13407
  }
13408
13408
  });
13409
13409
 
13410
+ // opc/safe-href.ts
13411
+ var OPEN_SCHEMES;
13412
+ var init_safe_href = __esm({
13413
+ "opc/safe-href.ts"() {
13414
+ OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
13415
+ /* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
13416
+ }
13417
+ });
13418
+
13410
13419
  // chart/region-map/value-color-positions.ts
13411
13420
  function schemaPosition(node, end) {
13412
13421
  for (const kind of ["number", "percent"]) {
@@ -69674,15 +69683,6 @@ var init_clone_part_graph = __esm({
69674
69683
  init_relationships();
69675
69684
  }
69676
69685
  });
69677
-
69678
- // opc/safe-href.ts
69679
- var OPEN_SCHEMES;
69680
- var init_safe_href = __esm({
69681
- "opc/safe-href.ts"() {
69682
- OPEN_SCHEMES = /* @__PURE__ */ new Set(["http", "https", "mailto"]);
69683
- /* @__PURE__ */ new Set([...OPEN_SCHEMES, "ftp", "file"]);
69684
- }
69685
- });
69686
69686
  var init_embedded_packages = __esm({
69687
69687
  "opc/embedded-packages.ts"() {
69688
69688
  }
@@ -102651,9 +102651,9 @@ var init_table_cell_fill_border_helpers = __esm({
102651
102651
  });
102652
102652
 
102653
102653
  // pptx/core/core/builders/table-cell-paragraphs.ts
102654
- function sizePt(runProperties3) {
102654
+ function sizePt(runProperties4) {
102655
102655
  const size = Number.parseInt(
102656
- String(runProperties3?.["@_sz"] ?? ""),
102656
+ String(runProperties4?.["@_sz"] ?? ""),
102657
102657
  10
102658
102658
  );
102659
102659
  return Number.isFinite(size) && size > 0 ? size / 100 : void 0;
@@ -102969,9 +102969,9 @@ var init_paragraph_sibling_order = __esm({
102969
102969
  });
102970
102970
 
102971
102971
  // pptx/core/core/builders/table-cell-runs.ts
102972
- function runFontFamily(runProperties3) {
102972
+ function runFontFamily(runProperties4) {
102973
102973
  for (const key2 of ["a:latin", "a:ea", "a:cs"]) {
102974
- const typeface = runProperties3?.[key2]?.["@_typeface"];
102974
+ const typeface = runProperties4?.[key2]?.["@_typeface"];
102975
102975
  const name = String(typeface ?? "").trim();
102976
102976
  if (name) {
102977
102977
  return name;
@@ -102979,45 +102979,45 @@ function runFontFamily(runProperties3) {
102979
102979
  }
102980
102980
  return void 0;
102981
102981
  }
102982
- function runLanguage(runProperties3) {
102983
- return String(runProperties3?.["@_lang"] ?? "").trim() || void 0;
102982
+ function runLanguage(runProperties4) {
102983
+ return String(runProperties4?.["@_lang"] ?? "").trim() || void 0;
102984
102984
  }
102985
- function applyRunProperties(run2, runProperties3, context) {
102986
- if (!runProperties3) {
102985
+ function applyRunProperties(run2, runProperties4, context) {
102986
+ if (!runProperties4) {
102987
102987
  return;
102988
102988
  }
102989
- if (runProperties3["@_b"] === "1") {
102989
+ if (runProperties4["@_b"] === "1") {
102990
102990
  run2.bold = true;
102991
102991
  }
102992
- if (runProperties3["@_i"] === "1") {
102992
+ if (runProperties4["@_i"] === "1") {
102993
102993
  run2.italic = true;
102994
102994
  }
102995
- const underline = runProperties3["@_u"];
102995
+ const underline = runProperties4["@_u"];
102996
102996
  if (underline !== void 0 && underline !== null && String(underline) !== "none") {
102997
102997
  run2.underline = true;
102998
102998
  }
102999
- if (runProperties3["@_strike"] && String(runProperties3["@_strike"]) !== "noStrike") {
102999
+ if (runProperties4["@_strike"] && String(runProperties4["@_strike"]) !== "noStrike") {
103000
103000
  run2.strikethrough = true;
103001
103001
  }
103002
- const size = parseInt(String(runProperties3["@_sz"] ?? ""), 10);
103002
+ const size = parseInt(String(runProperties4["@_sz"] ?? ""), 10);
103003
103003
  if (Number.isFinite(size) && size > 0) {
103004
103004
  run2.fontSize = size / 100;
103005
103005
  }
103006
- if (runProperties3["a:solidFill"]) {
103007
- const color3 = context.parseColor(runProperties3["a:solidFill"]);
103006
+ if (runProperties4["a:solidFill"]) {
103007
+ const color3 = context.parseColor(runProperties4["a:solidFill"]);
103008
103008
  if (color3) {
103009
103009
  run2.color = color3;
103010
103010
  }
103011
103011
  }
103012
- const fontFamily = runFontFamily(runProperties3);
103012
+ const fontFamily = runFontFamily(runProperties4);
103013
103013
  if (fontFamily) {
103014
103014
  run2.fontFamily = fontFamily;
103015
103015
  }
103016
- const baseline = parseInt(String(runProperties3["@_baseline"] ?? ""), 10);
103016
+ const baseline = parseInt(String(runProperties4["@_baseline"] ?? ""), 10);
103017
103017
  if (Number.isFinite(baseline) && baseline !== 0) {
103018
103018
  run2.baseline = baseline;
103019
103019
  }
103020
- const spacing2 = parseInt(String(runProperties3["@_spc"] ?? ""), 10);
103020
+ const spacing2 = parseInt(String(runProperties4["@_spc"] ?? ""), 10);
103021
103021
  if (Number.isFinite(spacing2) && spacing2 !== 0) {
103022
103022
  run2.characterSpacing = spacing2;
103023
103023
  }
@@ -103119,14 +103119,14 @@ function applyCellTextFormat(tableCell, style2, context) {
103119
103119
  hasStyle = true;
103120
103120
  }
103121
103121
  const firstRun = context.ensureArray(firstParagraph["a:r"])[0];
103122
- const runProperties3 = firstRun?.["a:rPr"];
103123
- if (!runProperties3) {
103122
+ const runProperties4 = firstRun?.["a:rPr"];
103123
+ if (!runProperties4) {
103124
103124
  if (!hasContent2(tableCell, context)) {
103125
103125
  hasStyle = applyEndParagraphSize(firstParagraph, style2) || hasStyle;
103126
103126
  }
103127
103127
  return hasStyle;
103128
103128
  }
103129
- hasStyle = applyRunProperties2(runProperties3, style2, context) || hasStyle;
103129
+ hasStyle = applyRunProperties2(runProperties4, style2, context) || hasStyle;
103130
103130
  return hasStyle;
103131
103131
  }
103132
103132
  function hasContent2(tableCell, context) {
@@ -103148,26 +103148,26 @@ function applyEndParagraphSize(paragraph2, style2) {
103148
103148
  style2.fontSize = size / 100;
103149
103149
  return true;
103150
103150
  }
103151
- function applyRunProperties2(runProperties3, style2, context) {
103151
+ function applyRunProperties2(runProperties4, style2, context) {
103152
103152
  let hasStyle = false;
103153
- if (runProperties3["@_b"] === "1") {
103153
+ if (runProperties4["@_b"] === "1") {
103154
103154
  style2.bold = true;
103155
103155
  hasStyle = true;
103156
103156
  }
103157
- if (runProperties3["@_i"] === "1") {
103157
+ if (runProperties4["@_i"] === "1") {
103158
103158
  style2.italic = true;
103159
103159
  hasStyle = true;
103160
103160
  }
103161
- if (runProperties3["@_u"] && runProperties3["@_u"] !== "none") {
103161
+ if (runProperties4["@_u"] && runProperties4["@_u"] !== "none") {
103162
103162
  style2.underline = true;
103163
103163
  hasStyle = true;
103164
103164
  }
103165
- if (runProperties3["@_sz"]) {
103166
- style2.fontSize = parseInt(String(runProperties3["@_sz"]), 10) / 100;
103165
+ if (runProperties4["@_sz"]) {
103166
+ style2.fontSize = parseInt(String(runProperties4["@_sz"]), 10) / 100;
103167
103167
  hasStyle = true;
103168
103168
  }
103169
- if (runProperties3["a:solidFill"]) {
103170
- const textColor = context.parseColor(runProperties3["a:solidFill"]);
103169
+ if (runProperties4["a:solidFill"]) {
103170
+ const textColor = context.parseColor(runProperties4["a:solidFill"]);
103171
103171
  if (textColor) {
103172
103172
  style2.color = textColor;
103173
103173
  hasStyle = true;
@@ -103175,7 +103175,7 @@ function applyRunProperties2(runProperties3, style2, context) {
103175
103175
  }
103176
103176
  for (const key2 of ["a:latin", "a:ea", "a:cs"]) {
103177
103177
  const typeface = String(
103178
- runProperties3[key2]?.["@_typeface"] ?? ""
103178
+ runProperties4[key2]?.["@_typeface"] ?? ""
103179
103179
  ).trim();
103180
103180
  if (typeface) {
103181
103181
  style2.fontFamily = typeface;
@@ -103183,11 +103183,11 @@ function applyRunProperties2(runProperties3, style2, context) {
103183
103183
  break;
103184
103184
  }
103185
103185
  }
103186
- hasStyle = applyTextEffects(runProperties3, style2, context) || hasStyle;
103186
+ hasStyle = applyTextEffects(runProperties4, style2, context) || hasStyle;
103187
103187
  return hasStyle;
103188
103188
  }
103189
- function applyTextEffects(runProperties3, style2, context) {
103190
- const effectLst = runProperties3["a:effectLst"];
103189
+ function applyTextEffects(runProperties4, style2, context) {
103190
+ const effectLst = runProperties4["a:effectLst"];
103191
103191
  if (!effectLst) {
103192
103192
  return false;
103193
103193
  }
@@ -132526,6 +132526,9 @@ function isEotFormat(data) {
132526
132526
  const magic = readUint16LE(data, EOT_MAGIC_OFFSET);
132527
132527
  return magic === EOT_MAGIC;
132528
132528
  }
132529
+ function readEotFsType(data) {
132530
+ return isEotFormat(data) ? readUint16LE(data, 32) : void 0;
132531
+ }
132529
132532
  function parseEotHeader(data) {
132530
132533
  if (!isEotFormat(data)) {
132531
132534
  return null;
@@ -132624,6 +132627,9 @@ var init_eot_parser = __esm({
132624
132627
  });
132625
132628
 
132626
132629
  // pptx/core/utils/deferred-embedded-font.ts
132630
+ function fsTypeField(source2) {
132631
+ return source2.fsType === void 0 ? {} : { fsType: source2.fsType };
132632
+ }
132627
132633
  function resolveEmbeddedFontGuid(source2) {
132628
132634
  if (isEotFormat(source2.originalPartBytes)) {
132629
132635
  return void 0;
@@ -132723,15 +132729,16 @@ function decodeEmbeddedFontPart(source2) {
132723
132729
  partPath,
132724
132730
  fontGuid,
132725
132731
  originalRId: source2.originalRId,
132726
- originalPartBytes
132732
+ originalPartBytes,
132733
+ ...fsTypeField(source2)
132727
132734
  };
132728
132735
  } catch {
132729
132736
  return null;
132730
132737
  }
132731
132738
  }
132732
- function createDeferredEmbeddedFont(source2) {
132739
+ function createDeferredEmbeddedFont(source2, options2 = {}) {
132733
132740
  const fontGuid = resolveEmbeddedFontGuid(source2);
132734
- let fields;
132741
+ let fields = options2.withheld ? { dataUrl: "", format: void 0, rawFontData: void 0 } : void 0;
132735
132742
  let pending;
132736
132743
  const decode = () => {
132737
132744
  if (!fields) {
@@ -132769,7 +132776,8 @@ function createDeferredEmbeddedFont(source2) {
132769
132776
  partPath: source2.partPath,
132770
132777
  fontGuid,
132771
132778
  originalRId: source2.originalRId,
132772
- originalPartBytes: source2.originalPartBytes
132779
+ originalPartBytes: source2.originalPartBytes,
132780
+ ...fsTypeField(source2)
132773
132781
  };
132774
132782
  Object.defineProperties(font, {
132775
132783
  load: {
@@ -132781,11 +132789,11 @@ function createDeferredEmbeddedFont(source2) {
132781
132789
  });
132782
132790
  return font;
132783
132791
  }
132792
+ function createWithheldEmbeddedFont(source2) {
132793
+ return createDeferredEmbeddedFont(source2, { withheld: true });
132794
+ }
132784
132795
  function shouldSaveEmbeddedFontVerbatim(font) {
132785
- if (font.isLoaded === void 0 || !font.originalPartBytes?.length) {
132786
- return false;
132787
- }
132788
- if (!font.originalRId || !font.partPath) {
132796
+ if (!font.originalPartBytes?.length || !font.originalRId || !font.partPath) {
132789
132797
  return false;
132790
132798
  }
132791
132799
  return font.isLoaded === false || !font.rawFontData?.length;
@@ -132797,6 +132805,99 @@ var init_deferred_embedded_font = __esm({
132797
132805
  }
132798
132806
  });
132799
132807
 
132808
+ // text/truetype/embedding.ts
132809
+ function embeddingPermission(fsType) {
132810
+ const licence = fsType & EDITABLE ? "editable" : fsType & PREVIEW_PRINT ? "preview-print" : fsType & RESTRICTED ? "restricted" : "installable";
132811
+ return {
132812
+ licence,
132813
+ noSubsetting: (fsType & NO_SUBSETTING) !== 0,
132814
+ bitmapOnly: (fsType & BITMAP_ONLY) !== 0
132815
+ };
132816
+ }
132817
+ function mayDisplayEmbeddedFont(permission) {
132818
+ return permission.licence !== "restricted";
132819
+ }
132820
+ function mayEmbedFontInEditableDocument(permission) {
132821
+ return (permission.licence === "installable" || permission.licence === "editable") && !permission.bitmapOnly;
132822
+ }
132823
+ function readSfntFsType(data, header) {
132824
+ const byte = (offset) => header && offset < header.length ? header[offset] : data[offset];
132825
+ const u16 = (offset) => {
132826
+ const hi = byte(offset);
132827
+ const lo = byte(offset + 1);
132828
+ return hi === void 0 || lo === void 0 ? void 0 : hi << 8 | lo;
132829
+ };
132830
+ const u32 = (offset) => {
132831
+ const hi = u16(offset);
132832
+ const lo = u16(offset + 2);
132833
+ return hi === void 0 || lo === void 0 ? void 0 : hi * 65536 + lo;
132834
+ };
132835
+ let base = 0;
132836
+ if (u32(0) === TTC_TAG) {
132837
+ const first2 = u32(12);
132838
+ if (first2 === void 0) return void 0;
132839
+ base = first2;
132840
+ }
132841
+ const version = u32(base);
132842
+ if (version === void 0 || !SFNT_VERSIONS.has(version)) return void 0;
132843
+ const numTables = u16(base + 4) ?? 0;
132844
+ for (let i2 = 0; i2 < numTables; i2++) {
132845
+ const record2 = base + 12 + i2 * 16;
132846
+ const tag2 = u32(record2);
132847
+ if (tag2 === void 0) return void 0;
132848
+ if (tag2 === OS2_TAG) {
132849
+ const offset = u32(record2 + 8);
132850
+ return offset === void 0 ? void 0 : u16(offset + 8);
132851
+ }
132852
+ }
132853
+ return void 0;
132854
+ }
132855
+ var RESTRICTED, PREVIEW_PRINT, EDITABLE, NO_SUBSETTING, BITMAP_ONLY, SFNT_VERSIONS, TTC_TAG, OS2_TAG;
132856
+ var init_embedding = __esm({
132857
+ "text/truetype/embedding.ts"() {
132858
+ RESTRICTED = 2;
132859
+ PREVIEW_PRINT = 4;
132860
+ EDITABLE = 8;
132861
+ NO_SUBSETTING = 256;
132862
+ BITMAP_ONLY = 512;
132863
+ SFNT_VERSIONS = /* @__PURE__ */ new Set([65536, 1330926671, 1953658213]);
132864
+ TTC_TAG = 1953784678;
132865
+ OS2_TAG = 1330851634;
132866
+ }
132867
+ });
132868
+
132869
+ // pptx/core/utils/embedded-font-permission.ts
132870
+ function readEmbeddedFontPartFsType(partBytes, guid) {
132871
+ const eot = readEotFsType(partBytes);
132872
+ if (eot !== void 0) {
132873
+ return eot;
132874
+ }
132875
+ if (!guid) {
132876
+ return readSfntFsType(partBytes);
132877
+ }
132878
+ const header = deobfuscateFont(
132879
+ partBytes.subarray(0, Math.min(partBytes.length, OBFUSCATED_HEADER_BYTES)),
132880
+ guid
132881
+ );
132882
+ return readSfntFsType(partBytes, header);
132883
+ }
132884
+ function mayDisplayFontWithFsType(fsType) {
132885
+ return fsType === void 0 || mayDisplayEmbeddedFont(embeddingPermission(fsType));
132886
+ }
132887
+ function mayNewlyEmbedFontData(font, fontData) {
132888
+ const fsType = readSfntFsType(fontData) ?? font.fsType;
132889
+ return fsType === void 0 || mayEmbedFontInEditableDocument(embeddingPermission(fsType));
132890
+ }
132891
+ var OBFUSCATED_HEADER_BYTES;
132892
+ var init_embedded_font_permission = __esm({
132893
+ "pptx/core/utils/embedded-font-permission.ts"() {
132894
+ init_embedding();
132895
+ init_eot_parser();
132896
+ init_font_deobfuscation();
132897
+ OBFUSCATED_HEADER_BYTES = 32;
132898
+ }
132899
+ });
132900
+
132800
132901
  // pptx/core/core/runtime/header-footer-parts.ts
132801
132902
  function asArray3(value) {
132802
132903
  if (Array.isArray(value)) {
@@ -158701,9 +158802,9 @@ function buildGroupPropertiesXml(rawGroupXml, xfrm) {
158701
158802
  if (!rawProps) {
158702
158803
  return { "a:xfrm": xfrm };
158703
158804
  }
158704
- const clone3 = cloneXmlNode(rawProps);
158705
- delete clone3["a:xfrm"];
158706
- return { "a:xfrm": xfrm, ...clone3 };
158805
+ const clone4 = cloneXmlNode(rawProps);
158806
+ delete clone4["a:xfrm"];
158807
+ return { "a:xfrm": xfrm, ...clone4 };
158707
158808
  }
158708
158809
  function appendGroupChildren2(grpXml2, entries) {
158709
158810
  const extLst = grpXml2["p:extLst"];
@@ -159889,8 +159990,8 @@ var init_PptxHandlerRuntimeTextRunEffects = __esm({
159889
159990
  * Parse hyperlink-related properties (a:hlinkClick, a:hlinkMouseOver) from
159890
159991
  * run-level XML and apply them to the given TextStyle.
159891
159992
  */
159892
- applyHyperlinkStyle(style2, runProperties3, relationshipMap) {
159893
- const hyperlinkNode = runProperties3["a:hlinkClick"];
159993
+ applyHyperlinkStyle(style2, runProperties4, relationshipMap) {
159994
+ const hyperlinkNode = runProperties4["a:hlinkClick"];
159894
159995
  const hyperlinkRelationshipId = String(
159895
159996
  hyperlinkNode?.["@_r:id"] || hyperlinkNode?.["@_id"] || ""
159896
159997
  ).trim();
@@ -159958,7 +160059,7 @@ var init_PptxHandlerRuntimeTextRunEffects = __esm({
159958
160059
  }
159959
160060
  }
159960
160061
  }
159961
- const hlinkMouseOver = runProperties3["a:hlinkMouseOver"];
160062
+ const hlinkMouseOver = runProperties4["a:hlinkMouseOver"];
159962
160063
  if (hlinkMouseOver) {
159963
160064
  const mouseOverRelId = String(
159964
160065
  hlinkMouseOver["@_r:id"] || hlinkMouseOver["@_id"] || ""
@@ -160206,8 +160307,8 @@ var init_PptxHandlerRuntimeTextRunEffects = __esm({
160206
160307
  * (e.g. `a:outerShdw`, `a:glow`, `a:alphaInv`) is captured opaquely as
160207
160308
  * raw XML so we don't duplicate the entire effect taxonomy here.
160208
160309
  */
160209
- applyTextRunEffectDag(style2, runProperties3) {
160210
- const effectDag = runProperties3["a:effectDag"];
160310
+ applyTextRunEffectDag(style2, runProperties4) {
160311
+ const effectDag = runProperties4["a:effectDag"];
160211
160312
  if (!effectDag) {
160212
160313
  return;
160213
160314
  }
@@ -160238,28 +160339,28 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
160238
160339
  "a:grpFill"
160239
160340
  ];
160240
160341
  PptxHandlerRuntime19 = class _PptxHandlerRuntime extends PptxHandlerRuntime18 {
160241
- extractTextRunStyle(runProperties3, align, relationshipMap, includeDefaultAlignment = true, slidePath) {
160342
+ extractTextRunStyle(runProperties4, align, relationshipMap, includeDefaultAlignment = true, slidePath) {
160242
160343
  const style2 = includeDefaultAlignment ? { align } : {};
160243
- if (!runProperties3) {
160344
+ if (!runProperties4) {
160244
160345
  return style2;
160245
160346
  }
160246
- if (runProperties3["@_sz"]) {
160247
- const points7 = parseInt(runProperties3["@_sz"]) / 100;
160347
+ if (runProperties4["@_sz"]) {
160348
+ const points7 = parseInt(runProperties4["@_sz"]) / 100;
160248
160349
  style2.fontSize = points7 * (96 / 72);
160249
160350
  }
160250
- const bold = this.parseOptionalBooleanAttr(runProperties3["@_b"]);
160351
+ const bold = this.parseOptionalBooleanAttr(runProperties4["@_b"]);
160251
160352
  if (bold !== void 0) {
160252
160353
  style2.bold = bold;
160253
160354
  }
160254
- const italic = this.parseOptionalBooleanAttr(runProperties3["@_i"]);
160355
+ const italic = this.parseOptionalBooleanAttr(runProperties4["@_i"]);
160255
160356
  if (italic !== void 0) {
160256
160357
  style2.italic = italic;
160257
160358
  }
160258
- if (runProperties3["@_u"] !== void 0) {
160259
- const underlineToken = String(runProperties3["@_u"] || "").trim().toLowerCase();
160359
+ if (runProperties4["@_u"] !== void 0) {
160360
+ const underlineToken = String(runProperties4["@_u"] || "").trim().toLowerCase();
160260
160361
  style2.underline = underlineToken.length > 0 && underlineToken !== "none" && underlineToken !== "0" && underlineToken !== "false";
160261
160362
  if (style2.underline) {
160262
- const rawU = String(runProperties3["@_u"] || "").trim();
160363
+ const rawU = String(runProperties4["@_u"] || "").trim();
160263
160364
  if (rawU.length > 0 && rawU !== "none") {
160264
160365
  style2.underlineStyle = rawU;
160265
160366
  }
@@ -160267,8 +160368,8 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
160267
160368
  style2.underlineExplicitNone = true;
160268
160369
  }
160269
160370
  }
160270
- const uFill = runProperties3["a:uFill"];
160271
- const uLn = runProperties3["a:uLn"];
160371
+ const uFill = runProperties4["a:uFill"];
160372
+ const uLn = runProperties4["a:uLn"];
160272
160373
  const underlineColorSource = uFill?.["a:solidFill"] || uLn?.["a:solidFill"];
160273
160374
  if (underlineColorSource) {
160274
160375
  const underlineColor = this.parseColor(underlineColorSource);
@@ -160310,20 +160411,20 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
160310
160411
  style2.underlineLine = line3;
160311
160412
  }
160312
160413
  }
160313
- if (runProperties3["a:uLnTx"] !== void 0) {
160414
+ if (runProperties4["a:uLnTx"] !== void 0) {
160314
160415
  style2.underlineLineFollowsText = true;
160315
160416
  }
160316
- if (runProperties3["a:uFillTx"] !== void 0) {
160417
+ if (runProperties4["a:uFillTx"] !== void 0) {
160317
160418
  style2.underlineFillFollowsText = true;
160318
160419
  }
160319
- if (runProperties3["@_strike"] !== void 0) {
160320
- const strikeToken = String(runProperties3["@_strike"] || "").trim().toLowerCase();
160420
+ if (runProperties4["@_strike"] !== void 0) {
160421
+ const strikeToken = String(runProperties4["@_strike"] || "").trim().toLowerCase();
160321
160422
  style2.strikethrough = strikeToken.length > 0 && strikeToken !== "nostrike" && strikeToken !== "none" && strikeToken !== "0" && strikeToken !== "false";
160322
160423
  if (style2.strikethrough) {
160323
160424
  style2.strikeType = strikeToken === "dblstrike" ? "dblStrike" : "sngStrike";
160324
160425
  }
160325
160426
  }
160326
- const textLn = runProperties3["a:ln"];
160427
+ const textLn = runProperties4["a:ln"];
160327
160428
  if (textLn) {
160328
160429
  const textOutlineW = Number.parseInt(String(textLn["@_w"] || ""), 10);
160329
160430
  if (Number.isFinite(textOutlineW) && textOutlineW > 0) {
@@ -160341,31 +160442,31 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
160341
160442
  }
160342
160443
  }
160343
160444
  }
160344
- if (runProperties3["a:noFill"] !== void 0) {
160445
+ if (runProperties4["a:noFill"] !== void 0) {
160345
160446
  style2.textFillNone = true;
160346
- } else if (TEXT_FILL_ELEMENTS.some((name) => runProperties3[name] !== void 0)) {
160447
+ } else if (TEXT_FILL_ELEMENTS.some((name) => runProperties4[name] !== void 0)) {
160347
160448
  style2.textFillNone = false;
160348
160449
  }
160349
- if (runProperties3["@_baseline"] !== void 0) {
160350
- const baselineVal = Number.parseInt(String(runProperties3["@_baseline"]), 10);
160450
+ if (runProperties4["@_baseline"] !== void 0) {
160451
+ const baselineVal = Number.parseInt(String(runProperties4["@_baseline"]), 10);
160351
160452
  if (Number.isFinite(baselineVal)) {
160352
160453
  style2.baseline = baselineVal;
160353
160454
  }
160354
160455
  }
160355
- if (runProperties3["@_spc"] !== void 0) {
160356
- const spcVal = Number.parseInt(String(runProperties3["@_spc"]), 10);
160456
+ if (runProperties4["@_spc"] !== void 0) {
160457
+ const spcVal = Number.parseInt(String(runProperties4["@_spc"]), 10);
160357
160458
  if (Number.isFinite(spcVal)) {
160358
160459
  style2.characterSpacing = spcVal;
160359
160460
  }
160360
160461
  }
160361
- if (runProperties3["@_kern"] !== void 0) {
160362
- const kernVal = Number.parseInt(String(runProperties3["@_kern"]), 10);
160462
+ if (runProperties4["@_kern"] !== void 0) {
160463
+ const kernVal = Number.parseInt(String(runProperties4["@_kern"]), 10);
160363
160464
  if (Number.isFinite(kernVal)) {
160364
160465
  style2.kerning = kernVal;
160365
160466
  }
160366
160467
  }
160367
- if (runProperties3["a:highlight"]) {
160368
- const highlightNode = xmlChild(runProperties3, "a:highlight");
160468
+ if (runProperties4["a:highlight"]) {
160469
+ const highlightNode = xmlChild(runProperties4, "a:highlight");
160369
160470
  const highlightHex = this.parseColor(highlightNode);
160370
160471
  if (highlightHex) {
160371
160472
  style2.highlightColor = highlightHex;
@@ -160375,7 +160476,7 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
160375
160476
  style2.highlightColorXml = highlightXml;
160376
160477
  }
160377
160478
  }
160378
- const textFillVariants = this.extractTextFillVariants(runProperties3);
160479
+ const textFillVariants = this.extractTextFillVariants(runProperties4);
160379
160480
  if (textFillVariants.textFillGradient) {
160380
160481
  style2.textFillGradient = textFillVariants.textFillGradient;
160381
160482
  style2.textFillGradientStops = textFillVariants.textFillGradientStops;
@@ -160401,14 +160502,14 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
160401
160502
  style2.textFillBlipMode = resolved.mode;
160402
160503
  }
160403
160504
  }
160404
- const rtlElement = runProperties3["a:rtl"];
160405
- const runRtl = rtlElement !== void 0 ? this.parseOptionalBooleanAttr(xmlAttr(xmlChild(runProperties3, "a:rtl"), "val")) ?? true : this.parseOptionalBooleanAttr(runProperties3["@_rtl"]);
160505
+ const rtlElement = runProperties4["a:rtl"];
160506
+ const runRtl = rtlElement !== void 0 ? this.parseOptionalBooleanAttr(xmlAttr(xmlChild(runProperties4, "a:rtl"), "val")) ?? true : this.parseOptionalBooleanAttr(runProperties4["@_rtl"]);
160406
160507
  if (runRtl !== void 0) {
160407
160508
  style2.rtl = runRtl;
160408
160509
  }
160409
- const latin = xmlChild(runProperties3, "a:latin");
160410
- const eastAsian = xmlChild(runProperties3, "a:ea");
160411
- const complexScript = xmlChild(runProperties3, "a:cs");
160510
+ const latin = xmlChild(runProperties4, "a:latin");
160511
+ const eastAsian = xmlChild(runProperties4, "a:ea");
160512
+ const complexScript = xmlChild(runProperties4, "a:cs");
160412
160513
  const latinTypefaceToken = xmlAttr(latin, "typeface");
160413
160514
  const eaTypefaceToken = xmlAttr(eastAsian, "typeface");
160414
160515
  const csTypefaceToken = xmlAttr(complexScript, "typeface");
@@ -160434,7 +160535,7 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
160434
160535
  if (csTypeface) {
160435
160536
  style2.complexScriptFont = csTypeface;
160436
160537
  }
160437
- const solidFill3 = xmlChild(runProperties3, "a:solidFill");
160538
+ const solidFill3 = xmlChild(runProperties4, "a:solidFill");
160438
160539
  if (solidFill3) {
160439
160540
  style2.color = this.parseColor(solidFill3);
160440
160541
  const colorXml2 = extractColorChoiceXml(solidFill3);
@@ -160446,59 +160547,59 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
160446
160547
  style2.colorRef = colorRef;
160447
160548
  }
160448
160549
  }
160449
- this.applyHyperlinkStyle(style2, runProperties3, relationshipMap);
160450
- const capAttr = String(runProperties3["@_cap"] || "").trim().toLowerCase();
160550
+ this.applyHyperlinkStyle(style2, runProperties4, relationshipMap);
160551
+ const capAttr = String(runProperties4["@_cap"] || "").trim().toLowerCase();
160451
160552
  if (capAttr === "all" || capAttr === "small") {
160452
160553
  style2.textCaps = capAttr;
160453
160554
  } else if (capAttr === "none") {
160454
160555
  style2.textCaps = "none";
160455
160556
  style2.textCapsExplicitNone = true;
160456
160557
  }
160457
- const symNode = xmlChild(runProperties3, "a:sym");
160558
+ const symNode = xmlChild(runProperties4, "a:sym");
160458
160559
  if (symNode) {
160459
160560
  const symTypeface = this.normalizeTypefaceToken(xmlAttr(symNode, "typeface") || "");
160460
160561
  if (symTypeface) {
160461
160562
  style2.symbolFont = symTypeface;
160462
160563
  }
160463
160564
  }
160464
- const langAttr = String(runProperties3["@_lang"] || "").trim();
160565
+ const langAttr = String(runProperties4["@_lang"] || "").trim();
160465
160566
  if (langAttr) {
160466
160567
  style2.language = langAttr;
160467
160568
  }
160468
- const kumimoji = this.parseOptionalBooleanAttr(runProperties3["@_kumimoji"]);
160569
+ const kumimoji = this.parseOptionalBooleanAttr(runProperties4["@_kumimoji"]);
160469
160570
  if (kumimoji !== void 0) {
160470
160571
  style2.kumimoji = kumimoji;
160471
160572
  }
160472
- const normalizeH = this.parseOptionalBooleanAttr(runProperties3["@_normalizeH"]);
160573
+ const normalizeH = this.parseOptionalBooleanAttr(runProperties4["@_normalizeH"]);
160473
160574
  if (normalizeH !== void 0) {
160474
160575
  style2.normalizeHeight = normalizeH;
160475
160576
  }
160476
- const noProof = this.parseOptionalBooleanAttr(runProperties3["@_noProof"]);
160577
+ const noProof = this.parseOptionalBooleanAttr(runProperties4["@_noProof"]);
160477
160578
  if (noProof !== void 0) {
160478
160579
  style2.noProof = noProof;
160479
160580
  }
160480
- const dirty = this.parseOptionalBooleanAttr(runProperties3["@_dirty"]);
160581
+ const dirty = this.parseOptionalBooleanAttr(runProperties4["@_dirty"]);
160481
160582
  if (dirty !== void 0) {
160482
160583
  style2.dirty = dirty;
160483
160584
  }
160484
- const err = this.parseOptionalBooleanAttr(runProperties3["@_err"]);
160585
+ const err = this.parseOptionalBooleanAttr(runProperties4["@_err"]);
160485
160586
  if (err !== void 0) {
160486
160587
  style2.spellingError = err;
160487
160588
  }
160488
- const smtClean = this.parseOptionalBooleanAttr(runProperties3["@_smtClean"]);
160589
+ const smtClean = this.parseOptionalBooleanAttr(runProperties4["@_smtClean"]);
160489
160590
  if (smtClean !== void 0) {
160490
160591
  style2.smartTagClean = smtClean;
160491
160592
  }
160492
- const bmk = String(runProperties3["@_bmk"] || "").trim();
160593
+ const bmk = String(runProperties4["@_bmk"] || "").trim();
160493
160594
  if (bmk) {
160494
160595
  style2.bookmark = bmk;
160495
160596
  }
160496
- const altLang = String(runProperties3["@_altLang"] || "").trim();
160597
+ const altLang = String(runProperties4["@_altLang"] || "").trim();
160497
160598
  if (altLang) {
160498
160599
  style2.altLanguage = altLang;
160499
160600
  }
160500
- if (runProperties3["@_smtId"] !== void 0) {
160501
- const smtIdRaw = Number.parseInt(String(runProperties3["@_smtId"]), 10);
160601
+ if (runProperties4["@_smtId"] !== void 0) {
160602
+ const smtIdRaw = Number.parseInt(String(runProperties4["@_smtId"]), 10);
160502
160603
  if (Number.isFinite(smtIdRaw)) {
160503
160604
  style2.smartTagId = smtIdRaw;
160504
160605
  }
@@ -160507,16 +160608,16 @@ var init_PptxHandlerRuntimeTextRunStyleExtraction = __esm({
160507
160608
  this.applyTextFontMetadata(style2, eastAsian, "eastAsia");
160508
160609
  this.applyTextFontMetadata(style2, complexScript, "complexScript");
160509
160610
  this.applyTextFontMetadata(style2, symNode, "symbol");
160510
- const runEffectList = runProperties3["a:effectLst"];
160611
+ const runEffectList = runProperties4["a:effectLst"];
160511
160612
  if (runEffectList && typeof runEffectList === "object") {
160512
160613
  this.applyTextRunEffects(style2, runEffectList);
160513
160614
  }
160514
160615
  if (includeDefaultAlignment && runEffectList !== void 0 && (typeof runEffectList !== "object" || Object.keys(runEffectList).length === 0)) {
160515
160616
  style2.textEffectsExplicitNone = true;
160516
160617
  }
160517
- this.applyTextRunEffectDag(style2, runProperties3);
160618
+ this.applyTextRunEffectDag(style2, runProperties4);
160518
160619
  if (includeDefaultAlignment) {
160519
- const runExtLst = runProperties3["a:extLst"];
160620
+ const runExtLst = runProperties4["a:extLst"];
160520
160621
  if (runExtLst && typeof runExtLst === "object") {
160521
160622
  style2.runPropertiesExtLstXml = runExtLst;
160522
160623
  }
@@ -160634,7 +160735,7 @@ var init_PptxHandlerRuntimeTextEditing = __esm({
160634
160735
  authoredRunStyle: authored,
160635
160736
  inheritedRunStyle: paragraphDefaultStyle
160636
160737
  });
160637
- const appendRunSegment = (value, runProperties3) => {
160738
+ const appendRunSegment = (value, runProperties4) => {
160638
160739
  if (value === void 0 || value === null) {
160639
160740
  return;
160640
160741
  }
@@ -160643,7 +160744,7 @@ var init_PptxHandlerRuntimeTextEditing = __esm({
160643
160744
  return;
160644
160745
  }
160645
160746
  const runStyle2 = withAuthoredSplit(
160646
- this.extractTextRunStyle(runProperties3, paragraphAlign, relationshipMap)
160747
+ this.extractTextRunStyle(runProperties4, paragraphAlign, relationshipMap)
160647
160748
  );
160648
160749
  segments.push({
160649
160750
  text: runText2,
@@ -161579,7 +161680,7 @@ var init_PptxHandlerRuntimeSaveTableStyles = __esm({
161579
161680
  * `paragraphs` gives each paragraph's own alignment; without it only the
161580
161681
  * first paragraph takes the cell's.
161581
161682
  */
161582
- writeTableCellStyle(xmlCell, style2, paragraphs) {
161683
+ writeTableCellStyle(xmlCell, style2, paragraphs, runsCarryFormatting = false) {
161583
161684
  const rawTcPr = xmlCell["a:tcPr"];
161584
161685
  const existingTcPr = rawTcPr && typeof rawTcPr === "object" ? rawTcPr : void 0;
161585
161686
  const tcPr = existingTcPr ?? {};
@@ -161626,7 +161727,7 @@ var init_PptxHandlerRuntimeSaveTableStyles = __esm({
161626
161727
  }
161627
161728
  delete tcPr["a:tcMar"];
161628
161729
  writeDiagonalBorders(tcPr, style2, _PptxHandlerRuntime.EMU_PER_PX);
161629
- if (!isRichCellTxBody(xmlCell["a:txBody"], this.ensureArray.bind(this))) {
161730
+ if (!runsCarryFormatting && !isRichCellTxBody(xmlCell["a:txBody"], this.ensureArray.bind(this))) {
161630
161731
  writeCellTextFormatting(xmlCell, style2, this.ensureArray.bind(this), paragraphs);
161631
161732
  }
161632
161733
  const reordered = reorderObjectKeys(tcPr, exports.TC_PR_BORDERS_ORDER);
@@ -162533,6 +162634,91 @@ var init_table_create_xml = __esm({
162533
162634
  }
162534
162635
  });
162535
162636
 
162637
+ // pptx/core/core/runtime/table-cell-run-style-xml.ts
162638
+ function setRunFlag(rPr, attribute7, value, on) {
162639
+ if (value) {
162640
+ rPr[attribute7] = on;
162641
+ } else {
162642
+ delete rPr[attribute7];
162643
+ }
162644
+ }
162645
+ function setRunLatinTypeface(rPr, typeface) {
162646
+ const existing = rPr["a:latin"];
162647
+ const latin = {
162648
+ ...existing && typeof existing === "object" ? existing : {},
162649
+ "@_typeface": typeface
162650
+ };
162651
+ const tail = [];
162652
+ for (const key2 of AFTER_LATIN) {
162653
+ if (key2 in rPr) {
162654
+ tail.push([key2, rPr[key2]]);
162655
+ delete rPr[key2];
162656
+ }
162657
+ }
162658
+ delete rPr["a:latin"];
162659
+ rPr["a:latin"] = latin;
162660
+ for (const [key2, value] of tail) {
162661
+ rPr[key2] = value;
162662
+ }
162663
+ }
162664
+ function applyCellRunStyleUpdates(rPr, styleUpdates) {
162665
+ if ("bold" in styleUpdates) {
162666
+ setRunFlag(rPr, "@_b", styleUpdates.bold, "1");
162667
+ }
162668
+ if ("italic" in styleUpdates) {
162669
+ setRunFlag(rPr, "@_i", styleUpdates.italic, "1");
162670
+ }
162671
+ if ("underline" in styleUpdates) {
162672
+ setRunFlag(rPr, "@_u", styleUpdates.underline, "sng");
162673
+ }
162674
+ if ("strikethrough" in styleUpdates) {
162675
+ setRunFlag(rPr, "@_strike", styleUpdates.strikethrough, "sngStrike");
162676
+ }
162677
+ if (typeof styleUpdates.fontSize === "number" && styleUpdates.fontSize > 0) {
162678
+ rPr["@_sz"] = String(Math.round(styleUpdates.fontSize * 100));
162679
+ }
162680
+ if ("color" in styleUpdates && typeof styleUpdates.color === "string") {
162681
+ const hex3 = styleUpdates.color.replace("#", "");
162682
+ const tail = [];
162683
+ for (const key2 of Object.keys(rPr)) {
162684
+ if (key2.startsWith("a:") && !["a:ln"].includes(key2)) {
162685
+ tail.push([key2, rPr[key2]]);
162686
+ delete rPr[key2];
162687
+ }
162688
+ }
162689
+ rPr["a:solidFill"] = { "a:srgbClr": { "@_val": hex3 } };
162690
+ for (const [key2, value] of tail) {
162691
+ if (![
162692
+ "a:solidFill",
162693
+ "a:noFill",
162694
+ "a:gradFill",
162695
+ "a:pattFill",
162696
+ "a:blipFill",
162697
+ "a:grpFill"
162698
+ ].includes(key2)) {
162699
+ rPr[key2] = value;
162700
+ }
162701
+ }
162702
+ }
162703
+ if (typeof styleUpdates.fontFamily === "string" && styleUpdates.fontFamily) {
162704
+ setRunLatinTypeface(rPr, styleUpdates.fontFamily);
162705
+ }
162706
+ }
162707
+ var AFTER_LATIN;
162708
+ var init_table_cell_run_style_xml = __esm({
162709
+ "pptx/core/core/runtime/table-cell-run-style-xml.ts"() {
162710
+ AFTER_LATIN = [
162711
+ "a:ea",
162712
+ "a:cs",
162713
+ "a:sym",
162714
+ "a:hlinkClick",
162715
+ "a:hlinkMouseOver",
162716
+ "a:rtl",
162717
+ "a:extLst"
162718
+ ];
162719
+ }
162720
+ });
162721
+
162536
162722
  // pptx/core/core/runtime/table-structure-edit-xml.ts
162537
162723
  function cells(row) {
162538
162724
  return ensureArray19(row["a:tc"]);
@@ -162741,74 +162927,11 @@ function updateCellTextStyleInRawXml(element2, rowIndex, colIndex, styleUpdates)
162741
162927
  }
162742
162928
  const runs = ensureArray19(paragraph2["a:r"]);
162743
162929
  for (const run2 of runs) {
162744
- const rPr = ensureXmlChildOrCreate(run2, "a:rPr", "first");
162745
- if ("bold" in styleUpdates) {
162746
- if (styleUpdates.bold) {
162747
- rPr["@_b"] = "1";
162748
- } else {
162749
- delete rPr["@_b"];
162750
- }
162751
- }
162752
- if ("italic" in styleUpdates) {
162753
- if (styleUpdates.italic) {
162754
- rPr["@_i"] = "1";
162755
- } else {
162756
- delete rPr["@_i"];
162757
- }
162758
- }
162759
- if ("underline" in styleUpdates) {
162760
- if (styleUpdates.underline) {
162761
- rPr["@_u"] = "sng";
162762
- } else {
162763
- delete rPr["@_u"];
162764
- }
162765
- }
162766
- if ("strikethrough" in styleUpdates) {
162767
- if (styleUpdates.strikethrough) {
162768
- rPr["@_strike"] = "sngStrike";
162769
- } else {
162770
- delete rPr["@_strike"];
162771
- }
162772
- }
162773
- if ("color" in styleUpdates && typeof styleUpdates.color === "string") {
162774
- const hex3 = styleUpdates.color.replace("#", "");
162775
- rPr["a:solidFill"] = { "a:srgbClr": { "@_val": hex3 } };
162776
- }
162930
+ applyCellRunStyleUpdates(ensureXmlChildOrCreate(run2, "a:rPr", "first"), styleUpdates);
162777
162931
  }
162778
162932
  const endRPr = runs.length === 0 ? ensureXmlChild(paragraph2, "a:endParaRPr") : void 0;
162779
162933
  if (endRPr) {
162780
- if ("bold" in styleUpdates) {
162781
- if (styleUpdates.bold) {
162782
- endRPr["@_b"] = "1";
162783
- } else {
162784
- delete endRPr["@_b"];
162785
- }
162786
- }
162787
- if ("italic" in styleUpdates) {
162788
- if (styleUpdates.italic) {
162789
- endRPr["@_i"] = "1";
162790
- } else {
162791
- delete endRPr["@_i"];
162792
- }
162793
- }
162794
- if ("underline" in styleUpdates) {
162795
- if (styleUpdates.underline) {
162796
- endRPr["@_u"] = "sng";
162797
- } else {
162798
- delete endRPr["@_u"];
162799
- }
162800
- }
162801
- if ("strikethrough" in styleUpdates) {
162802
- if (styleUpdates.strikethrough) {
162803
- endRPr["@_strike"] = "sngStrike";
162804
- } else {
162805
- delete endRPr["@_strike"];
162806
- }
162807
- }
162808
- if ("color" in styleUpdates && typeof styleUpdates.color === "string") {
162809
- const hex3 = styleUpdates.color.replace("#", "");
162810
- endRPr["a:solidFill"] = { "a:srgbClr": { "@_val": hex3 } };
162811
- }
162934
+ applyCellRunStyleUpdates(endRPr, styleUpdates);
162812
162935
  }
162813
162936
  }
162814
162937
  return newRawXml;
@@ -162860,6 +162983,7 @@ function updateMergeAttrsInRawXml(element2, tableData) {
162860
162983
  var init_table_cell_rawxml_ops = __esm({
162861
162984
  "pptx/core/core/runtime/table-cell-rawxml-ops.ts"() {
162862
162985
  init_xml_access();
162986
+ init_table_cell_run_style_xml();
162863
162987
  init_table_cell_text_xml();
162864
162988
  init_table_structural_helpers();
162865
162989
  init_table_structure_rawxml();
@@ -163141,9 +163265,11 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
163141
163265
  */
163142
163266
  serializeTableDataToXml(shape3, tableData, writeRichCellText) {
163143
163267
  const writeCellText = (xmlCell, cell3) => {
163144
- if (!writeRichCellText?.(xmlCell, cell3)) {
163145
- this.writeTableCellText(xmlCell, cell3.text);
163268
+ if (writeRichCellText?.(xmlCell, cell3)) {
163269
+ return true;
163146
163270
  }
163271
+ this.writeTableCellText(xmlCell, cell3.text);
163272
+ return false;
163147
163273
  };
163148
163274
  try {
163149
163275
  const graphicData = xmlPath(shape3, "a:graphic", "a:graphicData");
@@ -163181,14 +163307,12 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
163181
163307
  if (!xmlCell) {
163182
163308
  continue;
163183
163309
  }
163184
- if (cell3.text !== void 0) {
163185
- writeCellText(xmlCell, cell3);
163186
- }
163310
+ const richText = cell3.text !== void 0 && writeCellText(xmlCell, cell3);
163187
163311
  if (styleChanged) {
163188
163312
  clearCellFormattingForStyleChange(xmlCell, cell3.style);
163189
163313
  }
163190
163314
  if (cell3.style) {
163191
- this.writeTableCellStyle(xmlCell, cell3.style, cell3.paragraphs);
163315
+ this.writeTableCellStyle(xmlCell, cell3.style, cell3.paragraphs, richText);
163192
163316
  }
163193
163317
  serializeCellExtraAttributes(xmlCell, cell3.extraAttributes);
163194
163318
  }
@@ -163207,14 +163331,12 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
163207
163331
  const cell3 = dataRow.cells[cIdx];
163208
163332
  const xmlCell = xmlCells[cIdx];
163209
163333
  serializeCellMergeAttributes(xmlCell, cell3);
163210
- if (cell3.text !== void 0) {
163211
- writeCellText(xmlCell, cell3);
163212
- }
163334
+ const richText = cell3.text !== void 0 && writeCellText(xmlCell, cell3);
163213
163335
  if (styleChanged) {
163214
163336
  clearCellFormattingForStyleChange(xmlCell, cell3.style);
163215
163337
  }
163216
163338
  if (cell3.style) {
163217
- this.writeTableCellStyle(xmlCell, cell3.style, cell3.paragraphs);
163339
+ this.writeTableCellStyle(xmlCell, cell3.style, cell3.paragraphs, richText);
163218
163340
  }
163219
163341
  serializeCellExtraAttributes(xmlCell, cell3.extraAttributes);
163220
163342
  recordTableParagraphOrder(xmlCell, cell3.textRuns);
@@ -164384,37 +164506,37 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
164384
164506
  */
164385
164507
  buildNewSeriesXml(seriesIndex, seriesData, categories, templateSeries, dateCategories, isLineFamily = false) {
164386
164508
  if (templateSeries) {
164387
- const clone3 = JSON.parse(JSON.stringify(templateSeries));
164388
- regenerateClonedUniqueId(clone3, (key2) => this.compatibilityService.getXmlLocalName(key2));
164389
- const idxNode = this.xmlLookupService.getChildByLocalName(clone3, "idx");
164509
+ const clone4 = JSON.parse(JSON.stringify(templateSeries));
164510
+ regenerateClonedUniqueId(clone4, (key2) => this.compatibilityService.getXmlLocalName(key2));
164511
+ const idxNode = this.xmlLookupService.getChildByLocalName(clone4, "idx");
164390
164512
  if (idxNode) {
164391
164513
  idxNode["@_val"] = String(seriesIndex);
164392
164514
  }
164393
- const orderNode = this.xmlLookupService.getChildByLocalName(clone3, "order");
164515
+ const orderNode = this.xmlLookupService.getChildByLocalName(clone4, "order");
164394
164516
  if (orderNode) {
164395
164517
  orderNode["@_val"] = String(seriesIndex);
164396
164518
  }
164397
- const txNode = this.xmlLookupService.getChildByLocalName(clone3, "tx");
164519
+ const txNode = this.xmlLookupService.getChildByLocalName(clone4, "tx");
164398
164520
  if (txNode) {
164399
164521
  this.updateChartCacheValues(txNode, false, [seriesData.name]);
164400
164522
  }
164401
- const catNode = this.xmlLookupService.getChildByLocalName(clone3, "cat") || this.xmlLookupService.getChildByLocalName(clone3, "xVal");
164523
+ const catNode = this.xmlLookupService.getChildByLocalName(clone4, "cat") || this.xmlLookupService.getChildByLocalName(clone4, "xVal");
164402
164524
  if (catNode) {
164403
164525
  const dateValues = dateCategories?.values.map(String);
164404
164526
  this.updateChartCacheValues(catNode, Boolean(dateValues), dateValues ?? categories);
164405
164527
  }
164406
- const valNode = this.xmlLookupService.getChildByLocalName(clone3, "val") || this.xmlLookupService.getChildByLocalName(clone3, "yVal");
164528
+ const valNode = this.xmlLookupService.getChildByLocalName(clone4, "val") || this.xmlLookupService.getChildByLocalName(clone4, "yVal");
164407
164529
  if (valNode) {
164408
164530
  this.updateChartCacheValues(valNode, true, seriesData.values.map(String));
164409
164531
  }
164410
164532
  applySeriesGradientToXml(
164411
- clone3,
164533
+ clone4,
164412
164534
  seriesData.gradientFill,
164413
164535
  (key2) => this.compatibilityService.getXmlLocalName(key2),
164414
164536
  this.chartGradientWriteOptions(isLineFamily)
164415
164537
  );
164416
164538
  if (seriesData.color && !(seriesData.gradientFill && !isLineFamily)) {
164417
- const spPr = this.xmlLookupService.getChildByLocalName(clone3, "spPr");
164539
+ const spPr = this.xmlLookupService.getChildByLocalName(clone4, "spPr");
164418
164540
  if (spPr) {
164419
164541
  writeSeriesColorToSpPr(
164420
164542
  spPr,
@@ -164425,7 +164547,7 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
164425
164547
  );
164426
164548
  }
164427
164549
  }
164428
- return clone3;
164550
+ return clone4;
164429
164551
  }
164430
164552
  const colorHex = (seriesData.color || "#4472C4").replace("#", "");
164431
164553
  const ser = {
@@ -165251,6 +165373,7 @@ var init_PptxHandlerRuntimeSaveDocumentParts = __esm({
165251
165373
  init_customer_data_package();
165252
165374
  init_deferred_embedded_font();
165253
165375
  init_embedded_font_list();
165376
+ init_embedded_font_permission();
165254
165377
  init_font_deobfuscation();
165255
165378
  init_safe_path();
165256
165379
  init_smartart_connector_labels();
@@ -165815,6 +165938,15 @@ var init_PptxHandlerRuntimeSaveDocumentParts = __esm({
165815
165938
  rId = variant.originalRId;
165816
165939
  bytesToWrite = variant.originalPartBytes;
165817
165940
  } else {
165941
+ if (!mayNewlyEmbedFontData(variant, fontData)) {
165942
+ this.compatibilityService.reportWarning({
165943
+ code: "EMBEDDED_FONT_NOT_EMBEDDABLE",
165944
+ message: `Font "${typeface}" was not embedded: its licence (OS/2 fsType) does not allow embedding it in an editable presentation.`,
165945
+ scope: "save",
165946
+ xmlPath: `/p:presentation/p:embeddedFontLst/p:embeddedFont[@typeface="${typeface}"]`
165947
+ });
165948
+ continue;
165949
+ }
165818
165950
  guid = variant.fontGuid ?? generateFontGuid();
165819
165951
  const fileName = `{${guid}}.fntdata`;
165820
165952
  fontPartPath = `ppt/fonts/${fileName}`;
@@ -165839,6 +165971,9 @@ var init_PptxHandlerRuntimeSaveDocumentParts = __esm({
165839
165971
  const variantKey = variant.bold && variant.italic ? "p:boldItalic" : variant.bold ? "p:bold" : variant.italic ? "p:italic" : "p:regular";
165840
165972
  entry2[variantKey] = { "@_r:id": rId };
165841
165973
  }
165974
+ if (Object.keys(entry2).length === 1) {
165975
+ continue;
165976
+ }
165842
165977
  embeddedFontEntries.push(entry2);
165843
165978
  }
165844
165979
  relsRoot.Relationship = relationships3;
@@ -165849,7 +165984,10 @@ var init_PptxHandlerRuntimeSaveDocumentParts = __esm({
165849
165984
  "p:embeddedFont": embeddedFontEntries.length === 1 ? embeddedFontEntries[0] : embeddedFontEntries
165850
165985
  };
165851
165986
  const metadata = explicitFontList ? serializeEmbeddedFontList(explicitFontList) : explicitFonts === void 0 && this.loadedEmbeddedFontList ? serializeEmbeddedFontList(this.loadedEmbeddedFontList) : generatedList;
165852
- setEmbeddedFontList(this.presentationData, metadata);
165987
+ setEmbeddedFontList(
165988
+ this.presentationData,
165989
+ metadata === generatedList && embeddedFontEntries.length === 0 ? null : metadata
165990
+ );
165853
165991
  }
165854
165992
  const ctXml = await this.zip.file("[Content_Types].xml")?.async("string");
165855
165993
  if (ctXml) {
@@ -167367,6 +167505,161 @@ var init_save_picture_fill = __esm({
167367
167505
  }
167368
167506
  });
167369
167507
 
167508
+ // pptx/core/core/runtime/table-cell-rich-xml.ts
167509
+ function hasTableCellSource(segments) {
167510
+ return segments.some((segment) => segment.tableRun || segment.tableParagraph);
167511
+ }
167512
+ function clone3(value) {
167513
+ return value === void 0 ? value : structuredClone(value);
167514
+ }
167515
+ function sourceRunProperties(source2) {
167516
+ const rPr = source2.xml["a:rPr"];
167517
+ if (rPr === void 0) {
167518
+ return void 0;
167519
+ }
167520
+ return rPr && typeof rPr === "object" ? clone3(rPr) : {};
167521
+ }
167522
+ function runProperties3(segment, source2) {
167523
+ const rPr = sourceRunProperties(source2);
167524
+ const before = source2.style;
167525
+ const after = segment.style ?? {};
167526
+ const updates = {};
167527
+ for (const key2 of DIFF_KEYS) {
167528
+ if (before[key2] !== after[key2]) {
167529
+ updates[key2] = after[key2];
167530
+ }
167531
+ }
167532
+ if (Object.keys(updates).length === 0) {
167533
+ return rPr;
167534
+ }
167535
+ const target = rPr ?? {};
167536
+ if (typeof updates.fontSize === "number") {
167537
+ updates.fontSize = Math.round(updates.fontSize * PT_PER_PX3 * 100) / 100;
167538
+ }
167539
+ applyCellRunStyleUpdates(target, updates);
167540
+ const off = {
167541
+ bold: ["@_b", "0"],
167542
+ italic: ["@_i", "0"],
167543
+ underline: ["@_u", "none"],
167544
+ strikethrough: ["@_strike", "noStrike"]
167545
+ };
167546
+ for (const [key2, [attribute7, value]] of Object.entries(off)) {
167547
+ if (key2 in updates && updates[key2] === false) {
167548
+ target[attribute7] = value;
167549
+ }
167550
+ }
167551
+ if ("baseline" in updates) {
167552
+ if (updates.baseline) {
167553
+ target["@_baseline"] = String(updates.baseline);
167554
+ } else {
167555
+ delete target["@_baseline"];
167556
+ }
167557
+ }
167558
+ if ("characterSpacing" in updates) {
167559
+ if (updates.characterSpacing) {
167560
+ target["@_spc"] = String(updates.characterSpacing);
167561
+ } else {
167562
+ delete target["@_spc"];
167563
+ }
167564
+ }
167565
+ return target;
167566
+ }
167567
+ function textRun2(rPr, text2) {
167568
+ const run2 = {};
167569
+ if (rPr !== void 0) {
167570
+ run2["a:rPr"] = rPr;
167571
+ }
167572
+ run2["a:t"] = text2;
167573
+ return run2;
167574
+ }
167575
+ function segmentChild(segment, runPropertiesFromStyle) {
167576
+ const source2 = segment.tableRun;
167577
+ if (segment.isLineBreak) {
167578
+ const br = source2?.tag === "a:br" && source2.xml ? clone3(source2.xml) : {};
167579
+ return { tag: "a:br", value: br && typeof br === "object" ? br : {} };
167580
+ }
167581
+ if (!segment.text) {
167582
+ return void 0;
167583
+ }
167584
+ if (!source2 || source2.tag === "a:br") {
167585
+ return {
167586
+ tag: "a:r",
167587
+ value: textRun2(runPropertiesFromStyle(segment.style ?? {}), segment.text)
167588
+ };
167589
+ }
167590
+ const rPr = runProperties3(segment, source2);
167591
+ const unchangedField = source2.tag === "a:fld" && segment.fieldType !== void 0 && segment.text === (xmlText(source2.xml["a:t"]) ?? "");
167592
+ if (!unchangedField) {
167593
+ return { tag: "a:r", value: textRun2(rPr, segment.text) };
167594
+ }
167595
+ const field = {};
167596
+ for (const [key2, value] of Object.entries(source2.xml)) {
167597
+ if (key2.startsWith("@_")) {
167598
+ field[key2] = value;
167599
+ }
167600
+ }
167601
+ if (rPr !== void 0) {
167602
+ field["a:rPr"] = rPr;
167603
+ }
167604
+ if (source2.xml["a:pPr"] !== void 0) {
167605
+ field["a:pPr"] = clone3(source2.xml["a:pPr"]);
167606
+ }
167607
+ field["a:t"] = segment.text;
167608
+ return { tag: "a:fld", value: field };
167609
+ }
167610
+ function paragraphsOf(segments) {
167611
+ const paragraphs = [[]];
167612
+ for (const segment of segments) {
167613
+ if (segment.isParagraphBreak) {
167614
+ paragraphs.push([]);
167615
+ } else {
167616
+ paragraphs.at(-1).push(segment);
167617
+ }
167618
+ }
167619
+ return paragraphs;
167620
+ }
167621
+ function buildRichCellParagraphs(segments, runPropertiesFromStyle) {
167622
+ let lastSource;
167623
+ return paragraphsOf(segments).map((paragraphSegments) => {
167624
+ const source2 = paragraphSegments.find((segment) => segment.tableParagraph)?.tableParagraph;
167625
+ const layout = source2 ?? lastSource;
167626
+ lastSource = layout;
167627
+ const paragraph2 = {};
167628
+ if (layout?.["a:pPr"] !== void 0) {
167629
+ paragraph2["a:pPr"] = clone3(layout["a:pPr"]);
167630
+ }
167631
+ const children17 = paragraphSegments.flatMap((segment) => {
167632
+ const child34 = segmentChild(segment, runPropertiesFromStyle);
167633
+ return child34 ? [child34] : [];
167634
+ });
167635
+ writeParagraphChildren(paragraph2, children17);
167636
+ if (layout?.["a:endParaRPr"] !== void 0) {
167637
+ paragraph2["a:endParaRPr"] = clone3(layout["a:endParaRPr"]);
167638
+ }
167639
+ return paragraph2;
167640
+ });
167641
+ }
167642
+ var PT_PER_PX3, DIFF_KEYS;
167643
+ var init_table_cell_rich_xml = __esm({
167644
+ "pptx/core/core/runtime/table-cell-rich-xml.ts"() {
167645
+ init_utils();
167646
+ init_paragraph_child_assembly();
167647
+ init_table_cell_run_style_xml();
167648
+ PT_PER_PX3 = 72 / 96;
167649
+ DIFF_KEYS = [
167650
+ "bold",
167651
+ "italic",
167652
+ "underline",
167653
+ "strikethrough",
167654
+ "color",
167655
+ "fontFamily",
167656
+ "fontSize",
167657
+ "baseline",
167658
+ "characterSpacing"
167659
+ ];
167660
+ }
167661
+ });
167662
+
167370
167663
  // pptx/core/core/runtime/table-cell-segments-xml.ts
167371
167664
  function tableCellSegmentsText(segments) {
167372
167665
  return segments.map((segment) => segment.isParagraphBreak ? "\n" : segment.text ?? "").join("");
@@ -167417,6 +167710,7 @@ var init_PptxHandlerRuntimeSaveElementEmbedding = __esm({
167417
167710
  init_PptxHandlerRuntimeSaveTextWriter();
167418
167711
  init_save_picture_geometry_gate();
167419
167712
  init_save_picture_fill();
167713
+ init_table_cell_rich_xml();
167420
167714
  init_table_cell_segments_xml();
167421
167715
  PptxHandlerRuntime32 = class _PptxHandlerRuntime extends PptxHandlerRuntime31 {
167422
167716
  /** Serialize table, chart, and SmartArt data when applicable. */
@@ -167449,6 +167743,16 @@ var init_PptxHandlerRuntimeSaveElementEmbedding = __esm({
167449
167743
  if (!segments) {
167450
167744
  return false;
167451
167745
  }
167746
+ if (hasTableCellSource(segments)) {
167747
+ xmlCell["a:txBody"] = buildCellTextBody(
167748
+ xmlCell["a:txBody"],
167749
+ buildRichCellParagraphs(
167750
+ segments,
167751
+ (style2) => this.createRunPropertiesFromTextStyle(style2, links?.resolveHyperlinkRelationshipId)
167752
+ )
167753
+ );
167754
+ return true;
167755
+ }
167452
167756
  const paragraphs = this.createParagraphsFromTextContent(
167453
167757
  cell3.text,
167454
167758
  cell3.style?.align ? { align: cell3.style.align } : void 0,
@@ -184790,6 +185094,7 @@ var PptxHandlerRuntime99;
184790
185094
  var init_PptxHandlerRuntimeEmbeddedFonts = __esm({
184791
185095
  "pptx/core/core/runtime/PptxHandlerRuntimeEmbeddedFonts.ts"() {
184792
185096
  init_deferred_embedded_font();
185097
+ init_embedded_font_permission();
184793
185098
  init_layout_display_name();
184794
185099
  init_strip_parent_dir_segments();
184795
185100
  init_xml_access();
@@ -184893,6 +185198,19 @@ var init_PptxHandlerRuntimeEmbeddedFonts = __esm({
184893
185198
  originalPartBytes: new Uint8Array(fontBinary),
184894
185199
  fontKey
184895
185200
  };
185201
+ source2.fsType = readEmbeddedFontPartFsType(
185202
+ source2.originalPartBytes,
185203
+ resolveEmbeddedFontGuid(source2)
185204
+ );
185205
+ if (!mayDisplayFontWithFsType(source2.fsType)) {
185206
+ this.compatibilityService.reportWarning({
185207
+ code: "EMBEDDED_FONT_RESTRICTED",
185208
+ message: `Embedded font "${typeface}" has a restricted licence (OS/2 fsType) and is not used for display; its font part is kept unchanged on save.`,
185209
+ scope: "presentation",
185210
+ xmlPath: fontPath
185211
+ });
185212
+ return createWithheldEmbeddedFont(source2);
185213
+ }
184896
185214
  if (this.eagerDecodeEmbeddedFonts) {
184897
185215
  return decodeEmbeddedFontPart(source2);
184898
185216
  }
@@ -186765,9 +187083,9 @@ var init_PptxHandlerRuntimeFactory = __esm({
186765
187083
 
186766
187084
  // pptx/core/core/runtime/table-style-editor.ts
186767
187085
  function deepClone(value) {
186768
- const clone3 = globalThis.structuredClone;
186769
- if (clone3) {
186770
- return clone3(value);
187086
+ const clone4 = globalThis.structuredClone;
187087
+ if (clone4) {
187088
+ return clone4(value);
186771
187089
  }
186772
187090
  return JSON.parse(JSON.stringify(value));
186773
187091
  }