allyhub 0.9.0 → 0.11.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 (582) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/commands/auth.js +4 -4
  3. package/dist/commands/cloud-tools.js +11 -11
  4. package/dist/commands/dev.js +2 -2
  5. package/dist/commands/frames/compare.js +2 -2
  6. package/dist/commands/frames/piece.js +1 -1
  7. package/dist/commands/frames/report.js +2 -0
  8. package/dist/commands/frames.js +11 -9
  9. package/dist/commands/index.js +1 -1
  10. package/dist/commands/inspect/common.js +4 -2
  11. package/dist/commands/inspect/facts.js +3 -3
  12. package/dist/commands/inspect/layout.js +1 -1
  13. package/dist/commands/orgs.js +2 -2
  14. package/dist/commands/render.js +2 -2
  15. package/dist/help.js +4 -4
  16. package/dist/main.js +8 -7
  17. package/dist/node_modules/@allyhub/3d-extension/dist/stage-routes.js +1 -1
  18. package/dist/node_modules/@allyhub/3d-extension/package.json +34 -2
  19. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  20. package/dist/node_modules/@allyhub/browser/dist/emoji.d.ts +29 -0
  21. package/dist/node_modules/@allyhub/browser/dist/emoji.js +57 -0
  22. package/dist/node_modules/@allyhub/browser/dist/picture.d.ts +18 -0
  23. package/dist/node_modules/@allyhub/browser/dist/picture.js +2 -0
  24. package/dist/node_modules/@allyhub/browser/package.json +9 -1
  25. package/dist/node_modules/@allyhub/build/dist/index.d.ts +1 -0
  26. package/dist/node_modules/@allyhub/build/dist/index.js +1 -1
  27. package/dist/node_modules/@allyhub/build/dist/kind-build.d.ts +7 -0
  28. package/dist/node_modules/@allyhub/build/dist/made-notes.d.ts +9 -0
  29. package/dist/node_modules/@allyhub/build/dist/made-notes.js +2 -0
  30. package/dist/node_modules/@allyhub/build/dist/project-tool.d.ts +17 -0
  31. package/dist/node_modules/@allyhub/build/dist/stage-route.d.ts +7 -0
  32. package/dist/node_modules/@allyhub/build/package.json +1 -1
  33. package/dist/node_modules/@allyhub/canvas-extension/package.json +2 -1
  34. package/dist/node_modules/@allyhub/canvas-extension/skills/allyhub/references/canvas.md +4 -24
  35. package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
  36. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +2 -2
  37. package/dist/node_modules/@allyhub/chart/dist/chart.js +1 -1
  38. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  39. package/dist/node_modules/@allyhub/check/package.json +1 -1
  40. package/dist/node_modules/@allyhub/cloud/dist/client.d.ts +10 -0
  41. package/dist/node_modules/@allyhub/cloud/dist/client.js +1 -1
  42. package/dist/node_modules/@allyhub/cloud/dist/config.d.ts +9 -0
  43. package/dist/node_modules/@allyhub/cloud/dist/config.js +1 -1
  44. package/dist/node_modules/@allyhub/cloud/dist/credentials.d.ts +4 -4
  45. package/dist/node_modules/@allyhub/cloud/dist/credentials.js +2 -2
  46. package/dist/node_modules/@allyhub/cloud/dist/device.d.ts +12 -0
  47. package/dist/node_modules/@allyhub/cloud/dist/device.js +2 -0
  48. package/dist/node_modules/@allyhub/cloud/package.json +1 -1
  49. package/dist/node_modules/@allyhub/components/package.json +1 -1
  50. package/dist/node_modules/@allyhub/components/r/callout.json +1 -1
  51. package/dist/node_modules/@allyhub/components/src/callout.ts +98 -13
  52. package/dist/node_modules/@allyhub/dev-server/dist/exports.js +1 -1
  53. package/dist/node_modules/@allyhub/dev-server/dist/index.js +1 -1
  54. package/dist/node_modules/@allyhub/dev-server/dist/inputs.js +2 -0
  55. package/dist/node_modules/@allyhub/dev-server/dist/live.js +1 -1
  56. package/dist/node_modules/@allyhub/dev-server/dist/pages.js +2 -0
  57. package/dist/node_modules/@allyhub/dev-server/dist/ports.js +2 -0
  58. package/dist/node_modules/@allyhub/dev-server/dist/project.js +1 -1
  59. package/dist/node_modules/@allyhub/dev-server/dist/record.js +1 -1
  60. package/dist/node_modules/@allyhub/dev-server/dist/respond.js +2 -0
  61. package/dist/node_modules/@allyhub/dev-server/dist/reveal.js +1 -1
  62. package/dist/node_modules/@allyhub/dev-server/dist/routes.js +1 -1
  63. package/dist/node_modules/@allyhub/dev-server/dist/server.js +2 -2
  64. package/dist/node_modules/@allyhub/dev-server/dist/tools.js +1 -1
  65. package/dist/node_modules/@allyhub/dev-server/dist/watcher.js +1 -1
  66. package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
  67. package/dist/node_modules/@allyhub/diagnostics/dist/problem.d.ts +7 -0
  68. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  69. package/dist/node_modules/@allyhub/doc/dist/captions.js +1 -1
  70. package/dist/node_modules/@allyhub/doc/dist/docx.js +4 -4
  71. package/dist/node_modules/@allyhub/doc/dist/html.js +51 -92
  72. package/dist/node_modules/@allyhub/doc/dist/model.js +1 -1
  73. package/dist/node_modules/@allyhub/doc/dist/page.js +1 -1
  74. package/dist/node_modules/@allyhub/doc/dist/paper.js +1 -1
  75. package/dist/node_modules/@allyhub/doc/dist/table.js +1 -1
  76. package/dist/node_modules/@allyhub/doc/dist/write.js +22 -22
  77. package/dist/node_modules/@allyhub/doc/package.json +1 -1
  78. package/dist/node_modules/@allyhub/doc-extension/dist/export.js +1 -1
  79. package/dist/node_modules/@allyhub/doc-extension/package.json +19 -6
  80. package/dist/node_modules/@allyhub/doc-print/dist/pages.js +5 -5
  81. package/dist/node_modules/@allyhub/doc-print/dist/print.js +10 -10
  82. package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
  83. package/dist/node_modules/@allyhub/export/dist/export.js +1 -1
  84. package/dist/node_modules/@allyhub/export/package.json +1 -1
  85. package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
  86. package/dist/node_modules/@allyhub/extension-host/dist/points.js +1 -1
  87. package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
  88. package/dist/node_modules/@allyhub/formats/dist/data/faces.d.ts +1 -1
  89. package/dist/node_modules/@allyhub/formats/dist/data/sheet.d.ts +87 -1
  90. package/dist/node_modules/@allyhub/formats/dist/data/sheet.js +1 -1
  91. package/dist/node_modules/@allyhub/formats/dist/data/slides.d.ts +89 -0
  92. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +1 -1
  93. package/dist/node_modules/@allyhub/formats/dist/note-shape.d.ts +20 -0
  94. package/dist/node_modules/@allyhub/formats/dist/note-shape.js +1 -1
  95. package/dist/node_modules/@allyhub/formats/dist/schemas.d.ts +50 -0
  96. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  97. package/dist/node_modules/@allyhub/i18n/package.json +1 -1
  98. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  99. package/dist/node_modules/@allyhub/image-extension/dist/export.js +4 -1
  100. package/dist/node_modules/@allyhub/image-extension/package.json +16 -6
  101. package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +7 -39
  102. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  103. package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
  104. package/dist/node_modules/@allyhub/image-render/package.json +1 -1
  105. package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
  106. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  107. package/dist/node_modules/@allyhub/jobs/package.json +1 -1
  108. package/dist/node_modules/@allyhub/linkedin-extension/LICENSE +241 -0
  109. package/dist/node_modules/@allyhub/linkedin-extension/dist/article-build.js +2 -0
  110. package/dist/node_modules/@allyhub/linkedin-extension/dist/article-kind.js +2 -0
  111. package/dist/node_modules/@allyhub/linkedin-extension/dist/build-plugins.js +2 -0
  112. package/dist/node_modules/@allyhub/linkedin-extension/dist/build.js +5 -0
  113. package/dist/node_modules/@allyhub/linkedin-extension/dist/media.js +2 -0
  114. package/dist/node_modules/@allyhub/linkedin-extension/dist/stage-module.js +82 -0
  115. package/dist/node_modules/@allyhub/linkedin-extension/dist/stage.js +2 -0
  116. package/dist/node_modules/@allyhub/linkedin-extension/dist/workspace.js +2 -0
  117. package/dist/node_modules/@allyhub/linkedin-extension/package.json +287 -0
  118. package/dist/node_modules/@allyhub/linkedin-extension/skills/allyhub/references/linkedin.md +12 -0
  119. package/dist/node_modules/@allyhub/linkedin-model/LICENSE +241 -0
  120. package/dist/node_modules/@allyhub/linkedin-model/dist/article-check.js +5 -0
  121. package/dist/node_modules/@allyhub/linkedin-model/dist/article.js +3 -0
  122. package/dist/node_modules/@allyhub/linkedin-model/dist/check.js +2 -0
  123. package/dist/node_modules/@allyhub/linkedin-model/dist/count.js +3 -0
  124. package/dist/node_modules/@allyhub/linkedin-model/dist/edit.js +3 -0
  125. package/dist/node_modules/@allyhub/linkedin-model/dist/html.js +19 -0
  126. package/dist/node_modules/@allyhub/linkedin-model/dist/index.js +2 -0
  127. package/dist/node_modules/@allyhub/linkedin-model/dist/limits.js +2 -0
  128. package/dist/node_modules/@allyhub/linkedin-model/dist/little.js +2 -0
  129. package/dist/node_modules/@allyhub/linkedin-model/dist/post.js +2 -0
  130. package/dist/node_modules/@allyhub/linkedin-model/dist/requests.js +2 -0
  131. package/dist/node_modules/@allyhub/linkedin-model/package.json +14 -0
  132. package/dist/node_modules/@allyhub/linkedin-view/LICENSE +241 -0
  133. package/dist/node_modules/@allyhub/linkedin-view/dist/article.js +2 -0
  134. package/dist/node_modules/@allyhub/linkedin-view/dist/fold.js +3 -0
  135. package/dist/node_modules/@allyhub/linkedin-view/dist/index.js +2 -0
  136. package/dist/node_modules/@allyhub/linkedin-view/dist/post.js +2 -0
  137. package/dist/node_modules/@allyhub/linkedin-view/dist/stage.js +2 -0
  138. package/dist/node_modules/@allyhub/linkedin-view/dist/text.js +2 -0
  139. package/dist/node_modules/@allyhub/linkedin-view/package.json +21 -0
  140. package/dist/node_modules/@allyhub/linkedin-view/src/style.css +600 -0
  141. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  142. package/dist/node_modules/@allyhub/media/package.json +1 -1
  143. package/dist/node_modules/@allyhub/media-extension/dist/vision/faces.js +1 -1
  144. package/dist/node_modules/@allyhub/media-extension/package.json +7 -4
  145. package/dist/node_modules/@allyhub/model/package.json +1 -1
  146. package/dist/node_modules/@allyhub/ooxml/dist/geometry/index.js +1 -1
  147. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  148. package/dist/node_modules/@allyhub/piece/dist/layer.d.ts +2 -0
  149. package/dist/node_modules/@allyhub/piece/dist/layout.d.ts +16 -0
  150. package/dist/node_modules/@allyhub/piece/dist/page/index.d.ts +1 -1
  151. package/dist/node_modules/@allyhub/piece/dist/page/index.js +1 -1
  152. package/dist/node_modules/@allyhub/piece/dist/page/locate.d.ts +14 -1
  153. package/dist/node_modules/@allyhub/piece/dist/page/locate.js +1 -1
  154. package/dist/node_modules/@allyhub/piece/dist/stage.d.ts +18 -0
  155. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  156. package/dist/node_modules/@allyhub/project/dist/version.js +1 -1
  157. package/dist/node_modules/@allyhub/project/package.json +1 -1
  158. package/dist/node_modules/@allyhub/protocol/dist/account.d.ts +140 -0
  159. package/dist/node_modules/@allyhub/protocol/dist/account.js +1 -1
  160. package/dist/node_modules/@allyhub/protocol/dist/auth.d.ts +19 -1
  161. package/dist/node_modules/@allyhub/protocol/dist/auth.js +1 -1
  162. package/dist/node_modules/@allyhub/protocol/dist/cloud.d.ts +157 -0
  163. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  164. package/dist/node_modules/@allyhub/protocol/dist/editor.d.ts +10 -2
  165. package/dist/node_modules/@allyhub/protocol/dist/editor.js +1 -1
  166. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +101 -186
  167. package/dist/node_modules/@allyhub/protocol/dist/frame.js +1 -1
  168. package/dist/node_modules/@allyhub/protocol/dist/mail.d.ts +1 -0
  169. package/dist/node_modules/@allyhub/protocol/dist/mail.js +1 -1
  170. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +92 -94
  171. package/dist/node_modules/@allyhub/protocol/dist/notes.js +1 -1
  172. package/dist/node_modules/@allyhub/protocol/dist/snapshots.d.ts +17 -0
  173. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +1 -1
  174. package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +7 -0
  175. package/dist/node_modules/@allyhub/protocol/dist/teams.js +1 -1
  176. package/dist/node_modules/@allyhub/protocol/dist/tools.d.ts +15 -3
  177. package/dist/node_modules/@allyhub/protocol/dist/tools.js +1 -1
  178. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  179. package/dist/node_modules/@allyhub/registry/package.json +1 -1
  180. package/dist/node_modules/@allyhub/render/dist/encode.js +1 -1
  181. package/dist/node_modules/@allyhub/render/dist/index.js +1 -1
  182. package/dist/node_modules/@allyhub/render/dist/look.js +1 -1
  183. package/dist/node_modules/@allyhub/render/dist/render.js +2 -2
  184. package/dist/node_modules/@allyhub/render/package.json +1 -1
  185. package/dist/node_modules/@allyhub/report-extension/LICENSE +241 -0
  186. package/dist/node_modules/@allyhub/report-extension/dist/build.js +2 -0
  187. package/dist/node_modules/@allyhub/report-extension/dist/check.js +3 -0
  188. package/dist/node_modules/@allyhub/report-extension/dist/cli/find.js +2 -0
  189. package/dist/node_modules/@allyhub/report-extension/dist/cli/index.js +5 -0
  190. package/dist/node_modules/@allyhub/report-extension/dist/cli/picture.js +2 -0
  191. package/dist/node_modules/@allyhub/report-extension/dist/export.js +2 -0
  192. package/dist/node_modules/@allyhub/report-extension/dist/inline.js +58 -0
  193. package/dist/node_modules/@allyhub/report-extension/dist/page.js +21 -0
  194. package/dist/node_modules/@allyhub/report-extension/dist/project-tools.js +21 -0
  195. package/dist/node_modules/@allyhub/report-extension/dist/styles.js +5 -0
  196. package/dist/node_modules/@allyhub/report-extension/dist/theme.js +2 -0
  197. package/dist/node_modules/@allyhub/report-extension/dist/tools.js +2 -0
  198. package/dist/node_modules/@allyhub/report-extension/dist/workspace.js +2 -0
  199. package/dist/node_modules/@allyhub/report-extension/package.json +182 -0
  200. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/STYLE.md +132 -0
  201. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.css +105 -0
  202. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.json +17 -0
  203. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/tokens.js +38 -0
  204. package/dist/node_modules/@allyhub/runtime/dist/compose.js +1 -1
  205. package/dist/node_modules/@allyhub/runtime/dist/embed.js +1 -1
  206. package/dist/node_modules/@allyhub/runtime/dist/player/clips.js +1 -1
  207. package/dist/node_modules/@allyhub/runtime/dist/player/player.js +1 -1
  208. package/dist/node_modules/@allyhub/runtime/package.json +1 -1
  209. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  210. package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
  211. package/dist/node_modules/@allyhub/scenery/dist/index.d.ts +2 -2
  212. package/dist/node_modules/@allyhub/scenery/dist/index.js +1 -1
  213. package/dist/node_modules/@allyhub/scenery/dist/moire.d.ts +45 -5
  214. package/dist/node_modules/@allyhub/scenery/dist/moire.js +2 -2
  215. package/dist/node_modules/@allyhub/scenery/dist/phone.d.ts +4 -3
  216. package/dist/node_modules/@allyhub/scenery/dist/phone.js +1 -1
  217. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  218. package/dist/node_modules/@allyhub/scenery-host/dist/layer/grade.d.ts +7 -0
  219. package/dist/node_modules/@allyhub/scenery-host/dist/layer/grade.js +2 -0
  220. package/dist/node_modules/@allyhub/scenery-host/dist/layer/index.d.ts +4 -3
  221. package/dist/node_modules/@allyhub/scenery-host/dist/layer/index.js +1 -1
  222. package/dist/node_modules/@allyhub/scenery-host/dist/layer/screens.d.ts +1 -1
  223. package/dist/node_modules/@allyhub/scenery-host/dist/layer/screens.js +1 -1
  224. package/dist/node_modules/@allyhub/scenery-host/dist/measure/facts.js +1 -1
  225. package/dist/node_modules/@allyhub/scenery-host/dist/page/screens.d.ts +8 -0
  226. package/dist/node_modules/@allyhub/scenery-host/dist/page/screens.js +1 -1
  227. package/dist/node_modules/@allyhub/scenery-host/dist/viewer.d.ts +6 -0
  228. package/dist/node_modules/@allyhub/scenery-host/dist/viewer.js +1 -1
  229. package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
  230. package/dist/node_modules/@allyhub/sheet/dist/calc/coerce.js +1 -1
  231. package/dist/node_modules/@allyhub/sheet/dist/calc/engine.js +1 -1
  232. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/criteria.js +1 -1
  233. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/date.js +1 -1
  234. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/define.js +1 -1
  235. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/info.js +1 -1
  236. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/kernels.js +1 -1
  237. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/lookup.js +1 -1
  238. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/maths.js +1 -1
  239. package/dist/node_modules/@allyhub/sheet/dist/calc/functions/text.js +1 -1
  240. package/dist/node_modules/@allyhub/sheet/dist/calc/indexes.js +1 -1
  241. package/dist/node_modules/@allyhub/sheet/dist/calc/types.js +1 -1
  242. package/dist/node_modules/@allyhub/sheet/dist/chart.js +1 -1
  243. package/dist/node_modules/@allyhub/sheet/dist/export.js +2 -4
  244. package/dist/node_modules/@allyhub/sheet/dist/formula/move.js +1 -1
  245. package/dist/node_modules/@allyhub/sheet/dist/formula/parse.js +1 -1
  246. package/dist/node_modules/@allyhub/sheet/dist/formula/print.js +1 -1
  247. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  248. package/dist/node_modules/@allyhub/sheet/dist/inspect.js +1 -1
  249. package/dist/node_modules/@allyhub/sheet/dist/printed.js +2 -0
  250. package/dist/node_modules/@allyhub/sheet/dist/values.js +1 -1
  251. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +1 -1
  252. package/dist/node_modules/@allyhub/sheet/dist/write.js +15 -15
  253. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  254. package/dist/node_modules/@allyhub/sheet/dist/xlsx/formula.js +2 -2
  255. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +1 -1
  256. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +2 -2
  257. package/dist/node_modules/@allyhub/sheet/dist/xlsx/sax.js +3 -1
  258. package/dist/node_modules/@allyhub/sheet/dist/xlsx/styles.js +1 -1
  259. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  260. package/dist/node_modules/@allyhub/sheet/dist/xlsx/xml.js +3 -2
  261. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  262. package/dist/node_modules/@allyhub/sheet-extension/dist/export.js +2 -6
  263. package/dist/node_modules/@allyhub/sheet-extension/package.json +24 -9
  264. package/dist/node_modules/@allyhub/slides-core/dist/api.js +2 -2
  265. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  266. package/dist/node_modules/@allyhub/slides-core/dist/enums.js +1 -1
  267. package/dist/node_modules/@allyhub/slides-core/dist/measure.js +1 -1
  268. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +1 -1
  269. package/dist/node_modules/@allyhub/slides-core/dist/sdk.js +1 -1
  270. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  271. package/dist/node_modules/@allyhub/slides-extension/dist/export.js +1 -1
  272. package/dist/node_modules/@allyhub/slides-extension/package.json +22 -16
  273. package/dist/node_modules/@allyhub/slides-pptx/dist/import/code.js +2 -2
  274. package/dist/node_modules/@allyhub/slides-pptx/dist/import/index.js +2 -2
  275. package/dist/node_modules/@allyhub/slides-pptx/dist/read/common.js +1 -1
  276. package/dist/node_modules/@allyhub/slides-pptx/dist/read/shapes.js +1 -1
  277. package/dist/node_modules/@allyhub/slides-pptx/dist/read/text.js +1 -1
  278. package/dist/node_modules/@allyhub/slides-pptx/dist/shapes.js +1 -1
  279. package/dist/node_modules/@allyhub/slides-pptx/dist/text.js +1 -1
  280. package/dist/node_modules/@allyhub/slides-pptx/dist/write.js +2 -2
  281. package/dist/node_modules/@allyhub/slides-pptx/dist/xml.js +1 -1
  282. package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
  283. package/dist/node_modules/@allyhub/slides-runtime/dist/draw.js +2 -2
  284. package/dist/node_modules/@allyhub/slides-runtime/dist/load.js +5 -5
  285. package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
  286. package/dist/node_modules/@allyhub/stage/package.json +1 -1
  287. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400-italic.css +19 -0
  288. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/400.css +19 -0
  289. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700-italic.css +19 -0
  290. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/700.css +19 -0
  291. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/LICENSE +93 -0
  292. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/cambria.css +76 -0
  293. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-400-italic.woff2 +0 -0
  294. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-400-normal.woff2 +0 -0
  295. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-700-italic.woff2 +0 -0
  296. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-700-normal.woff2 +0 -0
  297. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-400-italic.woff2 +0 -0
  298. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-400-normal.woff2 +0 -0
  299. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-700-italic.woff2 +0 -0
  300. package/dist/node_modules/@allyhub/stage-page/dist/fonts/caladea/files/caladea-latin-ext-700-normal.woff2 +0 -0
  301. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400-italic.css +79 -0
  302. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/400.css +79 -0
  303. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700-italic.css +79 -0
  304. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/700.css +79 -0
  305. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/LICENSE +93 -0
  306. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/courier-new.css +316 -0
  307. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-400-italic.woff2 +0 -0
  308. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-400-normal.woff2 +0 -0
  309. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-700-italic.woff2 +0 -0
  310. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-700-normal.woff2 +0 -0
  311. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-400-italic.woff2 +0 -0
  312. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-400-normal.woff2 +0 -0
  313. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-700-italic.woff2 +0 -0
  314. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-cyrillic-ext-700-normal.woff2 +0 -0
  315. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-400-italic.woff2 +0 -0
  316. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-400-normal.woff2 +0 -0
  317. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-700-italic.woff2 +0 -0
  318. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-700-normal.woff2 +0 -0
  319. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-400-italic.woff2 +0 -0
  320. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-400-normal.woff2 +0 -0
  321. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-700-italic.woff2 +0 -0
  322. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-greek-ext-700-normal.woff2 +0 -0
  323. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-400-italic.woff2 +0 -0
  324. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-400-normal.woff2 +0 -0
  325. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-700-italic.woff2 +0 -0
  326. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-hebrew-700-normal.woff2 +0 -0
  327. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-400-italic.woff2 +0 -0
  328. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-400-normal.woff2 +0 -0
  329. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-700-italic.woff2 +0 -0
  330. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-700-normal.woff2 +0 -0
  331. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-400-italic.woff2 +0 -0
  332. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-400-normal.woff2 +0 -0
  333. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-700-italic.woff2 +0 -0
  334. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-latin-ext-700-normal.woff2 +0 -0
  335. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-400-italic.woff2 +0 -0
  336. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-400-normal.woff2 +0 -0
  337. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-700-italic.woff2 +0 -0
  338. package/dist/node_modules/@allyhub/stage-page/dist/fonts/cousine/files/cousine-vietnamese-700-normal.woff2 +0 -0
  339. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400-italic.css +79 -0
  340. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/400.css +79 -0
  341. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700-italic.css +79 -0
  342. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/700.css +79 -0
  343. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/LICENSE +93 -0
  344. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-400-italic.woff2 +0 -0
  345. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-400-normal.woff2 +0 -0
  346. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-700-italic.woff2 +0 -0
  347. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-700-normal.woff2 +0 -0
  348. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-400-italic.woff2 +0 -0
  349. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-400-normal.woff2 +0 -0
  350. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-700-italic.woff2 +0 -0
  351. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-cyrillic-ext-700-normal.woff2 +0 -0
  352. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-400-italic.woff2 +0 -0
  353. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-400-normal.woff2 +0 -0
  354. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-700-italic.woff2 +0 -0
  355. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-700-normal.woff2 +0 -0
  356. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-400-italic.woff2 +0 -0
  357. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-400-normal.woff2 +0 -0
  358. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-700-italic.woff2 +0 -0
  359. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-greek-ext-700-normal.woff2 +0 -0
  360. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-400-italic.woff2 +0 -0
  361. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-400-normal.woff2 +0 -0
  362. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-700-italic.woff2 +0 -0
  363. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-hebrew-700-normal.woff2 +0 -0
  364. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-400-italic.woff2 +0 -0
  365. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-400-normal.woff2 +0 -0
  366. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-700-italic.woff2 +0 -0
  367. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-700-normal.woff2 +0 -0
  368. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-400-italic.woff2 +0 -0
  369. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-400-normal.woff2 +0 -0
  370. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-700-italic.woff2 +0 -0
  371. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-latin-ext-700-normal.woff2 +0 -0
  372. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-400-italic.woff2 +0 -0
  373. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-400-normal.woff2 +0 -0
  374. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-700-italic.woff2 +0 -0
  375. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/files/tinos-vietnamese-700-normal.woff2 +0 -0
  376. package/dist/node_modules/@allyhub/stage-page/dist/fonts/tinos/times-new-roman.css +316 -0
  377. package/dist/node_modules/@allyhub/stage-page/dist/host.js +1 -1
  378. package/dist/node_modules/@allyhub/stage-page/dist/install.js +1 -1
  379. package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.html +3 -0
  380. package/dist/node_modules/@allyhub/stage-page/dist/runtime/stage.js +1 -1
  381. package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
  382. package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +18 -18
  383. package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
  384. package/dist/node_modules/@allyhub/video-core/dist/schema.js +1 -1
  385. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  386. package/dist/node_modules/@allyhub/video-extension/dist/export.js +1 -1
  387. package/dist/node_modules/@allyhub/video-extension/package.json +17 -4
  388. package/dist/node_modules/@allyhub/video-measure/dist/version.js +1 -1
  389. package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
  390. package/dist/node_modules/@allyhub/video-sdk/dist/phone.js +1 -1
  391. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  392. package/dist/node_modules/@allyhub/website/package.json +1 -1
  393. package/dist/node_modules/@allyhub/website-extension/dist/held.js +2 -0
  394. package/dist/node_modules/@allyhub/website-extension/dist/preview.js +5 -5
  395. package/dist/node_modules/@allyhub/website-extension/dist/project-tools.js +24 -1
  396. package/dist/node_modules/@allyhub/website-extension/dist/tools.js +1 -1
  397. package/dist/node_modules/@allyhub/website-extension/package.json +49 -2
  398. package/dist/node_modules/@allyhub/x-extension/dist/build.js +4 -3
  399. package/dist/node_modules/@allyhub/x-extension/package.json +43 -15
  400. package/dist/node_modules/@allyhub/x-extension/skills/allyhub/references/x.md +7 -62
  401. package/dist/node_modules/@allyhub/x-model/package.json +1 -1
  402. package/dist/node_modules/@allyhub/x-view/dist/article.js +1 -1
  403. package/dist/node_modules/@allyhub/x-view/dist/index.js +1 -1
  404. package/dist/node_modules/@allyhub/x-view/dist/post.js +2 -2
  405. package/dist/node_modules/@allyhub/x-view/package.json +1 -1
  406. package/dist/package.json +12 -10
  407. package/dist/text/facts-text.js +5 -5
  408. package/dist/text/index.js +1 -1
  409. package/dist/text/long-text.js +4 -0
  410. package/dist/works.js +1 -1
  411. package/editor-web/assets/{abnfDiagram-WEYOIA3C-CN5PiJYY.js → abnfDiagram-WEYOIA3C-BKmMA6gn.js} +1 -1
  412. package/editor-web/assets/{architecture-WOLXFQ4H-BnvZtQYk.js → architecture-WOLXFQ4H-BEFBgb4k.js} +1 -1
  413. package/editor-web/assets/{architectureDiagram-ZHVYKT53-tkcEcFQ8.js → architectureDiagram-ZHVYKT53-_u5YfCjY.js} +1 -1
  414. package/editor-web/assets/{arrow-up-DTP2yVSU.js → arrow-up-B5rJbBv0.js} +1 -1
  415. package/editor-web/assets/article-BUmD3xtR.js +8 -0
  416. package/editor-web/assets/article-DNioBb3p.js +7 -0
  417. package/editor-web/assets/{audio-lines-Ti8-m7H2.js → audio-lines-CzuzsGjI.js} +1 -1
  418. package/editor-web/assets/{blockDiagram-RJAE7QA3-DhqEIpie.js → blockDiagram-RJAE7QA3-DybfaO3Z.js} +1 -1
  419. package/editor-web/assets/bookmark-Dsd3kHJJ.js +1 -0
  420. package/editor-web/assets/button-eGxLxbv9.js +41 -0
  421. package/editor-web/assets/{c4Diagram-XDPPPE54-Bg9G95tl.js → c4Diagram-XDPPPE54-BfqLHB5i.js} +1 -1
  422. package/editor-web/assets/calc-worker-D2pGis6e.js +45 -0
  423. package/editor-web/assets/channel-TNPgFDrw.js +1 -0
  424. package/editor-web/assets/chart-C37xvZT2.js +1 -0
  425. package/editor-web/assets/chart-no-axes-column-BVkeF_Mr.js +1 -0
  426. package/editor-web/assets/{chunk-2E7WHVMD-C8Ve9lAa.js → chunk-2E7WHVMD-BVp1I_d0.js} +1 -1
  427. package/editor-web/assets/{chunk-4EMNKR2T-BDWwPUnT.js → chunk-4EMNKR2T-CTdgWEMr.js} +1 -1
  428. package/editor-web/assets/{chunk-55XCU76K-BQiNPKgx.js → chunk-55XCU76K-7pnsxeaP.js} +1 -1
  429. package/editor-web/assets/{chunk-7S6XSTFO-QoEt-6jf.js → chunk-7S6XSTFO-Dc0Dvkq7.js} +1 -1
  430. package/editor-web/assets/{chunk-AQDTSKZB-BeuwIv0-.js → chunk-AQDTSKZB-VAILIsfx.js} +1 -1
  431. package/editor-web/assets/{chunk-DSNLSHJZ-BHW7sLAz.js → chunk-DSNLSHJZ-CUDx1Rv5.js} +1 -1
  432. package/editor-web/assets/{chunk-HAGFOTED-bbGED0hu.js → chunk-HAGFOTED-DAoEe-dJ.js} +1 -1
  433. package/editor-web/assets/{chunk-HNE4Q36P-FltWp8yo.js → chunk-HNE4Q36P-g0akya12.js} +1 -1
  434. package/editor-web/assets/{chunk-NQOKRVIF-NeQzr6kH.js → chunk-NQOKRVIF-hTGjzXdJ.js} +1 -1
  435. package/editor-web/assets/{chunk-UHW7PFBP-eA4-WUhn.js → chunk-UHW7PFBP-BgLV8BIJ.js} +1 -1
  436. package/editor-web/assets/{chunk-VQ5W62QI-BPPv325z.js → chunk-VQ5W62QI-Bw19OOSD.js} +1 -1
  437. package/editor-web/assets/{chunk-WQQL4CDK-DOCIz7Te.js → chunk-WQQL4CDK-CMST9dyE.js} +1 -1
  438. package/editor-web/assets/{chunk-YZO67HFG-Dc_ihQJi.js → chunk-YZO67HFG-Bbpu36XF.js} +1 -1
  439. package/editor-web/assets/{chunk-ZAUX2LTX-CoqwCPSm.js → chunk-ZAUX2LTX-C48Ri0Gs.js} +1 -1
  440. package/editor-web/assets/{chunk-ZCHMQSOR-CZUQPkJx.js → chunk-ZCHMQSOR-DN1g01Oe.js} +1 -1
  441. package/editor-web/assets/{classDiagram-v2-4MYWR3UA-DUh9c50k.js → classDiagram-v2-4MYWR3UA-U6jbPr2d.js} +1 -1
  442. package/editor-web/assets/collaborator-B1u2td9m.js +1 -0
  443. package/editor-web/assets/createLucideIcon-GFZ_fxLc.js +1 -0
  444. package/editor-web/assets/{cynefin-EF2NZ3EQ-DUTZiog0.js → cynefin-EF2NZ3EQ-gzkai_7-.js} +1 -1
  445. package/editor-web/assets/{cynefinDiagram-WF24UDRP-oAjpfbrU.js → cynefinDiagram-WF24UDRP-DtSekSr6.js} +1 -1
  446. package/editor-web/assets/{dagre-NK4GIZVX-BrKvKCvb.js → dagre-NK4GIZVX-CiUwYVT6.js} +1 -1
  447. package/editor-web/assets/{diagram-CBK3MWTC-GekVRnmm.js → diagram-CBK3MWTC-r9XHCV-k.js} +1 -1
  448. package/editor-web/assets/{diagram-I5XIIV2D-CDd1VFRT.js → diagram-I5XIIV2D-DxVsDZ34.js} +1 -1
  449. package/editor-web/assets/{diagram-ODIL2UCW-535RISTn.js → diagram-ODIL2UCW-B0eNQoHV.js} +1 -1
  450. package/editor-web/assets/{diagram-PFBEJUXE-MXzzKCGG.js → diagram-PFBEJUXE-C7f2MfJT.js} +1 -1
  451. package/editor-web/assets/{diagram-RJA3I4VV-vKVwkQxY.js → diagram-RJA3I4VV-CSXcnvct.js} +1 -1
  452. package/editor-web/assets/{diagram-TYUNFSNR-UwGAiQLx.js → diagram-TYUNFSNR-DXzOD_ii.js} +1 -1
  453. package/editor-web/assets/dist-BGRwhCQO.js +1 -0
  454. package/editor-web/assets/{dist-9ymlIMhr.js → dist-BW4X7BrF.js} +1 -1
  455. package/editor-web/assets/dist-BgDRE85b.js +2 -0
  456. package/editor-web/assets/dist-Blq5nJnU.js +24 -0
  457. package/editor-web/assets/dist-BuWaZ3Y4.js +274 -0
  458. package/editor-web/assets/dist-C1emZ9wX.js +37 -0
  459. package/editor-web/assets/dist-CC7OeU1e.js +6 -0
  460. package/editor-web/assets/dist-CX-fiPSn.js +38 -0
  461. package/editor-web/assets/dist-C_VvG-_9.js +5 -0
  462. package/editor-web/assets/dist-Ce7HrBxv.js +3 -0
  463. package/editor-web/assets/dist-D2k6w-_a.js +1 -0
  464. package/editor-web/assets/dist-DDv_SbKw.js +84 -0
  465. package/editor-web/assets/dist-DEoEO4zs.js +1 -0
  466. package/editor-web/assets/dist-DlDxxPIP.js +16 -0
  467. package/editor-web/assets/dist-Gz6NDS0J.js +4 -0
  468. package/editor-web/assets/{ebnfDiagram-V4P3TTPT-73yGokYa.js → ebnfDiagram-V4P3TTPT-Cs4YRvDD.js} +1 -1
  469. package/editor-web/assets/{elk-QONTBCTQ-BW6V9y6a.js → elk-QONTBCTQ-Bh3LZ9WI.js} +1 -1
  470. package/editor-web/assets/{erDiagram-KYQIGQAA-BPqIJ22h.js → erDiagram-KYQIGQAA-C4vYTYXp.js} +1 -1
  471. package/editor-web/assets/{eventmodeling-K75KTNOO-_VZ8jvuy.js → eventmodeling-K75KTNOO-BN1kkHWS.js} +1 -1
  472. package/editor-web/assets/flowDiagram-IUGLLWBU-B04NGsyi.js +1 -0
  473. package/editor-web/assets/{ganttDiagram-R7GPNTJY-DZ157JN2.js → ganttDiagram-R7GPNTJY-CA1LkkC5.js} +1 -1
  474. package/editor-web/assets/{gitGraph-VSP46ZUC-fmcNL9bq.js → gitGraph-VSP46ZUC-Dy5tA7dG.js} +1 -1
  475. package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-DiZDyksR.js → gitGraphDiagram-PDYL7XHY-hJIB8EkH.js} +1 -1
  476. package/editor-web/assets/hint-B8JpEypy.js +1 -0
  477. package/editor-web/assets/index-CgB5osVc.js +28 -0
  478. package/editor-web/assets/index-Daytem9N.css +2 -0
  479. package/editor-web/assets/{info-OHQRW6UA-V06620kN.js → info-OHQRW6UA-DvzSf7rQ.js} +1 -1
  480. package/editor-web/assets/{infoDiagram-MVDRKAX5-CbIgheWX.js → infoDiagram-MVDRKAX5-BjIMm4Af.js} +1 -1
  481. package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-D5oJQPkG.js → ishikawaDiagram-HPEHV2GE-Bpz71S40.js} +1 -1
  482. package/editor-web/assets/{italic-CDhZKo_q.js → italic-D10w8n6C.js} +1 -1
  483. package/editor-web/assets/{journeyDiagram-BOSHW7O7-BZEv6JI4.js → journeyDiagram-BOSHW7O7-DAB-pZjD.js} +1 -1
  484. package/editor-web/assets/{kanban-definition-FNSA4HC5-CLG1R8y_.js → kanban-definition-FNSA4HC5-cYeyh3P6.js} +1 -1
  485. package/editor-web/assets/katex-5Z2zF-9g.js +257 -0
  486. package/editor-web/assets/link-BC5xK1-1.js +1 -0
  487. package/editor-web/assets/{mermaid-parser.core-DxDwXM7z.js → mermaid-parser.core-req5LE0X.js} +3 -3
  488. package/editor-web/assets/{mermaid.core-tU55ZwVG.js → mermaid.core-zFwZug4C.js} +4 -4
  489. package/editor-web/assets/{mindmap-definition-6OY57UG3-CYf4zzAh.js → mindmap-definition-6OY57UG3-TStWb7DG.js} +1 -1
  490. package/editor-web/assets/minus-DaWs5i8B.js +1 -0
  491. package/editor-web/assets/{packet-JDAUHWVQ-DsHeKYNL.js → packet-JDAUHWVQ-smFhVKcB.js} +1 -1
  492. package/editor-web/assets/palette-BIOudGkm.js +1 -0
  493. package/editor-web/assets/{pegDiagram-ECIUJNBX-CQyh6TTa.js → pegDiagram-ECIUJNBX-DvSNRv0-.js} +1 -1
  494. package/editor-web/assets/{pie-XZMESJXO-3vCIvpNB.js → pie-XZMESJXO-qjaGsBZG.js} +1 -1
  495. package/editor-web/assets/{pieDiagram-GNMPY74T-DF5yGBLn.js → pieDiagram-GNMPY74T-Dd9P-Pdc.js} +1 -1
  496. package/editor-web/assets/play-CrMmPghG.js +1 -0
  497. package/editor-web/assets/progress-DE4C5_3x.js +6 -0
  498. package/editor-web/assets/props-form-CsmDBqzy.js +1 -0
  499. package/editor-web/assets/{quadrantDiagram-D57K4MC3-B7pxlDYP.js → quadrantDiagram-D57K4MC3-h2IIKUUA.js} +1 -1
  500. package/editor-web/assets/{radar-ABXABTNO-cpEA41mL.js → radar-ABXABTNO-DlVrSA1d.js} +1 -1
  501. package/editor-web/assets/{railroad-I3PHUGI6-BLyy5R2c.js → railroad-I3PHUGI6-nFbuLAtc.js} +1 -1
  502. package/editor-web/assets/{railroad-abnf-LNEFI6M7-Y-oyol19.js → railroad-abnf-LNEFI6M7-Daj8h2iV.js} +1 -1
  503. package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-o58wHZsr.js → railroad-ebnf-DWYD2UWJ-eYJyl5PH.js} +1 -1
  504. package/editor-web/assets/{railroad-peg-JR7BVNR7-CcD3PXZ8.js → railroad-peg-JR7BVNR7-BTRhKZQq.js} +1 -1
  505. package/editor-web/assets/{railroadDiagram-Y72NRBL7-BuCC4eyy.js → railroadDiagram-Y72NRBL7-CeLGUjdp.js} +1 -1
  506. package/editor-web/assets/react-WA6wlt8S.js +1 -0
  507. package/editor-web/assets/{repeat-2-C5PCbNsg.js → repeat-2-VQP1EVOZ.js} +1 -1
  508. package/editor-web/assets/{requirementDiagram-EQYSW5RA-Dp-JFGn4.js → requirementDiagram-EQYSW5RA-Dmk9XRM5.js} +1 -1
  509. package/editor-web/assets/row-BRlEWRrK.js +1 -0
  510. package/editor-web/assets/{sankeyDiagram-SY24JHO5-rYuCqEvw.js → sankeyDiagram-SY24JHO5-Yn4zlrAM.js} +1 -1
  511. package/editor-web/assets/schemas-VikZYZIK.js +1 -0
  512. package/editor-web/assets/{sequenceDiagram-BLEHNHQU-DryW8x6d.js → sequenceDiagram-BLEHNHQU-BTRnp_PW.js} +1 -1
  513. package/editor-web/assets/session-Do9AqS38.js +1 -0
  514. package/editor-web/assets/slides-diTEQ3C5.js +1 -0
  515. package/editor-web/assets/snapshots-BUGlKQIB.js +56 -0
  516. package/editor-web/assets/sound-Bj3o9_Fa.js +1 -0
  517. package/editor-web/assets/split-CNU1RHcX.js +3 -0
  518. package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-Bnp0XfpT.js → stateDiagram-v2-A6IESKWZ-kstrRKv2.js} +1 -1
  519. package/editor-web/assets/{strikethrough-DJckA35o.js → strikethrough-CfXx6IYH.js} +1 -1
  520. package/editor-web/assets/{svg-BjM9RazX.js → svg-Cx50MpxK.js} +1 -1
  521. package/editor-web/assets/swatch-WeJD41aW.js +1 -0
  522. package/editor-web/assets/{swimlanes-B3ENRKFQ-BiRRhhbd.js → swimlanes-B3ENRKFQ-DaZsZkeP.js} +1 -1
  523. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-CBZAujYY.js +8 -0
  524. package/editor-web/assets/switch-N0G_sbqt.js +1 -0
  525. package/editor-web/assets/syntax-BVsgRJ4I.js +66 -0
  526. package/editor-web/assets/syntax-oWsKBWFw.js +1 -0
  527. package/editor-web/assets/table-B6hVZAMi.js +1 -0
  528. package/editor-web/assets/tabs-DIFDqj-l.js +1 -0
  529. package/editor-web/assets/{textarea-BGtPqZdB.js → textarea-tEWvBY9p.js} +1 -1
  530. package/editor-web/assets/{timeline-definition-JXYKGLGB-D-Q5ZtDF.js → timeline-definition-JXYKGLGB-CLCvY-Yf.js} +1 -1
  531. package/editor-web/assets/{trash-2-Bjj6cWzP.js → trash-2-BP6nqpg2.js} +1 -1
  532. package/editor-web/assets/{treeView-D4JQ5SDB-B6DDatXq.js → treeView-D4JQ5SDB-BmN0gwdC.js} +1 -1
  533. package/editor-web/assets/{treemap-SAJKECNS-D7j5ZhiI.js → treemap-SAJKECNS-DN29G_E_.js} +1 -1
  534. package/editor-web/assets/{undo-2-yOSG766T.js → undo-2-CHR0nvWL.js} +1 -1
  535. package/editor-web/assets/{usecaseDiagram-WPOLBNNX-tkrdKUJB.js → usecaseDiagram-WPOLBNNX-DTRS54cB.js} +1 -1
  536. package/editor-web/assets/{vennDiagram-Q3Y3IDCW-Ch4XbSnD.js → vennDiagram-Q3Y3IDCW-DAAc11Hx.js} +1 -1
  537. package/editor-web/assets/video-BlvmR8BK.js +1 -0
  538. package/editor-web/assets/{wardley-7MLQ67FV-Bynt7qNQ.js → wardley-7MLQ67FV-B-UYkmdB.js} +1 -1
  539. package/editor-web/assets/{wardleyDiagram-IVAIDKWA-DRuSgm_L.js → wardleyDiagram-IVAIDKWA-BmbwCaky.js} +1 -1
  540. package/editor-web/assets/words-D_4T9Adq.js +3 -0
  541. package/editor-web/assets/words-WgdEQdYP.js +2 -0
  542. package/editor-web/assets/{xychartDiagram-4URNHDU4-DctpvfkL.js → xychartDiagram-4URNHDU4-ChAfAq1U.js} +1 -1
  543. package/editor-web/index.html +6 -5
  544. package/package.json +8 -2
  545. package/editor-web/assets/alt-BOVao_9S.js +0 -4
  546. package/editor-web/assets/article-B6YCzhj8.js +0 -73
  547. package/editor-web/assets/calc-worker-B5-fDWnb.js +0 -45
  548. package/editor-web/assets/channel-C26aBI4o.js +0 -1
  549. package/editor-web/assets/chart-BOnxneyw.js +0 -1
  550. package/editor-web/assets/choice-O5nwc2N0.js +0 -1
  551. package/editor-web/assets/collaborator-BJU5qwHd.js +0 -1
  552. package/editor-web/assets/createLucideIcon-B3B95oX5.js +0 -1
  553. package/editor-web/assets/dist-C6NqUEG4.js +0 -16
  554. package/editor-web/assets/dist-C9UGmCG9.js +0 -6
  555. package/editor-web/assets/dist-CAk5bjBm.js +0 -1
  556. package/editor-web/assets/dist-CKyfo5RM.js +0 -340
  557. package/editor-web/assets/dist-CRaWqNwq.js +0 -37
  558. package/editor-web/assets/dist-CwIBc7HQ.js +0 -1
  559. package/editor-web/assets/dist-DXRmkezB.js +0 -38
  560. package/editor-web/assets/dist-EKK5i0dG.js +0 -219
  561. package/editor-web/assets/dist-hHJlpLWo.js +0 -5
  562. package/editor-web/assets/dist-oYKcwWUj.js +0 -4
  563. package/editor-web/assets/dist-shKo7XVN.js +0 -2
  564. package/editor-web/assets/dist-wrKxBrVu.js +0 -24
  565. package/editor-web/assets/flowDiagram-IUGLLWBU-ouDQYiTr.js +0 -1
  566. package/editor-web/assets/hint-_AQWCDMj.js +0 -1
  567. package/editor-web/assets/index-BsstP-cI.js +0 -28
  568. package/editor-web/assets/index-DQRcmxBO.css +0 -2
  569. package/editor-web/assets/minus-Cgmm6ncD.js +0 -1
  570. package/editor-web/assets/progress-0B_TVsPi.js +0 -6
  571. package/editor-web/assets/react-BP46yLMB.js +0 -1
  572. package/editor-web/assets/react-pgBZqVxJ.js +0 -96
  573. package/editor-web/assets/schemas-Ewwjtbf4.js +0 -1
  574. package/editor-web/assets/session-DiI9KYRI.js +0 -1
  575. package/editor-web/assets/slides-CCwgBcGH.js +0 -1
  576. package/editor-web/assets/sound-CqryteNl.js +0 -1
  577. package/editor-web/assets/swatch-DL3HqIjW.js +0 -1
  578. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-BkOls8Tv.js +0 -8
  579. package/editor-web/assets/switch-DltnKqN-.js +0 -1
  580. package/editor-web/assets/syntax-CC6QYhCz.js +0 -1
  581. package/editor-web/assets/tabs-C-re0Kxn.js +0 -1
  582. package/editor-web/assets/video-DXFiCNGc.js +0 -1
