@allyhub/sdk 0.7.0 → 0.8.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 (717) hide show
  1. package/CHANGELOG.md +138 -0
  2. package/dist/define.d.ts +20 -3
  3. package/dist/define.js +1 -1
  4. package/dist/dom.d.ts +1 -1
  5. package/dist/dom.js +1 -1
  6. package/dist/free.d.ts +6 -6
  7. package/dist/free.js +1 -1
  8. package/dist/input.js +1 -1
  9. package/dist/media.d.ts +1 -1
  10. package/dist/media.js +1 -1
  11. package/dist/messages.d.ts +1 -1
  12. package/dist/node_modules/@allyhub/audio/dist/node/ffmpeg.js +2 -0
  13. package/dist/node_modules/{@allyhub-next → @allyhub}/audio/package.json +2 -2
  14. package/dist/node_modules/@allyhub/chart/dist/chart-file.d.ts +11 -0
  15. package/dist/node_modules/@allyhub/chart/dist/chart-file.js +2 -0
  16. package/dist/node_modules/{@allyhub-next → @allyhub}/chart/dist/chart-xml.d.ts +2 -0
  17. package/dist/node_modules/@allyhub/chart/dist/chart-xml.js +3 -0
  18. package/dist/node_modules/{@allyhub-next → @allyhub}/chart/dist/chart.d.ts +3 -1
  19. package/dist/node_modules/@allyhub/chart/dist/chart.js +2 -0
  20. package/dist/node_modules/@allyhub/chart/dist/embedded.d.ts +15 -0
  21. package/dist/node_modules/@allyhub/chart/dist/embedded.js +3 -0
  22. package/dist/node_modules/@allyhub/chart/dist/index.d.ts +6 -0
  23. package/dist/node_modules/@allyhub/chart/dist/index.js +2 -0
  24. package/dist/node_modules/@allyhub/chart/dist/svg.d.ts +22 -0
  25. package/dist/node_modules/@allyhub/chart/dist/svg.js +2 -0
  26. package/dist/node_modules/{@allyhub-next → @allyhub}/chart/package.json +2 -2
  27. package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/slides.d.ts +3 -3
  28. package/dist/node_modules/@allyhub/formats/dist/data/slides.js +2 -0
  29. package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/schemas.d.ts +1 -1
  30. package/dist/node_modules/{@allyhub-next → @allyhub}/formats/package.json +2 -2
  31. package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/package.json +2 -2
  32. package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/account.d.ts +1 -0
  33. package/dist/node_modules/@allyhub/protocol/dist/app.js +2 -0
  34. package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/auth.d.ts +8 -4
  35. package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/auth.js +1 -1
  36. package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/cloud.d.ts +1 -0
  37. package/dist/node_modules/@allyhub/protocol/dist/cloud.js +2 -0
  38. package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/editor.d.ts +68 -3
  39. package/dist/node_modules/@allyhub/protocol/dist/editor.js +2 -0
  40. package/dist/node_modules/@allyhub/protocol/dist/frame.d.ts +290 -0
  41. package/dist/node_modules/@allyhub/protocol/dist/frame.js +2 -0
  42. package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/index.d.ts +3 -0
  43. package/dist/node_modules/@allyhub/protocol/dist/index.js +2 -0
  44. package/dist/node_modules/@allyhub/protocol/dist/jobs.d.ts +91 -0
  45. package/dist/node_modules/@allyhub/protocol/dist/jobs.js +2 -0
  46. package/dist/node_modules/@allyhub/protocol/dist/notes.d.ts +187 -0
  47. package/dist/node_modules/@allyhub/protocol/dist/notes.js +2 -0
  48. package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/registry.d.ts +6 -0
  49. package/dist/node_modules/@allyhub/protocol/dist/registry.js +2 -0
  50. package/dist/node_modules/@allyhub/protocol/dist/routes.js +2 -0
  51. package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/sites.d.ts +4 -0
  52. package/dist/node_modules/@allyhub/protocol/dist/sites.js +2 -0
  53. package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/snapshots.d.ts +48 -8
  54. package/dist/node_modules/@allyhub/protocol/dist/snapshots.js +2 -0
  55. package/dist/node_modules/@allyhub/protocol/dist/sources.d.ts +14 -0
  56. package/dist/node_modules/{@allyhub-next/chart/dist/index.js → @allyhub/protocol/dist/sources.js} +1 -1
  57. package/dist/node_modules/@allyhub/protocol/dist/teams.d.ts +195 -0
  58. package/dist/node_modules/@allyhub/protocol/dist/teams.js +2 -0
  59. package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/tools.d.ts +52 -3
  60. package/dist/node_modules/@allyhub/protocol/dist/tools.js +2 -0
  61. package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/package.json +2 -2
  62. package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/bundled.d.ts +1 -1
  63. package/dist/node_modules/@allyhub/runtimes/dist/bundled.js +2 -0
  64. package/dist/node_modules/@allyhub/runtimes/dist/download.d.ts +38 -0
  65. package/dist/node_modules/@allyhub/runtimes/dist/download.js +2 -0
  66. package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/index.d.ts +2 -2
  67. package/dist/node_modules/@allyhub/runtimes/dist/index.js +2 -0
  68. package/dist/node_modules/@allyhub/runtimes/dist/lock.d.ts +14 -0
  69. package/dist/node_modules/@allyhub/runtimes/dist/lock.js +2 -0
  70. package/dist/node_modules/@allyhub/runtimes/dist/manifest.d.ts +3 -0
  71. package/dist/node_modules/@allyhub/runtimes/dist/manifest.js +2 -0
  72. package/dist/node_modules/@allyhub/runtimes/dist/node-program.d.ts +12 -0
  73. package/dist/node_modules/@allyhub/runtimes/dist/node-program.js +2 -0
  74. package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/packages.d.ts +21 -2
  75. package/dist/node_modules/@allyhub/runtimes/dist/packages.js +4 -0
  76. package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/runtimes.d.ts +4 -1
  77. package/dist/node_modules/@allyhub/runtimes/dist/runtimes.js +4 -0
  78. package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/package.json +2 -2
  79. package/dist/node_modules/@allyhub/runtimes/pins/pdfjs-dist/package-lock.json +275 -0
  80. package/dist/node_modules/@allyhub/runtimes/pins/pdfjs-dist/package.json +11 -0
  81. package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/package.json +2 -2
  82. package/dist/node_modules/@allyhub/sheet/dist/api/capabilities.js +2 -0
  83. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/charts.d.ts +1 -1
  84. package/dist/node_modules/@allyhub/sheet/dist/api/charts.js +2 -0
  85. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/page.d.ts +1 -1
  86. package/dist/node_modules/@allyhub/sheet/dist/api/page.js +2 -0
  87. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/rules.d.ts +1 -1
  88. package/dist/node_modules/@allyhub/sheet/dist/api/rules.js +2 -0
  89. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/styles.d.ts +1 -1
  90. package/dist/node_modules/@allyhub/sheet/dist/api/styles.js +2 -0
  91. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/workbook.d.ts +1 -1
  92. package/dist/node_modules/@allyhub/sheet/dist/api/workbook.js +2 -0
  93. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/arrange.d.ts +1 -1
  94. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/server.d.ts +1 -1
  95. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/chart.d.ts +4 -10
  96. package/dist/node_modules/@allyhub/sheet/dist/chart.js +2 -0
  97. package/dist/node_modules/@allyhub/sheet/dist/diff.js +2 -0
  98. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/edit.d.ts +1 -1
  99. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/file.d.ts +1 -1
  100. package/dist/node_modules/@allyhub/sheet/dist/file.js +3 -0
  101. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/files.d.ts +1 -1
  102. package/dist/node_modules/@allyhub/sheet/dist/files.js +2 -0
  103. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/generated.d.ts +1 -1
  104. package/dist/node_modules/@allyhub/sheet/dist/generated.js +2 -0
  105. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/inspect.d.ts +1 -1
  106. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/paginate.d.ts +1 -1
  107. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/structure.d.ts +1 -1
  108. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/table-style.d.ts +1 -1
  109. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/validate.d.ts +1 -1
  110. package/dist/node_modules/@allyhub/sheet/dist/validate.js +2 -0
  111. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/workbook.d.ts +1 -1
  112. package/dist/node_modules/@allyhub/sheet/dist/workbook.js +2 -0
  113. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/charts.d.ts +1 -1
  114. package/dist/node_modules/@allyhub/sheet/dist/xlsx/charts.js +2 -0
  115. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/import.d.ts +1 -1
  116. package/dist/node_modules/@allyhub/sheet/dist/xlsx/import.js +2 -0
  117. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/read.d.ts +2 -2
  118. package/dist/node_modules/@allyhub/sheet/dist/xlsx/read.js +3 -0
  119. package/dist/node_modules/@allyhub/sheet/dist/xlsx/write.js +2 -0
  120. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/zip.d.ts +1 -1
  121. package/dist/node_modules/@allyhub/sheet/dist/xlsx/zip.js +2 -0
  122. package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/package.json +2 -2
  123. package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/animation.d.ts +1 -1
  124. package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/api.d.ts +9 -5
  125. package/dist/node_modules/@allyhub/slides-core/dist/api.js +4 -0
  126. package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/chart-api.d.ts +2 -2
  127. package/dist/node_modules/@allyhub/slides-core/dist/chart-api.js +2 -0
  128. package/dist/node_modules/@allyhub/slides-core/dist/code.js +2 -0
  129. package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/file.d.ts +1 -1
  130. package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/file.js +1 -1
  131. package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/index.d.ts +1 -2
  132. package/dist/node_modules/@allyhub/slides-core/dist/index.js +2 -0
  133. package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/measure.d.ts +1 -1
  134. package/dist/node_modules/@allyhub/slides-core/dist/measure.js +2 -0
  135. package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/merge.d.ts +1 -1
  136. package/dist/node_modules/@allyhub/slides-core/dist/merge.js +2 -0
  137. package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/model.d.ts +8 -24
  138. package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/resolve.d.ts +2 -2
  139. package/dist/node_modules/@allyhub/slides-core/dist/resolve.js +2 -0
  140. package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/script.d.ts +1 -1
  141. package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/script.js +1 -1
  142. package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/strict.d.ts +1 -1
  143. package/dist/node_modules/@allyhub/slides-core/dist/strict.js +2 -0
  144. package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/theme.d.ts +1 -1
  145. package/dist/node_modules/{@allyhub-next/video-core → @allyhub/slides-core}/package.json +2 -2
  146. package/dist/node_modules/@allyhub/video-core/dist/component.d.ts +70 -0
  147. package/dist/node_modules/@allyhub/video-core/dist/component.js +2 -0
  148. package/dist/node_modules/@allyhub/video-core/dist/edits.js +2 -0
  149. package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/export.d.ts +1 -1
  150. package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/fact.d.ts +2 -2
  151. package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/gen.d.ts +1 -1
  152. package/dist/node_modules/@allyhub/video-core/dist/gen.js +2 -0
  153. package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/index.d.ts +1 -0
  154. package/dist/node_modules/@allyhub/video-core/dist/index.js +2 -0
  155. package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/measure.d.ts +6 -1
  156. package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/media.d.ts +2 -2
  157. package/dist/node_modules/@allyhub/video-core/dist/media.js +2 -0
  158. package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/piece.d.ts +2 -2
  159. package/dist/node_modules/@allyhub/video-core/dist/piece.js +2 -0
  160. package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/problem.d.ts +1 -1
  161. package/dist/node_modules/@allyhub/video-core/dist/problem.js +2 -0
  162. package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/schema.d.ts +2 -2
  163. package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/speech.js +1 -1
  164. package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/timeline.d.ts +8 -3
  165. package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/transition.d.ts +11 -0
  166. package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/transition.js +1 -1
  167. package/dist/node_modules/{@allyhub-next/slides-core → @allyhub/video-core}/package.json +2 -2
  168. package/dist/parts.d.ts +2 -2
  169. package/dist/parts.js +1 -1
  170. package/dist/phone.d.ts +3 -3
  171. package/dist/phone.js +1 -1
  172. package/dist/piece.d.ts +7 -7
  173. package/dist/piece.js +1 -1
  174. package/dist/props.d.ts +1 -1
  175. package/dist/sheets.d.ts +1 -1
  176. package/dist/sheets.js +1 -1
  177. package/dist/slides.d.ts +3 -3
  178. package/dist/slides.js +1 -1
  179. package/dist/written.js +1 -1
  180. package/docs/README.md +1 -1
  181. package/docs/defaults.md +54 -1
  182. package/docs/docs.md +152 -5
  183. package/docs/layers.md +26 -0
  184. package/docs/modeling.md +7 -7
  185. package/docs/project.md +2 -2
  186. package/docs/scenery.md +4 -4
  187. package/docs/sheets.md +4 -4
  188. package/docs/slides.md +2 -2
  189. package/docs/websites.md +3 -3
  190. package/package.json +3 -2
  191. package/dist/node_modules/@allyhub-next/audio/dist/node/ffmpeg.js +0 -2
  192. package/dist/node_modules/@allyhub-next/chart/dist/chart-xml.js +0 -3
  193. package/dist/node_modules/@allyhub-next/chart/dist/chart.js +0 -2
  194. package/dist/node_modules/@allyhub-next/chart/dist/index.d.ts +0 -3
  195. package/dist/node_modules/@allyhub-next/formats/dist/data/slides.js +0 -2
  196. package/dist/node_modules/@allyhub-next/protocol/dist/app.js +0 -2
  197. package/dist/node_modules/@allyhub-next/protocol/dist/cloud.js +0 -2
  198. package/dist/node_modules/@allyhub-next/protocol/dist/editor.js +0 -2
  199. package/dist/node_modules/@allyhub-next/protocol/dist/index.js +0 -2
  200. package/dist/node_modules/@allyhub-next/protocol/dist/notes.d.ts +0 -188
  201. package/dist/node_modules/@allyhub-next/protocol/dist/notes.js +0 -2
  202. package/dist/node_modules/@allyhub-next/protocol/dist/registry.js +0 -2
  203. package/dist/node_modules/@allyhub-next/protocol/dist/routes.js +0 -2
  204. package/dist/node_modules/@allyhub-next/protocol/dist/sites.js +0 -2
  205. package/dist/node_modules/@allyhub-next/protocol/dist/snapshots.js +0 -2
  206. package/dist/node_modules/@allyhub-next/protocol/dist/teams.d.ts +0 -79
  207. package/dist/node_modules/@allyhub-next/protocol/dist/teams.js +0 -2
  208. package/dist/node_modules/@allyhub-next/protocol/dist/tools.js +0 -2
  209. package/dist/node_modules/@allyhub-next/runtimes/dist/bundled.js +0 -2
  210. package/dist/node_modules/@allyhub-next/runtimes/dist/download.d.ts +0 -15
  211. package/dist/node_modules/@allyhub-next/runtimes/dist/download.js +0 -2
  212. package/dist/node_modules/@allyhub-next/runtimes/dist/index.js +0 -2
  213. package/dist/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +0 -8
  214. package/dist/node_modules/@allyhub-next/runtimes/dist/lock.js +0 -2
  215. package/dist/node_modules/@allyhub-next/runtimes/dist/manifest.d.ts +0 -3
  216. package/dist/node_modules/@allyhub-next/runtimes/dist/manifest.js +0 -2
  217. package/dist/node_modules/@allyhub-next/runtimes/dist/node-program.d.ts +0 -3
  218. package/dist/node_modules/@allyhub-next/runtimes/dist/node-program.js +0 -2
  219. package/dist/node_modules/@allyhub-next/runtimes/dist/packages.js +0 -4
  220. package/dist/node_modules/@allyhub-next/runtimes/dist/runtimes.js +0 -4
  221. package/dist/node_modules/@allyhub-next/sheet/dist/api/capabilities.js +0 -2
  222. package/dist/node_modules/@allyhub-next/sheet/dist/api/charts.js +0 -2
  223. package/dist/node_modules/@allyhub-next/sheet/dist/api/page.js +0 -2
  224. package/dist/node_modules/@allyhub-next/sheet/dist/api/rules.js +0 -2
  225. package/dist/node_modules/@allyhub-next/sheet/dist/api/styles.js +0 -2
  226. package/dist/node_modules/@allyhub-next/sheet/dist/api/workbook.js +0 -2
  227. package/dist/node_modules/@allyhub-next/sheet/dist/chart.js +0 -2
  228. package/dist/node_modules/@allyhub-next/sheet/dist/diff.js +0 -2
  229. package/dist/node_modules/@allyhub-next/sheet/dist/file.js +0 -3
  230. package/dist/node_modules/@allyhub-next/sheet/dist/files.js +0 -2
  231. package/dist/node_modules/@allyhub-next/sheet/dist/generated.js +0 -2
  232. package/dist/node_modules/@allyhub-next/sheet/dist/validate.js +0 -2
  233. package/dist/node_modules/@allyhub-next/sheet/dist/workbook.js +0 -2
  234. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/charts.js +0 -2
  235. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/import.js +0 -2
  236. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/read.js +0 -3
  237. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/write.js +0 -2
  238. package/dist/node_modules/@allyhub-next/sheet/dist/xlsx/zip.js +0 -2
  239. package/dist/node_modules/@allyhub-next/slides-core/dist/api.js +0 -4
  240. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-api.js +0 -2
  241. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-file.d.ts +0 -11
  242. package/dist/node_modules/@allyhub-next/slides-core/dist/chart-file.js +0 -2
  243. package/dist/node_modules/@allyhub-next/slides-core/dist/code.js +0 -2
  244. package/dist/node_modules/@allyhub-next/slides-core/dist/index.js +0 -2
  245. package/dist/node_modules/@allyhub-next/slides-core/dist/measure.js +0 -2
  246. package/dist/node_modules/@allyhub-next/slides-core/dist/merge.js +0 -2
  247. package/dist/node_modules/@allyhub-next/slides-core/dist/resolve.js +0 -2
  248. package/dist/node_modules/@allyhub-next/slides-core/dist/strict.js +0 -2
  249. package/dist/node_modules/@allyhub-next/video-core/dist/edits.js +0 -2
  250. package/dist/node_modules/@allyhub-next/video-core/dist/gen.js +0 -2
  251. package/dist/node_modules/@allyhub-next/video-core/dist/index.js +0 -2
  252. package/dist/node_modules/@allyhub-next/video-core/dist/media.js +0 -2
  253. package/dist/node_modules/@allyhub-next/video-core/dist/piece.js +0 -2
  254. package/dist/node_modules/@allyhub-next/video-core/dist/problem.js +0 -2
  255. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/LICENSE +0 -0
  256. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/at-cut.d.ts +0 -0
  257. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/at-cut.js +0 -0
  258. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/decode.d.ts +0 -0
  259. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/decode.js +0 -0
  260. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/envelope.d.ts +0 -0
  261. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/envelope.js +0 -0
  262. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/index.d.ts +0 -0
  263. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/index.js +0 -0
  264. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/levels.d.ts +0 -0
  265. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/levels.js +0 -0
  266. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/master.d.ts +0 -0
  267. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/master.js +0 -0
  268. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/music.d.ts +0 -0
  269. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/music.js +0 -0
  270. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/decode.d.ts +0 -0
  271. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/decode.js +0 -0
  272. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/ebur128.d.ts +0 -0
  273. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/ebur128.js +0 -0
  274. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/ffmpeg.d.ts +0 -0
  275. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/index.d.ts +0 -0
  276. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/index.js +0 -0
  277. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/loudness.d.ts +0 -0
  278. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/loudness.js +0 -0
  279. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/master.d.ts +0 -0
  280. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/master.js +0 -0
  281. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/measure.d.ts +0 -0
  282. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/measure.js +0 -0
  283. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/mix.d.ts +0 -0
  284. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/node/mix.js +0 -0
  285. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/plan.d.ts +0 -0
  286. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/plan.js +0 -0
  287. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recorded.d.ts +0 -0
  288. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recorded.js +0 -0
  289. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/bandwidth.d.ts +0 -0
  290. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/bandwidth.js +0 -0
  291. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/chain.d.ts +0 -0
  292. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/chain.js +0 -0
  293. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/dynamics.d.ts +0 -0
  294. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/dynamics.js +0 -0
  295. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/fft.d.ts +0 -0
  296. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/fft.js +0 -0
  297. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/filters.d.ts +0 -0
  298. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/filters.js +0 -0
  299. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/fit.d.ts +0 -0
  300. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/fit.js +0 -0
  301. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/index.d.ts +0 -0
  302. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/index.js +0 -0
  303. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/loudness.d.ts +0 -0
  304. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/loudness.js +0 -0
  305. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/measure.d.ts +0 -0
  306. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/measure.js +0 -0
  307. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/mic.d.ts +0 -0
  308. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/mic.js +0 -0
  309. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/noise.d.ts +0 -0
  310. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/noise.js +0 -0
  311. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/presets.d.ts +0 -0
  312. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/presets.js +0 -0
  313. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/room.d.ts +0 -0
  314. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/room.js +0 -0
  315. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/setup.d.ts +0 -0
  316. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/setup.js +0 -0
  317. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/vec.d.ts +0 -0
  318. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/recording/vec.js +0 -0
  319. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/render.d.ts +0 -0
  320. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/render.js +0 -0
  321. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/sfx.d.ts +0 -0
  322. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/sfx.js +0 -0
  323. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/shape.d.ts +0 -0
  324. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/shape.js +0 -0
  325. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/voice.d.ts +0 -0
  326. /package/dist/node_modules/{@allyhub-next → @allyhub}/audio/dist/voice.js +0 -0
  327. /package/dist/node_modules/{@allyhub-next → @allyhub}/chart/LICENSE +0 -0
  328. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/LICENSE +0 -0
  329. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/comments.d.ts +0 -0
  330. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/comments.js +0 -0
  331. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/config.d.ts +0 -0
  332. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/config.js +0 -0
  333. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/deck-code.d.ts +0 -0
  334. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/deck-code.js +0 -0
  335. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/edits.d.ts +0 -0
  336. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/edits.js +0 -0
  337. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/elements.d.ts +0 -0
  338. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/elements.js +0 -0
  339. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/faces.d.ts +0 -0
  340. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/faces.js +0 -0
  341. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/file.d.ts +0 -0
  342. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/file.js +0 -0
  343. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/gen.d.ts +0 -0
  344. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/gen.js +0 -0
  345. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/messages.d.ts +0 -0
  346. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/messages.js +0 -0
  347. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/reference.d.ts +0 -0
  348. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/reference.js +0 -0
  349. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/script.d.ts +0 -0
  350. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/script.js +0 -0
  351. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/sheet.d.ts +0 -0
  352. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/sheet.js +0 -0
  353. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/website.d.ts +0 -0
  354. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/website.js +0 -0
  355. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/words.d.ts +0 -0
  356. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/data/words.js +0 -0
  357. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/index.d.ts +0 -0
  358. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/index.js +0 -0
  359. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/items.d.ts +0 -0
  360. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/items.js +0 -0
  361. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/layout.d.ts +0 -0
  362. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/layout.js +0 -0
  363. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/media-type.d.ts +0 -0
  364. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/media-type.js +0 -0
  365. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/note-shape.d.ts +0 -0
  366. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/note-shape.js +0 -0
  367. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/schemas.js +0 -0
  368. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/strict.d.ts +0 -0
  369. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/strict.js +0 -0
  370. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/zip.d.ts +0 -0
  371. /package/dist/node_modules/{@allyhub-next → @allyhub}/formats/dist/zip.js +0 -0
  372. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/LICENSE +0 -0
  373. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/brightness.d.ts +0 -0
  374. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/brightness.js +0 -0
  375. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/color.d.ts +0 -0
  376. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/color.js +0 -0
  377. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/enums.d.ts +0 -0
  378. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/enums.js +0 -0
  379. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/ext.d.ts +0 -0
  380. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/ext.js +0 -0
  381. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/generated/enums.d.ts +0 -0
  382. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/generated/enums.js +0 -0
  383. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/generated/presets.d.ts +0 -0
  384. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/generated/presets.js +0 -0
  385. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/generated/spec.d.ts +0 -0
  386. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/generated/spec.js +0 -0
  387. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/geometry/index.d.ts +0 -0
  388. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/geometry/index.js +0 -0
  389. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/index.d.ts +0 -0
  390. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/index.js +0 -0
  391. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/mce.d.ts +0 -0
  392. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/mce.js +0 -0
  393. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/node.d.ts +0 -0
  394. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/node.js +0 -0
  395. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/ns.d.ts +0 -0
  396. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/ns.js +0 -0
  397. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/opc.d.ts +0 -0
  398. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/opc.js +0 -0
  399. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/report.d.ts +0 -0
  400. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/report.js +0 -0
  401. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/xml.d.ts +0 -0
  402. /package/dist/node_modules/{@allyhub-next → @allyhub}/ooxml/dist/xml.js +0 -0
  403. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/LICENSE +0 -0
  404. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/account.js +0 -0
  405. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/app.d.ts +0 -0
  406. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/blobs.d.ts +0 -0
  407. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/blobs.js +0 -0
  408. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/cli.d.ts +0 -0
  409. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/cli.js +0 -0
  410. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/files.d.ts +0 -0
  411. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/files.js +0 -0
  412. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/jsonrpc.d.ts +0 -0
  413. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/jsonrpc.js +0 -0
  414. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/open.d.ts +0 -0
  415. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/open.js +0 -0
  416. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/routes.d.ts +0 -0
  417. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/runtimes.d.ts +0 -0
  418. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/runtimes.js +0 -0
  419. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/shares.d.ts +0 -0
  420. /package/dist/node_modules/{@allyhub-next → @allyhub}/protocol/dist/shares.js +0 -0
  421. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/LICENSE +0 -0
  422. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/errors.d.ts +0 -0
  423. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/errors.js +0 -0
  424. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/home.d.ts +0 -0
  425. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/home.js +0 -0
  426. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/unpack.d.ts +0 -0
  427. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/dist/unpack.js +0 -0
  428. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/manifest.json +0 -0
  429. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/docx/package-lock.json +0 -0
  430. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/docx/package.json +0 -0
  431. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/gltf-tools/package-lock.json +0 -0
  432. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/gltf-tools/package.json +0 -0
  433. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/manifold-3d/package-lock.json +0 -0
  434. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/manifold-3d/package.json +0 -0
  435. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/onnxruntime-node/package-lock.json +0 -0
  436. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/onnxruntime-node/package.json +0 -0
  437. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/sherpa-onnx-node/package-lock.json +0 -0
  438. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/sherpa-onnx-node/package.json +0 -0
  439. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/tesseract.js/package-lock.json +0 -0
  440. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/pins/tesseract.js/package.json +0 -0
  441. /package/dist/node_modules/{@allyhub-next → @allyhub}/runtimes/schemas/runtimes.schema.json +0 -0
  442. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/LICENSE +0 -0
  443. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/NOTICE +0 -0
  444. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/aim.d.ts +0 -0
  445. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/aim.js +0 -0
  446. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/bake.d.ts +0 -0
  447. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/bake.js +0 -0
  448. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/camera.d.ts +0 -0
  449. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/camera.js +0 -0
  450. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/curve.d.ts +0 -0
  451. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/curve.js +0 -0
  452. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/define.d.ts +0 -0
  453. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/define.js +0 -0
  454. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/fit.d.ts +0 -0
  455. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/fit.js +0 -0
  456. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/glass.d.ts +0 -0
  457. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/glass.js +0 -0
  458. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/handheld.d.ts +0 -0
  459. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/handheld.js +0 -0
  460. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/hull.d.ts +0 -0
  461. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/hull.js +0 -0
  462. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/index.d.ts +0 -0
  463. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/index.js +0 -0
  464. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/lens.d.ts +0 -0
  465. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/lens.js +0 -0
  466. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/moire.d.ts +0 -0
  467. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/moire.js +0 -0
  468. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/motion.d.ts +0 -0
  469. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/motion.js +0 -0
  470. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/move.d.ts +0 -0
  471. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/move.js +0 -0
  472. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/noise.d.ts +0 -0
  473. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/noise.js +0 -0
  474. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/phone.d.ts +0 -0
  475. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/phone.js +0 -0
  476. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/report.d.ts +0 -0
  477. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/report.js +0 -0
  478. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/screen-focus.d.ts +0 -0
  479. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/screen-focus.js +0 -0
  480. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/screen.d.ts +0 -0
  481. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/screen.js +0 -0
  482. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/solve.d.ts +0 -0
  483. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/solve.js +0 -0
  484. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/timing.d.ts +0 -0
  485. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/timing.js +0 -0
  486. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/vec.d.ts +0 -0
  487. /package/dist/node_modules/{@allyhub-next → @allyhub}/scenery/dist/vec.js +0 -0
  488. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/LICENSE +0 -0
  489. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/address.d.ts +0 -0
  490. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/address.js +0 -0
  491. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/capabilities.d.ts +0 -0
  492. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/code.d.ts +0 -0
  493. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/code.js +0 -0
  494. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/hint.d.ts +0 -0
  495. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/hint.js +0 -0
  496. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/index.d.ts +0 -0
  497. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/index.js +0 -0
  498. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/rectangles.d.ts +0 -0
  499. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/api/rectangles.js +0 -0
  500. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/arrange.js +0 -0
  501. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/analyse.d.ts +0 -0
  502. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/analyse.js +0 -0
  503. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/coerce.d.ts +0 -0
  504. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/coerce.js +0 -0
  505. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/engine.d.ts +0 -0
  506. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/engine.js +0 -0
  507. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/aggregate.d.ts +0 -0
  508. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/aggregate.js +0 -0
  509. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/convert.d.ts +0 -0
  510. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/convert.js +0 -0
  511. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/criteria.d.ts +0 -0
  512. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/criteria.js +0 -0
  513. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/database.d.ts +0 -0
  514. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/database.js +0 -0
  515. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/date.d.ts +0 -0
  516. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/date.js +0 -0
  517. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/define.d.ts +0 -0
  518. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/define.js +0 -0
  519. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/delimiters.d.ts +0 -0
  520. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/delimiters.js +0 -0
  521. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/distributions.d.ts +0 -0
  522. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/distributions.js +0 -0
  523. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/dynamic.d.ts +0 -0
  524. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/dynamic.js +0 -0
  525. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/finance.d.ts +0 -0
  526. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/finance.js +0 -0
  527. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/index.d.ts +0 -0
  528. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/index.js +0 -0
  529. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/info.d.ts +0 -0
  530. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/info.js +0 -0
  531. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/kernels.d.ts +0 -0
  532. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/kernels.js +0 -0
  533. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/logical.d.ts +0 -0
  534. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/logical.js +0 -0
  535. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/lookup.d.ts +0 -0
  536. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/lookup.js +0 -0
  537. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/maths.d.ts +0 -0
  538. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/maths.js +0 -0
  539. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/modern.d.ts +0 -0
  540. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/modern.js +0 -0
  541. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/special.d.ts +0 -0
  542. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/special.js +0 -0
  543. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/text.d.ts +0 -0
  544. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/functions/text.js +0 -0
  545. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/graph.d.ts +0 -0
  546. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/graph.js +0 -0
  547. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/indexes.d.ts +0 -0
  548. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/indexes.js +0 -0
  549. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/remote.d.ts +0 -0
  550. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/remote.js +0 -0
  551. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/server.js +0 -0
  552. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/types.d.ts +0 -0
  553. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/calc/types.js +0 -0
  554. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/check.d.ts +0 -0
  555. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/check.js +0 -0
  556. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/csv.d.ts +0 -0
  557. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/csv.js +0 -0
  558. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/diff.d.ts +0 -0
  559. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/edit.js +0 -0
  560. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/export.d.ts +0 -0
  561. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/export.js +0 -0
  562. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/fill.d.ts +0 -0
  563. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/fill.js +0 -0
  564. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/filter.d.ts +0 -0
  565. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/filter.js +0 -0
  566. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/format.d.ts +0 -0
  567. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/format.js +0 -0
  568. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/ast.d.ts +0 -0
  569. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/ast.js +0 -0
  570. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/move.d.ts +0 -0
  571. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/move.js +0 -0
  572. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/parse.d.ts +0 -0
  573. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/parse.js +0 -0
  574. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/print.d.ts +0 -0
  575. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/print.js +0 -0
  576. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/rewrite.d.ts +0 -0
  577. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/rewrite.js +0 -0
  578. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/walk.d.ts +0 -0
  579. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/formula/walk.js +0 -0
  580. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/html.d.ts +0 -0
  581. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/html.js +0 -0
  582. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/import.d.ts +0 -0
  583. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/import.js +0 -0
  584. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/index.d.ts +0 -0
  585. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/index.js +0 -0
  586. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/inspect.js +0 -0
  587. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/paginate.js +0 -0
  588. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/patch.d.ts +0 -0
  589. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/patch.js +0 -0
  590. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/profile.d.ts +0 -0
  591. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/profile.js +0 -0
  592. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/rules.d.ts +0 -0
  593. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/rules.js +0 -0
  594. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/scenario.d.ts +0 -0
  595. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/scenario.js +0 -0
  596. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/series.d.ts +0 -0
  597. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/series.js +0 -0
  598. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/sort.d.ts +0 -0
  599. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/sort.js +0 -0
  600. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/structure.js +0 -0
  601. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/table-style.js +0 -0
  602. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/table-styles.d.ts +0 -0
  603. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/table-styles.js +0 -0
  604. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/values.d.ts +0 -0
  605. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/values.js +0 -0
  606. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/write.d.ts +0 -0
  607. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/write.js +0 -0
  608. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/colors.d.ts +0 -0
  609. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/colors.js +0 -0
  610. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/formula.d.ts +0 -0
  611. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/formula.js +0 -0
  612. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/functions.d.ts +0 -0
  613. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/functions.js +0 -0
  614. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/index.d.ts +0 -0
  615. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/index.js +0 -0
  616. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/numfmt.d.ts +0 -0
  617. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/numfmt.js +0 -0
  618. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/sax.d.ts +0 -0
  619. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/sax.js +0 -0
  620. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/styles.d.ts +0 -0
  621. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/styles.js +0 -0
  622. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/theme.d.ts +0 -0
  623. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/theme.js +0 -0
  624. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/write.d.ts +0 -0
  625. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/xml.d.ts +0 -0
  626. /package/dist/node_modules/{@allyhub-next → @allyhub}/sheet/dist/xlsx/xml.js +0 -0
  627. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/LICENSE +0 -0
  628. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/animation.js +0 -0
  629. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/capabilities.d.ts +0 -0
  630. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/capabilities.js +0 -0
  631. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/check.d.ts +0 -0
  632. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/check.js +0 -0
  633. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/code.d.ts +0 -0
  634. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/components.d.ts +0 -0
  635. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/components.js +0 -0
  636. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/enums.d.ts +0 -0
  637. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/enums.js +0 -0
  638. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/identity.d.ts +0 -0
  639. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/identity.js +0 -0
  640. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/lang.d.ts +0 -0
  641. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/lang.js +0 -0
  642. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/model.js +0 -0
  643. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/office.d.ts +0 -0
  644. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/office.js +0 -0
  645. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/path.d.ts +0 -0
  646. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/path.js +0 -0
  647. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/placeholders.d.ts +0 -0
  648. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/placeholders.js +0 -0
  649. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/stage.d.ts +0 -0
  650. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/stage.js +0 -0
  651. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/theme.js +0 -0
  652. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/units.d.ts +0 -0
  653. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/units.js +0 -0
  654. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/values.d.ts +0 -0
  655. /package/dist/node_modules/{@allyhub-next → @allyhub}/slides-core/dist/values.js +0 -0
  656. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/LICENSE +0 -0
  657. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/anchors.d.ts +0 -0
  658. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/anchors.js +0 -0
  659. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/audio-types.d.ts +0 -0
  660. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/audio-types.js +0 -0
  661. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/backdrop.d.ts +0 -0
  662. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/backdrop.js +0 -0
  663. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/captions.d.ts +0 -0
  664. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/captions.js +0 -0
  665. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/console.d.ts +0 -0
  666. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/console.js +0 -0
  667. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/contrast.d.ts +0 -0
  668. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/contrast.js +0 -0
  669. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/cut-report.d.ts +0 -0
  670. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/cut-report.js +0 -0
  671. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/edit.d.ts +0 -0
  672. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/edit.js +0 -0
  673. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/edits.d.ts +0 -0
  674. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/export.js +0 -0
  675. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/fact.js +0 -0
  676. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/footage-motion.d.ts +0 -0
  677. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/footage-motion.js +0 -0
  678. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/formats.d.ts +0 -0
  679. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/formats.js +0 -0
  680. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/look.d.ts +0 -0
  681. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/look.js +0 -0
  682. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/marks.d.ts +0 -0
  683. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/marks.js +0 -0
  684. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/matrix.d.ts +0 -0
  685. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/matrix.js +0 -0
  686. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/measure.js +0 -0
  687. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/messages.d.ts +0 -0
  688. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/messages.js +0 -0
  689. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/motion.d.ts +0 -0
  690. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/motion.js +0 -0
  691. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/music.d.ts +0 -0
  692. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/music.js +0 -0
  693. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/placement.d.ts +0 -0
  694. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/placement.js +0 -0
  695. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/render-types.d.ts +0 -0
  696. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/render-types.js +0 -0
  697. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/schema.js +0 -0
  698. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/script-edit.d.ts +0 -0
  699. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/script-edit.js +0 -0
  700. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/script.d.ts +0 -0
  701. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/script.js +0 -0
  702. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/seams.d.ts +0 -0
  703. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/seams.js +0 -0
  704. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/sound-under.d.ts +0 -0
  705. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/sound-under.js +0 -0
  706. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/source.d.ts +0 -0
  707. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/source.js +0 -0
  708. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/speech.d.ts +0 -0
  709. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/timeline.js +0 -0
  710. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/timing.d.ts +0 -0
  711. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/timing.js +0 -0
  712. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/transcript.d.ts +0 -0
  713. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/transcript.js +0 -0
  714. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/voice.d.ts +0 -0
  715. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/voice.js +0 -0
  716. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/words.d.ts +0 -0
  717. /package/dist/node_modules/{@allyhub-next → @allyhub}/video-core/dist/words.js +0 -0
