ooxml-core 1.12.2 → 1.14.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 (682) hide show
  1. package/dist/PptxHandler-5YP75BPO.cjs +12 -0
  2. package/dist/PptxHandler-GT5Q66TG.mjs +3 -0
  3. package/dist/{PptxHandler-FIN6XDTI.mjs → PptxHandler-KNBFECUE.mjs} +3 -3
  4. package/dist/PresentationBuilder-5DCCFHWJ.mjs +7 -0
  5. package/dist/PresentationBuilder-CVM6LJ7L.mjs +3 -0
  6. package/dist/PresentationBuilder-II7C4A3R.cjs +20 -0
  7. package/dist/automation/docx.d.ts +18 -0
  8. package/dist/automation/docx.d.ts.map +1 -1
  9. package/dist/automation/index.cjs +22549 -8585
  10. package/dist/automation/index.d.ts +1 -0
  11. package/dist/automation/index.d.ts.map +1 -1
  12. package/dist/automation/index.mjs +22546 -8586
  13. package/dist/automation/node.cjs +66 -6
  14. package/dist/automation/node.d.ts +10 -0
  15. package/dist/automation/node.d.ts.map +1 -1
  16. package/dist/automation/node.mjs +67 -7
  17. package/dist/automation/outline.d.ts +29 -0
  18. package/dist/automation/outline.d.ts.map +1 -0
  19. package/dist/automation/xlsx.d.ts +21 -0
  20. package/dist/automation/xlsx.d.ts.map +1 -1
  21. package/dist/chart/auto-title.d.ts +31 -0
  22. package/dist/chart/auto-title.d.ts.map +1 -0
  23. package/dist/chart/axis-format.d.ts +13 -0
  24. package/dist/chart/axis-format.d.ts.map +1 -0
  25. package/dist/chart/bubble-radius.d.ts +30 -0
  26. package/dist/chart/bubble-radius.d.ts.map +1 -0
  27. package/dist/chart/error-bar-amount.d.ts +22 -0
  28. package/dist/chart/error-bar-amount.d.ts.map +1 -0
  29. package/dist/chart/hierarchy.d.ts +69 -0
  30. package/dist/chart/hierarchy.d.ts.map +1 -0
  31. package/dist/chart/index.cjs +2377 -527
  32. package/dist/chart/index.d.ts +12 -0
  33. package/dist/chart/index.d.ts.map +1 -1
  34. package/dist/chart/index.mjs +2338 -528
  35. package/dist/chart/model-analysis.d.ts +66 -0
  36. package/dist/chart/model-analysis.d.ts.map +1 -0
  37. package/dist/chart/model-series.d.ts +5 -0
  38. package/dist/chart/model-series.d.ts.map +1 -1
  39. package/dist/chart/number-format-pattern.d.ts +35 -0
  40. package/dist/chart/number-format-pattern.d.ts.map +1 -0
  41. package/dist/chart/number-format.d.ts +21 -0
  42. package/dist/chart/number-format.d.ts.map +1 -0
  43. package/dist/chart/parse-analysis.d.ts +13 -0
  44. package/dist/chart/parse-analysis.d.ts.map +1 -0
  45. package/dist/chart/parse-series.d.ts +1 -1
  46. package/dist/chart/parse-series.d.ts.map +1 -1
  47. package/dist/chart/parse-util.d.ts +2 -0
  48. package/dist/chart/parse-util.d.ts.map +1 -1
  49. package/dist/chart/render/chart-svg-analysis.d.ts +7 -0
  50. package/dist/chart/render/chart-svg-analysis.d.ts.map +1 -0
  51. package/dist/chart/render/chart-svg-bars.d.ts +5 -0
  52. package/dist/chart/render/chart-svg-bars.d.ts.map +1 -1
  53. package/dist/chart/render/chart-svg-cartesian.d.ts +7 -2
  54. package/dist/chart/render/chart-svg-cartesian.d.ts.map +1 -1
  55. package/dist/chart/render/chart-svg-hierarchy.d.ts +5 -0
  56. package/dist/chart/render/chart-svg-hierarchy.d.ts.map +1 -0
  57. package/dist/chart/render/chart-svg-plots.d.ts +5 -0
  58. package/dist/chart/render/chart-svg-plots.d.ts.map +1 -0
  59. package/dist/chart/render/chart-svg-stock.d.ts +4 -0
  60. package/dist/chart/render/chart-svg-stock.d.ts.map +1 -0
  61. package/dist/chart/render/chart-svg-waterfall.d.ts +4 -0
  62. package/dist/chart/render/chart-svg-waterfall.d.ts.map +1 -0
  63. package/dist/chart/render/chart-svg-xy.d.ts +4 -0
  64. package/dist/chart/render/chart-svg-xy.d.ts.map +1 -0
  65. package/dist/chart/render/chart-svg.d.ts +1 -1
  66. package/dist/chart/render/chart-svg.d.ts.map +1 -1
  67. package/dist/chart/render/chart-value-axis.d.ts +6 -1
  68. package/dist/chart/render/chart-value-axis.d.ts.map +1 -1
  69. package/dist/chart/render/chart-view-analysis.d.ts +30 -0
  70. package/dist/chart/render/chart-view-analysis.d.ts.map +1 -0
  71. package/dist/chart/render/chart-view-ex.d.ts +24 -0
  72. package/dist/chart/render/chart-view-ex.d.ts.map +1 -0
  73. package/dist/chart/render/chart-view-families.d.ts +10 -0
  74. package/dist/chart/render/chart-view-families.d.ts.map +1 -0
  75. package/dist/chart/render/chart-view-series.d.ts +36 -0
  76. package/dist/chart/render/chart-view-series.d.ts.map +1 -0
  77. package/dist/chart/render/chart-view-stock.d.ts +23 -0
  78. package/dist/chart/render/chart-view-stock.d.ts.map +1 -0
  79. package/dist/chart/render/chart-view.d.ts +49 -18
  80. package/dist/chart/render/chart-view.d.ts.map +1 -1
  81. package/dist/chart/render/index.d.ts +2 -0
  82. package/dist/chart/render/index.d.ts.map +1 -1
  83. package/dist/chart/render/render-space.d.ts +6 -1
  84. package/dist/chart/render/render-space.d.ts.map +1 -1
  85. package/dist/chart/render/summary-analysis.d.ts +11 -0
  86. package/dist/chart/render/summary-analysis.d.ts.map +1 -0
  87. package/dist/chart/render/summary-from-chartex.d.ts +11 -0
  88. package/dist/chart/render/summary-from-chartex.d.ts.map +1 -0
  89. package/dist/chart/render/summary-from-space.d.ts.map +1 -1
  90. package/dist/chart/render/summary.d.ts +86 -3
  91. package/dist/chart/render/summary.d.ts.map +1 -1
  92. package/dist/chart/stock-candles.d.ts +72 -0
  93. package/dist/chart/stock-candles.d.ts.map +1 -0
  94. package/dist/chart/style-palette.d.ts +29 -0
  95. package/dist/chart/style-palette.d.ts.map +1 -0
  96. package/dist/chart/sunburst-arcs.d.ts +41 -0
  97. package/dist/chart/sunburst-arcs.d.ts.map +1 -0
  98. package/dist/chart/trendline-fit.d.ts +39 -0
  99. package/dist/chart/trendline-fit.d.ts.map +1 -0
  100. package/dist/chart/waterfall.d.ts +31 -0
  101. package/dist/chart/waterfall.d.ts.map +1 -0
  102. package/dist/chart/write-analysis.d.ts +12 -0
  103. package/dist/chart/write-analysis.d.ts.map +1 -0
  104. package/dist/chart/write-series.d.ts.map +1 -1
  105. package/dist/{chunk-G5PQKHCG.mjs → chunk-2D4IFQ5M.mjs} +1 -1
  106. package/dist/{chunk-UAY26XOI.mjs → chunk-2EBMHIGJ.mjs} +1303 -994
  107. package/dist/{chunk-TVE6UIJF.mjs → chunk-4WZLFUUA.mjs} +54 -13
  108. package/dist/{chunk-H2FRDUNV.mjs → chunk-54ASP65T.mjs} +868 -585
  109. package/dist/chunk-M4XLF4R7.mjs +387 -0
  110. package/dist/{chunk-O6NIA4NG.mjs → chunk-ORH32TO3.mjs} +5798 -5742
  111. package/dist/{chunk-B2JBBAEQ.mjs → chunk-TNNXOW2O.mjs} +1 -1
  112. package/dist/{chunk-IT3U6QD6.cjs → chunk-TQE7FFNT.cjs} +6754 -6695
  113. package/dist/{chunk-7QZGRB3T.cjs → chunk-X7MGZQ6C.cjs} +1321 -995
  114. package/dist/{chunk-6DELVMYB.mjs → chunk-XGXIS4PN.mjs} +12316 -12260
  115. package/dist/crypto/decrypt.d.ts +17 -3
  116. package/dist/crypto/decrypt.d.ts.map +1 -1
  117. package/dist/crypto/encryption-info.d.ts.map +1 -1
  118. package/dist/crypto/index.cjs +252 -78
  119. package/dist/crypto/index.d.ts +19 -4
  120. package/dist/crypto/index.d.ts.map +1 -1
  121. package/dist/crypto/index.mjs +252 -79
  122. package/dist/crypto/key-derivation.d.ts +2 -3
  123. package/dist/crypto/key-derivation.d.ts.map +1 -1
  124. package/dist/crypto/validate.d.ts +22 -0
  125. package/dist/crypto/validate.d.ts.map +1 -0
  126. package/dist/diagram/engine/layout-def-parse.d.ts.map +1 -1
  127. package/dist/diagram/engine/pres-tree.d.ts.map +1 -1
  128. package/dist/diagram/index.cjs +102 -52
  129. package/dist/diagram/index.mjs +102 -52
  130. package/dist/digest/index.cjs +23 -11
  131. package/dist/digest/index.d.ts +2 -1
  132. package/dist/digest/index.d.ts.map +1 -1
  133. package/dist/digest/index.mjs +21 -12
  134. package/dist/digest/password-hash.d.ts +19 -5
  135. package/dist/digest/password-hash.d.ts.map +1 -1
  136. package/dist/digest/timing-safe.d.ts +7 -0
  137. package/dist/digest/timing-safe.d.ts.map +1 -0
  138. package/dist/docx/block-parser.d.ts.map +1 -1
  139. package/dist/docx/chart-paint.d.ts.map +1 -1
  140. package/dist/docx/chart.d.ts +10 -2
  141. package/dist/docx/chart.d.ts.map +1 -1
  142. package/dist/docx/content-control-edit.d.ts +26 -0
  143. package/dist/docx/content-control-edit.d.ts.map +1 -0
  144. package/dist/docx/content-control-model.d.ts +51 -0
  145. package/dist/docx/content-control-model.d.ts.map +1 -0
  146. package/dist/docx/content-control.d.ts +9 -0
  147. package/dist/docx/content-control.d.ts.map +1 -0
  148. package/dist/docx/default-styles.d.ts.map +1 -1
  149. package/dist/docx/drawing.d.ts.map +1 -1
  150. package/dist/docx/embedded.cjs +9932 -935
  151. package/dist/docx/embedded.mjs +9932 -935
  152. package/dist/docx/equation.d.ts +7 -3
  153. package/dist/docx/equation.d.ts.map +1 -1
  154. package/dist/docx/index.cjs +14117 -1513
  155. package/dist/docx/index.d.ts +6 -0
  156. package/dist/docx/index.d.ts.map +1 -1
  157. package/dist/docx/index.mjs +14093 -1514
  158. package/dist/docx/inline-model.d.ts +3 -0
  159. package/dist/docx/inline-model.d.ts.map +1 -1
  160. package/dist/docx/layout/adapt-floats.d.ts +3 -3
  161. package/dist/docx/layout/adapt-floats.d.ts.map +1 -1
  162. package/dist/docx/layout/adapter.d.ts.map +1 -1
  163. package/dist/docx/layout/equation-object.d.ts +7 -0
  164. package/dist/docx/layout/equation-object.d.ts.map +1 -0
  165. package/dist/docx/layout/floats.d.ts +8 -0
  166. package/dist/docx/layout/floats.d.ts.map +1 -1
  167. package/dist/docx/layout/incremental-layout.d.ts +39 -0
  168. package/dist/docx/layout/incremental-layout.d.ts.map +1 -0
  169. package/dist/docx/layout/index.cjs +14177 -1707
  170. package/dist/docx/layout/index.d.ts +2 -2
  171. package/dist/docx/layout/index.d.ts.map +1 -1
  172. package/dist/docx/layout/index.mjs +14176 -1708
  173. package/dist/docx/layout/input.d.ts +4 -0
  174. package/dist/docx/layout/input.d.ts.map +1 -1
  175. package/dist/docx/layout/layout-session.d.ts +13 -2
  176. package/dist/docx/layout/layout-session.d.ts.map +1 -1
  177. package/dist/docx/layout/layout.d.ts +1 -1
  178. package/dist/docx/layout/layout.d.ts.map +1 -1
  179. package/dist/docx/layout/line-metrics.d.ts.map +1 -1
  180. package/dist/docx/layout/page-cursor.d.ts +1 -1
  181. package/dist/docx/layout/page-cursor.d.ts.map +1 -1
  182. package/dist/docx/layout/page-fields.d.ts +3 -1
  183. package/dist/docx/layout/page-fields.d.ts.map +1 -1
  184. package/dist/docx/layout/result.d.ts +14 -1
  185. package/dist/docx/layout/result.d.ts.map +1 -1
  186. package/dist/docx/layout/section-flow.d.ts +11 -1
  187. package/dist/docx/layout/section-flow.d.ts.map +1 -1
  188. package/dist/docx/ligatures.d.ts +2 -0
  189. package/dist/docx/ligatures.d.ts.map +1 -1
  190. package/dist/docx/load/index.cjs +12709 -3590
  191. package/dist/docx/load/index.mjs +12709 -3590
  192. package/dist/docx/model-paragraph.d.ts +3 -0
  193. package/dist/docx/model-paragraph.d.ts.map +1 -1
  194. package/dist/docx/model-run.d.ts +3 -0
  195. package/dist/docx/model-run.d.ts.map +1 -1
  196. package/dist/docx/model.d.ts +3 -0
  197. package/dist/docx/model.d.ts.map +1 -1
  198. package/dist/docx/numbering-parse.d.ts.map +1 -1
  199. package/dist/docx/numbering-text.d.ts.map +1 -1
  200. package/dist/docx/package-limits.d.ts +6 -0
  201. package/dist/docx/package-limits.d.ts.map +1 -0
  202. package/dist/docx/parse-content-control.d.ts +28 -0
  203. package/dist/docx/parse-content-control.d.ts.map +1 -0
  204. package/dist/docx/parse-table.d.ts.map +1 -1
  205. package/dist/docx/parse.d.ts.map +1 -1
  206. package/dist/docx/save.d.ts.map +1 -1
  207. package/dist/docx/shape-model.d.ts +31 -0
  208. package/dist/docx/shape-model.d.ts.map +1 -0
  209. package/dist/docx/shape-palette.d.ts +19 -0
  210. package/dist/docx/shape-palette.d.ts.map +1 -0
  211. package/dist/docx/shape-parse.d.ts +16 -0
  212. package/dist/docx/shape-parse.d.ts.map +1 -0
  213. package/dist/docx/shape-svg.d.ts +20 -0
  214. package/dist/docx/shape-svg.d.ts.map +1 -0
  215. package/dist/docx/table-model.d.ts +4 -0
  216. package/dist/docx/table-model.d.ts.map +1 -1
  217. package/dist/docx/ui/content-control-commands.d.ts +37 -0
  218. package/dist/docx/ui/content-control-commands.d.ts.map +1 -0
  219. package/dist/docx/ui/content-control-guard.d.ts +8 -0
  220. package/dist/docx/ui/content-control-guard.d.ts.map +1 -0
  221. package/dist/docx/ui/content-control-spans.d.ts +19 -0
  222. package/dist/docx/ui/content-control-spans.d.ts.map +1 -0
  223. package/dist/docx/ui/index.cjs +3132 -506
  224. package/dist/docx/ui/index.d.ts +3 -0
  225. package/dist/docx/ui/index.d.ts.map +1 -1
  226. package/dist/docx/ui/index.mjs +3117 -507
  227. package/dist/docx/ui/inline-content-schema.d.ts.map +1 -1
  228. package/dist/docx/ui/paragraph-attributes.d.ts.map +1 -1
  229. package/dist/docx/ui/ribbon-action-ids.d.ts +1 -1
  230. package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -1
  231. package/dist/docx/ui/run-adapter.d.ts.map +1 -1
  232. package/dist/docx/ui/run-compare.d.ts.map +1 -1
  233. package/dist/docx/ui/run-mark-properties.d.ts.map +1 -1
  234. package/dist/docx/ui/run-marks.d.ts.map +1 -1
  235. package/dist/docx/ui/schema-marks.d.ts +16 -1
  236. package/dist/docx/ui/schema-marks.d.ts.map +1 -1
  237. package/dist/docx/ui/table-structure-guard.d.ts.map +1 -1
  238. package/dist/docx/write-block-placement.d.ts +9 -0
  239. package/dist/docx/write-block-placement.d.ts.map +1 -0
  240. package/dist/docx/write-content-control.d.ts +12 -0
  241. package/dist/docx/write-content-control.d.ts.map +1 -0
  242. package/dist/docx/write-drawing.d.ts +2 -0
  243. package/dist/docx/write-drawing.d.ts.map +1 -1
  244. package/dist/docx/write-inline.d.ts.map +1 -1
  245. package/dist/docx/write-paragraph.d.ts.map +1 -1
  246. package/dist/docx/write-shape.d.ts +16 -0
  247. package/dist/docx/write-shape.d.ts.map +1 -0
  248. package/dist/docx/write-table.d.ts.map +1 -1
  249. package/dist/docx/write.d.ts.map +1 -1
  250. package/dist/drawingml/index.cjs +24 -0
  251. package/dist/drawingml/index.mjs +24 -0
  252. package/dist/geometry/index.cjs +63 -48
  253. package/dist/geometry/index.mjs +63 -48
  254. package/dist/geometry/preset-shape-definitions-table.d.ts.map +1 -1
  255. package/dist/i18n/index.cjs +266 -0
  256. package/dist/i18n/index.d.ts +1 -0
  257. package/dist/i18n/index.d.ts.map +1 -1
  258. package/dist/i18n/index.mjs +265 -1
  259. package/dist/i18n/option-strings.d.ts +17 -0
  260. package/dist/i18n/option-strings.d.ts.map +1 -0
  261. package/dist/index.cjs +4558 -1579
  262. package/dist/index.mjs +4558 -1579
  263. package/dist/math/equation-gallery.d.ts +10 -0
  264. package/dist/math/equation-gallery.d.ts.map +1 -0
  265. package/dist/math/index.cjs +777 -139
  266. package/dist/math/index.d.ts +3 -0
  267. package/dist/math/index.d.ts.map +1 -1
  268. package/dist/math/index.mjs +772 -140
  269. package/dist/math/latex-omml-siblings.d.ts.map +1 -1
  270. package/dist/math/latex-to-omml.d.ts.map +1 -1
  271. package/dist/math/omml-box-grouped.d.ts +9 -0
  272. package/dist/math/omml-box-grouped.d.ts.map +1 -0
  273. package/dist/math/omml-box-layout.d.ts +15 -0
  274. package/dist/math/omml-box-layout.d.ts.map +1 -0
  275. package/dist/math/omml-box-structures.d.ts +7 -0
  276. package/dist/math/omml-box-structures.d.ts.map +1 -0
  277. package/dist/math/omml-box.d.ts +85 -0
  278. package/dist/math/omml-box.d.ts.map +1 -0
  279. package/dist/math/omml-dom.d.ts.map +1 -1
  280. package/dist/math/omml-mathml-converters.d.ts.map +1 -1
  281. package/dist/math/omml-svg.d.ts +14 -0
  282. package/dist/math/omml-svg.d.ts.map +1 -0
  283. package/dist/math/omml-to-xml.d.ts +10 -0
  284. package/dist/math/omml-to-xml.d.ts.map +1 -0
  285. package/dist/opc/embedded-packages.d.ts.map +1 -1
  286. package/dist/opc/index.cjs +257 -22
  287. package/dist/opc/index.d.ts +1 -0
  288. package/dist/opc/index.d.ts.map +1 -1
  289. package/dist/opc/index.mjs +251 -23
  290. package/dist/opc/package.d.ts.map +1 -1
  291. package/dist/opc/signature/detection.d.ts +22 -6
  292. package/dist/opc/signature/detection.d.ts.map +1 -1
  293. package/dist/opc/signature/index.d.ts +1 -1
  294. package/dist/opc/signature/index.d.ts.map +1 -1
  295. package/dist/opc/signature/xml-utils.d.ts.map +1 -1
  296. package/dist/opc/zip-limits.d.ts +52 -0
  297. package/dist/opc/zip-limits.d.ts.map +1 -0
  298. package/dist/pptx/automation/index.cjs +1848 -1320
  299. package/dist/pptx/automation/index.d.ts +4 -4
  300. package/dist/pptx/automation/index.mjs +6 -6
  301. package/dist/pptx/chunks/{elements-DmbzOhFu.d.ts → elements-tK7xnWeS.d.ts} +20 -9
  302. package/dist/pptx/chunks/elements-tK7xnWeS.d.ts.map +1 -0
  303. package/dist/pptx/chunks/{index-Cija6Dih.d.ts → index-BSpNQuvz.d.ts} +30 -5
  304. package/dist/pptx/chunks/{index-Cija6Dih.d.ts.map → index-BSpNQuvz.d.ts.map} +1 -1
  305. package/dist/pptx/chunks/{index-BmvOxbsh.d.ts → index-DS9Y4Ne3.d.ts} +25 -9
  306. package/dist/pptx/chunks/index-DS9Y4Ne3.d.ts.map +1 -0
  307. package/dist/pptx/chunks/inspection-status-DjiWd_Aa.d.ts.map +1 -1
  308. package/dist/pptx/chunks/{text-operations-sXxhsKDd.d.ts → text-operations-BdD_UQ11.d.ts} +2 -2
  309. package/dist/pptx/chunks/{text-operations-sXxhsKDd.d.ts.map → text-operations-BdD_UQ11.d.ts.map} +1 -1
  310. package/dist/pptx/cli/index.cjs +1795 -1275
  311. package/dist/pptx/cli/index.d.ts +1 -1
  312. package/dist/pptx/cli/index.mjs +5 -5
  313. package/dist/pptx/converter/index.cjs +80 -54
  314. package/dist/pptx/converter/index.d.ts +1 -1
  315. package/dist/pptx/converter/index.mjs +3 -3
  316. package/dist/pptx/editor/render/find-replace.cjs +14 -14
  317. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  318. package/dist/pptx/editor/render/find-replace.mjs +1 -1
  319. package/dist/pptx/editor/render/slide-operations.cjs +8 -8
  320. package/dist/pptx/editor/render/slide-operations.mjs +2 -2
  321. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +1 -1
  322. package/dist/pptx/editor/render/text-style-scope.d.ts +1 -1
  323. package/dist/pptx/index.cjs +1117 -351
  324. package/dist/pptx/index.d.ts +5 -5
  325. package/dist/pptx/index.mjs +6 -6
  326. package/dist/pptx/signature-node/index.cjs +342 -65
  327. package/dist/pptx/signature-node/index.d.ts +12 -1
  328. package/dist/pptx/signature-node/index.d.ts.map +1 -1
  329. package/dist/pptx/signature-node/index.mjs +112 -52
  330. package/dist/teams/activity-feed.d.ts +19 -0
  331. package/dist/teams/activity-feed.d.ts.map +1 -0
  332. package/dist/teams/activity-state.d.ts +12 -0
  333. package/dist/teams/activity-state.d.ts.map +1 -0
  334. package/dist/teams/activity.d.ts +52 -0
  335. package/dist/teams/activity.d.ts.map +1 -0
  336. package/dist/teams/calendar.d.ts +57 -0
  337. package/dist/teams/calendar.d.ts.map +1 -0
  338. package/dist/teams/chat-actions.d.ts +20 -0
  339. package/dist/teams/chat-actions.d.ts.map +1 -0
  340. package/dist/teams/chat-rooms.d.ts +42 -0
  341. package/dist/teams/chat-rooms.d.ts.map +1 -0
  342. package/dist/teams/chat-view.d.ts +56 -0
  343. package/dist/teams/chat-view.d.ts.map +1 -0
  344. package/dist/teams/chat.d.ts +25 -3
  345. package/dist/teams/chat.d.ts.map +1 -1
  346. package/dist/teams/chats.d.ts +52 -0
  347. package/dist/teams/chats.d.ts.map +1 -0
  348. package/dist/teams/ics-timezone.d.ts +17 -0
  349. package/dist/teams/ics-timezone.d.ts.map +1 -0
  350. package/dist/teams/ics.d.ts +20 -0
  351. package/dist/teams/ics.d.ts.map +1 -0
  352. package/dist/teams/index.cjs +12462 -7011
  353. package/dist/teams/index.d.ts +25 -0
  354. package/dist/teams/index.d.ts.map +1 -1
  355. package/dist/teams/index.mjs +12349 -7012
  356. package/dist/teams/meeting-actions.d.ts +31 -0
  357. package/dist/teams/meeting-actions.d.ts.map +1 -0
  358. package/dist/teams/meeting-exceptions.d.ts +28 -0
  359. package/dist/teams/meeting-exceptions.d.ts.map +1 -0
  360. package/dist/teams/meeting-reminders.d.ts +13 -0
  361. package/dist/teams/meeting-reminders.d.ts.map +1 -0
  362. package/dist/teams/meetings.d.ts +71 -0
  363. package/dist/teams/meetings.d.ts.map +1 -0
  364. package/dist/teams/mention-text.d.ts +11 -0
  365. package/dist/teams/mention-text.d.ts.map +1 -0
  366. package/dist/teams/mentions.d.ts +68 -0
  367. package/dist/teams/mentions.d.ts.map +1 -0
  368. package/dist/teams/model.d.ts +7 -0
  369. package/dist/teams/model.d.ts.map +1 -1
  370. package/dist/teams/notifications.d.ts +21 -0
  371. package/dist/teams/notifications.d.ts.map +1 -0
  372. package/dist/teams/pins.d.ts +22 -0
  373. package/dist/teams/pins.d.ts.map +1 -0
  374. package/dist/teams/presence-controller.d.ts +39 -0
  375. package/dist/teams/presence-controller.d.ts.map +1 -0
  376. package/dist/teams/presence.d.ts +55 -0
  377. package/dist/teams/presence.d.ts.map +1 -0
  378. package/dist/teams/recurrence.d.ts +18 -0
  379. package/dist/teams/recurrence.d.ts.map +1 -0
  380. package/dist/teams/roster.d.ts +12 -0
  381. package/dist/teams/roster.d.ts.map +1 -0
  382. package/dist/teams/server-config.d.ts +23 -2
  383. package/dist/teams/server-config.d.ts.map +1 -1
  384. package/dist/teams/server-session.d.ts +19 -0
  385. package/dist/teams/server-session.d.ts.map +1 -0
  386. package/dist/teams/shared-chat.d.ts +83 -0
  387. package/dist/teams/shared-chat.d.ts.map +1 -0
  388. package/dist/teams/store.d.ts +79 -5
  389. package/dist/teams/store.d.ts.map +1 -1
  390. package/dist/teams/sync-transport.d.ts +12 -0
  391. package/dist/teams/sync-transport.d.ts.map +1 -0
  392. package/dist/teams/time-zone.d.ts +32 -0
  393. package/dist/teams/time-zone.d.ts.map +1 -0
  394. package/dist/teams/view.d.ts +8 -0
  395. package/dist/teams/view.d.ts.map +1 -1
  396. package/dist/teams/workspace.d.ts +23 -4
  397. package/dist/teams/workspace.d.ts.map +1 -1
  398. package/dist/visio/edit-connector-follow.d.ts +15 -0
  399. package/dist/visio/edit-connector-follow.d.ts.map +1 -0
  400. package/dist/visio/edit-connector-obstacles.d.ts +9 -3
  401. package/dist/visio/edit-connector-obstacles.d.ts.map +1 -1
  402. package/dist/visio/edit-connector-reroute.d.ts.map +1 -1
  403. package/dist/visio/edit-connector.d.ts.map +1 -1
  404. package/dist/visio/edit-master-add.d.ts +37 -0
  405. package/dist/visio/edit-master-add.d.ts.map +1 -0
  406. package/dist/visio/edit-master-drop.d.ts +6 -0
  407. package/dist/visio/edit-master-drop.d.ts.map +1 -1
  408. package/dist/visio/edit-recalculate-index.d.ts +5 -0
  409. package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
  410. package/dist/visio/edit-recalculate-values.d.ts.map +1 -1
  411. package/dist/visio/edit-stencil-connector-layout.d.ts +2 -0
  412. package/dist/visio/edit-stencil-connector-layout.d.ts.map +1 -1
  413. package/dist/visio/edit-stencil-connector.d.ts +1 -0
  414. package/dist/visio/edit-stencil-connector.d.ts.map +1 -1
  415. package/dist/visio/edit-stencil-import.d.ts +10 -0
  416. package/dist/visio/edit-stencil-import.d.ts.map +1 -0
  417. package/dist/visio/edit-stencil-line.d.ts +29 -0
  418. package/dist/visio/edit-stencil-line.d.ts.map +1 -0
  419. package/dist/visio/edit-stencil-master.d.ts +3 -8
  420. package/dist/visio/edit-stencil-master.d.ts.map +1 -1
  421. package/dist/visio/edit.d.ts.map +1 -1
  422. package/dist/visio/formula-evaluate.d.ts.map +1 -1
  423. package/dist/visio/formula-math-functions.d.ts +11 -0
  424. package/dist/visio/formula-math-functions.d.ts.map +1 -0
  425. package/dist/visio/formula-text-functions.d.ts +23 -0
  426. package/dist/visio/formula-text-functions.d.ts.map +1 -0
  427. package/dist/visio/formula.d.ts.map +1 -1
  428. package/dist/visio/index.cjs +2552 -1833
  429. package/dist/visio/index.d.ts +1 -0
  430. package/dist/visio/index.d.ts.map +1 -1
  431. package/dist/visio/index.mjs +2552 -1834
  432. package/dist/visio/parser.d.ts +6 -0
  433. package/dist/visio/parser.d.ts.map +1 -1
  434. package/dist/visio/stencil-file.d.ts +14 -0
  435. package/dist/visio/stencil-file.d.ts.map +1 -0
  436. package/dist/visio/ui/index.cjs +2398 -1679
  437. package/dist/visio/ui/index.mjs +2398 -1680
  438. package/dist/visio/ui/master-drop.d.ts +10 -0
  439. package/dist/visio/ui/master-drop.d.ts.map +1 -1
  440. package/dist/xlsx/edit/cell-values.d.ts.map +1 -1
  441. package/dist/xlsx/edit/clipboard-html-parse.d.ts +4 -0
  442. package/dist/xlsx/edit/clipboard-html-parse.d.ts.map +1 -1
  443. package/dist/xlsx/edit/data-table.d.ts +38 -0
  444. package/dist/xlsx/edit/data-table.d.ts.map +1 -0
  445. package/dist/xlsx/edit/drawings.d.ts.map +1 -1
  446. package/dist/xlsx/edit/goal-seek.d.ts +30 -0
  447. package/dist/xlsx/edit/goal-seek.d.ts.map +1 -0
  448. package/dist/xlsx/edit/goal-solver.d.ts +20 -0
  449. package/dist/xlsx/edit/goal-solver.d.ts.map +1 -0
  450. package/dist/xlsx/edit/history.d.ts +1 -1
  451. package/dist/xlsx/edit/history.d.ts.map +1 -1
  452. package/dist/xlsx/edit/index.d.ts +5 -0
  453. package/dist/xlsx/edit/index.d.ts.map +1 -1
  454. package/dist/xlsx/edit/input-text.d.ts.map +1 -1
  455. package/dist/xlsx/edit/pivots.d.ts +2 -1
  456. package/dist/xlsx/edit/pivots.d.ts.map +1 -1
  457. package/dist/xlsx/edit/scenarios.d.ts +41 -0
  458. package/dist/xlsx/edit/scenarios.d.ts.map +1 -0
  459. package/dist/xlsx/edit/session.d.ts.map +1 -1
  460. package/dist/xlsx/edit/slicers.d.ts +34 -0
  461. package/dist/xlsx/edit/slicers.d.ts.map +1 -0
  462. package/dist/xlsx/edit/table-edits.d.ts.map +1 -1
  463. package/dist/xlsx/edit/timelines.d.ts +26 -0
  464. package/dist/xlsx/edit/timelines.d.ts.map +1 -0
  465. package/dist/xlsx/edit/types.d.ts +39 -0
  466. package/dist/xlsx/edit/types.d.ts.map +1 -1
  467. package/dist/xlsx/formula/context.d.ts +13 -0
  468. package/dist/xlsx/formula/context.d.ts.map +1 -1
  469. package/dist/xlsx/formula/engine.d.ts.map +1 -1
  470. package/dist/xlsx/formula/evaluator.d.ts.map +1 -1
  471. package/dist/xlsx/formula/functions/amordegrc.d.ts +6 -0
  472. package/dist/xlsx/formula/functions/amordegrc.d.ts.map +1 -0
  473. package/dist/xlsx/formula/functions/bahttext.d.ts +4 -0
  474. package/dist/xlsx/formula/functions/bahttext.d.ts.map +1 -0
  475. package/dist/xlsx/formula/functions/bessel.d.ts +7 -0
  476. package/dist/xlsx/formula/functions/bessel.d.ts.map +1 -0
  477. package/dist/xlsx/formula/functions/bonds.d.ts +3 -0
  478. package/dist/xlsx/formula/functions/bonds.d.ts.map +1 -1
  479. package/dist/xlsx/formula/functions/engineering.d.ts.map +1 -1
  480. package/dist/xlsx/formula/functions/financial.d.ts.map +1 -1
  481. package/dist/xlsx/formula/functions/getpivotdata.d.ts +2 -0
  482. package/dist/xlsx/formula/functions/getpivotdata.d.ts.map +1 -0
  483. package/dist/xlsx/formula/functions/groupby.d.ts +3 -0
  484. package/dist/xlsx/formula/functions/groupby.d.ts.map +1 -0
  485. package/dist/xlsx/formula/functions/helpers.d.ts +3 -2
  486. package/dist/xlsx/formula/functions/helpers.d.ts.map +1 -1
  487. package/dist/xlsx/formula/functions/logical.d.ts.map +1 -1
  488. package/dist/xlsx/formula/functions/modern.d.ts +3 -0
  489. package/dist/xlsx/formula/functions/modern.d.ts.map +1 -0
  490. package/dist/xlsx/formula/functions/odd-securities.d.ts +3 -0
  491. package/dist/xlsx/formula/functions/odd-securities.d.ts.map +1 -0
  492. package/dist/xlsx/formula/functions/registry.d.ts.map +1 -1
  493. package/dist/xlsx/formula/functions/text-regex.d.ts +8 -0
  494. package/dist/xlsx/formula/functions/text-regex.d.ts.map +1 -1
  495. package/dist/xlsx/formula/functions/text.d.ts.map +1 -1
  496. package/dist/xlsx/formula/functions/wildcard.d.ts +8 -0
  497. package/dist/xlsx/formula/functions/wildcard.d.ts.map +1 -0
  498. package/dist/xlsx/formula/values.d.ts +11 -0
  499. package/dist/xlsx/formula/values.d.ts.map +1 -1
  500. package/dist/xlsx/index.cjs +11696 -4994
  501. package/dist/xlsx/index.d.ts +1 -0
  502. package/dist/xlsx/index.d.ts.map +1 -1
  503. package/dist/xlsx/index.mjs +11612 -4994
  504. package/dist/xlsx/layout/chart-view.d.ts.map +1 -1
  505. package/dist/xlsx/layout/header-footer-edit.d.ts +16 -0
  506. package/dist/xlsx/layout/header-footer-edit.d.ts.map +1 -0
  507. package/dist/xlsx/layout/index.d.ts +3 -0
  508. package/dist/xlsx/layout/index.d.ts.map +1 -1
  509. package/dist/xlsx/layout/page-break-view.d.ts +39 -0
  510. package/dist/xlsx/layout/page-break-view.d.ts.map +1 -0
  511. package/dist/xlsx/layout/page-view.d.ts +69 -0
  512. package/dist/xlsx/layout/page-view.d.ts.map +1 -0
  513. package/dist/xlsx/layout/ref-evaluator.d.ts.map +1 -1
  514. package/dist/xlsx/load/index.cjs +5718 -2191
  515. package/dist/xlsx/load/index.mjs +5717 -2190
  516. package/dist/xlsx/model-pivots.d.ts +88 -2
  517. package/dist/xlsx/model-pivots.d.ts.map +1 -1
  518. package/dist/xlsx/model-slicers.d.ts +146 -0
  519. package/dist/xlsx/model-slicers.d.ts.map +1 -0
  520. package/dist/xlsx/model-whatif.d.ts +51 -0
  521. package/dist/xlsx/model-whatif.d.ts.map +1 -0
  522. package/dist/xlsx/model.d.ts +26 -1
  523. package/dist/xlsx/model.d.ts.map +1 -1
  524. package/dist/xlsx/pivot/admission.d.ts.map +1 -1
  525. package/dist/xlsx/pivot/aggregate.d.ts +15 -6
  526. package/dist/xlsx/pivot/aggregate.d.ts.map +1 -1
  527. package/dist/xlsx/pivot/axes.d.ts +6 -0
  528. package/dist/xlsx/pivot/axes.d.ts.map +1 -0
  529. package/dist/xlsx/pivot/cache-xml.d.ts.map +1 -1
  530. package/dist/xlsx/pivot/columns.d.ts +48 -0
  531. package/dist/xlsx/pivot/columns.d.ts.map +1 -0
  532. package/dist/xlsx/pivot/data.d.ts +9 -3
  533. package/dist/xlsx/pivot/data.d.ts.map +1 -1
  534. package/dist/xlsx/pivot/date-axes.d.ts +12 -0
  535. package/dist/xlsx/pivot/date-axes.d.ts.map +1 -0
  536. package/dist/xlsx/pivot/date-group-read.d.ts +11 -0
  537. package/dist/xlsx/pivot/date-group-read.d.ts.map +1 -0
  538. package/dist/xlsx/pivot/date-groups.d.ts +60 -0
  539. package/dist/xlsx/pivot/date-groups.d.ts.map +1 -0
  540. package/dist/xlsx/pivot/date-read.d.ts +10 -0
  541. package/dist/xlsx/pivot/date-read.d.ts.map +1 -0
  542. package/dist/xlsx/pivot/dates.d.ts +17 -0
  543. package/dist/xlsx/pivot/dates.d.ts.map +1 -0
  544. package/dist/xlsx/pivot/group-read.d.ts +9 -0
  545. package/dist/xlsx/pivot/group-read.d.ts.map +1 -0
  546. package/dist/xlsx/pivot/groups.d.ts +31 -0
  547. package/dist/xlsx/pivot/groups.d.ts.map +1 -0
  548. package/dist/xlsx/pivot/hierarchy.d.ts +4 -1
  549. package/dist/xlsx/pivot/hierarchy.d.ts.map +1 -1
  550. package/dist/xlsx/pivot/index.d.ts +7 -0
  551. package/dist/xlsx/pivot/index.d.ts.map +1 -1
  552. package/dist/xlsx/pivot/item-filters-read.d.ts +7 -0
  553. package/dist/xlsx/pivot/item-filters-read.d.ts.map +1 -0
  554. package/dist/xlsx/pivot/item-filters.d.ts +23 -0
  555. package/dist/xlsx/pivot/item-filters.d.ts.map +1 -0
  556. package/dist/xlsx/pivot/measures.d.ts +6 -4
  557. package/dist/xlsx/pivot/measures.d.ts.map +1 -1
  558. package/dist/xlsx/pivot/nested.d.ts +8 -0
  559. package/dist/xlsx/pivot/nested.d.ts.map +1 -0
  560. package/dist/xlsx/pivot/page-filter-admission.d.ts.map +1 -1
  561. package/dist/xlsx/pivot/page-filter.d.ts.map +1 -1
  562. package/dist/xlsx/pivot/read.d.ts +2 -1
  563. package/dist/xlsx/pivot/read.d.ts.map +1 -1
  564. package/dist/xlsx/pivot/subtotal-read.d.ts +9 -0
  565. package/dist/xlsx/pivot/subtotal-read.d.ts.map +1 -0
  566. package/dist/xlsx/pivot/subtotals.d.ts +23 -0
  567. package/dist/xlsx/pivot/subtotals.d.ts.map +1 -0
  568. package/dist/xlsx/pivot/table-xml.d.ts +1 -1
  569. package/dist/xlsx/pivot/table-xml.d.ts.map +1 -1
  570. package/dist/xlsx/pivot/values-axis.d.ts +2 -2
  571. package/dist/xlsx/pivot/values-axis.d.ts.map +1 -1
  572. package/dist/xlsx/read/chart-ex.d.ts +9 -0
  573. package/dist/xlsx/read/chart-ex.d.ts.map +1 -0
  574. package/dist/xlsx/read/chart.d.ts.map +1 -1
  575. package/dist/xlsx/read/drawing.d.ts.map +1 -1
  576. package/dist/xlsx/read/load.d.ts.map +1 -1
  577. package/dist/xlsx/read/package.d.ts +2 -1
  578. package/dist/xlsx/read/package.d.ts.map +1 -1
  579. package/dist/xlsx/read/scenarios.d.ts +4 -0
  580. package/dist/xlsx/read/scenarios.d.ts.map +1 -0
  581. package/dist/xlsx/read/sheet-data.d.ts.map +1 -1
  582. package/dist/xlsx/read/sheet-props.d.ts.map +1 -1
  583. package/dist/xlsx/read/tables.d.ts +3 -0
  584. package/dist/xlsx/read/tables.d.ts.map +1 -1
  585. package/dist/xlsx/read/worksheet.d.ts.map +1 -1
  586. package/dist/xlsx/slicer/book.d.ts +16 -0
  587. package/dist/xlsx/slicer/book.d.ts.map +1 -0
  588. package/dist/xlsx/slicer/frame.d.ts +14 -0
  589. package/dist/xlsx/slicer/frame.d.ts.map +1 -0
  590. package/dist/xlsx/slicer/index.d.ts +10 -0
  591. package/dist/xlsx/slicer/index.d.ts.map +1 -0
  592. package/dist/xlsx/slicer/items.d.ts +30 -0
  593. package/dist/xlsx/slicer/items.d.ts.map +1 -0
  594. package/dist/xlsx/slicer/layout.d.ts +67 -0
  595. package/dist/xlsx/slicer/layout.d.ts.map +1 -0
  596. package/dist/xlsx/slicer/read-slicers.d.ts +11 -0
  597. package/dist/xlsx/slicer/read-slicers.d.ts.map +1 -0
  598. package/dist/xlsx/slicer/read-timelines.d.ts +5 -0
  599. package/dist/xlsx/slicer/read-timelines.d.ts.map +1 -0
  600. package/dist/xlsx/slicer/read.d.ts +26 -0
  601. package/dist/xlsx/slicer/read.d.ts.map +1 -0
  602. package/dist/xlsx/slicer/select.d.ts +10 -0
  603. package/dist/xlsx/slicer/select.d.ts.map +1 -0
  604. package/dist/xlsx/slicer/styles.d.ts +36 -0
  605. package/dist/xlsx/slicer/styles.d.ts.map +1 -0
  606. package/dist/xlsx/slicer/table-filter.d.ts +28 -0
  607. package/dist/xlsx/slicer/table-filter.d.ts.map +1 -0
  608. package/dist/xlsx/slicer/timeline-periods.d.ts +35 -0
  609. package/dist/xlsx/slicer/timeline-periods.d.ts.map +1 -0
  610. package/dist/xlsx/slicer/timeline-view.d.ts +60 -0
  611. package/dist/xlsx/slicer/timeline-view.d.ts.map +1 -0
  612. package/dist/xlsx/slicer/write-plan.d.ts +31 -0
  613. package/dist/xlsx/slicer/write-plan.d.ts.map +1 -0
  614. package/dist/xlsx/slicer/write-timeline.d.ts +7 -0
  615. package/dist/xlsx/slicer/write-timeline.d.ts.map +1 -0
  616. package/dist/xlsx/slicer/write-xml.d.ts +17 -0
  617. package/dist/xlsx/slicer/write-xml.d.ts.map +1 -0
  618. package/dist/xlsx/ui/commands/i18n/index.d.ts.map +1 -1
  619. package/dist/xlsx/ui/commands/i18n/pivots.d.ts.map +1 -1
  620. package/dist/xlsx/ui/commands/i18n/print-layout.d.ts.map +1 -1
  621. package/dist/xlsx/ui/commands/i18n/slicers.d.ts +3 -0
  622. package/dist/xlsx/ui/commands/i18n/slicers.d.ts.map +1 -0
  623. package/dist/xlsx/ui/commands/i18n/what-if.d.ts +3 -0
  624. package/dist/xlsx/ui/commands/i18n/what-if.d.ts.map +1 -0
  625. package/dist/xlsx/ui/commands/icons.d.ts.map +1 -1
  626. package/dist/xlsx/ui/commands/slicers.d.ts +37 -0
  627. package/dist/xlsx/ui/commands/slicers.d.ts.map +1 -0
  628. package/dist/xlsx/ui/commands/what-if.d.ts +4 -0
  629. package/dist/xlsx/ui/commands/what-if.d.ts.map +1 -0
  630. package/dist/xlsx/ui/commands.d.ts +2 -0
  631. package/dist/xlsx/ui/commands.d.ts.map +1 -1
  632. package/dist/xlsx/ui/index.cjs +6999 -3052
  633. package/dist/xlsx/ui/index.d.ts +2 -0
  634. package/dist/xlsx/ui/index.d.ts.map +1 -1
  635. package/dist/xlsx/ui/index.mjs +6994 -3053
  636. package/dist/xlsx/ui/locales/de/index.d.ts.map +1 -1
  637. package/dist/xlsx/ui/locales/de/options.d.ts +2 -0
  638. package/dist/xlsx/ui/locales/de/options.d.ts.map +1 -0
  639. package/dist/xlsx/ui/locales/de/shell.d.ts.map +1 -1
  640. package/dist/xlsx/ui/locales/en/index.d.ts.map +1 -1
  641. package/dist/xlsx/ui/locales/en/options.d.ts +2 -0
  642. package/dist/xlsx/ui/locales/en/options.d.ts.map +1 -0
  643. package/dist/xlsx/ui/locales/en/shell.d.ts.map +1 -1
  644. package/dist/xlsx/ui/locales/es/index.d.ts.map +1 -1
  645. package/dist/xlsx/ui/locales/es/options.d.ts +2 -0
  646. package/dist/xlsx/ui/locales/es/options.d.ts.map +1 -0
  647. package/dist/xlsx/ui/locales/es/shell.d.ts.map +1 -1
  648. package/dist/xlsx/ui/locales/fr/index.d.ts.map +1 -1
  649. package/dist/xlsx/ui/locales/fr/options.d.ts +2 -0
  650. package/dist/xlsx/ui/locales/fr/options.d.ts.map +1 -0
  651. package/dist/xlsx/ui/locales/fr/shell.d.ts.map +1 -1
  652. package/dist/xlsx/ui/locales/zh-CN/index.d.ts.map +1 -1
  653. package/dist/xlsx/ui/locales/zh-CN/options.d.ts +2 -0
  654. package/dist/xlsx/ui/locales/zh-CN/options.d.ts.map +1 -0
  655. package/dist/xlsx/ui/locales/zh-CN/shell.d.ts.map +1 -1
  656. package/dist/xlsx/ui/ribbon/tabs/review-view.d.ts.map +1 -1
  657. package/dist/xlsx/write/carried-refs.d.ts.map +1 -1
  658. package/dist/xlsx/write/drawing.d.ts.map +1 -1
  659. package/dist/xlsx/write/package-writer.d.ts +2 -0
  660. package/dist/xlsx/write/package-writer.d.ts.map +1 -1
  661. package/dist/xlsx/write/save.d.ts.map +1 -1
  662. package/dist/xlsx/write/scenarios.d.ts +4 -0
  663. package/dist/xlsx/write/scenarios.d.ts.map +1 -0
  664. package/dist/xlsx/write/sheet-data.d.ts.map +1 -1
  665. package/dist/xlsx/write/sheet-parts.d.ts +1 -0
  666. package/dist/xlsx/write/sheet-parts.d.ts.map +1 -1
  667. package/dist/xlsx/write/sheet-props.d.ts.map +1 -1
  668. package/dist/xlsx/write/table-patch.d.ts.map +1 -1
  669. package/dist/xlsx/write/tables.d.ts.map +1 -1
  670. package/dist/xlsx/write/worksheet.d.ts.map +1 -1
  671. package/dist/xml/index.cjs +28 -0
  672. package/dist/xml/index.mjs +27 -1
  673. package/dist/xml/namespaces.d.ts +2 -0
  674. package/dist/xml/namespaces.d.ts.map +1 -1
  675. package/dist/xml/xml.d.ts +15 -0
  676. package/dist/xml/xml.d.ts.map +1 -1
  677. package/package.json +1 -1
  678. package/dist/PptxHandler-RWTOUCLC.mjs +0 -3
  679. package/dist/PptxHandler-UU4ZCT6H.cjs +0 -12
  680. package/dist/chunk-KBIJI6P5.mjs +0 -166
  681. package/dist/pptx/chunks/elements-DmbzOhFu.d.ts.map +0 -1
  682. package/dist/pptx/chunks/index-BmvOxbsh.d.ts.map +0 -1