@@ -1,4 +1,4 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{themeColor as T,themeColorOf as M}from"@allyhub/chart";import{presetAdjustments as z}from"@allyhub/ooxml/geometry";import{connectorBetween as G,connectorEnds as I,siteOn as B,sitesOf as D}from"./connect.js";import{framedComponent as H}from"@allyhub/piece";import{MSO_CONNECTOR as U,MSO_SHAPE as v,MSO_SHAPE_TYPE as X,PP_PLACEHOLDER as j}from"./enums.js";import{Chart as Y}from"./chart-api.js";import{AUTOSHAPE_STYLE as p,SHADOW_DEFAULTS as P,CONNECTOR_GEOMETRIES as J,CONNECTOR_STYLE as R,FOOTER_IDX as Z,isConnectorGeometry as k,OFFICE_TEXT_STYLES as q,placeholderLevels as K,TEXT_INSETS as w,TEXTBOX_FRAME as W}from"./office.js";import{masterPlaceholder as F}from"./placeholders.js";import{strict as h}from"./strict.js";import{EMU_PER_PT as A,SLIDE_SIZES as $,length as l,lengthOr as y}from"./units.js";class Q extends Error{constructor(t){super(`${t} (allyhub slides capabilities lists what the API holds).`),this.name="Unsupported"}}const m=i=>{throw new Q(i)},V=/^#?[0-9a-f]{6}$/iu,C=i=>{if(!V.test(i))throw new Error(`rgb ${i} is not RRGGBB.`);return`#${i.replace("#","").toUpperCase()}`};export const RGBColor=Object.assign(function(t,e,s){for(const o of[t,e,s])if(!Number.isInteger(o)||o<0||o>255)throw new Error(`RGBColor(${String(t)}, ${String(e)}, ${String(s)}): each is 0 to 255.`);const r=`#${[t,e,s].map(o=>o.toString(16).padStart(2,"0")).join("").toUpperCase()}`;return new.target===void 0?r:new String(r)},{from_string:i=>C(i)});export class ColorFormat{read;write;constructor(t,e){return this.read=t,this.write=e,h(this,"ColorFormat")}get theme_color(){const t=this.read();return t===void 0?void 0:M(t)}set theme_color(t){this.write(t===void 0?void 0:T(t,this.brightness))}get brightness(){const t=this.read();return typeof t=="object"&&"brightness"in t?t.brightness:0}set brightness(t){if(!(t>=-1&&t<=1))throw new RangeError(`brightness ${String(t)} is not a number from -1.0 to 1.0.`);const e=this.read();if(e===void 0)throw new TypeError("There is no colour to set the brightness of: set theme_color first.");const s=M(e);if(s!==void 0)this.write(T(s,t));else if(t!==0)throw new TypeError("Only a theme colour has a brightness here, so an RGB colour does not: set theme_color first, or rgb to the colour it makes.")}get rgb(){const t=this.read();return typeof t=="object"&&"rgb"in t?t.rgb:void 0}set rgb(t){this.write(t===void 0?void 0:{rgb:C(t)})}}export class Font{def;constructor(t){return this.def=t,h(this,"Font")}_set(t,e){e===void 0?Reflect.deleteProperty(this.def,t):this.def[t]=e}get strike(){return this.def.strike}set strike(t){this._set("strike",t)}get baseline(){return this.def.baseline}set baseline(t){this._set("baseline",t)}get highlight(){return this.def.highlight}set highlight(t){this._set("highlight",t)}get name(){return this.def.name}set name(t){this._set("name",t)}get size(){return y(this.def.size)}set size(t){this._set("size",t)}get bold(){return this.def.bold}set bold(t){this._set("bold",t)}get italic(){return this.def.italic}set italic(t){this._set("italic",t)}get underline(){return this.def.underline}set underline(t){this._set("underline",t)}get spacing(){return y(this.def.spacing)}set spacing(t){this._set("spacing",t)}get color(){return new ColorFormat(()=>this.def.color,t=>{this._set("color",t)})}}export class Hyperlink{def;constructor(t){return this.def=t,h(this,"_Hyperlink")}get address(){return this.def.font?.link}set address(t){this.def.font??={},t===void 0?Reflect.deleteProperty(this.def.font,"link"):this.def.font.link=t}}export class Run{def;constructor(t){return this.def=t,h(this,"_Run")}get text(){return this.def.text}set text(t){this.def.text=t}get font(){return this.def.font??={},new Font(this.def.font)}get hyperlink(){return new Hyperlink(this.def)}}const tt=i=>{if(!Number.isFinite(i)||i<=0)throw new Error(`line_spacing ${String(i)} is not over 0.`);return Number.isInteger(i)&&i>=A?{fixed:i}:{lines:i}},et=i=>i===void 0?void 0:"lines"in i?i.lines:l(i.fixed),N=i=>i.split(/\n|\v/u).flatMap((t,e)=>[...e>0?[{text:"\v"}]:[],...t===""?[]:[{text:t}]]);class L{_set(t,e){e===void 0?Reflect.deleteProperty(this.fmt,t):this.fmt[t]=e}get alignment(){return this.fmt.alignment}set alignment(t){this._set("alignment",t)}get line_spacing(){return et(this.fmt.line_spacing)}set line_spacing(t){this._set("line_spacing",t===void 0?void 0:tt(t))}get space_before(){return y(this.fmt.space_before)}set space_before(t){this._set("space_before",t)}get space_after(){return y(this.fmt.space_after)}set space_after(t){this._set("space_after",t)}get font(){return this.fmt.font??={},new Font(this.fmt.font)}}export class Paragraph extends L{fmt;constructor(t){return super(),this.fmt=t,h(this,"_Paragraph")}get text(){return this.fmt.runs.map(t=>t.text).join("")}set text(t){this.fmt.runs=N(t)}get runs(){return this.fmt.runs.filter(t=>t.text!=="\v").map(t=>new Run(t))}add_run(){const t={text:""};return this.fmt.runs.push(t),new Run(t)}add_line_break(){this.fmt.runs.push({text:"\v"})}clear(){return this.fmt.runs=[],this}get level(){return this.fmt.level}set level(t){if(!Number.isInteger(t)||t<0||t>8)throw new Error(`level ${String(t)} is not 0 to 8.`);this.fmt.level=t}}export class ListLevel extends L{fmt;constructor(t){return super(),this.fmt=t,h(this,"ListLevel")}get numbered(){return this.fmt.numbered}set numbered(t){this._set("numbered",t)}get bullet(){return this.fmt.bullet}set bullet(t){this._set("bullet",t)}get bullet_font(){return this.fmt.bullet_font}set bullet_font(t){this._set("bullet_font",t)}get margin_left(){return y(this.fmt.margin_left)}set margin_left(t){this._set("margin_left",t)}get indent(){return y(this.fmt.indent)}set indent(t){this._set("indent",t)}}const S=i=>Object.freeze(i.map(t=>new ListLevel(t))),st=()=>Array.from({length:9},()=>({})),E=()=>({paragraphs:[],levels:st()});export class TextFrame{def;constructor(t){return this.def=t,h(this,"TextFrame")}_set(t,e){e===void 0?Reflect.deleteProperty(this.def,t):this.def[t]=e}get text(){return this.def.paragraphs.map(t=>t.runs.map(e=>e.text).join("")).join(`
2
+ import{themeColor as A,themeColorOf as T}from"@allyhub/chart";import{presetAdjustments as H}from"@allyhub/ooxml/geometry";import{connectorBetween as B,connectorEnds as U,siteOn as W,sitesOf as Z}from"./connect.js";import{framedComponent as X}from"@allyhub/piece";import{colorOfFile as Y}from"@allyhub/formats";import{MSO_ARROWHEAD as j,MSO_ARROWHEAD_SIZE as $,MSO_CONNECTOR as J,MSO_LINE as q,MSO_SHAPE as P,MSO_SHAPE_TYPE as K,PP_PLACEHOLDER as v}from"./enums.js";import{Chart as Q}from"./chart-api.js";import{AUTOSHAPE_STYLE as p,SHADOW_DEFAULTS as z,CONNECTOR_GEOMETRIES as V,CONNECTOR_STYLE as F,FOOTER_IDX as tt,isConnectorGeometry as k,OFFICE_TEXT_STYLES as et,placeholderLevels as st,TEXT_INSETS as w,TEXTBOX_FRAME as rt}from"./office.js";import{masterPlaceholder as C}from"./placeholders.js";import{strict as a}from"./strict.js";import{EMU_PER_PT as N,SLIDE_SIZES as M,length as l,lengthOr as E}from"./units.js";class it extends Error{constructor(t){super(`${t} (allyhub slides capabilities lists what the API holds).`),this.name="Unsupported"}}const g=i=>{throw new it(i)},nt=/^#?[0-9a-f]{6}$/iu,L=i=>{if(!nt.test(i))throw new Error(`rgb ${i} is not RRGGBB.`);return`#${i.replace("#","").toUpperCase()}`};function I(i,t){if(typeof i!="string")return i;const e=Y(i);if(e===void 0)throw new Error(`${t} is a theme colour (accent1), one lighter or darker (accent1 lighter 40%) or #RRGGBB, not ${i}.`);return e}export const RGBColor=Object.assign(function(t,e,s){for(const o of[t,e,s])if(!Number.isInteger(o)||o<0||o>255)throw new Error(`RGBColor(${String(t)}, ${String(e)}, ${String(s)}): each is 0 to 255.`);const r=`#${[t,e,s].map(o=>o.toString(16).padStart(2,"0")).join("").toUpperCase()}`;return new.target===void 0?r:new String(r)},{from_string:i=>L(i)});export class ColorFormat{read;write;constructor(t,e){return this.read=t,this.write=e,a(this,"ColorFormat")}get theme_color(){const t=this.read();return t===void 0?void 0:T(t)}set theme_color(t){this.write(t===void 0?void 0:A(t,this.brightness))}get brightness(){const t=this.read();return typeof t=="object"&&"brightness"in t?t.brightness:0}set brightness(t){if(!(t>=-1&&t<=1))throw new RangeError(`brightness ${String(t)} is not a number from -1.0 to 1.0.`);const e=this.read();if(e===void 0)throw new TypeError("There is no colour to set the brightness of: set theme_color first.");const s=T(e);if(s!==void 0)this.write(A(s,t));else if(t!==0)throw new TypeError("Only a theme colour has a brightness here, so an RGB colour does not: set theme_color first, or rgb to the colour it makes.")}get rgb(){const t=this.read();return typeof t=="object"&&"rgb"in t?t.rgb:void 0}set rgb(t){this.write(t===void 0?void 0:{rgb:L(t)})}}export class Font{def;constructor(t){return this.def=t,a(this,"Font")}_set(t,e){e===void 0?Reflect.deleteProperty(this.def,t):this.def[t]=e}get strike(){return this.def.strike}set strike(t){this._set("strike",t)}get baseline(){return this.def.baseline}set baseline(t){this._set("baseline",t)}get highlight(){return this.def.highlight}set highlight(t){this._set("highlight",t)}get name(){return this.def.name}set name(t){this._set("name",t)}get size(){return E(this.def.size)}set size(t){if(t!==void 0&&t<12700)throw new Error(`A font size is a Length of Pt(1) and over: Pt(${String(t)}) for ${String(t)} points; ${String(t)} alone is ${String(t)} EMU.`);this._set("size",t)}get bold(){return this.def.bold}set bold(t){this._set("bold",t)}get italic(){return this.def.italic}set italic(t){this._set("italic",t)}get underline(){return this.def.underline}set underline(t){this._set("underline",t)}get spacing(){return E(this.def.spacing)}set spacing(t){this._set("spacing",t)}get color(){return new ColorFormat(()=>this.def.color,t=>{this._set("color",t)})}}export class Hyperlink{def;constructor(t){return this.def=t,a(this,"_Hyperlink")}get address(){return this.def.font?.link}set address(t){this.def.font??={},t===void 0?Reflect.deleteProperty(this.def.font,"link"):this.def.font.link=t}}export class Run{def;constructor(t){return this.def=t,a(this,"_Run")}get text(){return this.def.text}set text(t){this.def.text=t}get font(){return this.def.font??={},new Font(this.def.font)}get hyperlink(){return new Hyperlink(this.def)}}const ot=i=>{if(!Number.isFinite(i)||i<=0)throw new Error(`line_spacing ${String(i)} is not over 0.`);return Number.isInteger(i)&&i>=N?{fixed:i}:{lines:i}},ht=i=>i===void 0?void 0:"lines"in i?i.lines:l(i.fixed),D=i=>i.split(/\n|\v/u).flatMap((t,e)=>[...e>0?[{text:"\v"}]:[],...t===""?[]:[{text:t}]]);class G{_set(t,e){e===void 0?Reflect.deleteProperty(this.fmt,t):this.fmt[t]=e}get alignment(){return this.fmt.alignment}set alignment(t){this._set("alignment",t)}get line_spacing(){return ht(this.fmt.line_spacing)}set line_spacing(t){this._set("line_spacing",t===void 0?void 0:ot(t))}get space_before(){return E(this.fmt.space_before)}set space_before(t){this._set("space_before",t)}get space_after(){return E(this.fmt.space_after)}set space_after(t){this._set("space_after",t)}get font(){return this.fmt.font??={},new Font(this.fmt.font)}}export class Paragraph extends G{fmt;constructor(t){return super(),this.fmt=t,a(this,"_Paragraph")}get text(){return this.fmt.runs.map(t=>t.text).join("")}set text(t){this.fmt.runs=D(t)}get runs(){return this.fmt.runs.filter(t=>t.text!=="\v").map(t=>new Run(t))}add_run(){const t={text:""};return this.fmt.runs.push(t),new Run(t)}add_line_break(){this.fmt.runs.push({text:"\v"})}clear(){return this.fmt.runs=[],this}get level(){return this.fmt.level}set level(t){if(!Number.isInteger(t)||t<0||t>8)throw new Error(`level ${String(t)} is not 0 to 8.`);this.fmt.level=t}}export class ListLevel extends G{fmt;constructor(t){return super(),this.fmt=t,a(this,"ListLevel")}get numbered(){return this.fmt.numbered}set numbered(t){this._set("numbered",t)}get bullet(){return this.fmt.bullet}set bullet(t){this._set("bullet",t)}get bullet_font(){return this.fmt.bullet_font}set bullet_font(t){this._set("bullet_font",t)}get margin_left(){return E(this.fmt.margin_left)}set margin_left(t){this._set("margin_left",t)}get indent(){return E(this.fmt.indent)}set indent(t){this._set("indent",t)}}const O=i=>Object.freeze(i.map(t=>new ListLevel(t))),at=()=>Array.from({length:9},()=>({})),S=()=>({paragraphs:[],levels:at()});export class TextFrame{def;constructor(t){return this.def=t,a(this,"TextFrame")}_set(t,e){e===void 0?Reflect.deleteProperty(this.def,t):this.def[t]=e}get text(){return this.def.paragraphs.map(t=>t.runs.map(e=>e.text).join("")).join(`
3
3
  `)}set text(t){this.def.paragraphs=t.split(`