@@ -1,4 +1,4 @@
1
- import { type SheetFile } from "@allyhub-next/formats";
1
+ import { type SheetFile } from "@allyhub/formats";
2
2
  /** What is wrong with a workbook. */
3
3
  export interface SheetProblem {
4
4
  /** sheet.yaml or a CSV file, from the sheet's folder. */
@@ -0,0 +1,3 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{readDataFile as c}from"@allyhub/formats";import{LineCounter as p,isMap as m,isScalar as f,parseDocument as d,visit as g}from"yaml";export const ENTRY="sheet.yaml";export function dataFilesOf(i){const{file:t}=readSheetFile(i);return[...new Set(t?.sheets.flatMap(s=>[...(s.tables??[]).map(n=>n.rows),...(s.blocks??[]).map(n=>n.rows)])??[])]}function h(i){const t=[];return g(i,{Map(s,n){if(!m(n))return;const a=new Set;for(const o of n.items){const e=f(o.key)?String(o.key.value):void 0;if(e!==void 0)if(a.has(e)){const r=f(o.key)?o.key.range?.[0]??0:0;t.push({at:r,key:e})}else a.add(e)}}}),t}export function readSheetFile(i){const t=new p,s=d(i,{lineCounter:t,uniqueKeys:!1}),n=e=>{for(let r=e.length;r>=0;r--){const u=s.getIn(e.slice(0,r),!0)?.range?.[0];if(u!==void 0)return t.linePos(u).line}},a=h(s);if(s.errors.length>0||a.length>0)return{problems:[...s.errors.map(e=>({file:ENTRY,line:t.linePos(e.pos[0]).line,message:`not YAML: ${e.message.split(`
3
+ `)[0]??""}`})),...a.map(e=>({file:ENTRY,line:t.linePos(e.at).line,message:`not YAML: Map keys must be unique (${e.key})`}))],lineOf:n};const o=c("sheet",s.toJS()??{});return o.ok?{file:o.value,problems:[],lineOf:n}:{problems:o.problems.map(e=>{const r=n(e.path===""?[]:e.path.split(".").map(l=>/^\d+$/u.test(l)?Number(l):l));return{file:ENTRY,...r===void 0?{}:{line:r},message:`${e.path===""?"":`${e.path}: `}${e.message}`}}),lineOf:n}}
@@ -1,4 +1,4 @@
1
- import { type SheetFilesColumn } from "@allyhub-next/formats";
1
+ import { type SheetFilesColumn } from "@allyhub/formats";
2
2
  import type { Calc } from "./calc/engine.js";
3
3
  import { type Worksheet } from "./workbook.js";
4
4
  export interface FileCell {
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{SHEET_PICTURE_HEIGHT as p}from"@allyhub/formats";import{columnIndex as d,columnLetter as a}from"./address.js";import{filesIn as x}from"./workbook.js";const m=/\.(?:png|jpe?g|gif|webp|bmp|svg)$/iu;export const isPicture=e=>m.test(e),pictureHeight=e=>(typeof e=="object"?e.height:void 0)??p;export function hasFiles(e){return Object.values(e.spec.columns??{}).some(t=>t.files!==void 0)||e.tables.some(t=>t.columns.some(c=>c.spec?.files))}export function fileCells(e,t){if(!hasFiles(e))return[];const c=[],o=(n,i,f)=>{const l=t.value(e,n,i);if(typeof l!="string")return;const s=x(l,f);s.length>0&&c.push({row:n,col:i,paths:s,column:f})},r=(n,i)=>e.tableAt(n,i)!==void 0;for(const[n,i]of Object.entries(e.spec.columns??{})){const f=d(n);if(f===void 0||i.files===void 0)continue;const[l,s]=e.span(f,0,e.lastRow);for(let u=l;u<=s;u++)r(u,f)||o(u,f,i.files)}for(const n of e.tables)for(const i of n.columns){const f=n.at.col+i.index,l=i.spec?.files??e.spec.columns?.[a(f)]?.files;if(l!==void 0)for(let s=n.data.top;s<=n.data.bottom;s++)o(s,f,l)}return c}export function pictureSize(e){const t=o=>e[o]??0,c=(o,r)=>{let n=0;for(let i=0;i<r;i++)n=n*256+t(o+i);return n};if(t(0)===137&&t(1)===80&&t(2)===78)return{type:"png",width:c(16,4),height:c(20,4)};if(t(0)===71&&t(1)===73&&t(2)===70)return{type:"gif",width:t(6)+t(7)*256,height:t(8)+t(9)*256};if(t(0)===255&&t(1)===216){let o=2;for(;o+9<e.length;){if(t(o)!==255)return;const r=t(o+1);if(r>=192&&r<=207&&![196,200,204].includes(r))return{type:"jpeg",width:c(o+7,2),height:c(o+5,2)};o+=2+c(o+2,2)}}}
@@ -1,4 +1,4 @@
1
- import { type SheetFile, type SheetWorksheet } from "@allyhub-next/formats";
1
+ import { type SheetFile, type SheetWorksheet } from "@allyhub/formats";
2
2
  import type { BookEdit } from "./edit.js";
3
3
  /** Where a generated CSV file is named, so it never stands for one on disk. */
4
4
  export declare const GENERATED = "sheet.ts/";
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{SHEET_CODE as v,SHEET_DATA as w}from"@allyhub/formats";import{readCsv as d}from"./csv.js";export const GENERATED=`${v}/`;const l=e=>e.toLowerCase();export function withGenerated(e,n){const a=e.sheets.length;if(!n)return{file:e,own:a,names:new Set,ordinary:[]};const m=new Set(e.sheets.map(s=>l(s.name))),t=n.sheets.filter(s=>!m.has(l(s.name))),c=n.sheets.filter(s=>m.has(l(s.name))).map(s=>s.name),f=new Set(Object.keys(e.names??{}).map(l)),r=Object.entries(n.names??{}).filter(([s])=>!f.has(l(s)));return{file:{...e,sheets:[...e.sheets,...t],...r.length===0?{}:{names:{...e.names,...Object.fromEntries(r)}}},own:a,names:new Set(r.map(([s])=>s)),ordinary:c}}const b=e=>[...(e.tables??[]).map(n=>n.rows),...(e.blocks??[]).map(n=>n.rows)],E=e=>e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-|-$/gu,"");export function ordinarySheet(e,n,a,m=()=>!1){const t=n.sheets.find(o=>l(o.name)===l(a));if(!t)return{rows:new Map,cells:[],whole:!1,refused:"no-sheet"};const c=new Map,f=new Map;for(const o of b(t)){const p=n.csv[o];if(p===void 0)continue;const h=E(`${t.name} ${o.split("/").pop()??""}`).replace(/-csv$/u,"");let u=`${w}/${h}.csv`;for(let i=2;m(u)||c.has(u);i++)u=`${w}/${h}-${String(i)}.csv`;f.set(o,u),c.set(u,d(p).records.map(i=>i.end===i.start?[]:i.fields))}const r=o=>f.get(o)??o,s=structuredClone(t);for(const o of s.tables??[])o.rows=r(o.rows);for(const o of s.blocks??[])o.rows=r(o.rows);return{file:{...e.file,sheets:[...e.file.sheets,s]},rows:c,cells:[],whole:!0}}export function typedNumbers(e,n){const a=[],m=t=>typeof t=="number"?t:t!==null&&typeof t=="object"?t.value:void 0;for(const t of e){for(const[c,f]of Object.entries(t.cells??{})){const r=m(f);typeof r=="number"&&a.push({sheet:t.name,cell:c,value:r})}for(const c of b(t))d(n[c]??"").records.forEach(f=>{for(const r of f.fields){const s=Number(r);r.trim()!==""&&Number.isFinite(s)&&a.push({sheet:t.name,file:c,value:s})}})}return a}
@@ -1,4 +1,4 @@
1
- import type { SheetFactData } from "@allyhub-next/formats";
1
+ import type { SheetFactData } from "@allyhub/formats";
2
2
  import type { Calc } from "./calc/engine.js";
3
3
  export type SheetFactKind = keyof SheetFactData;
4
4
  export type SheetFinding = {
@@ -1,4 +1,4 @@
1
- import type { SheetHeaderFooter, SheetPrint } from "@allyhub-next/formats";
1
+ import type { SheetHeaderFooter, SheetPrint } from "@allyhub/formats";
2
2
  import { type Area } from "./address.js";
3
3
  import type { Calc } from "./calc/engine.js";
4
4
  import type { Chart, Worksheet } from "./workbook.js";
@@ -1,4 +1,4 @@
1
- import type { SheetFile, SheetTable } from "@allyhub-next/formats";
1
+ import type { SheetFile, SheetTable } from "@allyhub/formats";
2
2
  import { type Place } from "./address.js";
3
3
  import { type StructureEdit } from "./formula/rewrite.js";
4
4
  import { type CsvRows } from "./workbook.js";
@@ -1,4 +1,4 @@
1
- import type { SheetSide } from "@allyhub-next/formats";
1
+ import type { SheetSide } from "@allyhub/formats";
2
2
  import type { CellLook, Table } from "./workbook.js";
3
3
  /** A line of a part: Excel's border style and colour. */
4
4
  export interface TableLine {
@@ -1,4 +1,4 @@
1
- import { type SheetValidation } from "@allyhub-next/formats";
1
+ import { type SheetValidation } from "@allyhub/formats";
2
2
  import type { Calc } from "./calc/engine.js";
3
3
  import { type Scalar } from "./values.js";
4
4
  import { type Validation, type Workbook, type Worksheet } from "./workbook.js";
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{SHEET_SEPARATOR as y}from"@allyhub/formats";import{toBool as g}from"./calc/coerce.js";import{holds as l}from"./rules.js";import{shownValue as d}from"./format.js";import{CellError as x,Matrix as b,readTyped as C}from"./values.js";import{FormulaCell as A}from"./workbook.js";export const separatorOf=e=>e.separator??y;export function choicesIn(e,o){const i=separatorOf(o);return e.split(i.trim()===""?i:i.trim()).map(n=>n.trim()).filter(n=>n!=="")}export const joinChoices=(e,o)=>e.join(separatorOf(o));export function listValues(e,o,i,n,r){const{spec:t}=i;if(t.values)return t.values;const[s]=t.formula??[],[f]=i.formulas;if(!f)return typeof s=="string"?s.split(","):[];const u=e.evaluateAt(f,o,n,r),a=m=>d(m,void 0);return u instanceof b?u.data.map(a).filter(m=>m!==""):u===null?[]:[a(u)]}function E(e,o,i,n,r,t){const s=i.spec.formula?.[n];if(s===void 0)return null;const f=i.formulas[n];if(f){const a=e.evaluateAt(f,o,r,t);return a instanceof b?a.at(0,0):a}if(typeof s=="number")return s;const u=C(s);return u.formula===void 0?u.value:null}function H(e,o,i,n,r,t){const[s]=i.formulas;if(!s)return!0;const f=o.at(n,r),a=e.value(o,n,r)!==t&&!(f instanceof A);a&&e.change([{sheet:o,row:n,col:r,slot:t??void 0}]);const m=e.evaluateAt(s,o,n,r);a&&e.change([{sheet:o,row:n,col:r,slot:f}]);const c=m instanceof b?m.at(0,0):m;return g(c)===!0}export function valid(e,o,i,n,r,t){const{spec:s}=i;if(t===null||t==="")return s.blank!==!1;if(t instanceof x)return!1;const f=s.operator??"between",u=a=>E(e,o,i,a,n,r);switch(s.type){case"list":{const a=d(t,void 0),m=listValues(e,o,i,n,r).map(p=>p.trim()),c=p=>s.values?m.includes(p.trim()):m.some(h=>h.toLowerCase()===p.trim().toLowerCase());return s.multiple===!0?choicesIn(a,s).every(c):c(a)}case"custom":return H(e,o,i,n,r,t);case"textLength":return l(f,(typeof t=="string"?t:d(t)).length,u(0),u(1));case"whole":return typeof t=="number"&&Number.isInteger(t)&&l(f,t,u(0),u(1));case"time":return typeof t=="number"&&t>=0&&t<1&&l(f,t,u(0),u(1));default:return typeof t=="number"&&l(f,t,u(0),u(1))}}function L(e,o,i){const n=Math.min(o.right,e.columnsUsed-1);for(let r=o.left;r<=n;r++){const[t,s]=e.span(r,o.top,o.bottom);for(let f=t;f<=s;f++)e.at(f,r)!==void 0&&i(f,r)}}export function invalidCells(e,o){const i=[];for(const n of e.sheets)for(const r of n.validations)for(const t of r.areas)L(n,t,(s,f)=>{const u=o.value(n,s,f);valid(o,n,r,s,f,u)||i.push({sheet:n.name,row:s,col:f,value:u,range:r.spec.range,type:r.spec.type})});return i}
@@ -1,4 +1,4 @@
1
- import type { SheetChart, SheetConditional, SheetFile, SheetFilesColumn, SheetFilterColumn, SheetFormatEntry, SheetTable, SheetTableColumn, SheetValidation, SheetWorksheet } from "@allyhub-next/formats";
1
+ import type { SheetChart, SheetConditional, SheetFile, SheetFilesColumn, SheetFilterColumn, SheetFormatEntry, SheetTable, SheetTableColumn, SheetValidation, SheetWorksheet } from "@allyhub/formats";
2
2
  import { rangeName, type Area, type Place } from "./address.js";
3
3
  import { type SheetProblem, type YamlPath } from "./file.js";
4
4
  import { type GeneratedSheets } from "./generated.js";
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{SHEET_CODE as C,SHEET_SEPARATOR as P}from"@allyhub/formats";import{MAX_ROWS as B,cellName as H,columnIndex as z,columnLetter as j,contains as y,overlaps as v,rangeName as U,readAddress as x,readArea as $,readAreas as _}from"./address.js";import{readCsv as R}from"./csv.js";import{ENTRY as E,readSheetFile as D}from"./file.js";import{withGenerated as O}from"./generated.js";import{moveFormula as G}from"./formula/move.js";import{parseFormula as X}from"./formula/parse.js";import{printFormula as Y}from"./formula/print.js";import{readTyped as S}from"./values.js";export class SharedFormula{node;error;analysis;text;row;col;source;constructor(e,t,s,n){this.text=e,this.row=t,this.col=s,this.source=n;const i=X(e);i.ok?this.node=i.node:this.error=i.error}}export class FormulaCell{value=null;array;spill;blocked;state=1;mark=0;shared;sheet;row;col;constructor(e,t,s,n){this.shared=e,this.sheet=t,this.row=s,this.col=n}get moved(){const{node:e,row:t,col:s}=this.shared;if(!e)throw new Error(`${this.shared.text} does not parse.`);return G(e,this.row-t,this.col-s)}get text(){const{node:e,text:t,row:s,col:n}=this.shared;return!e||s===this.row&&n===this.col?t:Y(this.moved)}}class Z{columns=[];firsts=[];lasts=[];formulas=[];get(e,t){return this.columns[t]?.[e]}set(e,t,s){let n=this.columns[t];n||(n=[],this.columns[t]=n,this.firsts[t]=e,this.lasts[t]=e),n[e]instanceof FormulaCell&&(this.formulas[t]=(this.formulas[t]??1)-1),s instanceof FormulaCell&&(this.formulas[t]=(this.formulas[t]??0)+1),n[e]=s,e<(this.firsts[t]??e)&&(this.firsts[t]=e),e>(this.lasts[t]??e)&&(this.lasts[t]=e)}get width(){return this.columns.length}holds(e,t,s){const n=Math.min(e.right,this.columns.length-1);for(let i=e.left;i<=n;i++){const a=this.columns[i];if(!a)continue;const r=Math.min(e.bottom,this.last(i));for(let o=Math.max(e.top,this.first(i));o<=r;o++)if(a[o]!==void 0&&!(o===t&&i===s))return!0}return!1}first(e){return this.firsts[e]??1/0}last(e){return this.lasts[e]??-1}hasFormulas(e){return(this.formulas[e]??0)>0}}export class Table{columns=[];rows=0;lines=[];places=[];records=[];name;sheet;at;file;spec;constructor(e,t,s,n,i){this.name=e,this.sheet=t,this.at=s,this.file=n,this.spec=i}get area(){return{top:this.at.row,left:this.at.col,bottom:this.at.row+this.rows,right:this.at.col+Math.max(this.columns.length,1)-1}}get data(){const e=this.area;return{...e,top:e.top+1}}column(e){const t=e.toLowerCase();return this.columns.find(s=>s.name.toLowerCase()===t)}}export const placeKey=(l,e)=>l*16384+e;function T(l,e){l.bottom=Math.max(l.bottom,e.bottom),l.right=Math.max(l.right,e.right);for(let t=e.left;t<=e.right;t++){const s=l.columns.get(t);l.columns.set(t,[Math.min(s?.[0]??e.top,e.top),Math.max(s?.[1]??e.bottom,e.bottom)])}}export class Worksheet{tables=[];blocks=[];merges=[];formulas=new Set;implied=new Map;keys=new Map;fills=[];blanks=new Set;conditions=[];validations=[];filters=[];charts=[];names=new Map;freeze;generated=!1;grid=new Z;expanded=!1;lowest=-1;ghosts=new Map;spills=new Set;stopped=new Set;reach;lookAreas;name;index;spec;constructor(e,t,s){this.name=e,this.index=t,this.spec=s}respec(e){const t=e.charts!==this.spec.charts;this.spec=e,this.lookAreas=void 0,t&&(this.charts.length=0,e.charts?.forEach((s,n)=>{const i=W(s,n,[],()=>{});i&&this.charts.push(i)}))}put(e,t,s){s instanceof FormulaCell&&this.formulas.add(s),this.grid.set(e,t,s),e>this.lowest&&(this.lowest=e)}replace(e,t,s){this.expand();const n=this.grid.get(e,t);n instanceof FormulaCell&&this.formulas.delete(n),s instanceof FormulaCell&&this.formulas.add(s),this.grid.set(e,t,s),e>this.lowest&&(this.lowest=e)}expand(){if(!this.expanded){this.expanded=!0;for(let e=this.fills.length-1;e>=0;e--){const t=this.fills[e];if(!t)continue;const{area:s,shared:n,value:i,format:a}=t;for(let r=s.top;r<=s.bottom;r++)for(let o=s.left;o<=s.right;o++)this.grid.get(r,o)===void 0&&(this.blanks.has(placeKey(r,o))||(n?this.put(r,o,new FormulaCell(n,this,r,o)):i!=null&&(this.put(r,o,i),a!==void 0&&this.implied.set(placeKey(r,o),a))))}}}at(e,t){return this.expand(),this.grid.get(e,t)}spillAt(e,t){return this.ghosts.size===0?void 0:this.ghosts.get(placeKey(e,t))}holds(e,t){return this.expand(),this.grid.holds(e,t.row,t.col)}spillsIn(e){if(this.spills.size===0)return[];if((e.bottom-e.top+1)*(e.right-e.left+1)>=this.spills.size)return[...this.spills].filter(n=>n.spill!==void 0&&v(n.spill,e));const s=new Set;for(let n=e.top;n<=e.bottom;n++)for(let i=e.left;i<=e.right;i++){const a=this.ghosts.get(placeKey(n,i));a&&s.add(a)}return[...s]}blockedBy(e){if(this.stopped.size===0)return[];const t=[];for(const s of this.stopped)s.blocked&&v(s.blocked,e)&&t.push(s);return t}placeSpill(e,t){e.spill=t,this.spills.add(e);for(let s=t.top;s<=t.bottom;s++)for(let n=t.left;n<=t.right;n++)(s!==e.row||n!==e.col)&&this.ghosts.set(placeKey(s,n),e);this.reach&&T(this.reach,t)}blockSpill(e,t){e.blocked=t,this.stopped.add(e)}clearSpill(e){const t=e.spill;if(t)for(let s=t.top;s<=t.bottom;s++)for(let n=t.left;n<=t.right;n++)this.ghosts.get(placeKey(s,n))===e&&this.ghosts.delete(placeKey(s,n));e.spill=void 0,e.blocked=void 0,this.spills.delete(e),this.stopped.delete(e)}clearSpills(){for(const e of[...this.spills,...this.stopped])e.spill=void 0,e.blocked=void 0;this.spills.clear(),this.stopped.clear(),this.ghosts.clear(),this.reach=void 0}tighten(){this.reach=void 0}spillReach(){if(this.reach)return this.reach;const e={columns:new Map,bottom:-1,right:-1};for(const{spill:t}of this.spills)t&&T(e,t);return this.reach=e,e}hasFormulas(e){return this.expand(),this.grid.hasFormulas(e)}span(e,t,s){this.expand();const n=this.grid.first(e),i=this.grid.last(e);if(this.spills.size===0)return[Math.max(t,n),Math.min(s,i)];const[a,r]=this.spillReach().columns.get(e)??[1/0,-1];return[Math.max(t,Math.min(n,a)),Math.min(s,Math.max(i,r))]}get columnsUsed(){return this.expand(),this.spills.size===0?this.grid.width:Math.max(this.grid.width,this.spillReach().right+1)}get lastRow(){return this.expand(),this.spills.size===0?this.lowest:Math.max(this.lowest,this.spillReach().bottom)}get used(){const e=this.lastRow,t=this.columnsUsed-1;return e<0||t<0?void 0:{top:0,left:0,bottom:e,right:t}}tableAt(e,t){return this.tables.find(s=>y(s.area,e,t))}blockAt(e,t){return this.blocks.find(s=>y(s.area,e,t))}looks(){if(this.lookAreas)return this.lookAreas;const e=[];for(const s of this.spec.format??[]){const n=$(s.range);n&&e.push({area:n,entry:s})}const t=[];for(const[s,n]of Object.entries(this.spec.cells??{})){if(!s.includes(":")||n===null||typeof n!="object")continue;const i=$(s);i&&t.push({area:i,entry:n})}return this.lookAreas={formats:e,ranges:t},this.lookAreas}styledAreas(){const{formats:e,ranges:t}=this.looks();return[...e,...t.filter(s=>Object.keys(s.entry).some(n=>F.has(n)))]}lookAt(e,t){const s={},n=c=>{if(c)for(const[b,w]of Object.entries(c))F.has(b)&&w!==void 0&&(s[b]=b==="border"?{...s.border,...w}:w)},i=this.implied.get(placeKey(e,t));i!==void 0&&(s.format=i);const a=this.ghosts.size===0?void 0:this.spillAt(e,t),r=a&&this.lookAt(a.row,a.col).format;r!==void 0&&(s.format=r),this.spec.columns&&n(this.spec.columns[j(t)]),this.spec.rows&&n(this.spec.rows[String(e+1)]);const o=this.tableAt(e,t);o&&e>o.at.row&&n(o.columns[t-o.at.col]?.spec);const{formats:f,ranges:h}=this.looks();for(const c of f)y(c.area,e,t)&&n(c.entry);for(const c of h)y(c.area,e,t)&&n(c.entry);const d=this.keys.get(placeKey(e,t)),g=d===void 0?void 0:this.spec.cells?.[d];if(g!==null&&typeof g=="object"&&n(g),s.border){const c=Object.entries(s.border).filter(([,b])=>b?.style!=="none");c.length===0?delete s.border:s.border=Object.fromEntries(c)}return s}mergeAt(e,t){return this.merges.find(s=>y(s,e,t))}validationAt(e,t){return this.validations.find(s=>s.areas.some(n=>y(n,e,t)))}filterHeadAt(e,t){return this.filters.find(s=>e===s.area.top&&t>=s.area.left&&t<=s.area.right)}filterAt(e,t){return this.filters.find(s=>y(s.area,e,t))}filesAt(e,t){const s=this.tableAt(e,t);if(s&&e>s.at.row){const n=s.columns[t-s.at.col]?.spec?.files;if(n!==void 0)return n}return s?.at.row===e?void 0:this.spec.columns?.[j(t)]?.files}}export const filesSeparator=l=>(typeof l=="object"?l.separator:void 0)??P;export function filesIn(l,e){const t=filesSeparator(e);return l.split(t.trim()===""?t:t.trim()).map(s=>s.trim()).filter(s=>s!=="")}const F=new Set(["bold","italic","underline","strike","font","size","color","fill","align","valign","wrap","shrink","indent","rotation","border","format"]);export class Workbook{title;sheets=[];names=new Map;checks=[];bySheet=new Map;byTable=new Map;file;generated;ordinary=[];constructor(e,t){this.file=e,this.title=e.title,this.generated=t}respec(e){this.file=O(e,this.generated).file,this.title=e.title,this.sheets.forEach(t=>{const s=e.sheets.find(n=>n.name===t.name);s&&t.respec(s)})}sheet(e){return this.bySheet.get(e.toLowerCase())}table(e){return this.byTable.get(e.toLowerCase())}name(e,t){const s=e.toLowerCase();return(t?.names.size?t.names.get(s):void 0)??this.names.get(s)}definitions(e){const t=e.toLowerCase(),s=[],n=this.names.get(t);n&&s.push(n);for(const i of this.sheets){const a=i.names.get(t);a&&s.push(a)}return s}get tables(){return[...this.byTable.values()]}addSheet(e){this.sheets.push(e),this.bySheet.set(e.name.toLowerCase(),e)}addTable(e){e.sheet.tables.push(e),this.byTable.set(e.name.toLowerCase(),e)}sourceOf(e,t,s){if(e.generated)return{file:C};const n=this.sheets.indexOf(e),i=e.tableAt(t,s);if(i){const o=i.columns[s-i.at.col],f=t-i.at.row-1,h=o?.csv!==void 0&&(i.records[f]?.[o.csv]??"")!=="";return f>=0&&o?.formula&&!h?o.formula.source:{file:i.file,line:f<0?1:i.lines[f]??1}}const a=e.blockAt(t,s);if(a)return{file:a.file,line:a.lines[t-a.area.top]??1};const r=e.keys.get(placeKey(t,s));if(r!==void 0)return{file:E,path:["sheets",n,"cells",r]};for(const o of Object.keys(e.spec.cells??{})){if(!o.includes(":"))continue;const f=$(o);if(f&&y(f,t,s))return{file:E,path:["sheets",n,"cells",o]}}}}export const MAX_FILL_CELLS=5e6;const q=/^[\p{L}_\\][\p{L}\p{N}_.\\?]*$/u;export function validName(l){return q.test(l)&&x(l)===void 0&&!/^(?:TRUE|FALSE)$/iu.test(l)&&!/^[Rr](?:\d+)?(?:[Cc]\d*)?$/u.test(l)&&!/^[Cc]\d*$/u.test(l)}const M="made",k=l=>l[0]===M?C:E;class N{problems=[];wb;read_;lineOf;own;madeNames;constructor(e,t,s,n,i){this.wb=e,this.read_=t,this.lineOf=s,this.own=n,this.madeNames=i}yaml(e,t){const s=this.lineOf(e);this.problems.push({file:k(e),...s===void 0?{}:{line:s},message:t})}sheetPath(e){return e<this.own?["sheets",e]:[M,"sheets",e-this.own]}read(){const{file:e}=this.wb;e.sheets.forEach((t,s)=>{const n=this.sheetPath(s);if(this.wb.sheet(t.name)){this.yaml([...n,"name"],`two sheets are named ${t.name}`);return}(/[\\/?*[\]:]/u.test(t.name)||t.name.length>31)&&this.yaml([...n,"name"],`${t.name} cannot be a sheet's name: at most 31 characters, none of \\ / ? * [ ] :`);const i=new Worksheet(t.name,this.wb.sheets.length,t);i.generated=s>=this.own,this.wb.addSheet(i)}),this.names();for(const[t,s]of e.sheets.entries()){const n=this.wb.sheets[t];n?.spec===s&&this.sheet(n,this.sheetPath(t))}e.checks?.forEach((t,s)=>{const n={file:E,path:["checks",s,"formula"]};this.wb.checks.push({name:t.name,formula:new SharedFormula(t.formula,0,0,n),source:n})})}names(){const{file:e}=this.wb;this.namesOf(e.names,e.hidden_names,t=>this.madeNames.has(t)?[M,"names",t]:["names",t],this.wb.names,void 0),e.sheets.forEach((t,s)=>{const n=this.wb.sheets[s];n?.spec===t&&this.namesOf(t.names,t.hidden_names,i=>[...this.sheetPath(s),"names",i],n.names,n)})}namesOf(e,t,s,n,i){const a=new Set(t?.map(r=>r.toLowerCase()));for(const[r,o]of Object.entries(e??{})){const f=s(r);if(!validName(r)){this.yaml(f,`${r} cannot be a name`);continue}const h={file:k(f),path:f},d=typeof o=="string"&&o.startsWith("=")?{name:r,formula:new SharedFormula(o,0,0,h),source:h}:{name:r,value:typeof o=="string"?S(o).value:o,source:h};i&&(d.sheet=i),a.has(r.toLowerCase())&&(d.hidden=!0),n.set(r.toLowerCase(),d)}}sheet(e,t){const{spec:s}=e;if(s.freeze!==void 0){const n=x(s.freeze);n?e.freeze=n:this.yaml([...t,"freeze"],`${s.freeze} is not a cell`)}s.tables?.forEach((n,i)=>{this.table(e,n,[...t,"tables",i])});for(const[n,i]of e.tables.entries())for(const a of e.tables.slice(n+1))v(i.area,a.area)&&this.problems.push({file:E,message:`tables ${i.name} and ${a.name} overlap on ${e.name}`});s.blocks?.forEach((n,i)=>{this.block(e,n.at,n.rows,[...t,"blocks",i])}),this.cells(e,s.cells??{},[...t,"cells"]),s.merges?.forEach((n,i)=>{const a=$(n);a?e.merges.push(a):this.yaml([...t,"merges",i],`${n} is not a range`)}),s.format?.forEach((n,i)=>{$(n.range)||this.yaml([...t,"format",i,"range"],`${n.range} is not a range`)}),s.conditional?.forEach((n,i)=>{this.condition(e,n,[...t,"conditional",i])}),s.validations?.forEach((n,i)=>{this.validation(e,n,[...t,"validations",i])}),this.filters(e,t),s.charts?.forEach((n,i)=>{this.chart(e,n,i,[...t,"charts",i])});for(const n of Object.keys(s.columns??{}))z(n)===void 0&&this.yaml([...t,"columns",n],`${n} is not a column`);for(const n of Object.keys(s.rows??{}))(!/^[1-9]\d*$/u.test(n)||Number(n)>B)&&this.yaml([...t,"rows",n],`${n} is not a row`)}chart(e,t,s,n){const i=W(t,s,n,(a,r)=>{this.yaml(a,r)});i&&e.charts.push(i)}bound(e,t,s){if(!(typeof e!="string"||!e.startsWith("=")||e.length<2))return new SharedFormula(e,t?.top??0,t?.left??0,{file:k(s),path:s})}condition(e,t,s){const n=_(t.range);if(!n){this.yaml([...s,"range"],`${t.range} is not a range`);return}const[i]=n,a=[],r=(o,f)=>{const h=this.bound(o,i,f);h&&a.push(h)};if(t.type==="expression"){const o=t.formula.startsWith("=")?t.formula:`=${t.formula}`;r(o,[...s,"formula"])}if(t.type==="cellIs"&&t.formula.forEach((o,f)=>{r(o,[...s,"formula",f])}),t.type==="dataBar")for(const o of["min","max"])r(t[o]?.value,[...s,o,"value"]);(t.type==="colorScale"||t.type==="iconSet")&&t.stops?.forEach((o,f)=>{r(o.value,[...s,"stops",f,"value"])}),e.conditions.push({spec:t,areas:n,formulas:a})}validation(e,t,s){const n=_(t.range);if(!n){this.yaml([...s,"range"],`${t.range} is not a range`);return}const i=(t.formula??[]).map((o,f)=>this.bound(o,n[0],[...s,"formula",f])),a=t.formula?.length??0,r=t.type!=="list"&&t.type!=="custom"&&(t.operator===void 0||t.operator==="between"||t.operator==="notBetween");!(t.type==="list"&&t.values!==void 0)&&a<(r?2:1)&&this.yaml(s,`a ${t.type} validation needs its bounds`),e.validations.push({spec:t,areas:n,formulas:i})}filters(e,t){const{spec:s}=e;if(s.filter){const n=[...t,"filter"],i=$(s.filter.range);if(!i)this.yaml([...n,"range"],`${s.filter.range} is not a range`);else{const a=new Map;for(const[o,f]of Object.entries(s.filter.columns??{})){const h=z(o);h===void 0||h<i.left||h>i.right?this.yaml([...n,"columns",o],`${o} is not a column of ${s.filter.range}`):a.set(h,f)}const r=e.tables.find(o=>v(o.area,i));r&&this.yaml(n,`a filter over table ${r.name}: a table has its own`),e.filters.push({area:i,columns:a})}}e.tables.forEach((n,i)=>{const{filter:a}=n.spec;if(a===!1)return;const r=new Map;for(const[o,f]of Object.entries(a?.columns??{})){const h=n.column(o);h?r.set(n.at.col+h.index,f):this.yaml([...t,"tables",i,"filter","columns",o],`table ${n.name} has no column ${o}`)}e.filters.push({area:n.area,table:n,columns:r})})}csv(e,t,s){const n=this.read_(e);return n||this.yaml(t,`${s}: ${e} is not there`),n}overlapping(e,t){const s=e.tables.find(i=>v(i.area,t));if(s)return`table ${s.name}`;const n=e.blocks.find(i=>v(i.area,t));return n?`the block of ${n.file}`:void 0}typed(e,t,s,n,i){if(n.formula!==void 0){const a=new SharedFormula(n.formula,t,s,i);e.put(t,s,new FormulaCell(a,e,t,s));return}n.value!==null&&(e.put(t,s,n.value),n.format!==void 0&&e.implied.set(placeKey(t,s),n.format))}table(e,t,s){const n=x(t.at);if(!n){this.yaml([...s,"at"],`${t.at} is not a cell`);return}if(!validName(t.name)){this.yaml([...s,"name"],`${t.name} cannot be a table's name`);return}if(this.wb.table(t.name)){this.yaml([...s,"name"],`two tables are named ${t.name}`);return}this.wb.name(t.name)&&this.yaml([...s,"name"],`${t.name} is a defined name and a table's`);const i=new Table(t.name,e,n,t.rows,t),a=this.csv(t.rows,[...s,"rows"],`table ${t.name}`),r=a?.rows??[],o=a?.lines??[],f=r[0],h=o[0]??1,d=new Set,g=f?.length===0?[""]:f??[];g.forEach((u,m)=>{const p=u.trim();p===""&&this.problems.push({file:t.rows,line:h,message:`column ${String(m+1)} has no name`}),d.has(p.toLowerCase())&&this.problems.push({file:t.rows,line:h,message:`two columns are named ${p}`}),d.add(p.toLowerCase()),i.columns.push({name:p,index:i.columns.length,csv:m})});for(const[u,m]of Object.entries(t.columns??{})){const p=i.column(u),A=p??{name:u,index:i.columns.length};p||(m.formula===void 0&&this.yaml([...s,"columns",u],`table ${t.name} has no column ${u}`),i.columns.push(A)),A.spec=m}const c=g.length;for(let u=1;u<r.length;u++){const m=r[u];if(!m||m.length===0)continue;const p=o[u]??u+1;i.places.push(u),i.records.push(m),i.lines.push(p),m.length>c&&this.problems.push({file:t.rows,line:p,message:`this row has ${String(m.length)} fields and the header ${String(c)}`})}i.rows=i.records.length;const b=this.overlapping(e,i.area);b&&this.yaml(s,`table ${t.name} overlaps ${b} on ${e.name}`),this.wb.addTable(i),this.tableKey(i,s);const w=n.row+1;i.columns.forEach(u=>{const m=n.col+u.index;e.put(n.row,m,u.name);const p=u.spec?.formula;p!==void 0&&(u.formula=new SharedFormula(p,w,m,{file:k(s),path:[...s,"columns",u.name,"formula"]}),i.rows>0&&e.fills.push({area:{top:w,left:m,bottom:w+i.rows-1,right:m},shared:u.formula})),u.csv!==void 0&&i.records.forEach((A,L)=>{this.typed(e,w+L,m,S(A[u.csv??0]??""),{file:t.rows,line:i.lines[L]??1})})})}tableKey(e,t){const{key:s}=e.spec;if(s===void 0)return;const n=e.column(s);if(n?.csv===void 0){this.yaml([...t,"key"],`table ${e.name} has no column ${s} in ${e.file}`);return}const i=new Set;e.records.forEach((a,r)=>{const o=a[n.csv??0]??"",f=e.lines[r]??1;o===""?this.problems.push({file:e.file,line:f,message:`this row has no ${s}, table ${e.name}'s key`}):i.has(o)&&this.problems.push({file:e.file,line:f,message:`two rows have the key ${o}`}),i.add(o)})}block(e,t,s,n){const i=x(t);if(!i){this.yaml([...n,"at"],`${t} is not a cell`);return}const a=this.csv(s,[...n,"rows"],"a block");if(!a)return;const r=a.rows,o=r.map((g,c)=>a.lines[c]??c+1),f=r.reduce((g,c)=>Math.max(g,c.length),1),h={top:i.row,left:i.col,bottom:i.row+Math.max(r.length,1)-1,right:i.col+f-1},d=this.overlapping(e,h);d&&this.yaml(n,`the block of ${s} overlaps ${d} on ${e.name}`),e.blocks.push({area:h,file:s,lines:o}),r.forEach((g,c)=>{g.forEach((b,w)=>{this.typed(e,i.row+c,i.col+w,S(b),{file:s,line:o[c]??c+1})})})}cells(e,t,s){const n=[];for(const[i,a]of Object.entries(t)){const r=[...s,i],o=$(i);if(!o){this.yaml(r,`${i} is not a cell or a range`);continue}const f=this.overlapping(e,o);if(f&&this.yaml(r,`${i} overlaps ${f}`),i.includes(":")){const h=(o.bottom-o.top+1)*(o.right-o.left+1);h>MAX_FILL_CELLS?this.yaml(r,`${i} is ${String(h)} cells`):this.fill(e,o,a,r)}else n.push([i,a,{row:o.top,col:o.left}])}for(const[i,a,r]of n){const o=[...s,i],f=K(a),h=placeKey(r.row,r.col);e.keys.set(h,i),f.value===null&&f.formula===void 0&&e.blanks.add(h),this.typed(e,r.row,r.col,f,{file:k(o),path:o});const d=a!==null&&typeof a=="object"?a.name:void 0;d!==void 0&&this.cellName(e,r,d,o)}}cellName(e,t,s,n){if(!validName(s)){this.yaml(n,`${s} cannot be a name`);return}if(this.wb.name(s)){this.yaml(n,`two places are named ${s}`);return}const i={file:k(n),path:n},a=H(t).replace(/^([A-Z]+)(\d+)$/u,"$$$1$$$2"),r=`='${e.name.replaceAll("'","''")}'!${a}`;this.wb.names.set(s.toLowerCase(),{name:s,formula:new SharedFormula(r,0,0,i),source:i})}fill(e,t,s,n){const i=K(s),a={file:k(n),path:n};e.fills.push(i.formula===void 0?{area:t,value:i.value,...i.format===void 0?{}:{format:i.format}}:{area:t,shared:new SharedFormula(i.formula,t.top,t.left,a)})}}function W(l,e,t,s){const n=x(l.at);if(!n){s([...t,"at"],`${l.at} is not a cell`);return}const i=(o,f)=>{const h=new SharedFormula(chartFormula(o),0,0,{file:k(f),path:f});return h.node&&!I(h.node)&&s(f,`${o} is not a range or a table's column`),h},a=(o,f)=>o?.startsWith("=")===!0?i(o,f):void 0,r=a(l.title,[...t,"title"]);return{spec:l,at:n,index:e,...l.categories===void 0?{}:{categories:i(l.categories,[...t,"categories"])},...r?{title:r}:{},series:l.series.map((o,f)=>{const h=[...t,"series",f],d=a(o.name,[...h,"name"]);return{values:i(o.values,[...h,"values"]),...o.x===void 0?{}:{x:i(o.x,[...h,"x"])},...d?{name:d}:{}}})}}export const chartFormula=l=>l.startsWith("=")?l:`=${l}`;function I(l){switch(l.kind){case"error":case"ref":case"structured":case"name":return!0;case"paren":case"postfix":return I(l.arg);case"binary":return l.op===":"||l.op===",";default:return!1}}function K(l){if(l===null)return{value:null};if(typeof l=="string")return S(l);if(typeof l!="object")return{value:l};if(l.formula!==void 0)return{value:null,formula:l.formula.startsWith("=")?l.formula:`=${l.formula}`};const{value:e}=l;return typeof e=="string"?S(e):{value:e??null}}export function readWorkbook(l){const e=D(l.text),t=r=>r[0]===M?void 0:e.lineOf(r);if(!e.file)return{problems:e.problems,lineOf:t};const s=O(e.file,l.generated),n=new Workbook(s.file,l.generated);n.ordinary=s.ordinary;const i=[],a=new N(n,r=>{const o=l.generated?.csv[r]??l.read(r);if(o===void 0)return;const f=R(o);for(const h of f.problems)i.push({file:r,line:h.line,message:h.message});return{rows:f.records.map(h=>h.end===h.start?[]:h.fields),lines:f.records.map(h=>h.line)}},t,s.own,s.names);return a.read(),{workbook:n,problems:[...i,...a.problems],lineOf:t}}export function workbookOf(l){const e=O(l.file,l.generated),t=new Workbook(e.file,l.generated);return t.ordinary=e.ordinary,new N(t,s=>{const n=l.generated?.csv[s];if(n!==void 0)return{rows:R(n).records.map(a=>a.end===a.start?[]:a.fields),lines:[]};const i=l.rows(s);return i&&{rows:i,lines:[]}},()=>{},e.own,e.names).read(),t}export{U as rangeName};
@@ -1,4 +1,4 @@
1
- import type { SheetChart } from "@allyhub-next/formats";
1
+ import type { SheetChart } from "@allyhub/formats";
2
2
  import type { Calc } from "../calc/engine.js";
3
3
  import type { Chart, Worksheet } from "../workbook.js";
4
4
  import { type Tag } from "./xml.js";
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{CHART_DEFAULTS as Q,chartSpaceXml as ce}from"@allyhub/chart";import{columnLetter as Y}from"../address.js";import{Reference as Z,Union as ae}from"../calc/types.js";import{chartDef as fe,chartSize as de}from"../chart.js";import{sheetPrefix as le}from"../formula/print.js";import{HEAD as ue,attr as y,el as s,flag as ee,numberAttr as M,tag as r,tags as R,textOf as O}from"./xml.js";const he="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",me="http://schemas.openxmlformats.org/drawingml/2006/main",te="http://schemas.openxmlformats.org/drawingml/2006/chart",re="http://schemas.openxmlformats.org/officeDocument/2006/relationships",g=9525,xe=(e,t)=>`${le(e.sheet.name)}$${Y(e.left)}$${String(e.top+1)}${e.single?"":`:$${Y(e.right)}$${String(t+1)}`}`;function _(e,t,n){if(!n?.node)return;const o=e.eval(n.node,{sheet:t,row:0,col:0,dr:0,dc:0}),i=a=>xe(a,Math.min(a.bottom,Math.max(a.top,a.sheet.lastRow)));if(o instanceof Z)return i(o);if(o instanceof ae)return`(${o.parts.map(i).join(",")})`}function pe(e,t,n){if(!n?.node)return!1;const o=e.eval(n.node,{sheet:t,row:0,col:0,dr:0,dc:0});return o instanceof Z&&typeof e.value(o.sheet,o.top,o.left)=="number"}export function chartPart(e,t,n){const o=fe(e,t,n),i={name:l=>_(e,t,n.series[l]?.name),categories:_(e,t,n.categories),numeric:pe(e,t,n.categories),values:l=>_(e,t,n.series[l]?.values)??"",x:l=>_(e,t,n.series[l]?.x??n.categories)},a=_(e,t,n.title);return ce(o,{refs:i,...a===void 0?{}:{titleRef:a}})}const ge=(e,t,n)=>s("xdr:oneCellAnchor",{},s("xdr:from",{},`<xdr:col>${String(e.col)}</xdr:col>`,`<xdr:colOff>${String(Math.round(e.x*g))}</xdr:colOff>`,`<xdr:row>${String(e.row)}</xdr:row>`,`<xdr:rowOff>${String(Math.round((e.y??0)*g))}</xdr:rowOff>`),s("xdr:ext",{cx:Math.round(e.width*g),cy:Math.round(e.height*g)}),s("xdr:pic",{},s("xdr:nvPicPr",{},s("xdr:cNvPr",{id:t,name:e.name,descr:e.path}),s("xdr:cNvPicPr",{},s("a:picLocks",{noChangeAspect:!0}))),s("xdr:blipFill",{},s("a:blip",{"xmlns:r":re,"r:embed":`rId${String(n)}`}),s("a:stretch",{},s("a:fillRect"))),s("xdr:spPr",{},s("a:xfrm",{},s("a:off",{x:0,y:0}),s("a:ext",{cx:Math.round(e.width*g),cy:Math.round(e.height*g)})),s("a:prstGeom",{prst:"rect"},s("a:avLst")))),s("xdr:clientData"));export function drawingPart(e,t=[]){const n=(o,i)=>{const{width:a,height:l}=de(o.spec);return s("xdr:oneCellAnchor",{},s("xdr:from",{},`<xdr:col>${String(o.at.col)}</xdr:col>`,`<xdr:colOff>${String(Math.round((o.spec.x??0)*g))}</xdr:colOff>`,`<xdr:row>${String(o.at.row)}</xdr:row>`,`<xdr:rowOff>${String(Math.round((o.spec.y??0)*g))}</xdr:rowOff>`),s("xdr:ext",{cx:Math.round(a*g),cy:Math.round(l*g)}),s("xdr:graphicFrame",{macro:""},s("xdr:nvGraphicFramePr",{},s("xdr:cNvPr",{id:i+2,name:`Chart ${String(i+1)}`}),s("xdr:cNvGraphicFramePr")),s("xdr:xfrm",{},s("a:off",{x:0,y:0}),s("a:ext",{cx:0,cy:0})),s("a:graphic",{},s("a:graphicData",{uri:te},s("c:chart",{"xmlns:c":te,"xmlns:r":re,"r:id":`rId${String(i+1)}`})))),s("xdr:clientData"))};return ue+s("xdr:wsDr",{"xmlns:xdr":he,"xmlns:a":me},...e.map(n),...t.map((o,i)=>ge(o,e.length+i+2,e.length+i+1)))}function I(e){if(Array.isArray(e))return e.map(I).join("");if(typeof e!="object"||e===null)return"";const t=e,n=[];for(const[o,i]of Object.entries(t))o==="t"?n.push(O(i)):typeof i=="object"&&n.push(I(i));return n.join("")}const V=e=>{const t=r(e?.solidFill),n=y(r(t?.srgbClr),"val");return n!==void 0?`#${n.toUpperCase()}`:we[y(r(t?.schemeClr),"val")??""]},we={accent1:"#4472C4",accent2:"#ED7D31",accent3:"#A5A5A5",accent4:"#FFC000",accent5:"#5B9BD5",accent6:"#70AD47"},$=(e,t)=>y(r(e?.[t]),"val"),A=(e,t)=>M(r(e?.[t]),"val"),F=(e,t)=>ee(r(e?.[t]),"val");function ne(e){if(!e)return;const t=r(e.tx),n=r(t?.strRef);if(n)return`=${O(n.f)}`;const o=I(t?.rich);return o===""?void 0:o}function oe(e){if(!e)return;const t=r(e.scaling),n=r(e.numFmt),o=y(n,"formatCode"),i={},a=ne(r(e.title));a!==void 0&&(i.title=a);const l=A(t,"min"),x=A(t,"max"),u=A(e,"majorUnit");return l!==void 0&&(i.min=l),x!==void 0&&(i.max=x),u!==void 0&&u>0&&(i.major=u),F(e,"delete")===!0&&(i.visible=!1),$(t,"orientation")==="maxMin"&&(i.reverse=!0),o!==void 0&&o!=="General"&&ee(n,"sourceLinked")!==!0&&(i.format=o),i}const j=e=>{const t=r(e?.numRef)??r(e?.strRef),n=t?O(t.f):"";return n===""?void 0:n};function be(e,t){const n=j(r(e[t?"yVal":"val"]));if(n===void 0)return"its numbers are written in the chart";const o={values:n},i=r(e.tx),a=j(i);if(a!==void 0)o.name=`=${a}`;else{const d=O(i?.v);d!==""&&(o.name=d)}const l=r(e.spPr),x=r(l?.ln),u=r(e.marker),w=t||u!==void 0,c=V(l)??(w?V(x)??V(r(u?.spPr)):void 0);c!==void 0&&(o.color=c);const f=M(x,"w");if(w&&f!==void 0&&x?.noFill===void 0){const d=Number((f/12700).toFixed(2));d!==Q.lineWidth&&(o.line_width=d)}F(e,"smooth")===!0&&(o.smooth=!0);const m=A(u,"size");m!==void 0&&m!==Q.marker&&(o.marker_size=m);const v=t?j(r(e.xVal)):void 0;v!==void 0&&(o.x=v);const b=t?void 0:j(r(e.cat));return{series:o,...b===void 0?{}:{categories:b}}}function ve(e){const t=$(e,"barDir")==="bar"?"bar":"column",n=$(e,"grouping");return n==="stacked"?`${t}-stacked`:n==="percentStacked"?`${t}-stacked-100`:`${t}-clustered`}function ye(e){const t=$(e,"grouping");return t==="stacked"?"area-stacked":t==="percentStacked"?"area-stacked-100":"area"}export function readChart(e){const t=r(e?.chartSpace),n=r(t?.chart),o=r(n?.plotArea);if(!n||!o)return"it has no plot";const i=Object.entries(o).filter(([h])=>h.endsWith("Chart")),[a]=i;if(!a)return"it has no plot";if(i.length>1||Array.isArray(a[1])&&a[1].length>1)return"it combines several kinds of chart";const[l,x]=a,u=r(x);if(!u)return"it has no plot";const w=R(u.ser),c=l==="scatterChart",f=[];let m;for(const h of w){const P=be(h,c);if(typeof P=="string")return P;f.push(P.series),m??=P.categories}if(f.length===0)return"it has no series";const v=h=>r(r(h.spPr)?.ln)?.noFill!==void 0,b=h=>$(r(h.marker),"symbol")==="none",d=(()=>{switch(l){case"barChart":return ve(u);case"lineChart":return w.every(b)?"line":"line-markers";case"areaChart":return ye(u);case"pieChart":return"pie";case"doughnutChart":return"doughnut";case"scatterChart":return w.every(v)?"scatter":w.some(h=>F(h,"smooth")===!0)?"scatter-smooth":"scatter-lines";default:return}})();if(!d)return`a sheet has no ${l.replace(/Chart$/u,"")} chart`;const S=ne(r(n.title)),k=r(n.legend),C=$(k,"legendPos"),D=r(u.dLbls),p=h=>F(D,h)===!0,se=p("showVal")||p("showPercent")||p("showCatName")||p("showSerName"),H=$(D,"dLblPos"),z=A(u,"gapWidth"),W=A(u,"overlap"),E=A(u,"holeSize"),X=F(u,"varyColors"),B=d==="pie"||d==="doughnut",N={value:R(o.valAx).find((h,P,ie)=>c?P===ie.length-1:!0),category:c?R(o.valAx)[0]:r(o.catAx)??r(o.dateAx)},G=oe(N.value),T=oe(N.category);G&&N.value?.majorGridlines===void 0&&(G.gridlines=!1),T&&N.category?.majorGridlines!==void 0&&(T.gridlines=!0);const U=M(r(r(r(r(t?.txPr)?.p)?.pPr)?.defRPr),"sz"),q=h=>h&&Object.keys(h).length>0?h:void 0,J=q(G),K=q(T);return{type:d,at:"A1",...S===void 0?{}:{title:S},...m===void 0?{}:{categories:m},series:B?f.slice(0,1):f,...k?{legend:C==="b"?"bottom":C==="t"?"top":C==="l"?"left":"right"}:{},...se?{labels:{...p("showVal")?{value:!0}:{},...p("showPercent")?{percentage:!0}:{},...p("showCatName")?{category:!0}:{},...p("showSerName")?{series:!0}:{},...H===void 0?{}:{position:H}}}:{},...z===void 0||z===150?{}:{gap_width:z},...W===void 0||d.includes("stacked")?{}:{overlap:W},...E===void 0||E===50?{}:{hole_size:E},...X===!0&&l==="barChart"?{vary_by_categories:!0}:{},...X===!1&&B?{vary_by_categories:!1}:{},...J?{value_axis:J}:{},...K?{category_axis:K}:{},...U===void 0||U===900?{}:{size:U/100}}}const L=e=>Math.round(e/g);export function chartAnchors(e,t,n){const o=r(e?.wsDr),i=[],a=[];let l=0;const x=c=>({col:Number(O(c?.col)),row:Number(O(c?.row)),colOff:L(Number(O(c?.colOff))),rowOff:L(Number(O(c?.rowOff)))}),u=c=>y(r(r(r(r(c.graphicFrame)?.graphic)?.graphicData)?.chart),"id"),w=(c,f,m,v)=>{const b={at:{row:f.row,col:f.col},...f.colOff>0?{x:f.colOff}:{},...f.rowOff>0?{y:f.rowOff}:{},width:m,height:v},d=r(c.pic),S=y(r(r(d?.blipFill)?.blip),"embed");if(d&&S!==void 0){const C=r(r(d.nvPicPr)?.cNvPr),D=y(C,"name"),p=y(C,"descr");a.push({id:S,...b,...D===void 0?{}:{name:D},...p===void 0?{}:{descr:p}});return}const k=u(c);if(k===void 0){l+=1;return}i.push({id:k,...b})};for(const c of R(o?.oneCellAnchor)){const f=r(c.ext);w(c,x(r(c.from)),L(M(f,"cx")??0),L(M(f,"cy")??0))}for(const c of R(o?.twoCellAnchor)){const f=x(r(c.from)),m=x(r(c.to));let v=m.colOff-f.colOff;for(let d=f.col;d<m.col;d++)v+=t(d);let b=m.rowOff-f.rowOff;for(let d=f.row;d<m.row;d++)b+=n(d);w(c,f,v,b)}return{anchors:i,pictures:a,others:l}}
@@ -1,4 +1,4 @@
1
- import type { ZipLimits } from "@allyhub-next/formats";
1
+ import type { ZipLimits } from "@allyhub/formats";
2
2
  import type { SheetProblem } from "../file.js";
3
3
  import { type Scalar } from "../values.js";
4
4
  /** How far apart two numbers may be, as a share of the larger, and be the same. */
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{SHEET_DATA as re,SHEET_FILE as ie,SHEET_FILES as j,SHEET_NOTE_AUTHOR as le,SHEET_PICTURE_HEIGHT as P,SHEET_SEPARATOR as fe}from"@allyhub/formats";import{cellName as y,columnLetter as M,contains as T,overlaps as A,rangeName as v,readAddress as ae,readArea as W}from"../address.js";import{rectangles as O}from"../api/rectangles.js";import{chartAfter as ce}from"../chart.js";import{analyse as ue}from"../calc/analyse.js";import{FUNCTIONS as he}from"../calc/functions/index.js";import{checkWorkbook as de}from"../check.js";import{writeCsv as me}from"../csv.js";import{pictureSize as pe}from"../files.js";import{isDateCode as z}from"../format.js";import{moveFormula as we,relativeKey as B}from"../formula/move.js";import{printFormula as E,sheetPrefix as U}from"../formula/print.js";import{mapNode as ge,walk as H}from"../formula/walk.js";import{CellError as N,isoOfSerial as ke,readTyped as F,writeTyped as I}from"../values.js";import{FormulaCell as be,validName as V}from"../workbook.js";import{writeYaml as ye}from"../write.js";import{readFileFormula as $e}from"./formula.js";import{hasDate as q}from"./numfmt.js";import{placesLine as D,readXlsx as xe}from"./read.js";import{LISTS_SHEET as Le}from"./write.js";const J=100,ve=.5,K=1462,Z=64,X=1e4;export const COMPARE_TOLERANCE=1e-9;const Y=a=>a.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/gu,"")||"rows",k=a=>{for(const e in a)if(Object.hasOwn(a,e))return!1;return!0},G=(a,e)=>`${String(a)} ${e}${a===1?"":"s"}`,S=a=>({row:a.row,col:a.col});function Q(a){return a===""||a.length>255||/^[/\\]|^[A-Za-z]:|\\|\0/u.test(a)?!1:a.split("/").every(e=>e!==""&&e!=="."&&e!=="..")}class Ee{cells;starts;first;constructor(e){let o=!0;for(let t=1;t<e.length&&o;t++){const n=e[t-1],r=e[t];n&&r&&(r.row<n.row||r.row===n.row&&r.col<=n.col)&&(o=!1)}if(!o){e.sort((t,n)=>t.row-n.row||t.col-n.col);for(let t=e.length-1;t>0;t--){const n=e[t-1],r=e[t];r&&n?.row===r.row&&n.col===r.col&&e.splice(t-1,1)}}this.cells=e;const s=e[0]?.row??0,l=e[e.length-1]?.row??-1;this.first=s,this.starts=new Int32Array(Math.max(0,l-s+2));let i=0;for(let t=0;t<this.starts.length;t++){for(;i<e.length&&(e[i]?.row??0)<s+t;)i++;this.starts[t]=i}}get(e,o){const s=e-this.first;if(s<0||s>=this.starts.length-1)return;let l=this.starts[s]??0,i=(this.starts[s+1]??0)-1;for(;l<=i;){const t=l+i>>1,n=this.cells[t];if(!n)return;if(n.col===o)return n;n.col<o?l=t+1:i=t-1}}}class ee{list=[];add(e){this.list.push(e)}has(e,o){for(const s of this.list)if(T(s,e,o))return!0;return!1}}function te(a,e){const o=e.toLowerCase();return ge(a,s=>s.kind!=="structured"||s.table?.toLowerCase()!==o?s:Object.fromEntries(Object.entries(s).filter(([l])=>l!=="table")))}function oe(a){return a.headers===0?"has no header row":a.columns.length!==a.ref.right-a.ref.left+1||!V(a.name)?"cannot be held as a table":new Set(a.columns.map(e=>e.name.toLowerCase())).size===a.columns.length?void 0:"has two columns of one name"}function ne(a,e,o){let s;const l=new Set;H(a,t=>{t.kind==="call"&&(t.name==="LET"||t.name==="LAMBDA")&&t.args.forEach(n=>{n.kind==="name"&&l.add(n.name.toLowerCase())})});const i=t=>l.has(t)||o===void 0||o.names.has(t)||o.tables.has(t);return H(a,t=>{s===void 0&&(t.kind==="call"&&!he.has(t.name)&&(i(t.written.toLowerCase())||(s=`no function ${t.name}`)),t.kind==="name"&&!i(t.name.toLowerCase())&&(s=`no name ${t.name}`),t.kind==="structured"&&t.table!==void 0&&!i(t.table.toLowerCase())&&(s=`no table ${t.table}`),(t.kind==="ref"||t.kind==="name"||t.kind==="error")&&t.sheet!==void 0&&(t.sheet.startsWith("[")?s="it reads another workbook":e.has(t.sheet.toLowerCase())||(s=`no sheet ${t.sheet}`)))}),s}function Se(a){const e=new Set(a.book.sheets.map(o=>o.name.toLowerCase()));for(const o of a.book.sheets){const s=new Map,l=(t,n)=>{const r=s.get(n),f=y(t);r?r.push(f):s.set(n,[f])},i=[];for(const t of o.cells){if(t.unread!==void 0){l(t,/^\[|[!']\[|\[\d+\]/u.test(t.unread)?"it reads another workbook":`it could not be read: ${t.unread}`);continue}if(!t.node)continue;const n=ne(t.node,e,a);n!==void 0?(delete t.node,l(t,n)):(a.carried.set(t,o),t.array&&v(t.array)!==y(t)&&i.push(t))}Ce(a,o,i);for(const[t,n]of s)a.lost.push(`${o.name}: ${G(n.length,"formula")} kept as ${n.length===1?"its value":"their values"}, as ${t} (${D(n)})`)}}function Ce(a,e,o){if(o.length===0)return;const s=new Set;for(const l of o){const{array:i}=l;if(i)for(const t of e.cells)t!==l&&!t.node&&T(i,t.row,t.col)&&s.add(t)}e.cells=e.cells.filter(l=>!s.has(l));for(const l of s)a.spilled.set(l,e)}function C(a,e){const{value:o}=e;if(!a.book.date1904||typeof o!="number")return o;const s=a.book.looks[e.style]?.format;return z(s)&&s!==void 0&&q(s)?o+K:o}function R(a,e){if(typeof a!="number"||e===void 0||!z(e)||!q(e)||a<1)return;const o=ke(a);return F(o).value===a?o:void 0}const Me=(a,e)=>R(a,e)??I(a??null);function Oe(a,e){const o=R(a,e);return o!==void 0?o:a==null?null:typeof a=="number"||typeof a=="boolean"?a:I(a)}function _e(a){const e=[];for(let n=0;n<a.length;n++){const r=a[n];if(!r)continue;const f=e[e.length-1];f?.row===r.row&&f.right===r.col-1?(f.right=r.col,f.last=n):e.push({row:r.row,left:r.col,right:r.col,first:n,last:n})}const o=e.map((n,r)=>r),s=n=>{let r=n;for(;o[r]!==r;){const f=o[o[r]??r]??r;o[r]=f,r=f}return r};let l=0,i=0;for(let n=0;n<e.length;n++){const r=e[n];if(r){n>0&&e[n-1]?.row!==r.row&&(l=e[n-1]?.row===r.row-1?i:n,i=n);for(let f=l;f<i;f++){const c=e[f];c?.row===r.row-1&&c.right>=r.left&&c.left<=r.right&&(o[s(n)]=s(f))}}}const t=new Map;return e.forEach((n,r)=>{const f=s(r),c=t.get(f),u=n.right-n.left+1;c?(c.box.top=Math.min(c.box.top,n.row),c.box.bottom=Math.max(c.box.bottom,n.row),c.box.left=Math.min(c.box.left,n.left),c.box.right=Math.max(c.box.right,n.right),c.count+=u,c.runs.push(r)):t.set(f,{box:{top:n.row,bottom:n.row,left:n.left,right:n.right},count:u,runs:[r]})}),[...t.values()].map(n=>({box:n.box,count:n.count,cells:()=>n.runs.flatMap(r=>{const f=e[r];return f?a.slice(f.first,f.last+1):[]})}))}const se=a=>JSON.stringify(a);class Te{ctx;read;cells;inTables=new ee;columnLooks=new Map;rowLooks=new Map;lookDone=new ee;tables=[];areas=[];filtered=[];ownLooks=new Map;fileColumns=new Map;pictured=new Map;over=[];constructor(e,o){this.ctx=e,this.read=o,this.cells=new Ee(o.cells)}at(e,o){return this.cells.get(e,o)}look(e){return this.ctx.book.looks[e.style]??{}}code(e){return this.look(e).format}text(e){return e.node?E(e.node):Me(C(this.ctx,e),this.code(e))}baseLooks(){const{read:e}=this,{looks:o}=this.ctx.book;let s=-1;for(const i of e.cells)i.col>s&&(s=i.col);for(const i of e.columns){if(i.style===void 0)continue;const t=o[i.style];if(!(!t||k(t)))for(let n=i.min;n<=Math.min(i.max,s);n++)this.columnLooks.set(n,t)}for(const i of e.rows){const t=i.style===void 0?void 0:o[i.style];t&&!k(t)&&this.rowLooks.set(i.row,t)}const l=(i,t)=>{for(const n in t)if(!(n in i))return!1;return!0};for(const i of e.cells){const t=this.look(i),n=this.columnLooks.get(i.col);n&&!l(t,n)&&this.columnLooks.delete(i.col);const r=this.rowLooks.get(i.row);r&&!l(t,r)&&this.rowLooks.delete(i.row)}}ownLook(e){const o=this.columnLooks.get(e.col),s=this.rowLooks.get(e.row),l=this.look(e),i=l.format!==void 0&&z(l.format);if(!o&&!s&&!i){let f=this.ownLooks.get(e.style);return f||(f={look:l,key:se(l)},this.ownLooks.set(e.style,f)),f}const t={...o,...s},n={};for(const[f,c]of Object.entries(l))JSON.stringify(c)!==JSON.stringify(t[f])&&(n[f]=c);const r=n.format;if(typeof r=="string"){const f=e.node?void 0:R(C(this.ctx,e),r);f!==void 0&&F(f).format===r&&delete n.format}return{look:n,key:se(n)}}columnFormula(e,o,s){const l=new Map,i=s-o+1;for(let n=o;n<=s;n++){const r=this.at(n,e);if(!r||r.value===void 0&&!r.node||r.value===null&&!r.node)return;if(!r.node)continue;r.key??=B(r.node,r.row,r.col);const f=l.get(r.key);f?f.n+=1:l.set(r.key,{n:1,cell:r})}let t;for(const n of l.values())(!t||n.n>t.n)&&(t=n);return t&&t.n*2>i?t.cell:void 0}csv(e,o){const s=[];for(let l=0;l<e;l+=X){const i=[];for(let t=l;t<Math.min(e,l+X);t++)i.push(o(t));s.push(me(i))}return s.join("")}table(e){const{read:o,ctx:s}=this,l=p=>s.lost.push(`${o.name}: table ${e.name} ${p}`),i=e.ref.right-e.ref.left+1,t=oe(e);if(t!==void 0)return l(`${t}, so its cells are kept and it is no table`),!1;const n=e.ref.top,r=n+1,f=e.ref.bottom-e.totals;e.totals>0&&l("has a totals row, kept as plain cells under it");const c=e.columns.map((p,d)=>f>=r?this.columnFormula(e.ref.left+d,r,f):void 0),u=p=>{const d=c[p];if(!d)return!1;for(let g=r;g<=f;g++)if(this.at(g,e.ref.left+p)?.key!==d.key)return!1;return!0};let h=i;for(;h>1&&u(h-1);)h-=1;const w={},m=this.path(e.name);s.files.set(m,this.csv(f-r+2,p=>{if(p===0)return e.columns.slice(0,h).map(b=>b.name);const d=r+p-1,g=[];for(let b=0;b<h;b++){const x=this.at(d,e.ref.left+b),L=c[b];x?L&&x.key===L.key?g.push(""):x.node?g.push(E(te(x.node,e.name))):g.push(this.text(x)):g.push("")}return g})),this.inTables.add({...e.ref,bottom:f}),e.columns.forEach((p,d)=>{const g=e.ref.left+d,b=this.columnLook(g,r,f),x=c[d];x?.node&&(b.formula=E(te(we(x.node,r-x.row,0),e.name)));const L=this.fileColumns.get(g);L!==void 0&&r<=f&&(b.files=L===P?!0:{height:L}),k(b)||(w[p.name]=b)});const $=new Map;for(const[p,d]of e.filter?.columns??[]){const g=e.columns[p]?.name;g!==void 0&&$.set(g,d)}return(e.filter?.unread??0)>0&&l(`has ${G(e.filter?.unread??0,"filter")} by condition, its rows left as they were hidden`),this.tables.push({name:e.name,at:y({row:n,col:e.ref.left}),rows:m,...e.style!==void 0&&e.style!=="TableStyleMedium2"?{style:e.style}:{},...k(w)?{}:{columns:w},...e.filter===void 0?{filter:!1}:$.size>0?{filter:{columns:Object.fromEntries($)}}:{}}),e.filter?.unread===0&&e.filter.columns.size>0&&this.filtered.push({...e.ref,bottom:f}),this.areas.push({...e.ref,bottom:f}),!0}columnLook(e,o,s){let l,i={};for(let t=o;t<=s;t++){const n=this.at(t,e),r=n?this.ownLook(n):{look:{},key:"{}"};if(l===void 0)l=r.key,i=r.look;else if(l!==r.key)return{}}return k(i)?{}:(this.lookDone.add({top:o,bottom:s,left:e,right:e}),{...i})}path(e){const o=`${re}/${Y(e)}`;let s=`${o}.csv`;for(let l=2;this.ctx.files.has(s);l++)s=`${o}-${String(l)}.csv`;return s}loose(){const e=[],o=[];for(const s of this.read.cells)this.inTables.has(s.row,s.col)||(s.node?e.push(s):s.value!==void 0&&s.value!==null&&o.push(s));return{formulas:e,typed:o}}blockAreas(e,o){const s=[],l=O(o.map(S)),i=n=>!s.some(r=>A(r,n))&&!this.areas.some(r=>A(r,n))&&!l.some(r=>A(r,n)),t=n=>(n.bottom-n.top+1)*(n.right-n.left+1);for(const n of _e(e)){const{box:r}=n;if(!(t(r)<J)){if(n.count/t(r)>=ve&&i(r)){s.push(r);continue}for(const f of O(n.cells().map(S)))t(f)>=J&&i(f)&&s.push(f)}}return s.sort((n,r)=>n.top-r.top||n.left-r.left)}cells_(e){const{formulas:o,typed:s}=this.loose(),l=this.blockAreas(s,o),i=r=>l.some(f=>T(f,r.row,r.col));l.length>0&&(e.blocks=l.map(r=>{const f=this.path(this.read.name);return this.ctx.files.set(f,this.csv(r.bottom-r.top+1,c=>{const u=[];for(let h=r.left;h<=r.right;h++){const w=this.at(r.top+c,h);u.push(w?this.text(w):"")}return u})),{at:y({row:r.top,col:r.left}),rows:f}}));const t=[],n=new Map;for(const r of o){if(!r.node)continue;r.key??=B(r.node,r.row,r.col);const f=n.get(r.key);f?f.push(r):n.set(r.key,[r])}for(const r of n.values())for(const f of O(r.map(S))){const c=this.at(f.top,f.left);c?.node&&t.push([{row:f.top,col:f.left},v(f),E(c.node)])}for(const r of s)l.length>0&&i(r)||t.push([S(r),y(r),Oe(C(this.ctx,r),this.code(r))]);t.sort(([r],[f])=>r.row-f.row||r.col-f.col),t.length>0&&(e.cells=Object.fromEntries(t.map(([,r,f])=>[r,f])))}formats(e){const o=new Map,s=this.lookDone.list.length>0;for(const i of this.read.cells){if(s&&this.lookDone.has(i.row,i.col))continue;const t=this.ownLook(i);if(k(t.look))continue;const n=o.get(t.key);n?n.places.push(S(i)):o.set(t.key,{look:t.look,places:[S(i)]})}const l=[];for(const{look:i,places:t}of o.values())for(const n of O(t))l.push({range:v(n),...i});l.length>0&&(e.format=l)}columns(e){const{read:o}=this,s=new Map;let l=0;for(const t of o.cells)t.col>l&&(l=t.col);const i=[];for(const t of o.columns){if(t.width===void 0&&t.hidden!==!0&&t.level===void 0)continue;const n=t.max-Math.max(t.min,l+1)+1>Z?Math.max(l,t.min+Z-1):t.max;n<t.max&&i.push(`${M(n+1)}:${M(t.max)}`);for(let r=t.min;r<=n;r++)s.set(r,{...t.width===void 0?{}:{width:t.width},...t.hidden===!0?{hidden:!0}:{},...t.level===void 0?{}:{level:t.level}})}for(const[t,n]of this.columnLooks)s.set(t,{...s.get(t),...n});for(const[t,n]of this.fileColumns)this.tableColumn(t)||s.set(t,{...s.get(t),files:n===P?!0:{height:n}});s.size>0&&(e.columns=Object.fromEntries([...s.keys()].sort((t,n)=>t-n).map(t=>[M(t),s.get(t)??{}]))),i.length>0&&this.ctx.lost.push(`${o.name}: the size of columns ${D(i)}, past those that hold anything`)}tableColumn(e){return this.areas.some(o=>e>=o.left&&e<=o.right)}rows(e){const o={};for(const s of this.read.rows){const l=this.rowLooks.get(s.row),i=this.filtered.some(r=>s.row>r.top&&s.row<=r.bottom),t=s.height!==void 0&&this.pictured.get(s.row)!==s.height?s.height:void 0,n={...t===void 0?{}:{height:t},...s.hidden===!0&&!i?{hidden:!0}:{},...s.level===void 0?{}:{level:s.level},...l};k(n)||(o[String(s.row+1)]=n)}k(o)||(e.rows=o)}assetPath(e,o){const s=t=>{const n=this.ctx.assets.get(t);return!n||Ae(n,o.bytes)};if(e!==void 0&&Q(e)&&s(e))return e;const l=Y((o.name??"picture").replace(/\.[A-Za-z0-9]+$/u,""));let i=`${j}/${l}.${o.type}`;for(let t=2;!s(i);t++)i=`${j}/${l}-${String(t)}.${o.type}`;return i}pictures(){const e=this.over;for(const o of this.read.pictures){const s=this.at(o.row,o.col),l=typeof s?.value=="string"?s.value:"";if(o.y===void 0&&o.descr!==void 0&&Q(o.descr)&&l.split(fe).includes(o.descr)&&o.descr!==void 0){this.ctx.assets.set(o.descr,o.bytes),this.fileColumns.set(o.col,Math.max(this.fileColumns.get(o.col)??0,o.height)),this.pictured.set(o.row,Math.max(this.pictured.get(o.row)??0,o.height));continue}const t=this.assetPath(o.descr,o);this.ctx.assets.set(t,o.bytes);const n=pe(o.bytes),r=n?.width===o.width&&n.height===o.height;e.push({file:t,at:y({row:o.row,col:o.col}),...o.x===void 0?{}:{x:o.x},...o.y===void 0?{}:{y:o.y},...r?{}:{width:o.width,height:o.height}})}}build(){const{read:e}=this;this.baseLooks(),this.pictures();for(const s of e.tables)this.table(s);const o={name:e.name};return e.state!=="visible"&&(o.hidden=!0),e.gridlines===!1&&(o.gridlines=!1),e.tab!==void 0&&(o.tab=e.tab),e.state==="veryHidden"&&this.ctx.lost.push(`${e.name}: being very hidden; it is hidden`),e.freeze&&(e.freeze.row>0||e.freeze.col>0)&&(o.freeze=y(e.freeze)),this.tables.length>0&&(o.tables=this.tables),this.filter(o),this.columns(o),this.rows(o),this.cells_(o),e.merges.length>0&&(o.merges=e.merges.map(v)),this.formats(o),e.conditional.length>0&&(o.conditional=e.conditional),e.validations.length>0&&(o.validations=e.validations),e.charts.length>0&&(o.charts=e.charts.map(s=>this.chart(s))),this.over.length>0&&(o.pictures=this.over),k(e.links)||(o.links=e.links),e.notes.length>0&&(o.notes=Object.fromEntries(e.notes.map(s=>[s.ref,s.author===void 0||s.author===le?s.text:{text:s.text,author:s.author}]))),e.print&&(o.print=e.print),e.protect===!0&&(o.protect=!0),o}chart(e){return ce(e,o=>{const s=this.chartReference(o.replace(/^=/u,""));return o.startsWith("=")?`=${s}`:s})}chartReference(e){const o=e.lastIndexOf("!"),l=(o<0?this.read.name:e.slice(0,o)).replace(/^'|'$/gu,"").replaceAll("''","'"),i=W(e.slice(o+1).replaceAll("$",""));if(!i)return e;const t=this.ctx.book.sheets.find(n=>n.name.toLowerCase()===l.toLowerCase());for(const n of t?.tables??[]){const r=n.ref.top+1,c=i.left===i.right&&i.top===r&&i.bottom===n.ref.bottom&&i.left>=n.ref.left&&i.left<=n.ref.right?n.columns[i.left-n.ref.left]:void 0;if(c&&this.ctx.tables.has(n.name.toLowerCase()))return`${n.name}[${c.name}]`}return`${t===this.read||o<0?"":`${e.slice(0,o)}!`}${v(i)}`}filter(e){const{filter:o}=this.read;if(!o)return;const s={};for(const[l,i]of o.columns)s[M(o.ref.left+l)]=i;e.filter={range:v(o.ref),...k(s)?{}:{columns:s}},o.unread===0&&!k(s)&&this.filtered.push(o.ref)}}const Ae=(a,e)=>a.length===e.length&&a.every((o,s)=>o===e[s]),ze=new Set(["_xlnm._FilterDatabase","_xlnm.Print_Area","_xlnm.Print_Titles"]);function He(a){const e={},o=[],s=new Map,{book:l,lost:i}=a,t=new Set(l.sheets.map(f=>f.name.toLowerCase())),n=new Set,r=f=>{const c=Ie(f.text);if(c!==void 0)return typeof c=="string"?I(c):c;const u=$e(f.text,!0),h=u.ok?ne(u.node,t):"it could not be read";if(!u.ok||h!==void 0||Fe(u.node)){i.push(`the name ${f.name} (${f.text})${h===void 0?"":`: ${h}`}`);return}return E(u.node)};for(const f of l.names){if(f.name.startsWith("_xlnm.")){ze.has(f.name)||i.push(`Excel's name ${f.name}`);continue}if(/^_xl(?:fn|pm|ws|udf)/iu.test(f.name))continue;const c=f.name.toLowerCase(),u=f.sheet===void 0?"":String(f.sheet);if(!V(f.name)||a.tables.has(c)){i.push(`the name ${f.name}, which cannot be held here`);continue}if(n.has(`${u}|${c}`)){i.push(`a second name ${f.name}${u===""?"":` of ${l.sheets[f.sheet??0]?.name??""}`}`);continue}const h=r(f);if(h!==void 0)if(n.add(`${u}|${c}`),a.names.add(c),f.sheet===void 0)e[f.name]=h,f.hidden===!0&&o.push(f.name);else{const w=s.get(f.sheet)??{names:{},hidden:[]};w.names[f.name]=h,f.hidden===!0&&w.hidden.push(f.name),s.set(f.sheet,w)}}return{names:e,hidden:o,sheets:s}}function Ne(a,e){const o={},s=new Map;for(const[l,i]of Object.entries(e))typeof i=="string"&&i.startsWith("=")&&s.set(i.slice(1).replaceAll("$","").toLowerCase(),l);for(const l of a.book.sheets)for(const i of l.scenarios){const t={};let n=!0;for(const{at:r,value:f}of i.cells){const c=ae(r),u=c&&l.cells.find(m=>m.row===c.row&&m.col===c.col);String(u?.value??"")!==f&&(n=!1);const h=s.get(`${U(l.name)}${r}`.toLowerCase())??s.get(r.toLowerCase()),w=F(f);h===void 0?a.lost.push(`${l.name}: scenario ${i.name}'s cell ${r}, which has no name`):t[h]=typeof w.value=="number"?w.value:f}!n&&!k(t)&&(o[i.name]={...o[i.name],...t})}return o}function Fe(a){let e=!1;return H(a,o=>{e||=o.kind==="error"&&o.code==="#REF!"}),e}function Ie(a){const e=a.trim();return/^[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?$/u.test(e)?Number(e):/^true$/iu.test(e)?!0:/^false$/iu.test(e)?!1:/^"((?:[^"]|"")*)"$/u.exec(e)?.[1]?.replaceAll('""','"')}const De=new RegExp(`^${Le.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")}(?: \\(\\d+\\))?$`,"u");function Re(a){const e=a.sheets.find(i=>i.state==="veryHidden"&&De.test(i.name));if(!e)return;const o=U(e.name).toLowerCase(),s=i=>{const t=i.replace(/^=/u,"");if(!t.toLowerCase().startsWith(o))return;const n=W(t.slice(o.length).replaceAll("$",""));if(!n||n.left!==n.right)return;const r=[];for(let f=n.top;f<=n.bottom;f++){const c=e.cells.find(u=>u.row===f&&u.col===n.left);r.push(typeof c?.value=="string"?c.value:"")}return r};for(const i of a.sheets)i.validations=i.validations.map(t=>{const[n]=t.formula??[],r=t.type==="list"&&typeof n=="string"?s(n):void 0;if(!r)return t;const f={...t,values:r};return delete f.formula,f});const l=a.sheets.indexOf(e);a.sheets=a.sheets.filter(i=>i!==e),a.names=a.names.flatMap(i=>i.sheet===void 0||i.sheet<l?[i]:i.sheet===l?[]:[{...i,sheet:i.sheet-1}])}const _=a=>a instanceof N?a.code:a??null;export function sameValue(a,e,o){if(typeof a=="number"&&typeof e=="number")return a===e?!0:Math.abs(a-e)<=Math.max(Math.abs(a),Math.abs(e))*o;if(a instanceof N||e instanceof N)return a?.code===e?.code;if(a===null||e===null){const s=a??e;return s===null||s===""||s===0||s===!1}return a===e}function je(a,e){const o=[];for(const i of e.sheets)for(const t of i.formulas)t.shared.node&&ue(e,t.shared,i).volatile&&o.push(t);const s=new Set(o),l=[...o];for(;;){const i=l.pop();if(!i)return s;for(const t of a.readers(i.sheet,i.row,i.col))s.has(t)||(s.add(t),l.push(t))}}function Pe(a,e,o,s){const l={formulas:0,same:0,uncached:0,moving:0,differences:[]},i=je(o,e);for(const[t,n]of a.carried){if(!t.node)continue;const r=e.sheet(n.name);if(!r)continue;l.formulas+=1;const f=r.at(t.row,t.col);if(f instanceof be&&i.has(f)){l.moving+=1;continue}const c=C(a,t);if(c===void 0){l.uncached+=1;continue}const u=o.value(r,t.row,t.col);sameValue(c,u,s)?l.same+=1:l.differences.push({sheet:n.name,cell:y(t),formula:E(t.node),file:_(c),engine:_(u)})}for(const[t,n]of a.spilled){const r=e.sheet(n.name);if(!r)continue;l.formulas+=1;const f=r.spillAt(t.row,t.col);if(f&&i.has(f)){l.moving+=1;continue}const c=C(a,t),u=o.value(r,t.row,t.col);c===void 0?l.uncached+=1:sameValue(c,u,s)?l.same+=1:l.differences.push({sheet:n.name,cell:y(t),formula:f?`${y(f)}#`:"",file:_(c),engine:_(u)})}return l}function We(a,e){const o=new Map,s=[];for(const l of a){const i=e.find(r=>l.startsWith(`${r}: `));if(i===void 0){s.push(l);continue}const t=l.slice(i.length+2),n=o.get(t);n?n.push(i):o.set(t,[i])}for(const[l,i]of o)s.push(i.length===1?`${i[0]??""}: ${l}`:`${l}, on ${String(i.length)} sheets (${D(i)})`);return s}export function importXlsx(a,e){const o=xe(a,e.zip);if(Re(o),o.sheets.length===0)throw new Error("It holds no sheets.");const s={book:o,files:new Map,assets:new Map,lost:[...o.lost],tables:new Set(o.sheets.flatMap(m=>m.tables.filter($=>oe($)===void 0).map($=>$.name.toLowerCase()))),names:new Set,carried:new Map,spilled:new Map};o.date1904&&s.lost.push(`the 1904 date system: dates are moved to the 1900 one, ${String(K)} days on`),(o.font.name!==void 0&&o.font.name!=="Calibri"||o.font.size!==void 0&&o.font.size!==11)&&s.lost.push(`its default font, ${o.font.name??""} ${String(o.font.size??"")}`);const l=He(s);Se(s);const i=o.sheets.map((m,$)=>{const p=new Te(s,m).build(),d=l.sheets.get($);return d&&!k(d.names)&&(p.names=d.names),d&&d.hidden.length>0&&(p.hidden_names=d.hidden),p}),t=Ne(s,l.names),n={title:o.title??e.name,...k(l.names)?{}:{names:l.names},...l.hidden.length>0?{hidden_names:l.hidden}:{},sheets:i,...k(t)?{}:{scenarios:t}},r=ye(n),f=new Map([[ie,r],...s.files]),c=de({text:r,read:m=>f.get(m),exists:m=>f.has(m)||s.assets.has(m)}),{workbook:u,calc:h,problems:w}=c;return{files:f,assets:s.assets,lost:We(s.lost,o.sheets.map(m=>m.name)),problems:w,compared:u&&h?Pe(s,u,h,e.tolerance??COMPARE_TOLERANCE):{formulas:0,same:0,uncached:0,moving:0,differences:[]},sheets:o.sheets.length,tables:s.tables.size}}
@@ -1,5 +1,5 @@
1
- import { type ZipLimits } from "@allyhub-next/formats";
2
- import type { SheetConditional, SheetFilterColumn, SheetHeaderFooter, SheetPrint, SheetValidation } from "@allyhub-next/formats";
1
+ import { type ZipLimits } from "@allyhub/formats";
2
+ import type { SheetConditional, SheetFilterColumn, SheetHeaderFooter, SheetPrint, SheetValidation } from "@allyhub/formats";
3
3
  import { type Area, type Place } from "../address.js";
4
4
  import type { Node } from "../formula/ast.js";
5
5
  import { type Scalar } from "../values.js";
@@ -0,0 +1,3 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{ZipLimitError as ve}from"@allyhub/formats";import{SHEET_ICONS as Se,SHEET_MARGINS as de,SHEET_OPERATORS as Ce,SHEET_PAPERS as Ee,SHEET_VALIDATIONS as Ne}from"@allyhub/formats";import{MAX_COLUMNS as q,MAX_ROWS as K,cellName as Y,columnLetter as Ae,readAddress as Oe,readArea as G,readAreas as ee}from"../address.js";import{SHEET_CHART_DEFAULTS as ce}from"../chart.js";import{moveFormula as Te,relativeKey as Ie}from"../formula/move.js";import{printFormula as fe}from"../formula/print.js";import{ERR as Le,errorOf as Re,serialOfDate as Me}from"../values.js";import{OFFICE_THEME as Fe,colorOf as F,paletteOf as le,themeColors as De}from"./colors.js";import{chartAnchors as je,readChart as Pe}from"./charts.js";import{isRangeText as ze,readFileFormula as te}from"./formula.js";import{BUILTIN_FORMATS as _e}from"./numfmt.js";import{XmlStream as ue}from"./sax.js";import{attr as u,flag as v,numberAttr as k,readXml as he,readXstring as A,tag as d,tags as x,textOf as E}from"./xml.js";import{ZipIn as He}from"./zip.js";const pe=7,Ve=r=>Math.floor((256*r+Math.floor(128/pe))/256*pe),Ue=r=>Math.round(r*4/3),ne=5;export function placesLine(r){const e=r.slice(0,ne).join(", ");return r.length>ne?`${e} and ${String(r.length-ne)} more`:e}const H=(r,e,t=`${e}s`)=>`${String(r)} ${r===1?e:t}`;export const GRID_END=`Excel's grid ends at ${Ae(q-1)}${String(K)} (${K.toLocaleString("en-US")} rows, ${q.toLocaleString("en-US")} columns)`;function We(r,e){let t=0,n=0;const o=r.length;for(;t<o;t++){const i=r.charCodeAt(t),c=i>=65&&i<=90,a=i>=97&&i<=122;if(!c&&!a)break;n=n*26+(c?i-64:i-96)}if(t===0||t===o)return;let s=0;for(let i=t;i<o;i++){const c=r.charCodeAt(i);if(c<48||c>57)return;s=s*10+c-48}if(s!==0){if(t>3||n>q||s>K)throw new Error(`${e} has a cell at ${r}, and ${GRID_END}.`);return{row:s-1,col:n-1}}}class Be{zip;constructor(e,t){this.zip=new He(e,t)}get names(){return this.zip.names}has(e){return this.zip.has(e)}text(e){return this.zip.text(e)}bytes(e){return this.zip.bytesOf(e)}xml(e){const t=this.text(e);return t===void 0?void 0:he(t)}stream(e,t){const n=this.zip.streamText(e,o=>{t.push(o)});return n&&t.end(),n}rels(e){const t=e.lastIndexOf("/"),n=`${e.slice(0,t+1)}_rels/${e.slice(t+1)}.rels`,o=this.xml(n);return x(d(o?.Relationships)?.Relationship).map(s=>{const i=u(s,"Type")??"",c=u(s,"Target")??"",a=u(s,"TargetMode")==="External";return{id:u(s,"Id")??"",type:i.slice(i.lastIndexOf("/")+1),target:a?c:Xe(e,c),external:a}})}count(e){return this.names.filter(t=>e.test(t)).length}}function Xe(r,e){if(e.startsWith("/"))return e.slice(1);const t=r.split("/").slice(0,-1);for(const n of e.split("/"))n===".."?t.pop():n!=="."&&t.push(n);return t.join("/")}function qe(r,e){const t=[];if(e===void 0)return t;let n,o=0,s=!1;const i={open(c){if(c==="si"){n={text:"",rich:!1};return}if(n){if(o>0||c==="rPh"||c==="phoneticPr"||c==="extLst"){o+=1;return}c==="r"&&(n.rich=!0),c==="t"&&(s=!0)}},close(c){if(o>0){o-=1;return}if(c==="si"){n&&t.push({...n,text:A(n.text)}),n=void 0;return}c==="t"&&(s=!1)},text(c){n&&s&&o===0&&(n.text+=c)}};return r.stream(e,new ue(i)),t}function W(r,e){const t=r[e];if(t===void 0)return!1;const n=u(d(t),"val");return n===void 0||n!=="0"&&n!=="false"}const Ge=new Set(["double","singleAccounting","doubleAccounting"]);function Ze(r,e,t){const n={},o=(a,l)=>u(d(a?.[l]),"val");if(W(r,"b")&&(n.bold=!0),W(r,"i")&&(n.italic=!0),W(r,"strike")&&(n.strike=!0),W(r,"u")){const a=o(r,"u");n.underline=a!==void 0&&Ge.has(a)?a:!0}const s=o(r,"name");s!==void 0&&s!==o(e,"name")&&(n.font=s);const i=o(r,"sz");i!==void 0&&i!==o(e,"sz")&&(n.size=Number(i));const c=F(d(r.color),t);return c!==void 0&&c!==F(d(e?.color),t)&&(n.color=c),n}function Je(r,e){const t=d(r.patternFill),n=u(t,"patternType");if(n===void 0||n==="none")return;const o=F(d(t?.fgColor),e),s=F(d(t?.bgColor),e);return n==="solid"&&o!==void 0?o:{pattern:n,...o===void 0?{}:{color:o},...s===void 0?{}:{background:s}}}function me(r,e){const t={};for(const n of["left","right","top","bottom"]){const o=d(r[n]),s=u(o,"style");if(s===void 0||s==="none")continue;const i=F(d(o?.color),e);t[n]={style:s,...i===void 0?{}:{color:i}}}return Object.keys(t).length===0?void 0:t}function Ke(r){const e={},t=u(r,"horizontal");t!==void 0&&t!=="general"&&(e.align=t);const n=u(r,"vertical");n!==void 0&&n!=="bottom"&&(e.valign=n),v(r,"wrapText")===!0&&(e.wrap=!0),v(r,"shrinkToFit")===!0&&(e.shrink=!0);const o=k(r,"indent");o!==void 0&&o>0&&(e.indent=o);const s=k(r,"textRotation");return s!==void 0&&s>0&&s<=180&&(e.rotation=s),e}function ge(r,e){const t={},n=d(r.font);if(n){const a=(f,p)=>{n[f]!==void 0&&(t[p]=W(n,f))};a("b","bold"),a("i","italic"),a("strike","strike"),n.u!==void 0&&(t.underline=W(n,"u"));const l=F(d(n.color),e);l!==void 0&&(t.color=l)}const o=d(d(r.fill)?.patternFill),s=F(d(o?.bgColor),e)??F(d(o?.fgColor),e);s!==void 0&&(t.fill=s);const i=d(r.border),c=i&&me(i,e);return c!==void 0&&(t.border=c),t}function Qe(r,e){const t=d(r?.styleSheet),n=le(e,t),o=new Map(x(d(t?.numFmts)?.numFmt).map(w=>[k(w,"numFmtId")??-1,u(w,"formatCode")??"General"])),s=x(d(t?.fonts)?.font),i=x(d(t?.fills)?.fill),c=x(d(t?.borders)?.border),a=x(d(t?.cellXfs)?.xf),l=s[k(a[0],"fontId")??0],f=new Set;i.some(w=>w.gradientFill!==void 0)&&f.add("gradient fills");const p=a.map(w=>{const m={},$=s[k(w,"fontId")??0];$&&(Object.assign(m,Ze($,l,n)),$.vertAlign!==void 0&&f.add("superscript and subscript"));const S=i[k(w,"fillId")??0],O=S&&Je(S,n);O!==void 0&&(m.fill=O);const T=c[k(w,"borderId")??0],z=T&&me(T,n);z!==void 0&&(m.border=z),T&&u(d(T.diagonal),"style")!==void 0&&f.add("diagonal borders");const D=d(w.alignment);D&&(Object.assign(m,Ke(D)),k(D,"textRotation")===255&&f.add("vertical text"));const I=k(w,"numFmtId")??0,M=o.get(I)??_e[I];return M!==void 0&&M!=="General"&&(m.format=M),m}),h=u(d(l?.name),"val"),b=u(d(l?.sz),"val");return{looks:p,dxfs:x(d(t?.dxfs)?.dxf).map(w=>ge(w,n)),font:{...h===void 0?{}:{name:h},...b===void 0?{}:{size:Number(b)}},lost:[...f]}}function be(r){const e=new Map;let t=0;for(const n of x(r.filterColumn)){const o=k(n,"colId")??0,s=d(n.filters);if(!s){Object.keys(n).some(c=>c!=="colId"&&c!=="hiddenButton")&&(t+=1);continue}if(s.dateGroupItem!==void 0){t+=1;continue}const i=x(s.filter).map(c=>A(u(c,"val")??""));e.set(o,{...i.length===0?{}:{values:i},...v(s,"blank")===!0?{blanks:!0}:{}})}return{columns:e,unread:t}}function Ye(r){const e=d(r?.table),t=G(u(e,"ref")??""),n=u(e,"displayName")??u(e,"name");if(!t||n===void 0)return;const o=d(e?.tableStyleInfo),s=d(e?.autoFilter);return{name:n,ref:t,headers:k(e,"headerRowCount")??1,totals:k(e,"totalsRowCount")??0,columns:x(d(e?.tableColumns)?.tableColumn).map(i=>({name:A(u(i,"name")??"").trim(),calculated:i.calculatedColumnFormula!==void 0})),style:u(o,"name")??"none",...s?{filter:be(s)}:{}}}function oe(r){const e=r.trim();if(e==="")return;const t=/^"((?:[^"]|"")*)"$/u.exec(e);if(t)return(t[1]??"").replaceAll('""','"');const n=Number(e);if(!Number.isNaN(n))return n;const o=te(e,!0);return o.ok?fe(o.node):void 0}const xe=r=>r!==void 0&&Ce.includes(r);function re(r){const e=u(r,"type")??"num",t=u(r,"val")??(r.f===void 0?void 0:E(r.f)),n=t===void 0?void 0:oe(t);return{at:e,...n===void 0?{}:{value:n}}}const et=Se,tt=r=>{const e=r.formula??r.f;return(Array.isArray(e)?e:e===void 0?[]:[e]).map(E)};function nt(r,e,t,n){const o=u(r,"type")??"",s={range:e,...v(r,"stopIfTrue")===!0?{stop:!0}:{}},i={...t.bold===void 0?{}:{bold:t.bold},...t.italic===void 0?{}:{italic:t.italic},...t.underline===void 0?{}:{underline:t.underline!==!1},...t.strike===void 0?{}:{strike:t.strike},...t.color===void 0?{}:{color:t.color},...typeof t.fill=="string"?{fill:t.fill}:{},...t.border===void 0?{}:{border:t.border}},c=tt(r);switch(o){case"cellIs":{const a=u(r,"operator"),l=c.flatMap(f=>{const p=oe(f);return p===void 0?[]:[p]});return!xe(a)||l.length===0?`a cellIs rule of ${a??"no operator"}`:{...s,...i,type:"cellIs",operator:a,formula:l}}case"containsText":case"notContainsText":case"beginsWith":case"endsWith":{const a=u(r,"text");return a===void 0?`a ${o} rule with no text`:{...s,...i,type:"containsText",...o==="containsText"?{}:{operator:o==="notContainsText"?"notContains":o},text:A(a)}}case"duplicateValues":case"uniqueValues":return{...s,...i,type:o};case"top10":return{...s,...i,type:"top10",rank:k(r,"rank")??10,...v(r,"percent")===!0?{percent:!0}:{},...v(r,"bottom")===!0?{bottom:!0}:{}};case"aboveAverage":return{...s,...i,type:"aboveAverage",...v(r,"aboveAverage")===!1?{below:!0}:{},...v(r,"equalAverage")===!0?{equal:!0}:{}};case"expression":{const a=c[0]===void 0?void 0:te(c[0],!0);return a?.ok?{...s,...i,type:"expression",formula:fe(a.node)}:"an expression rule that cannot be read"}case"dataBar":{const a=d(r.dataBar),l=F(d(a?.color??a?.fillColor),n),[f,p]=x(a?.cfvo).map(re);return l===void 0?"a data bar with no colour":{...s,type:"dataBar",color:l,...f&&f.at!=="min"?{min:f}:{},...p&&p.at!=="max"?{max:p}:{},...v(a,"showValue")===!1?{show:!1}:{}}}case"colorScale":{const a=d(r.colorScale),l=x(a?.cfvo).map(re),f=x(a?.color).map(h=>F(h,n)),p=l.flatMap((h,b)=>{const w=f[b];return w===void 0?[]:[{...h,color:w}]});return p.length<2?"a colour scale with too few stops":{...s,type:"colorScale",stops:p.slice(0,3)}}case"iconSet":{const a=d(r.iconSet),l=u(a,"iconSet")??"3TrafficLights1";if(!et.includes(l))return`the icon set ${l}`;if(a?.cfIcon!==void 0)return"an icon set of icons chosen one by one";const f=x(a?.cfvo).map(re);return{...s,type:"iconSet",icons:l,...f.length>=3?{stops:f.slice(0,5)}:{},...v(a,"reverse")===!0?{reverse:!0}:{},...v(a,"showValue")===!1?{show:!1}:{}}}default:return`a ${o} rule`}}const we={conditional:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}",validations:"{CCE6A557-97BC-4b89-ADB6-D9C93CAAB3DF}"},ye=(r,e)=>x(d(r.extLst)?.ext).find(t=>u(t,"uri")?.toUpperCase()===e.toUpperCase());function ot(r,e,t){const n=[],o=[],s=new Set,i=(a,l,f)=>{const p=nt(a,l,f,t);typeof p=="string"?o.push(`${p} on ${l}`):n.push({priority:k(a,"priority")??0,rule:p})};for(const a of x(r.conditionalFormatting)){const l=u(a,"sqref")??"";if(!ee(l)){o.push(`a rule on ${l}`);continue}for(const f of x(a.cfRule)){const p=E(d(d(f.extLst)?.ext)?.id);p!==""&&s.add(p.toUpperCase());const h=k(f,"dxfId");i(f,l,h===void 0?{}:e[h]??{})}}const c=d(ye(r,we.conditional)?.conditionalFormattings);for(const a of x(c?.conditionalFormatting)){const l=E(a.sqref).trim();for(const f of x(a.cfRule)){if(s.has((u(f,"id")??"").toUpperCase()))continue;if(!ee(l)){o.push(`a rule on ${l}`);continue}const p=d(f.dxf);i(f,l,p?ge(p,t):{})}}return{rules:n.sort((a,l)=>a.priority-l.priority).map(a=>a.rule),unread:o}}const rt=Ne;function $e(r,e,t,n){const o=u(r,"type")??"none";if(o==="none"&&u(r,"prompt")===void 0)return;if(!rt.includes(o)||!ee(e))return`a ${o} rule on ${e}`;const s=/^"((?:[^"]|"")*)"$/u.exec(t.trim()),i=o==="list"&&s?(s[1]??"").replaceAll('""','"').split(","):void 0,c=[t,n].flatMap(w=>{const m=oe(w);return m===void 0?[]:[m]}),a=u(r,"operator"),l=w=>Object.fromEntries(Object.entries(w).filter(([,m])=>m!==void 0)),f=l({title:u(r,"promptTitle"),message:u(r,"prompt")}),p=l({style:u(r,"errorStyle"),title:u(r,"errorTitle"),message:u(r,"error")}),h=v(r,"showInputMessage")!==!0,b=v(r,"showErrorMessage")!==!0;return{range:e,type:o,...xe(a)&&a!=="between"?{operator:a}:{},...i?{values:i}:{formula:c},...v(r,"allowBlank")===!0?{}:{blank:!1},...v(r,"showDropDown")===!0?{dropdown:!1}:{},...h||Object.keys(f).length>0?{prompt:{...f,...h?{show:!1}:{}}}:{},...b||Object.keys(p).length>0?{error:{...p,...b?{show:!1}:{}}}:{}}}function st(r){const e=[],t=[],n=s=>{typeof s=="string"?t.push(s):s&&e.push(s)};for(const s of x(d(r.dataValidations)?.dataValidation))n($e(s,u(s,"sqref")??"",E(s.formula1),E(s.formula2)));const o=d(ye(r,we.validations)?.dataValidations);for(const s of x(o?.dataValidation))n($e(s,E(s.sqref).trim(),E(d(s.formula1)?.f),E(d(s.formula2)?.f)));return{rules:e,unread:t}}function it(r){const e=/^(-?\d{4,})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2})(\.\d+)?)?)?(?:Z|[+-]\d{2}:?\d{2})?$/u.exec(r)??/^()()()(\d{2}):(\d{2})(?::(\d{2})(\.\d+)?)?(?:Z|[+-]\d{2}:?\d{2})?$/u.exec(r);if(!e)return;const t=e[1]==="",n=t?1899:Number(e[1]),o=t?12:Number(e[2]),s=t?30:Number(e[3]),i=Number(e[4]??0)*3600+Number(e[5]??0)*60+Number(e[6]??0)+Number(e[7]??0),c=new Date(Date.UTC(n,o-1,s)+i*1e3);if(Number.isNaN(c.getTime()))return;const a=Me(c);return t?a-Math.floor(a):a}function se(r,e,t){const n=te(r,e,t);return n.ok?{node:n.node}:{unread:r}}class at{cells=[];rows=[];rich=[];outlined=!1;rest=[];xml;masters=new Map;strings;name;isRangeName;inData=!1;row=-1;nextRow=0;nextCol=0;cell;target;buffer="";skip=0;constructor(e,t,n){this.strings=e,this.name=t,this.isRangeName=n,this.xml=new ue(this),this.xml.capture=this.rest}open(e,t){if(!this.inData){e==="sheetData"&&(this.inData=!0,this.xml.capture=void 0);return}const n=this.cell;if(n){if(this.skip>0){this.skip+=1;return}switch(e){case"v":this.target="v",this.buffer="";return;case"f":n.f={...t,text:""},this.target="f",this.buffer="";return;case"is":n.inline={text:"",rich:!1};return;case"r":n.inline&&(n.inline.rich=!0);return;case"t":n.inline&&(this.target="t",this.buffer="");return;case"rPh":case"phoneticPr":case"extLst":this.skip=1;return;default:return}}e==="row"?this.openRow(t):e==="c"&&(this.cell={r:t.r,s:t.s,t:t.t,cm:t.cm,v:void 0,f:void 0,inline:void 0})}close(e){if(!this.inData)return;const t=this.cell;if(!t){e==="sheetData"&&(this.inData=!1,this.xml.capture=this.rest);return}if(this.skip>0){this.skip-=1;return}if(e===this.target){e==="v"?t.v=this.buffer:e==="f"&&t.f?t.f.text=this.buffer:t.inline&&(t.inline.text+=this.buffer),this.target=void 0;return}e==="c"&&(this.cell=void 0,this.readCell(t))}text(e){this.target!==void 0&&this.skip===0&&(this.buffer+=e)}openRow(e){const t=e.r,n=t===void 0?void 0:Number(t);if(n!==void 0&&Number.isInteger(n)&&n>K)throw new Error(`${this.name} has a row ${t??""}, and ${GRID_END}.`);const o=n!==void 0&&Number.isInteger(n)&&n>0?n-1:this.nextRow;this.row=o,this.nextRow=o+1,this.nextCol=0;const s={row:o},i=e.ht===void 0?void 0:Number(e.ht),c=f=>f==="1"||f==="true";i!==void 0&&Number.isFinite(i)&&c(e.customHeight)&&(s.height=Ue(i)),c(e.hidden)&&(s.hidden=!0);const a=e.s===void 0?void 0:Number(e.s);a!==void 0&&a!==0&&c(e.customFormat)&&(s.style=a);const l=Number(e.outlineLevel??0);l>0&&(s.level=Math.min(7,l),this.outlined=!0),Object.keys(s).length>1&&this.rows.push(s)}value(e,t){const n=e.t??"n";if(n==="inlineStr"){const s=e.inline;return s?{value:A(s.text),...s.rich?{rich:!0}:{}}:{value:e.v===void 0?"":A(e.v)}}const o=e.v;if(o===void 0)return{value:void 0};switch(n){case"s":{const s=this.strings[Number(o)];return s?{value:s.text,...s.rich?{rich:!0}:{}}:{value:""}}case"str":return{value:A(o)};case"b":return{value:o.trim()==="1"||o.trim()==="true"};case"e":return{value:Re(o.trim())??Le.VALUE};case"d":return{value:it(o.trim())??o};default:{if(o.trim()==="")return{value:void 0};const s=Number(o);if(Number.isNaN(s))throw new Error(`${t} says it holds a number and holds ${o}.`);return{value:s}}}}formula(e,t,n,o){const s=e.f;if(s===void 0)return;const i=s.t??"normal",c=s.text;if(i==="dataTable"){o.unread=`a data table's {=TABLE(${s.r1??""})}`;return}if(i==="array"){Object.assign(o,se(c,!0,this.isRangeName));const a=G(s.ref??"");a&&(o.array=a),e.cm!==void 0&&(o.dynamic=!0);return}if(i==="shared"){const a=s.si??"";if(c!==""){const f=se(c,!1,this.isRangeName),p=f.node?Ie(f.node,t,n):"";this.masters.set(a,{node:f.node,unread:f.unread,row:t,col:n,key:p}),Object.assign(o,f),f.node&&(o.key=p);return}const l=this.masters.get(a);if(!l){o.unread=`a shared formula of a group that has no first cell (${a})`;return}l.node?(o.node=Te(l.node,t-l.row,n-l.col),o.key=l.key):l.unread!==void 0&&(o.unread=l.unread);return}c!==""&&Object.assign(o,se(c,!1,this.isRangeName))}readCell(e){const t=e.r===void 0?void 0:We(e.r,this.name),n=t?.row??this.row,o=t?.col??this.nextCol;if(o>=q)throw new Error(`${this.name} has a cell past its last column, and ${GRID_END}.`);this.nextCol=o+1;const s=e.r??Y({row:n,col:o}),{value:i,rich:c}=this.value(e,s),a={row:n,col:o,value:i,style:e.s===void 0?0:Number(e.s)||0};c===!0&&(a.rich=!0,this.rich.push(s)),this.formula(e,n,o,a),this.cells.push(a)}}function dt(r,e,t){const n=[],o=p=>n.push(`${r}: ${p}`);t.length>0&&o(`${H(t.length,"cell")} of rich text, kept as plain text (${placesLine(t)})`);const s=x(d(e.hyperlinks)?.hyperlink).filter(p=>u(p,"tooltip")!==void 0);s.length>0&&o(`the tooltips of ${H(s.length,"link")} (${placesLine(s.map(p=>u(p,"ref")??""))})`),e.sortState!==void 0&&o("a sort");const i=d(e.sheetProtection);v(i,"sheet")===!0&&(u(i,"password")!==void 0||u(i,"hashValue")!==void 0)&&o("its protection's password: it is protected with none"),e.protectedRanges!==void 0&&o("protected ranges");const c=d(e.headerFooter);(c?.evenHeader!==void 0||c?.evenFooter!==void 0||c?.firstHeader!==void 0||c?.firstFooter!==void 0)&&o("its print header and footer of the first or even pages");const a=d(e.printOptions);a&&["gridLines","headings","horizontalCentered","verticalCentered"].some(p=>v(a,p)===!0)&&o("its print options (gridlines, headings, centring)"),(e.rowBreaks!==void 0||e.colBreaks!==void 0)&&o("its page breaks"),e.oleObjects!==void 0&&o("embedded objects"),e.controls!==void 0&&o("form controls"),e.dataConsolidate!==void 0&&o("a consolidation"),e.customSheetViews!==void 0&&o("custom views"),x(d(e.sheetViews)?.sheetView).some(p=>u(d(p.pane),"state")==="split")&&o("a split, not frozen, window");const f=JSON.stringify(e.extLst??"");return f.includes("sparklineGroups")&&o("sparklines"),f.includes("slicerList")&&o("slicers"),n}function ct(r,e){const t=[],n=(s,i,c)=>{const a=r.count(s);a>0&&t.push(H(a,i,c))};r.has("xl/vbaProject.bin")&&t.push("VBA macros"),n(/^xl\/pivotTables\/pivotTable\d*\.xml$/u,"pivot table"),n(/^xl\/chartsheets\/[^/]+\.xml$/u,"chart sheet"),n(/^xl\/dialogsheets\/[^/]+\.xml$/u,"dialog sheet"),n(/^xl\/macrosheets\/[^/]+\.xml$/u,"macro sheet");const o=r.names.filter(s=>s.startsWith("xl/media/")&&!e.has(s)).length;return o>0&&t.push(H(o,"image")),n(/^xl\/embeddings\//u,"embedded object"),n(/^xl\/slicers\/[^/]+\.xml$/u,"slicer part"),n(/^xl\/timelines\/[^/]+\.xml$/u,"timeline part"),n(/^xl\/ctrlProps\/[^/]+\.xml$/u,"form control"),n(/^xl\/activeX\/[^/]+\.xml$/u,"ActiveX control"),n(/^xl\/queryTables\/[^/]+\.xml$/u,"query table"),r.has("xl/connections.xml")&&t.push("data connections"),r.names.some(s=>s.startsWith("xl/richData/"))&&t.push("rich values (data types, pictures in cells)"),r.names.some(s=>/^customXml\/item\d+\.xml$/u.test(s)&&(r.text(s)??"").includes("DataMashup"))&&t.push("Power Query queries"),t}export function readHeaderFooter(r){const e={left:"",center:"",right:""};let t="center",n=new Set;for(let o=0;o<r.length;o++){const s=r[o],i=r[o+1];if(s==="&"&&(i==="L"||i==="C"||i==="R")){t=i==="L"?"left":i==="C"?"center":"right",n=new Set([...n,t]),o+=1;continue}if(s==="&"&&i==="&"){e[t]+="&&",o+=1;continue}e[t]+=s??""}return Object.fromEntries(Object.entries(e).filter(([o,s])=>s!==""||n.has(o)))}const ft=new Map(Object.entries(Ee).map(([r,e])=>[e,r]));function lt(r,e,t){const n={},o=d(r.pageSetup),s=u(o,"orientation");(s==="portrait"||s==="landscape")&&(n.orientation=s);const i=k(o,"paperSize");if(i!==void 0){const h=ft.get(i);h?n.paper=h:t.push(`${e}: its paper size, Excel's number ${String(i)}`)}v(d(d(r.sheetPr)?.pageSetUpPr),"fitToPage")===!0&&(n.fit={width:k(o,"fitToWidth")??1,height:k(o,"fitToHeight")??1});const c=d(r.pageMargins),a={};for(const h of Object.keys(de)){const b=k(c,h);b!==void 0&&b!==de[h]&&(a[h]=b)}Object.keys(a).length>0&&(n.margins=a);const l=d(r.headerFooter),f=E(l?.oddHeader),p=E(l?.oddFooter);return f!==""&&(n.header=readHeaderFooter(A(f))),p!==""&&(n.footer=readHeaderFooter(A(p))),n}function ut(r,e,t,n,o){const s=r.rels(e),i=new Map;for(const a of s.filter(l=>l.type==="comments")){const l=d(r.xml(a.target)?.comments),f=d(l?.authors)?.author,p=(Array.isArray(f)?f:f===void 0?[]:[f]).map(h=>A(E(h)));for(const h of x(d(l?.commentList)?.comment)){const b=u(h,"ref")??"",w=d(h.text),m=x(w?.r),$=A(m.length>0?m.map(O=>E(O.t)).join(""):E(w?.t)),S=p[k(h,"authorId")??-1];b!==""&&$!==""&&i.set(b,{ref:b,text:$,...S===void 0||S===""?{}:{author:S}})}}let c=0;for(const a of s.filter(l=>l.type==="threadedComment")){const l=d(r.xml(a.target)?.ThreadedComments),f=new Map;for(const p of x(l?.threadedComment)){const h=u(p,"ref")??"",b=A(E(p.text)),w=f.get(h)??{texts:[]};if(w.texts.length===0){const m=n.get(u(p,"personId")??"");m!==void 0&&(w.author=m)}w.texts.push(b),f.set(h,w)}for(const[p,h]of f)c+=1,i.set(p,{ref:p,text:h.texts.join(`
3
+ `),...h.author===void 0?{}:{author:h.author}})}return c>0&&o.push(`${t}: ${H(c,"threaded comment")}, kept as notes, replies after the first line`),[...i.values()]}function ht(r,e,t,n,o,s,i,c,a,l){const f=new at(o,t,a);if(!r.stream(e,f.xml))throw new Error(`${e} is not in the file.`);const p=he(f.rest.join("")),h=d(p.worksheet);if(!h)throw new Error(`${e} is not a worksheet.`);const b=x(d(h.cols)?.col).map(y=>{const C=k(y,"width"),R=k(y,"style"),P=k(y,"outlineLevel")??0,L=(k(y,"min")??1)-1,ie=(k(y,"max")??1)-1;if(ie>=q)throw new Error(`${t} sets a column past its last, and ${GRID_END}.`);const ae=v(y,"customWidth"),Q=C===void 0?void 0:Ve(C);return{min:L,max:ie,...Q!==void 0&&(ae===!0||ae===void 0&&Q!==ke)?{width:Q}:{},...v(y,"hidden")===!0?{hidden:!0}:{},...R===void 0||R===0?{}:{style:R},...P>0?{level:Math.min(7,P)}:{}}}),w=x(d(h.mergeCells)?.mergeCell).flatMap(y=>{const C=G(u(y,"ref")??"");return C?[C]:[]}),m=x(d(h.sheetViews)?.sheetView)[0],$=d(m?.pane);let S;const O=u($,"state");if(O==="frozen"||O==="frozenSplit"){const y=Oe(u(m,"topLeftCell")??"A1")??{row:0,col:0};S={row:y.row+(k($,"ySplit")??0),col:y.col+(k($,"xSplit")??0)}}const T=r.rels(e),z=T.filter(y=>y.type==="table").flatMap(y=>{const C=Ye(r.xml(y.target));return C?[C]:[]}),D=F(d(d(h.sheetPr)?.tabColor),s),I=dt(t,h,f.rich),M=ot(h,i,s),B=st(h);for(const y of M.unread)I.push(`${t}: a conditional format, ${y}`);for(const y of B.unread)I.push(`${t}: a data validation, ${y}`);const V=d(h.autoFilter),Z=G(u(V,"ref")??""),j=V&&Z?{ref:Z,...be(V)}:void 0;j&&j.unread>0&&I.push(`${t}: ${H(j.unread,"filter")} by condition on ${u(V,"ref")??""}, its rows left as they were hidden`);const{charts:X,pictures:J}=mt(r,e,t,b,f.rows,I,l),U={},g=new Map(T.map(y=>[y.id,y]));for(const y of x(d(h.hyperlinks)?.hyperlink)){const C=u(y,"ref");if(C===void 0)continue;const R=u(y,"location"),P=u(y,"id"),L=P===void 0?void 0:g.get(P)?.target;L!==void 0?U[C]=R===void 0?L:`${L}#${R}`:R!==void 0&&(U[C]=`#${R}`)}const N=d(h.sheetProtection),_=lt(h,t,I);return{sheet:{name:t,state:n,cells:f.cells,merges:w,...S?{freeze:S}:{},...u(m,"showGridLines")==="0"?{gridlines:!1}:{},...D===void 0?{}:{tab:D},columns:b,rows:f.rows,tables:z,conditional:M.rules,validations:B.rules,scenarios:x(d(h.scenarios)?.scenario).map(y=>({name:u(y,"name")??"",cells:x(y.inputCells).map(C=>({at:u(C,"r")??"",value:u(C,"val")??""}))})),...j?{filter:j}:{},charts:X,links:U,notes:ut(r,e,t,c,I),pictures:J,...v(N,"sheet")===!0?{protect:!0}:{},...Object.keys(_).length>0?{print:_}:{}},lost:I}}const ke=64,pt=20;function mt(r,e,t,n,o,s,i){const c=h=>n.find(b=>h>=b.min&&h<=b.max)?.width??ke,a=new Map(o.map(h=>[h.row,h.height])),l=h=>a.get(h)??pt,f=[],p=[];for(const h of r.rels(e).filter(b=>b.type==="drawing")){const b=je(r.xml(h.target),c,l),w=r.rels(h.target);for(const m of b.anchors){const $=w.find(T=>T.id===m.id),S=Pe($?r.xml($.target):void 0),O=Y(m.at);if(typeof S=="string"){s.push(`${t}: the chart at ${O}, as ${S}`);continue}f.push({...S,at:O,...m.x===void 0?{}:{x:m.x},...m.y===void 0?{}:{y:m.y},...m.width===ce.width?{}:{width:m.width},...m.height===ce.height?{}:{height:m.height}})}for(const m of b.pictures){const $=w.find(T=>T.id===m.id),S=$&&!$.external?r.bytes($.target):void 0;if(!$||!S){s.push(`${t}: the picture at ${Y(m.at)}, whose image is not in the file`);continue}i.add($.target);const O=$.target.slice($.target.lastIndexOf(".")+1).toLowerCase();p.push({row:m.at.row,col:m.at.col,...m.x===void 0?{}:{x:m.x},...m.y===void 0?{}:{y:m.y},width:m.width,height:m.height,...m.name===void 0?{}:{name:m.name},...m.descr===void 0?{}:{descr:m.descr},bytes:S,type:O})}b.others>0&&s.push(`${t}: ${H(b.others,"shape")} of its drawing`)}return{charts:f,pictures:p}}function gt(r,e,t){for(const n of r){if(n.sheet===void 0)continue;const o=e[n.sheet];if(!o)continue;const s=n.text.split(",").map(i=>i.slice(i.lastIndexOf("!")+1).replaceAll("$",""));if(n.name==="_xlnm.Print_Area"){const[i]=s;s.length>1&&t.push(`${o.name}: its print area's ranges after the first`),i!==void 0&&G(i)&&(o.print={...o.print,area:i})}else if(n.name==="_xlnm.Print_Titles")for(const i of s)/^\d+:\d+$/u.test(i)?o.print={...o.print,title_rows:i}:/^[A-Za-z]+:[A-Za-z]+$/u.test(i)&&(o.print={...o.print,title_cols:i})}}export function readXlsx(r,e){let t;try{t=new Be(r,e)}catch(g){throw g instanceof ve?g:new Error("It is not a zip file, as an .xlsx file is.")}const n=t.rels(""),o=n.find(g=>g.type==="officeDocument")?.target??"xl/workbook.xml";if(o.endsWith(".bin"))throw new Error("It is a binary workbook (.xlsb): save it as .xlsx.");const s=t.xml(o),i=d(s?.workbook);if(!i)throw new Error("It has no workbook part.");const c=t.rels(o),a=g=>c.find(N=>N.type===g)?.target,l=(()=>{const g=a("theme");return g===void 0?void 0:t.text(g)})(),f=l===void 0?Fe:De(l),p=a("styles"),h=p===void 0?void 0:t.xml(p),b=Qe(h,f),w=le(f,d(h?.styleSheet)),m=qe(t,a("sharedStrings")),$=[];for(const g of b.lost)$.push(g);const S=d(i.workbookPr),O=d(i.calcPr);v(O,"iterate")===!0&&$.push("iterative calculation");const T=d(i.workbookProtection);(v(T,"lockStructure")===!0||v(T,"lockWindows")===!0)&&$.push("the workbook's protection"),i.fileSharing!==void 0&&$.push("its write protection");const z=new Map,D=a("person");if(D!==void 0)for(const g of x(d(t.xml(D)?.personList)?.person))z.set(u(g,"id")??"",A(u(g,"displayName")??""));const I=x(d(i.definedNames)?.definedName).map(g=>{const N=k(g,"localSheetId");return{name:u(g,"name")??"",text:A(E(g)),...N===void 0?{}:{sheet:N},...v(g,"hidden")===!0?{hidden:!0}:{}}}),M=[],B=new Set,V=new Map(c.map(g=>[g.id,g])),Z=x(d(i.sheets)?.sheet);for(const[g,N]of Z.entries()){const _=V.get(u(N,"id")??""),y=A(u(N,"name")??"");if(_?.type!=="worksheet"){_?.type!=="chartsheet"&&_?.type!=="dialogsheet"&&$.push(`${y}: a sheet of a kind this cannot read`);continue}const C=new Map;for(const L of I)(L.sheet===void 0||L.sheet===g)&&(L.sheet!==void 0||!C.has(L.name.toLowerCase()))&&C.set(L.name.toLowerCase(),ze(L.text));const R=u(N,"state"),P=ht(t,_.target,y,R==="hidden"||R==="veryHidden"?R:"visible",m,w,b.dxfs,z,L=>C.get(L.toLowerCase())===!0,B);M[g]=P.sheet,$.push(...P.lost)}gt(I,M,$);const j=n.find(g=>g.type==="core-properties")?.target,X=j===void 0?void 0:E(d(t.xml(j)?.coreProperties)?.title).trim(),J=M.filter(g=>g!==void 0),U=new Map;return M.forEach((g,N)=>{g!==void 0&&U.set(N,J.indexOf(g))}),{sheets:J,names:I.flatMap(g=>{if(g.sheet===void 0)return[g];const N=U.get(g.sheet);return N===void 0?[]:[{...g,sheet:N}]}),looks:b.looks,dxfs:b.dxfs,date1904:v(S,"date1904")===!0,font:b.font,...X===void 0||X===""?{}:{title:X},lost:[...ct(t,B),...$]}}
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{SHEET_MARGINS as pe,SHEET_NOTE_AUTHOR as K,SHEET_PAPERS as we}from"@allyhub/formats";import{MAX_COLUMNS as Q,MAX_ROWS as ee,cellName as _,columnIndex as xe,columnLetter as D,rangeName as M,readAddress as te,readArea as ge}from"../address.js";import{parseFormula as $e}from"../formula/parse.js";import{sheetPrefix as X}from"../formula/print.js";import{walk as ye}from"../formula/walk.js";import{fileCells as be,isPicture as ve,pictureHeight as Se,pictureSize as se}from"../files.js";import{scenariosByCell as ke}from"../scenario.js";import{CellError as P,readTyped as Ae}from"../values.js";import{FormulaCell as Ce}from"../workbook.js";import{chartPart as Ee,drawingPart as Te}from"./charts.js";import{fileFormula as N,needsArray as B}from"./formula.js";import{GRID_END as W}from"./read.js";import{Styles as Me}from"./styles.js";import{THEME_XML as Re}from"./theme.js";import{HEAD as S,NS as k,el as o,xstring as x}from"./xml.js";import{ZipOut as _e}from"./zip.js";const A={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"},v=`${k.rel}/`,ne="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main",oe="http://schemas.microsoft.com/office/excel/2006/main",re={conditional:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}",validations:"{CCE6A557-97BC-4b89-ADB6-D9C93CAAB3DF}"},je=191029;export const DEFAULT_TABLE_STYLE="TableStyleMedium2",LISTS_SHEET="AllyHub lists";const Le=64,Oe=7,Fe=a=>Math.min(255,Math.floor(a/Oe*256)/256),Ie=a=>Math.min(409.5,a*3/4),q=32767,De=255,Pe=2e5,Ne=o("metadata",{xmlns:k.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 Ve{index=new Map;count=0;of(t){this.count+=1;let s=this.index.get(t);return s===void 0&&(s=this.index.size,this.index.set(t,s)),s}write(t){t.write(`${S}<sst xmlns="${k.main}" count="${String(this.count)}" uniqueCount="${String(this.index.size)}">`);for(const s of this.index.keys()){const e=/^\s|\s$|\n/u.test(s);t.write(`<si><t${e?' xml:space="preserve"':""}>${x(s)}</t></si>`)}t.write("</sst>"),t.end()}}function ze(a){for(const t in a)if(Object.hasOwn(a,t))return!1;return!0}const He=a=>o("x",a).slice(2,-2),Ue="Base case";function Xe(a){const t=new Map;for(const n of a.scenarios)for(const r of n.cells)t.set(_(r),r);const s=(n,r)=>o("inputCells",{r:_(n),val:r===null||r instanceof P?"":typeof r=="boolean"?r?"1":"0":String(r)}),e=(n,r)=>o("scenario",{name:n,locked:!0,count:r.length,user:"AllyHub"},r.join(""));return o("scenarios",{current:0,show:0,sqref:[...t.keys()].join(" ")},e(Ue,[...t.values()].map(n=>s(n,n.base))),...a.scenarios.map(n=>e(n.name,n.cells.map(r=>s(r,r.value)))))}function Be(a,t,s,e){const n=[];let r=0;for(const{row:l,col:h,paths:c,column:i}of be(a,t)){let d=0;const f=Se(i);for(const m of c){const u=ve(m)?s?.(m):void 0,$=u&&se(u);if(!u||!$){r+=1;continue}const T=Math.round($.width/$.height*f);n.push({row:l,col:h,x:d,width:T,height:f,name:m.split("/").pop()??m,path:m,file:`.${$.type==="jpeg"?"jpg":$.type}`,bytes:u}),d+=T+4}}for(const l of a.spec.pictures??[]){const h=te(l.at),c=s?.(l.file),i=c&&se(c);if(!h||!c||!i)continue;const d=i.width/i.height,f=l.width??(l.height===void 0?i.width:l.height*d);n.push({row:h.row,col:h.col,x:l.x??0,y:l.y??0,width:Math.round(f),height:Math.round(l.height??f/d),name:l.file.split("/").pop()??l.file,path:l.file,file:`.${i.type==="jpeg"?"jpg":i.type}`,bytes:c})}return r>0&&e.push(`${a.name}: ${String(r)} file${r===1?"":"s"} in a cell, which stay${r===1?"s":""} a name`),n}class We{name;columns=[];known=new Map;constructor(t){let s=LISTS_SHEET;for(let e=2;t.sheet(s);e++)s=`${LISTS_SHEET} (${String(e)})`;this.name=s}place(t){const s=JSON.stringify(t);let e=this.known.get(s);e===void 0&&(e=this.columns.length,this.columns.push(t),this.known.set(s,e));const n=D(e);return`${X(this.name)}$${n}$1:$${n}$${String(Math.max(1,t.length))}`}xml(t){const s=[],e=Math.max(0,...this.columns.map(n=>n.length));for(let n=0;n<e;n++){let r=`<row r="${String(n+1)}">`;this.columns.forEach((l,h)=>{const c=l[n];c!==void 0&&(r+=`<c r="${_({row:n,col:h})}" t="s"><v>${String(t.of(c))}</v></c>`)}),s.push(`${r}</row>`)}return`${S}<worksheet xmlns="${k.main}" xmlns:r="${k.rel}"><dimension ref="${M({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>${s.join("")}</sheetData><pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/></worksheet>`}}class qe{rows=new Int32Array(1024);cols=new Int32Array(1024);size=0;add(t,s){if(this.size===this.rows.length){const e=new Int32Array(this.size*2);e.set(this.rows),this.rows=e;const n=new Int32Array(this.size*2);n.set(this.cols),this.cols=n}this.rows[this.size]=t,this.cols[this.size]=s,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 s=1/0,e=-1,n=1/0,r=-1;for(let i=0;i<t;i++){const d=this.rows[i]??0,f=this.cols[i]??0;d<s&&(s=d),d>e&&(e=d),f<n&&(n=f),f>r&&(r=f)}const l=new Uint32Array(e-s+2);for(let i=0;i<t;i++){const d=(this.rows[i]??0)-s+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 h=l.slice(0,-1),c=new Int32Array(t);for(let i=0;i<t;i++){const d=(this.rows[i]??0)-s,f=h[d]??0;c[f]=this.cols[i]??0,h[d]=f+1}return{start:l,cols:c,top:s,used:{top:s,bottom:e,left:n,right:r}}}}function Ge(a,t){if(!a)return!1;let s=!1;const e=t.toLowerCase();return ye(a,n=>{(n.kind==="ref"||n.kind==="name")&&n.sheet!==void 0&&n.sheet.toLowerCase()!==e&&(s=!0)}),s}const Ye=(a,t)=>`{00000000-0000-4000-8000-${(a*65536+t).toString(16).toUpperCase().padStart(12,"0")}}`;class Ze{arrays=!1;sheet;calc;styles;strings;wb;cached;left;lists;index;isTable;isRangeName;hiddenRows;tall;scenarios;drawn;newerRules=[];newerValidations=[];shapes=new Map;groups=new Map;constructor(t,s,e,n,r,l,h,c,i=[],d){this.sheet=t,this.calc=s,this.wb=s.wb,this.styles=e,this.strings=n,this.cached=r,this.left=l,this.lists=h,this.index=c,this.isTable=m=>this.wb.table(m)!==void 0,this.isRangeName=m=>{const u=this.wb.name(m,t)?.formula?.node;return this.isTable(m)||u!==void 0&&B({kind:"unary",op:"-",arg:u})},this.hiddenRows=s.filtered(t),this.scenarios=d,this.drawn=t.charts.length>0||i.length>0;const f=new Map;for(const m of i)m.y===void 0&&f.set(m.row,Math.max(f.get(m.row)??0,m.height));this.tall=f}grid(){const{sheet:t}=this;if(t.lastRow>=ee)throw new Error(`${t.name} reaches row ${(t.lastRow+1).toLocaleString("en-US")}, and ${W}: an Excel file cannot hold it.`);if(t.columnsUsed>Q)throw new Error(`${t.name} reaches past column ${D(Q-1)}, and ${W}: an Excel file cannot hold it.`);for(const s of Object.keys(t.spec.rows??{}))if(Number(s)>ee)throw new Error(`${t.name} sets row ${s}, and ${W}: an Excel file cannot hold it.`)}gather(){const{sheet:t}=this,s=new qe;for(let e=0;e<t.columnsUsed;e++){const[n,r]=t.span(e,0,Number.MAX_SAFE_INTEGER);for(let l=n;l<=r;l++)(t.at(l,e)!==void 0||t.spillAt(l,e))&&s.add(l,e)}for(const{area:e}of t.styledAreas()){const n=(e.bottom-e.top+1)*(e.right-e.left+1);if(n>Pe){this.left.push(`${t.name}!${M(e)}: its look on the cells that hold something, ${String(n)} 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++)s.add(r,l)}for(const e of t.keys.keys())s.add(Math.floor(e/16384),e%16384);return s.byRow()}styleOf(t,s){const e=this.sheet.lookAt(t,s);return ze(e)?void 0:this.styles.xf(e)}held(t,s){return s.length<=q?s:(this.left.push(`${this.sheet.name}!${t} past Excel's ${String(q)} characters, of its ${String(s.length)}`),s.slice(0,q))}value(t,s,e){return e===null?`<c r="${t}"${C(s)}/>`:typeof e=="number"?`<c r="${t}"${C(s)}><v>${String(e)}</v></c>`:typeof e=="boolean"?`<c r="${t}"${C(s)} t="b"><v>${e?"1":"0"}</v></c>`:e instanceof P?ce(e)?`<c r="${t}"${C(s)} t="e"><v>${e.code}</v></c>`:`<c r="${t}"${C(s)} t="s"><v>${String(this.strings.of(e.code))}</v></c>`:`<c r="${t}"${C(s)} t="s"><v>${String(this.strings.of(this.held(t,e)))}</v></c>`}table(t){return this.sheet.tableAt(t.row,t.col)?.name}formula(t,s,e){const n=this.calc.value(e.sheet,e.row,e.col),{shared:r}=e,{node:l}=r;if(!l)return`<c r="${t}"${C(s)} t="e"><v>#NAME?</v></c>`;let h=this.shapes.get(r);h===void 0&&(h=B(l,this.isRangeName),this.shapes.set(r,h));const c=e.array!==void 0||e.blocked!==void 0||h;let i=c?void 0:this.groups.get(r);i?.written===!1&&(e.row!==i.ref.top||e.col!==i.ref.left)&&(i=void 0);let d,f="";if(i?.written===!0)d=`<f t="shared" si="${String(i.si)}"/>`;else{const m=N(e.moved,{table:this.table(e),isTable:this.isTable,array:c});d=i?`<f t="shared" ref="${M(i.ref)}" si="${String(i.si)}">${x(m)}</f>`:`<f>${x(m)}</f>`,i&&(i.written=!0),c&&(d=this.arrayFormula(e,m))}return c&&(this.arrays=!0,f=' cm="1"'),this.cached?n===null||typeof n=="number"?`<c r="${t}"${C(s)}${f}>${d}<v>${String(n??0)}</v></c>`:typeof n=="boolean"?`<c r="${t}"${C(s)} t="b"${f}>${d}<v>${n?"1":"0"}</v></c>`:n instanceof P?ce(n)?`<c r="${t}"${C(s)} t="e"${f}>${d}<v>${n.code}</v></c>`:`<c r="${t}"${C(s)}${f}>${d}<v>0</v></c>`:`<c r="${t}"${C(s)} t="str"${f}>${d}<v>${x(this.held(t,n))}</v></c>`:`<c r="${t}"${C(s)}${f}>${d}</c>`}arrayFormula(t,s){const e=t.spill??{top:t.row,left:t.col,bottom:t.row,right:t.col};return`<f t="array" ref="${M(e)}">${x(s)}</f>`}shareFormulas(){const t=new Map;for(const e of this.sheet.formulas){const n=t.get(e.shared);if(!n)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}=n;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<n.first.row||e.row===n.first.row&&e.col<n.first.col)&&(n.first=e),n.n+=1}}let s=0;for(const[e,{area:n,first:r,n:l}]of t)l>1&&r.row===n.top&&r.col===n.left&&(this.groups.set(e,{si:s,ref:n,written:!1}),s+=1)}cell(t,s){const e=_({row:t,col:s}),n=this.styleOf(t,s),r=this.sheet.at(t,s);return r instanceof Ce?this.formula(e,n,r):r===void 0&&this.cached&&this.sheet.spillAt(t,s)?this.value(e,n,this.calc.value(this.sheet,t,s)):this.value(e,n,r??null)}columns(){const{sheet:t}=this,{spec:s}=t,e=new Map,n=new Map;for(const c of t.tables)for(const i of c.columns)i.spec?.width!==void 0&&n.set(c.at.col+i.index,i.spec.width);const r=new Set(n.keys()),l=new Map;for(const[c,i]of Object.entries(s.columns??{})){const d=xe(c);d!==void 0&&(l.set(d,i),r.add(d))}for(const c of r){const i=l.get(c),d=i?.width??n.get(c),f=de(i);e.set(c,o("col",{min:c+1,max:c+1,width:Fe(d??Le),style:f===void 0?void 0:this.styles.xf(f),hidden:i?.hidden===!0?!0:void 0,customWidth:d===void 0?void 0:!0,outlineLevel:i?.level}))}const h=[...e.keys()].sort((c,i)=>c-i).map(c=>e.get(c)??"");return h.length===0?"":`<cols>${h.join("")}</cols>`}rowAttrs(t){const s=this.sheet.spec.rows?.[String(t+1)],e=de(s),n=s?.height??this.tall.get(t);return He({r:t+1,s:e===void 0?void 0:this.styles.xf(e),customFormat:e===void 0?void 0:!0,ht:n===void 0?void 0:Ie(n),customHeight:n===void 0?void 0:!0,hidden:s?.hidden===!0||this.hiddenRows.has(t)?!0:void 0,outlineLevel:s?.level})}rows(t,s){const{sheet:e}=this,n=new Set(this.hiddenRows);for(const d of Object.keys(e.spec.rows??{}))n.add(Number(d)-1);const{start:r,cols:l,top:h}=s;let c=s.used?h:1/0,i=s.used?s.used.bottom:-1;for(const d of n)d<c&&(c=d),d>i&&(i=d);for(let d=Math.max(0,c);d<=i;d++){const f=d-h,m=f>=0&&f<r.length-1?r[f]??0:0,u=f>=0&&f<r.length-1?r[f+1]??0:0;if(m===u&&!n.has(d))continue;if(m===u){t.write(`<row${this.rowAttrs(d)}/>`);continue}const $=l.subarray(m,u).sort();let T=`<row${this.rowAttrs(d)}>`,y=-1;for(const b of $)b!==y&&(y=b,T+=this.cell(d,b));t.write(`${T}</row>`)}}view(t){const{freeze:s}=this.sheet;let e="";if(s&&(s.row>0||s.col>0)){const n=s.row>0&&s.col>0?"bottomRight":s.row>0?"bottomLeft":"topRight";e=o("pane",{xSplit:s.col>0?s.col:void 0,ySplit:s.row>0?s.row:void 0,topLeftCell:_(s),activePane:n,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,s,e){const{sheet:n}=this;this.grid();const r=this.gather();this.shareFormulas();const l=n.tables.map((y,b)=>o("tablePart",{"r:id":`rId${String(b+1)}`})),{print:h}=n.spec,c=h?.fit,i=Object.keys(n.spec.notes??{}).length>0;t.write(`${S}<worksheet xmlns="${k.main}" xmlns:r="${k.rel}">`+(n.spec.tab===void 0&&c===void 0?"":o("sheetPr",{},n.spec.tab===void 0?"":o("tabColor",{rgb:`FF${n.spec.tab.slice(1).toUpperCase()}`}),c===void 0?"":o("pageSetUpPr",{fitToPage:!0})))+o("dimension",{ref:r.used?M(r.used):"A1"})+this.view(s)+o("sheetFormatPr",{defaultRowHeight:15,outlineLevelRow:ie(n.spec.rows),outlineLevelCol:ie(n.spec.columns)})+this.columns()+"<sheetData>"),this.rows(t,r);const d=l.length+1+(this.drawn?1:0)+(i?2:0);let f=0;const m=Object.entries(n.spec.links??{}).map(([y,b])=>b.startsWith("#")?o("hyperlink",{ref:y,location:b.slice(1)}):o("hyperlink",{ref:y,"r:id":`rId${String(d+f++)}`})),u=n.merges.map(y=>o("mergeCell",{ref:M(y)})),$=n.conditions.map((y,b)=>this.condition(y,b+1)).join(""),T=this.validations();return t.write("</sheetData>"+(n.spec.protect===!0?o("sheetProtection",{sheet:!0,objects:!0,scenarios:!0}):"")+(this.scenarios?Xe(this.scenarios):"")+this.sheetFilter()+(u.length>0?o("mergeCells",{count:u.length},u.join("")):"")+$+T+(m.length>0?o("hyperlinks",{},m.join("")):"")+o("pageMargins",{...pe,...h?.margins})+(h?.orientation!==void 0||h?.paper!==void 0||c!==void 0?o("pageSetup",{paperSize:h?.paper===void 0?void 0:we[h.paper],fitToWidth:c?.width,fitToHeight:c?.height,orientation:h?.orientation}):"")+(h?.header||h?.footer?o("headerFooter",{},h.header?o("oddHeader",{},x(ae(h.header))):"",h.footer?o("oddFooter",{},x(ae(h.footer))):""):"")+(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(),n.tables.map((y,b)=>this.tableXml(y,e+b))}extensions(){const t=[];return this.newerRules.length>0&&t.push(o("ext",{uri:re.conditional,"xmlns:x14":ne},o("x14:conditionalFormattings",{},this.newerRules.join("")))),this.newerValidations.length>0&&t.push(o("ext",{uri:re.validations,"xmlns:x14":ne},o("x14:dataValidations",{count:this.newerValidations.length,"xmlns:xm":oe},this.newerValidations.join("")))),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=Ae(t);return typeof e.value=="number"&&e.formula===void 0?String(e.value):`"${t.replaceAll('"','""')}"`}const s=$e(t);return s.ok?N(s.node,{isTable:this.isTable,array:!0}):t.slice(1)}cfvo(t,s){const e=t.value===void 0?void 0:typeof t.value=="number"?String(t.value):this.bound(t.value);return s?o("x14:cfvo",{type:t.at},e===void 0?"":o("xm:f",{},x(e))):o("cfvo",{type:t.at,val:e})}crosses(t){return t.some(s=>Ge(s?.node,this.sheet.name))}condition(t,s){const{spec:e}=t,n=e.range,r=e.type!=="dataBar"&&this.crosses(t.formulas),l=(f,m,...u)=>{if(!r){const $=Object.keys(m).length===0?void 0:this.styles.dxf(m);return o("conditionalFormatting",{sqref:n},o("cfRule",{...f,dxfId:$,priority:s,stopIfTrue:e.stop===!0?!0:void 0},...u))}return this.newerRules.push(o("x14:conditionalFormatting",{"xmlns:xm":oe},o("x14:cfRule",{...f,priority:s,stopIfTrue:e.stop===!0?!0:void 0,id:Ye(this.index,s)},...u.map($=>$.replace(/^<formula>(.*)<\/formula>$/su,"<xm:f>$1</xm:f>")),Object.keys(m).length===0?"":this.styles.dxfXml(m,"x14:dxf")),o("xm:sqref",{},n))),""},h=et(e),c=t.areas[0],i=c?_({row:c.top,col:c.left}):"A1",d=f=>o("formula",{},x(f));switch(e.type){case"cellIs":return l({type:"cellIs",operator:e.operator},h,...e.formula.map(f=>d(this.bound(f))));case"containsText":{const f=e.operator??"contains",m=`"${e.text.replaceAll('"','""')}"`,u=f==="contains"?`NOT(ISERROR(SEARCH(${m},${i})))`:f==="notContains"?`ISERROR(SEARCH(${m},${i}))`:f==="beginsWith"?`LEFT(${i},LEN(${m}))=${m}`:`RIGHT(${i},LEN(${m}))=${m}`;return l({type:f==="contains"?"containsText":f==="notContains"?"notContainsText":f,operator:f==="contains"?"containsText":f,text:e.text},h,d(u))}case"duplicateValues":case"uniqueValues":return l({type:e.type},h);case"top10":return l({type:"top10",percent:e.percent===!0?!0:void 0,bottom:e.bottom===!0?!0:void 0,rank:e.rank},h);case"aboveAverage":return l({type:"aboveAverage",aboveAverage:e.below===!0?!1:void 0,equalAverage:e.equal===!0?!0:void 0},h);case"expression":return l({type:"expression"},h,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:le(e.color)})));case"colorScale":{const f=r?"x14:":"";return l({type:"colorScale"},{},o(`${f}colorScale`,{},...e.stops.map(m=>this.cfvo(m,r)),...e.stops.map(m=>o(`${f}color`,{rgb:le(m.color)}))))}case"iconSet":{const f=Number.parseInt(e.icons,10),m=e.stops??Array.from({length:f},(u,$)=>({at:"percent",value:Math.round($*100/f)}));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},...m.map(u=>this.cfvo(u,r))))}}}validation(t){const{spec:s}=t;let e="",n=this.crosses(t.formulas);if(s.values){const i=s.values.join(",");i.length>De||s.values.some(d=>d.includes(",")||d.includes('"'))?(e=this.lists.place(s.values),n=!0):e=`"${i}"`}else e=this.bound(s.formula?.[0]);const r=this.bound(s.formula?.[1]),{error:l,prompt:h}=s;s.multiple===!0&&this.left.push(`${this.sheet.name}!${s.range}: several choices in a cell: its text stays, and Excel's list offers one at a time`);const c={type:s.type,errorStyle:l?.style===void 0||l.style==="stop"?void 0:l.style,operator:s.operator===void 0||s.operator==="between"?void 0:s.operator,allowBlank:s.blank===!1?void 0:!0,showDropDown:s.dropdown===!1?!0:void 0,showInputMessage:h?.show===!1?void 0:!0,showErrorMessage:l?.show===!1||s.multiple===!0?void 0:!0,errorTitle:l?.title,error:l?.message,promptTitle:h?.title,prompt:h?.message};return n?(this.newerValidations.push(o("x14:dataValidation",c,e===""?"":o("x14:formula1",{},o("xm:f",{},x(e))),r===""?"":o("x14:formula2",{},o("xm:f",{},x(r))),o("xm:sqref",{},s.range))),""):o("dataValidation",{...c,sqref:s.range},e===""?"":o("formula1",{},x(e)),r===""?"":o("formula2",{},x(r)))}validations(){const t=this.sheet.validations.map(s=>this.validation(s)).filter(s=>s!=="");return t.length===0?"":o("dataValidations",{count:t.length},t.join(""))}filterColumns(t){return[...t.columns.entries()].sort(([s],[e])=>s-e).map(([s,e])=>tt(s-t.area.left,e))}sheetFilter(){const t=this.sheet.filters.find(s=>!s.table);return t?o("autoFilter",{ref:M(t.area)},...this.filterColumns(t)):""}columnFormula(t,s){if(!s?.node)return"";const e=B(s.node,this.isRangeName),n=N(s.node,{table:t.name,isTable:this.isTable,array:e});return o("calculatedColumnFormula",{array:e?!0:void 0},x(n))}tableXml(t,s){const e=t.area,n=M({...e,bottom:Math.max(e.bottom,e.top+1)}),r=t.spec.style??DEFAULT_TABLE_STYLE,l=this.sheet.filters.find(h=>h.table===t);return S+o("table",{xmlns:k.main,id:s,name:t.name,displayName:t.name,ref:n,totalsRowShown:0},l?o("autoFilter",{ref:n},...this.filterColumns(l)):"",o("tableColumns",{count:t.columns.length},t.columns.map((h,c)=>o("tableColumn",{id:c+1,name:h.name},this.columnFormula(t,h.formula))).join("")),r==="none"?o("tableStyleInfo",{showFirstColumn:0,showLastColumn:0,showRowStripes:1,showColumnStripes:0}):o("tableStyleInfo",{name:r,showFirstColumn:0,showLastColumn:0,showRowStripes:1,showColumnStripes:0}))}}const ie=a=>{let t;for(const s of Object.values(a??{}))s.level!==void 0&&(t=Math.max(t??0,s.level));return t},ae=a=>[a.left===void 0?"":`&L${a.left}`,a.center===void 0?"":`&C${a.center}`,a.right===void 0?"":`&R${a.right}`].join(""),Je=a=>typeof a=="string"?{text:a,author:K}:{text:a.text,author:a.author??K};function Ke(a){const t=a.map(([e,n])=>({ref:e,...Je(n)})),s=[...new Set(t.map(e=>e.author))];return S+o("comments",{xmlns:k.main},o("authors",{},s.map(e=>o("author",{},x(e))).join("")),o("commentList",{},t.map(e=>o("comment",{ref:e.ref,authorId:s.indexOf(e.author)},o("text",{},o("r",{},o("t",/^\s|\s$|\n/u.test(e.text)?{"xml:space":"preserve"}:{},x(e.text)))))).join("")))}function Qe(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(([s],e)=>{const n=te(s);return n?[`<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(n.col+1)}, 15, ${String(n.row)}, 2, ${String(n.col+3)}, 15, ${String(n.row+4)}, 4</x:Anchor><x:AutoFill>False</x:AutoFill><x:Row>${String(n.row)}</x:Row><x:Column>${String(n.col)}</x:Column></x:ClientData></v:shape>`]:[]}).join("")}</xml>`}const le=a=>`FF${a.slice(1).toUpperCase()}`;function et(a){if(a.type==="dataBar"||a.type==="colorScale"||a.type==="iconSet")return{};const t={};for(const s of["bold","italic","underline","strike","color","fill","border"])a[s]!==void 0&&(t[s]=a[s]);return t}function tt(a,t){return o("filterColumn",{colId:a},o("filters",{blank:t.blanks===!0?!0:void 0},(t.values??[]).map(s=>o("filter",{val:s})).join("")))}const C=a=>a===void 0?"":` s="${String(a)}"`,ce=a=>a.code!=="#CYCLE!",st=new Set(["width","height","hidden"]);function de(a){if(!a)return;const t=Object.fromEntries(Object.entries(a).filter(([s])=>!st.has(s)));return Object.keys(t).length===0?void 0:t}const V=a=>S+o("Relationships",{xmlns:k.pkg},a.map(([t,s,e],n)=>o("Relationship",{Id:`rId${String(n+1)}`,Type:t,Target:s,TargetMode:e})).join(""));function nt(a,t){const s=t.formula?.node;if(s)return N(s,{isTable:n=>a.table(n)!==void 0,array:!0});const{value:e}=t;return e==null?'""':typeof e=="string"?`"${e.replaceAll('"','""')}"`:typeof e=="boolean"?e?"TRUE":"FALSE":e instanceof P?e.code:String(e)}const ot=(a,t)=>a.length===t.length&&a.every((s,e)=>s===t[e]),he=a=>`$${D(a.left)}$${String(a.top+1)}:$${D(a.right)}$${String(a.bottom+1)}`;function rt(a){const t=[],s=(e,n)=>o("definedName",{name:e.name,localSheetId:n,hidden:e.hidden===!0?!0:void 0},x(nt(a,e)));for(const e of a.names.values())t.push(s(e));return a.sheets.forEach((e,n)=>{for(const d of e.names.values())t.push(s(d,n));const r=e.filters.find(d=>!d.table);r&&t.push(o("definedName",{name:"_xlnm._FilterDatabase",localSheetId:n,hidden:!0},x(`${X(e.name)}${he(r.area)}`)));const l=X(e.name),h=e.spec.print,c=h?.area===void 0?void 0:ge(h.area);c&&t.push(o("definedName",{name:"_xlnm.Print_Area",localSheetId:n},x(`${l}${he(c)}`)));const i=[h?.title_cols?.toUpperCase().replace(/([A-Z]+):([A-Z]+)/u,"$$$1:$$$2"),h?.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:n},x(i.join(","))))}),t}export function writeXlsx(a,t={}){const s=a.wb,e=[];s.checks.length>0&&e.push(`${String(s.checks.length)} check${s.checks.length===1?"":"s"}: a file has no such thing`);const n=ke(a);e.push(...n.left);const r=new Me,l=new Ve,h=new We(s),c=new _e,i=[["/xl/workbook.xml",A.sheet]],d=Math.max(0,s.sheets.findIndex(p=>p.spec.hidden!==!0));let f=1,m=!1;const u=new Map;let $=0,T=0,y=0;for(const[p,w]of s.sheets.entries()){const H=String(p+1),O=Be(w,a,t.file,e),F=w.charts.filter(({spec:g})=>[g.categories,...g.series.flatMap(E=>[E.values,E.x])].some(E=>E?.endsWith("#"))).length;F>0&&e.push(`${w.name}: ${String(F)} chart${F===1?"":"s"} on a spill: ${F===1?"it reads":"they read"} the cells the spill covers now, and will not grow with it`);const Z=new Ze(w,a,r,l,t.cached!==!1,e,h,p,O,n.sheets.find(g=>g.sheet===w)),me=Z.write(c.part(`xl/worksheets/sheet${H}.xml`),p===d,f);m||=Z.arrays,i.push([`/xl/worksheets/sheet${H}.xml`,A.worksheet]);const R=[];for(const g of me){const E=`table${String(f)}.xml`;f+=1,c.add(`xl/tables/${E}`,g),i.push([`/xl/tables/${E}`,A.table]),R.push([`${v}table`,`../tables/${E}`])}if(w.charts.length>0||O.length>0){$+=1;const g=`drawing${String($)}.xml`;c.add(`xl/drawings/${g}`,Te(w.charts,O)),i.push([`/xl/drawings/${g}`,A.drawing]),R.push([`${v}drawing`,`../drawings/${g}`]);const E=w.charts.map(L=>{T+=1;const I=`chart${String(T)}.xml`;return c.add(`xl/charts/${I}`,Ee(a,w,L)),i.push([`/xl/charts/${I}`,A.chart]),[`${v}chart`,`../charts/${I}`]});for(const L of O){const J=[...u].find(([,ue])=>ot(ue,L.bytes))?.[0]??`image${String(u.size+1)}${L.file}`;u.set(J,L.bytes),E.push([`${v}image`,`../media/${J}`])}c.add(`xl/drawings/_rels/${g}.rels`,V(E))}const U=Object.entries(w.spec.notes??{});if(U.length>0){y+=1;const g=String(y);c.add(`xl/comments${g}.xml`,Ke(U)),i.push([`/xl/comments${g}.xml`,A.comments]),c.add(`xl/drawings/vmlDrawing${g}.vml`,Qe(U)),R.push([`${v}vmlDrawing`,`../drawings/vmlDrawing${g}.vml`]),R.push([`${v}comments`,`../comments${g}.xml`])}for(const g of Object.values(w.spec.links??{}))g.startsWith("#")||R.push([`${v}hyperlink`,g,"External"]);R.length>0&&c.add(`xl/worksheets/_rels/sheet${H}.xml.rels`,V(R))}const b=s.sheets.length,z=h.columns.length>0;if(z){const p=`xl/worksheets/sheet${String(b+1)}.xml`;c.add(p,h.xml(l)),i.push([`/${p}`,A.worksheet])}const j=[...s.sheets,...z?[void 0]:[]].map((p,w)=>[`${v}worksheet`,`worksheets/sheet${String(w+1)}.xml`]);j.push([`${v}theme`,"theme/theme1.xml"]),j.push([`${v}styles`,"styles.xml"]),j.push([`${v}sharedStrings`,"sharedStrings.xml"]),m&&(j.push([`${v}sheetMetadata`,"metadata.xml"]),i.push(["/xl/metadata.xml",A.metadata]));const G=rt(s),Y=s.sheets.map((p,w)=>o("sheet",{name:p.name,sheetId:w+1,state:p.spec.hidden===!0?"hidden":void 0,"r:id":`rId${String(w+1)}`}));z&&Y.push(o("sheet",{name:h.name,sheetId:b+1,state:"veryHidden","r:id":`rId${String(b+1)}`})),c.add("xl/workbook.xml",S+o("workbook",{xmlns:k.main,"xmlns:r":k.rel},o("workbookPr",{}),o("bookViews",{},o("workbookView",{activeTab:d===0?void 0:d})),o("sheets",{},Y.join("")),G.length>0?o("definedNames",{},G.join("")):"",o("calcPr",{calcId:je,fullCalcOnLoad:!0}))),c.add("xl/_rels/workbook.xml.rels",V(j)),c.add("xl/styles.xml",S+r.xml()),l.write(c.part("xl/sharedStrings.xml")),c.add("xl/theme/theme1.xml",S+Re),m&&c.add("xl/metadata.xml",S+Ne),c.add("docProps/core.xml",S+o("cp:coreProperties",{"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/"},s.title===void 0?"":o("dc:title",{},x(s.title)))),c.add("docProps/app.xml",S+o("Properties",{xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"},o("Application",{},"AllyHub"))),c.add("_rels/.rels",V([[`${v}officeDocument`,"xl/workbook.xml"],["http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties","docProps/core.xml"],[`${v}extended-properties`,"docProps/app.xml"]])),i.push(["/xl/styles.xml",A.styles],["/xl/sharedStrings.xml",A.strings],["/xl/theme/theme1.xml",A.theme],["/docProps/core.xml",A.core],["/docProps/app.xml",A.app]);const fe=[...u].sort(([p],[w])=>p.localeCompare(w));for(const[p,w]of fe)c.add(`xl/media/${p}`,w);return c.add("[Content_Types].xml",S+o("Types",{xmlns:k.types},o("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),o("Default",{Extension:"xml",ContentType:"application/xml"}),y>0?o("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}):"",[...new Set([...u.keys()].map(p=>p.split(".").pop()??""))].sort().map(p=>o("Default",{Extension:p,ContentType:`image/${p==="jpg"?"jpeg":p}`})).join(""),i.map(([p,w])=>o("Override",{PartName:p,ContentType:w})).join(""))),{bytes:c.finish(),left:e}}
@@ -1,4 +1,4 @@
1
- import { type ZipLimits } from "@allyhub-next/formats";
1
+ import { type ZipLimits } from "@allyhub/formats";
2
2
  /** A part being written: text in order, then its end. */
3
3
  export interface PartWriter {
4
4
  write(text: string): void;
@@ -0,0 +1,2 @@
1
+ /*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
2
+ import{Inflate as C,Zip as D,ZipDeflate as M}from"fflate";import{withinZip as U,ZipLimitError as E}from"@allyhub/formats";const O=new Date(1980,0,1),_=1<<20;export class ZipOut{chunks=[];zip;encoder=new TextEncoder;open=!1;constructor(){this.zip=new D((t,e)=>{if(t)throw t;this.chunks.push(e)})}entry(t){if(this.open)throw new Error(`${t} is written while a part is open.`);const e=new M(t,{level:6});return e.mtime=O,this.zip.add(e),e}part(t){const e=this.entry(t);this.open=!0;let n=[],s=0;const i=o=>{const r=n.length===1?n[0]??"":n.join("");n=[],s=0,e.push(this.encoder.encode(r),o)};return{write:o=>{n.push(o),s+=o.length,s>=_&&i(!1)},end:()=>{i(!0),this.open=!1}}}add(t,e){this.entry(t).push(typeof e=="string"?this.encoder.encode(e):e,!0)}finish(){this.zip.end();let t=0;for(const s of this.chunks)t+=s.length;const e=new Uint8Array(t);let n=0;for(const s of this.chunks)e.set(s,n),n+=s.length;return e}}const g=65536,h=(f,t)=>(f[t]??0)|(f[t+1]??0)<<8,a=(f,t)=>(h(f,t)|h(f,t+2)<<16)>>>0,d=(f,t)=>a(f,t)+a(f,t+4)*4294967296,A=f=>{let t="";for(const e of f)t+=String.fromCharCode(e);return t};export class ZipIn{bytes;entries=new Map;lower=new Map;constructor(t,e){this.bytes=t;const n=U(e);for(const s of this.directory())n({name:s.name,originalSize:s.size}),this.entries.set(s.name,s),this.lower.set(s.name.toLowerCase(),s)}get names(){return[...this.entries.keys()]}find(t){return this.entries.get(t)??this.lower.get(t.toLowerCase())}has(t){return this.find(t)!==void 0}*directory(){const t=this.bytes;let e=-1;for(let r=t.length-22;r>=Math.max(0,t.length-22-65535);r--)if(a(t,r)===101010256){e=r;break}if(e<0)throw new Error("It has no zip directory.");let n=h(t,e+10),s=a(t,e+16);if((n===65535||s===4294967295)&&a(t,e-20)===117853008){const r=d(t,e-12);if(a(t,r)!==101075792)throw new Error("Its zip64 end is lost.");n=d(t,r+32),s=d(t,r+48)}const i=new TextDecoder;let o=s;for(let r=0;r<n;r++){if(a(t,o)!==33639248)throw new Error("Its zip directory is damaged.");const I=h(t,o+8),Z=h(t,o+10);let w=a(t,o+20),m=a(t,o+24);const y=h(t,o+28),L=h(t,o+30),T=h(t,o+32);let c=a(t,o+42);const x=t.subarray(o+46,o+46+y),p=I&2048?i.decode(x):A(x);let l=o+46+y;const z=l+L;for(;l+4<=z;){const $=h(t,l),k=h(t,l+2);if($===1){let u=l+4;m===4294967295&&(m=d(t,u),u+=8),w===4294967295&&(w=d(t,u),u+=8),c===4294967295&&(c=d(t,u))}l+=4+k}if(o=z+T,a(t,c)!==67324752)throw new Error(`Its part ${p} is lost.`);const b=c+30+h(t,c+26)+h(t,c+28);if(b+w>t.length)throw new Error(`Its part ${p} is cut short.`);p.endsWith("/")||(yield{name:p,method:Z,start:b,compressed:w,size:m})}}stream(t,e){const n=this.find(t);if(!n)return!1;const s=this.bytes.subarray(n.start,n.start+n.compressed);if(n.method===0){if(s.length>n.size)throw new E(`${n.name} holds more than it says.`);return e(s),!0}if(n.method!==8)throw new Error(`${n.name} is compressed in a way a zip reader here does not know.`);let i=0;const o=new C(r=>{if(i+=r.length,i>n.size)throw new E(`${n.name} unzips to more than it says.`);e(r)});for(let r=0;r<s.length;r+=g)o.push(s.subarray(r,r+g),r+g>=s.length);return s.length===0&&o.push(s,!0),!0}streamText(t,e){const n=new TextDecoder;if(!this.stream(t,o=>{const r=n.decode(o,{stream:!0});r!==""&&e(r)}))return!1;const i=n.decode();return i!==""&&e(i),!0}bytesOf(t){const e=this.find(t);if(!e)return;const n=new Uint8Array(e.size);let s=0;return this.stream(t,i=>{n.set(i,s),s+=i.length}),s===n.length?n:n.subarray(0,s)}text(t){const e=this.bytesOf(t);return e===void 0?void 0:new TextDecoder().decode(e)}}
@@ -1,6 +1,6 @@
1
1
  {
2
- "name": "@allyhub-next/sheet",
3
- "version": "0.7.0",
2
+ "name": "@allyhub/sheet",
3
+ "version": "0.8.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,4 +1,4 @@
1
- import type { AnimationDirection, AnimationEffect, AnimationFile, AnimationStart, SlideTransitionType, TransitionFile } from "@allyhub-next/formats";
1
+ import type { AnimationDirection, AnimationEffect, AnimationFile, AnimationStart, SlideTransitionType, TransitionFile } from "@allyhub/formats";
2
2
  import type { Frame, PathStep } from "./model.js";
3
3
  /** PowerPoint's default length of each effect, seconds. */
4
4
  export declare const ANIMATION_DURATIONS: Readonly<Record<AnimationEffect, number>>;
@@ -1,7 +1,7 @@
1
- import type { Numbering, AnimationEffect, AnimationFile, LineDash, TransitionFile, LineEnd, ShapeGeometry, TextAlign, ThemeColor } from "@allyhub-next/formats";
1
+ import type { Numbering, AnimationEffect, AnimationFile, LineDash, TransitionFile, LineEnd, ShapeGeometry, TextAlign, ThemeColor } from "@allyhub/formats";
2
2
  import type { Anchor, AutoSize, FillType, PlaceholderType, ShapeType } from "./enums.js";
3
3
  import type { Color, ComponentContext, DeckDef, FontDef, Frame, GradientDef, FreeformPath, GeneratedSlideDef, GeneratorContext, LayoutDef, MasterDef, ParagraphDef, TableCellDef, TableDef, ParagraphFormatDef, PropSpec, RunDef, ShapeDef, TextFrameDef } from "./model.js";
4
- import type { SheetChartType } from "@allyhub-next/formats";
4
+ import type { SheetChartType } from "@allyhub/formats";
5
5
  import { Chart, type CategoryChartData, type XyChartData } from "./chart-api.js";
6
6
  import type { ThemeInput } from "./theme.js";
7
7
  import { type Length, type LengthValue, type SlideSizeName } from "./units.js";
@@ -649,13 +649,17 @@ export declare class Generator {
649
649
  _add(slide_layout: SlideLayout | string, id: string): GeneratedSlide;
650
650
  _made(): GeneratedSlideDef[];
651
651
  }
652
- /** A component as `prs.components.add` takes it. */
653
- export interface ComponentInput {
652
+ /**
653
+ * A component as `prs.components.add` takes it: what `defineComponent`
654
+ * makes (one layer filling the shape, or its layers in a frame, from the
655
+ * deck or from a module the project shares), or `{ props, layers }`.
656
+ */
657
+ export type ComponentInput = {
654
658
  /** The props a person may change in the editor, by the SDK's prop types. */
655
659
  props?: Readonly<Record<string, PropSpec>>;
656
660
  /** Its layers, drawn in its frame (the layer contract: custom(), defineComponent()…). */
657
661
  layers: (props: Record<string, unknown>, ctx: ComponentContext) => unknown[];
658
- }
662
+ } | ((...args: never[]) => unknown);
659
663
  /** python-pptx's `Presentation`, as a deck's code is given it. */
660
664
  export declare class Presentation {
661
665
  private readonly masters;