@@ -1,3 +1,5 @@
1
+ import { DOMParser } from '@xmldom/xmldom';
2
+
1
3
  // ../../node_modules/.bun/@christophervr+ole2@0.13.0/node_modules/@christophervr/ole2/dist/ole2-parser-types.js
2
4
  var OLE_MAGIC = new Uint8Array([208, 207, 17, 224, 161, 177, 26, 225]);
3
5
  var ENDOFCHAIN = 4294967294;
@@ -553,6 +555,14 @@ async function hmac(algorithm, key, data) {
553
555
  return new Uint8Array(result);
554
556
  }
555
557
 
558
+ // digest/timing-safe.ts
559
+ function timingSafeEqual(a, b) {
560
+ if (a.length !== b.length) return false;
561
+ let difference = 0;
562
+ for (let i2 = 0; i2 < a.length; i2++) difference |= a[i2] ^ b[i2];
563
+ return difference === 0;
564
+ }
565
+
556
566
  // crypto/aes-ecb.ts
557
567
  var BLOCK = 16;
558
568
  var BATCH = 4096;
@@ -2336,6 +2346,14 @@ function digestFunction(name) {
2336
2346
  return canonical && DIGESTS[canonical];
2337
2347
  }
2338
2348
 
2349
+ // digest/password-hash.ts
2350
+ var MAX_SPIN_COUNT = 1e7;
2351
+ var DEFAULT_MAX_SPIN_COUNT = 1e6;
2352
+ function isValidSpinCount(spinCount, maxSpinCount = DEFAULT_MAX_SPIN_COUNT) {
2353
+ const limit = Math.min(maxSpinCount, MAX_SPIN_COUNT);
2354
+ return spinCount === void 0 || Number.isInteger(spinCount) && spinCount >= 0 && spinCount <= limit;
2355
+ }
2356
+
2339
2357
  // crypto/key-derivation.ts
