allyhub 0.20.0 → 0.21.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 (287) hide show
  1. package/dist/commands/cloud-tools.js +5 -5
  2. package/dist/commands/frames.js +8 -8
  3. package/dist/commands.json +1 -1
  4. package/dist/help.js +3 -3
  5. package/dist/node_modules/@allyhub/3d-extension/package.json +1 -1
  6. package/dist/node_modules/@allyhub/audio/package.json +1 -1
  7. package/dist/node_modules/@allyhub/blocks/dist/elements.js +1 -1
  8. package/dist/node_modules/@allyhub/blocks/dist/layout.js +1 -1
  9. package/dist/node_modules/@allyhub/blocks/dist/palette.js +1 -1
  10. package/dist/node_modules/@allyhub/blocks/dist/resolve.js +1 -1
  11. package/dist/node_modules/@allyhub/blocks/package.json +1 -1
  12. package/dist/node_modules/@allyhub/browser/package.json +1 -1
  13. package/dist/node_modules/@allyhub/build/package.json +1 -1
  14. package/dist/node_modules/@allyhub/canvas-extension/package.json +1 -1
  15. package/dist/node_modules/@allyhub/canvas-model/package.json +1 -1
  16. package/dist/node_modules/@allyhub/chart/package.json +1 -1
  17. package/dist/node_modules/@allyhub/check/package.json +1 -1
  18. package/dist/node_modules/@allyhub/cloud/dist/call.js +2 -2
  19. package/dist/node_modules/@allyhub/cloud/package.json +1 -1
  20. package/dist/node_modules/@allyhub/components/package.json +1 -1
  21. package/dist/node_modules/@allyhub/dev-server/package.json +1 -1
  22. package/dist/node_modules/@allyhub/diagnostics/package.json +1 -1
  23. package/dist/node_modules/@allyhub/doc/dist/block-shapes.js +2 -0
  24. package/dist/node_modules/@allyhub/doc/dist/blocks.js +1 -1
  25. package/dist/node_modules/@allyhub/doc/dist/docx.js +5 -5
  26. package/dist/node_modules/@allyhub/doc/dist/shapes.js +2 -2
  27. package/dist/node_modules/@allyhub/doc/package.json +1 -1
  28. package/dist/node_modules/@allyhub/doc-extension/dist/cli/import.js +1 -1
  29. package/dist/node_modules/@allyhub/doc-extension/dist/export.js +1 -1
  30. package/dist/node_modules/@allyhub/doc-extension/package.json +1 -1
  31. package/dist/node_modules/@allyhub/doc-print/package.json +1 -1
  32. package/dist/node_modules/@allyhub/export/package.json +1 -1
  33. package/dist/node_modules/@allyhub/extension-api/package.json +1 -1
  34. package/dist/node_modules/@allyhub/extension-host/package.json +1 -1
  35. package/dist/node_modules/@allyhub/formats/dist/data/page-data.d.ts +9 -1
  36. package/dist/node_modules/@allyhub/formats/dist/data/page-data.js +1 -1
  37. package/dist/node_modules/@allyhub/formats/package.json +1 -1
  38. package/dist/node_modules/@allyhub/html-extension/package.json +1 -1
  39. package/dist/node_modules/@allyhub/i18n/package.json +1 -1
  40. package/dist/node_modules/@allyhub/image-draw/package.json +1 -1
  41. package/dist/node_modules/@allyhub/image-extension/package.json +1 -1
  42. package/dist/node_modules/@allyhub/image-extension/skills/allyhub/references/images.md +1 -1
  43. package/dist/node_modules/@allyhub/image-measure/package.json +1 -1
  44. package/dist/node_modules/@allyhub/image-psd/package.json +1 -1
  45. package/dist/node_modules/@allyhub/image-render/package.json +1 -1
  46. package/dist/node_modules/@allyhub/image-runtime/package.json +1 -1
  47. package/dist/node_modules/@allyhub/image-sdk/package.json +1 -1
  48. package/dist/node_modules/@allyhub/jobs/package.json +1 -1
  49. package/dist/node_modules/@allyhub/linkedin-extension/package.json +1 -1
  50. package/dist/node_modules/@allyhub/linkedin-model/package.json +1 -1
  51. package/dist/node_modules/@allyhub/linkedin-view/package.json +1 -1
  52. package/dist/node_modules/@allyhub/linkedin-view/src/style.css +1 -1
  53. package/dist/node_modules/@allyhub/measure/package.json +1 -1
  54. package/dist/node_modules/@allyhub/media/package.json +1 -1
  55. package/dist/node_modules/@allyhub/media-extension/package.json +1 -1
  56. package/dist/node_modules/@allyhub/model/package.json +1 -1
  57. package/dist/node_modules/@allyhub/office-extension/package.json +1 -1
  58. package/dist/node_modules/@allyhub/ooxml/package.json +1 -1
  59. package/dist/node_modules/@allyhub/piece/package.json +1 -1
  60. package/dist/node_modules/@allyhub/project/package.json +1 -1
  61. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +1 -1
  62. package/dist/node_modules/@allyhub/protocol/package.json +1 -1
  63. package/dist/node_modules/@allyhub/registry/package.json +1 -1
  64. package/dist/node_modules/@allyhub/render/package.json +1 -1
  65. package/dist/node_modules/@allyhub/report-extension/LICENSE +241 -0
  66. package/dist/node_modules/@allyhub/report-extension/dist/build.js +3 -0
  67. package/dist/node_modules/@allyhub/report-extension/dist/check.js +37 -0
  68. package/dist/node_modules/@allyhub/report-extension/dist/cli/index.js +4 -0
  69. package/dist/node_modules/@allyhub/report-extension/dist/export.js +2 -0
  70. package/dist/node_modules/@allyhub/report-extension/dist/inline.js +58 -0
  71. package/dist/node_modules/@allyhub/report-extension/dist/page.js +23 -0
  72. package/dist/node_modules/@allyhub/report-extension/dist/project-tools.js +33 -0
  73. package/dist/node_modules/@allyhub/report-extension/dist/styles.js +2 -0
  74. package/dist/node_modules/@allyhub/report-extension/dist/theme.js +2 -0
  75. package/dist/node_modules/@allyhub/report-extension/dist/tools.js +2 -0
  76. package/dist/node_modules/@allyhub/report-extension/dist/workspace.js +2 -0
  77. package/dist/node_modules/@allyhub/report-extension/package.json +185 -0
  78. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/STYLE.md +180 -0
  79. package/dist/node_modules/@allyhub/report-extension/styles/allyhub/style.json +15 -0
  80. package/dist/node_modules/@allyhub/runtime/package.json +1 -1
  81. package/dist/node_modules/@allyhub/runtimes/package.json +1 -1
  82. package/dist/node_modules/@allyhub/scaffold/dist/index.js +5 -5
  83. package/dist/node_modules/@allyhub/scaffold/package.json +1 -1
  84. package/dist/node_modules/@allyhub/scenery/package.json +1 -1
  85. package/dist/node_modules/@allyhub/scenery-host/package.json +1 -1
  86. package/dist/node_modules/@allyhub/sheet/dist/html.js +10 -10
  87. package/dist/node_modules/@allyhub/sheet/dist/index.js +1 -1
  88. package/dist/node_modules/@allyhub/sheet/dist/table-style.js +1 -1
  89. package/dist/node_modules/@allyhub/sheet/dist/theme.js +1 -1
  90. package/dist/node_modules/@allyhub/sheet/dist/tiles.js +1 -1
  91. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +1 -1
  92. package/dist/node_modules/@allyhub/sheet/dist/xlsx/tile-shapes.js +2 -0
  93. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +1 -1
  94. package/dist/node_modules/@allyhub/sheet/package.json +1 -1
  95. package/dist/node_modules/@allyhub/sheet-extension/dist/cli/sheet.js +1 -1
  96. package/dist/node_modules/@allyhub/sheet-extension/package.json +1 -1
  97. package/dist/node_modules/@allyhub/slides-core/dist/capabilities.js +1 -1
  98. package/dist/node_modules/@allyhub/slides-core/package.json +1 -1
  99. package/dist/node_modules/@allyhub/slides-extension/dist/cli/slides.js +1 -1
  100. package/dist/node_modules/@allyhub/slides-extension/package.json +1 -1
  101. package/dist/node_modules/@allyhub/slides-pptx/package.json +1 -1
  102. package/dist/node_modules/@allyhub/slides-runtime/package.json +1 -1
  103. package/dist/node_modules/@allyhub/stage/package.json +1 -1
  104. package/dist/node_modules/@allyhub/stage-page/package.json +1 -1
  105. package/dist/node_modules/@allyhub/stage-runtime/dist/runtime.js +2 -2
  106. package/dist/node_modules/@allyhub/stage-runtime/package.json +1 -1
  107. package/dist/node_modules/@allyhub/telemetry/package.json +1 -1
  108. package/dist/node_modules/@allyhub/text-extension/package.json +1 -1
  109. package/dist/node_modules/@allyhub/video-core/package.json +1 -1
  110. package/dist/node_modules/@allyhub/video-extension/package.json +1 -1
  111. package/dist/node_modules/@allyhub/video-measure/package.json +1 -1
  112. package/dist/node_modules/@allyhub/video-sdk/package.json +1 -1
  113. package/dist/node_modules/@allyhub/website/package.json +1 -1
  114. package/dist/node_modules/@allyhub/website-extension/package.json +1 -1
  115. package/dist/node_modules/@allyhub/x-extension/package.json +1 -1
  116. package/dist/node_modules/@allyhub/x-model/package.json +1 -1
  117. package/dist/node_modules/@allyhub/x-view/package.json +1 -1
  118. package/dist/package.json +15 -14
  119. package/dist/works.js +1 -1
  120. package/editor-web/assets/{abnfDiagram-WEYOIA3C-BkVJMd53.js → abnfDiagram-WEYOIA3C-B4tvwU6C.js} +1 -1
  121. package/editor-web/assets/{architecture-WOLXFQ4H-C6rnaynZ.js → architecture-WOLXFQ4H-V2fA0vY2.js} +1 -1
  122. package/editor-web/assets/{architectureDiagram-ZHVYKT53-D3vrh8LK.js → architectureDiagram-ZHVYKT53-B6B7XN0M.js} +1 -1
  123. package/editor-web/assets/article-DW4eD_8K.js +3 -0
  124. package/editor-web/assets/article-Dm2dIEwc.js +7 -0
  125. package/editor-web/assets/bar-button-CJmpgNg4.js +1 -0
  126. package/editor-web/assets/{blockDiagram-RJAE7QA3-BKngt8H7.js → blockDiagram-RJAE7QA3-BizcUGOM.js} +1 -1
  127. package/editor-web/assets/{c4Diagram-XDPPPE54-j7sUELqF.js → c4Diagram-XDPPPE54-CBHS0dQ0.js} +1 -1
  128. package/editor-web/assets/channel-dyUtlVPg.js +1 -0
  129. package/editor-web/assets/chip-BdQRH3FL.js +1 -0
  130. package/editor-web/assets/{chunk-2E7WHVMD-BXa-uRSi.js → chunk-2E7WHVMD-CMPBck_Q.js} +1 -1
  131. package/editor-web/assets/{chunk-4EMNKR2T-B3ntcsZN.js → chunk-4EMNKR2T-Df22Adpt.js} +1 -1
  132. package/editor-web/assets/{chunk-55XCU76K-AMvnFwUg.js → chunk-55XCU76K-CYrZ6_Q7.js} +1 -1
  133. package/editor-web/assets/{chunk-7S6XSTFO-BA6esfFu.js → chunk-7S6XSTFO-BfdG9NNW.js} +1 -1
  134. package/editor-web/assets/{chunk-AQDTSKZB-BT_vANXs.js → chunk-AQDTSKZB-BCzZMoTJ.js} +1 -1
  135. package/editor-web/assets/{chunk-DSNLSHJZ-DoUgmzGB.js → chunk-DSNLSHJZ-DT0xT8Wf.js} +1 -1
  136. package/editor-web/assets/{chunk-HAGFOTED-DtnIrCZb.js → chunk-HAGFOTED-Bg3-EotU.js} +1 -1
  137. package/editor-web/assets/{chunk-HNE4Q36P-BlPwQx3_.js → chunk-HNE4Q36P-BrSym24V.js} +1 -1
  138. package/editor-web/assets/{chunk-NQOKRVIF-D2r7jp2r.js → chunk-NQOKRVIF-CMxgkJWF.js} +1 -1
  139. package/editor-web/assets/{chunk-UHW7PFBP-Cmc0_F5o.js → chunk-UHW7PFBP-DWEwoyPy.js} +1 -1
  140. package/editor-web/assets/{chunk-VQ5W62QI-nJSMqAr0.js → chunk-VQ5W62QI-eTFh5_T9.js} +1 -1
  141. package/editor-web/assets/{chunk-WQQL4CDK-Btq2nbF6.js → chunk-WQQL4CDK-4PTupr9T.js} +1 -1
  142. package/editor-web/assets/{chunk-YZO67HFG-DTbcCoGt.js → chunk-YZO67HFG-D5XAAFWm.js} +1 -1
  143. package/editor-web/assets/{chunk-ZAUX2LTX-DVwkg-2N.js → chunk-ZAUX2LTX-CPsdaisO.js} +1 -1
  144. package/editor-web/assets/{chunk-ZCHMQSOR-BV39jOOE.js → chunk-ZCHMQSOR-ClnuUyfy.js} +1 -1
  145. package/editor-web/assets/{classDiagram-v2-4MYWR3UA-Cj74-fhM.js → classDiagram-v2-4MYWR3UA-CM21waNF.js} +1 -1
  146. package/editor-web/assets/collaborator-CbTacvkB.js +1 -0
  147. package/editor-web/assets/color-picker-BmKFn2ww.js +1 -0
  148. package/editor-web/assets/{cynefin-EF2NZ3EQ-C0CkiipV.js → cynefin-EF2NZ3EQ-CJUHTgee.js} +1 -1
  149. package/editor-web/assets/{cynefinDiagram-WF24UDRP-hdsnJ4cI.js → cynefinDiagram-WF24UDRP-C9RIfuIV.js} +1 -1
  150. package/editor-web/assets/{dagre-NK4GIZVX-CC7WSgaK.js → dagre-NK4GIZVX-g-01KdpO.js} +1 -1
  151. package/editor-web/assets/deck-C0VxrlzX.js +1 -0
  152. package/editor-web/assets/{diagram-CBK3MWTC-DmaVm13J.js → diagram-CBK3MWTC-CbOjWUu-.js} +1 -1
  153. package/editor-web/assets/{diagram-I5XIIV2D-De8jqp7b.js → diagram-I5XIIV2D-C6psNS8J.js} +1 -1
  154. package/editor-web/assets/{diagram-ODIL2UCW-B5pBTulX.js → diagram-ODIL2UCW-C9PUE46P.js} +1 -1
  155. package/editor-web/assets/{diagram-PFBEJUXE-BYsXg5_w.js → diagram-PFBEJUXE-vJ_pnB33.js} +1 -1
  156. package/editor-web/assets/{diagram-RJA3I4VV-DZ8f6bYe.js → diagram-RJA3I4VV-FwYlEfJ-.js} +1 -1
  157. package/editor-web/assets/{diagram-TYUNFSNR-qXHUsauD.js → diagram-TYUNFSNR-FKpIxeUc.js} +1 -1
  158. package/editor-web/assets/{dist-DAhe-kFC.js → dist-B8_6sJ_V.js} +1 -1
  159. package/editor-web/assets/dist-BI_BaYhO.js +19 -0
  160. package/editor-web/assets/dist-BaWFMuvr.js +1 -0
  161. package/editor-web/assets/dist-BdmMT8fP.js +5 -0
  162. package/editor-web/assets/dist-BgKyM9U6.js +3 -0
  163. package/editor-web/assets/dist-BqijryYd.js +1 -0
  164. package/editor-web/assets/dist-ByguWp3a.js +16 -0
  165. package/editor-web/assets/{dist-9kuRjUTN.js → dist-CB-_0-X4.js} +6 -6
  166. package/editor-web/assets/dist-CCP24Lel.js +19 -0
  167. package/editor-web/assets/{dist-B3rd02Cg.js → dist-Cg0Z26Kv.js} +6 -6
  168. package/editor-web/assets/dist-CtYjYJdv.js +1 -0
  169. package/editor-web/assets/dist-D07Kj8GR.js +1 -0
  170. package/editor-web/assets/dist-D2rGVz9C.js +1 -0
  171. package/editor-web/assets/dist-D3DwRF1k.js +547 -0
  172. package/editor-web/assets/dist-DCI21ljp.js +6 -0
  173. package/editor-web/assets/dist-DH8oJJw9.js +35 -0
  174. package/editor-web/assets/dist-DJvfQvM7.js +24 -0
  175. package/editor-web/assets/dist-DmCDcb2_.js +4 -0
  176. package/editor-web/assets/dist-H0z_DXDz.js +19 -0
  177. package/editor-web/assets/{dist-DA72-4WB.js → dist-QLXI7XGS.js} +1 -1
  178. package/editor-web/assets/{docx-draw-L54blreB.js → docx-draw-Dxb67W2d.js} +1 -1
  179. package/editor-web/assets/{ebnfDiagram-V4P3TTPT-B7-IfVI-.js → ebnfDiagram-V4P3TTPT-DBymUM-F.js} +1 -1
  180. package/editor-web/assets/{elk-QONTBCTQ-Gj_WaeBn.js → elk-QONTBCTQ-BNYR3OlS.js} +1 -1
  181. package/editor-web/assets/{erDiagram-KYQIGQAA-BDF6Qoqx.js → erDiagram-KYQIGQAA-cTNyOqW6.js} +1 -1
  182. package/editor-web/assets/esm-Cl3GKSDd.js +21 -0
  183. package/editor-web/assets/{eventmodeling-K75KTNOO-elxVXXEe.js → eventmodeling-K75KTNOO-C6FUZeXP.js} +1 -1
  184. package/editor-web/assets/eye-DwfE1USj.js +1 -0
  185. package/editor-web/assets/flowDiagram-IUGLLWBU-ukTovy07.js +1 -0
  186. package/editor-web/assets/{ganttDiagram-R7GPNTJY-CEogW3jW.js → ganttDiagram-R7GPNTJY-LD9mqQ1x.js} +1 -1
  187. package/editor-web/assets/{gitGraph-VSP46ZUC-Bh9cRWFa.js → gitGraph-VSP46ZUC-CtCBcQFl.js} +1 -1
  188. package/editor-web/assets/{gitGraphDiagram-PDYL7XHY-BQAvdM_V.js → gitGraphDiagram-PDYL7XHY-DYQpOozz.js} +1 -1
  189. package/editor-web/assets/hint-F4fIBnVU.js +1 -0
  190. package/editor-web/assets/index-Cah2zchD.css +2 -0
  191. package/editor-web/assets/index-omhSywJb.js +28 -0
  192. package/editor-web/assets/{info-OHQRW6UA-CdPrqere.js → info-OHQRW6UA-IXInKPRO.js} +1 -1
  193. package/editor-web/assets/{infoDiagram-MVDRKAX5-uwIMeP44.js → infoDiagram-MVDRKAX5-Ds7Cei7T.js} +1 -1
  194. package/editor-web/assets/{ishikawaDiagram-HPEHV2GE-rtfvqK7E.js → ishikawaDiagram-HPEHV2GE-DWs3qtAX.js} +1 -1
  195. package/editor-web/assets/{journeyDiagram-BOSHW7O7-mmhfIyVG.js → journeyDiagram-BOSHW7O7-BkNKVYBA.js} +1 -1
  196. package/editor-web/assets/{kanban-definition-FNSA4HC5-Fe7jBsi-.js → kanban-definition-FNSA4HC5-D3dMswnI.js} +1 -1
  197. package/editor-web/assets/{mermaid-parser.core-BxOSjBH9.js → mermaid-parser.core-D_W_0X0N.js} +3 -3
  198. package/editor-web/assets/{mermaid.core-BOln9YdH.js → mermaid.core-Bkirj-s5.js} +4 -4
  199. package/editor-web/assets/{mindmap-definition-6OY57UG3-M3Q1LOtO.js → mindmap-definition-6OY57UG3-CMKkAAvI.js} +1 -1
  200. package/editor-web/assets/{packet-JDAUHWVQ-Dbb0TUG6.js → packet-JDAUHWVQ-CzCkgCfg.js} +1 -1
  201. package/editor-web/assets/palette-DchDLJj6.js +1 -0
  202. package/editor-web/assets/panes-BexRuZd2.js +3 -0
  203. package/editor-web/assets/{pegDiagram-ECIUJNBX-BZMRpSFC.js → pegDiagram-ECIUJNBX-C8qHkx7M.js} +1 -1
  204. package/editor-web/assets/{pie-XZMESJXO-Ctm9XdKp.js → pie-XZMESJXO-BJqgxMrD.js} +1 -1
  205. package/editor-web/assets/{pieDiagram-GNMPY74T-cGbs5ZTl.js → pieDiagram-GNMPY74T-DyNntV5y.js} +1 -1
  206. package/editor-web/assets/progress-D1Uv3d1b.js +6 -0
  207. package/editor-web/assets/{quadrantDiagram-D57K4MC3-BUe_zsxT.js → quadrantDiagram-D57K4MC3-BHa-69ir.js} +1 -1
  208. package/editor-web/assets/{radar-ABXABTNO-CCmKtqLs.js → radar-ABXABTNO-BeRPjBBR.js} +1 -1
  209. package/editor-web/assets/{railroad-I3PHUGI6-k-yhjhjA.js → railroad-I3PHUGI6-BaRQqRsK.js} +1 -1
  210. package/editor-web/assets/{railroad-abnf-LNEFI6M7-B-PvntB3.js → railroad-abnf-LNEFI6M7-BZfwomxZ.js} +1 -1
  211. package/editor-web/assets/{railroad-ebnf-DWYD2UWJ-Ds2rua1h.js → railroad-ebnf-DWYD2UWJ-DbgqpEF5.js} +1 -1
  212. package/editor-web/assets/{railroad-peg-JR7BVNR7-jNZ2wEp2.js → railroad-peg-JR7BVNR7-BYOf3PsQ.js} +1 -1
  213. package/editor-web/assets/{railroadDiagram-Y72NRBL7-CTqSQ15w.js → railroadDiagram-Y72NRBL7-B5OAzOsD.js} +1 -1
  214. package/editor-web/assets/{requirementDiagram-EQYSW5RA-CUblhR5M.js → requirementDiagram-EQYSW5RA-wqYNoqO0.js} +1 -1
  215. package/editor-web/assets/ribbon-tabs-B3IC9WOt.js +1 -0
  216. package/editor-web/assets/row-DqS4-5b1.js +1 -0
  217. package/editor-web/assets/{sankeyDiagram-SY24JHO5-nSz6zDX3.js → sankeyDiagram-SY24JHO5-Crf6GRsa.js} +1 -1
  218. package/editor-web/assets/{sequenceDiagram-BLEHNHQU-DxTpOYuo.js → sequenceDiagram-BLEHNHQU-DUcHz4_d.js} +1 -1
  219. package/editor-web/assets/{session-BhClkDyr.js → session--OJYv_B7.js} +1 -1
  220. package/editor-web/assets/{snapshots-DwGHDN3t.js → snapshots-DYooVfOx.js} +1 -1
  221. package/editor-web/assets/{stateDiagram-v2-A6IESKWZ-C3e14iHY.js → stateDiagram-v2-A6IESKWZ-DbeLdnpS.js} +1 -1
  222. package/editor-web/assets/surface-BUoi7cmR.js +1 -0
  223. package/editor-web/assets/swatch-DCmD1gZl.js +1 -0
  224. package/editor-web/assets/{swimlanes-B3ENRKFQ-DPPdzNzu.js → swimlanes-B3ENRKFQ-BDi6AeJI.js} +1 -1
  225. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-2wwOmxbv.js +8 -0
  226. package/editor-web/assets/switch-b6GCy_ix.js +1 -0
  227. package/editor-web/assets/syntax-Bqyhj0dw.js +1 -0
  228. package/editor-web/assets/tablet-C6oePHEW.js +1 -0
  229. package/editor-web/assets/textarea-Bu6uPEqT.js +1 -0
  230. package/editor-web/assets/{timeline-definition-JXYKGLGB-DRTJ1_Er.js → timeline-definition-JXYKGLGB-B0awa2hh.js} +1 -1
  231. package/editor-web/assets/trash-2-SFReAxVM.js +1 -0
  232. package/editor-web/assets/{treeView-D4JQ5SDB-BYJ_m-i5.js → treeView-D4JQ5SDB-C91G0IGm.js} +1 -1
  233. package/editor-web/assets/{treemap-SAJKECNS-BcU6I6Rg.js → treemap-SAJKECNS-CiOWiwl2.js} +1 -1
  234. package/editor-web/assets/updating-D0GEtwnJ.js +1 -0
  235. package/editor-web/assets/{usecaseDiagram-WPOLBNNX-YV92pS4o.js → usecaseDiagram-WPOLBNNX-DMYM1MRe.js} +1 -1
  236. package/editor-web/assets/{vennDiagram-Q3Y3IDCW-oAvfHZtf.js → vennDiagram-Q3Y3IDCW-DQIJ5vvN.js} +1 -1
  237. package/editor-web/assets/{video-SJvDRCJK.js → video-mMOFXHYK.js} +1 -1
  238. package/editor-web/assets/{wardley-7MLQ67FV-BLNiqxtt.js → wardley-7MLQ67FV-C3H9HG8r.js} +1 -1
  239. package/editor-web/assets/{wardleyDiagram-IVAIDKWA-SppgC6xW.js → wardleyDiagram-IVAIDKWA-DgsjqY1Y.js} +1 -1
  240. package/editor-web/assets/{words-BUlNNuH2.js → words-B2jQwWpp.js} +1 -1
  241. package/editor-web/assets/{words-zMedmPWc.js → words-DgMuEmDO.js} +1 -1
  242. package/editor-web/assets/workbook-NtMEyLgf.js +41 -0
  243. package/editor-web/assets/x-BAJilkKD.js +41 -0
  244. package/editor-web/assets/{xychartDiagram-4URNHDU4-BHMn_jwJ.js → xychartDiagram-4URNHDU4-DzsGI527.js} +1 -1
  245. package/editor-web/index.html +5 -6
  246. package/package.json +5 -2
  247. package/editor-web/assets/article-DHf6mOY_.js +0 -7
  248. package/editor-web/assets/article-Dns1-Xh-.js +0 -3
  249. package/editor-web/assets/bar-button-CKPfx2AB.js +0 -1
  250. package/editor-web/assets/channel-CVWSV3su.js +0 -1
  251. package/editor-web/assets/chip-Bn_9JRRG.js +0 -1
  252. package/editor-web/assets/collaborator-XiHOxwGM.js +0 -1
  253. package/editor-web/assets/deck-DQpNIS2p.js +0 -1
  254. package/editor-web/assets/dist--z0ZHp4T.js +0 -16
  255. package/editor-web/assets/dist-B5GOGGEe.js +0 -1
  256. package/editor-web/assets/dist-Bx6q9kCu.js +0 -1
  257. package/editor-web/assets/dist-C4hHtrJr.js +0 -1
  258. package/editor-web/assets/dist-CCXJewsi.js +0 -19
  259. package/editor-web/assets/dist-CfK2BLl8.js +0 -4
  260. package/editor-web/assets/dist-Cmux3oJ_.js +0 -1
  261. package/editor-web/assets/dist-Cspf85KV.js +0 -6
  262. package/editor-web/assets/dist-DOrGo1GD.js +0 -19
  263. package/editor-web/assets/dist-DjiCHlSu.js +0 -35
  264. package/editor-web/assets/dist-Do4a40Wn.js +0 -19
  265. package/editor-web/assets/dist-FKEWS3Co.js +0 -547
  266. package/editor-web/assets/dist-QKd2i6kG.js +0 -5
  267. package/editor-web/assets/dist-SGnOfLhx.js +0 -24
  268. package/editor-web/assets/dist-VmVB7tl4.js +0 -3
  269. package/editor-web/assets/esm-PQD5Pn8a.js +0 -21
  270. package/editor-web/assets/flowDiagram-IUGLLWBU-B-25n8zE.js +0 -1
  271. package/editor-web/assets/hint-CbwoSBMw.js +0 -1
  272. package/editor-web/assets/index-CXisi0Cj.css +0 -2
  273. package/editor-web/assets/index-wMlfx8aT.js +0 -28
  274. package/editor-web/assets/layout-SWqqA0yV.js +0 -1
  275. package/editor-web/assets/progress-DZQTiRLv.js +0 -6
  276. package/editor-web/assets/ribbon-DajdQ_Ya.js +0 -1
  277. package/editor-web/assets/row-Bei9HNEe.js +0 -1
  278. package/editor-web/assets/split-DBAbwPZ5.js +0 -3
  279. package/editor-web/assets/surface-CIF0Ae0z.js +0 -1
  280. package/editor-web/assets/swatch-BUzr_XmH.js +0 -1
  281. package/editor-web/assets/swimlanesDiagram-AYQRV4AK-B8n3zOw_.js +0 -8
  282. package/editor-web/assets/switch-DrZxoPQS.js +0 -1
  283. package/editor-web/assets/syntax-emXV4DnN.js +0 -1
  284. package/editor-web/assets/tabs-BwU2E7bU.js +0 -1
  285. package/editor-web/assets/textarea-BX_ax3X8.js +0 -1
  286. package/editor-web/assets/type-CvZ0HZsV.js +0 -41
  287. package/editor-web/assets/workbook-BZKYx4WB.js +0 -41