4
- `).map(e=>({runs:N(e),level:0}))}get paragraphs(){return this.def.paragraphs.length===0&&this.def.paragraphs.push({runs:[],level:0}),this.def.paragraphs.map(t=>new Paragraph(t))}add_paragraph(){this.def.paragraphs.length===0&&this.def.paragraphs.push({runs:[],level:0});const t={runs:[],level:0};return this.def.paragraphs.push(t),new Paragraph(t)}clear(){const t=this.def.paragraphs[0];this.def.paragraphs=t?[{...t,runs:[]}]:[]}fit_text(t,e=18,s,r){this.def.auto_size="text",this.def.word_wrap=!0;for(const n of this.def.paragraphs)for(const o of n.runs)o.font={...o.font,size:Math.trunc(e*A),...t===void 0?{}:{name:t},...s===void 0?{}:{bold:s},...r===void 0?{}:{italic:r}}}get list_style(){return S(this.def.levels)}get vertical_anchor(){return this.def.vertical_anchor}set vertical_anchor(t){this._set("vertical_anchor",t)}get auto_size(){return this.def.auto_size}set auto_size(t){this._set("auto_size",t)}get word_wrap(){return this.def.word_wrap}set word_wrap(t){this._set("word_wrap",t)}get margin_left(){return l(this.def.margin_left??w.left)}set margin_left(t){this.def.margin_left=t}get margin_top(){return l(this.def.margin_top??w.top)}set margin_top(t){this.def.margin_top=t}get margin_right(){return l(this.def.margin_right??w.right)}set margin_right(t){this.def.margin_right=t}get margin_bottom(){return l(this.def.margin_bottom??w.bottom)}set margin_bottom(t){this.def.margin_bottom=t}}export class FillFormat{read;write;start;shape;constructor(t,e,s="lt1",r){return this.read=t,this.write=e,this.start=s,this.shape=r,h(this,"FillFormat")}solid(){const t=this.read();this.shape&&Reflect.deleteProperty(this.shape,"gradient"),t==null&&this.write(this.start)}background(){this.shape&&Reflect.deleteProperty(this.shape,"gradient"),this.write(null)}_shape(t){if(!this.shape)throw new TypeError(`Only a shape's fill has ${t}.`);return this.shape}gradient(){this._shape("a gradient").gradient??={angle:90,stops:[{at:0,color:"accent1"},{at:1,color:"accent2"}]}}get gradient_angle(){return this._gradient().angle}set gradient_angle(t){this._gradient().angle=t}get gradient_stops(){return this._gradient().stops}set gradient_stops(t){if(t.length<2)throw new Error("A gradient has two stops at least.");this._gradient().stops=t.map(e=>({...e}))}_gradient(){const{gradient:t}=this._shape("a gradient");if(!t)throw new TypeError("This fill is no gradient: call fill.gradient() first.");return t}get transparency(){return this._shape("a transparency").fill_transparency??0}set transparency(t){if(!(t>=0&&t<=1))throw new Error(`A transparency is a share, 0 to 1, not ${String(t)}.`);this._shape("a transparency").fill_transparency=t}get type(){if(this.shape?.gradient)return"gradient";const t=this.read();return t===void 0?void 0:t===null?"background":"solid"}get fore_color(){const t=this.read();if(t==null)throw new TypeError("This fill is not solid, so it has no fore_color: call fill.solid() first.");return new ColorFormat(()=>this.read()??void 0,e=>{this.write(e??this.start)})}}export class ShadowFormat{def;constructor(t){return this.def=t,h(this,"ShadowFormat")}_shadow(){return this.def.shadow??={...P},this.def.shadow}get inherit(){return this.def.shadow===void 0}set inherit(t){t?Reflect.deleteProperty(this.def,"shadow"):this._shadow()}get blur_radius(){return l(this._shadow().blur)}set blur_radius(t){this._shadow().blur=t}get distance(){return l(this._shadow().distance)}set distance(t){this._shadow().distance=t}get angle(){return this._shadow().angle}set angle(t){this._shadow().angle=t}get transparency(){return this._shadow().transparency}set transparency(t){this._shadow().transparency=t}get color(){const t=this._shadow();return new ColorFormat(()=>t.color,e=>{t.color=e??P.color})}}export class LineFormat{def;constructor(t){return this.def=t,h(this,"LineFormat")}get color(){return new ColorFormat(()=>this.def.line??void 0,t=>{this.def.line=t??null})}get fill(){return new FillFormat(()=>this.def.line,t=>{this.def.line=t},"dk1")}get width(){return l(this.def.line_width??0)}set width(t){this.def.line_width=t}get dash_style(){return this.def.line_dash??null}set dash_style(t){t===null?delete this.def.line_dash:this.def.line_dash=t}get begin_arrow(){return this.def.line_begin??"none"}set begin_arrow(t){this.def.line_begin=t}get end_arrow(){return this.def.line_end??"none"}set end_arrow(t){this.def.line_end=t}}export class Background{holder;constructor(t){return this.holder=t,h(this,"_Background")}get fill(){return new FillFormat(()=>this.holder.background,t=>{this.holder.background=t??"lt1"})}}export const adjustmentDefaults=i=>z(i).map(t=>t.value/1e5);export class Adjustments{def;constructor(t){return this.def=t,h(this,"Adjustments",{index:e=>this._values()[e],setIndex:(e,s)=>{this._set(e,Number(s))}})}_values(){return this.def.adjustments??adjustmentDefaults(this.def.geometry??"rect")}get length(){return this._values().length}_set(t,e){const s=this._values();if(t<0||t>=s.length)throw new RangeError(`adjustments[${String(t)}]: ${this.def.geometry??"this shape"} has ${String(s.length)}.`);if(!Number.isFinite(e))throw new Error(`adjustments[${String(t)}] = ${String(e)} is not a number.`);s[t]=e,this.def.adjustments=s}}const rt={left:0,top:0,width:0,height:0};export class Shape{def;inherit;constructor(t,e=()=>{}){return this.def=t,this.inherit=e,h(this,"Shape")}get _def(){return this.def}_frame(){return this.def.frame??this.inherit()??rt}_own(){return this.def.frame??={...this._frame()},this.def.frame}get name(){return this.def.name}set name(t){this.def.name=t}get shape_type(){return this.def.path?"freeform":k(this.def.geometry)?"line":this.def.kind}get is_placeholder(){return this.def.kind==="placeholder"}get has_table(){return this.def.table!==void 0}get has_chart(){return this.def.chart!==void 0}get chart(){if(!this.def.chart)throw new Error(`${this.def.name} is not a chart.`);return new Y(this.def.chart)}get table(){if(!this.def.table)throw new Error(`${this.def.name} is not a table.`);return new Table(this.def.table)}get placeholder_format(){if(!this.def.placeholder)throw new Error(`${this.def.name} is not a placeholder.`);return h({...this.def.placeholder},"_PlaceholderFormat")}get left(){return l(this._frame().left)}set left(t){this._own().left=t}get top(){return l(this._frame().top)}set top(t){this._own().top=t}get width(){return l(this._frame().width)}set width(t){this._own().width=t}get height(){return l(this._frame().height)}set height(t){this._own().height=t}get rotation(){return this.def.rotation??0}set rotation(t){if(!Number.isFinite(t))throw new Error(`${this.def.name}: rotation is a number of degrees.`);const e=(Math.trunc(t*6e4)%216e5+216e5)%216e5/6e4;e===0?Reflect.deleteProperty(this.def,"rotation"):this.def.rotation=e}get has_text_frame(){return this.def.text!==void 0}get text_frame(){if(!this.def.text)throw new Error(`${this.def.name} (a ${this.shape_type}) has no text frame: has_text_frame is false.`);return new TextFrame(this.def.text)}get text(){return this.text_frame.text}set text(t){this.text_frame.text=t}get fill(){return new FillFormat(()=>this.def.fill,t=>{this.def.fill=t},"lt1",this.def)}get line(){return new LineFormat(this.def)}get shadow(){return new ShadowFormat(this.def)}get adjustments(){return new Adjustments(this.def)}_ends(t){if(this.def.path||!k(this.def.geometry))throw new Error(`${this.def.name}.${t}: it is not a connector (add_connector makes one).`);return I(this._frame(),this.def.flip,this.def.rotation)}_move(t,e){const s=G(t,e,this.def.rotation);this.def.frame=s.frame,s.flip?this.def.flip=s.flip:Reflect.deleteProperty(this.def,"flip")}get begin_x(){return l(Math.round(this._ends("begin_x")[0][0]))}set begin_x(t){const[e,s]=this._ends("begin_x");this._move([t,e[1]],s)}get begin_y(){return l(Math.round(this._ends("begin_y")[0][1]))}set begin_y(t){const[e,s]=this._ends("begin_y");this._move([e[0],t],s)}get end_x(){return l(Math.round(this._ends("end_x")[1][0]))}set end_x(t){const[e,s]=this._ends("end_x");this._move(e,[t,s[1]])}get end_y(){return l(Math.round(this._ends("end_y")[1][1]))}set end_y(t){const[e,s]=this._ends("end_y");this._move(e,[s[0],t])}begin_connect(t,e){this._connect("begin",t,e)}end_connect(t,e){this._connect("end",t,e)}_connect(t,e,s){const r=`${t}_connect`,[n,o]=this._ends(r);if(!(e instanceof Shape))throw new Error(`${this.def.name}.${r}(): its shape is a Shape.`);const a=e._def,f={frame:e._frame(),geometry:a.geometry,adjustments:a.adjustments,flip:a.flip,rotation:a.rotation,path:a.path},u=D(f).length;if(!Number.isInteger(s)||s<0||s>=u)throw new Error(`${this.def.name}.${r}(): ${a.name} has connection sites 0 to ${String(u-1)}; ${String(s)} is not one.`);const c=B(f,s)??(t==="begin"?n:o);this.def.connect={...this.def.connect,[t]:{shape:a.name,site:s}},this._move(t==="begin"?c:n,t==="begin"?o:c)}}const it=i=>typeof i=="number"&&Number.isFinite(i),g=(i,t,e,s,{line:r=!1}={})=>{for(const[n,o]of Object.entries({left:i,top:t,width:e,height:s}))if(!it(o))throw new Error(`${n} ${String(o)} is not a length (Emu, Inches, Pt, Cm, Mm).`);if(r?e<0||s<0:e<=0||s<=0)throw new Error("A shape's width and height are over 0.");return{left:Math.trunc(i),top:Math.trunc(t),width:Math.trunc(e),height:Math.trunc(s)}},nt=new Set(Object.values(v));export class FreeformBuilder{steps;sx;sy;make;constructor(t,e,s){return this.steps=[{op:"move",x:t[0],y:t[1]}],[this.sx,this.sy]=typeof e=="number"?[e,e]:e,this.make=s,h(this,"FreeformBuilder")}add_line_segments(t,e=!0){for(const[s,r]of t)this.steps.push({op:"line",x:s,y:r});return e&&this.steps.push({op:"close"}),this}add_curve_segment(t,e,s,r,n,o){return this.steps.push({op:"curve",x1:t,y1:e,x2:s,y2:r,x:n,y:o}),this}move_to(t,e){return this.steps.push({op:"move",x:t,y:e}),this}convert_to_shape(t=0,e=0){this.steps.length<2&&m("convert_to_shape(): a freeform needs a segment.");const s=this.steps.flatMap(d=>d.op==="close"?[]:d.op==="curve"?[[d.x1,d.y1],[d.x2,d.y2],[d.x,d.y]]:[[d.x,d.y]]),r=s.map(d=>d[0]),n=s.map(d=>d[1]),o=Math.min(...r),a=Math.min(...n),f=Math.max(...r)-o,u=Math.max(...n)-a,c=(d,_)=>({x:d-o,y:_-a});return this.make({w:f,h:u,steps:this.steps.map(d=>{if(d.op==="close")return d;if(d.op!=="curve")return{op:d.op,...c(d.x,d.y)};const _=c(d.x1,d.y1),x=c(d.x2,d.y2);return{op:"curve",x1:_.x,y1:_.y,x2:x.x,y2:x.y,...c(d.x,d.y)}})},g(Math.round(o*this.sx)+t,Math.round(a*this.sy)+e,Math.round(f*this.sx),Math.round(u*this.sy)))}}export class GroupShape{list;_name;make;constructor(t,e,s){return this.list=t,this._name=e,this.make=s,h(this,"GroupShape")}members(){return this.list.filter(t=>t.group===this._name)}box(){const t=this.members().flatMap(r=>r.frame?[r.frame]:[]),e=Math.min(...t.map(r=>r.left)),s=Math.min(...t.map(r=>r.top));return{left:t.length>0?e:0,top:t.length>0?s:0,right:Math.max(0,...t.map(r=>r.left+r.width)),bottom:Math.max(0,...t.map(r=>r.top+r.height))}}get shapes(){return this.make(this._name)}get shape_type(){return X.GROUP}get name(){return this._name}set name(t){for(const e of this.members())e.group=t;this._name=t}get left(){return l(this.box().left)}set left(t){const e=t-this.box().left;for(const s of this.members())s.frame&&(s.frame.left+=e)}get top(){return l(this.box().top)}set top(t){const e=t-this.box().top;for(const s of this.members())s.frame&&(s.frame.top+=e)}get width(){const t=this.box();return l(t.right-t.left)}get height(){const t=this.box();return l(t.bottom-t.top)}}export class Cell{def;table;row;col;constructor(t,e,s,r){return this.def=t,this.table=e,this.row=s,this.col=r,h(this,"_Cell")}get text_frame(){return new TextFrame(this.def.text)}get text(){return this.text_frame.text}set text(t){this.text_frame.text=t}get fill(){return new FillFormat(()=>this.def.fill,t=>{this.def.fill=t})}get borders(){return this.def.borders??{}}set borders(t){this.def.borders=t}get margin_left(){return l(this.def.text.margin_left??w.left)}set margin_left(t){this.def.text.margin_left=t}get margin_right(){return l(this.def.text.margin_right??w.right)}set margin_right(t){this.def.text.margin_right=t}get margin_top(){return l(this.def.text.margin_top??w.top)}set margin_top(t){this.def.text.margin_top=t}get margin_bottom(){return l(this.def.text.margin_bottom??w.bottom)}set margin_bottom(t){this.def.text.margin_bottom=t}get vertical_anchor(){return this.def.text.vertical_anchor}set vertical_anchor(t){t===void 0?delete this.def.text.vertical_anchor:this.def.text.vertical_anchor=t}get is_merge_origin(){return(this.def.span_width??1)>1||(this.def.span_height??1)>1}get is_spanned(){return this.def.spanned===!0}get span_width(){return this.def.span_width??1}get span_height(){return this.def.span_height??1}merge(t){const e=[this.row,t.row].sort((f,u)=>f-u),s=[this.col,t.col].sort((f,u)=>f-u),[r=0,n=0]=e,[o=0,a=0]=s;for(let f=r;f<=n;f++)for(let u=o;u<=a;u++){const c=this.table.rows[f]?.cells[u];c&&(f===r&&u===o?(a>o&&(c.span_width=a-o+1),n>r&&(c.span_height=n-r+1)):c.spanned=!0)}}split(){const t=this.span_width,e=this.span_height;delete this.def.span_width,delete this.def.span_height;for(let s=this.row;s<this.row+e;s++)for(let r=this.col;r<this.col+t;r++){const n=this.table.rows[s]?.cells[r];n&&delete n.spanned}}}export class Column{def;at;constructor(t,e){return this.def=t,this.at=e,h(this,"_Column")}get width(){return l(this.def.columns[this.at]??0)}set width(t){this.def.columns[this.at]=t}}export class Row{def;at;constructor(t,e){return this.def=t,this.at=e,h(this,"_Row")}get row(){const t=this.def.rows[this.at];if(!t)throw new Error(`The table has no row ${String(this.at)}.`);return t}get height(){return l(this.row.height)}set height(t){this.row.height=t}}export class Table{def;constructor(t){return this.def=t,h(this,"Table")}cell(t,e){const s=this.def.rows[t]?.cells[e];if(!s)throw new Error(`cell(): the table has ${String(this.def.rows.length)} rows and ${String(this.def.columns.length)} columns.`);return new Cell(s,this.def,t,e)}*iter_cells(){for(let t=0;t<this.def.rows.length;t++)for(let e=0;e<this.def.columns.length;e++)yield this.cell(t,e)}get columns(){return this.def.columns.map((t,e)=>new Column(this.def,e))}get rows(){return this.def.rows.map((t,e)=>new Row(this.def,e))}flag(t){return this.def[t]===!0}get first_row(){return this.flag("first_row")}set first_row(t){this.def.first_row=t}get first_col(){return this.flag("first_col")}set first_col(t){this.def.first_col=t}get last_row(){return this.flag("last_row")}set last_row(t){this.def.last_row=t}get last_col(){return this.flag("last_col")}set last_col(t){this.def.last_col=t}get horz_banding(){return this.flag("horz_banding")}set horz_banding(t){this.def.horz_banding=t}get vert_banding(){return this.flag("vert_banding")}set vert_banding(t){this.def.vert_banding=t}}function ot(i,t,e=[]){const s=new Set([...i,...e].map(n=>n.name));let r=1;for(;s.has(`${t}-${String(r)}`);)r++;return`${t}-${String(r)}`}export class ShapeCollection{list;base;components;inherit;group;under;constructor(t,e,s,r=()=>{},n=()=>[],o){return this.list=t,this.base=e,this.components=s,this.inherit=r,this.under=n,this.group=o,h(this,"SlideShapes",{index:a=>this._at(a)})}_wrap(t){return new Shape(t,()=>this.inherit(t))}_at(t){const e=this.list[t];return e?this._wrap(e):void 0}*[Symbol.iterator](){for(const t of this.list)yield this._wrap(t)}get length(){return this.list.length}get(t){const e=this.list.find(s=>s.name===t);return e?this._wrap(e):void 0}get title(){const t=this.list.find(e=>e.placeholder?.type==="title"||e.placeholder?.type==="ctrTitle");return t?this._wrap(t):void 0}get placeholders(){return new Placeholders(this.list,this.inherit)}_add(t,e){const s={name:ot(this.list,t,this.under()),...e,...this.group===void 0?{}:{group:this.group}};return this.list.push(s),this._wrap(s)}add_textbox(t,e,s,r){return this._add("textbox",{kind:"textbox",frame:g(t,e,s,r),text:{...E(),...W}})}add_picture(t,e,s,r,n){return(r===void 0||n===void 0)&&m("add_picture() takes a width and a height here: a picture's own size is not read while a deck's code runs"),this._add("picture",{kind:"picture",frame:g(e,s,r??0,n??0),media:{path:t,base:this.base}})}add_movie(t,e,s,r,n,o={}){return this._add("movie",{kind:"movie",frame:g(e,s,r,n),media:{path:t,base:this.base,...o.poster_frame_time===void 0?{}:{poster:o.poster_frame_time}}})}add_shape(t,e,s,r,n){nt.has(t)||m(`add_shape(): ${t} is not one of MSO_SHAPE's ${Object.keys(v).join(", ")}`);const o=E();return o.vertical_anchor=p.vertical_anchor,o.paragraphs=[{runs:[],level:0,alignment:p.alignment}],this._add("shape",{kind:"autoshape",frame:g(e,s,r,n),geometry:t,fill:p.fill,line:p.line,line_width:p.line_width,text:o})}add_table(t,e,s,r,n,o){(t<1||e<1)&&m("add_table(): a table has at least a row and a column.");const a=Math.floor(n/e),f=Math.floor(o/t);return this._add("table",{kind:"table",frame:g(s,r,n,o),table:{columns:Array.from({length:e},()=>a),rows:Array.from({length:t},()=>({height:f,cells:Array.from({length:e},()=>({text:E()}))}))}})}add_chart(t,e,s,r,n,o){return this._add("chart",{kind:"chart",frame:g(e,s,r,n),chart:{type:t,categories:[...o.categories],series:o._series()}})}add_group_shape(){this.group!==void 0&&m("add_group_shape(): a group here holds shapes, not another group.");let t=1;for(;this.list.some(e=>e.group===`group-${String(t)}`);)t++;return new GroupShape(this.list,`group-${String(t)}`,e=>new ShapeCollection(this.list,this.base,this.components,this.inherit,this.under,e))}build_freeform(t=0,e=0,s=1){return new FreeformBuilder([t,e],s,(r,n)=>{const o=E();return o.vertical_anchor=p.vertical_anchor,o.paragraphs=[{runs:[],level:0,alignment:p.alignment}],this._add("freeform",{kind:"autoshape",frame:n,path:r,fill:p.fill,line:p.line,line_width:p.line_width,text:o})})}add_connector(t,e,s,r,n){k(t)||m(`add_connector(): ${t} is not one of MSO_CONNECTOR's ${Object.keys(U).join(", ")}, nor a connector's preset (${J.join(", ")})`);const o=g(Math.min(e,r),Math.min(s,n),Math.abs(r-e),Math.abs(n-s),{line:!0}),a=r<e,f=n<s;return this._add("connector",{kind:"autoshape",frame:o,geometry:t,...a||f?{flip:{...a?{h:a}:{},...f?{v:f}:{}}}:{},line:R.line,line_width:R.line_width})}add_component(t,e,s,r,n,o={},a={}){if(!Object.hasOwn(this.components(),t))throw new Error(`add_component(): the presentation has no component ${t}; add it with prs.components.add("${t}", { … }) first.`);if(a.dur!==void 0&&!(Number.isFinite(a.dur)&&a.dur>0))throw new Error(`add_component(): dur is how long ${t} moves, seconds over 0; it was ${String(a.dur)}.`);return this._add(t,{kind:"component",frame:g(e,s,r,n),component:{name:t,props:o,...a.dur===void 0?{}:{dur:a.dur}}})}}export const NAME_OF_TYPE={title:"title",ctrTitle:"title",subTitle:"subtitle",body:"body",pic:"picture",media:"media",obj:"content",dt:"date",ftr:"footer",sldNum:"slide-number"};export class Placeholders{list;inherit;constructor(t,e=()=>{}){return this.list=t,this.inherit=e,h(this,"placeholders",{index:s=>this.get(s)})}_wrap(t){return new Shape(t,()=>this.inherit(t))}*[Symbol.iterator](){for(const t of this.list)t.kind==="placeholder"&&(yield this._wrap(t))}get length(){return this.list.filter(t=>t.kind==="placeholder").length}get(t){const e=this.list.find(s=>s.kind==="placeholder"&&(typeof t=="number"?s.placeholder?.idx===t:s.name===t||s.placeholder?.type===t));return e?this._wrap(e):void 0}add(t,e,s,r,n,o={}){const a=typeof e=="object"?e:o,f=typeof e=="object"?void 0:e;Object.values(j).includes(t)||m(`placeholders.add(): ${t} is not one of PP_PLACEHOLDER's ${Object.keys(j).join(", ")}`);const u=this.list.filter(b=>b.kind==="placeholder"),c=new Set(u.map(b=>b.placeholder?.idx));let d=t==="title"||t==="ctrTitle"?0:Z[t]??1;for(;c.has(d)&&d!==0;)d++;if(c.has(d))throw new Error("A layout has one title placeholder (idx 0).");const _=a.name??NAME_OF_TYPE[t];if(this.list.some(b=>b.name===_))throw new Error(`Two shapes are ${_}: give the placeholder a name ({ name }).`);const x=[f,s,r,n].filter(b=>b!==void 0);if(x.length!==0&&x.length!==4)throw new Error("placeholders.add(type, left, top, width, height): give all four, or none to take the master's frame.");const O={name:_,kind:"placeholder",placeholder:{type:t,idx:d},...x.length===4?{frame:g(f??0,s??0,r??0,n??0)}:{},text:{paragraphs:[],levels:K(t)}};return this.list.push(O),this._wrap(O)}}export class SlideLayout{def;master;ctx;constructor(t,e,s){return this.def=t,this.master=e,this.ctx=s,h(this,"SlideLayout")}get _def(){return this.def}inherit=t=>t.placeholder?F(this.master._def,t.placeholder.type)?.frame:void 0;get name(){return this.def.name}get slide_master(){return this.master}get display_master_shapes(){return this.def.display_master_shapes??!0}set display_master_shapes(t){t?delete this.def.display_master_shapes:this.def.display_master_shapes=!1}get background(){return new Background(this.def)}get placeholders(){return new Placeholders(this.def.shapes,this.inherit)}get shapes(){return new ShapeCollection(this.def.shapes,this.ctx.base,this.ctx.components,this.inherit,()=>this.master._def.shapes)}}export class SlideLayouts{list;make;constructor(t,e){return this.list=t,this.make=e,h(this,"SlideLayouts",{index:s=>this.list[s]})}*[Symbol.iterator](){yield*this.list}get length(){return this.list.length}get_by_name(t,e){return this.list.find(s=>s.name===t)??e}index(t){const e=this.list.indexOf(t);if(e<0)throw new Error(`${t.name} is not among these layouts.`);return e}add(t,e){if(!this.make)throw new Error("A layout is added to a master: master.slide_layouts.add(name).");const s=this.make(t);return e?.(s),s}}export class TextStyles{def;constructor(t){return this.def=t,h(this,"text_styles")}get title_style(){return S(this.def.title)}get body_style(){return S(this.def.body)}get other_style(){return S(this.def.other)}}export class SlideMaster{def;layouts=[];ctx;allLayouts;constructor(t,e,s){return this.def=t,this.ctx=e,this.allLayouts=s,h(this,"SlideMaster")}get _def(){return this.def}get name(){return this.def.name}get background(){return new Background(this.def)}get placeholders(){return new Placeholders(this.def.shapes)}get shapes(){return new ShapeCollection(this.def.shapes,this.ctx.base,this.ctx.components)}get text_styles(){return new TextStyles(this.def.text_styles)}get slide_layouts(){return new SlideLayouts(this.layouts,t=>{if(this.allLayouts.some(r=>r.name===t))throw new Error(`Two layouts are "${t}": a layout's name is unique in the deck, as its slides file names it.`);const e={name:t,master:this.def.name,shapes:[]};this.def.layouts.push(e);const s=new SlideLayout(e,this,this.ctx);return this.layouts.push(s),this.allLayouts.push(s),s})}}export class SlideMasters{list;make;constructor(t,e){return this.list=t,this.make=e,h(this,"SlideMasters",{index:s=>this.list[s]})}*[Symbol.iterator](){yield*this.list}get length(){return this.list.length}index(t){return this.list.indexOf(t)}add(t,e){const s=this.make(t);return e?.(s),s}}export class GeneratedSlide{own;def;layout;constructor(t,e,s){this.def=t,this.layout=e,this.own=e._def.shapes.filter(n=>n.kind==="placeholder").map(n=>({name:n.name,kind:"placeholder",...n.placeholder?{placeholder:{...n.placeholder}}:{},text:E()}));const r=n=>{const o=e._def.shapes.find(a=>a.kind==="placeholder"&&a.placeholder?.idx===n.placeholder?.idx);return o?o.frame??(o.placeholder?F(e.slide_master._def,o.placeholder.type)?.frame:void 0):void 0};return this._shapes=new ShapeCollection(this.own,s.base,s.components,r,()=>[...e.slide_master._def.shapes,...e._def.shapes]),this._placeholders=new Placeholders(this.own,r),h(this,"Slide")}_shapes;_placeholders;get shapes(){return this._shapes}get placeholders(){return this._placeholders}get slide_id(){return this.def.id}get slide_layout(){return this.layout}get has_notes_slide(){return this.def.notes!==void 0}get notes_slide(){const t=this.def;return h({notes_text_frame:h({get text(){return t.notes??""},set text(e){t.notes=e}},"TextFrame")},"NotesSlide")}get transition(){return this.def.transition}set transition(t){t===void 0?delete this.def.transition:this.def.transition=t}get animations(){return new Animations(this.def.animations??=[])}_done(){const t={},e=[];for(const s of this.own)s.kind==="placeholder"&&s.placeholder?(s.text?.paragraphs.some(r=>r.runs.length>0)&&(t[s.placeholder.idx]=s.text.paragraphs),s.frame&&e.push({...s,text:E()})):e.push(s);return{...this.def,shapes:e,text:t}}}export class Animations{list;constructor(t){return this.list=t,h(this,"Animations")}add(t,e,s={}){this.list.push({shape:typeof t=="string"?t:t.name,effect:e,...s})}get length(){return this.list.length}}class ht{gen;constructor(t){return this.gen=t,h(this,"slides")}add_slide(t,e){return this.gen._add(t,e)}}export class Generator{list=[];prs;ctx;constructor(t,e){return this.prs=t,this.ctx=e,h(this,"Generator")}data(t){return this.ctx.data(t)}get slides(){return new ht(this)}_add(t,e){const s=typeof t=="string"?this.prs._layout(t):t;if(!s)throw new Error(`add_slide(): the presentation has no layout ${typeof t=="string"?t:t.name}.`);if(!/^[A-Za-z0-9_-]+$/u.test(e))throw new Error(`add_slide(): ${e} is not an id of letters, digits, _ and -.`);if(this.list.some(n=>n.slide_id===e))throw new Error(`add_slide(): two slides are ${e}.`);const r=new GeneratedSlide({id:e,layout:s.name,shapes:[],text:{}},s,this.prs._ctx);return this.list.push(r),r}_made(){return this.list.map(t=>t._done())}}const at=()=>JSON.parse(JSON.stringify(q));export class Presentation{masters=[];layouts=[];def;_ctx;constructor(t,e){return this.def={slide_width:t[0],slide_height:t[1],masters:[],components:{},generators:{}},this._ctx={base:e,components:()=>this.def.components},h(this,"Presentation")}get _def(){return this.def}get slide_width(){return l(this.def.slide_width)}set slide_width(t){this.def.slide_width=t}get slide_height(){return l(this.def.slide_height)}set slide_height(t){this.def.slide_height=t}get slide_masters(){return new SlideMasters(this.masters,t=>{if(this.masters.some(r=>r.name===t))throw new Error(`Two masters are "${t}".`);const e={name:t,background:"lt1",text_styles:at(),shapes:[],layouts:[]};this.def.masters.push(e);const s=new SlideMaster(e,this._ctx,this.layouts);return this.masters.push(s),s})}get slide_master(){const t=this.masters[0];if(!t)throw new Error("The presentation has no master yet: prs.slide_masters.add(name) makes one.");return t}get slide_layouts(){const t=this.masters[0];return t?t.slide_layouts:new SlideLayouts([])}get slides(){return m("A deck's slides are in the slides file presentation({ slides }) names, in order, each on a layout, and their words in its script; slides made from data are a generator's (prs.generators.add)")}save(){return m("A deck is not saved by its code: allyhub render writes its PDF, pictures and PPTX")}get theme(){return this.def.theme??={},this.def.theme}set theme(t){this.def.theme=t}get components(){return h({add:(t,e)=>{if(Object.hasOwn(this.def.components,t))throw new Error(`Two components are "${t}".`);const s=H(t,e);if(!s)throw new Error(`Component ${t} is not a component: give what defineComponent makes, or { props, layers }.`);this.def.components[t]=s}},"components")}get generators(){return h({add:(t,e)=>{if(Object.hasOwn(this.def.generators,t))throw new Error(`Two generators are "${t}".`);this.def.generators[t]={name:t,make:s=>{const r=new Generator(this,s);return e(r),r._made()}}}},"generators")}_layout(t){return this.layouts.find(e=>e.name===t)}}export const DECK_BRAND="__allyhubDeck";export function isDeck(i){return typeof i=="object"&&i!==null&&DECK_BRAND in i}export const presentationFor=i=>(t,e)=>{const[s,r]=typeof t=="function"?[{},t]:[t,e];if(typeof r!="function")throw new Error(`A deck's module exports one deck: export default presentation({ slides: "./deck.yaml", script: "./deck.{locale}.yaml", size }, (prs) => { … masters, layouts, components … }), its slides and its script named from its folder.`);if(s.script!==void 0&&!s.script.includes("{locale}"))throw new Error(`presentation(): script ${s.script} names one file: write {locale} in its name for each language (./deck.{locale}.yaml).`);if(typeof s.size=="string"&&!Object.hasOwn($,s.size))throw new Error(`presentation(): size ${s.size} is not one of ${Object.keys($).join(", ")}, or { width, height } in EMU.`);return{[DECK_BRAND]:!0,kind:"slides",options:s,build:r,written:{file:i}}};export function evaluateDeck(i){const t=i.options.size??"16:9",e=typeof t=="string"?$[t]:[t.width,t.height],s=i.written.file.split("/").slice(0,-1).join("/"),r=new Presentation(e,s);return i.options.theme&&(r.theme=JSON.parse(JSON.stringify(i.options.theme))),i.build(r),r._def}
4
+ `).map(e=>({runs:D(e),level:0}))}get paragraphs(){return this.def.paragraphs.length===0&&this.def.paragraphs.push({runs:[],level:0}),this.def.paragraphs.map(t=>new Paragraph(t))}add_paragraph(){this.def.paragraphs.length===0&&this.def.paragraphs.push({runs:[],level:0});const t={runs:[],level:0};return this.def.paragraphs.push(t),new Paragraph(t)}clear(){const t=this.def.paragraphs[0];this.def.paragraphs=t?[{...t,runs:[]}]:[]}fit_text(t,e=18,s,r){this.def.auto_size="text",this.def.word_wrap=!0;for(const n of this.def.paragraphs)for(const o of n.runs)o.font={...o.font,size:Math.trunc(e*N),...t===void 0?{}:{name:t},...s===void 0?{}:{bold:s},...r===void 0?{}:{italic:r}}}get list_style(){return O(this.def.levels)}get vertical_anchor(){return this.def.vertical_anchor}set vertical_anchor(t){this._set("vertical_anchor",t)}get auto_size(){return this.def.auto_size}set auto_size(t){this._set("auto_size",t)}get word_wrap(){return this.def.word_wrap}set word_wrap(t){this._set("word_wrap",t)}get margin_left(){return l(this.def.margin_left??w.left)}set margin_left(t){this.def.margin_left=t}get margin_top(){return l(this.def.margin_top??w.top)}set margin_top(t){this.def.margin_top=t}get margin_right(){return l(this.def.margin_right??w.right)}set margin_right(t){this.def.margin_right=t}get margin_bottom(){return l(this.def.margin_bottom??w.bottom)}set margin_bottom(t){this.def.margin_bottom=t}}export class FillFormat{read;write;start;shape;constructor(t,e,s="lt1",r){return this.read=t,this.write=e,this.start=s,this.shape=r,a(this,"FillFormat")}solid(){const t=this.read();this.shape&&Reflect.deleteProperty(this.shape,"gradient"),t==null&&this.write(this.start)}background(){this.shape&&Reflect.deleteProperty(this.shape,"gradient"),this.write(null)}_shape(t){if(!this.shape)throw new TypeError(`Only a shape's fill has ${t}.`);return this.shape}gradient(){this._shape("a gradient").gradient??={angle:90,stops:[{at:0,color:"accent1"},{at:1,color:"accent2"}]}}get gradient_angle(){return this._gradient().angle}set gradient_angle(t){this._gradient().angle=t}get gradient_stops(){return this._gradient().stops.map(t=>new GradientStop(t))}set gradient_stops(t){if(t.length<2)throw new Error("A gradient has two stops at least.");this._gradient().stops=t.map(e=>e instanceof GradientStop?GradientStop.defOf(e):{...e,color:I(e.color,"A gradient stop's colour")})}_gradient(){const{gradient:t}=this._shape("a gradient");if(!t)throw new TypeError("This fill is no gradient: call fill.gradient() first.");return t}get transparency(){return this._shape("a transparency").fill_transparency??0}set transparency(t){if(!(t>=0&&t<=1))throw new Error(`A transparency is a share, 0 to 1, not ${String(t)}.`);this._shape("a transparency").fill_transparency=t}get type(){if(this.shape?.gradient)return"gradient";const t=this.read();return t===void 0?void 0:t===null?"background":"solid"}get fore_color(){const t=this.read();if(t==null)throw new TypeError("This fill is not solid, so it has no fore_color: call fill.solid() first.");return new ColorFormat(()=>this.read()??void 0,e=>{this.write(e??this.start)})}}export class GradientStop{stop;constructor(t){return this.stop=t,a(this,"GradientStop")}static defOf(t){return{...t.stop}}get color(){return new ColorFormat(()=>this.stop.color,t=>{t!==void 0&&(this.stop.color=t)})}get position(){return this.stop.at}set position(t){if(!(t>=0&&t<=1))throw new Error(`A stop's position is a share, 0 to 1, not ${String(t)}.`);this.stop.at=t}get transparency(){return this.stop.transparency??0}set transparency(t){if(!(t>=0&&t<=1))throw new Error(`A transparency is a share, 0 to 1, not ${String(t)}.`);t===0?Reflect.deleteProperty(this.stop,"transparency"):this.stop.transparency=t}}export class ShadowFormat{def;constructor(t){return this.def=t,a(this,"ShadowFormat")}_shadow(){return this.def.shadow??={...z},this.def.shadow}get inherit(){return this.def.shadow===void 0}set inherit(t){t?Reflect.deleteProperty(this.def,"shadow"):this.def.shadow??=null}get blur_radius(){return l(this._shadow().blur)}set blur_radius(t){this._shadow().blur=t}get distance(){return l(this._shadow().distance)}set distance(t){this._shadow().distance=t}get angle(){return this._shadow().angle}set angle(t){this._shadow().angle=t}get transparency(){return this._shadow().transparency}set transparency(t){this._shadow().transparency=t}get color(){const t=this._shadow();return new ColorFormat(()=>t.color,e=>{t.color=e??z.color})}}export class LineFormat{def;constructor(t){return this.def=t,a(this,"LineFormat")}get color(){return new ColorFormat(()=>this.def.line??void 0,t=>{this.def.line=t??null})}get fill(){return new FillFormat(()=>this.def.line,t=>{this.def.line=t},"dk1")}get width(){return l(this.def.line_width??0)}set width(t){this.def.line_width=t}get dash_style(){return this.def.line_dash??null}set dash_style(t){t===null?delete this.def.line_dash:this.def.line_dash=x(q,"MSO_LINE","dash_style",t)}get begin_arrow(){return this.def.line_begin??"none"}set begin_arrow(t){this.def.line_begin=x(j,"MSO_ARROWHEAD","begin_arrow",t)}get end_arrow(){return this.def.line_end??"none"}set end_arrow(t){this.def.line_end=x(j,"MSO_ARROWHEAD","end_arrow",t)}get begin_arrow_width(){return this.def.line_begin_size?.w??"med"}set begin_arrow_width(t){this.def.line_begin_size={...this.def.line_begin_size,w:x($,"MSO_ARROWHEAD_SIZE","begin_arrow_width",t)}}get begin_arrow_length(){return this.def.line_begin_size?.len??"med"}set begin_arrow_length(t){this.def.line_begin_size={...this.def.line_begin_size,len:x($,"MSO_ARROWHEAD_SIZE","begin_arrow_length",t)}}get end_arrow_width(){return this.def.line_end_size?.w??"med"}set end_arrow_width(t){this.def.line_end_size={...this.def.line_end_size,w:x($,"MSO_ARROWHEAD_SIZE","end_arrow_width",t)}}get end_arrow_length(){return this.def.line_end_size?.len??"med"}set end_arrow_length(t){this.def.line_end_size={...this.def.line_end_size,len:x($,"MSO_ARROWHEAD_SIZE","end_arrow_length",t)}}}function x(i,t,e,s){if(Object.values(i).includes(s))return s;throw new Error(`${e}: ${String(s)} is not one of ${t}'s ${Object.keys(i).join(", ")}.`)}export class Background{holder;constructor(t){return this.holder=t,a(this,"_Background")}get fill(){return new FillFormat(()=>this.holder.background,t=>{this.holder.background=t??"lt1"})}}export const adjustmentDefaults=i=>H(i).map(t=>t.value/1e5);export class Adjustments{def;constructor(t){return this.def=t,a(this,"Adjustments",{index:e=>this._values()[e],setIndex:(e,s)=>{this._set(e,Number(s))}})}_values(){return this.def.adjustments??adjustmentDefaults(this.def.geometry??"rect")}get length(){return this._values().length}_set(t,e){const s=this._values();if(t<0||t>=s.length)throw new RangeError(`adjustments[${String(t)}]: ${this.def.geometry??"this shape"} has ${String(s.length)}.`);if(!Number.isFinite(e))throw new Error(`adjustments[${String(t)}] = ${String(e)} is not a number.`);s[t]=e,this.def.adjustments=s}}const dt={left:0,top:0,width:0,height:0};export class Shape{def;inherit;constructor(t,e=()=>{}){return this.def=t,this.inherit=e,a(this,"Shape")}get _def(){return this.def}_frame(){return this.def.frame??this.inherit()??dt}_own(){return this.def.frame??={...this._frame()},this.def.frame}get name(){return this.def.name}set name(t){this.def.name=t}get shape_type(){return this.def.path?"freeform":k(this.def.geometry)?"line":this.def.kind}get is_placeholder(){return this.def.kind==="placeholder"}get has_table(){return this.def.table!==void 0}get has_chart(){return this.def.chart!==void 0}get chart(){if(!this.def.chart)throw new Error(`${this.def.name} is not a chart.`);return new Q(this.def.chart)}get table(){if(!this.def.table)throw new Error(`${this.def.name} is not a table.`);return new Table(this.def.table)}get placeholder_format(){if(!this.def.placeholder)throw new Error(`${this.def.name} is not a placeholder.`);return a({...this.def.placeholder},"_PlaceholderFormat")}get left(){return l(this._frame().left)}set left(t){this._own().left=t}get top(){return l(this._frame().top)}set top(t){this._own().top=t}get width(){return l(this._frame().width)}set width(t){this._own().width=t}get height(){return l(this._frame().height)}set height(t){this._own().height=t}get rotation(){return this.def.rotation??0}set rotation(t){if(!Number.isFinite(t))throw new Error(`${this.def.name}: rotation is a number of degrees.`);const e=(Math.trunc(t*6e4)%216e5+216e5)%216e5/6e4;e===0?Reflect.deleteProperty(this.def,"rotation"):this.def.rotation=e}get flip_h(){return this.def.flip?.h===!0}set flip_h(t){this._flip("h",t)}get flip_v(){return this.def.flip?.v===!0}set flip_v(t){this._flip("v",t)}_flip(t,e){const s={...this.def.flip};e?s[t]=!0:Reflect.deleteProperty(s,t),Object.keys(s).length===0?Reflect.deleteProperty(this.def,"flip"):this.def.flip=s}get has_text_frame(){return this.def.text!==void 0}get text_frame(){if(!this.def.text)throw new Error(`${this.def.name} (a ${this.shape_type}) has no text frame: has_text_frame is false.`);return new TextFrame(this.def.text)}get text(){return this.text_frame.text}set text(t){this.text_frame.text=t}get fill(){return new FillFormat(()=>this.def.fill,t=>{this.def.fill=t},"lt1",this.def)}get line(){return new LineFormat(this.def)}get shadow(){return new ShadowFormat(this.def)}get adjustments(){return new Adjustments(this.def)}_ends(t){if(this.def.path||!k(this.def.geometry))throw new Error(`${this.def.name}.${t}: it is not a connector (add_connector makes one).`);return U(this._frame(),this.def.flip,this.def.rotation)}_move(t,e){const s=B(t,e,this.def.rotation);this.def.frame=s.frame,s.flip?this.def.flip=s.flip:Reflect.deleteProperty(this.def,"flip")}get begin_x(){return l(Math.round(this._ends("begin_x")[0][0]))}set begin_x(t){const[e,s]=this._ends("begin_x");this._move([t,e[1]],s)}get begin_y(){return l(Math.round(this._ends("begin_y")[0][1]))}set begin_y(t){const[e,s]=this._ends("begin_y");this._move([e[0],t],s)}get end_x(){return l(Math.round(this._ends("end_x")[1][0]))}set end_x(t){const[e,s]=this._ends("end_x");this._move(e,[t,s[1]])}get end_y(){return l(Math.round(this._ends("end_y")[1][1]))}set end_y(t){const[e,s]=this._ends("end_y");this._move(e,[s[0],t])}begin_connect(t,e){this._connect("begin",t,e)}end_connect(t,e){this._connect("end",t,e)}_connect(t,e,s){const r=`${t}_connect`,[n,o]=this._ends(r);if(!(e instanceof Shape))throw new Error(`${this.def.name}.${r}(): its shape is a Shape.`);const h=e._def,f={frame:e._frame(),geometry:h.geometry,adjustments:h.adjustments,flip:h.flip,rotation:h.rotation,path:h.path},u=Z(f).length;if(!Number.isInteger(s)||s<0||s>=u)throw new Error(`${this.def.name}.${r}(): ${h.name} has connection sites 0 to ${String(u-1)}; ${String(s)} is not one.`);const c=W(f,s)??(t==="begin"?n:o);this.def.connect={...this.def.connect,[t]:{shape:h.name,site:s}},this._move(t==="begin"?c:n,t==="begin"?o:c)}}const lt=i=>typeof i=="number"&&Number.isFinite(i),_=(i,t,e,s)=>{for(const[r,n]of Object.entries({left:i,top:t,width:e,height:s}))if(!lt(n))throw new Error(`${r} ${String(n)} is not a length (Emu, Inches, Pt, Cm, Mm).`);if(e<0||s<0)throw new Error("A shape's width and height are 0 or more.");return{left:Math.trunc(i),top:Math.trunc(t),width:Math.trunc(e),height:Math.trunc(s)}},ft=new Set(Object.values(P));export class FreeformBuilder{steps;sx;sy;make;constructor(t,e,s){return this.steps=[{op:"move",x:t[0],y:t[1]}],[this.sx,this.sy]=typeof e=="number"?[e,e]:e,this.make=s,a(this,"FreeformBuilder")}add_line_segments(t,e=!0){for(const[s,r]of t)this.steps.push({op:"line",x:s,y:r});return e&&this.steps.push({op:"close"}),this}add_curve_segment(t,e,s,r,n,o){if(![t,e,s,r,n,o].every(h=>Number.isFinite(h)))throw new Error("add_curve_segment(x1, y1, x2, y2, x, y) takes six numbers in local units: its two control points and the point it ends at.");return this.steps.push({op:"curve",x1:t,y1:e,x2:s,y2:r,x:n,y:o}),this}move_to(t,e){return this.steps.push({op:"move",x:t,y:e}),this}convert_to_shape(t=0,e=0){this.steps.length<2&&g("convert_to_shape(): a freeform needs a segment.");const s=this.steps.flatMap(d=>d.op==="close"?[]:d.op==="curve"?[[d.x1,d.y1],[d.x2,d.y2],[d.x,d.y]]:[[d.x,d.y]]),r=s.map(d=>d[0]),n=s.map(d=>d[1]),o=Math.min(...r),h=Math.min(...n),f=Math.max(...r)-o,u=Math.max(...n)-h;f===0&&u===0&&g("convert_to_shape(): a freeform's points are all one point.");const c=(d,m)=>({x:d-o,y:m-h});return this.make({w:f,h:u,steps:this.steps.map(d=>{if(d.op==="close")return d;if(d.op!=="curve")return{op:d.op,...c(d.x,d.y)};const m=c(d.x1,d.y1),y=c(d.x2,d.y2);return{op:"curve",x1:m.x,y1:m.y,x2:y.x,y2:y.y,...c(d.x,d.y)}})},_(Math.round(o*this.sx)+t,Math.round(h*this.sy)+e,Math.round(f*this.sx),Math.round(u*this.sy)))}}export class GroupShape{list;_name;make;constructor(t,e,s){return this.list=t,this._name=e,this.make=s,a(this,"GroupShape")}members(){return this.list.filter(t=>t.group===this._name)}box(){const t=this.members().flatMap(r=>r.frame?[r.frame]:[]),e=Math.min(...t.map(r=>r.left)),s=Math.min(...t.map(r=>r.top));return{left:t.length>0?e:0,top:t.length>0?s:0,right:Math.max(0,...t.map(r=>r.left+r.width)),bottom:Math.max(0,...t.map(r=>r.top+r.height))}}get shapes(){return this.make(this._name)}get shape_type(){return K.GROUP}get name(){return this._name}set name(t){for(const e of this.members())e.group=t;this._name=t}get left(){return l(this.box().left)}set left(t){const e=t-this.box().left;for(const s of this.members())s.frame&&(s.frame.left+=e)}get top(){return l(this.box().top)}set top(t){const e=t-this.box().top;for(const s of this.members())s.frame&&(s.frame.top+=e)}get width(){const t=this.box();return l(t.right-t.left)}get height(){const t=this.box();return l(t.bottom-t.top)}}export class Cell{def;table;row;col;constructor(t,e,s,r){return this.def=t,this.table=e,this.row=s,this.col=r,a(this,"_Cell")}get text_frame(){return new TextFrame(this.def.text)}get text(){return this.text_frame.text}set text(t){this.text_frame.text=t}get fill(){return new FillFormat(()=>this.def.fill,t=>{this.def.fill=t})}get borders(){return this.def.borders??{}}set borders(t){this.def.borders=Object.fromEntries(Object.entries(t).map(([e,s])=>[e,{...s,color:I(s.color,`A cell's ${e} border`)}]))}get margin_left(){return l(this.def.text.margin_left??w.left)}set margin_left(t){this.def.text.margin_left=t}get margin_right(){return l(this.def.text.margin_right??w.right)}set margin_right(t){this.def.text.margin_right=t}get margin_top(){return l(this.def.text.margin_top??w.top)}set margin_top(t){this.def.text.margin_top=t}get margin_bottom(){return l(this.def.text.margin_bottom??w.bottom)}set margin_bottom(t){this.def.text.margin_bottom=t}get vertical_anchor(){return this.def.text.vertical_anchor}set vertical_anchor(t){t===void 0?delete this.def.text.vertical_anchor:this.def.text.vertical_anchor=t}get is_merge_origin(){return(this.def.span_width??1)>1||(this.def.span_height??1)>1}get is_spanned(){return this.def.spanned===!0}get span_width(){return this.def.span_width??1}get span_height(){return this.def.span_height??1}merge(t){const e=[this.row,t.row].sort((f,u)=>f-u),s=[this.col,t.col].sort((f,u)=>f-u),[r=0,n=0]=e,[o=0,h=0]=s;for(let f=r;f<=n;f++)for(let u=o;u<=h;u++){const c=this.table.rows[f]?.cells[u];c&&(f===r&&u===o?(h>o&&(c.span_width=h-o+1),n>r&&(c.span_height=n-r+1)):c.spanned=!0)}}split(){const t=this.span_width,e=this.span_height;delete this.def.span_width,delete this.def.span_height;for(let s=this.row;s<this.row+e;s++)for(let r=this.col;r<this.col+t;r++){const n=this.table.rows[s]?.cells[r];n&&delete n.spanned}}}export class Column{def;at;constructor(t,e){return this.def=t,this.at=e,a(this,"_Column")}get width(){return l(this.def.columns[this.at]??0)}set width(t){this.def.columns[this.at]=t}}export class Row{def;at;constructor(t,e){return this.def=t,this.at=e,a(this,"_Row")}get row(){const t=this.def.rows[this.at];if(!t)throw new Error(`The table has no row ${String(this.at)}.`);return t}get height(){return l(this.row.height)}set height(t){this.row.height=t}}export class Table{def;constructor(t){return this.def=t,a(this,"Table")}cell(t,e){const s=this.def.rows[t]?.cells[e];if(!s)throw new Error(`cell(): the table has ${String(this.def.rows.length)} rows and ${String(this.def.columns.length)} columns.`);return new Cell(s,this.def,t,e)}*iter_cells(){for(let t=0;t<this.def.rows.length;t++)for(let e=0;e<this.def.columns.length;e++)yield this.cell(t,e)}get columns(){return this.def.columns.map((t,e)=>new Column(this.def,e))}get rows(){return this.def.rows.map((t,e)=>new Row(this.def,e))}flag(t){return this.def[t]===!0}get first_row(){return this.flag("first_row")}set first_row(t){this.def.first_row=t}get first_col(){return this.flag("first_col")}set first_col(t){this.def.first_col=t}get last_row(){return this.flag("last_row")}set last_row(t){this.def.last_row=t}get last_col(){return this.flag("last_col")}set last_col(t){this.def.last_col=t}get horz_banding(){return this.flag("horz_banding")}set horz_banding(t){this.def.horz_banding=t}get vert_banding(){return this.flag("vert_banding")}set vert_banding(t){this.def.vert_banding=t}}function ut(i,t,e=[]){const s=new Set([...i,...e].map(n=>n.name));let r=1;for(;s.has(`${t}-${String(r)}`);)r++;return`${t}-${String(r)}`}export class ShapeCollection{list;base;components;inherit;group;under;constructor(t,e,s,r=()=>{},n=()=>[],o){return this.list=t,this.base=e,this.components=s,this.inherit=r,this.under=n,this.group=o,a(this,"SlideShapes",{index:h=>this._at(h)})}_wrap(t){return new Shape(t,()=>this.inherit(t))}_at(t){const e=this.list[t];return e?this._wrap(e):void 0}*[Symbol.iterator](){for(const t of this.list)yield this._wrap(t)}get length(){return this.list.length}get(t){const e=this.list.find(s=>s.name===t);return e?this._wrap(e):void 0}get title(){const t=this.list.find(e=>e.placeholder?.type==="title"||e.placeholder?.type==="ctrTitle");return t?this._wrap(t):void 0}get placeholders(){return new Placeholders(this.list,this.inherit)}_add(t,e){const s={name:ut(this.list,t,this.under()),...e,...this.group===void 0?{}:{group:this.group}};return this.list.push(s),this._wrap(s)}add_textbox(t,e,s,r){return this._add("textbox",{kind:"textbox",frame:_(t,e,s,r),text:{...S(),...rt}})}add_picture(t,e,s,r,n){return(r===void 0||n===void 0)&&g("add_picture() takes a width and a height here: a picture's own size is not read while a deck's code runs"),this._add("picture",{kind:"picture",frame:_(e,s,r??0,n??0),media:{path:t,base:this.base}})}add_movie(t,e,s,r,n,o={}){return this._add("movie",{kind:"movie",frame:_(e,s,r,n),media:{path:t,base:this.base,...o.poster_frame_time===void 0?{}:{poster:o.poster_frame_time}}})}add_shape(t,e,s,r,n){ft.has(t)||g(`add_shape(): ${t} is not one of MSO_SHAPE's ${Object.keys(P).join(", ")}`);const o=S();return o.vertical_anchor=p.vertical_anchor,o.paragraphs=[{runs:[],level:0,alignment:p.alignment}],this._add("shape",{kind:"autoshape",frame:_(e,s,r,n),geometry:t,fill:p.fill,line:p.line,line_width:p.line_width,text:o})}add_table(t,e,s,r,n,o){(t<1||e<1)&&g("add_table(): a table has at least a row and a column.");const h=Math.floor(n/e),f=Math.floor(o/t);return this._add("table",{kind:"table",frame:_(s,r,n,o),table:{columns:Array.from({length:e},()=>h),rows:Array.from({length:t},()=>({height:f,cells:Array.from({length:e},()=>({text:S()}))}))}})}add_chart(t,e,s,r,n,o){return this._add("chart",{kind:"chart",frame:_(e,s,r,n),chart:{type:t,categories:[...o.categories],series:o._series()}})}add_group_shape(){this.group!==void 0&&g("add_group_shape(): a group here holds shapes, not another group.");let t=1;for(;this.list.some(e=>e.group===`group-${String(t)}`);)t++;return new GroupShape(this.list,`group-${String(t)}`,e=>new ShapeCollection(this.list,this.base,this.components,this.inherit,this.under,e))}build_freeform(t=0,e=0,s=1){return new FreeformBuilder([t,e],s,(r,n)=>{const o=S();return o.vertical_anchor=p.vertical_anchor,o.paragraphs=[{runs:[],level:0,alignment:p.alignment}],this._add("freeform",{kind:"autoshape",frame:n,path:r,fill:p.fill,line:p.line,line_width:p.line_width,text:o})})}add_connector(t,e,s,r,n){k(t)||g(`add_connector(): ${t} is not one of MSO_CONNECTOR's ${Object.keys(J).join(", ")}, nor a connector's preset (${V.join(", ")})`);const o=_(Math.min(e,r),Math.min(s,n),Math.abs(r-e),Math.abs(n-s)),h=r<e,f=n<s;return this._add("connector",{kind:"autoshape",frame:o,geometry:t,...h||f?{flip:{...h?{h}:{},...f?{v:f}:{}}}:{},line:F.line,line_width:F.line_width})}add_component(t,e,s,r,n,o={},h={}){if(!Object.hasOwn(this.components(),t))throw new Error(`add_component(): the presentation has no component ${t}; add it with prs.components.add("${t}", { … }) first.`);if(h.dur!==void 0&&!(Number.isFinite(h.dur)&&h.dur>0))throw new Error(`add_component(): dur is how long ${t} moves, seconds over 0; it was ${String(h.dur)}.`);return this._add(t,{kind:"component",frame:_(e,s,r,n),component:{name:t,props:o,...h.dur===void 0?{}:{dur:h.dur}}})}}export const NAME_OF_TYPE={title:"title",ctrTitle:"title",subTitle:"subtitle",body:"body",pic:"picture",media:"media",obj:"content",dt:"date",ftr:"footer",sldNum:"slide-number"};export class Placeholders{list;inherit;constructor(t,e=()=>{}){return this.list=t,this.inherit=e,a(this,"placeholders",{index:s=>this.get(s)})}_wrap(t){return new Shape(t,()=>this.inherit(t))}*[Symbol.iterator](){for(const t of this.list)t.kind==="placeholder"&&(yield this._wrap(t))}get length(){return this.list.filter(t=>t.kind==="placeholder").length}get(t){const e=this.list.find(s=>s.kind==="placeholder"&&(typeof t=="number"?s.placeholder?.idx===t:s.name===t||s.placeholder?.type===t));return e?this._wrap(e):void 0}add(t,e,s,r,n,o={}){const h=typeof e=="object"?e:o,f=typeof e=="object"?void 0:e;Object.values(v).includes(t)||g(`placeholders.add(): ${t} is not one of PP_PLACEHOLDER's ${Object.keys(v).join(", ")}`);const u=this.list.filter(b=>b.kind==="placeholder"),c=new Set(u.map(b=>b.placeholder?.idx));let d=t==="title"||t==="ctrTitle"?0:tt[t]??1;for(c.has(d)&&d===0&&(d=1);c.has(d);)d++;const m=h.name??NAME_OF_TYPE[t];if(this.list.some(b=>b.name===m))throw new Error(`Two shapes are ${m}: give the placeholder a name ({ name }).`);const y=[f,s,r,n].filter(b=>b!==void 0);if(y.length!==0&&y.length!==4)throw new Error("placeholders.add(type, left, top, width, height): give all four, or none to take the master's frame.");const R={name:m,kind:"placeholder",placeholder:{type:t,idx:d},...y.length===4?{frame:_(f??0,s??0,r??0,n??0)}:{},text:{paragraphs:[],levels:st(t)}};return this.list.push(R),this._wrap(R)}}export class SlideLayout{def;master;ctx;constructor(t,e,s){return this.def=t,this.master=e,this.ctx=s,a(this,"SlideLayout")}get _def(){return this.def}inherit=t=>t.placeholder?C(this.master._def,t.placeholder.type)?.frame:void 0;get name(){return this.def.name}get slide_master(){return this.master}get display_master_shapes(){return this.def.display_master_shapes??!0}set display_master_shapes(t){t?delete this.def.display_master_shapes:this.def.display_master_shapes=!1}get background(){return new Background(this.def)}get placeholders(){return new Placeholders(this.def.shapes,this.inherit)}get shapes(){return new ShapeCollection(this.def.shapes,this.ctx.base,this.ctx.components,this.inherit,()=>this.master._def.shapes)}}export class SlideLayouts{list;make;constructor(t,e){return this.list=t,this.make=e,a(this,"SlideLayouts",{index:s=>this.list[s]})}*[Symbol.iterator](){yield*this.list}get length(){return this.list.length}get_by_name(t,e){return this.list.find(s=>s.name===t)??e}index(t){const e=this.list.indexOf(t);if(e<0)throw new Error(`${t.name} is not among these layouts.`);return e}add(t,e){if(!this.make)throw new Error("A layout is added to a master: master.slide_layouts.add(name).");const s=this.make(t);return e?.(s),s}}export class TextStyles{def;constructor(t){return this.def=t,a(this,"text_styles")}get title_style(){return O(this.def.title)}get body_style(){return O(this.def.body)}get other_style(){return O(this.def.other)}}export class SlideMaster{def;layouts=[];ctx;allLayouts;constructor(t,e,s){return this.def=t,this.ctx=e,this.allLayouts=s,a(this,"SlideMaster")}get _def(){return this.def}get name(){return this.def.name}get background(){return new Background(this.def)}get placeholders(){return new Placeholders(this.def.shapes)}get shapes(){return new ShapeCollection(this.def.shapes,this.ctx.base,this.ctx.components)}get text_styles(){return new TextStyles(this.def.text_styles)}get slide_layouts(){return new SlideLayouts(this.layouts,t=>{if(this.allLayouts.some(r=>r.name===t))throw new Error(`Two layouts are "${t}": a layout's name is unique in the deck, as its slides file names it.`);const e={name:t,master:this.def.name,shapes:[]};this.def.layouts.push(e);const s=new SlideLayout(e,this,this.ctx);return this.layouts.push(s),this.allLayouts.push(s),s})}}export class SlideMasters{list;make;constructor(t,e){return this.list=t,this.make=e,a(this,"SlideMasters",{index:s=>this.list[s]})}*[Symbol.iterator](){yield*this.list}get length(){return this.list.length}index(t){return this.list.indexOf(t)}add(t,e){const s=this.make(t);return e?.(s),s}}export class GeneratedSlide{own;def;layout;constructor(t,e,s){this.def=t,this.layout=e,this.own=e._def.shapes.filter(n=>n.kind==="placeholder").map(n=>({name:n.name,kind:"placeholder",...n.placeholder?{placeholder:{...n.placeholder}}:{},text:S()}));const r=n=>{const o=e._def.shapes.find(h=>h.kind==="placeholder"&&h.placeholder?.idx===n.placeholder?.idx);return o?o.frame??(o.placeholder?C(e.slide_master._def,o.placeholder.type)?.frame:void 0):void 0};return this._shapes=new ShapeCollection(this.own,s.base,s.components,r,()=>[...e.slide_master._def.shapes,...e._def.shapes]),this._placeholders=new Placeholders(this.own,r),a(this,"Slide")}_shapes;_placeholders;get shapes(){return this._shapes}get placeholders(){return this._placeholders}get slide_id(){return this.def.id}get slide_layout(){return this.layout}get has_notes_slide(){return this.def.notes!==void 0}get notes_slide(){const t=this.def;return a({notes_text_frame:a({get text(){return t.notes??""},set text(e){t.notes=e}},"TextFrame")},"NotesSlide")}get transition(){return this.def.transition}set transition(t){t===void 0?delete this.def.transition:this.def.transition=t}get animations(){return new Animations(this.def.animations??=[])}_done(){const t={},e=[];for(const s of this.own)s.kind==="placeholder"&&s.placeholder?(s.text?.paragraphs.some(r=>r.runs.length>0)&&(t[s.placeholder.idx]=s.text.paragraphs),s.frame&&e.push({...s,text:S()})):e.push(s);return{...this.def,shapes:e,text:t}}}export class Animations{list;constructor(t){return this.list=t,a(this,"Animations")}add(t,e,s={}){this.list.push({shape:typeof t=="string"?t:t.name,effect:e,...s})}get length(){return this.list.length}}class ct{gen;constructor(t){return this.gen=t,a(this,"slides")}add_slide(t,e){return this.gen._add(t,e)}}export class Generator{list=[];prs;ctx;constructor(t,e){return this.prs=t,this.ctx=e,a(this,"Generator")}data(t){return this.ctx.data(t)}get slides(){return new ct(this)}_add(t,e){const s=typeof t=="string"?this.prs._layout(t):t;if(!s)throw new Error(`add_slide(): the presentation has no layout ${typeof t=="string"?t:t.name}.`);if(!/^[A-Za-z0-9_-]+$/u.test(e))throw new Error(`add_slide(): ${e} is not an id of letters, digits, _ and -.`);if(this.list.some(n=>n.slide_id===e))throw new Error(`add_slide(): two slides are ${e}.`);const r=new GeneratedSlide({id:e,layout:s.name,shapes:[],text:{}},s,this.prs._ctx);return this.list.push(r),r}_made(){return this.list.map(t=>t._done())}}const pt=()=>JSON.parse(JSON.stringify(et));export class Presentation{masters=[];layouts=[];def;_ctx;constructor(t,e){return this.def={slide_width:t[0],slide_height:t[1],masters:[],components:{},generators:{}},this._ctx={base:e,components:()=>this.def.components},a(this,"Presentation")}get _def(){return this.def}get slide_width(){return l(this.def.slide_width)}set slide_width(t){this.def.slide_width=t}get slide_height(){return l(this.def.slide_height)}set slide_height(t){this.def.slide_height=t}get slide_masters(){return new SlideMasters(this.masters,t=>{if(this.masters.some(r=>r.name===t))throw new Error(`Two masters are "${t}".`);const e={name:t,background:"lt1",text_styles:pt(),shapes:[],layouts:[]};this.def.masters.push(e);const s=new SlideMaster(e,this._ctx,this.layouts);return this.masters.push(s),s})}get slide_master(){const t=this.masters[0];if(!t)throw new Error("The presentation has no master yet: prs.slide_masters.add(name) makes one.");return t}get slide_layouts(){const t=this.masters[0];return t?t.slide_layouts:new SlideLayouts([])}get slides(){return g("A deck's slides are in the slides file presentation({ slides }) names, in order, each on a layout, and their words in its script; slides made from data are a generator's (prs.generators.add)")}save(){return g("A deck is not saved by its code: allyhub render writes its PDF, pictures and PPTX")}get theme(){return this.def.theme??={},this.def.theme}set theme(t){this.def.theme=t}get components(){return a({add:(t,e)=>{if(Object.hasOwn(this.def.components,t))throw new Error(`Two components are "${t}".`);const s=X(t,e);if(!s)throw new Error(`Component ${t} is not a component: give what defineComponent makes, or { props, layers }.`);this.def.components[t]=s}},"components")}get generators(){return a({add:(t,e)=>{if(Object.hasOwn(this.def.generators,t))throw new Error(`Two generators are "${t}".`);this.def.generators[t]={name:t,make:s=>{const r=new Generator(this,s);return e(r),r._made()}}}},"generators")}_layout(t){return this.layouts.find(e=>e.name===t)}}export const DECK_BRAND="__allyhubDeck";export function isDeck(i){return typeof i=="object"&&i!==null&&DECK_BRAND in i}export const presentationFor=i=>(t,e)=>{const[s,r]=typeof t=="function"?[{},t]:[t,e];if(typeof r!="function")throw new Error(`A deck's module exports one deck: export default presentation({ slides: "./deck.yaml", script: "./deck.{locale}.yaml", size }, (prs) => { … masters, layouts, components … }), its slides and its script named from its folder.`);if(s.script!==void 0&&!s.script.includes("{locale}"))throw new Error(`presentation(): script ${s.script} names one file: write {locale} in its name for each language (./deck.{locale}.yaml).`);if(typeof s.size=="string"&&!Object.hasOwn(M,s.size))throw new Error(`presentation(): size ${s.size} is not one of ${Object.keys(M).join(", ")}, or { width, height } in EMU.`);return{[DECK_BRAND]:!0,kind:"slides",options:s,build:r,written:{file:i}}};export function evaluateDeck(i){const t=i.options.size??"16:9",e=typeof t=="string"?M[t]:[t.width,t.height],s=i.written.file.split("/").slice(0,-1).join("/"),r=new Presentation(e,s);return i.options.theme&&(r.theme=JSON.parse(JSON.stringify(i.options.theme))),i.build(r),r._def}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{Animations as l,Background as p,Cell as h,ColorFormat as d,Column as c,FillFormat as m,Font as y,FreeformBuilder as u,GeneratedSlide as f,Generator as _,GroupShape as g,Hyperlink as w,LineFormat as b,ListLevel as S,ShadowFormat as P,Paragraph as A,Placeholders as L,Presentation as O,Row as C,Run as E,Shape as x,ShapeCollection as T,SlideLayout as R,SlideLayouts as k,SlideMaster as v,SlideMasters as M,Table as F,TextFrame as I,TextStyles as G}from"./api.js";import{CategoryChartData as B,Chart as H,XyChartData as D,XySeriesData as N,ChartAxis as j,ChartFormat as X,ChartLegend as W,MajorGridlines as z,TickLabels as U,ChartPlot as Y,ChartPoint as Z,ChartSeries as K,DataLabels as V}from"./chart-api.js";import{MSO_ANCHOR as q,MSO_ARROWHEAD as J,MSO_AUTO_SIZE as Q,MSO_CONNECTOR as $,MSO_FILL as ee,MSO_LINE as te,MSO_SHAPE as ae,MSO_SHAPE_TYPE as oe,MSO_THEME_COLOR as se,PP_ALIGN as re,PP_PLACEHOLDER as ne,THEME_FONT as ie,XL_CHART_TYPE as le,XL_LABEL_POSITION as pe,XL_LEGEND_POSITION as he}from"./enums.js";import{publicNames as s}from"./strict.js";const a={Presentation:{theme:"The theme's colours (dk1…folHlink) and fonts (major, minor), over the project's look.",components:"components.add(name, { props, layers }): a shape drawn by code, by the layer contract.",generators:"generators.add(name, (g) => { g.data(path); g.slides.add_slide(layout, id) … }): slides made from data, placed in the slides file as one block."},SlideMasters:{add:"add(name): a master, with Office's text styles and no placeholders yet."},_Cell:{borders:"Its edges: { left, right, top, bottom }, each { color, width } (a:lnL…)."},LineFormat:{begin_arrow:"What the end of the line where it starts has (MSO_ARROWHEAD): PowerPoint's Begin Arrow type (a:headEnd).",end_arrow:"What the end of the line where it ends has (MSO_ARROWHEAD): PowerPoint's End Arrow type (a:tailEnd)."},FillFormat:{transparency:"How much of the fill shows through, a share: PowerPoint's Transparency (a:alpha).",gradient_stops:"Its stops, [{ at, color, transparency }], `at` and `transparency` shares; python-pptx's stops can only be read and changed in place."},ShadowFormat:{blur_radius:"How far the shadow blurs, a Length (a:outerShdw blurRad).",distance:"How far it falls from the shape, a Length (dist).",angle:"The way it falls, degrees clockwise from the right (dir).",transparency:"How much shows through it, a share (a:alpha).",color:"Its colour, a ColorFormat."},FreeformBuilder:{add_curve_segment:"add_curve_segment(x1, y1, x2, y2, x, y): a cubic Bézier segment by its two control points (a:cubicBezTo)."},Font:{strike:"A line through it (@strike).",baseline:"Raised or lowered, a share of its size: superscript 0.3, subscript -0.25 (@baseline).",highlight:"The colour behind it, #RRGGBB as RGBColor gives one (a:highlight).",spacing:"Space added between letters, a Length, negative to tighten (PowerPoint's Character Spacing, a:rPr spc)."},SlideMaster:{text_styles:"Its text styles (p:txStyles): title_style, body_style, other_style, nine ListLevels each, Office's to start with."},SlideLayouts:{add:"add(name): a layout on this master."},SlideLayout:{display_master_shapes:"Whether its master's shapes are drawn on its slides, true unless set: PowerPoint's Hide Background Graphics (@showMasterSp)."},placeholders:{add:"add(PP_PLACEHOLDER.X, left?, top?, width?, height?, { name }): a placeholder on a master or a layout; a layout's without a frame takes its master's of its base type."},SlideShapes:{add_component:"add_component(name, left, top, width, height, props): a component of the presentation in a frame.",get:"get(name): a shape by its name."},TextFrame:{list_style:"Its list style (a:lstStyle): nine ListLevels, level 0 first, what its paragraphs take where they set nothing."},ListLevel:{"*":"A level of a list style: alignment, line_spacing, space_before, space_after, font, bullet (a character, or null for none), bullet_font, numbered (a:buAutoNum: arabicPeriod, alphaLcPeriod…), margin_left, indent."},text_styles:{"*":"title_style, body_style, other_style: a master's text styles, nine ListLevels each."},Animations:{"*":"A generated slide's Animation Pane: add(shape, effect, { start, direction, duration, delay, paragraph, path }), in order."},Slide:{animations:"Its Animation Pane, which python-pptx has no API for.",transition:"How it comes on from the slide before: { type, direction, duration }, which python-pptx has no API for."},Generator:{"*":"What a generator's function is given: data(path), and slides.add_slide(layout, id)."}},de={Presentation:{slides:"A deck's slides are in the slides file it names, their words in its script; slides from data are a generator's.",save:"A deck is not saved by its code: allyhub render writes its files."}},ce={Presentation:O.prototype,SlideMasters:M.prototype,SlideMaster:v.prototype,SlideLayouts:k.prototype,SlideLayout:R.prototype,Slide:f.prototype,placeholders:L.prototype,SlideShapes:T.prototype,Shape:x.prototype,TextFrame:I.prototype,_Paragraph:A.prototype,_Run:E.prototype,_Hyperlink:w.prototype,Font:y.prototype,ColorFormat:d.prototype,FillFormat:m.prototype,LineFormat:b.prototype,ShadowFormat:P.prototype,FreeformBuilder:u.prototype,GroupShape:g.prototype,Table:F.prototype,CategoryChartData:B.prototype,XyChartData:D.prototype,XySeriesData:N.prototype,Chart:H.prototype,Plot:Y.prototype,Series:K.prototype,Point:Z.prototype,DataLabels:V.prototype,Legend:W.prototype,Axis:j.prototype,TickLabels:U.prototype,MajorGridlines:z.prototype,ChartFormat:X.prototype,_Cell:h.prototype,_Column:c.prototype,_Row:C.prototype,_Background:p.prototype},me={Animations:l.prototype,ListLevel:S.prototype,text_styles:G.prototype,Generator:_.prototype},ye=()=>{const e={};for(const[t,r]of Object.entries(ce)){const n=a[t]??{},i=de[t]??{};e[t]=s(r).filter(o=>!Object.hasOwn(n,o)&&!Object.hasOwn(i,o))}return e};export const CAPABILITIES={reference:{library:"python-pptx",version:"1.0.2",docs:"https://python-pptx.readthedocs.io/"},holds:ye(),enums:Object.fromEntries(Object.entries({MSO_THEME_COLOR:se,PP_ALIGN:re,MSO_ANCHOR:q,MSO_AUTO_SIZE:Q,PP_PLACEHOLDER:ne,MSO_SHAPE:ae,MSO_CONNECTOR:$,MSO_SHAPE_TYPE:oe,MSO_FILL:ee,MSO_LINE:te,XL_CHART_TYPE:le,XL_LABEL_POSITION:pe,XL_LEGEND_POSITION:he,MSO_ARROWHEAD:J,THEME_FONT:ie}).map(([e,t])=>[e,Object.keys(t)])),units:["Emu","Inches","Pt","Cm","Mm","Centipoints","RGBColor"],differs:["The entry is export default presentation({ slides: ./deck.yaml, script: ./deck.{locale}.yaml, size, theme }, (prs) => { … }), not Presentation(path): a deck is made by its code, never opened from a template. Its masters and layouts are made with the additions below; its slides are in the slides file it names.","A name python-pptx has that is not held throws where it is used, naming what the class holds; python-pptx's x[i] is held where it indexes (slide_masters[0], slide_layouts[0], placeholders[idx], shapes[0]), and len(x) is x.length.","A Length (what Inches(1) and Pt(12) give, and what a length reads, shape.width) is a Number of EMU with python-pptx's emu, inches, cm, mm, pt, centipoints and twips. Arithmetic on Lengths gives a plain number, as python's int does; two Lengths of one value are ===, and one is compared with a plain number by its .emu.",`An enumeration's members are PresentationML's values (MSO_THEME_COLOR.ACCENT_1 is "accent1", PP_ALIGN.CENTER "ctr"), not integers; TEXT_1 and BACKGROUND_1 are dk1 and lt1, a master's standard colour map. MSO_SHAPE_TYPE.COMPONENT is a component's.`,`A colour's rgb is "#RRGGBB": RGBColor(r, g, b), new RGBColor(r, g, b) and RGBColor.from_string("RRGGBB") make one.`,"A colour's brightness is a theme colour's: python-pptx also gives an RGB colour one, which is refused here (set rgb to the colour it makes).","line_spacing is a number of lines, or a Length of Pt(1) and over for a fixed height (python-pptx tells them apart by type).","add_picture() takes both width and height: a picture's own size is not read while a deck's code runs.","add_connector() takes MSO_CONNECTOR's STRAIGHT, ELBOW and CURVE, and also a connector's preset by name where python-pptx has none (straightConnector1, bentConnector2 to 5, curvedConnector2 to 5); a connector's adjustments (an elbow's middle) are its shape.adjustments.","begin_connect() and end_connect() take a site of the shape's own geometry, as PowerPoint numbers them (a rectangle's 0 top, 1 left, 2 bottom, 3 right; an ellipse has 8), where python-pptx places an end on those four of its box whatever its shape; a site the shape has not throws. A glued end follows its shape where the slides file or a person moves it, as PowerPoint's does.","add_movie(movie_file, left, top, width, height, { poster_frame_time }) takes a video file, its poster a moment of it in seconds, not poster_frame_image.","A shape's name is its kind and a number (textbox-1, shape-2), and a placeholder's its type's (title, body, subtitle): the slides file and the script name shapes by name.","fit_text() sets the frame to shrink its text when it is drawn (MSO_AUTO_SIZE.TEXT_TO_FIT_SHAPE) from max_size: it reads no font file.","Font.underline is a single underline or none.","A chart holds column, bar, line, area, pie, doughnut and XY scatter types; it has no 3D, no bubble, no radar and no second axis. A chart in the slides file can read its numbers from a project file: data, categories and series name it and its columns.","A Point holds format.fill alone, and its fill is its category's colour, one for every series of the chart (the slides file's category_colors), shown where the chart varies by categories; python-pptx's point is its own series'.","A table has no style, where python-pptx's starts with Medium Style 2: its look is its cells' (fill, borders, text), and first_row and the like say what its rows are and paint nothing. add_table returns its shape, whose .table is the table.","A group is its shapes: they are listed with the shapes the group is among, drawn as they are, and a group holds no group; its box is theirs, so left and top move them and width and height only read.","A presentation is 16:9 (12192000 × 6858000) and its theme Office 2013–2022's over the project's look; python-pptx's template is 4:3 with Office 2007's.","prs.slide_layouts and prs.slide_master are the first master's, as python-pptx's; a generator's add_slide also takes a layout of any master by name."],adds:{...a,...Object.fromEntries(Object.entries(me).map(([e,t])=>[e,{...a[e]??{},names:s(t).join(", ")}]))}};
2
+ import{Animations as l,Background as h,Cell as d,ColorFormat as p,Column as c,FillFormat as m,Font as y,FreeformBuilder as _,GeneratedSlide as w,Generator as f,GroupShape as u,Hyperlink as g,LineFormat as b,ListLevel as S,ShadowFormat as A,GradientStop as P,Paragraph as E,Placeholders as O,Presentation as L,Row as C,Run as x,Shape as R,ShapeCollection as M,SlideLayout as T,SlideLayouts as k,SlideMaster as H,SlideMasters as v,Table as I,TextFrame as G,TextStyles as F}from"./api.js";import{CategoryChartData as B,Chart as D,XyChartData as N,XySeriesData as j,ChartAxis as W,ChartFormat as z,ChartLegend as X,MajorGridlines as Z,TickLabels as U,ChartPlot as Y,ChartPoint as V,ChartSeries as K,DataLabels as q}from"./chart-api.js";import{MSO_ANCHOR as J,MSO_ARROWHEAD as Q,MSO_ARROWHEAD_SIZE as $,MSO_AUTO_SIZE as ee,MSO_CONNECTOR as te,MSO_FILL as ae,MSO_LINE as oe,MSO_SHAPE as se,MSO_SHAPE_TYPE as re,MSO_THEME_COLOR as ie,PP_ALIGN as ne,PP_PLACEHOLDER as le,THEME_FONT as he,XL_CHART_TYPE as de,XL_LABEL_POSITION as pe,XL_LEGEND_POSITION as ce}from"./enums.js";import{publicNames as s}from"./strict.js";const a={Presentation:{theme:"The theme's colours (dk1…folHlink) and fonts (major, minor), over the project's look.",components:"components.add(name, { props, layers }): a shape drawn by code, by the layer contract.",generators:"generators.add(name, (g) => { g.data(path); g.slides.add_slide(layout, id) … }): slides made from data, placed in the slides file as one block."},SlideMasters:{add:"add(name): a master, with Office's text styles and no placeholders yet."},_Cell:{borders:"Its edges: { left, right, top, bottom }, each { color, width } (a:lnL…)."},LineFormat:{begin_arrow:"What the end of the line where it starts has (MSO_ARROWHEAD): PowerPoint's Begin Arrow type (a:headEnd).",end_arrow:"What the end of the line where it ends has (MSO_ARROWHEAD): PowerPoint's End Arrow type (a:tailEnd).",begin_arrow_width:"How wide the arrowhead where the line starts is (MSO_ARROWHEAD_SIZE): PowerPoint's Begin Arrow size (a:headEnd@w).",begin_arrow_length:"How long the arrowhead where the line starts is (MSO_ARROWHEAD_SIZE): PowerPoint's Begin Arrow size (a:headEnd@len).",end_arrow_width:"How wide the arrowhead where the line ends is (MSO_ARROWHEAD_SIZE): PowerPoint's End Arrow size (a:tailEnd@w).",end_arrow_length:"How long the arrowhead where the line ends is (MSO_ARROWHEAD_SIZE): PowerPoint's End Arrow size (a:tailEnd@len)."},FillFormat:{transparency:"How much of the fill shows through, a share: PowerPoint's Transparency (a:alpha).",gradient_stops:"Its stops: each read as python-pptx's (color, position), and set whole as [{ at, color, transparency }], `at` and `transparency` shares, a colour as the slides file writes one (accent1, accent1 lighter 40%, #RRGGBB) or a Color; python-pptx's stops can only be read and changed in place."},_GradientStop:{transparency:"How much of its colour shows through, a share (a:alpha)."},ShadowFormat:{blur_radius:"How far the shadow blurs, a Length (a:outerShdw blurRad).",distance:"How far it falls from the shape, a Length (dist).",angle:"The way it falls, degrees clockwise from the right (dir).",transparency:"How much shows through it, a share (a:alpha).",color:"Its colour, a ColorFormat."},Shape:{flip_h:"Mirrored left to right (a:xfrm flipH), as the slides file's flip_h; its text reads as it is.",flip_v:"Mirrored top to bottom (a:xfrm flipV), as the slides file's flip_v."},FreeformBuilder:{add_curve_segment:"add_curve_segment(x1, y1, x2, y2, x, y): a cubic Bézier segment by its two control points (a:cubicBezTo)."},Font:{strike:"A line through it (@strike).",baseline:"Raised or lowered, a share of its size: superscript 0.3, subscript -0.25 (@baseline).",highlight:"The colour behind it, #RRGGBB as RGBColor gives one (a:highlight).",spacing:"Space added between letters, a Length, negative to tighten (PowerPoint's Character Spacing, a:rPr spc)."},SlideMaster:{text_styles:"Its text styles (p:txStyles): title_style, body_style, other_style, nine ListLevels each, Office's to start with."},SlideLayouts:{add:"add(name): a layout on this master."},SlideLayout:{display_master_shapes:"Whether its master's shapes are drawn on its slides, true unless set: PowerPoint's Hide Background Graphics (@showMasterSp)."},placeholders:{add:"add(PP_PLACEHOLDER.X, left?, top?, width?, height?, { name }): a placeholder on a master or a layout; a layout's without a frame takes its master's of its base type."},SlideShapes:{add_component:"add_component(name, left, top, width, height, props): a component of the presentation in a frame.",get:"get(name): a shape by its name."},TextFrame:{list_style:"Its list style (a:lstStyle): nine ListLevels, level 0 first, what its paragraphs take where they set nothing."},ListLevel:{"*":"A level of a list style: alignment, line_spacing, space_before, space_after, font, bullet (a character, or null for none), bullet_font, numbered (a:buAutoNum: arabicPeriod, alphaLcPeriod…), margin_left, indent."},text_styles:{"*":"title_style, body_style, other_style: a master's text styles, nine ListLevels each."},Animations:{"*":"A generated slide's Animation Pane: add(shape, effect, { start, direction, duration, delay, paragraph, path }), in order."},Slide:{animations:"Its Animation Pane, which python-pptx has no API for.",transition:"How it comes on from the slide before: { type, direction, duration }, which python-pptx has no API for."},Generator:{"*":"What a generator's function is given: data(path), and slides.add_slide(layout, id)."}},me={Presentation:{slides:"A deck's slides are in the slides file it names, their words in its script; slides from data are a generator's.",save:"A deck is not saved by its code: allyhub render writes its files."}},ye={Presentation:L.prototype,SlideMasters:v.prototype,SlideMaster:H.prototype,SlideLayouts:k.prototype,SlideLayout:T.prototype,Slide:w.prototype,placeholders:O.prototype,SlideShapes:M.prototype,Shape:R.prototype,TextFrame:G.prototype,_Paragraph:E.prototype,_Run:x.prototype,_Hyperlink:g.prototype,Font:y.prototype,ColorFormat:p.prototype,FillFormat:m.prototype,LineFormat:b.prototype,ShadowFormat:A.prototype,_GradientStop:P.prototype,FreeformBuilder:_.prototype,GroupShape:u.prototype,Table:I.prototype,CategoryChartData:B.prototype,XyChartData:N.prototype,XySeriesData:j.prototype,Chart:D.prototype,Plot:Y.prototype,Series:K.prototype,Point:V.prototype,DataLabels:q.prototype,Legend:X.prototype,Axis:W.prototype,TickLabels:U.prototype,MajorGridlines:Z.prototype,ChartFormat:z.prototype,_Cell:d.prototype,_Column:c.prototype,_Row:C.prototype,_Background:h.prototype},_e={Animations:l.prototype,ListLevel:S.prototype,text_styles:F.prototype,Generator:f.prototype},we=()=>{const e={};for(const[t,r]of Object.entries(ye)){const i=a[t]??{},n=me[t]??{};e[t]=s(r).filter(o=>!Object.hasOwn(i,o)&&!Object.hasOwn(n,o))}return e};export const CAPABILITIES={reference:{library:"python-pptx",version:"1.0.2",docs:"https://python-pptx.readthedocs.io/"},holds:we(),enums:Object.fromEntries(Object.entries({MSO_THEME_COLOR:ie,PP_ALIGN:ne,MSO_ANCHOR:J,MSO_AUTO_SIZE:ee,PP_PLACEHOLDER:le,MSO_SHAPE:se,MSO_CONNECTOR:te,MSO_SHAPE_TYPE:re,MSO_FILL:ae,MSO_LINE:oe,XL_CHART_TYPE:de,XL_LABEL_POSITION:pe,XL_LEGEND_POSITION:ce,MSO_ARROWHEAD:Q,MSO_ARROWHEAD_SIZE:$,THEME_FONT:he}).map(([e,t])=>[e,Object.keys(t)])),units:["Emu","Inches","Pt","Cm","Mm","Centipoints","RGBColor"],differs:["The entry is export default presentation({ slides: ./deck.yaml, script: ./deck.{locale}.yaml, size, theme }, (prs) => { … }), not Presentation(path): a deck is made by its code, never opened from a template. Its masters and layouts are made with the additions below; its slides are in the slides file it names.","A name python-pptx has that is not held throws where it is used, naming what the class holds; python-pptx's x[i] is held where it indexes (slide_masters[0], slide_layouts[0], placeholders[idx], shapes[0]), and len(x) is x.length.","A Length (what Inches(1) and Pt(12) give, and what a length reads, shape.width) is a Number of EMU with python-pptx's emu, inches, cm, mm, pt, centipoints and twips. Arithmetic on Lengths gives a plain number, as python's int does; two Lengths of one value are ===, and one is compared with a plain number by its .emu.",`An enumeration's members are PresentationML's values (MSO_THEME_COLOR.ACCENT_1 is "accent1", PP_ALIGN.CENTER "ctr"), not integers; TEXT_1 and BACKGROUND_1 are dk1 and lt1, a master's standard colour map. MSO_SHAPE_TYPE.COMPONENT is a component's. PP_PARAGRAPH_ALIGNMENT and MSO_LINE_DASH_STYLE are PP_ALIGN and MSO_LINE by python-pptx's other names.`,`A colour's rgb is "#RRGGBB": RGBColor(r, g, b), new RGBColor(r, g, b) and RGBColor.from_string("RRGGBB") make one.`,"A colour's brightness is a theme colour's: python-pptx also gives an RGB colour one, which is refused here (set rgb to the colour it makes).","line_spacing is a number of lines, or a Length of Pt(1) and over for a fixed height (python-pptx tells them apart by type).","add_picture() takes both width and height: a picture's own size is not read while a deck's code runs.","add_connector() takes MSO_CONNECTOR's STRAIGHT, ELBOW and CURVE, and also a connector's preset by name where python-pptx has none (straightConnector1, bentConnector2 to 5, curvedConnector2 to 5); a connector's adjustments (an elbow's middle) are its shape.adjustments.","begin_connect() and end_connect() take a site of the shape's own geometry, as PowerPoint numbers them (a rectangle's 0 top, 1 left, 2 bottom, 3 right; an ellipse has 8), where python-pptx places an end on those four of its box whatever its shape; a site the shape has not throws. A glued end follows its shape where the slides file or a person moves it, as PowerPoint's does.","add_movie(movie_file, left, top, width, height, { poster_frame_time }) takes a video file, its poster a moment of it in seconds, not poster_frame_image.","A shape's name is its kind and a number (textbox-1, shape-2), and a placeholder's its type's (title, body, subtitle): the slides file and the script name shapes by name.","fit_text() sets the frame to shrink its text when it is drawn (MSO_AUTO_SIZE.TEXT_TO_FIT_SHAPE) from max_size: it reads no font file.","Font.underline is a single underline or none.","Font.size refuses a size under Pt(1): a bare number is EMU, so size = 12 (python-pptx takes it) draws nothing.","A chart holds column, bar, line, area, pie, doughnut and XY scatter types; it has no 3D, no bubble, no radar and no second axis. A chart in the slides file can read its numbers from a project file: data, categories and series name it and its columns.","A Point holds format.fill alone, and its fill is its category's colour, one for every series of the chart (the slides file's category_colors), shown where the chart varies by categories; python-pptx's point is its own series'.","A table has no style, where python-pptx's starts with Medium Style 2: its look is its cells' (fill, borders, text), and first_row and the like say what its rows are and paint nothing. add_table returns its shape, whose .table is the table.","A group is its shapes: they are listed with the shapes the group is among, drawn as they are, and a group holds no group; its box is theirs, so left and top move them and width and height only read.","A presentation is 16:9 (12192000 × 6858000) and its theme Office 2013–2022's over the project's look; python-pptx's template is 4:3 with Office 2007's.","prs.slide_layouts and prs.slide_master are the first master's, as python-pptx's; a generator's add_slide also takes a layout of any master by name."],adds:{...a,...Object.fromEntries(Object.entries(_e).map(([e,t])=>[e,{...a[e]??{},names:s(t).join(", ")}]))}};
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{strictEnum as _}from"./strict.js";export const MSO_THEME_COLOR=_("MSO_THEME_COLOR",{DARK_1:"dk1",LIGHT_1:"lt1",DARK_2:"dk2",LIGHT_2:"lt2",ACCENT_1:"accent1",ACCENT_2:"accent2",ACCENT_3:"accent3",ACCENT_4:"accent4",ACCENT_5:"accent5",ACCENT_6:"accent6",HYPERLINK:"hlink",FOLLOWED_HYPERLINK:"folHlink",TEXT_1:"dk1",BACKGROUND_1:"lt1",TEXT_2:"dk2",BACKGROUND_2:"lt2"}),PP_ALIGN=_("PP_ALIGN",{LEFT:"l",CENTER:"ctr",RIGHT:"r",JUSTIFY:"just"}),MSO_ANCHOR=_("MSO_ANCHOR",{TOP:"t",MIDDLE:"ctr",BOTTOM:"b"}),MSO_AUTO_SIZE=_("MSO_AUTO_SIZE",{NONE:"none",SHAPE_TO_FIT_TEXT:"shape",TEXT_TO_FIT_SHAPE:"text"}),PP_PLACEHOLDER=_("PP_PLACEHOLDER",{TITLE:"title",CENTER_TITLE:"ctrTitle",SUBTITLE:"subTitle",BODY:"body",PICTURE:"pic",MEDIA_CLIP:"media",OBJECT:"obj",DATE:"dt",FOOTER:"ftr",SLIDE_NUMBER:"sldNum"}),MSO_SHAPE=_("MSO_SHAPE",{ACTION_BUTTON_BACK_OR_PREVIOUS:"actionButtonBackPrevious",ACTION_BUTTON_BEGINNING:"actionButtonBeginning",ACTION_BUTTON_CUSTOM:"actionButtonBlank",ACTION_BUTTON_DOCUMENT:"actionButtonDocument",ACTION_BUTTON_END:"actionButtonEnd",ACTION_BUTTON_FORWARD_OR_NEXT:"actionButtonForwardNext",ACTION_BUTTON_HELP:"actionButtonHelp",ACTION_BUTTON_HOME:"actionButtonHome",ACTION_BUTTON_INFORMATION:"actionButtonInformation",ACTION_BUTTON_MOVIE:"actionButtonMovie",ACTION_BUTTON_RETURN:"actionButtonReturn",ACTION_BUTTON_SOUND:"actionButtonSound",ARC:"arc",BALLOON:"wedgeRoundRectCallout",BENT_ARROW:"bentArrow",BENT_UP_ARROW:"bentUpArrow",BEVEL:"bevel",BLOCK_ARC:"blockArc",CAN:"can",CHART_PLUS:"chartPlus",CHART_STAR:"chartStar",CHART_X:"chartX",CHEVRON:"chevron",CHORD:"chord",CIRCULAR_ARROW:"circularArrow",CLOUD:"cloud",CLOUD_CALLOUT:"cloudCallout",CORNER:"corner",CORNER_TABS:"cornerTabs",CROSS:"plus",CUBE:"cube",CURVED_DOWN_ARROW:"curvedDownArrow",CURVED_DOWN_RIBBON:"ellipseRibbon",CURVED_LEFT_ARROW:"curvedLeftArrow",CURVED_RIGHT_ARROW:"curvedRightArrow",CURVED_UP_ARROW:"curvedUpArrow",CURVED_UP_RIBBON:"ellipseRibbon2",DECAGON:"decagon",DIAGONAL_STRIPE:"diagStripe",DIAMOND:"diamond",DODECAGON:"dodecagon",DONUT:"donut",DOUBLE_BRACE:"bracePair",DOUBLE_BRACKET:"bracketPair",DOUBLE_WAVE:"doubleWave",DOWN_ARROW:"downArrow",DOWN_ARROW_CALLOUT:"downArrowCallout",DOWN_RIBBON:"ribbon",EXPLOSION1:"irregularSeal1",EXPLOSION2:"irregularSeal2",FLOWCHART_ALTERNATE_PROCESS:"flowChartAlternateProcess",FLOWCHART_CARD:"flowChartPunchedCard",FLOWCHART_COLLATE:"flowChartCollate",FLOWCHART_CONNECTOR:"flowChartConnector",FLOWCHART_DATA:"flowChartInputOutput",FLOWCHART_DECISION:"flowChartDecision",FLOWCHART_DELAY:"flowChartDelay",FLOWCHART_DIRECT_ACCESS_STORAGE:"flowChartMagneticDrum",FLOWCHART_DISPLAY:"flowChartDisplay",FLOWCHART_DOCUMENT:"flowChartDocument",FLOWCHART_EXTRACT:"flowChartExtract",FLOWCHART_INTERNAL_STORAGE:"flowChartInternalStorage",FLOWCHART_MAGNETIC_DISK:"flowChartMagneticDisk",FLOWCHART_MANUAL_INPUT:"flowChartManualInput",FLOWCHART_MANUAL_OPERATION:"flowChartManualOperation",FLOWCHART_MERGE:"flowChartMerge",FLOWCHART_MULTIDOCUMENT:"flowChartMultidocument",FLOWCHART_OFFLINE_STORAGE:"flowChartOfflineStorage",FLOWCHART_OFFPAGE_CONNECTOR:"flowChartOffpageConnector",FLOWCHART_OR:"flowChartOr",FLOWCHART_PREDEFINED_PROCESS:"flowChartPredefinedProcess",FLOWCHART_PREPARATION:"flowChartPreparation",FLOWCHART_PROCESS:"flowChartProcess",FLOWCHART_PUNCHED_TAPE:"flowChartPunchedTape",FLOWCHART_SEQUENTIAL_ACCESS_STORAGE:"flowChartMagneticTape",FLOWCHART_SORT:"flowChartSort",FLOWCHART_STORED_DATA:"flowChartOnlineStorage",FLOWCHART_SUMMING_JUNCTION:"flowChartSummingJunction",FLOWCHART_TERMINATOR:"flowChartTerminator",FOLDED_CORNER:"foldedCorner",FRAME:"frame",FUNNEL:"funnel",GEAR_6:"gear6",GEAR_9:"gear9",HALF_FRAME:"halfFrame",HEART:"heart",HEPTAGON:"heptagon",HEXAGON:"hexagon",HORIZONTAL_SCROLL:"horizontalScroll",ISOSCELES_TRIANGLE:"triangle",LEFT_ARROW:"leftArrow",LEFT_ARROW_CALLOUT:"leftArrowCallout",LEFT_BRACE:"leftBrace",LEFT_BRACKET:"leftBracket",LEFT_CIRCULAR_ARROW:"leftCircularArrow",LEFT_RIGHT_ARROW:"leftRightArrow",LEFT_RIGHT_ARROW_CALLOUT:"leftRightArrowCallout",LEFT_RIGHT_CIRCULAR_ARROW:"leftRightCircularArrow",LEFT_RIGHT_RIBBON:"leftRightRibbon",LEFT_RIGHT_UP_ARROW:"leftRightUpArrow",LEFT_UP_ARROW:"leftUpArrow",LIGHTNING_BOLT:"lightningBolt",LINE_CALLOUT_1:"borderCallout1",LINE_CALLOUT_1_ACCENT_BAR:"accentCallout1",LINE_CALLOUT_1_BORDER_AND_ACCENT_BAR:"accentBorderCallout1",LINE_CALLOUT_1_NO_BORDER:"callout1",LINE_CALLOUT_2:"borderCallout2",LINE_CALLOUT_2_ACCENT_BAR:"accentCallout2",LINE_CALLOUT_2_BORDER_AND_ACCENT_BAR:"accentBorderCallout2",LINE_CALLOUT_2_NO_BORDER:"callout2",LINE_CALLOUT_3:"borderCallout3",LINE_CALLOUT_3_ACCENT_BAR:"accentCallout3",LINE_CALLOUT_3_BORDER_AND_ACCENT_BAR:"accentBorderCallout3",LINE_CALLOUT_3_NO_BORDER:"callout3",LINE_CALLOUT_4:"borderCallout3",LINE_CALLOUT_4_ACCENT_BAR:"accentCallout3",LINE_CALLOUT_4_BORDER_AND_ACCENT_BAR:"accentBorderCallout3",LINE_CALLOUT_4_NO_BORDER:"callout3",LINE_INVERSE:"lineInv",MATH_DIVIDE:"mathDivide",MATH_EQUAL:"mathEqual",MATH_MINUS:"mathMinus",MATH_MULTIPLY:"mathMultiply",MATH_NOT_EQUAL:"mathNotEqual",MATH_PLUS:"mathPlus",MOON:"moon",NON_ISOSCELES_TRAPEZOID:"nonIsoscelesTrapezoid",NOTCHED_RIGHT_ARROW:"notchedRightArrow",NO_SYMBOL:"noSmoking",OCTAGON:"octagon",OVAL:"ellipse",OVAL_CALLOUT:"wedgeEllipseCallout",PARALLELOGRAM:"parallelogram",PENTAGON:"homePlate",PIE:"pie",PIE_WEDGE:"pieWedge",PLAQUE:"plaque",PLAQUE_TABS:"plaqueTabs",QUAD_ARROW:"quadArrow",QUAD_ARROW_CALLOUT:"quadArrowCallout",RECTANGLE:"rect",RECTANGULAR_CALLOUT:"wedgeRectCallout",REGULAR_PENTAGON:"pentagon",RIGHT_ARROW:"rightArrow",RIGHT_ARROW_CALLOUT:"rightArrowCallout",RIGHT_BRACE:"rightBrace",RIGHT_BRACKET:"rightBracket",RIGHT_TRIANGLE:"rtTriangle",ROUNDED_RECTANGLE:"roundRect",ROUNDED_RECTANGULAR_CALLOUT:"wedgeRoundRectCallout",ROUND_1_RECTANGLE:"round1Rect",ROUND_2_DIAG_RECTANGLE:"round2DiagRect",ROUND_2_SAME_RECTANGLE:"round2SameRect",SMILEY_FACE:"smileyFace",SNIP_1_RECTANGLE:"snip1Rect",SNIP_2_DIAG_RECTANGLE:"snip2DiagRect",SNIP_2_SAME_RECTANGLE:"snip2SameRect",SNIP_ROUND_RECTANGLE:"snipRoundRect",SQUARE_TABS:"squareTabs",STAR_10_POINT:"star10",STAR_12_POINT:"star12",STAR_16_POINT:"star16",STAR_24_POINT:"star24",STAR_32_POINT:"star32",STAR_4_POINT:"star4",STAR_5_POINT:"star5",STAR_6_POINT:"star6",STAR_7_POINT:"star7",STAR_8_POINT:"star8",STRIPED_RIGHT_ARROW:"stripedRightArrow",SUN:"sun",SWOOSH_ARROW:"swooshArrow",TEAR:"teardrop",TRAPEZOID:"trapezoid",UP_ARROW:"upArrow",UP_ARROW_CALLOUT:"upArrowCallout",UP_DOWN_ARROW:"upDownArrow",UP_DOWN_ARROW_CALLOUT:"upDownArrowCallout",UP_RIBBON:"ribbon2",U_TURN_ARROW:"uturnArrow",VERTICAL_SCROLL:"verticalScroll",WAVE:"wave"}),MSO_CONNECTOR=_("MSO_CONNECTOR",{STRAIGHT:"line",ELBOW:"bentConnector3",CURVE:"curvedConnector3"}),MSO_LINE=_("MSO_LINE",{SOLID:"solid",SQUARE_DOT:"sysDash",ROUND_DOT:"sysDot",DASH:"dash",DASH_DOT:"dashDot",DASH_DOT_DOT:"lgDashDotDot",LONG_DASH:"lgDash",LONG_DASH_DOT:"lgDashDot"}),MSO_ARROWHEAD=_("MSO_ARROWHEAD",{NONE:"none",TRIANGLE:"triangle",OPEN:"arrow",STEALTH:"stealth",DIAMOND:"diamond",OVAL:"oval"}),MSO_SHAPE_TYPE=_("MSO_SHAPE_TYPE",{AUTO_SHAPE:"autoshape",FREEFORM:"freeform",GROUP:"group",LINE:"line",TABLE:"table",CHART:"chart",MEDIA:"movie",PICTURE:"picture",PLACEHOLDER:"placeholder",TEXT_BOX:"textbox",COMPONENT:"component"}),XL_CHART_TYPE=_("XL_CHART_TYPE",{COLUMN_CLUSTERED:"column-clustered",COLUMN_STACKED:"column-stacked",COLUMN_STACKED_100:"column-stacked-100",BAR_CLUSTERED:"bar-clustered",BAR_STACKED:"bar-stacked",BAR_STACKED_100:"bar-stacked-100",LINE:"line",LINE_MARKERS:"line-markers",AREA:"area",AREA_STACKED:"area-stacked",AREA_STACKED_100:"area-stacked-100",PIE:"pie",DOUGHNUT:"doughnut",XY_SCATTER:"scatter",XY_SCATTER_LINES:"scatter-lines",XY_SCATTER_SMOOTH:"scatter-smooth"}),XL_LEGEND_POSITION=_("XL_LEGEND_POSITION",{BOTTOM:"bottom",TOP:"top",LEFT:"left",RIGHT:"right"}),XL_LABEL_POSITION=_("XL_LABEL_POSITION",{ABOVE:"t",BELOW:"b",BEST_FIT:"bestFit",CENTER:"ctr",INSIDE_BASE:"inBase",INSIDE_END:"inEnd",LEFT:"l",OUTSIDE_END:"outEnd",RIGHT:"r"}),MSO_FILL=_("MSO_FILL",{SOLID:"solid",BACKGROUND:"background",GRADIENT:"gradient"}),THEME_FONT=_("THEME_FONT",{MAJOR:"+mj-lt",MINOR:"+mn-lt"});
2
+ import{strictEnum as _}from"./strict.js";export const MSO_THEME_COLOR=_("MSO_THEME_COLOR",{DARK_1:"dk1",LIGHT_1:"lt1",DARK_2:"dk2",LIGHT_2:"lt2",ACCENT_1:"accent1",ACCENT_2:"accent2",ACCENT_3:"accent3",ACCENT_4:"accent4",ACCENT_5:"accent5",ACCENT_6:"accent6",HYPERLINK:"hlink",FOLLOWED_HYPERLINK:"folHlink",TEXT_1:"dk1",BACKGROUND_1:"lt1",TEXT_2:"dk2",BACKGROUND_2:"lt2"}),PP_ALIGN=_("PP_ALIGN",{LEFT:"l",CENTER:"ctr",RIGHT:"r",JUSTIFY:"just"}),PP_PARAGRAPH_ALIGNMENT=PP_ALIGN,MSO_ANCHOR=_("MSO_ANCHOR",{TOP:"t",MIDDLE:"ctr",BOTTOM:"b"}),MSO_AUTO_SIZE=_("MSO_AUTO_SIZE",{NONE:"none",SHAPE_TO_FIT_TEXT:"shape",TEXT_TO_FIT_SHAPE:"text"}),PP_PLACEHOLDER=_("PP_PLACEHOLDER",{TITLE:"title",CENTER_TITLE:"ctrTitle",SUBTITLE:"subTitle",BODY:"body",PICTURE:"pic",MEDIA_CLIP:"media",OBJECT:"obj",DATE:"dt",FOOTER:"ftr",SLIDE_NUMBER:"sldNum"}),MSO_SHAPE=_("MSO_SHAPE",{ACTION_BUTTON_BACK_OR_PREVIOUS:"actionButtonBackPrevious",ACTION_BUTTON_BEGINNING:"actionButtonBeginning",ACTION_BUTTON_CUSTOM:"actionButtonBlank",ACTION_BUTTON_DOCUMENT:"actionButtonDocument",ACTION_BUTTON_END:"actionButtonEnd",ACTION_BUTTON_FORWARD_OR_NEXT:"actionButtonForwardNext",ACTION_BUTTON_HELP:"actionButtonHelp",ACTION_BUTTON_HOME:"actionButtonHome",ACTION_BUTTON_INFORMATION:"actionButtonInformation",ACTION_BUTTON_MOVIE:"actionButtonMovie",ACTION_BUTTON_RETURN:"actionButtonReturn",ACTION_BUTTON_SOUND:"actionButtonSound",ARC:"arc",BALLOON:"wedgeRoundRectCallout",BENT_ARROW:"bentArrow",BENT_UP_ARROW:"bentUpArrow",BEVEL:"bevel",BLOCK_ARC:"blockArc",CAN:"can",CHART_PLUS:"chartPlus",CHART_STAR:"chartStar",CHART_X:"chartX",CHEVRON:"chevron",CHORD:"chord",CIRCULAR_ARROW:"circularArrow",CLOUD:"cloud",CLOUD_CALLOUT:"cloudCallout",CORNER:"corner",CORNER_TABS:"cornerTabs",CROSS:"plus",CUBE:"cube",CURVED_DOWN_ARROW:"curvedDownArrow",CURVED_DOWN_RIBBON:"ellipseRibbon",CURVED_LEFT_ARROW:"curvedLeftArrow",CURVED_RIGHT_ARROW:"curvedRightArrow",CURVED_UP_ARROW:"curvedUpArrow",CURVED_UP_RIBBON:"ellipseRibbon2",DECAGON:"decagon",DIAGONAL_STRIPE:"diagStripe",DIAMOND:"diamond",DODECAGON:"dodecagon",DONUT:"donut",DOUBLE_BRACE:"bracePair",DOUBLE_BRACKET:"bracketPair",DOUBLE_WAVE:"doubleWave",DOWN_ARROW:"downArrow",DOWN_ARROW_CALLOUT:"downArrowCallout",DOWN_RIBBON:"ribbon",EXPLOSION1:"irregularSeal1",EXPLOSION2:"irregularSeal2",FLOWCHART_ALTERNATE_PROCESS:"flowChartAlternateProcess",FLOWCHART_CARD:"flowChartPunchedCard",FLOWCHART_COLLATE:"flowChartCollate",FLOWCHART_CONNECTOR:"flowChartConnector",FLOWCHART_DATA:"flowChartInputOutput",FLOWCHART_DECISION:"flowChartDecision",FLOWCHART_DELAY:"flowChartDelay",FLOWCHART_DIRECT_ACCESS_STORAGE:"flowChartMagneticDrum",FLOWCHART_DISPLAY:"flowChartDisplay",FLOWCHART_DOCUMENT:"flowChartDocument",FLOWCHART_EXTRACT:"flowChartExtract",FLOWCHART_INTERNAL_STORAGE:"flowChartInternalStorage",FLOWCHART_MAGNETIC_DISK:"flowChartMagneticDisk",FLOWCHART_MANUAL_INPUT:"flowChartManualInput",FLOWCHART_MANUAL_OPERATION:"flowChartManualOperation",FLOWCHART_MERGE:"flowChartMerge",FLOWCHART_MULTIDOCUMENT:"flowChartMultidocument",FLOWCHART_OFFLINE_STORAGE:"flowChartOfflineStorage",FLOWCHART_OFFPAGE_CONNECTOR:"flowChartOffpageConnector",FLOWCHART_OR:"flowChartOr",FLOWCHART_PREDEFINED_PROCESS:"flowChartPredefinedProcess",FLOWCHART_PREPARATION:"flowChartPreparation",FLOWCHART_PROCESS:"flowChartProcess",FLOWCHART_PUNCHED_TAPE:"flowChartPunchedTape",FLOWCHART_SEQUENTIAL_ACCESS_STORAGE:"flowChartMagneticTape",FLOWCHART_SORT:"flowChartSort",FLOWCHART_STORED_DATA:"flowChartOnlineStorage",FLOWCHART_SUMMING_JUNCTION:"flowChartSummingJunction",FLOWCHART_TERMINATOR:"flowChartTerminator",FOLDED_CORNER:"foldedCorner",FRAME:"frame",FUNNEL:"funnel",GEAR_6:"gear6",GEAR_9:"gear9",HALF_FRAME:"halfFrame",HEART:"heart",HEPTAGON:"heptagon",HEXAGON:"hexagon",HORIZONTAL_SCROLL:"horizontalScroll",ISOSCELES_TRIANGLE:"triangle",LEFT_ARROW:"leftArrow",LEFT_ARROW_CALLOUT:"leftArrowCallout",LEFT_BRACE:"leftBrace",LEFT_BRACKET:"leftBracket",LEFT_CIRCULAR_ARROW:"leftCircularArrow",LEFT_RIGHT_ARROW:"leftRightArrow",LEFT_RIGHT_ARROW_CALLOUT:"leftRightArrowCallout",LEFT_RIGHT_CIRCULAR_ARROW:"leftRightCircularArrow",LEFT_RIGHT_RIBBON:"leftRightRibbon",LEFT_RIGHT_UP_ARROW:"leftRightUpArrow",LEFT_UP_ARROW:"leftUpArrow",LIGHTNING_BOLT:"lightningBolt",LINE_CALLOUT_1:"borderCallout1",LINE_CALLOUT_1_ACCENT_BAR:"accentCallout1",LINE_CALLOUT_1_BORDER_AND_ACCENT_BAR:"accentBorderCallout1",LINE_CALLOUT_1_NO_BORDER:"callout1",LINE_CALLOUT_2:"borderCallout2",LINE_CALLOUT_2_ACCENT_BAR:"accentCallout2",LINE_CALLOUT_2_BORDER_AND_ACCENT_BAR:"accentBorderCallout2",LINE_CALLOUT_2_NO_BORDER:"callout2",LINE_CALLOUT_3:"borderCallout3",LINE_CALLOUT_3_ACCENT_BAR:"accentCallout3",LINE_CALLOUT_3_BORDER_AND_ACCENT_BAR:"accentBorderCallout3",LINE_CALLOUT_3_NO_BORDER:"callout3",LINE_CALLOUT_4:"borderCallout3",LINE_CALLOUT_4_ACCENT_BAR:"accentCallout3",LINE_CALLOUT_4_BORDER_AND_ACCENT_BAR:"accentBorderCallout3",LINE_CALLOUT_4_NO_BORDER:"callout3",LINE_INVERSE:"lineInv",MATH_DIVIDE:"mathDivide",MATH_EQUAL:"mathEqual",MATH_MINUS:"mathMinus",MATH_MULTIPLY:"mathMultiply",MATH_NOT_EQUAL:"mathNotEqual",MATH_PLUS:"mathPlus",MOON:"moon",NON_ISOSCELES_TRAPEZOID:"nonIsoscelesTrapezoid",NOTCHED_RIGHT_ARROW:"notchedRightArrow",NO_SYMBOL:"noSmoking",OCTAGON:"octagon",OVAL:"ellipse",OVAL_CALLOUT:"wedgeEllipseCallout",PARALLELOGRAM:"parallelogram",PENTAGON:"homePlate",PIE:"pie",PIE_WEDGE:"pieWedge",PLAQUE:"plaque",PLAQUE_TABS:"plaqueTabs",QUAD_ARROW:"quadArrow",QUAD_ARROW_CALLOUT:"quadArrowCallout",RECTANGLE:"rect",RECTANGULAR_CALLOUT:"wedgeRectCallout",REGULAR_PENTAGON:"pentagon",RIGHT_ARROW:"rightArrow",RIGHT_ARROW_CALLOUT:"rightArrowCallout",RIGHT_BRACE:"rightBrace",RIGHT_BRACKET:"rightBracket",RIGHT_TRIANGLE:"rtTriangle",ROUNDED_RECTANGLE:"roundRect",ROUNDED_RECTANGULAR_CALLOUT:"wedgeRoundRectCallout",ROUND_1_RECTANGLE:"round1Rect",ROUND_2_DIAG_RECTANGLE:"round2DiagRect",ROUND_2_SAME_RECTANGLE:"round2SameRect",SMILEY_FACE:"smileyFace",SNIP_1_RECTANGLE:"snip1Rect",SNIP_2_DIAG_RECTANGLE:"snip2DiagRect",SNIP_2_SAME_RECTANGLE:"snip2SameRect",SNIP_ROUND_RECTANGLE:"snipRoundRect",SQUARE_TABS:"squareTabs",STAR_10_POINT:"star10",STAR_12_POINT:"star12",STAR_16_POINT:"star16",STAR_24_POINT:"star24",STAR_32_POINT:"star32",STAR_4_POINT:"star4",STAR_5_POINT:"star5",STAR_6_POINT:"star6",STAR_7_POINT:"star7",STAR_8_POINT:"star8",STRIPED_RIGHT_ARROW:"stripedRightArrow",SUN:"sun",SWOOSH_ARROW:"swooshArrow",TEAR:"teardrop",TRAPEZOID:"trapezoid",UP_ARROW:"upArrow",UP_ARROW_CALLOUT:"upArrowCallout",UP_DOWN_ARROW:"upDownArrow",UP_DOWN_ARROW_CALLOUT:"upDownArrowCallout",UP_RIBBON:"ribbon2",U_TURN_ARROW:"uturnArrow",VERTICAL_SCROLL:"verticalScroll",WAVE:"wave"}),MSO_CONNECTOR=_("MSO_CONNECTOR",{STRAIGHT:"line",ELBOW:"bentConnector3",CURVE:"curvedConnector3"}),MSO_LINE=_("MSO_LINE",{SOLID:"solid",SQUARE_DOT:"sysDash",ROUND_DOT:"sysDot",DASH:"dash",DASH_DOT:"dashDot",DASH_DOT_DOT:"lgDashDotDot",LONG_DASH:"lgDash",LONG_DASH_DOT:"lgDashDot"}),MSO_LINE_DASH_STYLE=MSO_LINE,MSO_ARROWHEAD=_("MSO_ARROWHEAD",{NONE:"none",TRIANGLE:"triangle",OPEN:"arrow",STEALTH:"stealth",DIAMOND:"diamond",OVAL:"oval"}),MSO_ARROWHEAD_SIZE=_("MSO_ARROWHEAD_SIZE",{SMALL:"sm",MEDIUM:"med",LARGE:"lg"}),MSO_SHAPE_TYPE=_("MSO_SHAPE_TYPE",{AUTO_SHAPE:"autoshape",FREEFORM:"freeform",GROUP:"group",LINE:"line",TABLE:"table",CHART:"chart",MEDIA:"movie",PICTURE:"picture",PLACEHOLDER:"placeholder",TEXT_BOX:"textbox",COMPONENT:"component"}),XL_CHART_TYPE=_("XL_CHART_TYPE",{COLUMN_CLUSTERED:"column-clustered",COLUMN_STACKED:"column-stacked",COLUMN_STACKED_100:"column-stacked-100",BAR_CLUSTERED:"bar-clustered",BAR_STACKED:"bar-stacked",BAR_STACKED_100:"bar-stacked-100",LINE:"line",LINE_MARKERS:"line-markers",AREA:"area",AREA_STACKED:"area-stacked",AREA_STACKED_100:"area-stacked-100",PIE:"pie",DOUGHNUT:"doughnut",XY_SCATTER:"scatter",XY_SCATTER_LINES:"scatter-lines",XY_SCATTER_SMOOTH:"scatter-smooth"}),XL_LEGEND_POSITION=_("XL_LEGEND_POSITION",{BOTTOM:"bottom",TOP:"top",LEFT:"left",RIGHT:"right"}),XL_LABEL_POSITION=_("XL_LABEL_POSITION",{ABOVE:"t",BELOW:"b",BEST_FIT:"bestFit",CENTER:"ctr",INSIDE_BASE:"inBase",INSIDE_END:"inEnd",LEFT:"l",OUTSIDE_END:"outEnd",RIGHT:"r"}),MSO_FILL=_("MSO_FILL",{SOLID:"solid",BACKGROUND:"background",GRADIENT:"gradient"}),THEME_FONT=_("THEME_FONT",{MAJOR:"+mj-lt",MINOR:"+mn-lt"});
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{READ_DEFAULTS as W,phoneScale as X}from"@allyhub/piece";import{deckFact as m}from"./fact.js";import{STANDARD_FONTS as Y}from"./theme.js";export const DECK_FACT_DEFAULTS={within:8,aligned:.5,drift:1,phone:W.phone,slack:1};const E=e=>e[0]+e[2],$=e=>e[1]+e[3],F=e=>Math.max(0,e[2])*Math.max(0,e[3]),w=(e,h=2)=>{const d=10**h;return Math.round(e*d)/d};function N(e,h,d){const M=[],a=(r,k)=>{k>d&&M.push({side:r,px:k})};return a("left",h[0]-e[0]),a("top",h[1]-e[1]),a("right",E(e)-E(h)),a("bottom",$(e)-$(h)),M}const R=(e,h)=>{const d=Math.max(e[0],h[0]),M=Math.max(e[1],h[1]);return[d,M,Math.min(E(e),E(h))-d,Math.min($(e),$(h))-M]},Z=(e,h,d)=>e[0]>=h[0]-d&&e[1]>=h[1]-d&&E(e)<=E(h)+d&&$(e)<=$(h)+d,O={left:e=>e[0],right:E,"centre-x":e=>e[0]+e[2]/2,top:e=>e[1],bottom:$,"centre-y":e=>e[1]+e[3]/2},A=e=>e.opaque||!e.text?.glyphs?e.box:e.text.glyphs,ee=new Set(Object.keys(O)),se=new Set(["left","right","top","bottom"]);function Q(e){if(e.opaque)return ee;if(!e.text?.glyphs)return se;const h=e.text.align??"l";return new Set([h==="ctr"?"centre-x":h==="r"?"right":"left"])}const te=(e,h)=>h.some(d=>new RegExp(`^${d.split("*").map(M=>M.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")).join(".*")}$`,"su").test(e)),ne=e=>e.box[2]>0||e.box[3]>0;export function deckFacts(e,h,d,M={}){const a={...DECK_FACT_DEFAULTS,...M},r=s=>w(s/e.pxPerPt),k=s=>[r(s[0]),r(s[1]),r(s[2]),r(s[3])],q=s=>s.map(n=>({side:n.side,pt:w(n.px/e.pxPerPt,1)})),H=s=>w(s,3),B=s=>s.opaque||!s.text?.glyphs?"frame":"glyphs",T=(s,n,x)=>n==="left"||n==="right"||n==="centre-x"?{shape:s.name,x:w(r(s.frame[0])+x)}:{shape:s.name,y:w(r(s.frame[1])+x)},g=[],D=[0,0,h.width,h.height],_=new Map,j=new Map,I=new Map;for(const s of e.slides){const n={...d,part:s.slide,t:s.t},x=j.get(s.slide)??{at:n,total:s.steps??1,measured:0,shapes:new Map};j.set(s.slide,x),x.measured++;for(const c of s.shapes){if(c.level!=="slide")continue;const t=x.shapes.get(c.name)??{hidden:0,by:[]};c.hidden===!0&&t.hidden++,x.shapes.set(c.name,t)}const b=s.shapes.filter(c=>ne(c)&&c.hidden!==!0&&(a.levels===void 0||a.levels.includes(c.level))&&!te(c.name,a.except??[]));let L=0,J=0,K=0;for(const[c,t]of b.entries()){t.chart&&g.push(m("chart-data",n,{shape:t.name,...t.chart}));const p=(t.rows??[]).flatMap((l,u)=>l.drawn>l.set+a.slack?[{row:u,set:r(l.set),drawn:r(l.drawn)}]:[]);p.length>0&&g.push(m("table-grown",n,{shape:t.name,set:r(t.frame[3]),drawn:r(t.box[3]),rows:p}));const o=t.text;if(o?.glyphs){K++,L+=o.words,J+=o.lines.length;const l=N(o.glyphs,t.box,a.slack);l.length>0&&g.push(m("text-overflow",n,{shape:t.name,text:o.text,box:k(t.box),glyphs:k(o.glyphs),edges:q(l),lines:o.lines.length,past:o.lines.filter(i=>N(i,t.box,a.slack).length>0).length,...o.scale===void 0?{}:{scale:o.scale}}));const u=N(o.glyphs,D,a.slack);if(u.length>0){const i=F(o.glyphs);g.push(m("text-off-slide",n,{shape:t.name,text:o.text,glyphs:k(o.glyphs),edges:q(u),share:i>0?H(1-F(R(o.glyphs,D))/i):1}))}for(const i of o.type){const v=`${String(i.size)}/${String(i.weight)}`,z=_.get(v)??{size:i.size,weight:i.weight,slides:new Set,shapes:new Set};z.slides.add(s.slide),z.shapes.add(`${s.slide}/${t.name}`),_.set(v,z)}const f=o.type.reduce((i,v)=>i===void 0||v.size<i.size?v:i,void 0);if(f){const i=a.room,v=f.xHeight===void 0?"em":"x",z=i&&(f.xHeight??f.size)*(i.screen*1e3/(h.width/e.pxPerPt));g.push(m("read-size",n,{shape:t.name,text:o.text,size:f.size,...f.xHeight===void 0?{}:{xHeight:f.xHeight},...i&&z!==void 0?{screen:{by:v,mm:w(z,1),arcmin:w(Math.atan(z/1e3/i.distance)*180*60/Math.PI,1)}}:{},phone:w(f.size*e.pxPerPt*X([h.width,h.height],a.phone),1),options:{...i?{room:{...i}}:{},phone:[...a.phone]}}))}}const S=N(t.box,D,a.slack);if(S.length>0){const l=F(t.box);g.push(m("shape-off-slide",n,{shape:t.name,box:k(t.box),edges:q(S),share:l>0?H(1-F(R(t.box,D))/l):1}))}if(t.picture){const[l,u]=t.picture.shown;if(l>0&&u>0){const f=Math.max(t.box[2]/l,t.box[3]/u),i=v=>v/e.pxPerPt/72;g.push(m("picture-resolution",n,{shape:t.name,source:t.picture.source,shown:t.picture.shown,box:k(t.box),scale:w(f),ppi:Math.round(Math.min(l/i(t.box[2]),u/i(t.box[3]))),stretch:w(t.box[2]/l/(t.box[3]/u)-1)}))}}const P=b.slice(c+1).find(l=>l.opaque&&Z(t.box,l.box,a.slack)),y=x.shapes.get(t.name);if(y?y.by.push(P?.name):P&&g.push(m("shape-hidden",n,{shape:t.name,by:P.name})),t.level==="slide"){const l=`${s.layout}\0${t.name}`,u=I.get(l)??new Map,f=[r(t.frame[0]),r(t.frame[1]),r(t.frame[2]),r(t.frame[3])],i=[...u.values()].find(v=>v.frame.every((z,V)=>Math.abs(z-(f[V]??0))<=a.drift));i?i.slides.includes(s.slide)||i.slides.push(s.slide):u.set(f.join(","),{frame:f,slides:[s.slide]}),I.set(l,u)}}for(let c=0;c<b.length;c++)for(let t=c+1;t<b.length;t++){const p=b[c],o=b[t];if(!p||!o)continue;const S=p.level==="slide"||o.level==="slide",P=R(A(p),A(o));if(S&&p.level==="slide"&&o.level==="slide"&&P[2]>a.slack&&P[3]>a.slack){const y=F(P);g.push(m("shape-overlap",n,{a:p.name,b:o.name,area:w(y/e.pxPerPt**2,1),share:H(y/Math.max(1,Math.min(F(A(p)),F(A(o)))))}))}if(S)for(const[y,l]of Object.entries(O)){if(!Q(p).has(y)||!Q(o).has(y))continue;const u=r(l(A(p))),f=r(l(A(o))),i=Math.abs(u-f);i>a.aligned&&i<=a.within&&g.push(m("near-alignment",n,{a:p.name,b:o.name,line:y,gap:w(i),at:{a:u,b:f},by:{a:B(p),b:B(o)},align:p.level==="slide"?T(p,y,f-u):T(o,y,u-f),options:{within:a.within,aligned:a.aligned}}))}}for(const c of b)if(!(c.level!=="slide"||!c.opaque))for(const t of["centre-x","centre-y"]){const p=r(O[t](c.box)),o=r(O[t](D)),S=Math.abs(p-o);S>a.aligned&&S<=a.within&&g.push(m("near-alignment",n,{a:c.name,b:"slide",line:t,gap:w(S),at:{a:p,b:o},by:{a:"frame",b:"frame"},align:T(c,t,o-p),options:{within:a.within,aligned:a.aligned}}))}g.push(m("words-on-slide",n,{words:L,lines:J,texts:K}))}for(const[s,n]of I){if(n.size<2)continue;const[x="",b=""]=s.split("\0");g.push(m("placement-drift",d,{layout:x,shape:b,places:[...n.values()],options:{drift:a.drift}}))}if(e.fonts&&e.fonts.length>0){const s=new Set(M.standard??Y);g.push(m("deck-fonts",d,{fonts:e.fonts.map(n=>({...n,standard:s.has(n.name)})),options:{standard:[...s]}}))}const C=[..._.values()].map(s=>({size:s.size,weight:s.weight,slides:s.slides.size,shapes:s.shapes.size})).sort((s,n)=>s.size-n.size||s.weight-n.weight),U=C[0];U&&g.push(m("type-in-use",d,{type:C,smallest:U.size}));for(const s of j.values())for(const[n,x]of s.shapes){const[b]=x.by;b!==void 0&&x.by.every(L=>L!==void 0)&&g.push(m("shape-hidden",s.at,{shape:n,by:b})),s.measured>=s.total&&x.hidden===s.measured&&g.push(m("shape-hidden",s.at,{shape:n,never:!0}))}const G=new Set;return g.filter(s=>{const n=JSON.stringify([s.kind,s.part,s.data]);return G.has(n)?!1:(G.add(n),!0)})}
2
+ import{READ_DEFAULTS as Y,phoneScale as Z}from"@allyhub/piece";import{deckFact as m}from"./fact.js";import{STANDARD_FONTS as ee}from"./theme.js";export const DECK_FACT_DEFAULTS={within:8,aligned:.5,drift:1,phone:Y.phone,slack:1};const k=e=>e[0]+e[2],P=e=>e[1]+e[3],F=e=>Math.max(0,e[2])*Math.max(0,e[3]),M=(e,n=2)=>{const c=10**n;return Math.round(e*c)/c};function te(e,n){const[c,x]=e;if(c>=n[0]&&c<=k(n)&&x>=n[1]&&x<=P(n))return Math.min(c-n[0],k(n)-c,x-n[1],P(n)-x);const r=Math.max(n[0]-c,0,c-k(n)),z=Math.max(n[1]-x,0,x-P(n));return Math.hypot(r,z)}function O(e,n,c){const x=[],h=(r,z)=>{z>c&&x.push({side:r,px:z})};return h("left",n[0]-e[0]),h("top",n[1]-e[1]),h("right",k(e)-k(n)),h("bottom",P(e)-P(n)),x}const B=(e,n)=>{const c=Math.max(e[0],n[0]),x=Math.max(e[1],n[1]);return[c,x,Math.min(k(e),k(n))-c,Math.min(P(e),P(n))-x]},se=(e,n,c)=>e[0]>=n[0]-c&&e[1]>=n[1]-c&&k(e)<=k(n)+c&&P(e)<=P(n)+c,_={left:e=>e[0],right:k,"centre-x":e=>e[0]+e[2]/2,top:e=>e[1],bottom:P,"centre-y":e=>e[1]+e[3]/2},L=e=>e.opaque||!e.text?.glyphs?e.box:e.text.glyphs,ne=new Set(Object.keys(_)),oe=new Set,C=e=>e.kind==="line"||e.ends!==void 0,ie=new Set(["left","right","top","bottom"]);function W(e){if(C(e))return oe;if(e.opaque)return ne;if(!e.text?.glyphs)return ie;const n=e.text.align??"l";return new Set([n==="ctr"?"centre-x":n==="r"?"right":"left"])}const ae=(e,n)=>n.some(c=>new RegExp(`^${c.split("*").map(x=>x.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")).join(".*")}$`,"su").test(e)),he=e=>e.box[2]>0||e.box[3]>0;export function deckFacts(e,n,c,x={}){const h={...DECK_FACT_DEFAULTS,...x},r=s=>M(s/e.pxPerPt),z=s=>[r(s[0]),r(s[1]),r(s[2]),r(s[3])],q=s=>s.map(i=>({side:i.side,pt:M(i.px/e.pxPerPt,1)})),H=s=>M(s,3),U=s=>s.opaque||!s.text?.glyphs?"frame":"glyphs",T=(s,i,w)=>i==="left"||i==="right"||i==="centre-x"?{shape:s.name,x:M(r(s.frame[0])+w)}:{shape:s.name,y:M(r(s.frame[1])+w)},f=[],N=[0,0,n.width,n.height],j=new Map,I=new Map,R=new Map;for(const s of e.slides){const i={...c,part:s.slide,t:s.t},w=I.get(s.slide)??{at:i,total:s.steps??1,measured:0,shapes:new Map};I.set(s.slide,w),w.measured++;for(const d of s.shapes){if(d.level!=="slide")continue;const t=w.shapes.get(d.name)??{hidden:0,by:[]};d.hidden===!0&&t.hidden++,w.shapes.set(d.name,t)}const y=s.shapes.filter(d=>he(d)&&d.hidden!==!0&&(h.levels===void 0||h.levels.includes(d.level))&&!ae(d.name,h.except??[]));let A=0,Q=0,V=0;const X=y.filter(d=>d.ends===void 0);for(const d of y)d.ends&&f.push(m("line-ends",i,{shape:d.name,ends:d.ends.map(t=>{let l;for(const o of X){const v=te(t.at,o.box);(!l||v<l.by)&&(l={name:o.name,by:v})}return{at:[r(t.at[0]),r(t.at[1])],head:t.head,...t.glued===void 0?{}:{glued:t.glued},...l?{near:l.name,by:r(l.by)}:{}}})}));for(const[d,t]of y.entries()){t.chart&&f.push(m("chart-data",i,{shape:t.name,...t.chart}));const l=(t.rows??[]).flatMap((a,g)=>a.drawn>a.set+h.slack?[{row:g,set:r(a.set),drawn:r(a.drawn)}]:[]);l.length>0&&f.push(m("table-grown",i,{shape:t.name,set:r(t.frame[3]),drawn:r(t.box[3]),rows:l}));const o=t.text;if(o?.glyphs){V++,A+=o.words,Q+=o.lines.length;const a=o.own??{box:t.box,glyphs:o.glyphs,lines:o.lines},g=a.glyphs?O(a.glyphs,a.box,h.slack):[];g.length>0&&a.glyphs&&f.push(m("text-overflow",i,{shape:t.name,text:o.text,box:z(a.box),glyphs:z(a.glyphs),edges:q(g),lines:a.lines.length,past:a.lines.filter(p=>O(p,a.box,h.slack).length>0).length,...o.scale===void 0?{}:{scale:o.scale}}));const b=O(o.glyphs,N,h.slack);if(b.length>0){const p=F(o.glyphs);f.push(m("text-off-slide",i,{shape:t.name,text:o.text,glyphs:z(o.glyphs),edges:q(b),share:p>0?H(1-F(B(o.glyphs,N))/p):1}))}for(const p of o.type){const E=`${String(p.size)}/${String(p.weight)}`,$=j.get(E)??{size:p.size,weight:p.weight,slides:new Set,shapes:new Set};$.slides.add(s.slide),$.shapes.add(`${s.slide}/${t.name}`),j.set(E,$)}const u=o.type.reduce((p,E)=>p===void 0||E.size<p.size?E:p,void 0);if(u){const p=h.room,E=u.xHeight===void 0?"em":"x",$=p&&(u.xHeight??u.size)*(p.screen*1e3/(n.width/e.pxPerPt));f.push(m("read-size",i,{shape:t.name,text:o.text,size:u.size,...u.xHeight===void 0?{}:{xHeight:u.xHeight},...p&&$!==void 0?{screen:{by:E,mm:M($,1),arcmin:M(Math.atan($/1e3/p.distance)*180*60/Math.PI,1)}}:{},phone:M(u.size*e.pxPerPt*Z([n.width,n.height],h.phone),1),options:{...p?{room:{...p}}:{},phone:[...h.phone]}}))}}const v=O(t.box,N,h.slack);if(v.length>0){const a=F(t.box);f.push(m("shape-off-slide",i,{shape:t.name,box:z(t.box),edges:q(v),share:a>0?H(1-F(B(t.box,N))/a):1}))}if(t.picture){const[a,g]=t.picture.shown;if(a>0&&g>0){const b=Math.max(t.box[2]/a,t.box[3]/g),u=p=>p/e.pxPerPt/72;f.push(m("picture-resolution",i,{shape:t.name,source:t.picture.source,shown:t.picture.shown,box:z(t.box),scale:M(b),ppi:Math.round(Math.min(a/u(t.box[2]),g/u(t.box[3]))),stretch:M(t.box[2]/a/(t.box[3]/g)-1)}))}}const D=y.slice(d+1).find(a=>a.opaque&&se(t.box,a.box,h.slack)),S=w.shapes.get(t.name);if(S?S.by.push(D?.name):D&&f.push(m("shape-hidden",i,{shape:t.name,by:D.name})),t.level==="slide"){const a=`${s.layout}\0${t.name}`,g=R.get(a)??new Map,b=[r(t.frame[0]),r(t.frame[1]),r(t.frame[2]),r(t.frame[3])],u=[...g.values()].find(p=>p.frame.every((E,$)=>Math.abs(E-(b[$]??0))<=h.drift));u?u.slides.includes(s.slide)||u.slides.push(s.slide):g.set(b.join(","),{frame:b,slides:[s.slide]}),R.set(a,g)}}for(let d=0;d<y.length;d++)for(let t=d+1;t<y.length;t++){const l=y[d],o=y[t];if(!l||!o)continue;const v=l.level==="slide"||o.level==="slide",D=B(L(l),L(o));if(v&&!C(l)&&!C(o)&&l.level==="slide"&&o.level==="slide"&&D[2]>h.slack&&D[3]>h.slack){const S=F(D);f.push(m("shape-overlap",i,{a:l.name,b:o.name,area:M(S/e.pxPerPt**2,1),share:H(S/Math.max(1,Math.min(F(L(l)),F(L(o)))))}))}if(v)for(const[S,a]of Object.entries(_)){if(!W(l).has(S)||!W(o).has(S))continue;const g=r(a(L(l))),b=r(a(L(o))),u=Math.abs(g-b);u>h.aligned&&u<=h.within&&f.push(m("near-alignment",i,{a:l.name,b:o.name,line:S,gap:M(u),at:{a:g,b},by:{a:U(l),b:U(o)},align:l.level==="slide"?T(l,S,b-g):T(o,S,g-b),options:{within:h.within,aligned:h.aligned}}))}}for(const d of y)if(!(d.level!=="slide"||!d.opaque))for(const t of["centre-x","centre-y"]){const l=r(_[t](d.box)),o=r(_[t](N)),v=Math.abs(l-o);v>h.aligned&&v<=h.within&&f.push(m("near-alignment",i,{a:d.name,b:"slide",line:t,gap:M(v),at:{a:l,b:o},by:{a:"frame",b:"frame"},align:T(d,t,o-l),options:{within:h.within,aligned:h.aligned}}))}f.push(m("words-on-slide",i,{words:A,lines:Q,texts:V}))}for(const[s,i]of R){if(i.size<2)continue;const[w="",y=""]=s.split("\0");f.push(m("placement-drift",c,{layout:w,shape:y,places:[...i.values()],options:{drift:h.drift}}))}if(e.fonts&&e.fonts.length>0){const s=new Set(x.standard??ee);f.push(m("deck-fonts",c,{fonts:e.fonts.map(i=>({...i,standard:s.has(i.name)})),options:{standard:[...s]}}))}const G=[...j.values()].map(s=>({size:s.size,weight:s.weight,slides:s.slides.size,shapes:s.shapes.size})).sort((s,i)=>s.size-i.size||s.weight-i.weight),J=G[0];J&&f.push(m("type-in-use",c,{type:G,smallest:J.size}));for(const s of I.values())for(const[i,w]of s.shapes){const[y]=w.by;y!==void 0&&w.by.every(A=>A!==void 0)&&f.push(m("shape-hidden",s.at,{shape:i,by:y})),s.measured>=s.total&&w.hidden===s.measured&&f.push(m("shape-hidden",s.at,{shape:i,never:!0}))}const K=new Set;return f.filter(s=>{const i=JSON.stringify([s.kind,s.part,s.data]);return K.has(i)?!1:(K.add(i),!0)})}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{colorOfFile as ee}from"@allyhub/formats";import{readMarks as _e,markRuns as be}from"@allyhub/piece";import{chartOfFile as ye}from"@allyhub/chart";import{AUTOSHAPE_STYLE as C,SHADOW_DEFAULTS as H,CONNECTOR_STYLE as ne,DRAWN_TEXTBOX_FRAME as te,TEXT_FALLBACK as ie,TEXT_INSETS as W,isConnectorGeometry as $e,placeholderFrame as xe,styleKindOf as we}from"./office.js";import{resolveAnimation as ke,resolveTransition as oe}from"./animation.js";import{glued as ve}from"./connect.js";import{pathSteps as Se}from"./path.js";import{masterPlaceholder as Ae}from"./placeholders.js";import{DECK_FONTS as Oe,OFFICE_THEME as Te,themeOver as je}from"./theme.js";import{Pt as O}from"./units.js";export function joinPath(i,t){if(t.startsWith("/"))return t.slice(1);const u=i===""?[]:i.split("/");for(const r of t.split("/"))r===""||r==="."||(r===".."?u.pop():u.push(r));return u.join("/")}const re={left:0,top:0,width:0,height:0},U=()=>Array.from({length:9},()=>({...ie,font:{...ie.font},margin_left:0}));export function levelsOver(i,...t){return i.map((u,r)=>{let o={...u,font:{...u.font}};for(const $ of t){const l=$?.[r];l&&(o={...o,...l.alignment===void 0?{}:{alignment:l.alignment},...l.line_spacing===void 0?{}:{line_spacing:l.line_spacing},...l.space_before===void 0?{}:{space_before:l.space_before},...l.space_after===void 0?{}:{space_after:l.space_after},...l.margin_left===void 0?{}:{margin_left:l.margin_left},...l.indent===void 0?{}:{indent:l.indent},font:{...o.font,...l.font}},l.numbered!==void 0&&(o.numbered=l.numbered,delete o.bullet),l.bullet===null?(delete o.bullet,delete o.numbered):l.bullet!==void 0?(delete o.numbered,o.bullet={char:l.bullet,...l.bullet_font===void 0?{}:{font:l.bullet_font}}):l.bullet_font!==void 0&&o.bullet&&(o.bullet={...o.bullet,font:l.bullet_font}))}return o})}function I(i,...t){const u=t.filter(o=>o!==void 0),r=o=>{for(let $=u.length-1;$>=0;$--){const l=u[$]?.[o];if(l!==void 0)return l}};return{vertical_anchor:r("vertical_anchor")??i.vertical_anchor,auto_size:r("auto_size")??i.auto_size,word_wrap:r("word_wrap")??i.word_wrap,margins:{left:r("margin_left")??W.left,top:r("margin_top")??W.top,right:r("margin_right")??W.right,bottom:r("margin_bottom")??W.bottom}}}const ae={vertical_anchor:"t",auto_size:"none",word_wrap:!0};export const plainLevels=i=>levelsOver(U(),i.text_styles.other);function V(i,t){return{...I(ae,t),levels:levelsOver(U(),i.text_styles.other,t.levels)}}function Ee(i,t,...u){return{...I(xe(t),...u),levels:levelsOver(U(),i.text_styles[we(t)],...u.map(r=>r?.levels))}}const Fe=Array.from({length:9},()=>({font:{color:C.font_color}})),de={vertical_anchor:C.vertical_anchor};function le(i,t){return{...I(ae,t),levels:levelsOver(U(),i.text_styles.other,Fe,t.levels)}}const X=i=>{const t={...i};return delete t.paragraphs,t},G=i=>({paragraphs:[],levels:[],...i}),z=i=>i==="none"?null:colorOfFile(i),Ne=/<span((?:\s+(?:color|font|size|bold|italic|underline|link|highlight|baseline|strike)="[^"\n]*")+)\s*>(.*?)<\/span>/gu,ze=/(color|font|size|bold|italic|underline|link|highlight|baseline|strike)="([^"\n]*)"/gu,K=57344,Me=256,se="",Ce=/[\ue000-\ue100]|[^\ue000-\ue100]+/gu;export const colorOfFile=i=>ee(i)??"dk1";function Z(i){const{shadow:t,gradient:u}=i;return{...i.fill_transparency===void 0?{}:{fill_transparency:i.fill_transparency},...u?{gradient:{angle:u.angle??0,stops:u.stops.map(r=>({at:r.at,color:colorOfFile(r.color),...r.transparency===void 0?{}:{transparency:r.transparency}}))}}:{},...t?{shadow:{color:t.color===void 0?H.color:colorOfFile(t.color),blur:t.blur===void 0?H.blur:O(t.blur),distance:t.distance===void 0?H.distance:O(t.distance),angle:t.angle??H.angle,transparency:t.transparency??H.transparency}}:{}}}function fe(i,t,u=[]){return{...i,rows:i.rows.map((r,o)=>({height:r.height,cells:r.cells.map($=>{const l=u[o];return{...$,text:{paragraphs:$.text.paragraphs,style:B({...V(t,$.text),auto_size:"shape"},l),own:X($.text),empty:!1},...l?{fileText:l}:{}}})}))}}function B(i,t){return t?{...i,...t.anchor===void 0?{}:{vertical_anchor:t.anchor},levels:i.levels.map(u=>{const r={...u.font,...t.size===void 0?{}:{size:O(t.size)},...t.bold===void 0?{}:{bold:t.bold},...t.italic===void 0?{}:{italic:t.italic},...t.underline===void 0?{}:{underline:t.underline},...t.strike===void 0?{}:{strike:t.strike},...t.font===void 0?{}:{name:t.font}};t.color!==void 0&&(r.color=colorOfFile(t.color));const o={...u,font:r,...t.align===void 0?{}:{alignment:t.align},...t.line_spacing===void 0?{}:{line_spacing:{lines:t.line_spacing}},...t.space_before===void 0?{}:{space_before:O(t.space_before)},...t.space_after===void 0?{}:{space_after:O(t.space_after)}};return t.numbered!==void 0?(o.numbered=t.numbered,delete o.bullet):t.bullet===!1?(delete o.bullet,delete o.numbered):t.bullet!==void 0&&(o.bullet={char:t.bullet},delete o.numbered),(t.numbered!==void 0||t.bullet!==void 0&&t.bullet!==!1)&&u.margin_left===0?{...o,margin_left:ue,indent:-ue}:o})}:i}function Pe(i,t){if(!t)return[...i];const u=t.numbered!==void 0||t.bullet!==void 0;return i.map(r=>{const o={...r};return t.align!==void 0&&delete o.alignment,t.line_spacing!==void 0&&delete o.line_spacing,t.space_before!==void 0&&delete o.space_before,t.space_after!==void 0&&delete o.space_after,u&&(delete o.bullet,delete o.bullet_font,delete o.numbered),o})}function Le(i){const t={};for(const[,u,r=""]of i.matchAll(ze))if(u==="font")t.name=r.trim();else if(u==="link")t.link=r.trim();else if(u==="highlight")t.highlight=r.trim().toUpperCase();else if(u==="bold")t.bold=r.trim()!=="false";else if(u==="italic")t.italic=r.trim()!=="false";else if(u==="strike")t.strike=r.trim()!=="false";else if(u==="underline")t.underline=r.trim()!=="false";else if(u==="size"){const o=Number(r);Number.isFinite(o)&&o>0&&(t.size=O(o))}else if(u==="baseline"){const o=Number(r);Number.isFinite(o)&&(t.baseline=o)}else{const o=ee(r.trim());o!==void 0&&(t.color=o)}return t}const ue=342900;export function paragraphsOfWords(i,t=0,u=Oe.code){return i===void 0?[]:typeof i=="string"?i.split(/\r?\n/u).map(r=>{const o=[],$=r.replace(Ne,(E,N,P)=>(o.push(Le(N)),`${String.fromCharCode(K+o.length-1)}${P}${se}`)),l=_e($);let F;const M=be(l.text,l.marks).flatMap(E=>{const N=E.kinds.includes("code"),P={...E.kinds.includes("strong")?{bold:!0}:{},...E.kinds.includes("em")?{italic:!0}:{},...N?{name:u}:{}};return[...E.text.matchAll(Ce)].flatMap(Y=>{const L=Y[0],R=L.charCodeAt(0);if(L===se)return F=void 0,[];if(R>=K&&R<K+Me)return F=o[R-K],[];const D={...F,...P};return[{text:L,...Object.keys(D).length>0?{font:D}:{},...N?{code:!0}:{}}]})});return{runs:M.length>0?M:[{text:""}],level:t}}):i.flatMap(r=>paragraphsOfWords(r,Array.isArray(r)?Math.min(t+1,8):t,u))}const ce=i=>({left:O(i.x),top:O(i.y),width:O(i.w),height:O(i.h)}),Re=new Set(["dt","ftr","sldNum"]),pe=i=>({...i.locked?{locked:!0}:{},...i.rotation===void 0||i.rotation===0?{}:{rotation:i.rotation},...i.flip_h||i.flip_v?{flip:{...i.flip_h?{h:!0}:{},...i.flip_v?{v:!0}:{}}}:{}});function he(i,t,u){if(!t)return;t.fill!==void 0&&(i.background=colorOfFile(t.fill));const r=t.gradient&&Z({gradient:t.gradient}).gradient;r&&(i.background_gradient=r),t.picture!==void 0&&(i.background_picture=joinPath(u,t.picture))}const me=i=>i===void 0?void 0:{left:i.left??0,top:i.top??0,right:i.right??0,bottom:i.bottom??0};export function resolveDeck(i){const{code:t,file:u,words:r,prefix:o,base:$}=i,l=[],F=je(i.theme??Te,t.theme),M=new Map;for(const e of t.masters)for(const n of e.layouts)M.set(n.name,{layout:n,master:e});const E=[],N=(e,n,a)=>({name:e.name,kind:e.kind,frame:{...e.frame??re},...e.flip?{flip:{...e.flip}}:{},...e.connect?{connect:{...e.connect.begin?{begin:{...e.connect.begin}}:{},...e.connect.end?{end:{...e.connect.end}}:{}}}:{},...e.rotation===void 0?{}:{rotation:e.rotation},level:n,...e.text?{text:{paragraphs:e.text.paragraphs,style:e.kind==="autoshape"?le(a,e.text):V(a,e.text),own:X(e.text),empty:!1}}:{},...e.fill===void 0?{}:{fill:e.fill},...e.fill_transparency===void 0?{}:{fill_transparency:e.fill_transparency},...e.gradient?{gradient:e.gradient}:{},...e.shadow?{shadow:e.shadow}:{},...e.line===void 0?{}:{line:e.line},...e.line_width===void 0?{}:{line_width:e.line_width},...e.line_dash===void 0?{}:{line_dash:e.line_dash},...e.line_begin===void 0?{}:{line_begin:e.line_begin},...e.line_end===void 0?{}:{line_end:e.line_end},...e.path?{path:e.path}:{},...e.table?{table:fe(e.table,a)}:{},...e.chart?{chart:e.chart}:{},...e.group===void 0?{}:{group:e.group},...e.geometry?{geometry:e.geometry}:{},...e.adjustments?{adjustments:[...e.adjustments]}:{},...e.media?{media:{path:joinPath(e.media.base,e.media.path),...e.media.poster===void 0?{}:{poster:e.media.poster}}}:{},...e.component?{component:{...e.component}}:{},sources:{frame:{from:n}}}),P=(e,n)=>{const a=e.placeholder?.type??"body",m=Ae(n,a),_=e.frame??m?.frame??re;return{name:e.name,kind:"placeholder",frame:{..._},level:"slide",...e.placeholder?{placeholder:{...e.placeholder}}:{},text:{paragraphs:[],style:Ee(n,a,m?.text,e.text),empty:!0},...e.fill===void 0?{}:{fill:e.fill},...e.line===void 0?{}:{line:e.line},sources:{frame:{from:e.frame||!m?"layout":"master"},text:{from:"layout"}}}},Y=(e,n,a,m)=>{const _=t.components[e];if(!_){l.push({...a,message:/\.[cm]?[jt]sx?(?:#|$)/u.test(e)?`${e} names no component: its module has no such export, or the export is not made with defineComponent.`:`There is no component ${e} in the deck's module (it has ${Object.keys(t.components).join(", ")||"none"}).`});return}for(const b of Object.keys(n??{}))Object.hasOwn(_.props,b)||l.push({...a,message:`Component ${e} has no prop ${b} a person sets (it has ${Object.keys(_.props).join(", ")||"none"}).`});return{name:e,props:{...n??{}},...m===void 0?{}:{dur:m}}},L=(e,n,a,m,_)=>{const b={slide:m,shape:e,path:a};if(!n.frame){l.push({...b,message:`Shape ${e} is the slide's own: it needs a frame { x, y, w, h } in points.`});return}const w=ce(n.frame),s={frame:{from:"slide",path:`${a}.frame`}},y={name:e,frame:w,level:"slide",...n.fill===void 0?{}:{fill:z(n.fill)},...Z(n),...n.line===void 0?{}:{line:z(n.line)},...n.line_dash===void 0?{}:{line_dash:n.line_dash},...n.line_begin===void 0?{}:{line_begin:n.line_begin},...n.line_end===void 0?{}:{line_end:n.line_end},...n.group===void 0?{}:{group:n.group},...pe(n)};if(n.textbox)return{...y,kind:"textbox",text:{paragraphs:paragraphsOfWords(r(`${o}.${m}.${e}`),0,F.fonts.code),style:B(V(_,G(te)),n.text),own:X(G(te)),empty:!1},...n.text?{fileText:{...n.text}}:{},sources:{...s,text:{from:"slide",path:`${a}.text`}}};if(n.picture!==void 0){const f=me(n.crop);return{...y,kind:"picture",media:{path:joinPath($,n.picture),...f?{crop:f}:{}},sources:{...s,media:{from:"slide",path:`${a}.picture`}}}}if(n.movie!==void 0)return{...y,kind:"movie",media:{path:joinPath($,n.movie),...n.poster===void 0?{}:{poster:n.poster}},sources:{...s,media:{from:"slide",path:`${a}.movie`}}};if(n.chart){const f=r(`${o}.${m}.${e}`),S=ye(n.chart,{title:typeof f=="string"?f:void 0,base:$,rows:g=>i.data?.(g),problem:g=>{l.push({...b,message:`Chart ${e}: ${g}`})}});return S?{...y,kind:"chart",chart:S,sources:s}:void 0}if(n.table){const f=n.table,S=w.width/f.columns.reduce((d,c)=>d+c,0),g=w.height/f.rows.reduce((d,c)=>d+c.height,0),v=r(`${o}.${m}.${e}`),T=Array.isArray(v)?v:[];return T.length>f.rows.length&&l.push({...b,message:`Table ${e} has ${String(f.rows.length)} rows and its words ${String(T.length)}.`}),{...y,kind:"table",table:fe({columns:f.columns.map(d=>Math.round(d*S)),rows:f.rows.map((d,c)=>{const p=T[c],x=Array.isArray(p)?p:p===void 0?[]:[p];return{height:Math.round(d.height*g),cells:f.columns.map((k,A)=>({text:{levels:[],paragraphs:paragraphsOfWords(x[A],0,F.fonts.code)},...d.fill===void 0?{}:{fill:colorOfFile(d.fill)},...d.line===void 0?{}:{borders:{bottom:{color:colorOfFile(d.line),width:O(1)}}}}))}})},_,f.rows.map(d=>d.text)),sources:s}}const h=n.path&&Se(n.path.d);if(n.path&&!h){l.push({...b,message:`Shape ${e}'s path starts with M and says only M, L, C and Z, absolute.`});return}if(n.geometry!==void 0||n.path&&h){const f=!n.path&&$e(n.geometry);return{...y,kind:"autoshape",...n.path&&h?{path:{w:n.path.w,h:n.path.h,steps:h}}:n.geometry===void 0?{}:{geometry:n.geometry,...n.adjustments?{adjustments:[...n.adjustments]}:{}},...f?{line:n.line===void 0?ne.line:z(n.line),line_width:n.line_width===void 0?ne.line_width:O(n.line_width)}:{fill:n.fill===void 0?C.fill:z(n.fill),line:n.line===void 0?C.line:z(n.line),line_width:n.line_width===void 0?C.line_width:O(n.line_width)},...n.text&&!f?{fileText:{...n.text}}:{},...f?{}:{text:{paragraphs:paragraphsOfWords(r(`${o}.${m}.${e}`)).map(S=>n.text?.align===void 0?{alignment:C.alignment,...S}:S),style:B(le(_,G(de)),n.text),own:X(G(de)),empty:!1}},sources:{...s,fill:{from:"slide",path:`${a}.fill`}}}}if(n.component!==void 0){const f=Y(n.component,n.props,b,n.dur);return f?{...y,kind:"component",component:f,sources:s}:void 0}},R=(e,n,a)=>{if(n.frame&&(e.frame=ce(n.frame),e.sources.frame={from:"slide",path:`${a}.frame`}),Object.assign(e,pe(n)),n.dur!==void 0&&e.component&&(e.component={...e.component,dur:n.dur}),n.text&&e.text&&(e.text.style=B(e.text.style,n.text),e.text.paragraphs=Pe(e.text.paragraphs,n.text),e.fileText={...n.text},e.sources.text={from:"slide",path:`${a}.text`}),n.line!==void 0&&(e.line=z(n.line),e.sources.line={from:"slide",path:`${a}.line`}),n.line_width!==void 0&&(e.line_width=O(n.line_width)),n.line_dash!==void 0&&(e.line_dash=n.line_dash),n.line_begin!==void 0&&(e.line_begin=n.line_begin),n.line_end!==void 0&&(e.line_end=n.line_end),n.fill!==void 0&&(e.fill=z(n.fill),e.sources.fill={from:"slide",path:`${a}.fill`}),Object.assign(e,Z(n)),(n.picture!==void 0||n.movie!==void 0)&&(e.placeholder?.type==="pic"||e.placeholder?.type==="media"||e.placeholder?.type==="obj")){const m=me(n.crop);e.kind=n.picture!==void 0?"picture":"movie",e.media={path:joinPath($,n.picture??n.movie??""),...m?{crop:m}:{},...n.poster===void 0?{}:{poster:n.poster}},e.sources.media={from:"slide",path:`${a}.${n.picture!==void 0?"picture":"movie"}`},delete e.text}},D=(e,n,a,m,_)=>{const b=M.get(n);if(!b){l.push({slide:e,path:`slides.${String(a)}.layout`,message:`Slide ${e} is on the layout "${n}", which the deck's module does not have (it has ${[...M.keys()].join(", ")||"none"}).`});return}const{layout:w,master:s}=b,y=[...(w.display_master_shapes===!1?[]:s.shapes).filter(f=>f.kind!=="placeholder").map(f=>N(f,"master",s)),...w.shapes.filter(f=>f.kind!=="placeholder").map(f=>N(f,"layout",s))],h=w.shapes.filter(f=>f.kind==="placeholder").map((f,S)=>({shape:P(f,s),order:S}));return{slide:{id:e,layout:w.name,master:s.name,hidden:m,background:w.background??s.background,shapes:y,animations:[],file:{index:a,..._===void 0?{}:{generate:_}}},placed:h,master:s}},q=(e,n,a)=>{if(!n)return;const m=w=>{const s=n[w];if(s===void 0)return e.connect?.[w];const y=s==="none"?void 0:a(s.shape);return s==="none"||y===void 0?void 0:{shape:y,site:s.site}},_=m("begin"),b=m("end");_||b?e.connect={..._?{begin:_}:{},...b?{end:b}:{}}:delete e.connect},J=(e,n,a,m,_,b,w,s,y,h=()=>{})=>{const f=new Set(a.map(d=>d.shape.name));let S=a.length;for(const[d,c]of Object.entries(m??{})){const p=b(d);if(p===void 0)continue;const x=`${_}.shapes.${d}`,k=c.textbox!==void 0||c.geometry!==void 0||c.path!==void 0||c.table!==void 0||c.chart!==void 0||c.component!==void 0||(c.picture!==void 0||c.movie!==void 0)&&!f.has(p),A=a.find(ge=>ge.shape.name===p);if(A&&!k){R(A.shape,c,x),q(A.shape,c.connect,b),A.shown=!0,c.z!==void 0&&(A.z=c.z);continue}if(A){l.push({slide:e.id,shape:p,path:x,message:`Slide ${e.id} has a ${A.shape.kind} ${p} already: a shape of its own needs another name.`});continue}if(!k){l.push({slide:e.id,shape:p,path:x,message:`Slide ${e.id} has no shape ${p} to change (its layout's placeholders and its own shapes are ${[...f].join(", ")||"none"}).`});continue}const j=L(p,c,x,e.id,n);j&&q(j,c.connect,b),j&&(a.push({shape:j,order:S++,...c.z===void 0?{}:{z:c.z}}),f.add(p))}const g=a.filter(d=>d.shown===!0||!Re.has(d.shape.placeholder?.type??"")||w(d.shape)!==void 0);a.splice(0,a.length,...g),a.sort((d,c)=>(d.z??0)-(c.z??0)||d.order-c.order);const v=new Map(a.flatMap((d,c)=>d.shape.group===void 0?[]:[[d.shape.group,c]])),T=a.flatMap((d,c)=>{const p=d.shape.group;return p===void 0?[d]:v.get(p)===c?a.filter(x=>x.shape.group===p):[]});a.splice(0,a.length,...T);for(const d of a){const c=h(d.shape);c!==void 0&&(d.shape.alt=c);const p=d.shape.text;if(d.shape.kind==="placeholder"&&p){const x=w(d.shape);p.paragraphs=paragraphsOfWords(x,0,F.fonts.code),p.empty=p.paragraphs.length===0||p.paragraphs.every(k=>k.runs.every(A=>A.text===""))}}e.shapes.push(...a.map(d=>d.shape));for(const d of e.shapes){const c=d.connect;if(!c)continue;const p=ve(d,x=>e.shapes.find(k=>k.name===x&&k.level===d.level&&k!==d));d.frame=p.frame,p.flip?d.flip=p.flip:delete d.flip;for(const x of p.lost){const k=c[x];k&&d.level==="slide"&&l.push({slide:e.id,shape:d.name,message:`Connector ${d.name}'s ${x} is glued to site ${String(k.site)} of ${k.shape}, which slide ${e.id} has not: it stays where it is.`})}}s!==void 0&&s.trim()!==""&&(e.notes=s);for(const[d,c]of(y??[]).entries()){const p=b(c.shape);if(p===void 0)continue;const x={slide:e.id,shape:p,path:`${_}.animations.${String(d)}`},k=e.shapes.find(j=>j.name===p&&j.level==="slide");if(!k){l.push({...x,message:`Slide ${e.id} has no shape ${p} to animate (it has ${e.shapes.filter(j=>j.level==="slide").map(j=>j.name).join(", ")}).`});continue}if(c.paragraph!==void 0&&c.paragraph>=(k.text?.paragraphs.length??0)){l.push({...x,message:`Shape ${p} has no paragraph ${String(c.paragraph)} to animate (it has ${String(k.text?.paragraphs.length??0)}).`});continue}const A=ke({...c,shape:p});A?e.animations.push(A):l.push({...x,message:`The animation of ${p} needs a path that starts with M and says only M, L and C, absolute.`})}},Q=new Set;return u.slides.forEach((e,n)=>{const a=`slides.${String(n)}`;if(e.layout!==void 0){const s=D(e.id,e.layout,n,e.hidden===!0);if(!s)return;const y=r(`${o}.${e.id}.notes`);e.transition&&(s.slide.transition=oe(e.transition)),e.advance_after!==void 0&&(s.slide.advance=e.advance_after),he(s.slide,e.background,$),J(s.slide,s.master,s.placed,e.shapes,a,h=>h,h=>r(`${o}.${e.id}.${h.name}`),typeof y=="string"?y:void 0,e.animations,h=>{const f=r(`${o}.${e.id}.alt.${h.name}`);return typeof f=="string"?f:void 0}),E.push(s.slide),Q.add(e.id);return}const m=e.generate??"",_=t.generators[m];if(_===void 0){l.push({slide:e.id,path:`${a}.generate`,message:`There is no generator ${m} in the deck's module (it has ${Object.keys(t.generators).join(", ")||"none"}).`});return}if(!Array.isArray(_)){l.push({slide:e.id,path:`${a}.generate`,message:`Generator ${m} threw: ${_.error}`,..._.stack===void 0?{}:{stack:_.stack}});return}const b=_,w=new Set(Array.isArray(e.hidden)?e.hidden:[]);for(const s of b){const y=`${e.id}/${s.id}`,h=D(y,s.layout,n,w.has(s.id),m);if(!h)continue;for(const g of s.shapes){const v=g.placeholder?h.placed.find(T=>T.shape.placeholder?.idx===g.placeholder?.idx):void 0;if(v)g.frame&&(v.shape.frame={...g.frame}),v.shape.sources.frame={from:"code"},v.shown=!0;else{const T=N(g,"layout",h.master);h.placed.push({shape:{...T,level:"slide",sources:{frame:{from:"code"}}},order:h.placed.length})}}const f=`${s.id}/`,S=s.transition??(s===b[0]?e.transition:void 0);he(h.slide,e.background,$),S&&(h.slide.transition=oe(S)),J(h.slide,h.master,h.placed,e.shapes,a,g=>g.startsWith(f)?g.slice(f.length):void 0,g=>{const v=g.placeholder===void 0?void 0:s.text[g.placeholder.idx];return v===void 0?void 0:v.map(T=>T.runs.map(d=>d.text).join(""))},s.notes,[...(s.animations??[]).map(g=>({...g,shape:`${f}${g.shape}`})),...e.animations??[]]);for(const g of h.slide.shapes){const v=g.placeholder===void 0?void 0:s.text[g.placeholder.idx];v&&g.text&&(g.text.paragraphs=v,g.text.empty=!1)}E.push(h.slide),Q.add(y)}for(const s of Object.keys(e.shapes??{})){const[y]=s.split("/");y!==void 0&&!b.some(h=>h.id===y)&&l.push({slide:e.id,path:`${a}.shapes.${s}`,message:`Generator ${m} makes no slide ${y}: ${s} changes nothing.`})}}),E.forEach((e,n)=>{for(const a of e.shapes)a.placeholder?.type==="sldNum"&&a.text&&(a.text.paragraphs=[{level:0,runs:[{text:String(n+1),field:"slidenum"}]}],a.text.empty=!1)}),{deck:{width:t.slide_width,height:t.slide_height,theme:F,slides:E},problems:l}}
2
+ import{colorOfFile as ee}from"@allyhub/formats";import{readMarks as _e,markRuns as be}from"@allyhub/piece";import{chartOfFile as ye}from"@allyhub/chart";import{AUTOSHAPE_STYLE as C,SHADOW_DEFAULTS as H,CONNECTOR_STYLE as ne,DRAWN_TEXTBOX_FRAME as te,TEXT_FALLBACK as ie,TEXT_INSETS as W,isConnectorGeometry as $e,placeholderFrame as xe,styleKindOf as we}from"./office.js";import{resolveAnimation as ke,resolveTransition as oe}from"./animation.js";import{glued as ve}from"./connect.js";import{pathSteps as Se}from"./path.js";import{masterPlaceholder as Ae}from"./placeholders.js";import{DECK_FONTS as Oe,OFFICE_THEME as ze,themeOver as Te}from"./theme.js";import{Pt as O}from"./units.js";export function joinPath(i,t){if(t.startsWith("/"))return t.slice(1);const u=[];for(const r of[...i.split("/"),...t.split("/")])r===""||r==="."||(r===".."?u.pop():u.push(r));return u.join("/")}const re={left:0,top:0,width:0,height:0},U=()=>Array.from({length:9},()=>({...ie,font:{...ie.font},margin_left:0}));export function levelsOver(i,...t){return i.map((u,r)=>{let o={...u,font:{...u.font}};for(const $ of t){const l=$?.[r];l&&(o={...o,...l.alignment===void 0?{}:{alignment:l.alignment},...l.line_spacing===void 0?{}:{line_spacing:l.line_spacing},...l.space_before===void 0?{}:{space_before:l.space_before},...l.space_after===void 0?{}:{space_after:l.space_after},...l.margin_left===void 0?{}:{margin_left:l.margin_left},...l.indent===void 0?{}:{indent:l.indent},font:{...o.font,...l.font}},l.numbered!==void 0&&(o.numbered=l.numbered,delete o.bullet),l.bullet===null?(delete o.bullet,delete o.numbered):l.bullet!==void 0?(delete o.numbered,o.bullet={char:l.bullet,...l.bullet_font===void 0?{}:{font:l.bullet_font}}):l.bullet_font!==void 0&&o.bullet&&(o.bullet={...o.bullet,font:l.bullet_font}))}return o})}function I(i,...t){const u=t.filter(o=>o!==void 0),r=o=>{for(let $=u.length-1;$>=0;$--){const l=u[$]?.[o];if(l!==void 0)return l}};return{vertical_anchor:r("vertical_anchor")??i.vertical_anchor,auto_size:r("auto_size")??i.auto_size,word_wrap:r("word_wrap")??i.word_wrap,margins:{left:r("margin_left")??W.left,top:r("margin_top")??W.top,right:r("margin_right")??W.right,bottom:r("margin_bottom")??W.bottom}}}const ae={vertical_anchor:"t",auto_size:"none",word_wrap:!0};export const plainLevels=i=>levelsOver(U(),i.text_styles.other);function V(i,t){return{...I(ae,t),levels:levelsOver(U(),i.text_styles.other,t.levels)}}function je(i,t,...u){return{...I(xe(t),...u),levels:levelsOver(U(),i.text_styles[we(t)],...u.map(r=>r?.levels))}}const Ee=Array.from({length:9},()=>({font:{color:C.font_color}})),de={vertical_anchor:C.vertical_anchor};function le(i,t){return{...I(ae,t),levels:levelsOver(U(),i.text_styles.other,Ee,t.levels)}}const X=i=>{const t={...i};return delete t.paragraphs,t},G=i=>({paragraphs:[],levels:[],...i}),N=i=>i==="none"?null:colorOfFile(i),Fe=/<span((?:\s+(?:color|font|size|bold|italic|underline|link|highlight|baseline|strike)="[^"\n]*")+)\s*>(.*?)<\/span>/gu,Ne=/(color|font|size|bold|italic|underline|link|highlight|baseline|strike)="([^"\n]*)"/gu,K=57344,Me=256,se="",Ce=/[\ue000-\ue100]|[^\ue000-\ue100]+/gu;export const colorOfFile=i=>ee(i)??"dk1";function Z(i){const{shadow:t,gradient:u}=i;return{...i.fill_transparency===void 0?{}:{fill_transparency:i.fill_transparency},...u?{gradient:{angle:u.angle??0,stops:u.stops.map(r=>({at:r.at,color:colorOfFile(r.color),...r.transparency===void 0?{}:{transparency:r.transparency}}))}}:{},...t?{shadow:{color:t.color===void 0?H.color:colorOfFile(t.color),blur:t.blur===void 0?H.blur:O(t.blur),distance:t.distance===void 0?H.distance:O(t.distance),angle:t.angle??H.angle,transparency:t.transparency??H.transparency}}:{}}}function fe(i,t,u=[]){return{...i,rows:i.rows.map((r,o)=>({height:r.height,cells:r.cells.map($=>{const l=u[o];return{...$,text:{paragraphs:$.text.paragraphs,style:B({...V(t,$.text),auto_size:"shape"},l),own:X($.text),empty:!1},...l?{fileText:l}:{}}})}))}}function B(i,t){return t?{...i,...t.anchor===void 0?{}:{vertical_anchor:t.anchor},levels:i.levels.map(u=>{const r={...u.font,...t.size===void 0?{}:{size:O(t.size)},...t.bold===void 0?{}:{bold:t.bold},...t.italic===void 0?{}:{italic:t.italic},...t.underline===void 0?{}:{underline:t.underline},...t.strike===void 0?{}:{strike:t.strike},...t.font===void 0?{}:{name:t.font}};t.color!==void 0&&(r.color=colorOfFile(t.color));const o={...u,font:r,...t.align===void 0?{}:{alignment:t.align},...t.line_spacing===void 0?{}:{line_spacing:{lines:t.line_spacing}},...t.space_before===void 0?{}:{space_before:O(t.space_before)},...t.space_after===void 0?{}:{space_after:O(t.space_after)}};return t.numbered!==void 0?(o.numbered=t.numbered,delete o.bullet):t.bullet===!1?(delete o.bullet,delete o.numbered):t.bullet!==void 0&&(o.bullet={char:t.bullet},delete o.numbered),(t.numbered!==void 0||t.bullet!==void 0&&t.bullet!==!1)&&u.margin_left===0?{...o,margin_left:ue,indent:-ue}:o})}:i}function Pe(i,t){if(!t)return[...i];const u=t.numbered!==void 0||t.bullet!==void 0;return i.map(r=>{const o={...r};return t.align!==void 0&&delete o.alignment,t.line_spacing!==void 0&&delete o.line_spacing,t.space_before!==void 0&&delete o.space_before,t.space_after!==void 0&&delete o.space_after,u&&(delete o.bullet,delete o.bullet_font,delete o.numbered),o})}function Le(i){const t={};for(const[,u,r=""]of i.matchAll(Ne))if(u==="font")t.name=r.trim();else if(u==="link")t.link=r.trim();else if(u==="highlight")t.highlight=r.trim().toUpperCase();else if(u==="bold")t.bold=r.trim()!=="false";else if(u==="italic")t.italic=r.trim()!=="false";else if(u==="strike")t.strike=r.trim()!=="false";else if(u==="underline")t.underline=r.trim()!=="false";else if(u==="size"){const o=Number(r);Number.isFinite(o)&&o>0&&(t.size=O(o))}else if(u==="baseline"){const o=Number(r);Number.isFinite(o)&&(t.baseline=o)}else{const o=ee(r.trim());o!==void 0&&(t.color=o)}return t}const ue=342900;export function paragraphsOfWords(i,t=0,u=Oe.code){return i===void 0?[]:typeof i=="string"?i.split(/\r?\n/u).map(r=>{const o=[],$=r.replace(Fe,(j,F,P)=>(o.push(Le(F)),`${String.fromCharCode(K+o.length-1)}${P}${se}`)),l=_e($);let E;const M=be(l.text,l.marks).flatMap(j=>{const F=j.kinds.includes("code"),P={...j.kinds.includes("strong")?{bold:!0}:{},...j.kinds.includes("em")?{italic:!0}:{},...F?{name:u}:{}};return[...j.text.matchAll(Ce)].flatMap(Y=>{const L=Y[0],R=L.charCodeAt(0);if(L===se)return E=void 0,[];if(R>=K&&R<K+Me)return E=o[R-K],[];const D={...E,...P};return[{text:L,...Object.keys(D).length>0?{font:D}:{},...F?{code:!0}:{}}]})});return{runs:M.length>0?M:[{text:""}],level:t}}):i.flatMap(r=>paragraphsOfWords(r,Array.isArray(r)?Math.min(t+1,8):t,u))}const ce=i=>({left:O(i.x),top:O(i.y),width:O(i.w),height:O(i.h)}),Re=new Set(["dt","ftr","sldNum"]),pe=i=>({...i.locked?{locked:!0}:{},...i.rotation===void 0||i.rotation===0?{}:{rotation:i.rotation},...i.flip_h||i.flip_v?{flip:{...i.flip_h?{h:!0}:{},...i.flip_v?{v:!0}:{}}}:{}});function he(i,t,u){if(!t)return;t.fill!==void 0&&(i.background=colorOfFile(t.fill));const r=t.gradient&&Z({gradient:t.gradient}).gradient;r&&(i.background_gradient=r),t.picture!==void 0&&(i.background_picture=joinPath(u,t.picture))}const me=i=>i===void 0?void 0:{left:i.left??0,top:i.top??0,right:i.right??0,bottom:i.bottom??0};export function resolveDeck(i){const{code:t,file:u,words:r,prefix:o,base:$}=i,l=[],E=Te(i.theme??ze,t.theme),M=new Map;for(const e of t.masters)for(const n of e.layouts)M.set(n.name,{layout:n,master:e});const j=[],F=(e,n,a)=>({name:e.name,kind:e.kind,frame:{...e.frame??re},...e.flip?{flip:{...e.flip}}:{},...e.connect?{connect:{...e.connect.begin?{begin:{...e.connect.begin}}:{},...e.connect.end?{end:{...e.connect.end}}:{}}}:{},...e.rotation===void 0?{}:{rotation:e.rotation},level:n,...e.text?{text:{paragraphs:e.text.paragraphs,style:e.kind==="autoshape"?le(a,e.text):V(a,e.text),own:X(e.text),empty:!1}}:{},...e.fill===void 0?{}:{fill:e.fill},...e.fill_transparency===void 0?{}:{fill_transparency:e.fill_transparency},...e.gradient?{gradient:e.gradient}:{},...e.shadow===void 0?{}:{shadow:e.shadow},...e.line===void 0?{}:{line:e.line},...e.line_width===void 0?{}:{line_width:e.line_width},...e.line_dash===void 0?{}:{line_dash:e.line_dash},...e.line_begin===void 0?{}:{line_begin:e.line_begin},...e.line_end===void 0?{}:{line_end:e.line_end},...e.line_begin_size===void 0?{}:{line_begin_size:e.line_begin_size},...e.line_end_size===void 0?{}:{line_end_size:e.line_end_size},...e.path?{path:e.path}:{},...e.table?{table:fe(e.table,a)}:{},...e.chart?{chart:e.chart}:{},...e.group===void 0?{}:{group:e.group},...e.geometry?{geometry:e.geometry}:{},...e.adjustments?{adjustments:[...e.adjustments]}:{},...e.media?{media:{path:joinPath(e.media.base,e.media.path),...e.media.poster===void 0?{}:{poster:e.media.poster}}}:{},...e.component?{component:{...e.component}}:{},sources:{frame:{from:n}}}),P=(e,n)=>{const a=e.placeholder?.type??"body",m=Ae(n,a),_=e.frame??m?.frame??re;return{name:e.name,kind:"placeholder",frame:{..._},level:"slide",...e.placeholder?{placeholder:{...e.placeholder}}:{},text:{paragraphs:[],style:je(n,a,m?.text,e.text),empty:!0},...e.fill===void 0?{}:{fill:e.fill},...e.line===void 0?{}:{line:e.line},sources:{frame:{from:e.frame||!m?"layout":"master"},text:{from:"layout"}}}},Y=(e,n,a,m)=>{const _=t.components[e];if(!_){l.push({...a,message:/\.[cm]?[jt]sx?(?:#|$)/u.test(e)?`${e} names no component: its module has no such export, or the export is not made with defineComponent.`:`There is no component ${e} in the deck's module (it has ${Object.keys(t.components).join(", ")||"none"}).`});return}for(const b of Object.keys(n??{}))Object.hasOwn(_.props,b)||l.push({...a,message:`Component ${e} has no prop ${b} a person sets (it has ${Object.keys(_.props).join(", ")||"none"}).`});return{name:e,props:{...n??{}},...m===void 0?{}:{dur:m}}},L=(e,n,a,m,_)=>{const b={slide:m,shape:e,path:a};if(!n.frame){l.push({...b,message:`Shape ${e} is the slide's own: it needs a frame { x, y, w, h } in points.`});return}const w=ce(n.frame),s={frame:{from:"slide",path:`${a}.frame`}},y={name:e,frame:w,level:"slide",...n.fill===void 0?{}:{fill:N(n.fill)},...Z(n),...n.line===void 0?{}:{line:N(n.line)},...n.line_dash===void 0?{}:{line_dash:n.line_dash},...n.line_begin===void 0?{}:{line_begin:n.line_begin},...n.line_end===void 0?{}:{line_end:n.line_end},...n.line_begin_size===void 0?{}:{line_begin_size:n.line_begin_size},...n.line_end_size===void 0?{}:{line_end_size:n.line_end_size},...n.group===void 0?{}:{group:n.group},...pe(n)};if(n.textbox)return{...y,kind:"textbox",text:{paragraphs:paragraphsOfWords(r(`${o}.${m}.${e}`),0,E.fonts.code),style:B(V(_,G(te)),n.text),own:X(G(te)),empty:!1},...n.text?{fileText:{...n.text}}:{},sources:{...s,text:{from:"slide",path:`${a}.text`}}};if(n.picture!==void 0){const f=me(n.crop);return{...y,kind:"picture",media:{path:joinPath($,n.picture),...f?{crop:f}:{}},sources:{...s,media:{from:"slide",path:`${a}.picture`}}}}if(n.movie!==void 0)return{...y,kind:"movie",media:{path:joinPath($,n.movie),...n.poster===void 0?{}:{poster:n.poster}},sources:{...s,media:{from:"slide",path:`${a}.movie`}}};if(n.chart){const f=r(`${o}.${m}.${e}`),S=ye(n.chart,{title:typeof f=="string"?f:void 0,base:$,rows:g=>i.data?.(g),problem:g=>{l.push({...b,message:`Chart ${e}: ${g}`})}});return S?{...y,kind:"chart",chart:S,sources:s}:void 0}if(n.table){const f=n.table,S=w.width/f.columns.reduce((d,c)=>d+c,0),g=w.height/f.rows.reduce((d,c)=>d+c.height,0),v=r(`${o}.${m}.${e}`),z=Array.isArray(v)?v:[];return z.length>f.rows.length&&l.push({...b,message:`Table ${e} has ${String(f.rows.length)} rows and its words ${String(z.length)}.`}),{...y,kind:"table",table:fe({columns:f.columns.map(d=>Math.round(d*S)),rows:f.rows.map((d,c)=>{const p=z[c],x=Array.isArray(p)?p:p===void 0?[]:[p];return{height:Math.round(d.height*g),cells:f.columns.map((k,A)=>({text:{levels:[],paragraphs:paragraphsOfWords(x[A],0,E.fonts.code)},...d.fill===void 0?{}:{fill:colorOfFile(d.fill)},...d.line===void 0?{}:{borders:{bottom:{color:colorOfFile(d.line),width:O(1)}}}}))}})},_,f.rows.map(d=>d.text)),sources:s}}const h=n.path&&Se(n.path.d);if(n.path&&!h){l.push({...b,message:`Shape ${e}'s path starts with M and says only M, L, C and Z, absolute.`});return}if(n.geometry!==void 0||n.path&&h){const f=!n.path&&$e(n.geometry);return{...y,kind:"autoshape",...n.path&&h?{path:{w:n.path.w,h:n.path.h,steps:h}}:n.geometry===void 0?{}:{geometry:n.geometry,...n.adjustments?{adjustments:[...n.adjustments]}:{}},...f?{line:n.line===void 0?ne.line:N(n.line),line_width:n.line_width===void 0?ne.line_width:O(n.line_width)}:{fill:n.fill===void 0?C.fill:N(n.fill),line:n.line===void 0?C.line:N(n.line),line_width:n.line_width===void 0?C.line_width:O(n.line_width)},...n.text&&!f?{fileText:{...n.text}}:{},...f?{}:{text:{paragraphs:paragraphsOfWords(r(`${o}.${m}.${e}`)).map(S=>n.text?.align===void 0?{alignment:C.alignment,...S}:S),style:B(le(_,G(de)),n.text),own:X(G(de)),empty:!1}},sources:{...s,fill:{from:"slide",path:`${a}.fill`}}}}if(n.component!==void 0){const f=Y(n.component,n.props,b,n.dur);return f?{...y,kind:"component",component:f,sources:s}:void 0}},R=(e,n,a)=>{if(n.frame&&(e.frame=ce(n.frame),e.sources.frame={from:"slide",path:`${a}.frame`}),Object.assign(e,pe(n)),n.dur!==void 0&&e.component&&(e.component={...e.component,dur:n.dur}),n.text&&e.text&&(e.text.style=B(e.text.style,n.text),e.text.paragraphs=Pe(e.text.paragraphs,n.text),e.fileText={...n.text},e.sources.text={from:"slide",path:`${a}.text`}),n.line!==void 0&&(e.line=N(n.line),e.sources.line={from:"slide",path:`${a}.line`}),n.line_width!==void 0&&(e.line_width=O(n.line_width)),n.line_dash!==void 0&&(e.line_dash=n.line_dash),n.line_begin!==void 0&&(e.line_begin=n.line_begin),n.line_end!==void 0&&(e.line_end=n.line_end),n.line_begin_size!==void 0&&(e.line_begin_size=n.line_begin_size),n.line_end_size!==void 0&&(e.line_end_size=n.line_end_size),n.fill!==void 0&&(e.fill=N(n.fill),e.sources.fill={from:"slide",path:`${a}.fill`}),Object.assign(e,Z(n)),(n.picture!==void 0||n.movie!==void 0)&&(e.placeholder?.type==="pic"||e.placeholder?.type==="media"||e.placeholder?.type==="obj")){const m=me(n.crop);e.kind=n.picture!==void 0?"picture":"movie",e.media={path:joinPath($,n.picture??n.movie??""),...m?{crop:m}:{},...n.poster===void 0?{}:{poster:n.poster}},e.sources.media={from:"slide",path:`${a}.${n.picture!==void 0?"picture":"movie"}`},delete e.text}},D=(e,n,a,m,_)=>{const b=M.get(n);if(!b){l.push({slide:e,path:`slides.${String(a)}.layout`,message:`Slide ${e} is on the layout "${n}", which the deck's module does not have (it has ${[...M.keys()].join(", ")||"none"}).`});return}const{layout:w,master:s}=b,y=[...(w.display_master_shapes===!1?[]:s.shapes).filter(f=>f.kind!=="placeholder").map(f=>F(f,"master",s)),...w.shapes.filter(f=>f.kind!=="placeholder").map(f=>F(f,"layout",s))],h=w.shapes.filter(f=>f.kind==="placeholder").map((f,S)=>({shape:P(f,s),order:S}));return{slide:{id:e,layout:w.name,master:s.name,hidden:m,background:w.background??s.background,shapes:y,animations:[],file:{index:a,..._===void 0?{}:{generate:_}}},placed:h,master:s}},q=(e,n,a)=>{if(!n)return;const m=w=>{const s=n[w];if(s===void 0)return e.connect?.[w];const y=s==="none"?void 0:a(s.shape);return s==="none"||y===void 0?void 0:{shape:y,site:s.site}},_=m("begin"),b=m("end");_||b?e.connect={..._?{begin:_}:{},...b?{end:b}:{}}:delete e.connect},J=(e,n,a,m,_,b,w,s,y,h=()=>{})=>{const f=new Set(a.map(d=>d.shape.name));let S=a.length;for(const[d,c]of Object.entries(m??{})){const p=b(d);if(p===void 0)continue;const x=`${_}.shapes.${d}`,k=c.textbox!==void 0||c.geometry!==void 0||c.path!==void 0||c.table!==void 0||c.chart!==void 0||c.component!==void 0||(c.picture!==void 0||c.movie!==void 0)&&!f.has(p),A=a.find(ge=>ge.shape.name===p);if(A&&!k){R(A.shape,c,x),q(A.shape,c.connect,b),A.shown=!0,c.z!==void 0&&(A.z=c.z);continue}if(A){l.push({slide:e.id,shape:p,path:x,message:`Slide ${e.id} has a ${A.shape.kind} ${p} already: a shape of its own needs another name.`});continue}if(!k){l.push({slide:e.id,shape:p,path:x,message:`Slide ${e.id} has no shape ${p} to change (its layout's placeholders and its own shapes are ${[...f].join(", ")||"none"}).`});continue}const T=L(p,c,x,e.id,n);T&&q(T,c.connect,b),T&&(a.push({shape:T,order:S++,...c.z===void 0?{}:{z:c.z}}),f.add(p))}const g=a.filter(d=>d.shown===!0||!Re.has(d.shape.placeholder?.type??"")||w(d.shape)!==void 0);a.splice(0,a.length,...g),a.sort((d,c)=>(d.z??0)-(c.z??0)||d.order-c.order);const v=new Map(a.flatMap((d,c)=>d.shape.group===void 0?[]:[[d.shape.group,c]])),z=a.flatMap((d,c)=>{const p=d.shape.group;return p===void 0?[d]:v.get(p)===c?a.filter(x=>x.shape.group===p):[]});a.splice(0,a.length,...z);for(const d of a){const c=h(d.shape);c!==void 0&&(d.shape.alt=c);const p=d.shape.text;if(d.shape.kind==="placeholder"&&p){const x=w(d.shape);p.paragraphs=paragraphsOfWords(x,0,E.fonts.code),p.empty=p.paragraphs.length===0||p.paragraphs.every(k=>k.runs.every(A=>A.text===""))}}e.shapes.push(...a.map(d=>d.shape));for(const d of e.shapes){const c=d.connect;if(!c)continue;const p=ve(d,x=>e.shapes.find(k=>k.name===x&&k.level===d.level&&k!==d));d.frame=p.frame,p.flip?d.flip=p.flip:delete d.flip;for(const x of p.lost){const k=c[x];k&&d.level==="slide"&&l.push({slide:e.id,shape:d.name,message:`Connector ${d.name}'s ${x} is glued to site ${String(k.site)} of ${k.shape}, which slide ${e.id} has not: it stays where it is.`})}}s!==void 0&&s.trim()!==""&&(e.notes=s);for(const[d,c]of(y??[]).entries()){const p=b(c.shape);if(p===void 0)continue;const x={slide:e.id,shape:p,path:`${_}.animations.${String(d)}`},k=e.shapes.find(T=>T.name===p&&T.level==="slide");if(!k){l.push({...x,message:`Slide ${e.id} has no shape ${p} to animate (it has ${e.shapes.filter(T=>T.level==="slide").map(T=>T.name).join(", ")}).`});continue}if(c.paragraph!==void 0&&c.paragraph>=(k.text?.paragraphs.length??0)){l.push({...x,message:`Shape ${p} has no paragraph ${String(c.paragraph)} to animate (it has ${String(k.text?.paragraphs.length??0)}).`});continue}const A=ke({...c,shape:p});A?e.animations.push(A):l.push({...x,message:`The animation of ${p} needs a path that starts with M and says only M, L and C, absolute.`})}},Q=new Set;return u.slides.forEach((e,n)=>{const a=`slides.${String(n)}`;if(e.layout!==void 0){const s=D(e.id,e.layout,n,e.hidden===!0);if(!s)return;const y=r(`${o}.${e.id}.notes`);e.transition&&(s.slide.transition=oe(e.transition)),e.advance_after!==void 0&&(s.slide.advance=e.advance_after),he(s.slide,e.background,$),J(s.slide,s.master,s.placed,e.shapes,a,h=>h,h=>r(`${o}.${e.id}.${h.name}`),typeof y=="string"?y:void 0,e.animations,h=>{const f=r(`${o}.${e.id}.alt.${h.name}`);return typeof f=="string"?f:void 0}),j.push(s.slide),Q.add(e.id);return}const m=e.generate??"",_=t.generators[m];if(_===void 0){l.push({slide:e.id,path:`${a}.generate`,message:`There is no generator ${m} in the deck's module (it has ${Object.keys(t.generators).join(", ")||"none"}).`});return}if(!Array.isArray(_)){l.push({slide:e.id,path:`${a}.generate`,message:`Generator ${m} threw: ${_.error}`,..._.stack===void 0?{}:{stack:_.stack}});return}const b=_,w=new Set(Array.isArray(e.hidden)?e.hidden:[]);for(const s of b){const y=`${e.id}/${s.id}`,h=D(y,s.layout,n,w.has(s.id),m);if(!h)continue;for(const g of s.shapes){const v=g.placeholder?h.placed.find(z=>z.shape.placeholder?.idx===g.placeholder?.idx):void 0;if(v)g.frame&&(v.shape.frame={...g.frame}),v.shape.sources.frame={from:"code"},v.shown=!0;else{const z=F(g,"layout",h.master);h.placed.push({shape:{...z,level:"slide",sources:{frame:{from:"code"}}},order:h.placed.length})}}const f=`${s.id}/`,S=s.transition??(s===b[0]?e.transition:void 0);he(h.slide,e.background,$),S&&(h.slide.transition=oe(S)),J(h.slide,h.master,h.placed,e.shapes,a,g=>g.startsWith(f)?g.slice(f.length):void 0,g=>{const v=g.placeholder===void 0?void 0:s.text[g.placeholder.idx];return v===void 0?void 0:v.map(z=>z.runs.map(d=>d.text).join(""))},s.notes,[...(s.animations??[]).map(g=>({...g,shape:`${f}${g.shape}`})),...e.animations??[]]);for(const g of h.slide.shapes){const v=g.placeholder===void 0?void 0:s.text[g.placeholder.idx];v&&g.text&&(g.text.paragraphs=v,g.text.empty=!1)}j.push(h.slide),Q.add(y)}for(const s of Object.keys(e.shapes??{})){const[y]=s.split("/");y!==void 0&&!b.some(h=>h.id===y)&&l.push({slide:e.id,path:`${a}.shapes.${s}`,message:`Generator ${m} makes no slide ${y}: ${s} changes nothing.`})}}),j.forEach((e,n)=>{for(const a of e.shapes)a.placeholder?.type==="sldNum"&&a.text&&(a.text.paragraphs=[{level:0,runs:[{text:String(n+1),field:"slidenum"}]}],a.text.empty=!1)}),{deck:{width:t.slide_width,height:t.slide_height,theme:E,slides:j},problems:l}}
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{LENGTH_UNITS as O,presentationFor as _}from"./index.js";export const{Emu,Inches,Pt,Cm,Mm,Centipoints}=O;export{RGBColor,MSO_ANCHOR,CategoryChartData,MSO_ARROWHEAD,XL_CHART_TYPE,XL_LABEL_POSITION,XL_LEGEND_POSITION,MSO_AUTO_SIZE,MSO_CONNECTOR,MSO_FILL,MSO_LINE,MSO_SHAPE,MSO_SHAPE_TYPE,MSO_THEME_COLOR,PP_ALIGN,PP_PLACEHOLDER,THEME_FONT,SLIDE_SIZES,presentationFor,isDeck}from"./index.js";export const presentation=_(""),slidesFor=t=>({presentation:_(t.file)});
2
+ import{LENGTH_UNITS as O,presentationFor as _}from"./index.js";export const{Emu,Inches,Pt,Cm,Mm,Centipoints}=O;export{RGBColor,MSO_ANCHOR,CategoryChartData,MSO_ARROWHEAD,MSO_ARROWHEAD_SIZE,XL_CHART_TYPE,XL_LABEL_POSITION,XL_LEGEND_POSITION,MSO_AUTO_SIZE,MSO_CONNECTOR,MSO_FILL,MSO_LINE,MSO_LINE_DASH_STYLE,MSO_SHAPE,MSO_SHAPE_TYPE,MSO_THEME_COLOR,PP_ALIGN,PP_PARAGRAPH_ALIGNMENT,PP_PLACEHOLDER,THEME_FONT,SLIDE_SIZES,presentationFor,isDeck}from"./index.js";export const presentation=_(""),slidesFor=E=>({presentation:_(E.file)});
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/slides-core",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{mkdir as f}from"node:fs/promises";import{dirname as m}from"node:path";import{RenderError as p,renderStills as u,requireTools as l}from"@allyhub/render";import{OpenedFilm as g}from"@allyhub/video-measure";import{renderDeckPptx as h}from"./deck-pptx.js";import{deckOf as d}from"./deck-info.js";const w=["pdf","pptx","png"];function y(e){const t=e.piece.title;return typeof t=="string"?t:t===void 0?void 0:t[e.target.combo.lang??""]??Object.values(t)[0]}export async function deckReady(e,t){const n=t.codec;await l(e,typeof n=="string"?n:void 0)}async function x(e,t,n,i){const o=i.params;if(t==="pptx"&&d(e.piece)&&o.pptx!=="picture"){const s=o.slide,c=await h(e,n,typeof s=="number"?{only:s}:{});if(c)return i.onProgress?.(1),{type:t,...c};if(typeof s=="number")throw new p("no-slide",`${e.target.piece} has no slide ${String(s)} to write alone.`)}const r=y(e),a=await u(e,w.includes(t)?t:"cover",{out:n,...o.steps===!0?{steps:!0}:{},...d(e.piece)&&(t==="png"||t==="pptx")?{stills:s=>e.partStills(s.map(c=>({part:c.part.key,step:c.step,width:e.timeline.width,format:"png"})))}:{},...r===void 0?{}:{title:r}});return i.onProgress?.(1),{type:t,files:a.files??[a.out]}}export async function renderDeck(e){if(!e.version)throw new Error("A deck's files are made from a version.");const t=new g(e.version),n=[];for(const i of e.types){const o=e.out(i);await f(m(o),{recursive:!0});try{n.push(await x(t,i,o,e))}catch(r){if(e.signal?.aborted||!(r instanceof p))throw r;n.push({type:i,failure:{code:r.code,message:r.message,...r.hint?{hint:r.hint}:{}}})}}return n}
2
+ import{mkdir as f}from"node:fs/promises";import{dirname as m}from"node:path";import{RenderError as p,renderStills as u,requireTools as l}from"@allyhub/render";import{OpenedFilm as g}from"@allyhub/video-measure";import{renderDeckPptx as h}from"./deck-pptx.js";import{deckOf as d}from"./deck-info.js";const w=["pdf","pptx","png"];function x(e){const t=e.piece.title;return typeof t=="string"?t:t===void 0?void 0:t[e.target.combo.lang??""]??Object.values(t)[0]}export async function deckReady(e,t){const n=t.codec;await l(e,typeof n=="string"?n:void 0)}async function y(e,t,n,i){const o=i.params;if(t==="pptx"&&d(e.piece)&&o.pptx!=="picture"){const s=o.slide,c=await h(e,n,typeof s=="number"?{only:s}:{});if(c)return i.onProgress?.(1),{type:t,...c};if(typeof s=="number")throw new p("no-slide",`${e.target.piece} has no slide ${String(s)} to write alone.`)}if(!w.includes(t))throw new p("unknown-type",`A deck is not made into ${t}: pdf, png or pptx.`);const r=x(e),a=await u(e,t,{out:n,...o.steps===!0?{steps:!0}:{},...d(e.piece)&&(t==="png"||t==="pptx")?{stills:s=>e.partStills(s.map(c=>({part:c.part.key,step:c.step,width:e.timeline.width,format:"png"})))}:{},...r===void 0?{}:{title:r}});return i.onProgress?.(1),{type:t,files:a.files??[a.out]}}export async function renderDeck(e){if(!e.version)throw new Error("A deck's files are made from a version.");const t=new g(e.version),n=[];for(const i of e.types){const o=e.out(i);await f(m(o),{recursive:!0});try{n.push(await y(t,i,o,e))}catch(r){if(e.signal?.aborted||!(r instanceof p))throw r;n.push({type:i,failure:{code:r.code,message:r.message,...r.hint?{hint:r.hint}:{}}})}}return n}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/slides-extension",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./tools": {
@@ -56,6 +56,20 @@
56
56
  "plural": "slides"
57
57
  },
58
58
  "editor": "allyhub.slides.editor",
59
+ "shown": {
60
+ "line": {
61
+ "en": "Decks and carousels, slide by slide",
62
+ "zh-cn": "演示文稿和轮播图,逐张制作",
63
+ "zh-tw": "簡報和輪播圖,逐張製作",
64
+ "ja": "プレゼン資料とカルーセルを1枚ずつ",
65
+ "ko": "프레젠테이션과 캐러셀을 한 장씩",
66
+ "es": "Presentaciones y carruseles, diapositiva a diapositiva",
67
+ "pt": "Apresentações e carrosséis, slide a slide",
68
+ "de": "Präsentationen und Karussells, Folie für Folie",
69
+ "fr": "Présentations et carrousels, diapo par diapo"
70
+ },
71
+ "order": 30
72
+ },
59
73
  "icon": "presentation",
60
74
  "color": "kind-orange",
61
75
  "exports": {
@@ -64,20 +78,8 @@
64
78
  "pdf",
65
79
  "png"
66
80
  ],
67
- "extras": [
68
- "cover"
69
- ],
81
+ "extras": [],
70
82
  "options": [
71
- {
72
- "name": "pptx",
73
- "only": [
74
- "pptx"
75
- ],
76
- "values": [
77
- "native",
78
- "picture"
79
- ]
80
- },
81
83
  {
82
84
  "name": "steps",
83
85
  "only": [
@@ -91,8 +93,7 @@
91
93
  "types": [
92
94
  "pdf",
93
95
  "png",
94
- "pptx",
95
- "cover"
96
+ "pptx"
96
97
  ],
97
98
  "defaults": [
98
99
  "pdf"
@@ -117,6 +118,7 @@
117
118
  "slides"
118
119
  ],
119
120
  "module": "@allyhub/slides-editor",
121
+ "markup": "./markup",
120
122
  "place": {
121
123
  "type": "object",
122
124
  "properties": {
@@ -192,6 +194,10 @@
192
194
  "kind": "chart-data",
193
195
  "about": "A chart's numbers: how many, how far they run, and the file they came from"
194
196
  },
197
+ {
198
+ "kind": "line-ends",
199
+ "about": "A deck: each line's two ends (a connector, or a freeform left open): the arrowhead each has, the shape it is glued to, and the shape nearest it"
200
+ },
195
201
  {
196
202
  "kind": "table-grown",
197
203
  "about": "A deck: a table's rows its words made taller than they are set"