2340
2358
  var BLOCK_KEYS = {
2341
2359
  verifierHashInput: new Uint8Array([254, 167, 210, 118, 59, 75, 158, 121]),
@@ -2344,9 +2362,9 @@ var BLOCK_KEYS = {
2344
2362
  dataIntegrityHmacKey: new Uint8Array([95, 178, 173, 1, 12, 185, 225, 246]),
2345
2363
  dataIntegrityHmacValue: new Uint8Array([160, 103, 127, 2, 178, 44, 132, 51])
2346
2364
  };
2347
- var MAX_SPIN_COUNT = 1e7;
2348
- async function spinPassword(password, salt, spinCount, hashAlgorithm) {
2349
- if (!Number.isInteger(spinCount) || spinCount < 0 || spinCount > MAX_SPIN_COUNT) {
2365
+ var SPIN_CHUNK = 1e5;
2366
+ async function spinPassword(password, salt, spinCount, hashAlgorithm, limits = {}) {
2367
+ if (!isValidSpinCount(spinCount, limits.maxSpinCount)) {
2350
2368
  throw new Error(`Unsupported encryption spin count: ${spinCount}.`);
2351
2369
  }
2352
2370
  const passwordBytes = encodePasswordUtf16LE(password);
@@ -2359,6 +2377,9 @@ async function spinPassword(password, salt, spinCount, hashAlgorithm) {
2359
2377
  view.setUint32(0, i2, true);
2360
2378
  buffer.set(h3, 4);
2361
2379
  h3 = digest(buffer);
2380
+ if (i2 % SPIN_CHUNK === SPIN_CHUNK - 1 && i2 + 1 < spinCount) {
2381
+ await new Promise((resolve) => setTimeout(resolve, 0));
2382
+ }
2362
2383
  }
2363
2384
  return h3;
2364
2385
  }
@@ -2377,8 +2398,8 @@ async function extendKey(h2, hashAlgorithm, keyLength) {
2377
2398
  const x3 = concatArrays(await pad2(54), await pad2(92));
2378
2399
  return x3.subarray(0, keyLength);
2379
2400
  }
2380
- function computeAgileKeyBase(password, salt, spinCount, hashAlgorithm) {
2381
- return spinPassword(password, salt, spinCount, hashAlgorithm);
2401
+ function computeAgileKeyBase(password, salt, spinCount, hashAlgorithm, limits = {}) {
2402
+ return spinPassword(password, salt, spinCount, hashAlgorithm, limits);
2382
2403
  }
2383
2404
  async function deriveAgileKeyFromBase(base, hashAlgorithm, blockKey, keyBits, hashSize) {
2384
2405
  const h2 = await hash(hashAlgorithm, concatArrays(base, blockKey));
@@ -2409,10 +2430,82 @@ async function generateIV(hashAlgorithm, salt, blockKey, blockSize) {
2409
2430
  return padded;
2410
2431
  }
2411
2432
 
2433
+ // crypto/validate.ts
2434
+ var AGILE_DIGEST_LENGTH = {
2435
+ "SHA-1": 20,
2436
+ "SHA-256": 32,
2437
+ "SHA-384": 48,
2438
+ "SHA-512": 64
2439
+ };
2440
+ function agileDigestLength(hashAlgorithm) {
2441
+ const name = normalizeDigestAlgorithmName(hashAlgorithm);
2442
+ return name === void 0 ? void 0 : AGILE_DIGEST_LENGTH[name];
2443
+ }
2444
+ var KEY_BITS = /* @__PURE__ */ new Set([128, 192, 256]);
2445
+ function assertBlock(block, what) {
2446
+ if (block.cipherAlgorithm !== "AES") {
2447
+ throw new Error(`Unsupported ${what} cipherAlgorithm: ${block.cipherAlgorithm}.`);
2448
+ }
2449
+ if (block.cipherChaining !== "ChainingModeCBC") {
2450
+ throw new Error(`Unsupported ${what} cipherChaining: ${block.cipherChaining}.`);
2451
+ }
2452
+ const digestLength = agileDigestLength(block.hashAlgorithm);
2453
+ if (digestLength === void 0) {
2454
+ throw new Error(`Unsupported ${what} hashAlgorithm: ${block.hashAlgorithm}.`);
2455
+ }
2456
+ if (block.hashSize !== digestLength) {
2457
+ throw new Error(
2458
+ `Invalid ${what} hashSize ${block.hashSize}: ${block.hashAlgorithm} produces ${digestLength} bytes.`
2459
+ );
2460
+ }
2461
+ if (!KEY_BITS.has(block.keyBits)) throw new Error(`Invalid ${what} keyBits: ${block.keyBits}.`);
2462
+ if (block.blockSize !== 16) throw new Error(`Invalid ${what} blockSize: ${block.blockSize}.`);
2463
+ if (!Number.isInteger(block.saltSize) || block.saltSize <= 0 || block.saltSize > 64) {
2464
+ throw new Error(`Invalid ${what} saltSize: ${block.saltSize}.`);
2465
+ }
2466
+ if (block.saltValue.length !== block.saltSize) {
2467
+ throw new Error(`The ${what} saltValue does not match its saltSize.`);
2468
+ }
2469
+ }
2470
+ function assertValidAgileEncryptionInfo(info) {
2471
+ assertBlock(info.keyData, "keyData");
2472
+ const pke = info.passwordKeyEncryptor;
2473
+ assertBlock(pke, "password key encryptor");
2474
+ if (!Number.isInteger(pke.spinCount) || pke.spinCount < 0) {
2475
+ throw new Error(`Invalid spinCount: ${pke.spinCount}.`);
2476
+ }
2477
+ if (pke.saltSize > pke.hashSize) {
2478
+ throw new Error(`Invalid password key encryptor saltSize: ${pke.saltSize}.`);
2479
+ }
2480
+ }
2481
+ function assertValidStandardEncryptionInfo(info) {
2482
+ if (!KEY_BITS.has(info.header.keySize)) {
2483
+ throw new Error(`Invalid Standard encryption keySize: ${info.header.keySize}.`);
2484
+ }
2485
+ if (info.verifier.salt.length !== 16 || info.verifier.saltSize !== 16) {
2486
+ throw new Error(`Invalid Standard encryption saltSize: ${info.verifier.saltSize}.`);
2487
+ }
2488
+ if (info.verifier.verifierHashSize !== 20) {
2489
+ throw new Error(
2490
+ `Invalid Standard encryption verifierHashSize: ${info.verifier.verifierHashSize}.`
2491
+ );
2492
+ }
2493
+ if (info.verifier.encryptedVerifier.length !== 16 || info.verifier.encryptedVerifierHash.length < 20) {
2494
+ throw new Error("The Standard encryption verifier is truncated.");
2495
+ }
2496
+ }
2497
+
2412
2498
  // crypto/decrypt.ts
2413
- async function verifyAgilePassword(info, password) {
2499
+ async function verifyAgilePassword(info, password, limits = {}) {
2500
+ assertValidAgileEncryptionInfo(info);
2414
2501
  const pke = info.passwordKeyEncryptor;
2415
- const base = await computeAgileKeyBase(password, pke.saltValue, pke.spinCount, pke.hashAlgorithm);
2502
+ const base = await computeAgileKeyBase(
2503
+ password,
2504
+ pke.saltValue,
2505
+ pke.spinCount,
2506
+ pke.hashAlgorithm,
2507
+ limits
2508
+ );
2416
2509
  const blockKey = (block) => deriveAgileKeyFromBase(base, pke.hashAlgorithm, block, pke.keyBits, pke.hashSize);
2417
2510
  const verifierHashInput = await aesCbcDecryptRaw(
2418
2511
  await blockKey(BLOCK_KEYS.verifierHashInput),
@@ -2425,10 +2518,8 @@ async function verifyAgilePassword(info, password) {
2425
2518
  pke.encryptedVerifierHashValue
2426
2519
  );
2427
2520
  const computedHash = await hash(pke.hashAlgorithm, verifierHashInput.subarray(0, pke.saltSize));
2428
- if (computedHash.length < pke.hashSize || verifierHashValue.length < pke.hashSize) return null;
2429
- let difference = 0;
2430
- for (let i2 = 0; i2 < pke.hashSize; i2++) difference |= verifierHashValue[i2] ^ computedHash[i2];
2431
- if (difference !== 0) return null;
2521
+ if (computedHash.length !== pke.hashSize || verifierHashValue.length < pke.hashSize) return null;
2522
+ if (!timingSafeEqual(verifierHashValue.subarray(0, pke.hashSize), computedHash)) return null;
2432
2523
  const decryptedKey = await aesCbcDecryptRaw(
2433
2524
  await blockKey(BLOCK_KEYS.encryptedKeyValue),
2434
2525
  pke.saltValue,
@@ -2437,6 +2528,7 @@ async function verifyAgilePassword(info, password) {
2437
2528
  return decryptedKey.subarray(0, info.keyData.keyBits / 8);
2438
2529
  }
2439
2530
  async function verifyStandardPassword(info, password) {
2531
+ assertValidStandardEncryptionInfo(info);
2440
2532
  const key = await deriveStandardKey(
2441
2533
  password,
2442
2534
  info.verifier.salt,
@@ -2446,20 +2538,16 @@ async function verifyStandardPassword(info, password) {
2446
2538
  const decryptedVerifier = await aesEcbDecrypt(key, info.verifier.encryptedVerifier);
2447
2539
  const decryptedHash = await aesEcbDecrypt(key, info.verifier.encryptedVerifierHash);
2448
2540
  const computedHash = await hash("SHA-1", decryptedVerifier);
2449
- const hashSize = info.verifier.verifierHashSize;
2450
- let match = true;
2451
- for (let i2 = 0; i2 < Math.min(hashSize, 20); i2++) {
2452
- if (computedHash[i2] !== decryptedHash[i2]) {
2453
- match = false;
2454
- break;
2455
- }
2456
- }
2541
+ const match = timingSafeEqual(decryptedHash.subarray(0, 20), computedHash);
2457
2542
  return match ? key : null;
2458
2543
  }
2459
- async function verifyAgileDataIntegrity(info, key, encryptedPackage) {
2544
+ async function verifyAgileDataIntegrity(info, key, encryptedPackage, options = {}) {
2460
2545
  const keyData = info.keyData;
2461
2546
  if (!info.dataIntegrity) {
2462
- return;
2547
+ if (options.allowMissingIntegrity) return;
2548
+ throw new DataIntegrityError(
2549
+ "The encrypted package has no data integrity record, so it cannot be checked for tampering."
2550
+ );
2463
2551
  }
2464
2552
  const hmacKeyIV = await generateIV(
2465
2553
  keyData.hashAlgorithm,
@@ -2486,28 +2574,26 @@ async function verifyAgileDataIntegrity(info, key, encryptedPackage) {
2486
2574
  );
2487
2575
  const expectedHmac = decryptedHmacValue.subarray(0, keyData.hashSize);
2488
2576
  const computedHmac = await hmac(keyData.hashAlgorithm, hmacKey, encryptedPackage);
2489
- let match = true;
2490
- if (computedHmac.length < keyData.hashSize) {
2491
- match = false;
2492
- } else {
2493
- for (let i2 = 0; i2 < keyData.hashSize; i2++) {
2494
- if (computedHmac[i2] !== expectedHmac[i2]) {
2495
- match = false;
2496
- break;
2497
- }
2498
- }
2499
- }
2577
+ const match = timingSafeEqual(computedHmac, expectedHmac);
2500
2578
  if (!match) {
2501
2579
  throw new DataIntegrityError(
2502
2580
  "Data integrity check failed. The encrypted file may be corrupted or tampered with."
2503
2581
  );
2504
2582
  }
2505
2583
  }
2584
+ function readOriginalSize(encryptedPackage, wide) {
2585
+ if (encryptedPackage.length < 8) throw new Error("The EncryptedPackage stream is truncated.");
2586
+ const view = new DataView(encryptedPackage.buffer, encryptedPackage.byteOffset, 8);
2587
+ const high = view.getUint32(4, true);
2588
+ return view.getUint32(0, true) + (wide ? high * 4294967296 : 0);
2589
+ }
2506
2590
  async function decryptAgilePackage(encryptedPackage, key, info) {
2507
2591
  const keyData = info.keyData;
2508
- const sizeView = new DataView(encryptedPackage.buffer, encryptedPackage.byteOffset, 8);
2509
- const originalSize = sizeView.getUint32(0, true) + sizeView.getUint32(4, true) * 4294967296;
2592
+ const originalSize = readOriginalSize(encryptedPackage, true);
2510
2593
  const encryptedData = encryptedPackage.subarray(8);
2594
+ if (originalSize > encryptedData.length) {
2595
+ throw new Error("The declared package size exceeds the encrypted data.");
2596
+ }
2511
2597
  const segmentSize = 4096;
2512
2598
  const result = new Uint8Array(originalSize);
2513
2599
  let resultOffset = 0;
@@ -2531,9 +2617,11 @@ async function decryptAgilePackage(encryptedPackage, key, info) {
2531
2617
  return result.buffer;
2532
2618
  }
2533
2619
  async function decryptStandardPackage(encryptedPackage, key) {
2534
- const sizeView = new DataView(encryptedPackage.buffer, encryptedPackage.byteOffset, 8);
2535
- const originalSize = sizeView.getUint32(0, true);
2620
+ const originalSize = readOriginalSize(encryptedPackage, false);
2536
2621
  const encryptedData = encryptedPackage.subarray(8);
2622
+ if (originalSize > encryptedData.length) {
2623
+ throw new Error("The declared package size exceeds the encrypted data.");
2624
+ }
2537
2625
  const decrypted = await aesEcbDecrypt(key, encryptedData);
2538
2626
  return decrypted.slice(0, originalSize).buffer;
2539
2627
  }
@@ -3116,6 +3204,52 @@ async function encryptStandard(packageData, password, options = {}) {
3116
3204
  );
3117
3205
  return container(encryptionInfo, await encryptStandardPackage(packageData, key));
3118
3206
  }
3207
+ var DEFAULT_XML_LIMITS = {
3208
+ maxDepth: 512,
3209
+ maxNodes: 5e6
3210
+ };
3211
+ var MARKUP_RE = /<!--[\s\S]*?-->|<!\[CDATA\[[\s\S]*?\]\]>|<\?[\s\S]*?\?>|<(\/?)([^\s\/>]+)(?:\s+[^\s=\/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*\s*(\/?)>/g;
3212
+ function checkXmlLimits(xml, label, limits = {}) {
3213
+ const maxDepth = limits.maxDepth ?? DEFAULT_XML_LIMITS.maxDepth;
3214
+ const maxNodes = limits.maxNodes ?? DEFAULT_XML_LIMITS.maxNodes;
3215
+ let depth = 0;
3216
+ let nodes = 0;
3217
+ for (const match of xml.matchAll(MARKUP_RE)) {
3218
+ const [, closing, name, selfClosing] = match;
3219
+ if (name === void 0) continue;
3220
+ if (closing) {
3221
+ depth--;
3222
+ continue;
3223
+ }
3224
+ nodes++;
3225
+ if (nodes > maxNodes) throw new Error(`${label} XML exceeds the limit of ${maxNodes} elements`);
3226
+ if (!selfClosing && ++depth > maxDepth)
3227
+ throw new Error(`${label} XML exceeds the nesting depth limit of ${maxDepth}`);
3228
+ }
3229
+ }
3230
+ function parseXml(xml, options = {}) {
3231
+ const label = options.label ?? "OOXML";
3232
+ if (/<!DOCTYPE|<!ENTITY/i.test(xml))
3233
+ throw new Error(`${label} XML with DTD or entity declarations is not supported`);
3234
+ checkXmlLimits(xml, label, options.limits);
3235
+ let parseError = "";
3236
+ let parsed;
3237
+ try {
3238
+ parsed = new DOMParser({
3239
+ onError: (level, message) => {
3240
+ if (level !== "warning") parseError = message;
3241
+ }
3242
+ }).parseFromString(xml, "application/xml");
3243
+ } catch (error) {
3244
+ throw new Error(
3245
+ `Invalid ${label} XML: ${error instanceof Error ? error.message : String(error)}`,
3246
+ { cause: error }
3247
+ );
3248
+ }
3249
+ if (parseError || !parsed.documentElement)
3250
+ throw new Error(`Invalid ${label} XML: ${parseError || "missing root element"}`);
3251
+ return parsed;
3252
+ }
3119
3253
 
3120
3254
  // crypto/encryption-info.ts
3121
3255
  var RC4_ALG_ID = 26625;
@@ -3178,53 +3312,87 @@ function parseStandardEncryptionInfo(data) {
3178
3312
  }
3179
3313
  };
3180
3314
  }
3181
- function tagAttribute(xml, tag, attr) {
3182
- const tagMatch = xml.match(new RegExp(`<[^>]*${tag}[^>]*>`, "i"));
3183
- if (!tagMatch) return "";
3184
- const attrMatch = tagMatch[0].match(new RegExp(`\\b${attr}="([^"]*)"`, "i"));
3185
- return attrMatch?.[1] ?? "";
3315
+ var PASSWORD_KEY_ENCRYPTOR_URI = "http://schemas.microsoft.com/office/2006/keyEncryptor/password";
3316
+ function childrenNamed(parent, localName) {
3317
+ const found = [];
3318
+ for (let node = parent.firstChild; node; node = node.nextSibling) {
3319
+ if (node.nodeType === 1 && node.localName === localName) {
3320
+ found.push(node);
3321
+ }
3322
+ }
3323
+ return found;
3186
3324
  }
3187
- function parseAgileEncryptionInfo(data) {
3188
- const xml = new TextDecoder("utf-8").decode(data.subarray(8));
3189
- const keyData = (attr) => tagAttribute(xml, "keyData", attr);
3190
- const integrity = (attr) => tagAttribute(xml, "dataIntegrity", attr);
3191
- const pke = (attr) => tagAttribute(xml, "encryptedKey", attr);
3192
- const int = (value) => parseInt(value, 10);
3193
- const encryptedHmacKey = integrity("encryptedHmacKey");
3325
+ function singleChild(parent, localName, mustExist) {
3326
+ const matches = childrenNamed(parent, localName);
3327
+ if (matches.length > 1) throw new Error(`The EncryptionInfo has several ${localName} elements.`);
3328
+ if (matches.length === 0 && mustExist) {
3329
+ throw new Error(`The EncryptionInfo has no ${localName} element.`);
3330
+ }
3331
+ return matches[0];
3332
+ }
3333
+ function required(element, attr) {
3334
+ const value = element.getAttribute(attr);
3335
+ if (!value) throw new Error(`The EncryptionInfo ${element.localName} has no ${attr}.`);
3336
+ return value;
3337
+ }
3338
+ function requiredInt(element, attr) {
3339
+ const value = required(element, attr);
3340
+ if (!/^\d{1,10}$/.test(value)) {
3341
+ throw new Error(`The EncryptionInfo ${element.localName} ${attr} is not a number: ${value}.`);
3342
+ }
3343
+ return Number(value);
3344
+ }
3345
+ function parseKeyBlock(element) {
3194
3346
  return {
3347
+ saltSize: requiredInt(element, "saltSize"),
3348
+ blockSize: requiredInt(element, "blockSize"),
3349
+ keyBits: requiredInt(element, "keyBits"),
3350
+ hashSize: requiredInt(element, "hashSize"),
3351
+ cipherAlgorithm: required(element, "cipherAlgorithm"),
3352
+ cipherChaining: required(element, "cipherChaining"),
3353
+ hashAlgorithm: required(element, "hashAlgorithm"),
3354
+ saltValue: base64Decode(required(element, "saltValue"))
3355
+ };
3356
+ }
3357
+ function parseAgileEncryptionInfo(data) {
3358
+ const root = parseXml(new TextDecoder("utf-8").decode(data.subarray(8)), {
3359
+ label: "EncryptionInfo"
3360
+ }).documentElement;
3361
+ if (root.localName !== "encryption") {
3362
+ throw new Error("The EncryptionInfo root element is not <encryption>.");
3363
+ }
3364
+ const keyData = parseKeyBlock(singleChild(root, "keyData", true));
3365
+ const integrity = singleChild(root, "dataIntegrity", false);
3366
+ const encryptors = childrenNamed(singleChild(root, "keyEncryptors", true), "keyEncryptor");
3367
+ const passwordEncryptors = encryptors.filter(
3368
+ (encryptor) => encryptor.getAttribute("uri") === PASSWORD_KEY_ENCRYPTOR_URI
3369
+ );
3370
+ if (passwordEncryptors.length !== 1) {
3371
+ throw new Error(
3372
+ passwordEncryptors.length === 0 ? "The EncryptionInfo has no password key encryptor." : "The EncryptionInfo has several password key encryptors."
3373
+ );
3374
+ }
3375
+ const pke = singleChild(passwordEncryptors[0], "encryptedKey", true);
3376
+ const info = {
3195
3377
  version: { major: 4, minor: 4 },
3196
3378
  isAgile: true,
3197
- keyData: {
3198
- saltSize: int(keyData("saltSize")),
3199
- blockSize: int(keyData("blockSize")),
3200
- keyBits: int(keyData("keyBits")),
3201
- hashSize: int(keyData("hashSize")),
3202
- cipherAlgorithm: keyData("cipherAlgorithm"),
3203
- cipherChaining: keyData("cipherChaining"),
3204
- hashAlgorithm: keyData("hashAlgorithm"),
3205
- saltValue: base64Decode(keyData("saltValue"))
3206
- },
3207
- ...encryptedHmacKey ? {
3379
+ keyData,
3380
+ ...integrity ? {
3208
3381
  dataIntegrity: {
3209
- encryptedHmacKey: base64Decode(encryptedHmacKey),
3210
- encryptedHmacValue: base64Decode(integrity("encryptedHmacValue"))
3382
+ encryptedHmacKey: base64Decode(required(integrity, "encryptedHmacKey")),
3383
+ encryptedHmacValue: base64Decode(required(integrity, "encryptedHmacValue"))
3211
3384
  }
3212
3385
  } : {},
3213
3386
  passwordKeyEncryptor: {
3214
- saltSize: int(pke("saltSize")),
3215
- blockSize: int(pke("blockSize")),
3216
- keyBits: int(pke("keyBits")),
3217
- hashSize: int(pke("hashSize")),
3218
- cipherAlgorithm: pke("cipherAlgorithm"),
3219
- cipherChaining: pke("cipherChaining"),
3220
- hashAlgorithm: pke("hashAlgorithm"),
3221
- saltValue: base64Decode(pke("saltValue")),
3222
- spinCount: int(pke("spinCount")),
3223
- encryptedVerifierHashInput: base64Decode(pke("encryptedVerifierHashInput")),
3224
- encryptedVerifierHashValue: base64Decode(pke("encryptedVerifierHashValue")),
3225
- encryptedKeyValue: base64Decode(pke("encryptedKeyValue"))
3387
+ ...parseKeyBlock(pke),
3388
+ spinCount: requiredInt(pke, "spinCount"),
3389
+ encryptedVerifierHashInput: base64Decode(required(pke, "encryptedVerifierHashInput")),
3390
+ encryptedVerifierHashValue: base64Decode(required(pke, "encryptedVerifierHashValue")),
3391
+ encryptedKeyValue: base64Decode(required(pke, "encryptedKeyValue"))
3226
3392
  }
3227
3393
  };
3394
+ assertValidAgileEncryptionInfo(info);
3395
+ return info;
3228
3396
  }
3229
3397
 
3230
3398
  // crypto/index.ts
@@ -3240,7 +3408,7 @@ function streams(bytes) {
3240
3408
  }
3241
3409
  throw new Error("EncryptedPackage stream not found. The file may be corrupted.");
3242
3410
  }
3243
- async function decryptOoxmlPackage(input, password) {
3411
+ async function decryptOoxmlPackage(input, password, options = {}) {
3244
3412
  const { info: infoStream, data } = streams(toBytes(input));
3245
3413
  const info = parseEncryptionInfo(infoStream);
3246
3414
  if (isStandard(info)) {
@@ -3248,25 +3416,30 @@ async function decryptOoxmlPackage(input, password) {
3248
3416
  if (!key2) throw new IncorrectPasswordError();
3249
3417
  return new Uint8Array(await decryptStandardPackage(data, key2));
3250
3418
  }
3251
- const key = await verifyAgilePassword(info, password);
3419
+ const key = await verifyAgilePassword(info, password, options);
3252
3420
  if (!key) throw new IncorrectPasswordError();
3253
- await verifyAgileDataIntegrity(info, key, data);
3421
+ await verifyAgileDataIntegrity(info, key, data, options);
3254
3422
  return new Uint8Array(await decryptAgilePackage(data, key, info));
3255
3423
  }
3424
+ function inspectOoxmlEncryption(input) {
3425
+ const info = parseEncryptionInfo(streams(toBytes(input)).info);
3426
+ if (isStandard(info)) return { scheme: "standard", integrityProtected: false };
3427
+ return { scheme: "agile", integrityProtected: info.dataIntegrity !== void 0 };
3428
+ }
3256
3429
  function encryptOoxmlPackage(input, password, options = {}) {
3257
3430
  const bytes = toBytes(input);
3258
3431
  return options.encryptionScheme === "standard" ? encryptStandard(bytes, password, options) : encryptAgile(bytes, password, options);
3259
3432
  }
3260
- async function verifyOoxmlPackagePassword(input, password) {
3433
+ async function verifyOoxmlPackagePassword(input, password, options = {}) {
3261
3434
  try {
3262
3435
  const opened = openEncryptedPackage(input);
3263
3436
  if (!opened) return false;
3264
3437
  const info = parseEncryptionInfo(opened.encryptionInfo);
3265
- const key = isStandard(info) ? await verifyStandardPassword(info, password) : await verifyAgilePassword(info, password);
3438
+ const key = isStandard(info) ? await verifyStandardPassword(info, password) : await verifyAgilePassword(info, password, options);
3266
3439
  return key !== null;
3267
3440
  } catch {
3268
3441
  return false;
3269
3442
  }
3270
3443
  }
3271
3444
 
3272
- export { BLOCK_KEYS, DataIntegrityError, EncryptedFileError, IncorrectPasswordError, PasswordRequiredError, RC4_ALG_ID, buildAgileEncryptionInfoXml, buildEncryptionInfoStream, buildStandardEncryptionInfoStream, computeStandardKeyBase, createOfficeGuid, decryptAgilePackage, decryptOoxmlPackage, decryptStandardPackage, deriveAgileKey, deriveStandardKey, deriveStandardKeyFromBase, detectFileFormat, encryptAgilePackage, encryptOoxmlPackage, encryptStandardPackage, generateIV, isCompoundFile, isEncryptedOoxmlPackage, isOoxmlCryptoError, openEncryptedPackage, parseEncryptionInfo, verifyAgileDataIntegrity, verifyAgilePassword, verifyOoxmlPackagePassword, verifyStandardPassword };
3445
+ export { BLOCK_KEYS, DataIntegrityError, EncryptedFileError, IncorrectPasswordError, PasswordRequiredError, RC4_ALG_ID, buildAgileEncryptionInfoXml, buildEncryptionInfoStream, buildStandardEncryptionInfoStream, computeStandardKeyBase, createOfficeGuid, decryptAgilePackage, decryptOoxmlPackage, decryptStandardPackage, deriveAgileKey, deriveStandardKey, deriveStandardKeyFromBase, detectFileFormat, encryptAgilePackage, encryptOoxmlPackage, encryptStandardPackage, generateIV, inspectOoxmlEncryption, isCompoundFile, isEncryptedOoxmlPackage, isOoxmlCryptoError, openEncryptedPackage, parseEncryptionInfo, verifyAgileDataIntegrity, verifyAgilePassword, verifyOoxmlPackagePassword, verifyStandardPassword };
@@ -7,6 +7,7 @@
7
7
  *
8
8
  * Moved from `src/core/pptx/core/utils/ooxml-crypto-key-derivation.ts` (see PROVENANCE.md).
9
9
  */
10
+ import { type SpinLimits } from '../digest/password-hash.js';
10
11
  /** Well-known block keys for agile encryption as defined in [MS-OFFCRYPTO]. */
11
12
  export declare const BLOCK_KEYS: {
12
13
  readonly verifierHashInput: Uint8Array<ArrayBuffer>;
@@ -15,13 +16,11 @@ export declare const BLOCK_KEYS: {
15
16
  readonly dataIntegrityHmacKey: Uint8Array<ArrayBuffer>;
16
17
  readonly dataIntegrityHmacValue: Uint8Array<ArrayBuffer>;
17
18
  };
18
- /** The largest spin count honoured; Office writes 100,000, far more is a hostile file. */
19
- export declare const MAX_SPIN_COUNT = 10000000;
20
19
  /**
21
20
  * The spun password hash for agile key derivation (the expensive part). Derive several block
22
21
  * keys from one base with {@link deriveAgileKeyFromBase} instead of spinning again for each.
23
22
  */
24
- export declare function computeAgileKeyBase(password: string, salt: Uint8Array, spinCount: number, hashAlgorithm: string): Promise<Uint8Array>;
23
+ export declare function computeAgileKeyBase(password: string, salt: Uint8Array, spinCount: number, hashAlgorithm: string, limits?: SpinLimits): Promise<Uint8Array>;
25
24
  /** Finishes agile key derivation for one block key: Hfinal = H(base + blockKey), sized. */
26
25
  export declare function deriveAgileKeyFromBase(base: Uint8Array, hashAlgorithm: string, blockKey: Uint8Array, keyBits: number, hashSize: number): Promise<Uint8Array>;
27
26
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"key-derivation.d.ts","sourceRoot":"","sources":["../../crypto/key-derivation.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,+EAA+E;AAC/E,eAAO,MAAM,UAAU;aACtB,iBAAiB;aACjB,iBAAiB;a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,OAAO,EAAE,MAAM,EACf,WAAW,SAAI,GACb,OAAO,CAAC,UAAU,CAAC,CAGrB;AAED;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CACtC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,WAAW,SAAI,GACb,OAAO,CAAC,UAAU,CAAC,CAGrB;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAC/B,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,CAAC,CAMrB"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Validation of untrusted EncryptionInfo parameters. The sizes in the stream drive buffer
3
+ * slicing and the verifier comparison, so a hostile value (NaN, 0, a size that does not match
4
+ * the digest) must be rejected rather than shortening or skipping the comparison.
5
+ */
6
+ import type { EncryptionInfo, StandardEncryptionInfo } from './types.js';
7
+ /** The digest length of an agile `hashAlgorithm` name, or undefined when it is not allowed. */
8
+ export declare function agileDigestLength(hashAlgorithm: string): number | undefined;
9
+ /**
10
+ * Rejects agile EncryptionInfo parameters that are not valid for the scheme.
11
+ *
12
+ * @throws Error naming the offending field.
13
+ */
14
+ export declare function assertValidAgileEncryptionInfo(info: EncryptionInfo): void;
15
+ /**
16
+ * Rejects Standard EncryptionInfo parameters that are not valid for the AES scheme (the verifier
17
+ * is a SHA-1 hash, 20 bytes).
18
+ *
19
+ * @throws Error naming the offending field.
20
+ */
21
+ export declare function assertValidStandardEncryptionInfo(info: StandardEncryptionInfo): void;
22
+ //# sourceMappingURL=validate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../crypto/validate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAUtE,+FAA+F;AAC/F,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG3E;AAgCD;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAWzE;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,sBAAsB,GAAG,IAAI,CAkBpF"}
@@ -1 +1 @@
1
- {"version":3,"file":"layout-def-parse.d.ts","sourceRoot":"","sources":["../../../diagram/engine/layout-def-parse.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAKX,YAAY,EAEZ,UAAU,EAKV,MAAM,oBAAoB,CAAC;AA6C5B,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CASvE;AA6JD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAc9E"}
1
+ {"version":3,"file":"layout-def-parse.d.ts","sourceRoot":"","sources":["../../../diagram/engine/layout-def-parse.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAKX,YAAY,EAEZ,UAAU,EAKV,MAAM,oBAAoB,CAAC;AA6C5B,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,UAAU,CASvE;AA8JD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAc9E"}
@@ -1 +1 @@
1
- {"version":3,"file":"pres-tree.d.ts","sourceRoot":"","sources":["../../../diagram/engine/pres-tree.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EAG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