@@ -1,2 +1,2 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{CHARTEX_COLORS_REL as Se,CHARTEX_COLORS_TYPE as ke,CHARTEX_REL as Ee,CHARTEX_STYLE_REL as Ae,CHARTEX_STYLE_TYPE as Ce,CHARTEX_TYPE as Te,chartExColorsXml as _e,chartExStyleXml as Re,isExtended as Le}from"@allyhub/chart";import{EXCEL_CELL_STYLE_IDS as Me,themeTitle as Fe,SHEET_MARGINS as Ie,SHEET_NOTE_AUTHOR as ie,SHEET_PAPERS as Oe}from"@allyhub/formats";import{MAX_COLUMNS as G,MAX_ROWS as Z,cellName as D,columnIndex as ae,columnLetter as V,rangeName as L,readAddress as le,readArea as je}from"../address.js";import{analyse as De}from"../calc/analyse.js";import{sparklineGroupXml as Pe}from"../sparklines.js";import{lookColorIn as ce}from"../theme.js";import{ITERATION_DEFAULTS as de}from"../calc/engine.js";import{parseFormula as Ne}from"../formula/parse.js";import{sheetPrefix as J}from"../formula/print.js";import{walk as fe}from"../formula/walk.js";import{fileCells as Ve,isPicture as Xe,pictureHeight as ze,pictureSize as he}from"../files.js";import{scenariosByCell as He}from"../scenario.js";import{CellError as U,readTyped as Ue}from"../values.js";import{FormulaCell as Be,runsText as We}from"../workbook.js";import{chartPart as qe,drawingPart as Ye}from"./charts.js";import{tileChart as ue,tileSize as Ge}from"../tiles.js";import{fileFormula as B,needsArray as K}from"./formula.js";import{GRID_END as Q}from"./read.js";import{Styles as Ze,runXml as Je}from"./styles.js";import{themeXml as Ke}from"./theme.js";import{HEAD as A,NS as C,el as o,xstring as $}from"./xml.js";import{ZipOut as Qe}from"./zip.js";const T={comments:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",sheet:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",worksheet:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",styles:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",strings:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",theme:"application/vnd.openxmlformats-officedocument.theme+xml",table:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",metadata:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",drawing:"application/vnd.openxmlformats-officedocument.drawing+xml",chart:"application/vnd.openxmlformats-officedocument.drawingml.chart+xml",core:"application/vnd.openxmlformats-package.core-properties+xml",app:"application/vnd.openxmlformats-officedocument.extended-properties+xml"},E=`${C.rel}/`,ee="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main",te="http://schemas.microsoft.com/office/excel/2006/main",et=/\.(tiff?|bmp|emf|wmf)$/iu,tt={jpg:"jpeg",emf:"x-emf",wmf:"x-wmf"},ne={conditional:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}",validations:"{CCE6A557-97BC-4b89-ADB6-D9C93CAAB3DF}",sparklines:"{05C60535-1F16-4fd2-B633-F4F36F0B64E0}"},nt=191029;export const DEFAULT_TABLE_STYLE="TableStyleMedium2",LISTS_SHEET="AllyHub lists";const st=64,ot=7,rt=a=>Math.min(255,Math.floor(a/ot*256)/256),it=a=>Math.min(409.5,a*3/4),W=32767,at=255,lt=2e5,ct=o("metadata",{xmlns:C.main,"xmlns:xda":"http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray"},o("metadataTypes",{count:1},o("metadataType",{name:"XLDAPR",minSupportedVersion:12e4,copy:1,pasteAll:1,pasteValues:1,merge:1,splitFirst:1,rowColShift:1,clearFormats:1,clearComments:1,assign:1,coerce:1,cellMeta:1})),o("futureMetadata",{name:"XLDAPR",count:1},o("bk",{},o("extLst",{},o("ext",{uri:"{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}"},o("xda:dynamicArrayProperties",{fDynamic:1,fCollapsed:0}))))),o("cellMetadata",{count:1},o("bk",{},o("rc",{t:1,v:0}))));class dt{index=new Map;count=0;place(t){this.count+=1;let n=this.index.get(t);return n===void 0&&(n=this.index.size,this.index.set(t,n)),n}of(t){return this.place(`t${t}`)}rich(t){return this.place(`r${t}`)}write(t){t.write(`${A}<sst xmlns="${C.main}" count="${String(this.count)}" uniqueCount="${String(this.index.size)}">`);for(const n of this.index.keys()){if(n.startsWith("r")){t.write(`<si>${n.slice(1)}</si>`);continue}const e=n.slice(1),s=/^\s|\s$|\n/u.test(e);t.write(`<si><t${s?' xml:space="preserve"':""}>${$(e)}</t></si>`)}t.write("</sst>"),t.end()}}function ft(a){let t=!1;return a&&fe(a,n=>{(n.kind==="structured"||n.kind==="ref"&&n.sheet!==void 0)&&(t=!0)}),t}function ht(a){for(const t in a)if(Object.hasOwn(a,t))return!1;return!0}const ut=a=>o("x",a).slice(2,-2),mt="Base case";function pt(a){const t=new Map;for(const s of a.scenarios)for(const r of s.cells)t.set(D(r),r);const n=(s,r)=>o("inputCells",{r:D(s),val:r===null||r instanceof U?"":typeof r=="boolean"?r?"1":"0":String(r)}),e=(s,r)=>o("scenario",{name:s,locked:!0,count:r.length,user:"AllyHub"},r.join(""));return o("scenarios",{current:0,show:0,sqref:[...t.keys()].join(" ")},e(mt,[...t.values()].map(s=>n(s,s.base))),...a.scenarios.map(s=>e(s.name,s.cells.map(r=>n(r,r.value)))))}function me(a){return[...a.charts,...a.tiles.flatMap(t=>ue(a,t).chart??[])]}function gt(a,t,n,e,s){const r=[];let l=0;for(const{row:i,col:d,paths:h,column:u}of Ve(a,t)){let m=0;const y=ze(u);for(const w of h){const p=Xe(w)?n?.(w):void 0,v=p&&he(p);if(!p||!v){l+=1;continue}const S=Math.round(v.width/v.height*y);r.push({row:i,col:d,x:m,width:S,height:y,name:w.split("/").pop()??w,path:w,file:`.${v.type==="jpeg"?"jpg":v.type}`,bytes:p}),m+=S+4}}let f=0;for(const i of a.spec.pictures??[]){const d=le(i.at),h=n?.(i.file);if(!d||!h)continue;const u=he(h),m=u?.type??et.exec(i.file)?.[1]?.toLowerCase(),y=i.width!==void 0&&i.height!==void 0?{width:i.width,height:i.height}:void 0,w=u??y;if(m===void 0||w===void 0){f+=1;continue}const p=w.width/w.height,v=i.width??(i.height===void 0?w.width:i.height*p);r.push({row:d.row,col:d.col,x:i.x??0,y:i.y??0,width:Math.round(v),height:Math.round(i.height??v/p),name:i.file.split("/").pop()??i.file,path:i.file,file:`.${m==="jpeg"?"jpg":m==="tif"?"tiff":m}`,bytes:h})}let c=0;for(const i of a.tiles){if(ue(a,i).chart)continue;const d=s?.(a,i);if(!d){c+=1;continue}const h=Ge(i);r.push({row:i.at.row,col:i.at.col,x:i.spec.x??0,y:i.spec.y??0,width:h.width,height:h.height,name:`${i.kind} ${String(i.index+1)}`,path:d.alt,file:".png",bytes:d.png})}return c>0&&e.push(`${a.name}: ${String(c)} block${c===1?"":"s"} over the cells, not drawn`),f>0&&e.push(`${a.name}: ${String(f)} picture${f===1?"":"s"} of a kind a file cannot hold, or with no size given`),l>0&&e.push(`${a.name}: ${String(l)} file${l===1?"":"s"} in a cell, which stay${l===1?"s":""} a name`),r}class xt{name;columns=[];known=new Map;constructor(t){let n=LISTS_SHEET;for(let e=2;t.sheet(n);e++)n=`${LISTS_SHEET} (${String(e)})`;this.name=n}place(t){const n=JSON.stringify(t);let e=this.known.get(n);e===void 0&&(e=this.columns.length,this.columns.push(t),this.known.set(n,e));const s=V(e);return`${J(this.name)}$${s}$1:$${s}$${String(Math.max(1,t.length))}`}xml(t){const n=[],e=Math.max(0,...this.columns.map(s=>s.length));for(let s=0;s<e;s++){let r=`<row r="${String(s+1)}">`;this.columns.forEach((l,f)=>{const c=l[s];c!==void 0&&(r+=`<c r="${D({row:s,col:f})}" t="s"><v>${String(t.of(c))}</v></c>`)}),n.push(`${r}</row>`)}return`${A}<worksheet xmlns="${C.main}" xmlns:r="${C.rel}"><dimension ref="${L({top:0,left:0,bottom:Math.max(0,e-1),right:Math.max(0,this.columns.length-1)})}"/><sheetViews><sheetView workbookViewId="0"/></sheetViews><sheetFormatPr defaultRowHeight="15"/><sheetData>${n.join("")}</sheetData><pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/></worksheet>`}}class wt{rows=new Int32Array(1024);cols=new Int32Array(1024);size=0;add(t,n){if(this.size===this.rows.length){const e=new Int32Array(this.size*2);e.set(this.rows),this.rows=e;const s=new Int32Array(this.size*2);s.set(this.cols),this.cols=s}this.rows[this.size]=t,this.cols[this.size]=n,this.size+=1}byRow(){const{size:t}=this;if(t===0)return{start:new Uint32Array(1),cols:new Int32Array(0),top:0,used:void 0};let n=1/0,e=-1,s=1/0,r=-1;for(let i=0;i<t;i++){const d=this.rows[i]??0,h=this.cols[i]??0;d<n&&(n=d),d>e&&(e=d),h<s&&(s=h),h>r&&(r=h)}const l=new Uint32Array(e-n+2);for(let i=0;i<t;i++){const d=(this.rows[i]??0)-n+1;l[d]=(l[d]??0)+1}for(let i=1;i<l.length;i++)l[i]=(l[i]??0)+(l[i-1]??0);const f=l.slice(0,-1),c=new Int32Array(t);for(let i=0;i<t;i++){const d=(this.rows[i]??0)-n,h=f[d]??0;c[h]=this.cols[i]??0,f[d]=h+1}return{start:l,cols:c,top:n,used:{top:n,bottom:e,left:s,right:r}}}}function $t(a,t){if(!a)return!1;let n=!1;const e=t.toLowerCase();return fe(a,s=>{(s.kind==="ref"||s.kind==="name")&&s.sheet!==void 0&&s.sheet.toLowerCase()!==e&&(n=!0)}),n}const yt=(a,t)=>`{00000000-0000-4000-8000-${(a*65536+t).toString(16).toUpperCase().padStart(12,"0")}}`;class bt{arrays=!1;sheet;calc;styles;strings;wb;cached;left;lists;index;isTable;isRangeName;hiddenRows;tall;scenarios;drawn;newerRules=[];newerValidations=[];misgiven=new Set;shapes=new Map;groups=new Map;constructor(t,n,e,s,r,l,f,c,i=[],d){this.sheet=t,this.calc=n,this.wb=n.wb,this.styles=e,this.strings=s,this.cached=r,this.left=l,this.lists=f,this.index=c,this.isTable=u=>this.wb.table(u)!==void 0,this.isRangeName=u=>{const m=this.wb.name(u,t)?.formula?.node;return this.isTable(u)||m!==void 0&&K({kind:"unary",op:"-",arg:m})},this.hiddenRows=n.filtered(t),this.scenarios=d,this.drawn=me(t).length>0||i.length>0;const h=new Map;for(const u of i)u.y===void 0&&h.set(u.row,Math.max(h.get(u.row)??0,u.height));this.tall=h}grid(){const{sheet:t}=this;if(t.lastRow>=Z)throw new Error(`${t.name} reaches row ${(t.lastRow+1).toLocaleString("en-US")}, and ${Q}: an Excel file cannot hold it.`);if(t.columnsUsed>G)throw new Error(`${t.name} reaches past column ${V(G-1)}, and ${Q}: an Excel file cannot hold it.`);for(const n of Object.keys(t.spec.rows??{}))if(Number(n)>Z)throw new Error(`${t.name} sets row ${n}, and ${Q}: an Excel file cannot hold it.`)}gather(){const{sheet:t}=this,n=new wt;for(let e=0;e<t.columnsUsed;e++){const[s,r]=t.span(e,0,Number.MAX_SAFE_INTEGER);for(let l=s;l<=r;l++)(t.at(l,e)!==void 0||t.spillAt(l,e))&&n.add(l,e)}for(const{area:e}of t.styledAreas()){const s=(e.bottom-e.top+1)*(e.right-e.left+1);if(s>lt){this.left.push(`${t.name}!${L(e)}: its look on the cells that hold something, ${String(s)} cells being too many to write empty`);continue}for(let r=e.top;r<=e.bottom;r++)for(let l=e.left;l<=e.right;l++)n.add(r,l)}for(const e of t.keys.keys())n.add(Math.floor(e/16384),e%16384);return n.byRow()}styleOf(t,n){const e=this.sheet.lookAt(t,n);return ht(e)?void 0:this.styles.xf(e)}held(t,n){return n.length<=W?n:(this.left.push(`${this.sheet.name}!${t} past Excel's ${String(W)} characters, of its ${String(n.length)}`),n.slice(0,W))}value(t,n,e){return e===null?`<c r="${t}"${k(n)}/>`:typeof e=="number"?`<c r="${t}"${k(n)}><v>${String(e)}</v></c>`:typeof e=="boolean"?`<c r="${t}"${k(n)} t="b"><v>${e?"1":"0"}</v></c>`:e instanceof U?we(e)?`<c r="${t}"${k(n)} t="e"><v>${e.code}</v></c>`:`<c r="${t}"${k(n)} t="s"><v>${String(this.strings.of(e.code))}</v></c>`:`<c r="${t}"${k(n)} t="s"><v>${String(this.strings.of(this.held(t,e)))}</v></c>`}dataTable(t,n,e,s){const r=this.value(t,n,s),{shared:l}=e;if(e.row!==l.atRow||e.col!==l.atCol)return r;const f=l.node,c=p=>{if(p===void 0||p.kind==="missing")return null;if(!(p.kind!=="ref"||p.sheet!==void 0||!p.row||!p.col))return D({row:p.row.index,col:p.col.index})},i=f?.kind==="call"?f.args:[],d=c(i[0]),h=c(i[1]);if(d===void 0||h===void 0||d===null&&h===null)return this.left.push(`${this.sheet.name}!${t}: a data table whose inputs a file cannot hold, as its values`),r;const m=this.sheet.fills.find(p=>p.shared===l)?.area??{top:e.row,left:e.col,bottom:e.row,right:e.col},y=d!==null&&h!==null?{dt2D:!0,dtr:!0,r1:d,r2:h}:d!==null?{dtr:!0,r1:d}:{dtr:!1,r1:h??""},w=o("f",{t:"dataTable",ref:L(m),...y});return typeof s=="string"?`<c r="${t}"${k(n)} t="str">${w}<v>${$(s)}</v></c>`:r.includes("<v>")?r.replace("<v>",`${w}<v>`):r.replace("/>",`>${w}</c>`)}table(t){return this.sheet.tableAt(t.row,t.col)?.name}formula(t,n,e){const s=this.calc.value(e.sheet,e.row,e.col),{shared:r}=e,{node:l}=r;if(!l)return`<c r="${t}"${k(n)} t="e"><v>#NAME?</v></c>`;if(l.kind==="call"&&l.name==="TABLE"&&l.args.length<=2)return this.dataTable(t,n,e,s);const f=(r.analysis??=De(this.wb,r)).arguments[0];if(f!==void 0)return this.misgiven.has(r)||(this.misgiven.add(r),this.left.push(`${this.sheet.name}!${t}: a formula's value, not the formula, as ${f.name} is given ${String(f.given)} arguments`)),this.value(t,n,s);let c=this.shapes.get(r);c===void 0&&(c=K(l,this.isRangeName),this.shapes.set(r,c));const i=e.array!==void 0||e.blocked!==void 0||c;let d=i?void 0:this.groups.get(r);d?.written===!1&&(e.row!==d.ref.top||e.col!==d.ref.left)&&(d=void 0);let h,u="";if(d?.written===!0)h=`<f t="shared" si="${String(d.si)}"/>`;else{const m=B(e.moved,{table:this.table(e),isTable:this.isTable,array:i});h=d?`<f t="shared" ref="${L(d.ref)}" si="${String(d.si)}">${$(m)}</f>`:`<f>${$(m)}</f>`,d&&(d.written=!0),i&&(h=this.arrayFormula(e,m))}return i&&(this.arrays=!0,u=' cm="1"'),this.cached?s===null||typeof s=="number"?`<c r="${t}"${k(n)}${u}>${h}<v>${String(s??0)}</v></c>`:typeof s=="boolean"?`<c r="${t}"${k(n)} t="b"${u}>${h}<v>${s?"1":"0"}</v></c>`:s instanceof U?we(s)?`<c r="${t}"${k(n)} t="e"${u}>${h}<v>${s.code}</v></c>`:s.code==="#CYCLE!"?`<c r="${t}"${k(n)}${u}>${h}<v>0</v></c>`:`<c r="${t}"${k(n)} t="e"${u}>${h}<v>#VALUE!</v></c>`:`<c r="${t}"${k(n)} t="str"${u}>${h}<v>${$(this.held(t,s))}</v></c>`:`<c r="${t}"${k(n)}${u}>${h}</c>`}arrayFormula(t,n){const e=t.spill??{top:t.row,left:t.col,bottom:t.row,right:t.col};return`<f t="array" ref="${L(e)}">${$(n)}</f>`}shareFormulas(){const t=new Map;for(const e of this.sheet.formulas){const s=t.get(e.shared);if(!s)t.set(e.shared,{area:{top:e.row,bottom:e.row,left:e.col,right:e.col},first:e,n:1});else{const{area:r}=s;e.row<r.top&&(r.top=e.row),e.row>r.bottom&&(r.bottom=e.row),e.col<r.left&&(r.left=e.col),e.col>r.right&&(r.right=e.col),(e.row<s.first.row||e.row===s.first.row&&e.col<s.first.col)&&(s.first=e),s.n+=1}}let n=0;for(const[e,{area:s,first:r,n:l}]of t)l>1&&r.row===s.top&&r.col===s.left&&!ft(e.node)&&(this.groups.set(e,{si:n,ref:s,written:!1}),n+=1)}cell(t,n){const e=D({row:t,col:n}),s=this.styleOf(t,n),r=this.sheet.at(t,n);if(r instanceof Be)return this.formula(e,s,r);const l=typeof r=="string"?this.sheet.runsAt(t,n):void 0;if(l&&We(l).length<=W){const f=this.sheet.lookAt(t,n);return`<c r="${e}"${k(s)} t="s"><v>${String(this.strings.rich(l.map(c=>Je(c,f)).join("")))}</v></c>`}return r===void 0&&this.cached&&this.sheet.spillAt(t,n)?this.value(e,s,this.calc.value(this.sheet,t,n)):this.value(e,s,r??null)}columns(){const{sheet:t}=this,{spec:n}=t,e=new Map,s=new Map;for(const c of t.tables)for(const i of c.columns)i.spec?.width!==void 0&&s.set(c.at.col+i.index,i.spec.width);const r=new Set(s.keys()),l=new Map;for(const[c,i]of Object.entries(n.columns??{})){const d=ae(c);d!==void 0&&(l.set(d,i),r.add(d))}for(const c of[...l.keys()])for(const i of[-1,1])c+i>=0&&this.collapsedColumn(c+i)&&r.add(c+i);for(const c of r){const i=l.get(c),d=i?.width??s.get(c),h=$e(i);e.set(c,o("col",{min:c+1,max:c+1,width:rt(d??st),style:h===void 0?void 0:this.styles.xf(h),hidden:i?.hidden===!0?!0:void 0,customWidth:d===void 0?void 0:!0,outlineLevel:i?.level,collapsed:this.collapsedColumn(c)?!0:void 0}))}const f=[...e.keys()].sort((c,i)=>c-i).map(c=>e.get(c)??"");return f.length===0?"":`<cols>${f.join("")}</cols>`}rowAttrs(t){const n=this.sheet.spec.rows?.[String(t+1)],e=$e(n),s=n?.height??this.tall.get(t);return ut({r:t+1,s:e===void 0?void 0:this.styles.xf(e),customFormat:e===void 0?void 0:!0,ht:s===void 0?void 0:it(s),customHeight:s===void 0?void 0:!0,hidden:n?.hidden===!0||this.hiddenRows.has(t)?!0:void 0,outlineLevel:n?.level,collapsed:this.collapsedRow(t)?!0:void 0})}collapsedRow(t){const n=this.sheet.spec.rows??{},e=f=>n[String(f+1)]?.level??0,s=f=>n[String(f+1)]?.hidden===!0||this.hiddenRows.has(f),r=this.sheet.spec.outline?.summary_below===!1?1:-1,l=t+r;return l>=0&&e(l)>e(t)&&s(l)}collapsedColumn(t){const n=this.sheet.spec.columns??{},e=l=>n[V(l)],s=this.sheet.spec.outline?.summary_right===!1?1:-1,r=t+s;return r>=0&&(e(r)?.level??0)>(e(t)?.level??0)&&e(r)?.hidden===!0}rows(t,n){const{sheet:e}=this,s=new Set(this.hiddenRows);for(const d of Object.keys(e.spec.rows??{})){const h=Number(d)-1;s.add(h);for(const u of[-1,1])h+u>=0&&this.collapsedRow(h+u)&&s.add(h+u)}const{start:r,cols:l,top:f}=n;let c=n.used?f:1/0,i=n.used?n.used.bottom:-1;for(const d of s)d<c&&(c=d),d>i&&(i=d);for(let d=Math.max(0,c);d<=i;d++){const h=d-f,u=h>=0&&h<r.length-1?r[h]??0:0,m=h>=0&&h<r.length-1?r[h+1]??0:0;if(u===m&&!s.has(d))continue;if(u===m){t.write(`<row${this.rowAttrs(d)}/>`);continue}const y=l.subarray(u,m).sort();let w=`<row${this.rowAttrs(d)}>`,p=-1;for(const v of y)v!==p&&(p=v,w+=this.cell(d,v));t.write(`${w}</row>`)}}view(t){const{freeze:n}=this.sheet;let e="";if(n&&(n.row>0||n.col>0)){const s=n.row>0&&n.col>0?"bottomRight":n.row>0?"bottomLeft":"topRight";e=o("pane",{xSplit:n.col>0?n.col:void 0,ySplit:n.row>0?n.row:void 0,topLeftCell:D(n),activePane:s,state:"frozen"})}return o("sheetViews",{},o("sheetView",{showGridLines:this.sheet.spec.gridlines===!1?!1:void 0,tabSelected:t?!0:void 0,workbookViewId:0},e))}write(t,n,e){const{sheet:s}=this;this.grid();const r=this.gather();this.shareFormulas();const l=s.tables.map((S,_)=>o("tablePart",{"r:id":`rId${String(_+1)}`})),{print:f}=s.spec,c=f?.fit,i=Object.keys(s.spec.notes??{}).length>0,d=s.spec.outline,h=d?.summary_below===!1||d?.summary_right===!1?o("outlinePr",{summaryBelow:d.summary_below===!1?!1:void 0,summaryRight:d.summary_right===!1?!1:void 0}):"";t.write(`${A}<worksheet xmlns="${C.main}" xmlns:r="${C.rel}">`+(s.spec.tab===void 0&&c===void 0&&h===""?"":o("sheetPr",{},s.spec.tab===void 0?"":o("tabColor",{rgb:`FF${s.spec.tab.slice(1).toUpperCase()}`}),h,c===void 0?"":o("pageSetUpPr",{fitToPage:!0})))+o("dimension",{ref:r.used?L(r.used):"A1"})+this.view(n)+o("sheetFormatPr",{defaultRowHeight:15,outlineLevelRow:pe(s.spec.rows),outlineLevelCol:pe(s.spec.columns)})+this.columns()+"<sheetData>"),this.rows(t,r);const u=l.length+1+(this.drawn?1:0)+(i?2:0);let m=0;const y=Object.entries(s.spec.links??{}).map(([S,_])=>_.startsWith("#")?o("hyperlink",{ref:S,location:_.slice(1)}):o("hyperlink",{ref:S,"r:id":`rId${String(u+m++)}`})),w=s.merges.map(S=>o("mergeCell",{ref:L(S)})),p=s.conditions.map((S,_)=>this.condition(S,_+1)).join(""),v=this.validations();return t.write("</sheetData>"+(s.spec.protect===!0?o("sheetProtection",{sheet:!0,objects:!0,scenarios:!0}):"")+(this.scenarios?pt(this.scenarios):"")+this.sheetFilter()+(w.length>0?o("mergeCells",{count:w.length},w.join("")):"")+p+v+(y.length>0?o("hyperlinks",{},y.join("")):"")+o("pageMargins",{...Ie,...f?.margins})+(f?.orientation!==void 0||f?.paper!==void 0||f?.scale!==void 0||c!==void 0?o("pageSetup",{paperSize:f?.paper===void 0?void 0:Oe[f.paper],scale:f?.scale,fitToWidth:c?.width,fitToHeight:c?.height,orientation:f?.orientation}):"")+(f?.header||f?.footer?o("headerFooter",{},f.header?o("oddHeader",{},$(ge(f.header))):"",f.footer?o("oddFooter",{},$(ge(f.footer))):""):"")+Ft(f?.breaks)+(this.drawn?o("drawing",{"r:id":`rId${String(l.length+1)}`}):"")+(i?o("legacyDrawing",{"r:id":`rId${String(l.length+(this.drawn?2:1))}`}):"")+(l.length>0?o("tableParts",{count:l.length},l.join("")):"")+this.extensions()+"</worksheet>"),t.end(),s.tables.map((S,_)=>this.tableXml(S,e+_))}extensions(){const t=[];if(this.newerRules.length>0&&t.push(o("ext",{uri:ne.conditional,"xmlns:x14":ee},o("x14:conditionalFormattings",{},this.newerRules.join("")))),this.newerValidations.length>0&&t.push(o("ext",{uri:ne.validations,"xmlns:x14":ee},o("x14:dataValidations",{count:this.newerValidations.length,"xmlns:xm":te},this.newerValidations.join("")))),this.sheet.sparklines.length>0){const n=this.wb.colors;t.push(o("ext",{uri:ne.sparklines,"xmlns:x14":ee},o("x14:sparklineGroups",{"xmlns:xm":te},this.sheet.sparklines.map(e=>Pe(e,{series:ce(e.spec.color??"accent1",n),marks:ce(e.spec.marks??"#D00000",n)})).join(""))))}return t.length===0?"":o("extLst",{},t.join(""))}bound(t){if(t===void 0)return"";if(typeof t=="number")return String(t);if(!t.startsWith("=")){const e=Ue(t);return typeof e.value=="number"&&e.formula===void 0?String(e.value):`"${t.replaceAll('"','""')}"`}const n=Ne(t);return n.ok?B(n.node,{isTable:this.isTable,array:!0}):t.slice(1)}cfvo(t,n){const e=t.value===void 0?void 0:typeof t.value=="number"?String(t.value):this.bound(t.value);return n?o("x14:cfvo",{type:t.at},e===void 0?"":o("xm:f",{},$(e))):o("cfvo",{type:t.at,val:e})}crosses(t){return t.some(n=>$t(n?.node,this.sheet.name))}condition(t,n){const{spec:e}=t,s=e.range,r=e.type!=="dataBar"&&this.crosses(t.formulas),l=(h,u,...m)=>{if(!r){const y=Object.keys(u).length===0?void 0:this.styles.dxf(u);return o("conditionalFormatting",{sqref:s},o("cfRule",{...h,dxfId:y,priority:n,stopIfTrue:e.stop===!0?!0:void 0},...m))}return this.newerRules.push(o("x14:conditionalFormatting",{"xmlns:xm":te},o("x14:cfRule",{...h,priority:n,stopIfTrue:e.stop===!0?!0:void 0,id:yt(this.index,n)},...m.map(y=>y.replace(/^<formula>(.*)<\/formula>$/su,"<xm:f>$1</xm:f>")),Object.keys(u).length===0?"":this.styles.dxfXml(u,"x14:dxf")),o("xm:sqref",{},s))),""},f=Et(e),c=t.areas[0],i=c?D({row:c.top,col:c.left}):"A1",d=h=>o("formula",{},$(h));switch(e.type){case"cellIs":return l({type:"cellIs",operator:e.operator},f,...e.formula.map(h=>d(this.bound(h))));case"containsText":{const h=e.operator??"contains",u=`"${e.text.replaceAll('"','""')}"`,m=h==="contains"?`NOT(ISERROR(SEARCH(${u},${i})))`:h==="notContains"?`ISERROR(SEARCH(${u},${i}))`:h==="beginsWith"?`LEFT(${i},LEN(${u}))=${u}`:`RIGHT(${i},LEN(${u}))=${u}`;return l({type:h==="contains"?"containsText":h==="notContains"?"notContainsText":h,operator:h==="contains"?"containsText":h,text:e.text},f,d(m))}case"duplicateValues":case"uniqueValues":return l({type:e.type},f);case"top10":return l({type:"top10",percent:e.percent===!0?!0:void 0,bottom:e.bottom===!0?!0:void 0,rank:e.rank},f);case"aboveAverage":return l({type:"aboveAverage",aboveAverage:e.below===!0?!1:void 0,equalAverage:e.equal===!0?!0:void 0},f);case"expression":return l({type:"expression"},f,d(this.bound(e.formula.startsWith("=")?e.formula:`=${e.formula}`)));case"dataBar":return l({type:"dataBar"},{},o("dataBar",{showValue:e.show===!1?!1:void 0},this.cfvo(e.min??{at:"min"},!1),this.cfvo(e.max??{at:"max"},!1),o("color",{rgb:xe(e.color)})));case"colorScale":{const h=r?"x14:":"";return l({type:"colorScale"},{},o(`${h}colorScale`,{},...e.stops.map(u=>this.cfvo(u,r)),...e.stops.map(u=>o(`${h}color`,{rgb:xe(u.color)}))))}case"iconSet":{const h=Number.parseInt(e.icons,10),u=e.stops??Array.from({length:h},(m,y)=>({at:"percent",value:Math.round(y*100/h)}));return l({type:"iconSet"},{},o(r?"x14:iconSet":"iconSet",{iconSet:e.icons,showValue:e.show===!1?!1:void 0,reverse:e.reverse===!0?!0:void 0},...u.map(m=>this.cfvo(m,r))))}}}validation(t){const{spec:n}=t;let e="",s=this.crosses(t.formulas);if(n.values){const i=n.values.join(",");i.length>at||n.values.some(d=>d.includes(",")||d.includes('"'))?(e=this.lists.place(n.values),s=!0):e=`"${i}"`}else e=this.bound(n.formula?.[0]);const r=this.bound(n.formula?.[1]),{error:l,prompt:f}=n;n.multiple===!0&&this.left.push(`${this.sheet.name}!${n.range}: several choices in a cell: its text stays, and Excel's list offers one at a time`);const c={type:n.type,errorStyle:l?.style===void 0||l.style==="stop"?void 0:l.style,operator:n.operator===void 0||n.operator==="between"?void 0:n.operator,allowBlank:n.blank===!1?void 0:!0,showDropDown:n.dropdown===!1?!0:void 0,showInputMessage:f?.show===!1?void 0:!0,showErrorMessage:l?.show===!1||n.multiple===!0?void 0:!0,errorTitle:l?.title,error:l?.message,promptTitle:f?.title,prompt:f?.message};return s?(this.newerValidations.push(o("x14:dataValidation",c,e===""?"":o("x14:formula1",{},o("xm:f",{},$(e))),r===""?"":o("x14:formula2",{},o("xm:f",{},$(r))),o("xm:sqref",{},n.range))),""):o("dataValidation",{...c,sqref:n.range},e===""?"":o("formula1",{},$(e)),r===""?"":o("formula2",{},$(r)))}validations(){const t=this.sheet.validations.map(n=>this.validation(n)).filter(n=>n!=="");return t.length===0?"":o("dataValidations",{count:t.length},t.join(""))}filterColumns(t){return[...t.columns.entries()].sort(([n],[e])=>n-e).map(([n,e])=>At(n-t.area.left,e,s=>this.styles.dxf(s)))}sheetFilter(){const t=this.sheet.filters.find(n=>!n.table);return t?o("autoFilter",{ref:L(t.area)},...this.filterColumns(t)):""}columnFormula(t,n){if(!n?.node)return"";const e=K(n.node,this.isRangeName),s=B(n.node,{table:t.name,isTable:this.isTable,array:e});return o("calculatedColumnFormula",{array:e?!0:void 0},$(s))}tableXml(t,n){const e=t.area,s=L({...e,bottom:Math.max(e.bottom,e.top+1)}),r=t.spec.style??DEFAULT_TABLE_STYLE,l=this.sheet.filters.find(f=>f.table===t);return A+o("table",{xmlns:C.main,id:n,name:t.name,displayName:t.name,ref:s,totalsRowShown:0},l?o("autoFilter",{ref:s},...this.filterColumns(l)):"",o("tableColumns",{count:t.columns.length},t.columns.map((f,c)=>o("tableColumn",{id:c+1,name:f.name},this.columnFormula(t,f.formula))).join("")),o("tableStyleInfo",{name:r==="none"?void 0:r,showFirstColumn:t.spec.first_column===!0,showLastColumn:t.spec.last_column===!0,showRowStripes:t.spec.banded_rows!==!1,showColumnStripes:t.spec.banded_columns===!0}))}}const pe=a=>{let t;for(const n of Object.values(a??{}))n.level!==void 0&&(t=Math.max(t??0,n.level));return t},ge=a=>[a.left===void 0?"":`&L${a.left}`,a.center===void 0?"":`&C${a.center}`,a.right===void 0?"":`&R${a.right}`].join(""),vt=a=>typeof a=="string"?{text:a,author:ie}:{text:a.text,author:a.author??ie};function St(a){const t=a.map(([e,s])=>({ref:e,...vt(s)})),n=[...new Set(t.map(e=>e.author))];return A+o("comments",{xmlns:C.main},o("authors",{},n.map(e=>o("author",{},$(e))).join("")),o("commentList",{},t.map(e=>o("comment",{ref:e.ref,authorId:n.indexOf(e.author)},o("text",{},o("r",{},o("t",/^\s|\s$|\n/u.test(e.text)?{"xml:space":"preserve"}:{},$(e.text)))))).join("")))}function kt(a){return`<xml xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1"/></o:shapelayout><v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe"><v:stroke joinstyle="miter"/><v:path gradientshapeok="t" o:connecttype="rect"/></v:shapetype>${a.flatMap(([n],e)=>{const s=le(n);return s?[`<v:shape id="_x0000_s${String(1025+e)}" type="#_x0000_t202" style="position:absolute;margin-left:80pt;margin-top:5pt;width:120pt;height:60pt;z-index:${String(e+1)};visibility:hidden" fillcolor="#ffffe1" o:insetmode="auto"><v:fill color2="#ffffe1"/><v:shadow on="t" color="black" obscured="t"/><v:path o:connecttype="none"/><v:textbox style="mso-direction-alt:auto"><div style="text-align:left"></div></v:textbox><x:ClientData ObjectType="Note"><x:MoveWithCells/><x:SizeWithCells/><x:Anchor>${String(s.col+1)}, 15, ${String(s.row)}, 2, ${String(s.col+3)}, 15, ${String(s.row+4)}, 4</x:Anchor><x:AutoFill>False</x:AutoFill><x:Row>${String(s.row)}</x:Row><x:Column>${String(s.col)}</x:Column></x:ClientData></v:shape>`]:[]}).join("")}</xml>`}const xe=a=>`FF${a.slice(1).toUpperCase()}`;function Et(a){if(a.type==="dataBar"||a.type==="colorScale"||a.type==="iconSet")return{};const t={};for(const n of["bold","italic","underline","strike","color","fill","border","format"])a[n]!==void 0&&(t[n]=a[n]);return t}function At(a,t,n){const e=t.values!==void 0||t.blanks!==void 0,{conditions:s,top:r,average:l,color:f}=t,c=e?o("filters",{blank:t.blanks===!0?!0:void 0},(t.values??[]).map(i=>o("filter",{val:i})).join("")):s?o("customFilters",{and:s.length===2&&t.or!==!0?!0:void 0},s.map(i=>o("customFilter",{operator:i.operator==="equal"?void 0:i.operator,val:String(i.value)})).join("")):r?o("top10",{top:r.bottom===!0?!1:void 0,percent:r.percent===!0?!0:void 0,val:r.count}):l?o("dynamicFilter",{type:l==="above"?"aboveAverage":"belowAverage"}):f?.fill!==void 0?o("colorFilter",{dxfId:n({fill:f.fill})}):f?.font!==void 0?o("colorFilter",{dxfId:n({color:f.font}),cellColor:!1}):"";return o("filterColumn",{colId:a},c)}const k=a=>a===void 0?"":` s="${String(a)}"`,Ct=new Set(["#NULL!","#DIV/0!","#VALUE!","#REF!","#NAME?","#NUM!","#N/A","#GETTING_DATA"]),we=a=>Ct.has(a.code),Tt=new Set(["width","height","hidden"]);function $e(a){if(!a)return;const t=Object.fromEntries(Object.entries(a).filter(([n])=>!Tt.has(n)));return Object.keys(t).length===0?void 0:t}const X=a=>A+o("Relationships",{xmlns:C.pkg},a.map(([t,n,e],s)=>o("Relationship",{Id:`rId${String(s+1)}`,Type:t,Target:n,TargetMode:e})).join(""));function _t(a,t){const n=t.formula?.node;if(n)return B(n,{isTable:s=>a.table(s)!==void 0,array:!0});const{value:e}=t;return e==null?'""':typeof e=="string"?`"${e.replaceAll('"','""')}"`:typeof e=="boolean"?e?"TRUE":"FALSE":e instanceof U?e.code:String(e)}const Rt=(a,t)=>a.length===t.length&&a.every((n,e)=>n===t[e]),ye=a=>`$${V(a.left)}$${String(a.top+1)}:$${V(a.right)}$${String(a.bottom+1)}`;function Lt(a){const t=[],n=(e,s)=>o("definedName",{name:e.name,localSheetId:s,hidden:e.hidden===!0?!0:void 0},$(_t(a,e)));for(const e of a.names.values())t.push(n(e));return a.sheets.forEach((e,s)=>{for(const d of e.names.values())t.push(n(d,s));const r=e.filters.find(d=>!d.table);r&&t.push(o("definedName",{name:"_xlnm._FilterDatabase",localSheetId:s,hidden:!0},$(`${J(e.name)}${ye(r.area)}`)));const l=J(e.name),f=e.spec.print,c=f?.area===void 0?void 0:je(f.area);c&&t.push(o("definedName",{name:"_xlnm.Print_Area",localSheetId:s},$(`${l}${ye(c)}`)));const i=[f?.title_cols?.toUpperCase().replace(/([A-Z]+):([A-Z]+)/u,"$$$1:$$$2"),f?.title_rows?.replace(/(\d+):(\d+)/u,"$$$1:$$$2")].flatMap(d=>d===void 0?[]:[`${l}${d}`]);i.length>0&&t.push(o("definedName",{name:"_xlnm.Print_Titles",localSheetId:s},$(i.join(","))))}),t}function Mt(a){if(a===void 0)return{};const t=a===!0?{}:a;return{iterate:!0,iterateCount:t.max_iterations??de.max_iterations,iterateDelta:t.max_change??de.max_change}}export function writeXlsx(a,t={}){const n=a.wb,e=[];n.checks.length>0&&e.push(`${String(n.checks.length)} check${n.checks.length===1?"":"s"}: a file has no such thing`);const s=He(a);e.push(...s.left);const r=new Ze(g=>{const x=n.styleNamed(g),F=n.styleLook(g);if(!(!x||!F))return"own"in x?{name:x.own,look:F}:{name:x.builtin,builtinId:Me[x.builtin],look:F}}),l=new dt,f=new xt(n),c=new Qe,i=[["/xl/workbook.xml",T.sheet]],d=Math.max(0,n.sheets.findIndex(g=>g.spec.hidden!==!0));let h=1,u=!1;const m=new Map;let y=0,w=0,p=0,v=0;for(const[g,x]of n.sheets.entries()){const F=String(g+1),z=gt(x,a,t.file,e,t.tile),H=x.charts.filter(({spec:b})=>[b.categories,...b.series.flatMap(R=>[R.values,R.x])].some(R=>R?.endsWith("#"))).length;H>0&&e.push(`${x.name}: ${String(H)} chart${H===1?"":"s"} on a spill: ${H===1?"it reads":"they read"} the cells the spill covers now, and will not grow with it`);const re=new bt(x,a,r,l,t.cached!==!1,e,f,g,z,s.sheets.find(b=>b.sheet===x)),ve=re.write(c.part(`xl/worksheets/sheet${F}.xml`),g===d,h);u||=re.arrays,i.push([`/xl/worksheets/sheet${F}.xml`,T.worksheet]);const I=[];for(const b of ve){const R=`table${String(h)}.xml`;h+=1,c.add(`xl/tables/${R}`,b),i.push([`/xl/tables/${R}`,T.table]),I.push([`${E}table`,`../tables/${R}`])}const q=me(x);if(q.length>0||z.length>0){y+=1;const b=`drawing${String(y)}.xml`;c.add(`xl/drawings/${b}`,Ye(q,z)),i.push([`/xl/drawings/${b}`,T.drawing]),I.push([`${E}drawing`,`../drawings/${b}`]);const R=q.map(O=>{const P=Le(O.spec.type);P?p+=1:w+=1;const j=P?`chartEx${String(p)}.xml`:`chart${String(w)}.xml`;if(c.add(`xl/charts/${j}`,qe(a,x,O)),i.push([`/xl/charts/${j}`,P?Te:T.chart]),P){const M=String(p);c.add(`xl/charts/style${M}.xml`,Re(O.spec.type)),c.add(`xl/charts/colors${M}.xml`,_e()),i.push([`/xl/charts/style${M}.xml`,Ce]),i.push([`/xl/charts/colors${M}.xml`,ke]),c.add(`xl/charts/_rels/${j}.rels`,X([[Ae,`style${M}.xml`],[Se,`colors${M}.xml`]]))}return[P?Ee:`${E}chart`,`../charts/${j}`]});for(const O of z){const j=[...m].find(([,M])=>Rt(M,O.bytes))?.[0]??`image${String(m.size+1)}${O.file}`;m.set(j,O.bytes),R.push([`${E}image`,`../media/${j}`])}c.add(`xl/drawings/_rels/${b}.rels`,X(R))}const Y=Object.entries(x.spec.notes??{});if(Y.length>0){v+=1;const b=String(v);c.add(`xl/comments${b}.xml`,St(Y)),i.push([`/xl/comments${b}.xml`,T.comments]),c.add(`xl/drawings/vmlDrawing${b}.vml`,kt(Y)),I.push([`${E}vmlDrawing`,`../drawings/vmlDrawing${b}.vml`]),I.push([`${E}comments`,`../comments${b}.xml`])}for(const b of Object.values(x.spec.links??{}))b.startsWith("#")||I.push([`${E}hyperlink`,b,"External"]);I.length>0&&c.add(`xl/worksheets/_rels/sheet${F}.xml.rels`,X(I))}const S=n.sheets.length,_=f.columns.length>0;if(_){const g=`xl/worksheets/sheet${String(S+1)}.xml`;c.add(g,f.xml(l)),i.push([`/${g}`,T.worksheet])}const N=[...n.sheets,..._?[void 0]:[]].map((g,x)=>[`${E}worksheet`,`worksheets/sheet${String(x+1)}.xml`]);N.push([`${E}theme`,"theme/theme1.xml"]),N.push([`${E}styles`,"styles.xml"]),N.push([`${E}sharedStrings`,"sharedStrings.xml"]),u&&(N.push([`${E}sheetMetadata`,"metadata.xml"]),i.push(["/xl/metadata.xml",T.metadata]));const se=Lt(n),oe=n.sheets.map((g,x)=>o("sheet",{name:g.name,sheetId:x+1,state:g.spec.hidden===!0?"hidden":void 0,"r:id":`rId${String(x+1)}`}));_&&oe.push(o("sheet",{name:f.name,sheetId:S+1,state:"veryHidden","r:id":`rId${String(S+1)}`})),c.add("xl/workbook.xml",A+o("workbook",{xmlns:C.main,"xmlns:r":C.rel},o("workbookPr",{}),o("bookViews",{},o("workbookView",{activeTab:d===0?void 0:d})),o("sheets",{},oe.join("")),se.length>0?o("definedNames",{},se.join("")):"",o("calcPr",{calcId:nt,fullCalcOnLoad:!0,...Mt(n.file.iteration)}))),c.add("xl/_rels/workbook.xml.rels",X(N)),c.add("xl/styles.xml",A+r.xml()),l.write(c.part("xl/sharedStrings.xml")),c.add("xl/theme/theme1.xml",A+Ke(n.colors,Fe(n.theme))),u&&c.add("xl/metadata.xml",A+ct),c.add("docProps/core.xml",A+o("cp:coreProperties",{"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/"},n.title===void 0?"":o("dc:title",{},$(n.title)))),c.add("docProps/app.xml",A+o("Properties",{xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"},o("Application",{},"AllyHub"))),c.add("_rels/.rels",X([[`${E}officeDocument`,"xl/workbook.xml"],["http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties","docProps/core.xml"],[`${E}extended-properties`,"docProps/app.xml"]])),i.push(["/xl/styles.xml",T.styles],["/xl/sharedStrings.xml",T.strings],["/xl/theme/theme1.xml",T.theme],["/docProps/core.xml",T.core],["/docProps/app.xml",T.app]);const be=[...m].sort(([g],[x])=>g.localeCompare(x));for(const[g,x]of be)c.add(`xl/media/${g}`,x);return c.add("[Content_Types].xml",A+o("Types",{xmlns:C.types},o("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),o("Default",{Extension:"xml",ContentType:"application/xml"}),v>0?o("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}):"",[...new Set([...m.keys()].map(g=>g.split(".").pop()??""))].sort().map(g=>o("Default",{Extension:g,ContentType:`image/${tt[g]??g}`})).join(""),i.map(([g,x])=>o("Override",{PartName:g,ContentType:x})).join(""))),{bytes:c.finish(),left:e}}function Ft(a){const t=(s,r,l)=>r.length===0?"":o(s,{count:r.length,manualBreakCount:r.length},r.map(f=>o("brk",{id:f,max:l,man:!0})).join("")),n=[...new Set(a?.rows??[])].sort((s,r)=>s-r).map(s=>s-1),e=[...new Set((a?.cols??[]).map(s=>ae(s.toUpperCase())).filter(s=>s!==void 0&&s>0))].sort((s,r)=>s-r);return t("rowBreaks",n,G-1)+t("colBreaks",e,Z-1)}
2
+ import{CHARTEX_COLORS_REL as Ce,CHARTEX_COLORS_TYPE as Te,CHARTEX_REL as _e,CHARTEX_STYLE_REL as Re,CHARTEX_STYLE_TYPE as Le,CHARTEX_TYPE as Me,chartExColorsXml as Fe,chartExStyleXml as Ie,isExtended as Oe}from"@allyhub/chart";import{EXCEL_CELL_STYLE_IDS as je,themeTitle as De,SHEET_MARGINS as Pe,SHEET_NOTE_AUTHOR as le,SHEET_PAPERS as Ne}from"@allyhub/formats";import{MAX_COLUMNS as Z,MAX_ROWS as J,cellName as P,columnIndex as ce,columnLetter as X,rangeName as F,readAddress as de,readArea as Ve}from"../address.js";import{analyse as Xe}from"../calc/analyse.js";import{sparklineGroupXml as ze}from"../sparklines.js";import{lookColorIn as fe}from"../theme.js";import{ITERATION_DEFAULTS as he}from"../calc/engine.js";import{parseFormula as He}from"../formula/parse.js";import{sheetPrefix as K}from"../formula/print.js";import{walk as ue}from"../formula/walk.js";import{fileCells as Ue,isPicture as Be,pictureHeight as We,pictureSize as me}from"../files.js";import{scenariosByCell as qe}from"../scenario.js";import{CellError as W,readTyped as Ye}from"../values.js";import{FormulaCell as Ge,runsText as Ze}from"../workbook.js";import{chartPart as Je,drawingPart as Ke}from"./charts.js";import{tileShapes as pe}from"./tile-shapes.js";import{tileAlt as Qe,tileChart as ge,tileSize as et}from"../tiles.js";import{fileFormula as q,needsArray as Q}from"./formula.js";import{GRID_END as ee}from"./read.js";import{Styles as tt,runXml as nt}from"./styles.js";import{themeXml as st}from"./theme.js";import{HEAD as C,NS as T,el as o,xstring as y}from"./xml.js";import{ZipOut as ot}from"./zip.js";const _={comments:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",sheet:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",worksheet:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",styles:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",strings:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",theme:"application/vnd.openxmlformats-officedocument.theme+xml",table:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",metadata:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",drawing:"application/vnd.openxmlformats-officedocument.drawing+xml",chart:"application/vnd.openxmlformats-officedocument.drawingml.chart+xml",core:"application/vnd.openxmlformats-package.core-properties+xml",app:"application/vnd.openxmlformats-officedocument.extended-properties+xml"},A=`${T.rel}/`,te="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main",ne="http://schemas.microsoft.com/office/excel/2006/main",rt=/\.(tiff?|bmp|emf|wmf)$/iu,it={jpg:"jpeg",emf:"x-emf",wmf:"x-wmf"},se={conditional:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}",validations:"{CCE6A557-97BC-4b89-ADB6-D9C93CAAB3DF}",sparklines:"{05C60535-1F16-4fd2-B633-F4F36F0B64E0}"},at=191029;export const DEFAULT_TABLE_STYLE="TableStyleMedium2",LISTS_SHEET="AllyHub lists";const lt=64,ct=7,dt=a=>Math.min(255,Math.floor(a/ct*256)/256),ft=a=>Math.min(409.5,a*3/4),Y=32767,ht=255,ut=2e5,mt=o("metadata",{xmlns:T.main,"xmlns:xda":"http://schemas.microsoft.com/office/spreadsheetml/2017/dynamicarray"},o("metadataTypes",{count:1},o("metadataType",{name:"XLDAPR",minSupportedVersion:12e4,copy:1,pasteAll:1,pasteValues:1,merge:1,splitFirst:1,rowColShift:1,clearFormats:1,clearComments:1,assign:1,coerce:1,cellMeta:1})),o("futureMetadata",{name:"XLDAPR",count:1},o("bk",{},o("extLst",{},o("ext",{uri:"{bdbb8cdc-fa1e-496e-a857-3c3f30c029c3}"},o("xda:dynamicArrayProperties",{fDynamic:1,fCollapsed:0}))))),o("cellMetadata",{count:1},o("bk",{},o("rc",{t:1,v:0}))));class pt{index=new Map;count=0;place(t){this.count+=1;let n=this.index.get(t);return n===void 0&&(n=this.index.size,this.index.set(t,n)),n}of(t){return this.place(`t${t}`)}rich(t){return this.place(`r${t}`)}write(t){t.write(`${C}<sst xmlns="${T.main}" count="${String(this.count)}" uniqueCount="${String(this.index.size)}">`);for(const n of this.index.keys()){if(n.startsWith("r")){t.write(`<si>${n.slice(1)}</si>`);continue}const e=n.slice(1),s=/^\s|\s$|\n/u.test(e);t.write(`<si><t${s?' xml:space="preserve"':""}>${y(e)}</t></si>`)}t.write("</sst>"),t.end()}}function gt(a){let t=!1;return a&&ue(a,n=>{(n.kind==="structured"||n.kind==="ref"&&n.sheet!==void 0)&&(t=!0)}),t}function xt(a){for(const t in a)if(Object.hasOwn(a,t))return!1;return!0}const wt=a=>o("x",a).slice(2,-2),$t="Base case";function yt(a){const t=new Map;for(const s of a.scenarios)for(const r of s.cells)t.set(P(r),r);const n=(s,r)=>o("inputCells",{r:P(s),val:r===null||r instanceof W?"":typeof r=="boolean"?r?"1":"0":String(r)}),e=(s,r)=>o("scenario",{name:s,locked:!0,count:r.length,user:"AllyHub"},r.join(""));return o("scenarios",{current:0,show:0,sqref:[...t.keys()].join(" ")},e($t,[...t.values()].map(s=>n(s,s.base))),...a.scenarios.map(s=>e(s.name,s.cells.map(r=>n(r,r.value)))))}function xe(a){return[...a.charts,...a.tiles.flatMap(t=>ge(a,t).chart??[])]}function bt(a,t,n,e,s,r=[]){const l=[];let f=0;for(const{row:i,col:h,paths:u,column:m}of Ue(a,t)){let w=0;const v=We(m);for(const p of u){const S=Be(p)?n?.(p):void 0,$=S&&me(S);if(!S||!$){f+=1;continue}const E=Math.round($.width/$.height*v);l.push({row:i,col:h,x:w,width:E,height:v,name:p.split("/").pop()??p,path:p,file:`.${$.type==="jpeg"?"jpg":$.type}`,bytes:S}),w+=E+4}}let c=0;for(const i of a.spec.pictures??[]){const h=de(i.at),u=n?.(i.file);if(!h||!u)continue;const m=me(u),w=m?.type??rt.exec(i.file)?.[1]?.toLowerCase(),v=i.width!==void 0&&i.height!==void 0?{width:i.width,height:i.height}:void 0,p=m??v;if(w===void 0||p===void 0){c+=1;continue}const S=p.width/p.height,$=i.width??(i.height===void 0?p.width:i.height*S);l.push({row:h.row,col:h.col,x:i.x??0,y:i.y??0,width:Math.round($),height:Math.round(i.height??$/S),name:i.file.split("/").pop()??i.file,path:i.file,file:`.${w==="jpeg"?"jpg":w==="tif"?"tiff":w}`,bytes:u})}let d=0;for(const i of a.tiles){if(ge(a,i).chart)continue;if(pe(t,a,i,2,"")!==void 0){r.push(i);continue}const h=s?.(a,i);if(!h){d+=1;continue}const u=et(i);l.push({row:i.at.row,col:i.at.col,x:i.spec.x??0,y:i.spec.y??0,width:u.width,height:u.height,name:`${i.kind} ${String(i.index+1)}`,path:h.alt,file:".png",bytes:h.png})}return d>0&&e.push(`${a.name}: ${String(d)} block${d===1?"":"s"} over the cells, not drawn`),c>0&&e.push(`${a.name}: ${String(c)} picture${c===1?"":"s"} of a kind a file cannot hold, or with no size given`),f>0&&e.push(`${a.name}: ${String(f)} file${f===1?"":"s"} in a cell, which stay${f===1?"s":""} a name`),l}class vt{name;columns=[];known=new Map;constructor(t){let n=LISTS_SHEET;for(let e=2;t.sheet(n);e++)n=`${LISTS_SHEET} (${String(e)})`;this.name=n}place(t){const n=JSON.stringify(t);let e=this.known.get(n);e===void 0&&(e=this.columns.length,this.columns.push(t),this.known.set(n,e));const s=X(e);return`${K(this.name)}$${s}$1:$${s}$${String(Math.max(1,t.length))}`}xml(t){const n=[],e=Math.max(0,...this.columns.map(s=>s.length));for(let s=0;s<e;s++){let r=`<row r="${String(s+1)}">`;this.columns.forEach((l,f)=>{const c=l[s];c!==void 0&&(r+=`<c r="${P({row:s,col:f})}" t="s"><v>${String(t.of(c))}</v></c>`)}),n.push(`${r}</row>`)}return`${C}<worksheet xmlns="${T.main}" xmlns:r="${T.rel}"><dimension ref="${F({top:0,left:0,bottom:Math.max(0,e-1),right:Math.max(0,this.columns.length-1)})}"/><sheetViews><sheetView workbookViewId="0"/></sheetViews><sheetFormatPr defaultRowHeight="15"/><sheetData>${n.join("")}</sheetData><pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/></worksheet>`}}class St{rows=new Int32Array(1024);cols=new Int32Array(1024);size=0;add(t,n){if(this.size===this.rows.length){const e=new Int32Array(this.size*2);e.set(this.rows),this.rows=e;const s=new Int32Array(this.size*2);s.set(this.cols),this.cols=s}this.rows[this.size]=t,this.cols[this.size]=n,this.size+=1}byRow(){const{size:t}=this;if(t===0)return{start:new Uint32Array(1),cols:new Int32Array(0),top:0,used:void 0};let n=1/0,e=-1,s=1/0,r=-1;for(let d=0;d<t;d++){const i=this.rows[d]??0,h=this.cols[d]??0;i<n&&(n=i),i>e&&(e=i),h<s&&(s=h),h>r&&(r=h)}const l=new Uint32Array(e-n+2);for(let d=0;d<t;d++){const i=(this.rows[d]??0)-n+1;l[i]=(l[i]??0)+1}for(let d=1;d<l.length;d++)l[d]=(l[d]??0)+(l[d-1]??0);const f=l.slice(0,-1),c=new Int32Array(t);for(let d=0;d<t;d++){const i=(this.rows[d]??0)-n,h=f[i]??0;c[h]=this.cols[d]??0,f[i]=h+1}return{start:l,cols:c,top:n,used:{top:n,bottom:e,left:s,right:r}}}}function kt(a,t){if(!a)return!1;let n=!1;const e=t.toLowerCase();return ue(a,s=>{(s.kind==="ref"||s.kind==="name")&&s.sheet!==void 0&&s.sheet.toLowerCase()!==e&&(n=!0)}),n}const Et=(a,t)=>`{00000000-0000-4000-8000-${(a*65536+t).toString(16).toUpperCase().padStart(12,"0")}}`;class At{arrays=!1;sheet;calc;styles;strings;wb;cached;left;lists;index;isTable;isRangeName;hiddenRows;tall;scenarios;drawn;newerRules=[];newerValidations=[];misgiven=new Set;shapes=new Map;groups=new Map;constructor(t,n,e,s,r,l,f,c,d=[],i,h=0){this.sheet=t,this.calc=n,this.wb=n.wb,this.styles=e,this.strings=s,this.cached=r,this.left=l,this.lists=f,this.index=c,this.isTable=m=>this.wb.table(m)!==void 0,this.isRangeName=m=>{const w=this.wb.name(m,t)?.formula?.node;return this.isTable(m)||w!==void 0&&Q({kind:"unary",op:"-",arg:w})},this.hiddenRows=n.filtered(t),this.scenarios=i,this.drawn=xe(t).length>0||d.length>0||h>0;const u=new Map;for(const m of d)m.y===void 0&&u.set(m.row,Math.max(u.get(m.row)??0,m.height));this.tall=u}grid(){const{sheet:t}=this;if(t.lastRow>=J)throw new Error(`${t.name} reaches row ${(t.lastRow+1).toLocaleString("en-US")}, and ${ee}: an Excel file cannot hold it.`);if(t.columnsUsed>Z)throw new Error(`${t.name} reaches past column ${X(Z-1)}, and ${ee}: an Excel file cannot hold it.`);for(const n of Object.keys(t.spec.rows??{}))if(Number(n)>J)throw new Error(`${t.name} sets row ${n}, and ${ee}: an Excel file cannot hold it.`)}gather(){const{sheet:t}=this,n=new St;for(let e=0;e<t.columnsUsed;e++){const[s,r]=t.span(e,0,Number.MAX_SAFE_INTEGER);for(let l=s;l<=r;l++)(t.at(l,e)!==void 0||t.spillAt(l,e))&&n.add(l,e)}for(const{area:e}of t.styledAreas()){const s=(e.bottom-e.top+1)*(e.right-e.left+1);if(s>ut){this.left.push(`${t.name}!${F(e)}: its look on the cells that hold something, ${String(s)} cells being too many to write empty`);continue}for(let r=e.top;r<=e.bottom;r++)for(let l=e.left;l<=e.right;l++)n.add(r,l)}for(const e of t.keys.keys())n.add(Math.floor(e/16384),e%16384);return n.byRow()}styleOf(t,n){const e=this.sheet.lookAt(t,n);return xt(e)?void 0:this.styles.xf(e)}held(t,n){return n.length<=Y?n:(this.left.push(`${this.sheet.name}!${t} past Excel's ${String(Y)} characters, of its ${String(n.length)}`),n.slice(0,Y))}value(t,n,e){return e===null?`<c r="${t}"${k(n)}/>`:typeof e=="number"?`<c r="${t}"${k(n)}><v>${String(e)}</v></c>`:typeof e=="boolean"?`<c r="${t}"${k(n)} t="b"><v>${e?"1":"0"}</v></c>`:e instanceof W?be(e)?`<c r="${t}"${k(n)} t="e"><v>${e.code}</v></c>`:`<c r="${t}"${k(n)} t="s"><v>${String(this.strings.of(e.code))}</v></c>`:`<c r="${t}"${k(n)} t="s"><v>${String(this.strings.of(this.held(t,e)))}</v></c>`}dataTable(t,n,e,s){const r=this.value(t,n,s),{shared:l}=e;if(e.row!==l.atRow||e.col!==l.atCol)return r;const f=l.node,c=p=>{if(p===void 0||p.kind==="missing")return null;if(!(p.kind!=="ref"||p.sheet!==void 0||!p.row||!p.col))return P({row:p.row.index,col:p.col.index})},d=f?.kind==="call"?f.args:[],i=c(d[0]),h=c(d[1]);if(i===void 0||h===void 0||i===null&&h===null)return this.left.push(`${this.sheet.name}!${t}: a data table whose inputs a file cannot hold, as its values`),r;const m=this.sheet.fills.find(p=>p.shared===l)?.area??{top:e.row,left:e.col,bottom:e.row,right:e.col},w=i!==null&&h!==null?{dt2D:!0,dtr:!0,r1:i,r2:h}:i!==null?{dtr:!0,r1:i}:{dtr:!1,r1:h??""},v=o("f",{t:"dataTable",ref:F(m),...w});return typeof s=="string"?`<c r="${t}"${k(n)} t="str">${v}<v>${y(s)}</v></c>`:r.includes("<v>")?r.replace("<v>",`${v}<v>`):r.replace("/>",`>${v}</c>`)}table(t){return this.sheet.tableAt(t.row,t.col)?.name}formula(t,n,e){const s=this.calc.value(e.sheet,e.row,e.col),{shared:r}=e,{node:l}=r;if(!l)return`<c r="${t}"${k(n)} t="e"><v>#NAME?</v></c>`;if(l.kind==="call"&&l.name==="TABLE"&&l.args.length<=2)return this.dataTable(t,n,e,s);const f=(r.analysis??=Xe(this.wb,r)).arguments[0];if(f!==void 0)return this.misgiven.has(r)||(this.misgiven.add(r),this.left.push(`${this.sheet.name}!${t}: a formula's value, not the formula, as ${f.name} is given ${String(f.given)} arguments`)),this.value(t,n,s);let c=this.shapes.get(r);c===void 0&&(c=Q(l,this.isRangeName),this.shapes.set(r,c));const d=e.array!==void 0||e.blocked!==void 0||c;let i=d?void 0:this.groups.get(r);i?.written===!1&&(e.row!==i.ref.top||e.col!==i.ref.left)&&(i=void 0);let h,u="";if(i?.written===!0)h=`<f t="shared" si="${String(i.si)}"/>`;else{const m=q(e.moved,{table:this.table(e),isTable:this.isTable,array:d});h=i?`<f t="shared" ref="${F(i.ref)}" si="${String(i.si)}">${y(m)}</f>`:`<f>${y(m)}</f>`,i&&(i.written=!0),d&&(h=this.arrayFormula(e,m))}return d&&(this.arrays=!0,u=' cm="1"'),this.cached?s===null||typeof s=="number"?`<c r="${t}"${k(n)}${u}>${h}<v>${String(s??0)}</v></c>`:typeof s=="boolean"?`<c r="${t}"${k(n)} t="b"${u}>${h}<v>${s?"1":"0"}</v></c>`:s instanceof W?be(s)?`<c r="${t}"${k(n)} t="e"${u}>${h}<v>${s.code}</v></c>`:s.code==="#CYCLE!"?`<c r="${t}"${k(n)}${u}>${h}<v>0</v></c>`:`<c r="${t}"${k(n)} t="e"${u}>${h}<v>#VALUE!</v></c>`:`<c r="${t}"${k(n)} t="str"${u}>${h}<v>${y(this.held(t,s))}</v></c>`:`<c r="${t}"${k(n)}${u}>${h}</c>`}arrayFormula(t,n){const e=t.spill??{top:t.row,left:t.col,bottom:t.row,right:t.col};return`<f t="array" ref="${F(e)}">${y(n)}</f>`}shareFormulas(){const t=new Map;for(const e of this.sheet.formulas){const s=t.get(e.shared);if(!s)t.set(e.shared,{area:{top:e.row,bottom:e.row,left:e.col,right:e.col},first:e,n:1});else{const{area:r}=s;e.row<r.top&&(r.top=e.row),e.row>r.bottom&&(r.bottom=e.row),e.col<r.left&&(r.left=e.col),e.col>r.right&&(r.right=e.col),(e.row<s.first.row||e.row===s.first.row&&e.col<s.first.col)&&(s.first=e),s.n+=1}}let n=0;for(const[e,{area:s,first:r,n:l}]of t)l>1&&r.row===s.top&&r.col===s.left&&!gt(e.node)&&(this.groups.set(e,{si:n,ref:s,written:!1}),n+=1)}cell(t,n){const e=P({row:t,col:n}),s=this.styleOf(t,n),r=this.sheet.at(t,n);if(r instanceof Ge)return this.formula(e,s,r);const l=typeof r=="string"?this.sheet.runsAt(t,n):void 0;if(l&&Ze(l).length<=Y){const f=this.sheet.lookAt(t,n);return`<c r="${e}"${k(s)} t="s"><v>${String(this.strings.rich(l.map(c=>nt(c,f)).join("")))}</v></c>`}return r===void 0&&this.cached&&this.sheet.spillAt(t,n)?this.value(e,s,this.calc.value(this.sheet,t,n)):this.value(e,s,r??null)}columns(){const{sheet:t}=this,{spec:n}=t,e=new Map,s=new Map;for(const c of t.tables)for(const d of c.columns)d.spec?.width!==void 0&&s.set(c.at.col+d.index,d.spec.width);const r=new Set(s.keys()),l=new Map;for(const[c,d]of Object.entries(n.columns??{})){const i=ce(c);i!==void 0&&(l.set(i,d),r.add(i))}for(const c of[...l.keys()])for(const d of[-1,1])c+d>=0&&this.collapsedColumn(c+d)&&r.add(c+d);for(const c of r){const d=l.get(c),i=d?.width??s.get(c),h=ve(d);e.set(c,o("col",{min:c+1,max:c+1,width:dt(i??lt),style:h===void 0?void 0:this.styles.xf(h),hidden:d?.hidden===!0?!0:void 0,customWidth:i===void 0?void 0:!0,outlineLevel:d?.level,collapsed:this.collapsedColumn(c)?!0:void 0}))}const f=[...e.keys()].sort((c,d)=>c-d).map(c=>e.get(c)??"");return f.length===0?"":`<cols>${f.join("")}</cols>`}rowAttrs(t){const n=this.sheet.spec.rows?.[String(t+1)],e=ve(n),s=n?.height??this.tall.get(t);return wt({r:t+1,s:e===void 0?void 0:this.styles.xf(e),customFormat:e===void 0?void 0:!0,ht:s===void 0?void 0:ft(s),customHeight:s===void 0?void 0:!0,hidden:n?.hidden===!0||this.hiddenRows.has(t)?!0:void 0,outlineLevel:n?.level,collapsed:this.collapsedRow(t)?!0:void 0})}collapsedRow(t){const n=this.sheet.spec.rows??{},e=f=>n[String(f+1)]?.level??0,s=f=>n[String(f+1)]?.hidden===!0||this.hiddenRows.has(f),r=this.sheet.spec.outline?.summary_below===!1?1:-1,l=t+r;return l>=0&&e(l)>e(t)&&s(l)}collapsedColumn(t){const n=this.sheet.spec.columns??{},e=l=>n[X(l)],s=this.sheet.spec.outline?.summary_right===!1?1:-1,r=t+s;return r>=0&&(e(r)?.level??0)>(e(t)?.level??0)&&e(r)?.hidden===!0}rows(t,n){const{sheet:e}=this,s=new Set(this.hiddenRows);for(const i of Object.keys(e.spec.rows??{})){const h=Number(i)-1;s.add(h);for(const u of[-1,1])h+u>=0&&this.collapsedRow(h+u)&&s.add(h+u)}const{start:r,cols:l,top:f}=n;let c=n.used?f:1/0,d=n.used?n.used.bottom:-1;for(const i of s)i<c&&(c=i),i>d&&(d=i);for(let i=Math.max(0,c);i<=d;i++){const h=i-f,u=h>=0&&h<r.length-1?r[h]??0:0,m=h>=0&&h<r.length-1?r[h+1]??0:0;if(u===m&&!s.has(i))continue;if(u===m){t.write(`<row${this.rowAttrs(i)}/>`);continue}const w=l.subarray(u,m).sort();let v=`<row${this.rowAttrs(i)}>`,p=-1;for(const S of w)S!==p&&(p=S,v+=this.cell(i,S));t.write(`${v}</row>`)}}view(t){const{freeze:n}=this.sheet;let e="";if(n&&(n.row>0||n.col>0)){const s=n.row>0&&n.col>0?"bottomRight":n.row>0?"bottomLeft":"topRight";e=o("pane",{xSplit:n.col>0?n.col:void 0,ySplit:n.row>0?n.row:void 0,topLeftCell:P(n),activePane:s,state:"frozen"})}return o("sheetViews",{},o("sheetView",{showGridLines:this.sheet.spec.gridlines===!1?!1:void 0,tabSelected:t?!0:void 0,workbookViewId:0},e))}write(t,n,e){const{sheet:s}=this;this.grid();const r=this.gather();this.shareFormulas();const l=s.tables.map(($,E)=>o("tablePart",{"r:id":`rId${String(E+1)}`})),{print:f}=s.spec,c=f?.fit,d=Object.keys(s.spec.notes??{}).length>0,i=s.spec.outline,h=i?.summary_below===!1||i?.summary_right===!1?o("outlinePr",{summaryBelow:i.summary_below===!1?!1:void 0,summaryRight:i.summary_right===!1?!1:void 0}):"";t.write(`${C}<worksheet xmlns="${T.main}" xmlns:r="${T.rel}">`+(s.spec.tab===void 0&&c===void 0&&h===""?"":o("sheetPr",{},s.spec.tab===void 0?"":o("tabColor",{rgb:`FF${s.spec.tab.slice(1).toUpperCase()}`}),h,c===void 0?"":o("pageSetUpPr",{fitToPage:!0})))+o("dimension",{ref:r.used?F(r.used):"A1"})+this.view(n)+o("sheetFormatPr",{defaultRowHeight:15,outlineLevelRow:we(s.spec.rows),outlineLevelCol:we(s.spec.columns)})+this.columns()+"<sheetData>"),this.rows(t,r);const u=l.length+1+(this.drawn?1:0)+(d?2:0);let m=0;const w=Object.entries(s.spec.links??{}).map(([$,E])=>E.startsWith("#")?o("hyperlink",{ref:$,location:E.slice(1)}):o("hyperlink",{ref:$,"r:id":`rId${String(u+m++)}`})),v=s.merges.map($=>o("mergeCell",{ref:F($)})),p=s.conditions.map(($,E)=>this.condition($,E+1)).join(""),S=this.validations();return t.write("</sheetData>"+(s.spec.protect===!0?o("sheetProtection",{sheet:!0,objects:!0,scenarios:!0}):"")+(this.scenarios?yt(this.scenarios):"")+this.sheetFilter()+(v.length>0?o("mergeCells",{count:v.length},v.join("")):"")+p+S+(w.length>0?o("hyperlinks",{},w.join("")):"")+o("pageMargins",{...Pe,...f?.margins})+(f?.orientation!==void 0||f?.paper!==void 0||f?.scale!==void 0||c!==void 0?o("pageSetup",{paperSize:f?.paper===void 0?void 0:Ne[f.paper],scale:f?.scale,fitToWidth:c?.width,fitToHeight:c?.height,orientation:f?.orientation}):"")+(f?.header||f?.footer?o("headerFooter",{},f.header?o("oddHeader",{},y($e(f.header))):"",f.footer?o("oddFooter",{},y($e(f.footer))):""):"")+Pt(f?.breaks)+(this.drawn?o("drawing",{"r:id":`rId${String(l.length+1)}`}):"")+(d?o("legacyDrawing",{"r:id":`rId${String(l.length+(this.drawn?2:1))}`}):"")+(l.length>0?o("tableParts",{count:l.length},l.join("")):"")+this.extensions()+"</worksheet>"),t.end(),s.tables.map(($,E)=>this.tableXml($,e+E))}extensions(){const t=[];if(this.newerRules.length>0&&t.push(o("ext",{uri:se.conditional,"xmlns:x14":te},o("x14:conditionalFormattings",{},this.newerRules.join("")))),this.newerValidations.length>0&&t.push(o("ext",{uri:se.validations,"xmlns:x14":te},o("x14:dataValidations",{count:this.newerValidations.length,"xmlns:xm":ne},this.newerValidations.join("")))),this.sheet.sparklines.length>0){const n=this.wb.colors;t.push(o("ext",{uri:se.sparklines,"xmlns:x14":te},o("x14:sparklineGroups",{"xmlns:xm":ne},this.sheet.sparklines.map(e=>ze(e,{series:fe(e.spec.color??"accent1",n),marks:fe(e.spec.marks??"#D00000",n)})).join(""))))}return t.length===0?"":o("extLst",{},t.join(""))}bound(t){if(t===void 0)return"";if(typeof t=="number")return String(t);if(!t.startsWith("=")){const e=Ye(t);return typeof e.value=="number"&&e.formula===void 0?String(e.value):`"${t.replaceAll('"','""')}"`}const n=He(t);return n.ok?q(n.node,{isTable:this.isTable,array:!0}):t.slice(1)}cfvo(t,n){const e=t.value===void 0?void 0:typeof t.value=="number"?String(t.value):this.bound(t.value);return n?o("x14:cfvo",{type:t.at},e===void 0?"":o("xm:f",{},y(e))):o("cfvo",{type:t.at,val:e})}crosses(t){return t.some(n=>kt(n?.node,this.sheet.name))}condition(t,n){const{spec:e}=t,s=e.range,r=e.type!=="dataBar"&&this.crosses(t.formulas),l=(h,u,...m)=>{if(!r){const w=Object.keys(u).length===0?void 0:this.styles.dxf(u);return o("conditionalFormatting",{sqref:s},o("cfRule",{...h,dxfId:w,priority:n,stopIfTrue:e.stop===!0?!0:void 0},...m))}return this.newerRules.push(o("x14:conditionalFormatting",{"xmlns:xm":ne},o("x14:cfRule",{...h,priority:n,stopIfTrue:e.stop===!0?!0:void 0,id:Et(this.index,n)},...m.map(w=>w.replace(/^<formula>(.*)<\/formula>$/su,"<xm:f>$1</xm:f>")),Object.keys(u).length===0?"":this.styles.dxfXml(u,"x14:dxf")),o("xm:sqref",{},s))),""},f=Rt(e),c=t.areas[0],d=c?P({row:c.top,col:c.left}):"A1",i=h=>o("formula",{},y(h));switch(e.type){case"cellIs":return l({type:"cellIs",operator:e.operator},f,...e.formula.map(h=>i(this.bound(h))));case"containsText":{const h=e.operator??"contains",u=`"${e.text.replaceAll('"','""')}"`,m=h==="contains"?`NOT(ISERROR(SEARCH(${u},${d})))`:h==="notContains"?`ISERROR(SEARCH(${u},${d}))`:h==="beginsWith"?`LEFT(${d},LEN(${u}))=${u}`:`RIGHT(${d},LEN(${u}))=${u}`;return l({type:h==="contains"?"containsText":h==="notContains"?"notContainsText":h,operator:h==="contains"?"containsText":h,text:e.text},f,i(m))}case"duplicateValues":case"uniqueValues":return l({type:e.type},f);case"top10":return l({type:"top10",percent:e.percent===!0?!0:void 0,bottom:e.bottom===!0?!0:void 0,rank:e.rank},f);case"aboveAverage":return l({type:"aboveAverage",aboveAverage:e.below===!0?!1:void 0,equalAverage:e.equal===!0?!0:void 0},f);case"expression":return l({type:"expression"},f,i(this.bound(e.formula.startsWith("=")?e.formula:`=${e.formula}`)));case"dataBar":return l({type:"dataBar"},{},o("dataBar",{showValue:e.show===!1?!1:void 0},this.cfvo(e.min??{at:"min"},!1),this.cfvo(e.max??{at:"max"},!1),o("color",{rgb:ye(e.color)})));case"colorScale":{const h=r?"x14:":"";return l({type:"colorScale"},{},o(`${h}colorScale`,{},...e.stops.map(u=>this.cfvo(u,r)),...e.stops.map(u=>o(`${h}color`,{rgb:ye(u.color)}))))}case"iconSet":{const h=Number.parseInt(e.icons,10),u=e.stops??Array.from({length:h},(m,w)=>({at:"percent",value:Math.round(w*100/h)}));return l({type:"iconSet"},{},o(r?"x14:iconSet":"iconSet",{iconSet:e.icons,showValue:e.show===!1?!1:void 0,reverse:e.reverse===!0?!0:void 0},...u.map(m=>this.cfvo(m,r))))}}}validation(t){const{spec:n}=t;let e="",s=this.crosses(t.formulas);if(n.values){const d=n.values.join(",");d.length>ht||n.values.some(i=>i.includes(",")||i.includes('"'))?(e=this.lists.place(n.values),s=!0):e=`"${d}"`}else e=this.bound(n.formula?.[0]);const r=this.bound(n.formula?.[1]),{error:l,prompt:f}=n;n.multiple===!0&&this.left.push(`${this.sheet.name}!${n.range}: several choices in a cell: its text stays, and Excel's list offers one at a time`);const c={type:n.type,errorStyle:l?.style===void 0||l.style==="stop"?void 0:l.style,operator:n.operator===void 0||n.operator==="between"?void 0:n.operator,allowBlank:n.blank===!1?void 0:!0,showDropDown:n.dropdown===!1?!0:void 0,showInputMessage:f?.show===!1?void 0:!0,showErrorMessage:l?.show===!1||n.multiple===!0?void 0:!0,errorTitle:l?.title,error:l?.message,promptTitle:f?.title,prompt:f?.message};return s?(this.newerValidations.push(o("x14:dataValidation",c,e===""?"":o("x14:formula1",{},o("xm:f",{},y(e))),r===""?"":o("x14:formula2",{},o("xm:f",{},y(r))),o("xm:sqref",{},n.range))),""):o("dataValidation",{...c,sqref:n.range},e===""?"":o("formula1",{},y(e)),r===""?"":o("formula2",{},y(r)))}validations(){const t=this.sheet.validations.map(n=>this.validation(n)).filter(n=>n!=="");return t.length===0?"":o("dataValidations",{count:t.length},t.join(""))}filterColumns(t){return[...t.columns.entries()].sort(([n],[e])=>n-e).map(([n,e])=>Lt(n-t.area.left,e,s=>this.styles.dxf(s)))}sheetFilter(){const t=this.sheet.filters.find(n=>!n.table);return t?o("autoFilter",{ref:F(t.area)},...this.filterColumns(t)):""}columnFormula(t,n){if(!n?.node)return"";const e=Q(n.node,this.isRangeName),s=q(n.node,{table:t.name,isTable:this.isTable,array:e});return o("calculatedColumnFormula",{array:e?!0:void 0},y(s))}tableXml(t,n){const e=t.area,s=F({...e,bottom:Math.max(e.bottom,e.top+1)}),r=t.spec.style??DEFAULT_TABLE_STYLE,l=this.sheet.filters.find(f=>f.table===t);return C+o("table",{xmlns:T.main,id:n,name:t.name,displayName:t.name,ref:s,totalsRowShown:0},l?o("autoFilter",{ref:s},...this.filterColumns(l)):"",o("tableColumns",{count:t.columns.length},t.columns.map((f,c)=>o("tableColumn",{id:c+1,name:f.name},this.columnFormula(t,f.formula))).join("")),o("tableStyleInfo",{name:r==="none"?void 0:r,showFirstColumn:t.spec.first_column===!0,showLastColumn:t.spec.last_column===!0,showRowStripes:t.spec.banded_rows!==!1,showColumnStripes:t.spec.banded_columns===!0}))}}const we=a=>{let t;for(const n of Object.values(a??{}))n.level!==void 0&&(t=Math.max(t??0,n.level));return t},$e=a=>[a.left===void 0?"":`&L${a.left}`,a.center===void 0?"":`&C${a.center}`,a.right===void 0?"":`&R${a.right}`].join(""),Ct=a=>typeof a=="string"?{text:a,author:le}:{text:a.text,author:a.author??le};function Tt(a){const t=a.map(([e,s])=>({ref:e,...Ct(s)})),n=[...new Set(t.map(e=>e.author))];return C+o("comments",{xmlns:T.main},o("authors",{},n.map(e=>o("author",{},y(e))).join("")),o("commentList",{},t.map(e=>o("comment",{ref:e.ref,authorId:n.indexOf(e.author)},o("text",{},o("r",{},o("t",/^\s|\s$|\n/u.test(e.text)?{"xml:space":"preserve"}:{},y(e.text)))))).join("")))}function _t(a){return`<xml xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1"/></o:shapelayout><v:shapetype id="_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe"><v:stroke joinstyle="miter"/><v:path gradientshapeok="t" o:connecttype="rect"/></v:shapetype>${a.flatMap(([n],e)=>{const s=de(n);return s?[`<v:shape id="_x0000_s${String(1025+e)}" type="#_x0000_t202" style="position:absolute;margin-left:80pt;margin-top:5pt;width:120pt;height:60pt;z-index:${String(e+1)};visibility:hidden" fillcolor="#ffffe1" o:insetmode="auto"><v:fill color2="#ffffe1"/><v:shadow on="t" color="black" obscured="t"/><v:path o:connecttype="none"/><v:textbox style="mso-direction-alt:auto"><div style="text-align:left"></div></v:textbox><x:ClientData ObjectType="Note"><x:MoveWithCells/><x:SizeWithCells/><x:Anchor>${String(s.col+1)}, 15, ${String(s.row)}, 2, ${String(s.col+3)}, 15, ${String(s.row+4)}, 4</x:Anchor><x:AutoFill>False</x:AutoFill><x:Row>${String(s.row)}</x:Row><x:Column>${String(s.col)}</x:Column></x:ClientData></v:shape>`]:[]}).join("")}</xml>`}const ye=a=>`FF${a.slice(1).toUpperCase()}`;function Rt(a){if(a.type==="dataBar"||a.type==="colorScale"||a.type==="iconSet")return{};const t={};for(const n of["bold","italic","underline","strike","color","fill","border","format"])a[n]!==void 0&&(t[n]=a[n]);return t}function Lt(a,t,n){const e=t.values!==void 0||t.blanks!==void 0,{conditions:s,top:r,average:l,color:f}=t,c=e?o("filters",{blank:t.blanks===!0?!0:void 0},(t.values??[]).map(d=>o("filter",{val:d})).join("")):s?o("customFilters",{and:s.length===2&&t.or!==!0?!0:void 0},s.map(d=>o("customFilter",{operator:d.operator==="equal"?void 0:d.operator,val:String(d.value)})).join("")):r?o("top10",{top:r.bottom===!0?!1:void 0,percent:r.percent===!0?!0:void 0,val:r.count}):l?o("dynamicFilter",{type:l==="above"?"aboveAverage":"belowAverage"}):f?.fill!==void 0?o("colorFilter",{dxfId:n({fill:f.fill})}):f?.font!==void 0?o("colorFilter",{dxfId:n({color:f.font}),cellColor:!1}):"";return o("filterColumn",{colId:a},c)}const k=a=>a===void 0?"":` s="${String(a)}"`,Mt=new Set(["#NULL!","#DIV/0!","#VALUE!","#REF!","#NAME?","#NUM!","#N/A","#GETTING_DATA"]),be=a=>Mt.has(a.code),Ft=new Set(["width","height","hidden"]);function ve(a){if(!a)return;const t=Object.fromEntries(Object.entries(a).filter(([n])=>!Ft.has(n)));return Object.keys(t).length===0?void 0:t}const z=a=>C+o("Relationships",{xmlns:T.pkg},a.map(([t,n,e],s)=>o("Relationship",{Id:`rId${String(s+1)}`,Type:t,Target:n,TargetMode:e})).join(""));function It(a,t){const n=t.formula?.node;if(n)return q(n,{isTable:s=>a.table(s)!==void 0,array:!0});const{value:e}=t;return e==null?'""':typeof e=="string"?`"${e.replaceAll('"','""')}"`:typeof e=="boolean"?e?"TRUE":"FALSE":e instanceof W?e.code:String(e)}const Ot=(a,t)=>a.length===t.length&&a.every((n,e)=>n===t[e]),Se=a=>`$${X(a.left)}$${String(a.top+1)}:$${X(a.right)}$${String(a.bottom+1)}`;function jt(a){const t=[],n=(e,s)=>o("definedName",{name:e.name,localSheetId:s,hidden:e.hidden===!0?!0:void 0},y(It(a,e)));for(const e of a.names.values())t.push(n(e));return a.sheets.forEach((e,s)=>{for(const i of e.names.values())t.push(n(i,s));const r=e.filters.find(i=>!i.table);r&&t.push(o("definedName",{name:"_xlnm._FilterDatabase",localSheetId:s,hidden:!0},y(`${K(e.name)}${Se(r.area)}`)));const l=K(e.name),f=e.spec.print,c=f?.area===void 0?void 0:Ve(f.area);c&&t.push(o("definedName",{name:"_xlnm.Print_Area",localSheetId:s},y(`${l}${Se(c)}`)));const d=[f?.title_cols?.toUpperCase().replace(/([A-Z]+):([A-Z]+)/u,"$$$1:$$$2"),f?.title_rows?.replace(/(\d+):(\d+)/u,"$$$1:$$$2")].flatMap(i=>i===void 0?[]:[`${l}${i}`]);d.length>0&&t.push(o("definedName",{name:"_xlnm.Print_Titles",localSheetId:s},y(d.join(","))))}),t}function Dt(a){if(a===void 0)return{};const t=a===!0?{}:a;return{iterate:!0,iterateCount:t.max_iterations??he.max_iterations,iterateDelta:t.max_change??he.max_change}}export function writeXlsx(a,t={}){const n=a.wb,e=[];n.checks.length>0&&e.push(`${String(n.checks.length)} check${n.checks.length===1?"":"s"}: a file has no such thing`);const s=qe(a);e.push(...s.left);const r=new tt(x=>{const g=n.styleNamed(x),O=n.styleLook(x);if(!(!g||!O))return"own"in g?{name:g.own,look:O}:{name:g.builtin,builtinId:je[g.builtin],look:O}}),l=new pt,f=new vt(n),c=new ot,d=[["/xl/workbook.xml",_.sheet]],i=Math.max(0,n.sheets.findIndex(x=>x.spec.hidden!==!0));let h=1,u=!1;const m=new Map;let w=0,v=0,p=0,S=0;for(const[x,g]of n.sheets.entries()){const O=String(x+1),H=[],V=bt(g,a,t.file,e,t.tile,H),U=g.charts.filter(({spec:b})=>[b.categories,...b.series.flatMap(R=>[R.values,R.x])].some(R=>R?.endsWith("#"))).length;U>0&&e.push(`${g.name}: ${String(U)} chart${U===1?"":"s"} on a spill: ${U===1?"it reads":"they read"} the cells the spill covers now, and will not grow with it`);const ie=new At(g,a,r,l,t.cached!==!1,e,f,x,V,s.sheets.find(b=>b.sheet===g),H.length),Ee=ie.write(c.part(`xl/worksheets/sheet${O}.xml`),x===i,h);u||=ie.arrays,d.push([`/xl/worksheets/sheet${O}.xml`,_.worksheet]);const j=[];for(const b of Ee){const R=`table${String(h)}.xml`;h+=1,c.add(`xl/tables/${R}`,b),d.push([`/xl/tables/${R}`,_.table]),j.push([`${A}table`,`../tables/${R}`])}const B=xe(g);if(B.length>0||V.length>0||H.length>0){w+=1;const b=`drawing${String(w)}.xml`;let R=B.length+V.length+2;const Ae=H.flatMap(L=>{const M=pe(a,g,L,R,Qe(a,g,L));return M?(R+=M.ids+1,[M.xml]):[]});c.add(`xl/drawings/${b}`,Ke(B,V,Ae)),d.push([`/xl/drawings/${b}`,_.drawing]),j.push([`${A}drawing`,`../drawings/${b}`]);const ae=B.map(L=>{const M=Oe(L.spec.type);M?p+=1:v+=1;const D=M?`chartEx${String(p)}.xml`:`chart${String(v)}.xml`;if(c.add(`xl/charts/${D}`,Je(a,g,L)),d.push([`/xl/charts/${D}`,M?Me:_.chart]),M){const I=String(p);c.add(`xl/charts/style${I}.xml`,Ie(L.spec.type)),c.add(`xl/charts/colors${I}.xml`,Fe()),d.push([`/xl/charts/style${I}.xml`,Le]),d.push([`/xl/charts/colors${I}.xml`,Te]),c.add(`xl/charts/_rels/${D}.rels`,z([[Re,`style${I}.xml`],[Ce,`colors${I}.xml`]]))}return[M?_e:`${A}chart`,`../charts/${D}`]});for(const L of V){const D=[...m].find(([,I])=>Ot(I,L.bytes))?.[0]??`image${String(m.size+1)}${L.file}`;m.set(D,L.bytes),ae.push([`${A}image`,`../media/${D}`])}c.add(`xl/drawings/_rels/${b}.rels`,z(ae))}const G=Object.entries(g.spec.notes??{});if(G.length>0){S+=1;const b=String(S);c.add(`xl/comments${b}.xml`,Tt(G)),d.push([`/xl/comments${b}.xml`,_.comments]),c.add(`xl/drawings/vmlDrawing${b}.vml`,_t(G)),j.push([`${A}vmlDrawing`,`../drawings/vmlDrawing${b}.vml`]),j.push([`${A}comments`,`../comments${b}.xml`])}for(const b of Object.values(g.spec.links??{}))b.startsWith("#")||j.push([`${A}hyperlink`,b,"External"]);j.length>0&&c.add(`xl/worksheets/_rels/sheet${O}.xml.rels`,z(j))}const $=n.sheets.length,E=f.columns.length>0;if(E){const x=`xl/worksheets/sheet${String($+1)}.xml`;c.add(x,f.xml(l)),d.push([`/${x}`,_.worksheet])}const N=[...n.sheets,...E?[void 0]:[]].map((x,g)=>[`${A}worksheet`,`worksheets/sheet${String(g+1)}.xml`]);N.push([`${A}theme`,"theme/theme1.xml"]),N.push([`${A}styles`,"styles.xml"]),N.push([`${A}sharedStrings`,"sharedStrings.xml"]),u&&(N.push([`${A}sheetMetadata`,"metadata.xml"]),d.push(["/xl/metadata.xml",_.metadata]));const oe=jt(n),re=n.sheets.map((x,g)=>o("sheet",{name:x.name,sheetId:g+1,state:x.spec.hidden===!0?"hidden":void 0,"r:id":`rId${String(g+1)}`}));E&&re.push(o("sheet",{name:f.name,sheetId:$+1,state:"veryHidden","r:id":`rId${String($+1)}`})),c.add("xl/workbook.xml",C+o("workbook",{xmlns:T.main,"xmlns:r":T.rel},o("workbookPr",{}),o("bookViews",{},o("workbookView",{activeTab:i===0?void 0:i})),o("sheets",{},re.join("")),oe.length>0?o("definedNames",{},oe.join("")):"",o("calcPr",{calcId:at,fullCalcOnLoad:!0,...Dt(n.file.iteration)}))),c.add("xl/_rels/workbook.xml.rels",z(N)),c.add("xl/styles.xml",C+r.xml()),l.write(c.part("xl/sharedStrings.xml")),c.add("xl/theme/theme1.xml",C+st(n.colors,De(n.theme))),u&&c.add("xl/metadata.xml",C+mt),c.add("docProps/core.xml",C+o("cp:coreProperties",{"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/"},n.title===void 0?"":o("dc:title",{},y(n.title)))),c.add("docProps/app.xml",C+o("Properties",{xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"},o("Application",{},"AllyHub"))),c.add("_rels/.rels",z([[`${A}officeDocument`,"xl/workbook.xml"],["http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties","docProps/core.xml"],[`${A}extended-properties`,"docProps/app.xml"]])),d.push(["/xl/styles.xml",_.styles],["/xl/sharedStrings.xml",_.strings],["/xl/theme/theme1.xml",_.theme],["/docProps/core.xml",_.core],["/docProps/app.xml",_.app]);const ke=[...m].sort(([x],[g])=>x.localeCompare(g));for(const[x,g]of ke)c.add(`xl/media/${x}`,g);return c.add("[Content_Types].xml",C+o("Types",{xmlns:T.types},o("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),o("Default",{Extension:"xml",ContentType:"application/xml"}),S>0?o("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}):"",[...new Set([...m.keys()].map(x=>x.split(".").pop()??""))].sort().map(x=>o("Default",{Extension:x,ContentType:`image/${it[x]??x}`})).join(""),d.map(([x,g])=>o("Override",{PartName:x,ContentType:g})).join(""))),{bytes:c.finish(),left:e}}function Pt(a){const t=(s,r,l)=>r.length===0?"":o(s,{count:r.length,manualBreakCount:r.length},r.map(f=>o("brk",{id:f,max:l,man:!0})).join("")),n=[...new Set(a?.rows??[])].sort((s,r)=>s-r).map(s=>s-1),e=[...new Set((a?.cols??[]).map(s=>ce(s.toUpperCase())).filter(s=>s!==void 0&&s>0))].sort((s,r)=>s-r);return t("rowBreaks",n,Z-1)+t("colBreaks",e,J-1)}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/sheet",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -4,5 +4,5 @@ import{existsSync as ce}from"node:fs";import{mkdir as he,readFile as X,stat as d
4
4
  `)}}});function Ie(e,n){return z(e,n.trim()).flatMap(s=>s.rows.flat().map(t=>({...t,address:t.address===""?n.trim():`${s.sheet}!${t.address}`})))}const Re=40;function Le(e){const n=e.map(r=>z(r,void 0)),s=e[0],t=(r,i)=>{const h=s?.wb.sheet(r),l=Z(i);if(!s||!h||!l||s.readers(h,l.row,l.col).length>0)return;const d=h.at(l.row,l.col);return d instanceof O?s.precedents(d).reduce((p,w)=>p+(w.bottom-w.top+1)*(w.right-w.left+1),0):0},o=[],a=[];for(const[r,i]of(n[0]??[]).entries())for(const[h,l]of i.rows.entries())for(const[d,p]of l.entries()){if(p.formula===void 0||new Set(n.map($=>$[r]?.rows[h]?.[d]?.shown)).size<2)continue;const g=`${i.sheet}!${p.address}`,c=t(i.sheet,p.address);c===void 0?a.push(g):o.push({at:g,reads:c})}return[...o.sort((r,i)=>i.reads-r.reads).map(r=>r.at),...a]}async function Be(e,n,s,t){const o=await T(e,n,s),a=K(o.workbook);if(a.length===0)throw new y("not-found",`${o.file} has no scenarios.`,{exit:x.notFound,hint:`${k(o.file)}'s scenarios: { high: { growth: 0.2 } } names some.`});const r=new Set(a.flatMap(c=>Object.keys(o.workbook.file.scenarios?.[c]??{}).map($=>$.toLowerCase()))),i=["Base case",...a],h=[o,...await Promise.all(a.map(c=>T(e,n,s,c)))],l=t===void 0?Le(h.map(c=>c.calc)):[],d=t?.split(",")??[...[...o.workbook.names.values()].map(c=>c.name).filter(c=>!r.has(c.toLowerCase())),...l].slice(0,Re);if(d.length===0)throw new y("bad-input","Its scenarios change nothing it computes. Say what to compare: names, cells or ranges, apart by commas.",{exit:x.usage});const w=d.map(c=>h.map($=>Ie($.calc,c))).flatMap(c=>(c[0]??[]).map(($,b)=>({output:$.address,values:Object.fromEntries(i.map((v,S)=>[v,c[S]?.[b]?.value??null])),shown:Object.fromEntries(i.map((v,S)=>[v,c[S]?.[b]?.shown??""]))}))),g=t===void 0?w.filter(c=>new Set(Object.values(c.shown)).size>1):w;return{value:{file:o.file,scenarios:i,outputs:g},text:[...U([["",...i],...g.map(c=>[c.output,...i.map($=>c.shown[$]??"")])]),...P(o.problems)].join(`
5
5
  `)}}const Ne=(e,n)=>`${e.sheet===n?"":`${e.sheet.name}!`}${G({top:e.top,left:e.left,bottom:Math.min(e.bottom,Math.max(e.top,e.sheet.lastRow)),right:e.right})}`;export const sheetTrace=j({input:f.strictObject({sheet:f.string().describe("The sheet, by its file or its id in allyhub.yaml"),cell:f.string().describe("The cell: Summary!B5, or B5 on the first sheet"),all:f.boolean().default(!1).describe(`Every cell that reads it, not the first ${String(TRACE_CELLS)}`),dir:C}),positional:["sheet","cell"],output:f.looseObject({}),examples:["allyhub sheet trace finance/budget 'Summary!B1'"],run:async(e,n)=>{const s=await A(n.cwd,e.dir),{file:t,workbook:o,calc:a}=await T(s,n,e.sheet),{sheet:r,address:i}=se(o,e.cell),h=Z(i);if(!h)throw new y("bad-input",`${e.cell} is not a cell.`,{exit:x.usage});const{row:l,col:d}=h,p=a.value(r,l,d),w=r.lookAt(l,d).format,g=r.at(l,d),c=o.sourceOf(r,l,d),$=g instanceof O?a.precedents(g).map(m=>{const ie=m.single?E(a.value(m.sheet,m.top,m.left),m.sheet.lookAt(m.top,m.left).format):`${u(m.cols)} × ${u(Math.max(0,Math.min(m.bottom,m.sheet.lastRow)-m.top+1))}`,J=m.single?m.sheet.at(m.top,m.left):void 0,V=J instanceof O?J.text:void 0;return{address:Ne(m,r),shown:ie,...V===void 0?{}:{formula:V}}}):[],b=a.readers(r,l,d),v=e.all?b:b.slice(0,TRACE_CELLS),S=v.map(m=>({address:`${m.sheet===r?"":`${m.sheet.name}!`}${R(m)}`,shown:E(m.value,m.sheet.lookAt(m.row,m.col).format),formula:m.text})),W=m=>[` ${m.address}`,m.shown,m.formula].filter(Boolean).join(" "),H=c===void 0?void 0:c.file===L||c.file===""?t:I.join(we(t),c.file),M=c?.line===void 0?H:`${H??""}:${String(c.line)}`;return{value:{file:t,cell:`${r.name}!${R(h)}`,value:_(p,w),shown:E(p,w),...p instanceof be?{error:p.code}:{},...g instanceof O?{formula:g.text}:{},...M===void 0?{}:{written:M},reads:$,readBy:S,readers:b.length},text:[`${r.name}!${R(h)} ${E(p,w)}`,...g instanceof O?[` ${g.text}`]:[],...M===void 0?[]:[` written in ${M}`],...$.length>0?["reads:",...$.map(W)]:[],...b.length>0?[`read by ${u(b.length)}:`,...S.map(W),...b.length>v.length?[` … ${u(b.length-v.length)} more (--all)`]:[]]:["read by nothing"]].join(`
6
6
  `)}}}),sheetCapabilities=j({input:f.strictObject({}),output:f.looseObject({}),examples:["allyhub sheet capabilities"],run:()=>Promise.resolve({value:{...Q},text:JSON.stringify(Q,null,2)})});const ne=new Set([".xlsx",".xlsm",".xltx",".xltm"]);export const DIFF_ROWS=50;const oe={value:"Value changed, formula the same",formula:"Formula changed, value the same",both:"Formula and value changed",added:"Added",removed:"Removed"},De=e=>{const n=(e.now??e.was)?.cell??"",s=e.table===void 0?n:`${e.table}[${e.key??n}]`,t=e.column===void 0?"":` ${e.column}`;return`${e.sheet}!${s}${t}`},_e=e=>{const n=e.was?.formula??"",s=e.now?.formula??"";return[De(e),e.was?.shown??"","→",e.now?.shown??"",e.kind==="value"?s:e.kind==="formula"||e.kind==="both"?`${n} → ${s}`:s===""?n:s]};function Pe(e,n){const s=[];for(const t of e.sheets)s.push(`Sheet ${t.name} ${t.added?"added":"removed"}`);for(const t of e.tables){const o=[t.rowsAdded.length>0?`rows added: ${t.rowsAdded.slice(0,20).join(", ")}`:"",t.rowsRemoved.length>0?`rows removed: ${t.rowsRemoved.slice(0,20).join(", ")}`:"",t.columnsAdded.length>0?`columns added: ${t.columnsAdded.join(", ")}`:"",t.columnsRemoved.length>0?`columns removed: ${t.columnsRemoved.join(", ")}`:""].filter(Boolean);s.push(`Table ${t.name}, rows lined up by ${t.by==="key"?t.key??"its key":"their place"}${o.length>0?`: ${o.join("; ")}`:""}`)}for(const t of e.names)s.push(`Name ${t.name}: ${t.was??"(none)"} → ${t.now??"(none)"}`);for(const t of e.parts)s.push(`${t.sheet??"Workbook"} ${t.part}${t.key===void 0?"":` ${t.key}`}: ${t.was??"(none)"} → ${t.now??"(none)"}`);for(const t of e.charts)s.push(`Charts of ${t} changed`);for(const t of Object.keys(oe)){const o=e.cells.filter(r=>r.kind===t);if(o.length===0)continue;const a=n?o:o.slice(0,DIFF_ROWS);s.push("",`${oe[t]}: ${u(o.length)}`,...U(a.map(_e)).map(r=>` ${r}`),...o.length>a.length?[` … ${u(o.length-a.length)} more (--all)`]:[])}return s}async function ae(e,n,s){const t=Y(n.cwd,s);if(ne.has(F(t).toLowerCase())){const r=await X(t).catch(()=>{throw new y("not-found",`There is no file ${t}.`,{exit:x.notFound})}),i=ee(new Uint8Array(r),{name:k(t,F(t))}),{calc:h}=ke({text:i.files.get(L)??"",read:l=>i.files.get(l)});if(!h)throw new y("bad-file",`${s} cannot be read.`,{exit:x.usage});return{calc:h,file:s}}const{calc:o,file:a}=await T(e,n,s);return{calc:o,file:a}}export const sheetDiff=j({input:f.strictObject({was:f.string().describe("The version before: a sheet (its file or its id) or an .xlsx"),now:f.string().describe("The version after: a sheet (its file or its id) or an .xlsx"),tolerance:f.number().min(0).default($e.tolerance).describe("How far apart two numbers may be, as a share of the larger, and be the same"),all:f.boolean().default(!1).describe(`Every cell, not the first ${String(DIFF_ROWS)} of each kind`),dir:C}),positional:["was","now"],output:f.looseObject({}),examples:["allyhub sheet diff finance/budget finance/budget-v2","allyhub sheet diff finance/budget ~/Downloads/budget.xlsx --json"],run:async(e,n)=>{const s=await A(n.cwd,e.dir),t=await ae(s,n,e.was),o=await ae(s,n,e.now),a=Se(t.calc,o.calc,{tolerance:e.tolerance}),{counts:r}=a,i=a.cells.length;return{value:{was:t.file,now:o.file,...a},text:[`${t.file} → ${o.file}: ${u(i)} cell${i===1?"":"s"} differ (${u(r.value)} value, ${u(r.formula)} formula, ${u(r.both)} both, ${u(r.added)} added, ${u(r.removed)} removed); ${u(a.names.length+a.parts.length)} other thing${a.names.length+a.parts.length===1?"":"s"} differ${a.names.length+a.parts.length===1?"s":""}`,...Pe(a,e.all)].join(`
7
- `)}}});const ze=f.string().transform(e=>e.replace(/^\/+/gu,"")).refine(e=>e.endsWith(".yaml")&&!e.split("/").some(n=>n===""||n==="."||n===".."),{message:"a .yaml file from the project's root, such as research/leads.yaml"});export const IMPORT_DIFFERENCES=50;const re=e=>e===null?"empty":typeof e=="string"?JSON.stringify(e):String(e);function Ue(e,n){const{formulas:s,same:t,uncached:o,moving:a,differences:r}=e,i=[`${u(t)} of ${u(s)} formulas compute what the file holds`,...a>0?[`${u(a)} read the clock or a random number, not compared`]:[],...o>0?[`${u(o)} have no value in the file`]:[]],h=n?r:r.slice(0,IMPORT_DIFFERENCES);return[`Computed here against the file: ${i.join("; ")}.`,...r.length>0?[`${u(r.length)} differ${r.length===1?"s":""}:`,...h.map(l=>` ${l.sheet}!${l.cell} ${l.formula} file ${re(l.file)} here ${re(l.engine)}`),...r.length>h.length?[` … ${u(r.length-h.length)} more (--all)`]:[]]:[]]}async function le(e,n,s){const t=I.dirname(n),o=[...s].map(([a,r])=>({path:a===L?n:t==="."?a:`${t}/${a}`,content:r}));for(const{path:a}of o)if(await de(D(e,a)).catch(()=>{}))throw new y("place-taken",`${a} is already there.`,{exit:x.conflict,hint:"Name another file with --to."});for(const{path:a,content:r}of o){const i=D(e,a);await he(me(i),{recursive:!0}),await fe(i,r,{flag:"wx"})}return o.map(a=>a.path)}export const sheetImport=j({input:f.strictObject({file:f.string().describe("The file to make a sheet of: .xlsx, .xlsm, .csv or .tsv"),to:ze.optional().describe("The sheet's file, from the project's root (default <the file's name>.yaml); its tables' CSV files go beside it, under names no file there has"),maxUnzipped:f.number().positive().default(ue.bytes/1024/1024).describe("The most MB the file may unzip to"),tolerance:f.number().min(0).default(Te).describe("How far apart a computed number and the file's may be, as a share of the larger, and count as the same; 0 lists every difference"),all:f.boolean().default(!1).describe(`Every difference, not the first ${String(IMPORT_DIFFERENCES)}`),dir:C}),positional:["file"],output:f.looseObject({}),examples:["allyhub sheet import ~/Downloads/forecast.xlsx --to finance/forecast.yaml","allyhub sheet import ~/Downloads/leads.csv --to research/leads.yaml"],run:async(e,n)=>{const s=await A(n.cwd,e.dir),t=Y(n.cwd,e.file),o=F(t).toLowerCase(),a=ne.has(o);if(o===".xls"||o===".xlsb")throw new y("bad-file",`${k(t)} is Excel's binary format.`,{exit:x.usage,hint:"Save it as .xlsx, then import that."});if(!a&&o!==".csv"&&o!==".tsv")throw new y("bad-file",`${k(t)} is not an .xlsx, .xlsm, .csv or .tsv file.`,{exit:x.usage});const r=await X(t).catch(()=>{throw new y("not-found",`There is no file ${t}.`,{exit:x.notFound})}),i=k(t,F(t)),h=e.to??`${i}.yaml`,l=I.basename(h,".yaml"),d=pe(h),p=c=>ce(D(s,I.dirname(h),c));if(a){let c;try{c=ee(new Uint8Array(r),{name:l,tolerance:e.tolerance,zip:{bytes:e.maxUnzipped*1024*1024},taken:p})}catch(b){throw new y("bad-file",`${k(t)} cannot be read: ${b.message}`,{exit:x.usage})}const $=await le(s,h,new Map([...c.files,...c.assets]));return await q(s,{kind:"sheet",file:h},n.kinds(s)),{value:{id:d,files:$,sheets:c.sheets,tables:c.tables,lost:c.lost,problems:c.problems,compared:c.compared},text:[`Made ${$.join(", ")}; listed in allyhub.yaml as ${d}.`,...c.lost.length>0?["Not carried over:",...c.lost.map(b=>` ${b}`)]:["Nothing was left out."],...Ue(c.compared,e.all),...c.problems.length>0?["Problems:",...c.problems.map(b=>` ${b.file}${b.line===void 0?"":`:${String(b.line)}`}: ${b.message}`)]:[],`allyhub sheet calc ${d}, then allyhub frames ${d}, to see it.`].join(`
7
+ `)}}});const ze=f.string().transform(e=>e.replace(/^\/+/gu,"")).refine(e=>e.endsWith(".yaml")&&!e.split("/").some(n=>n===""||n==="."||n===".."),{message:"a .yaml file from the project's root, such as research/leads.yaml"});export const IMPORT_DIFFERENCES=50;const re=e=>e===null?"empty":typeof e=="string"?JSON.stringify(e):String(e);function Ue(e,n){const{formulas:s,same:t,uncached:o,moving:a,differences:r}=e,i=[`${u(t)} of ${u(s)} formulas compute what the file holds`,...a>0?[`${u(a)} read the clock or a random number, not compared`]:[],...o>0?[`${u(o)} have no value in the file`]:[]],h=n?r:r.slice(0,IMPORT_DIFFERENCES);return[`Computed here against the file: ${i.join("; ")}.`,...r.length>0?[`${u(r.length)} differ${r.length===1?"s":""}:`,...h.map(l=>` ${l.sheet}!${l.cell} ${l.formula} file ${re(l.file)} here ${re(l.engine)}`),...r.length>h.length?[` … ${u(r.length-h.length)} more (--all)`]:[]]:[]]}async function le(e,n,s){const t=I.dirname(n),o=[...s].map(([a,r])=>({path:a===L?n:t==="."?a:`${t}/${a}`,content:r}));for(const{path:a}of o)if(await de(D(e,a)).catch(()=>{}))throw new y("place-taken",`${a} is already there.`,{exit:x.conflict,hint:"Name another file with --to."});for(const{path:a,content:r}of o){const i=D(e,a);await he(me(i),{recursive:!0}),await fe(i,r,{flag:"wx"})}return o.map(a=>a.path)}export const sheetImport=j({input:f.strictObject({file:f.string().describe("The file to make a sheet of: .xlsx, .xlsm, .csv or .tsv"),to:ze.optional().describe("The sheet's file, from the project's root (default <the file's name>.yaml); its tables' CSV files go beside it, under names no file there has"),maxUnzipped:f.number().positive().default(ue.bytes/1024/1024).describe("The most MB the file may unzip to"),tolerance:f.number().min(0).default(Te).describe("How far apart a computed number and the file's may be, as a share of the larger, and count as the same; 0 lists every difference"),all:f.boolean().default(!1).describe(`Every difference, not the first ${String(IMPORT_DIFFERENCES)}`),dir:C}),positional:["file"],output:f.looseObject({}),examples:["allyhub sheet import ~/Downloads/forecast.xlsx --to finance/forecast.yaml","allyhub sheet import ~/Downloads/leads.csv --to research/leads.yaml"],run:async(e,n)=>{const s=await A(n.cwd,e.dir),t=Y(n.cwd,e.file),o=F(t).toLowerCase(),a=ne.has(o);if(o===".xls"||o===".xlsb")throw new y("bad-file",`${k(t)} is Excel's binary format.`,{exit:x.usage,hint:"Save it as .xlsx, then import that."});if(!a&&o!==".csv"&&o!==".tsv")throw new y("bad-file",`${k(t)} is not an .xlsx, .xlsm, .csv or .tsv file.`,{exit:x.usage});const r=await X(t).catch(()=>{throw new y("not-found",`There is no file ${t}.`,{exit:x.notFound})}),i=k(t,F(t)),h=e.to??`${i}.yaml`,l=I.basename(h,".yaml"),d=pe(h),p=c=>ce(D(s,I.dirname(h),c));if(a){let c;try{c=ee(new Uint8Array(r),{name:l,tolerance:e.tolerance,zip:{bytes:e.maxUnzipped*1024*1024},taken:p})}catch(b){throw new y("bad-file",`${k(t)} cannot be read: ${b.message}`,{exit:x.usage})}const $=await le(s,h,new Map([...c.files,...c.assets]));return await q(s,{kind:"sheet",file:h},n.kinds(s)),{value:{id:d,files:$,sheets:c.sheets,tables:c.tables,lost:c.lost,problems:c.problems,compared:c.compared},text:[`Made ${$.join(", ")}; listed in allyhub.yaml as ${d}.`,...c.lost.length>0?["Not carried over:",...c.lost.map(b=>` ${b}`)]:["Nothing was left out."],...Ue(c.compared,e.all),...c.problems.length>0?["Problems:",...c.problems.map(b=>` ${b.file}${b.line===void 0?"":`:${String(b.line)}`}: ${b.message}`)]:[]].join(`
8
8
  `)}}let w;try{w=je(l,r.toString("utf8"),o===".tsv"?" ":",",p)}catch(c){throw new y("bad-file",c.message,{exit:x.usage})}const g=await le(s,h,new Map([[L,w.text],[w.path,w.csv]]));return await q(s,{kind:"sheet",file:h},n.kinds(s)),{value:{id:d,files:g,rows:w.rows,lost:[]},text:`Made ${g.join(" and ")}, listed in allyhub.yaml as ${d}: ${u(w.rows)} row${w.rows===1?"":"s"}`}}});
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/sheet-extension",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./code": {
@@ -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,GlowFormat as h,ReflectionFormat as d,SoftEdgeFormat as p,Background as c,Cell as m,ColorFormat as u,Column as _,FillFormat as y,Font as f,FreeformBuilder as w,GeneratedSlide as g,Generator as b,GroupShape as P,Hyperlink as S,LineFormat as A,ListLevel as O,ShadowFormat as E,GradientStop as x,Paragraph as L,Placeholders as T,Presentation as C,Row as M,Run as I,Shape as v,ShapeCollection as R,SlideLayout as k,SlideLayouts as N,SlideMaster as D,SlideMasters as F,Table as H,TextFrame as G,TextStyles as B}from"./api.js";import{CategoryChartData as W,Chart as z,XyChartData as j,XySeriesData as X,AxisTitle as U,ChartAxis as Y,ChartFormat as Z,ChartLegend as V,MajorGridlines as J,TickLabels as K,ChartPlot as q,ChartPoint as Q,ChartSeries as $,DataLabel as ee,DataLabels as te}from"./chart-api.js";import{MSO_ANCHOR as ae,MSO_ARROWHEAD as se,MSO_ARROWHEAD_SIZE as oe,MSO_AUTO_SIZE as re,MSO_CONNECTOR as ie,MSO_FILL as ne,MSO_LINE as le,MSO_LINE_CAP as he,MSO_LINE_COMPOUND as de,MSO_LINE_JOIN as pe,MSO_PATTERN_TYPE as ce,MSO_SHAPE as me,MSO_SHAPE_TYPE as ue,MSO_TEXT_CAPS as _e,MSO_TEXT_ORIENTATION as ye,MSO_TEXT_STRIKE as fe,MSO_THEME_COLOR as we,MSO_UNDERLINE as ge,PP_ALIGN as be,PP_PLACEHOLDER as Pe,THEME_FONT as Se,XL_CHART_TYPE as Ae,XL_LABEL_POSITION as Oe,XL_LEGEND_POSITION as Ee}from"./enums.js";import{publicNames as o}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."},Table:{style:"Its style, one of PowerPoint's 74 built-in table styles, by its English name as the gallery shows it (Medium Style 2 - Accent 1, Light Style 1, No Style, Table Grid); set by name or id ({5C22544A-…}), null for none (a:tableStyleId)."},_Cell:{borders:"Its edges: { left, right, top, bottom }, each { color, width } (a:lnL…)."},LineFormat:{cap_type:"How its ends and dashes end (MSO_LINE_CAP): PowerPoint's Cap type (a:ln@cap), flat unless set.",join_type:"How its corners meet (MSO_LINE_JOIN): PowerPoint's Join type (a:round, a:bevel, a:miter), a miter unless set.",compound_type:"One line, two or three (MSO_LINE_COMPOUND): PowerPoint's Compound type (a:ln@cmpd), single unless set.",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)."},ColorFormat:{transforms:"DrawingML's transforms of the colour in order, [{ name, value }]: tint, shade, lumMod, lumOff, lum, satMod, satOff, sat, hueMod, hueOff, hue, alpha, alphaMod, alphaOff, each value a share (0.75 is 75%), degrees for hue and hueOff; set, they take a brightness's place."},FillFormat:{gradient_path:`A gradient's kind: "linear" along gradient_angle, or out from its focus, "circle", "rect" or "shape" (a:path), PowerPoint's Radial, Rectangular and Path; its first stop is at the focus.`,gradient_focus:"A path gradient's focus (a:fillToRect): { left, top, right, bottom }, the share in from each side, the middle unless set; PowerPoint's Direction (From Center is 0.5 each, From Top Left Corner { left: 0, top: 0, right: 1, bottom: 1 }).",picture:"picture(image_file, { tile, transparency }): a picture filling the shape, PowerPoint's Picture or Texture Fill (a:blipFill), a path from the deck's module's folder, stretched over the shape, or tiled: { scale_x, scale_y } shares of its own size, { offset_x, offset_y } Lengths from where align (TILE_ALIGNMENT, top left unless set) puts its first tile.",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.",visible:"Whether it is drawn, Office's ShadowFormat.Visible: true gives it the defaults' shadow until changed, false none."},Shape:{decorative:"PowerPoint's Mark as Decorative (adec:decorative): it only decorates, so a screen reader passes over it, it has no alternative text, and the check lets its text stand off the slide's edge and over other text.",inner_shadow:"A shadow inside it (a:innerShdw), PowerPoint's Inner shadows: a ShadowFormat with visible, blur_radius, distance, angle, transparency and color; INNER_SHADOW_DEFAULTS until changed.",glow:"Its glow (a:glow), Office's GlowFormat: visible, radius (a Length; 0 takes it away), transparency, color; GLOW_DEFAULTS until changed.",soft_edge:"Its soft edges (a:softEdge), Office's SoftEdgeFormat: radius, how far in its edges fade (0 takes them away).",reflection:"Its reflection (a:reflection), Office's ReflectionFormat: visible, transparency where it starts, size (the share of the shape it shows), offset (how far below, a Length), blur; REFLECTION_DEFAULTS until changed.",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): true, or MSO_TEXT_STRIKE.DOUBLE (dblStrike), PowerPoint's Double Strikethrough.",caps:"Its letters as capitals (@cap, MSO_TEXT_CAPS): ALL, SMALL, or NONE over a level that has them; PowerPoint's All Caps and Small Caps.",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:{color_map:"Its colour map (p:clrMap): what tx1, bg1, tx2, bg2, the accents and the links are of the theme's twelve colours; Office's is { bg1: lt1, tx1: dk1, bg2: lt2, tx2: dk2 }, a dark master's the other way round.",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:{color_map:"Its own colour map over its master's (p:clrMapOvr), or undefined for its master's.",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, orient }): a placeholder on a master or a layout; a layout's without a frame takes its master's of its base type; orient: "vert" makes it a vertical placeholder (p:ph@orient), its text turned by text_frame.orientation.`},SlideShapes:{add_audio:"add_audio(audio_file, left, top, width?, height?, { playback }): a sound, PowerPoint's Insert Audio, drawn as its icon (half an inch unless given); its shape_type is MSO_SHAPE_TYPE.MEDIA, as python-pptx reads one.",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:{orientation:"Which way its text runs (a:bodyPr@vert, MSO_TEXT_ORIENTATION): HORIZONTAL, DOWNWARD (turned 90°), UPWARD (270°), VERTICAL_FAR_EAST (CJK upright, other letters turned), VERTICAL (stacked), VERTICAL_RIGHT_TO_LEFT, MONGOLIAN; PowerPoint's Text Direction.",list_style:"Its list style (a:lstStyle): nine ListLevels, level 0 first, what its paragraphs take where they set nothing.",columns:"Its text in so many columns, 1 to 16 (a:bodyPr@numCol): PowerPoint's Columns.",column_spacing:"The space between its columns (a:bodyPr@spcCol)."},ListLevel:{"*":"A level of a list style: alignment, line_spacing, space_before, space_after, font, bullet (a character, or null for none), bullet_font, bullet_color (a:buClr: a colour, or null for its text's), bullet_size (a:buSzPct: a share of its text's size), numbered (a:buAutoNum: any of ECMA-376's 41 schemes, arabicPeriod, alphaLcParenR, circleNumDbPlain, ea1ChsPeriod…), start_at (the number it starts at), margin_left, indent. A bullet or a number set on a text box's or a shape's level with no margin_left and indent of its own hangs as PowerPoint's Bullets hang it (0.3125 in, a number 0.375 in, past the level's start, half an inch a level)."},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, amount, duration, delay, paragraph, path, animate_text, text_delay, repeat, rewind }), 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, through_black, duration }, PowerPoint's fade, push, wipe, split, reveal, cut, cover, uncover, zoom and morph, which python-pptx has no API for."},Axis:{log_base:"A logarithmic scale of this base, 2 to 1000 (c:logBase), PowerPoint's Logarithmic scale; undefined, a straight one.",display_units:"Its numbers in a unit (c:dispUnits): hundreds, thousands, tenThousands, hundredThousands, millions, tenMillions, hundredMillions, billions, trillions; PowerPoint's Display units, said beside the axis.",crosses:"Where the other axis crosses this one, python-pptx's: autoZero, min, max (written on the other axis, as Excel does); crosses_at, a value of it."},Series:{data_labels:"Its own data labels over the chart's (c:ser/c:dLbls): show_value, show_series_name… as the plot's; set them on a series to label it alone, or has_data_labels on the plot for all.",chart_type:"What the series is drawn as (XL_CHART_TYPE): a combination chart's column, line or area type other than the chart's, as Excel's Series.ChartType and PowerPoint's Change Chart Type ▸ Combo; the chart's own unless set.",on_secondary_axis:"On the chart's second value axis, at the right (Excel's Series.AxisGroup xlSecondary, Combo's Secondary Axis): columns, lines and areas only."},Chart:{secondary_value_axis:"Its second value axis, at the right (a c:valAx at axPos r), for its series on_secondary_axis: an Axis, its scale, gridlines, format and title its own."},Generator:{"*":"What a generator's function is given: data(path), and slides.add_slide(layout, id)."}},xe={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 export writes its files."}},Le={Presentation:C.prototype,SlideMasters:F.prototype,SlideMaster:D.prototype,SlideLayouts:N.prototype,SlideLayout:k.prototype,Slide:g.prototype,placeholders:T.prototype,SlideShapes:R.prototype,Shape:v.prototype,TextFrame:G.prototype,_Paragraph:L.prototype,_Run:I.prototype,_Hyperlink:S.prototype,Font:f.prototype,ColorFormat:u.prototype,FillFormat:y.prototype,LineFormat:A.prototype,ShadowFormat:E.prototype,_GradientStop:x.prototype,FreeformBuilder:w.prototype,GroupShape:P.prototype,Table:H.prototype,CategoryChartData:W.prototype,XyChartData:j.prototype,XySeriesData:X.prototype,Chart:z.prototype,Plot:q.prototype,Series:$.prototype,Point:Q.prototype,DataLabel:ee.prototype,DataLabels:te.prototype,Legend:V.prototype,Axis:Y.prototype,AxisTitle:U.prototype,TickLabels:K.prototype,MajorGridlines:J.prototype,ChartFormat:Z.prototype,_Cell:m.prototype,_Column:_.prototype,_Row:M.prototype,_Background:c.prototype},Te={Animations:l.prototype,GlowFormat:h.prototype,SoftEdgeFormat:p.prototype,ReflectionFormat:d.prototype,ListLevel:O.prototype,text_styles:B.prototype,Generator:b.prototype},Ce=()=>{const e={};for(const[t,r]of Object.entries(Le)){const i=a[t]??{},n=xe[t]??{};e[t]=o(r).filter(s=>!Object.hasOwn(i,s)&&!Object.hasOwn(n,s))}return e};export const CAPABILITIES={reference:{library:"python-pptx",version:"1.0.2",docs:"https://python-pptx.readthedocs.io/"},holds:Ce(),enums:Object.fromEntries(Object.entries({MSO_THEME_COLOR:we,PP_ALIGN:be,MSO_ANCHOR:ae,MSO_AUTO_SIZE:re,PP_PLACEHOLDER:Pe,MSO_SHAPE:me,MSO_CONNECTOR:ie,MSO_SHAPE_TYPE:ue,MSO_FILL:ne,MSO_LINE:le,MSO_LINE_CAP:he,MSO_LINE_JOIN:pe,MSO_LINE_COMPOUND:de,MSO_PATTERN_TYPE:ce,XL_CHART_TYPE:Ae,XL_LABEL_POSITION:Oe,XL_LEGEND_POSITION:Ee,MSO_ARROWHEAD:se,MSO_ARROWHEAD_SIZE:oe,MSO_UNDERLINE:ge,MSO_TEXT_STRIKE:fe,MSO_TEXT_CAPS:_e,MSO_TEXT_ORIENTATION:ye,THEME_FONT:Se}).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 tx1 and bg1, which the master's colour map (SlideMaster.color_map) makes dk1 and lt1 (Office's) or, on a dark master, lt1 and dk1. 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; MSO_LINE also holds DrawingML's DOT, SYSTEM_DASH_DOT and SYSTEM_DASH_DOT_DOT, which python-pptx has no name for. A line's transparency is its colour's alpha (line.color.transforms).`,`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). space_before and space_after are a Length too, or a number of lines at the paragraph's size (a:spcPct, PowerPoint's Before and After in lines), which python-pptx does not read.","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, playback }) takes a video file, its poster a moment of it in seconds, not poster_frame_image, and how it plays, PowerPoint's Playback, which python-pptx has no API for: { start: "auto" | "on-click", trim: { start, end } in seconds, loop, volume (a share, 0 mutes), fullscreen, hide }.`,"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.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, and combinations of columns, lines and areas, some on a second value axis (Series.chart_type, on_secondary_axis), which python-pptx reads as several plots and cannot make; it has no 3D, no bubble and no radar. A combination chart's plots share its gap width, overlap and data labels. Setting an axis's has_title gives it the words Axis Title, PowerPoint's new title's. 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. In a chart that varies by categories (a pie, a doughnut) its fill is its category's colour, one for every series (the slides file's category_colors); in any other its own series' (the series' points), as python-pptx's is.","A table starts with python-pptx's Medium Style 2 - Accent 1, first_row and horz_banding on; its style is drawn under its cells' own fill, borders and text, as PowerPoint draws one. 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; a group's shapes.add_group_shape() makes a group in it (its shapes' group outer/inner in the slides file); 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(Te).map(([e,t])=>[e,{...a[e]??{},names:o(t).join(", ")}]))}};
2
+ import{Animations as l,GlowFormat as h,ReflectionFormat as d,SoftEdgeFormat as p,Background as c,Cell as m,ColorFormat as u,Column as _,FillFormat as f,Font as y,FreeformBuilder as w,GeneratedSlide as g,Generator as b,GroupShape as P,Hyperlink as S,LineFormat as A,ListLevel as O,ShadowFormat as E,GradientStop as x,Paragraph as L,Placeholders as T,Presentation as C,Row as M,Run as I,Shape as v,ShapeCollection as R,SlideLayout as k,SlideLayouts as N,SlideMaster as D,SlideMasters as F,Table as H,TextFrame as G,TextStyles as B}from"./api.js";import{CategoryChartData as W,Chart as z,XyChartData as j,XySeriesData as X,AxisTitle as U,ChartAxis as Y,ChartFormat as Z,ChartLegend as V,MajorGridlines as J,TickLabels as K,ChartPlot as q,ChartPoint as Q,ChartSeries as $,DataLabel as ee,DataLabels as te}from"./chart-api.js";import{MSO_ANCHOR as ae,MSO_ARROWHEAD as se,MSO_ARROWHEAD_SIZE as oe,MSO_AUTO_SIZE as re,MSO_CONNECTOR as ie,MSO_FILL as ne,MSO_LINE as le,MSO_LINE_CAP as he,MSO_LINE_COMPOUND as de,MSO_LINE_JOIN as pe,MSO_PATTERN_TYPE as ce,MSO_SHAPE as me,MSO_SHAPE_TYPE as ue,MSO_TEXT_CAPS as _e,MSO_TEXT_ORIENTATION as fe,MSO_TEXT_STRIKE as ye,MSO_THEME_COLOR as we,MSO_UNDERLINE as ge,PP_ALIGN as be,PP_PLACEHOLDER as Pe,THEME_FONT as Se,XL_CHART_TYPE as Ae,XL_LABEL_POSITION as Oe,XL_LEGEND_POSITION as Ee}from"./enums.js";import{publicNames as o}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."},Table:{style:"Its style, one of PowerPoint's 74 built-in table styles, by its English name as the gallery shows it (Medium Style 2 - Accent 1, Light Style 1, No Style, Table Grid); set by name or id ({5C22544A-…}), null for none (a:tableStyleId)."},_Cell:{borders:"Its edges: { left, right, top, bottom }, each { color, width } (a:lnL…)."},LineFormat:{cap_type:"How its ends and dashes end (MSO_LINE_CAP): PowerPoint's Cap type (a:ln@cap), flat unless set.",join_type:"How its corners meet (MSO_LINE_JOIN): PowerPoint's Join type (a:round, a:bevel, a:miter), a miter unless set.",compound_type:"One line, two or three (MSO_LINE_COMPOUND): PowerPoint's Compound type (a:ln@cmpd), single unless set.",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)."},ColorFormat:{transforms:"DrawingML's transforms of the colour in order, [{ name, value }]: tint, shade, lumMod, lumOff, lum, satMod, satOff, sat, hueMod, hueOff, hue, alpha, alphaMod, alphaOff, each value a share (0.75 is 75%), degrees for hue and hueOff; set, they take a brightness's place."},FillFormat:{gradient_path:`A gradient's kind: "linear" along gradient_angle, or out from its focus, "circle", "rect" or "shape" (a:path), PowerPoint's Radial, Rectangular and Path; its first stop is at the focus.`,gradient_focus:"A path gradient's focus (a:fillToRect): { left, top, right, bottom }, the share in from each side, the middle unless set; PowerPoint's Direction (From Center is 0.5 each, From Top Left Corner { left: 0, top: 0, right: 1, bottom: 1 }).",picture:"picture(image_file, { tile, transparency }): a picture filling the shape, PowerPoint's Picture or Texture Fill (a:blipFill), a path from the deck's module's folder, stretched over the shape, or tiled: { scale_x, scale_y } shares of its own size, { offset_x, offset_y } Lengths from where align (TILE_ALIGNMENT, top left unless set) puts its first tile.",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.",visible:"Whether it is drawn, Office's ShadowFormat.Visible: true gives it the defaults' shadow until changed, false none."},Shape:{decorative:"PowerPoint's Mark as Decorative (adec:decorative): it only decorates, so a screen reader passes over it, it has no alternative text, and the check lets its text stand off the slide's edge and over other text.",inner_shadow:"A shadow inside it (a:innerShdw), PowerPoint's Inner shadows: a ShadowFormat with visible, blur_radius, distance, angle, transparency and color; INNER_SHADOW_DEFAULTS until changed.",glow:"Its glow (a:glow), Office's GlowFormat: visible, radius (a Length; 0 takes it away), transparency, color; GLOW_DEFAULTS until changed.",soft_edge:"Its soft edges (a:softEdge), Office's SoftEdgeFormat: radius, how far in its edges fade (0 takes them away).",reflection:"Its reflection (a:reflection), Office's ReflectionFormat: visible, transparency where it starts, size (the share of the shape it shows), offset (how far below, a Length), blur; REFLECTION_DEFAULTS until changed.",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): true, or MSO_TEXT_STRIKE.DOUBLE (dblStrike), PowerPoint's Double Strikethrough.",caps:"Its letters as capitals (@cap, MSO_TEXT_CAPS): ALL, SMALL, or NONE over a level that has them; PowerPoint's All Caps and Small Caps.",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:{color_map:"Its colour map (p:clrMap): what tx1, bg1, tx2, bg2, the accents and the links are of the theme's twelve colours; Office's is { bg1: lt1, tx1: dk1, bg2: lt2, tx2: dk2 }, a dark master's the other way round.",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:{color_map:"Its own colour map over its master's (p:clrMapOvr), or undefined for its master's.",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, orient }): a placeholder on a master or a layout; a layout's without a frame takes its master's of its base type; orient: "vert" makes it a vertical placeholder (p:ph@orient), its text turned by text_frame.orientation.`},SlideShapes:{add_audio:"add_audio(audio_file, left, top, width?, height?, { playback }): a sound, PowerPoint's Insert Audio, drawn as its icon (half an inch unless given); its shape_type is MSO_SHAPE_TYPE.MEDIA, as python-pptx reads one.",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:{orientation:"Which way its text runs (a:bodyPr@vert, MSO_TEXT_ORIENTATION): HORIZONTAL, DOWNWARD (turned 90°), UPWARD (270°), VERTICAL_FAR_EAST (CJK upright, other letters turned), VERTICAL (stacked), VERTICAL_RIGHT_TO_LEFT, MONGOLIAN; PowerPoint's Text Direction.",list_style:"Its list style (a:lstStyle): nine ListLevels, level 0 first, what its paragraphs take where they set nothing.",columns:"Its text in so many columns, 1 to 16 (a:bodyPr@numCol): PowerPoint's Columns.",column_spacing:"The space between its columns (a:bodyPr@spcCol)."},ListLevel:{"*":"A level of a list style: alignment, line_spacing, space_before, space_after, font, bullet (a character, or null for none), bullet_font, bullet_color (a:buClr: a colour, or null for its text's), bullet_size (a:buSzPct: a share of its text's size), numbered (a:buAutoNum: any of ECMA-376's 41 schemes, arabicPeriod, alphaLcParenR, circleNumDbPlain, ea1ChsPeriod…), start_at (the number it starts at), margin_left, indent. A bullet or a number set on a text box's or a shape's level with no margin_left and indent of its own hangs as PowerPoint's Bullets hang it (0.3125 in, a number 0.375 in, past the level's start, half an inch a level)."},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, amount, duration, delay, paragraph, path, animate_text, text_delay, repeat, rewind }), 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, through_black, duration }, PowerPoint's fade, push, wipe, split, reveal, cut, cover, uncover, zoom and morph, which python-pptx has no API for."},Axis:{log_base:"A logarithmic scale of this base, 2 to 1000 (c:logBase), PowerPoint's Logarithmic scale; undefined, a straight one.",display_units:"Its numbers in a unit (c:dispUnits): hundreds, thousands, tenThousands, hundredThousands, millions, tenMillions, hundredMillions, billions, trillions; PowerPoint's Display units, said beside the axis.",crosses:"Where the other axis crosses this one, python-pptx's: autoZero, min, max (written on the other axis, as Excel does); crosses_at, a value of it."},Series:{data_labels:"Its own data labels over the chart's (c:ser/c:dLbls): show_value, show_series_name… as the plot's; set them on a series to label it alone, or has_data_labels on the plot for all.",chart_type:"What the series is drawn as (XL_CHART_TYPE): a combination chart's column, line or area type other than the chart's, as Excel's Series.ChartType and PowerPoint's Change Chart Type ▸ Combo; the chart's own unless set.",on_secondary_axis:"On the chart's second value axis, at the right (Excel's Series.AxisGroup xlSecondary, Combo's Secondary Axis): columns, lines and areas only."},Chart:{secondary_value_axis:"Its second value axis, at the right (a c:valAx at axPos r), for its series on_secondary_axis: an Axis, its scale, gridlines, format and title its own."},Generator:{"*":"What a generator's function is given: data(path), and slides.add_slide(layout, id)."}},xe={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 export writes its files."}},Le={Presentation:C.prototype,SlideMasters:F.prototype,SlideMaster:D.prototype,SlideLayouts:N.prototype,SlideLayout:k.prototype,Slide:g.prototype,placeholders:T.prototype,SlideShapes:R.prototype,Shape:v.prototype,TextFrame:G.prototype,_Paragraph:L.prototype,_Run:I.prototype,_Hyperlink:S.prototype,Font:y.prototype,ColorFormat:u.prototype,FillFormat:f.prototype,LineFormat:A.prototype,ShadowFormat:E.prototype,_GradientStop:x.prototype,FreeformBuilder:w.prototype,GroupShape:P.prototype,Table:H.prototype,CategoryChartData:W.prototype,XyChartData:j.prototype,XySeriesData:X.prototype,Chart:z.prototype,Plot:q.prototype,Series:$.prototype,Point:Q.prototype,DataLabel:ee.prototype,DataLabels:te.prototype,Legend:V.prototype,Axis:Y.prototype,AxisTitle:U.prototype,TickLabels:K.prototype,MajorGridlines:J.prototype,ChartFormat:Z.prototype,_Cell:m.prototype,_Column:_.prototype,_Row:M.prototype,_Background:c.prototype},Te={Animations:l.prototype,GlowFormat:h.prototype,SoftEdgeFormat:p.prototype,ReflectionFormat:d.prototype,ListLevel:O.prototype,text_styles:B.prototype,Generator:b.prototype},Ce=()=>{const e={};for(const[t,r]of Object.entries(Le)){const i=a[t]??{},n=xe[t]??{};e[t]=o(r).filter(s=>!Object.hasOwn(i,s)&&!Object.hasOwn(n,s))}return e};export const CAPABILITIES={reference:{library:"python-pptx",version:"1.0.2",docs:"https://python-pptx.readthedocs.io/"},holds:Ce(),enums:Object.fromEntries(Object.entries({MSO_THEME_COLOR:we,PP_ALIGN:be,MSO_ANCHOR:ae,MSO_AUTO_SIZE:re,PP_PLACEHOLDER:Pe,MSO_SHAPE:me,MSO_CONNECTOR:ie,MSO_SHAPE_TYPE:ue,MSO_FILL:ne,MSO_LINE:le,MSO_LINE_CAP:he,MSO_LINE_JOIN:pe,MSO_LINE_COMPOUND:de,MSO_PATTERN_TYPE:ce,XL_CHART_TYPE:Ae,XL_LABEL_POSITION:Oe,XL_LEGEND_POSITION:Ee,MSO_ARROWHEAD:se,MSO_ARROWHEAD_SIZE:oe,MSO_UNDERLINE:ge,MSO_TEXT_STRIKE:ye,MSO_TEXT_CAPS:_e,MSO_TEXT_ORIENTATION:fe,THEME_FONT:Se}).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 tx1 and bg1, which the master's colour map (SlideMaster.color_map) makes dk1 and lt1 (Office's) or, on a dark master, lt1 and dk1. 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; MSO_LINE also holds DrawingML's DOT, SYSTEM_DASH_DOT and SYSTEM_DASH_DOT_DOT, which python-pptx has no name for. A line's transparency is its colour's alpha (line.color.transforms).`,`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). space_before and space_after are a Length too, or a number of lines at the paragraph's size (a:spcPct, PowerPoint's Before and After in lines), which python-pptx does not read.","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, playback }) takes a video file, its poster a moment of it in seconds, not poster_frame_image, and how it plays, PowerPoint's Playback, which python-pptx has no API for: { start: "auto" | "on-click", trim: { start, end } in seconds, loop, volume (a share, 0 mutes), fullscreen, hide }.`,"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.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, XY scatter, radar, bubble and stock types, Office 2016's (waterfall, box and whisker, histogram, Pareto, treemap, sunburst, funnel), and combinations of columns, lines and areas, some on a second value axis (Series.chart_type, on_secondary_axis), which python-pptx reads as several plots and cannot make; it has no 3D and no surface. A combination chart's plots share its gap width, overlap and data labels. Setting an axis's has_title gives it the words Axis Title, PowerPoint's new title's. 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. In a chart that varies by categories (a pie, a doughnut) its fill is its category's colour, one for every series (the slides file's category_colors); in any other its own series' (the series' points), as python-pptx's is.","A table starts with python-pptx's Medium Style 2 - Accent 1, first_row and horz_banding on; its style is drawn under its cells' own fill, borders and text, as PowerPoint draws one. 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; a group's shapes.add_group_shape() makes a group in it (its shapes' group outer/inner in the slides file); 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(Te).map(([e,t])=>[e,{...a[e]??{},names:o(t).join(", ")}]))}};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/slides-core",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,3 +1,3 @@
1
1
  /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
- import{existsSync as v}from"node:fs";import{mkdir as I,readFile as T,stat as O,writeFile as S}from"node:fs/promises";import{basename as y,dirname as z,join as c,posix as b,resolve as P}from"node:path";import{z as s}from"zod";import{ZIP_LIMITS as C,itemIdOf as D}from"@allyhub/formats";import{PROJECT_DIR as E,defineCliCommand as g,listFonts as F,listWork as R,projectRoot as L}from"@allyhub/build";import{CommandError as p,EXIT as f}from"@allyhub/protocol";import{CAPABILITIES as $}from"@allyhub/slides-core";import{groupReport as N}from"@allyhub/ooxml";import{importDeck as q,nameOf as A,readPptx as M}from"@allyhub/slides-pptx";export const slidesCapabilities=g({input:s.strictObject({}),output:s.looseObject({}),examples:["allyhub slides capabilities"],run:()=>Promise.resolve({value:{...$},text:JSON.stringify($,null,2)})});const U=s.string().transform(e=>e.replace(/^\/+/gu,"")).refine(e=>e.endsWith(".ts")&&!e.split("/").some(o=>o===""||o==="."||o===".."),{message:"a .ts file from the project's root, such as reviews/q3.ts"});export const slidesImport=g({input:s.strictObject({file:s.string().describe("The .pptx to make a deck of"),to:U.optional().describe("The deck's module, from the project's root (default <the file's name>.ts); its slides are <name>.yaml beside it, its script <name>.<lang>.yaml, its pictures and videos beside them under names no file there has"),maxUnzipped:s.number().positive().default(C.bytes/1024/1024).describe("The most MB the file may unzip to"),lang:s.string().regex(/^[a-z]{2,3}(-[a-z0-9]+)*$/u).default("en").describe("The language of its words: its script is <name>.<lang>.yaml"),dir:E}),positional:["file"],output:s.looseObject({}),examples:["allyhub slides import ~/Downloads/q3-review.pptx --to reviews/q3.ts","allyhub slides import 培训.pptx --to training/onboarding.ts --lang zh-cn"],run:async(e,o)=>{const n=await L(o.cwd,e.dir),a=P(o.cwd,e.file),x=await T(a).catch(()=>{throw new p("not-found",`There is no file ${a}.`,{exit:f.notFound})}),l=e.to??`${A(y(a).replace(/\.pptx$/iu,""),new Set,"deck")}.ts`,h=b.dirname(l),r=i=>h==="."?i:`${h}/${i}`;let t;try{t=q(M(new Uint8Array(x),{bytes:e.maxUnzipped*1024*1024}),{lang:e.lang,source:y(a),name:b.basename(l,".ts"),taken:i=>v(c(n,r(i)))})}catch(i){throw new p("bad-file",`${a} is not a PowerPoint file this can read: ${i.message}`,{exit:f.usage})}const d=[...t.files.keys()].map(r);for(const i of d)if(await O(c(n,i)).catch(()=>{}))throw new p("place-taken",`${i} is already there.`,{exit:f.conflict,hint:"Name another module with --to."});for(const[i,j]of t.files){const w=c(n,r(i));await I(z(w),{recursive:!0}),await S(w,j,{flag:"wx"})}await R(n,{kind:"slides",file:l},o.kinds(n));const k=t.stylesheet===void 0?void 0:await F(n,r(t.stylesheet)),m=D(l),u=N(t.report);return{value:{id:m,files:d,report:t.report,skipped:Object.fromEntries(t.reasons)},text:[`Made ${d.join(", ")}; listed in allyhub.yaml as ${m}.`,...t.stylesheet===void 0?[]:[k===!0?`The fonts the file carried are in ${r(t.stylesheet)}, listed in allyhub.config.ts's fonts.`:`The fonts the file carried are in ${r(t.stylesheet)}: add "./${r(t.stylesheet)}" to allyhub.config's fonts to draw and export them.`],...u.length>0?[`Not carried over as it is (${String(t.report.length)}, grouped; all with --json):`,...u.map(_)]:[],`allyhub check, then allyhub frames ${m}, to see it.`].join(`
2
+ import{existsSync as v}from"node:fs";import{mkdir as I,readFile as T,stat as O,writeFile as S}from"node:fs/promises";import{basename as y,dirname as z,join as m,posix as b,resolve as P}from"node:path";import{z as s}from"zod";import{ZIP_LIMITS as C,itemIdOf as D}from"@allyhub/formats";import{PROJECT_DIR as E,defineCliCommand as g,listFonts as F,listWork as R,projectRoot as L}from"@allyhub/build";import{CommandError as c,EXIT as p}from"@allyhub/protocol";import{CAPABILITIES as $}from"@allyhub/slides-core";import{groupReport as N}from"@allyhub/ooxml";import{importDeck as q,nameOf as A,readPptx as M}from"@allyhub/slides-pptx";export const slidesCapabilities=g({input:s.strictObject({}),output:s.looseObject({}),examples:["allyhub slides capabilities"],run:()=>Promise.resolve({value:{...$},text:JSON.stringify($,null,2)})});const U=s.string().transform(e=>e.replace(/^\/+/gu,"")).refine(e=>e.endsWith(".ts")&&!e.split("/").some(o=>o===""||o==="."||o===".."),{message:"a .ts file from the project's root, such as reviews/q3.ts"});export const slidesImport=g({input:s.strictObject({file:s.string().describe("The .pptx to make a deck of"),to:U.optional().describe("The deck's module, from the project's root (default <the file's name>.ts); its slides are <name>.yaml beside it, its script <name>.<lang>.yaml, its pictures and videos beside them under names no file there has"),maxUnzipped:s.number().positive().default(C.bytes/1024/1024).describe("The most MB the file may unzip to"),lang:s.string().regex(/^[a-z]{2,3}(-[a-z0-9]+)*$/u).default("en").describe("The language of its words: its script is <name>.<lang>.yaml"),dir:E}),positional:["file"],output:s.looseObject({}),examples:["allyhub slides import ~/Downloads/q3-review.pptx --to reviews/q3.ts","allyhub slides import 培训.pptx --to training/onboarding.ts --lang zh-cn"],run:async(e,o)=>{const n=await L(o.cwd,e.dir),a=P(o.cwd,e.file),x=await T(a).catch(()=>{throw new c("not-found",`There is no file ${a}.`,{exit:p.notFound})}),l=e.to??`${A(y(a).replace(/\.pptx$/iu,""),new Set,"deck")}.ts`,f=b.dirname(l),r=i=>f==="."?i:`${f}/${i}`;let t;try{t=q(M(new Uint8Array(x),{bytes:e.maxUnzipped*1024*1024}),{lang:e.lang,source:y(a),name:b.basename(l,".ts"),taken:i=>v(m(n,r(i)))})}catch(i){throw new c("bad-file",`${a} is not a PowerPoint file this can read: ${i.message}`,{exit:p.usage})}const d=[...t.files.keys()].map(r);for(const i of d)if(await O(m(n,i)).catch(()=>{}))throw new c("place-taken",`${i} is already there.`,{exit:p.conflict,hint:"Name another module with --to."});for(const[i,k]of t.files){const w=m(n,r(i));await I(z(w),{recursive:!0}),await S(w,k,{flag:"wx"})}await R(n,{kind:"slides",file:l},o.kinds(n));const j=t.stylesheet===void 0?void 0:await F(n,r(t.stylesheet)),h=D(l),u=N(t.report);return{value:{id:h,files:d,report:t.report,skipped:Object.fromEntries(t.reasons)},text:[`Made ${d.join(", ")}; listed in allyhub.yaml as ${h}.`,...t.stylesheet===void 0?[]:[j===!0?`The fonts the file carried are in ${r(t.stylesheet)}, listed in allyhub.config.ts's fonts.`:`The fonts the file carried are in ${r(t.stylesheet)}: add "./${r(t.stylesheet)}" to allyhub.config's fonts to draw and export them.`],...u.length>0?[`Not carried over as it is (${String(t.report.length)}, grouped; all with --json):`,...u.map(_)]:[]].join(`
3
3
  `)}}});const W={unread:"not read",extension:"an extension not read",part:"a part not read","cannot-hold":"cannot hold",approximated:"approximated",missing:"missing"};function _(e){const o=e.where.length>3?`${e.where.slice(0,3).join("; ")} and ${String(e.where.length-3)} more`:e.where.join("; ");return` ${W[e.kind]}: ${e.what}${e.detail===void 0?"":` (${e.detail})`}${e.count>1?` ×${String(e.count)}`:""} at ${o}`}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/slides-extension",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./tools": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/slides-pptx",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/slides-runtime",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/stage",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@allyhub/stage-page",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {