@poe-platform/safe-bash 0.1.812 → 0.1.813

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 (329) hide show
  1. package/dist/audio-ast/id3-source.d.ts +27 -0
  2. package/dist/audio-ast/index.d.ts +4 -0
  3. package/dist/audio-ast/index.js +996 -596
  4. package/dist/audio-ast/mp3-source.d.ts +18 -0
  5. package/dist/audio-ast/ogg-source.d.ts +25 -0
  6. package/dist/audio-ast/ogg-stream-source.d.ts +22 -0
  7. package/dist/image-ast/index.js +139 -9
  8. package/dist/mp4-ast/containers/adapters.d.ts +7 -0
  9. package/dist/office-xml/retained-xml-document.d.ts +8 -0
  10. package/dist/pdf-ast/ast.d.ts +2 -0
  11. package/dist/pdf-ast/content/dictionary-cursor.d.ts +15 -0
  12. package/dist/pdf-ast/content/range-operator-parser.d.ts +4 -0
  13. package/dist/pdf-ast/content/stored-dictionary.d.ts +10 -0
  14. package/dist/pdf-ast/cos/lexer.d.ts +8 -5
  15. package/dist/pdf-ast/cos/object-reader.d.ts +4 -3
  16. package/dist/pdf-ast/cos/range-parser.d.ts +4 -0
  17. package/dist/pdf-ast/cos/retained-objects.d.ts +1 -0
  18. package/dist/pdf-ast/cos/retained-writer.d.ts +1 -0
  19. package/dist/pdf-ast/cos/value-parser.d.ts +9 -0
  20. package/dist/pdf-ast/edit/retained-append-attachments.d.ts +13 -0
  21. package/dist/pdf-ast/edit/retained-bookmarks.d.ts +13 -0
  22. package/dist/pdf-ast/edit/retained-graph.d.ts +6 -0
  23. package/dist/pdf-ast/edit/retained-save.d.ts +2 -0
  24. package/dist/pdf-ast/edit/retained-stamps.d.ts +9 -0
  25. package/dist/pdf-ast/fonts/resolve.d.ts +3 -1
  26. package/dist/pdf-ast/index.d.ts +3 -1
  27. package/dist/pdf-ast/index.js +1557 -770
  28. package/dist/safe-bash/audio-ast.browser.js +6 -1
  29. package/dist/safe-bash/chunks/{chunk-HHSOUC3Z.js → chunk-HPQE675Q.js} +1 -1
  30. package/dist/safe-bash/chunks/{chunk-BUYRKFW2.js → chunk-I6ECNJMR.js} +1 -1
  31. package/dist/safe-bash/chunks/{pdftk-WRYEP3CA.js → pdftk-Y2TX74LY.js} +2 -1
  32. package/dist/safe-bash/command-chunks/biff-4ALVARRF-7SRX6R6N.js +5192 -0
  33. package/dist/safe-bash/command-chunks/{chunk-EHSM5ZQS.js → chunk-2DGJOOXM.js} +8 -8
  34. package/dist/safe-bash/command-chunks/{chunk-Q6S57NOQ.js → chunk-2E2H7MBH.js} +7 -7
  35. package/dist/safe-bash/command-chunks/{chunk-MMBZTYXO.js → chunk-2PQRZDNR.js} +221 -0
  36. package/dist/safe-bash/command-chunks/{chunk-NARD63DY.js → chunk-2V6FOLXV.js} +22 -66
  37. package/dist/safe-bash/command-chunks/{chunk-56NYSX65.js → chunk-2Z3WRRFT.js} +9 -9
  38. package/dist/safe-bash/command-chunks/chunk-3D24WDND.js +63 -0
  39. package/dist/safe-bash/command-chunks/{chunk-47NEG4UO.js → chunk-3JST2Q7G.js} +219 -43
  40. package/dist/safe-bash/command-chunks/{chunk-WGG6G2KG.js → chunk-3LJAXFH5.js} +7 -7
  41. package/dist/safe-bash/command-chunks/{chunk-AHA6IWAJ.js → chunk-3TYDSGAH.js} +6 -6
  42. package/dist/safe-bash/command-chunks/{chunk-YSMNXMAO.js → chunk-3Y4XZB24.js} +4 -4
  43. package/dist/safe-bash/command-chunks/{chunk-ZIIO6GRY.js → chunk-4PBNMKAT.js} +7 -7
  44. package/dist/safe-bash/command-chunks/{chunk-JFYWVQ4V.js → chunk-4Z6W5EOC.js} +8 -8
  45. package/dist/safe-bash/command-chunks/{chunk-GEM47B2P.js → chunk-57DDYKE5.js} +7 -7
  46. package/dist/safe-bash/command-chunks/{chunk-4CKFNXRN.js → chunk-5IFRAI7Y.js} +1 -1
  47. package/dist/safe-bash/command-chunks/{chunk-RHYJVTJO.js → chunk-5KGEZ3RW.js} +2 -2
  48. package/dist/safe-bash/command-chunks/{chunk-A5FZBR7X.js → chunk-5MFDRSGG.js} +4 -4
  49. package/dist/safe-bash/command-chunks/{chunk-7GKKMNL6.js → chunk-5P6I2T63.js} +8 -8
  50. package/dist/safe-bash/command-chunks/{chunk-6M6TM5Z5.js → chunk-5VQVZPP3.js} +3 -3
  51. package/dist/safe-bash/command-chunks/{chunk-MIRL7HTF.js → chunk-6244HYJY.js} +1 -1
  52. package/dist/safe-bash/command-chunks/chunk-63EMPQ7Z.js +115 -0
  53. package/dist/safe-bash/command-chunks/{chunk-XRVKWGVQ.js → chunk-6CY5BHBS.js} +6 -6
  54. package/dist/safe-bash/command-chunks/{chunk-XVP6V5K3.js → chunk-6IWE7PTK.js} +6 -6
  55. package/dist/safe-bash/command-chunks/{chunk-6QBMND4A.js → chunk-6SRHWVEB.js} +1 -1
  56. package/dist/safe-bash/command-chunks/chunk-6ZHQB453.js +35 -0
  57. package/dist/safe-bash/command-chunks/chunk-73NYFNAS.js +173 -0
  58. package/dist/safe-bash/command-chunks/{chunk-2JSDKQ4J.js → chunk-7NXTEWPR.js} +119 -44
  59. package/dist/safe-bash/command-chunks/{chunk-554Z6IKP.js → chunk-7PRL6RJ6.js} +2 -2
  60. package/dist/safe-bash/command-chunks/{chunk-SDTPO2VV.js → chunk-7PZHWMK6.js} +7 -7
  61. package/dist/safe-bash/command-chunks/{chunk-XZ2FWFNV.js → chunk-7QZ2HP2F.js} +6 -6
  62. package/dist/safe-bash/command-chunks/{chunk-OEJM666F.js → chunk-7UC2Q6Z6.js} +5 -5
  63. package/dist/safe-bash/command-chunks/{chunk-COKYZUBW.js → chunk-AJI55RS7.js} +1 -1
  64. package/dist/safe-bash/command-chunks/{chunk-WXRYDALR.js → chunk-BBAB7LC4.js} +4 -4
  65. package/dist/safe-bash/command-chunks/{chunk-QYMEASQ6.js → chunk-BEHUSUOY.js} +4 -4
  66. package/dist/safe-bash/command-chunks/{chunk-Z2JW6M2D.js → chunk-BK7ISUJL.js} +3 -3
  67. package/dist/safe-bash/command-chunks/{chunk-33YCKZZX.js → chunk-C5KLFZGT.js} +6 -6
  68. package/dist/safe-bash/command-chunks/{chunk-TVH4JORU.js → chunk-C5QDEB3I.js} +3 -3
  69. package/dist/safe-bash/command-chunks/{chunk-N4R2SHSS.js → chunk-CCZZVCHX.js} +2 -2
  70. package/dist/safe-bash/command-chunks/{chunk-2VLAXKTS.js → chunk-CTDC4LJT.js} +121 -85
  71. package/dist/safe-bash/command-chunks/{chunk-S6R3IB36.js → chunk-D55REQA3.js} +1 -1
  72. package/dist/safe-bash/command-chunks/{chunk-Y4EYCZFT.js → chunk-D6WJY6QO.js} +10 -10
  73. package/dist/safe-bash/command-chunks/{chunk-2CORNDGF.js → chunk-DBLHCJJU.js} +2 -2
  74. package/dist/safe-bash/command-chunks/{chunk-SPW4GW4Z.js → chunk-DFI7QF3M.js} +2 -2
  75. package/dist/safe-bash/command-chunks/{chunk-456PHA3L.js → chunk-DMCI6T6N.js} +1 -1
  76. package/dist/safe-bash/command-chunks/{chunk-TW73OXPR.js → chunk-EJTNVXWF.js} +6 -6
  77. package/dist/safe-bash/command-chunks/{chunk-QD7ZRDUN.js → chunk-ET2VPDUA.js} +1 -1
  78. package/dist/safe-bash/command-chunks/{chunk-CJQSAATC.js → chunk-EXOQGXEU.js} +26 -26
  79. package/dist/safe-bash/command-chunks/{chunk-CRV2Q3PB.js → chunk-EZ4NQIPL.js} +1 -1
  80. package/dist/safe-bash/command-chunks/chunk-FWKLBDMK.js +0 -0
  81. package/dist/safe-bash/command-chunks/{chunk-22MOB45U.js → chunk-FWPVQGYK.js} +6 -6
  82. package/dist/safe-bash/command-chunks/{chunk-QC5RMGSA.js → chunk-G3RUXKVY.js} +3 -3
  83. package/dist/safe-bash/command-chunks/{chunk-JYUJAF4L.js → chunk-G7NENPYV.js} +4 -0
  84. package/dist/safe-bash/command-chunks/{chunk-KCOJA7EM.js → chunk-GKILM4HZ.js} +7 -7
  85. package/dist/safe-bash/command-chunks/{chunk-HTVIYLVB.js → chunk-GNXTMSYN.js} +4 -4
  86. package/dist/safe-bash/command-chunks/{chunk-D2ASPM7R.js → chunk-GOBUDKZ3.js} +3 -3
  87. package/dist/safe-bash/command-chunks/{chunk-RNSKXOG3.js → chunk-GVWVRPG6.js} +6 -6
  88. package/dist/safe-bash/command-chunks/{chunk-FDCIPJBQ.js → chunk-HCKYUQ3L.js} +7 -7
  89. package/dist/safe-bash/command-chunks/{chunk-AGLK7OJR.js → chunk-HDSIIQBS.js} +1 -1
  90. package/dist/safe-bash/command-chunks/{chunk-DM2CPMB4.js → chunk-HKOMXGJS.js} +2 -2
  91. package/dist/safe-bash/command-chunks/{chunk-IT7TAC3F.js → chunk-HVW53ARH.js} +16 -16
  92. package/dist/safe-bash/command-chunks/{chunk-M7QE2MN7.js → chunk-I4GMCWAT.js} +6 -6
  93. package/dist/safe-bash/command-chunks/{chunk-HWQ2UHMT.js → chunk-IHSOOSNC.js} +9 -9
  94. package/dist/safe-bash/command-chunks/{chunk-LCZDBW55.js → chunk-JAHJWVGF.js} +5 -5
  95. package/dist/safe-bash/command-chunks/{chunk-MOZD7RUY.js → chunk-JORIVUPM.js} +27 -11
  96. package/dist/safe-bash/command-chunks/{chunk-PMAM4N33.js → chunk-JUJHYPYL.js} +9 -9
  97. package/dist/safe-bash/command-chunks/{chunk-ENT3IV2G.js → chunk-KBUBSMCQ.js} +12 -12
  98. package/dist/safe-bash/command-chunks/{chunk-ZXR6LXV5.js → chunk-KCE5D4Z4.js} +48 -4
  99. package/dist/safe-bash/command-chunks/{chunk-FIIAYCWS.js → chunk-KZ5ODST6.js} +2 -2
  100. package/dist/safe-bash/command-chunks/{chunk-PNGDJA6M.js → chunk-LD7BONZY.js} +2 -2
  101. package/dist/safe-bash/command-chunks/{chunk-KJ4XXZIL.js → chunk-M3Z5PU2M.js} +582 -59
  102. package/dist/safe-bash/command-chunks/{chunk-LXLLA4PM.js → chunk-MKX4JAZ6.js} +17 -17
  103. package/dist/safe-bash/command-chunks/{chunk-RQIQ75W5.js → chunk-MNHBQBF6.js} +5 -5
  104. package/dist/safe-bash/command-chunks/{chunk-A2CLZMQZ.js → chunk-MPKY37QR.js} +1 -1
  105. package/dist/safe-bash/command-chunks/{chunk-K5GB2YMN.js → chunk-MUUWBZIC.js} +10 -10
  106. package/dist/safe-bash/command-chunks/{chunk-JOCFI7TG.js → chunk-N32GSM3J.js} +1 -1
  107. package/dist/safe-bash/command-chunks/{chunk-EUT24Y5Z.js → chunk-NKTULXVD.js} +8 -8
  108. package/dist/safe-bash/command-chunks/{chunk-5HPU7D36.js → chunk-NMPED6L5.js} +4 -4
  109. package/dist/safe-bash/command-chunks/{chunk-QZZ73J2O.js → chunk-NPFHUS4X.js} +6 -6
  110. package/dist/safe-bash/command-chunks/{chunk-X7FA7ZD5.js → chunk-O675URF4.js} +8 -8
  111. package/dist/safe-bash/command-chunks/{chunk-R6EGGK5M.js → chunk-P7EL2FWW.js} +7 -7
  112. package/dist/safe-bash/command-chunks/{chunk-YS25EI54.js → chunk-PCCFLPUQ.js} +2 -2
  113. package/dist/safe-bash/command-chunks/{chunk-RRL3Y562.js → chunk-PI6MOMHA.js} +11 -11
  114. package/dist/safe-bash/command-chunks/{chunk-26VCZHLJ.js → chunk-PIOQBOEK.js} +1 -1
  115. package/dist/safe-bash/command-chunks/chunk-PK36TVXB.js +175 -0
  116. package/dist/safe-bash/command-chunks/{chunk-3Q247UDJ.js → chunk-PKLJRB7W.js} +264 -129
  117. package/dist/safe-bash/command-chunks/{chunk-6CCQI6XZ.js → chunk-PSCOXGCA.js} +12 -12
  118. package/dist/safe-bash/command-chunks/{chunk-XPD636C4.js → chunk-PVGZMLC6.js} +3 -3
  119. package/dist/safe-bash/command-chunks/{chunk-JQVHUSDD.js → chunk-PXWS3Q7L.js} +5 -5
  120. package/dist/safe-bash/command-chunks/{chunk-HDJVJTCK.js → chunk-QFF5KBOM.js} +9 -9
  121. package/dist/safe-bash/command-chunks/{chunk-MPUHH2KR.js → chunk-QM2HZJSJ.js} +3 -3
  122. package/dist/safe-bash/command-chunks/{chunk-UAXSE3XE.js → chunk-R2BMZAHG.js} +5 -5
  123. package/dist/safe-bash/command-chunks/{chunk-KB7DUBVL.js → chunk-RGOQKIG6.js} +5 -5
  124. package/dist/safe-bash/command-chunks/{chunk-D2KZ66W4.js → chunk-RLCQ7BN3.js} +187 -39
  125. package/dist/safe-bash/command-chunks/{chunk-B5LDP7AA.js → chunk-S2N2V5U4.js} +2 -2
  126. package/dist/safe-bash/command-chunks/{chunk-OA75SGN2.js → chunk-SGPCXAG7.js} +7 -7
  127. package/dist/safe-bash/command-chunks/{chunk-QUM3SYAJ.js → chunk-SYSX46IV.js} +3 -3
  128. package/dist/safe-bash/command-chunks/chunk-T3E5RV3U.js +737 -0
  129. package/dist/safe-bash/command-chunks/{chunk-YORJDX4V.js → chunk-T5ERNELL.js} +4 -4
  130. package/dist/safe-bash/command-chunks/{chunk-ZEX53S5I.js → chunk-T6C5QP7T.js} +6368 -6230
  131. package/dist/safe-bash/command-chunks/{chunk-ATTWQVR2.js → chunk-TKRLZIFI.js} +17 -17
  132. package/dist/safe-bash/command-chunks/{chunk-ZMHEGDU2.js → chunk-TODWFDYB.js} +2 -2
  133. package/dist/safe-bash/command-chunks/{chunk-XVLWZTPY.js → chunk-TQEB4DH4.js} +543 -144
  134. package/dist/safe-bash/command-chunks/{chunk-36XGIPOG.js → chunk-U5TWQFZY.js} +1 -1
  135. package/dist/safe-bash/command-chunks/{chunk-APEWTWCC.js → chunk-UAF4IX5H.js} +6 -6
  136. package/dist/safe-bash/command-chunks/{chunk-6VPQ3CDZ.js → chunk-V37D6AHO.js} +5 -5
  137. package/dist/safe-bash/command-chunks/{chunk-RID6VYS3.js → chunk-V6XBEYPC.js} +8 -8
  138. package/dist/safe-bash/command-chunks/{chunk-WJCN2IXI.js → chunk-VQOINPVF.js} +2 -2
  139. package/dist/safe-bash/command-chunks/{chunk-W5YSINXC.js → chunk-VVWXY6IA.js} +6 -6
  140. package/dist/safe-bash/command-chunks/{chunk-HKATEVAP.js → chunk-WPVBUVFK.js} +6 -6
  141. package/dist/safe-bash/command-chunks/{chunk-UYWSIIUX.js → chunk-X53AEG36.js} +7 -7
  142. package/dist/safe-bash/command-chunks/{chunk-L5MCW6CM.js → chunk-X64XGIXZ.js} +9 -155
  143. package/dist/safe-bash/command-chunks/{chunk-Q73EMLLZ.js → chunk-X6RHJ6YN.js} +84 -5
  144. package/dist/safe-bash/command-chunks/{chunk-7PVHO47B.js → chunk-XG6UWQV5.js} +6 -6
  145. package/dist/safe-bash/command-chunks/{chunk-NQDIT667.js → chunk-XIDGHIGB.js} +5 -5
  146. package/dist/safe-bash/command-chunks/{chunk-CV7M2QJU.js → chunk-XLYIVBAR.js} +7 -7
  147. package/dist/safe-bash/command-chunks/{chunk-WVMHRNXZ.js → chunk-YUXTK3XA.js} +3 -3
  148. package/dist/safe-bash/command-chunks/{chunk-SPLOIABU.js → chunk-YXD6VGVG.js} +3 -3
  149. package/dist/safe-bash/command-chunks/{chunk-2ZFLMWOX.js → chunk-Z5BIM5B7.js} +1 -1
  150. package/dist/safe-bash/command-chunks/chunk-ZYLGNIGA.js +156 -0
  151. package/dist/safe-bash/command-chunks/{command-engine-BCUQGJJ4.js → command-engine-X3OLN7N6.js} +150 -67
  152. package/dist/safe-bash/command-chunks/{engine-LAUEWYSQ-DQCEI5HE.js → engine-XUCIFZ7V-LJFGZM6O.js} +1 -1
  153. package/dist/safe-bash/command-chunks/paradox-4FCZE53D-LQPGVMEL.js +365 -0
  154. package/dist/safe-bash/commands/pandoc/index.browser.js +1 -1
  155. package/dist/safe-bash/full-core.browser.js +2 -2
  156. package/dist/safe-bash/plugins/index.browser.js +2 -2
  157. package/dist/safe-bash-command-diff/diff.js +1 -1
  158. package/dist/safe-bash-command-diff/index.js +1 -1
  159. package/dist/safe-bash-command-ffmpeg/index.js +1 -1
  160. package/dist/safe-bash-command-ffprobe/index.js +2 -2
  161. package/dist/safe-bash-command-ffprobe/media.d.ts +3 -1
  162. package/dist/safe-bash-command-ffprobe/media.js +2 -2
  163. package/dist/safe-bash-command-html-to-markdown/budget.js +2 -1
  164. package/dist/safe-bash-command-html-to-markdown/entities.js +4 -3
  165. package/dist/safe-bash-command-html-to-markdown/index.js +564 -110
  166. package/dist/safe-bash-command-html-to-markdown/input.js +6 -5
  167. package/dist/safe-bash-command-html-to-markdown/options.js +2 -1
  168. package/dist/safe-bash-command-html-to-markdown/parser.js +5 -4
  169. package/dist/safe-bash-command-html-to-markdown/render.js +6 -5
  170. package/dist/safe-bash-command-html-to-markdown/text.js +3 -2
  171. package/dist/safe-bash-command-htmlq/index.js +361 -37
  172. package/dist/safe-bash-command-htmlq/tree.d.ts +3 -2
  173. package/dist/safe-bash-command-pandoc/command.js +7 -7
  174. package/dist/safe-bash-command-pandoc/index.js +55 -55
  175. package/dist/safe-bash-command-patch/index.js +6 -6
  176. package/dist/safe-bash-command-patch/patch-envelope.js +53 -3
  177. package/dist/safe-bash-command-patch/patch-formats.d.ts +2 -2
  178. package/dist/safe-bash-command-patch/patch-formats.js +2 -2
  179. package/dist/safe-bash-command-patch/patch-gnu-reject.d.ts +2 -1
  180. package/dist/safe-bash-command-patch/patch-gnu-reject.js +4 -3
  181. package/dist/safe-bash-command-patch/patch-publication.js +2 -1
  182. package/dist/safe-bash-command-patch/patch.js +6 -6
  183. package/dist/safe-bash-command-patch/unified.d.ts +10 -2
  184. package/dist/safe-bash-command-patch/unified.js +1 -1
  185. package/dist/safe-bash-command-pdftk/index.d.ts +6 -2
  186. package/dist/safe-bash-command-pdftk/index.js +830 -271
  187. package/dist/safe-bash-command-pptx/command-engine.d.ts +3 -0
  188. package/dist/safe-bash-command-pptx/engine.js +1 -1
  189. package/dist/safe-bash-command-pptx/index.js +9 -2
  190. package/dist/safe-bash-command-soffice/index.js +1 -1
  191. package/dist/safe-bash-command-ssconvert/index.js +2 -2
  192. package/dist/safe-bash-command-xmllint/index.js +22 -31
  193. package/dist/safe-bash-presentation-engine/accessibility.js +31 -30
  194. package/dist/safe-bash-presentation-engine/animation-editing.js +16 -15
  195. package/dist/safe-bash-presentation-engine/animations.js +16 -15
  196. package/dist/safe-bash-presentation-engine/backgrounds.js +17 -16
  197. package/dist/safe-bash-presentation-engine/bytes.js +3 -3
  198. package/dist/safe-bash-presentation-engine/chart-editing.js +34 -33
  199. package/dist/safe-bash-presentation-engine/chart-object-operations.js +25 -24
  200. package/dist/safe-bash-presentation-engine/charts.js +31 -30
  201. package/dist/safe-bash-presentation-engine/command-placeholder.js +59 -56
  202. package/dist/safe-bash-presentation-engine/comments.js +17 -16
  203. package/dist/safe-bash-presentation-engine/connector-operations.js +32 -31
  204. package/dist/safe-bash-presentation-engine/connectors.js +29 -28
  205. package/dist/safe-bash-presentation-engine/content-types.js +4 -4
  206. package/dist/safe-bash-presentation-engine/creation.js +6 -6
  207. package/dist/safe-bash-presentation-engine/diff.js +32 -31
  208. package/dist/safe-bash-presentation-engine/drawing-enums.d.ts +10 -10
  209. package/dist/safe-bash-presentation-engine/drawing-format.js +20 -19
  210. package/dist/safe-bash-presentation-engine/drawing-operations.js +31 -30
  211. package/dist/safe-bash-presentation-engine/drawing-schema.js +21 -20
  212. package/dist/safe-bash-presentation-engine/equations.js +17 -16
  213. package/dist/safe-bash-presentation-engine/errors.js +2 -2
  214. package/dist/safe-bash-presentation-engine/fields.js +17 -16
  215. package/dist/safe-bash-presentation-engine/font-metrics.js +3 -3
  216. package/dist/safe-bash-presentation-engine/image-extraction.js +20 -19
  217. package/dist/safe-bash-presentation-engine/image-formatting.js +32 -31
  218. package/dist/safe-bash-presentation-engine/image-insertion.js +18 -17
  219. package/dist/safe-bash-presentation-engine/image-replacement.js +21 -20
  220. package/dist/safe-bash-presentation-engine/image-value.js +4 -4
  221. package/dist/safe-bash-presentation-engine/images.js +19 -18
  222. package/dist/safe-bash-presentation-engine/index.d.ts +5 -1
  223. package/dist/safe-bash-presentation-engine/index.js +109 -96
  224. package/dist/safe-bash-presentation-engine/layouts.js +16 -15
  225. package/dist/safe-bash-presentation-engine/length.js +3 -3
  226. package/dist/safe-bash-presentation-engine/links.js +16 -15
  227. package/dist/safe-bash-presentation-engine/masters.js +15 -14
  228. package/dist/safe-bash-presentation-engine/media-editing.js +24 -23
  229. package/dist/safe-bash-presentation-engine/media-extraction.js +17 -16
  230. package/dist/safe-bash-presentation-engine/media.js +16 -15
  231. package/dist/safe-bash-presentation-engine/memberships.js +15 -14
  232. package/dist/safe-bash-presentation-engine/notes.js +16 -15
  233. package/dist/safe-bash-presentation-engine/ole-enum.js +4 -4
  234. package/dist/safe-bash-presentation-engine/ole-insertion.js +20 -19
  235. package/dist/safe-bash-presentation-engine/opaque-objects.js +9 -9
  236. package/dist/safe-bash-presentation-engine/package-reader.js +5 -5
  237. package/dist/safe-bash-presentation-engine/package-tools.d.ts +3 -0
  238. package/dist/safe-bash-presentation-engine/package-tools.js +27 -17
  239. package/dist/safe-bash-presentation-engine/package-uri.js +3 -3
  240. package/dist/safe-bash-presentation-engine/package-writer.js +4 -4
  241. package/dist/safe-bash-presentation-engine/presentation-model.js +58 -55
  242. package/dist/safe-bash-presentation-engine/presentation-settings.js +14 -13
  243. package/dist/safe-bash-presentation-engine/properties.js +16 -15
  244. package/dist/safe-bash-presentation-engine/relationships.js +4 -4
  245. package/dist/safe-bash-presentation-engine/resource-limits.js +1 -1
  246. package/dist/safe-bash-presentation-engine/retained-archive-staging.d.ts +19 -0
  247. package/dist/safe-bash-presentation-engine/retained-extraction-output.d.ts +18 -0
  248. package/dist/safe-bash-presentation-engine/retained-inspection.js +14 -12
  249. package/dist/safe-bash-presentation-engine/retained-package-extraction.d.ts +22 -0
  250. package/dist/safe-bash-presentation-engine/retained-package-packing.d.ts +19 -0
  251. package/dist/safe-bash-presentation-engine/retained-package.d.ts +2 -0
  252. package/dist/safe-bash-presentation-engine/retained-package.js +6 -4
  253. package/dist/safe-bash-presentation-engine/retained-text.js +19 -17
  254. package/dist/safe-bash-presentation-engine/retained-xml-parts.d.ts +5 -1
  255. package/dist/safe-bash-presentation-engine/retained-xml-publication.d.ts +18 -0
  256. package/dist/safe-bash-presentation-engine/retained-xml-replacement.d.ts +13 -0
  257. package/dist/safe-bash-presentation-engine/sanitize.js +17 -16
  258. package/dist/safe-bash-presentation-engine/selectors.js +10 -10
  259. package/dist/safe-bash-presentation-engine/shape-groups.js +31 -30
  260. package/dist/safe-bash-presentation-engine/shape-operations.js +30 -29
  261. package/dist/safe-bash-presentation-engine/shape-path-operations.js +32 -31
  262. package/dist/safe-bash-presentation-engine/shape-paths.js +16 -15
  263. package/dist/safe-bash-presentation-engine/shape-presets.js +3 -3
  264. package/dist/safe-bash-presentation-engine/shape-selection.js +31 -30
  265. package/dist/safe-bash-presentation-engine/shape-transforms.js +18 -17
  266. package/dist/safe-bash-presentation-engine/shapes.d.ts +1 -1
  267. package/dist/safe-bash-presentation-engine/shapes.js +27 -26
  268. package/dist/safe-bash-presentation-engine/slide-copy.js +17 -16
  269. package/dist/safe-bash-presentation-engine/slide-import.js +18 -17
  270. package/dist/safe-bash-presentation-engine/slide-merge-split.js +20 -19
  271. package/dist/safe-bash-presentation-engine/slide-model.js +43 -42
  272. package/dist/safe-bash-presentation-engine/slide-removal.js +18 -17
  273. package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +9 -9
  274. package/dist/safe-bash-presentation-engine/slides.js +19 -16
  275. package/dist/safe-bash-presentation-engine/table-operations.js +33 -32
  276. package/dist/safe-bash-presentation-engine/table-spans.js +32 -31
  277. package/dist/safe-bash-presentation-engine/tables.js +31 -30
  278. package/dist/safe-bash-presentation-engine/tags.js +16 -15
  279. package/dist/safe-bash-presentation-engine/template-bindings.js +33 -32
  280. package/dist/safe-bash-presentation-engine/template-repeat.js +40 -39
  281. package/dist/safe-bash-presentation-engine/text-fitting.js +27 -26
  282. package/dist/safe-bash-presentation-engine/text-frames.js +27 -26
  283. package/dist/safe-bash-presentation-engine/text-paragraphs.js +27 -26
  284. package/dist/safe-bash-presentation-engine/text-reading.js +11 -11
  285. package/dist/safe-bash-presentation-engine/text-replacement.js +17 -16
  286. package/dist/safe-bash-presentation-engine/text-runs.js +20 -19
  287. package/dist/safe-bash-presentation-engine/themes.js +16 -15
  288. package/dist/safe-bash-presentation-engine/transitions.js +16 -15
  289. package/dist/safe-bash-presentation-engine/validation.js +10 -9
  290. package/dist/safe-bash-presentation-engine/xml-parts.d.ts +2 -0
  291. package/dist/safe-bash-presentation-engine/xml-parts.js +23 -15
  292. package/dist/safe-bash-presentation-engine/xml-view.js +3 -3
  293. package/dist/safe-bash-presentation-engine/xml.js +3 -3
  294. package/dist/safe-bash-regex-engine/index.js +1 -1
  295. package/dist/safe-bash-regex-engine/python-glob.js +1 -1
  296. package/dist/safe-bash-regex-engine/text/regex.d.ts +19 -0
  297. package/dist/safe-bash-regex-engine/text/regex.js +1 -1
  298. package/dist/safe-bash-xml-engine/document.js +3 -3
  299. package/dist/safe-bash-xml-engine/evaluate.js +1 -1
  300. package/dist/safe-bash-xml-engine/index.d.ts +1 -0
  301. package/dist/safe-bash-xml-engine/index.js +8 -4
  302. package/dist/safe-bash-xml-engine/query.js +2 -2
  303. package/dist/safe-bash-xml-engine/recovery.d.ts +10 -0
  304. package/dist/safe-bash-xml-engine/stored-document.d.ts +1 -1
  305. package/dist/safe-bash-xml-engine/stored-document.js +1 -1
  306. package/dist/safe-bash-xml-engine/stored-evaluate.js +1 -1
  307. package/dist/spreadsheet-engine/formulas/functions/python-printf.js +56 -33
  308. package/dist/spreadsheet-format-xls/biff-encrypted-properties.d.ts +1 -1
  309. package/dist/spreadsheet-format-xls/biff-encrypted-properties.js +47 -18
  310. package/dist/spreadsheet-format-xls/biff-properties-merge.d.ts +6 -2
  311. package/dist/spreadsheet-format-xls/biff-properties-merge.js +413 -296
  312. package/dist/spreadsheet-format-xls/biff-properties-write.js +40 -23
  313. package/dist/spreadsheet-format-xls/biff-properties.js +3 -68
  314. package/dist/spreadsheet-format-xls/biff-property-index.d.ts +23 -0
  315. package/dist/spreadsheet-format-xls/biff-property-index.js +93 -0
  316. package/dist/spreadsheet-format-xls/biff-property-name.d.ts +4 -0
  317. package/dist/spreadsheet-format-xls/biff-property-name.js +114 -0
  318. package/dist/spreadsheet-format-xls/biff-property-text.d.ts +6 -0
  319. package/dist/spreadsheet-format-xls/biff-property-text.js +68 -0
  320. package/dist/spreadsheet-format-xls/biff-property-transcode.d.ts +5 -0
  321. package/dist/spreadsheet-format-xls/biff-property-transcode.js +45 -0
  322. package/package.json +6 -3
  323. package/dist/safe-bash/command-chunks/biff-YKPDH35C-MVQIWNKV.js +0 -4974
  324. package/dist/safe-bash/command-chunks/chunk-5Q22ZLNC.js +0 -127
  325. package/dist/safe-bash/command-chunks/chunk-JKLOBSMP.js +0 -56
  326. package/dist/safe-bash/command-chunks/chunk-JYTESTBS.js +0 -99
  327. package/dist/safe-bash/command-chunks/chunk-ZEGNRZV2.js +0 -333
  328. package/dist/safe-bash/command-chunks/paradox-ZWWXYY4J-JYOSWSBL.js +0 -362
  329. package/dist/spreadsheet-format-xls/biff-properties-layout.js +0 -56
@@ -1,362 +0,0 @@
1
- import {
2
- o,
3
- t
4
- } from "./chunk-5CKHD2EV.js";
5
- import {
6
- p
7
- } from "./chunk-4XWFUW5L.js";
8
- import {
9
- a
10
- } from "./chunk-Y4RGZJIG.js";
11
- import {
12
- e
13
- } from "./chunk-SB3DHPKZ.js";
14
- import "./chunk-WHWIZ2B7.js";
15
- import "./chunk-65DS4IOB.js";
16
-
17
- // packages/safe-bash-command-ssconvert/dist/chunks/paradox-ZWWXYY4J.js
18
- import { databaseDate as ye, databaseInput as Q, databaseNumber as H, databaseNumeric as ae, databaseText as X } from "../../spreadsheet-engine/codecs/database-support.js";
19
- import { encodeText as Z } from "../../spreadsheet-engine/encoding/encode.js";
20
- var ee = Uint8Array.from([178, 165, 12, 221, 56, 254, 203, 91, 12, 35, 236, 106, 149, 62, 213, 45, 44, 247, 45, 48, 234, 21, 152, 180, 95, 130, 211, 175, 244, 76, 132, 22, 116, 23, 5, 17, 172, 219, 67, 145, 156, 119, 160, 56, 190, 214, 143, 37, 177, 238, 109, 128, 55, 20, 169, 122, 87, 56, 108, 47, 166, 79, 124, 56, 113, 212, 11, 81, 246, 185, 69, 33, 29, 108, 77, 135, 110, 167, 231, 33, 13, 133, 244, 206, 58, 129, 106, 62, 215, 50, 164, 35, 172, 233, 1, 145, 176, 237, 199, 70, 18, 172, 21, 61, 255, 27, 123, 59, 186, 238, 44, 44, 104, 166, 98, 96, 237, 91, 132, 51, 97, 98, 57, 121, 212, 210, 235, 96, 184, 37, 29, 219, 255, 58, 33, 154, 176, 195, 247, 99, 82, 245, 34, 148, 249, 180, 183, 190, 159, 84, 59, 206, 225, 60, 115, 203, 234, 45, 69, 0, 157, 194, 120, 231, 150, 15, 20, 58, 164, 220, 1, 100, 141, 214, 89, 78, 57, 15, 21, 125, 240, 140, 138, 197, 120, 3, 74, 232, 251, 239, 24, 180, 82, 49, 121, 208, 142, 170, 195, 198, 206, 237, 233, 66, 90, 214, 45, 6, 199, 154, 177, 56, 98, 217, 126, 97, 116, 210, 70, 222, 203, 43, 12, 89, 11, 100, 157, 28, 79, 178, 6, 145, 155, 99, 181, 178, 169, 253, 173, 90, 56, 249, 19, 110, 157, 45, 75, 2, 249, 19, 111, 80, 203, 33, 9, 250]);
21
- var oe = Uint8Array.from([97, 167, 121, 2, 55, 52, 111, 129, 1, 194, 178, 179, 214, 77, 62, 3, 6, 96, 152, 68, 70, 104, 28, 235, 16, 74, 91, 174, 34, 72, 36, 66, 159, 85, 144, 193, 125, 47, 108, 65, 78, 130, 86, 216, 30, 50, 40, 198, 237, 188, 60, 58, 233, 135, 59, 143, 134, 8, 163, 251, 164, 98, 153, 255, 89, 185, 222, 45, 88, 147, 27, 177, 118, 43, 170, 217, 42, 172, 202, 249, 224, 183, 5, 17, 119, 169, 142, 239, 181, 187, 38, 234, 141, 24, 155, 254, 199, 248, 90, 131, 253, 46, 107, 132, 51, 250, 105, 212, 116, 191, 203, 196, 25, 150, 63, 229, 37, 242, 165, 213, 149, 243, 160, 57, 220, 228, 161, 127, 123, 73, 122, 241, 238, 247, 117, 9, 145, 103, 151, 56, 211, 137, 71, 49, 31, 44, 14, 206, 32, 204, 156, 35, 23, 146, 15, 244, 19, 100, 113, 200, 205, 61, 180, 207, 225, 80, 82, 175, 109, 39, 182, 148, 48, 4, 140, 83, 75, 210, 79, 33, 41, 106, 26, 236, 92, 126, 81, 154, 13, 133, 230, 29, 197, 136, 168, 221, 158, 246, 95, 218, 189, 110, 157, 84, 219, 94, 192, 128, 93, 184, 64, 99, 21, 18, 162, 12, 7, 173, 112, 20, 114, 22, 208, 166, 101, 53, 186, 231, 171, 252, 195, 201, 190, 11, 176, 245, 69, 226, 76, 115, 10, 54, 120, 67, 139, 138, 240, 102, 209, 0, 223, 124, 227, 232, 87, 215]);
22
- var G = Uint8Array.from([249, 8, 3, 15, 173, 82, 16, 216, 57, 135, 240, 233, 215, 188, 146, 154, 24, 83, 213, 156, 219, 212, 221, 152, 93, 112, 182, 70, 22, 191, 44, 144, 148, 179, 28, 151, 30, 116, 90, 169, 46, 180, 76, 73, 145, 67, 101, 37, 172, 143, 45, 104, 5, 225, 241, 4, 139, 123, 51, 54, 50, 161, 14, 114, 210, 39, 31, 243, 19, 236, 20, 142, 29, 129, 25, 176, 238, 13, 40, 178, 165, 186, 166, 175, 203, 33, 42, 254, 68, 64, 98, 26, 184, 208, 205, 198, 17, 0, 61, 211, 157, 224, 247, 137, 21, 106, 181, 102, 38, 168, 201, 6, 218, 158, 220, 239, 108, 134, 72, 84, 242, 2, 130, 128, 251, 36, 185, 127, 207, 7, 41, 99, 103, 189, 56, 53, 193, 141, 245, 244, 174, 92, 86, 55, 34, 136, 153, 69, 171, 120, 113, 138, 18, 62, 187, 94, 150, 202, 196, 32, 122, 126, 214, 58, 60, 118, 223, 1, 194, 85, 74, 228, 77, 217, 27, 167, 234, 71, 10, 11, 162, 88, 170, 81, 209, 65, 226, 89, 49, 200, 232, 109, 206, 35, 9, 230, 111, 192, 47, 96, 159, 231, 78, 110, 149, 160, 147, 163, 222, 248, 177, 140, 107, 119, 12, 255, 43, 75, 199, 204, 124, 195, 66, 250, 80, 164, 237, 252, 125, 115, 190, 227, 253, 52, 91, 23, 183, 48, 132, 87, 246, 131, 117, 121, 155, 235, 197, 133, 97, 79, 105, 59, 229, 100, 95, 63]);
23
- async function de(e2, t2, a2, p2, i) {
24
- i.signal.throwIfAborted();
25
- let d = e2.length - t2;
26
- if (d < 0 || d % a2) throw new e("io", "Truncated encrypted Paradox block");
27
- if (e2.length + d > (i.limits.workbookWork ?? i.limits.inputBytes * 8)) throw new e("resource-limit", "ssconvert Paradox decryption work limit exceeded");
28
- let s;
29
- i.own(() => {
30
- s?.fill(0), s = void 0;
31
- });
32
- let c = s = new Uint8Array(e2);
33
- try {
34
- let m = 0;
35
- for (let o2 = t2, h = 1; o2 < e2.length; o2 += a2, h++) for (let y = 0; y < a2 / 256; y++) {
36
- i.signal.throwIfAborted();
37
- let M = o2 + y * 256;
38
- for (let A = 0; A < 256; A++) {
39
- let S = G[A] - h & 255;
40
- c[M + A] = e2[M + S] ^ ee[A + p2 & 255] ^ oe[S + (p2 >>> 8) & 255] ^ G[S + y & 255];
41
- }
42
- ++m % 128 === 0 && (await new Promise((A) => setTimeout(A, 0)), i.signal.throwIfAborted());
43
- }
44
- return c;
45
- } catch (m) {
46
- throw c.fill(0), m;
47
- }
48
- }
49
- function _(e2, t2, a2, p2, i, d) {
50
- for (let s = 0; s < 256; s++) {
51
- let c = G[s] - d & 255;
52
- t2[c] = e2[s] ^ ee[s + a2 & 255] ^ oe[c + p2 & 255] ^ G[c + i & 255];
53
- }
54
- e2.set(t2);
55
- }
56
- async function se(e2, t2) {
57
- t2.signal.throwIfAborted();
58
- let a2 = new DataView(e2.buffer, e2.byteOffset, e2.byteLength);
59
- if (e2.length < 120) throw new TypeError("Invalid Paradox encryption layout");
60
- let p2 = a2.getUint16(2, true), i = e2[5] * 1024, d = e2.length - p2;
61
- if (p2 < 120 || d < 0 || !i || d % i) throw new TypeError("Invalid Paradox encryption layout");
62
- if (1536 + e2.length + d > (t2.limits.workbookWork ?? t2.limits.inputBytes * 8)) throw new e("resource-limit", "ssconvert Paradox encryption work limit exceeded");
63
- function s(M) {
64
- throw new e("unsupported-feature", `Unsupported ssconvert feature: encrypted Paradox ${M}`);
65
- }
66
- t2.password || s("export requires a password capability");
67
- let c;
68
- try {
69
- c = await t2.password.read(Object.freeze({ purpose: "encrypt", format: "paradox", algorithm: "paradox", revision: 12, encoding: "bytes", maxBytes: 256, signal: t2.signal, ...t2.outputFilename === void 0 ? {} : { outputFilename: t2.outputFilename } }));
70
- } catch {
71
- t2.signal.throwIfAborted(), s("password acquisition failed");
72
- }
73
- t2.signal.throwIfAborted(), c === void 0 && s("password required"), (!(c instanceof Uint8Array) || !c.length || c.length > 256 || c[0] === 0) && s("password encoding or length");
74
- let m = new Uint8Array(c), o2 = new Uint8Array(256), h = new Uint8Array(256), y = 0;
75
- try {
76
- let M = m.indexOf(0), A = M < 0 ? m.length : M;
77
- for (let f = 0; f < 256; f++) o2[f] = m[f % A];
78
- _(o2, h, o2[0], o2[1], o2[2], o2[3]);
79
- let S = o2[0] | o2[1] << 8;
80
- o2.set(m.subarray(0, A));
81
- for (let f = A; f < 256; f++) o2[f] = ee[o2[f - A]] ^ f;
82
- _(o2, h, o2[0], o2[20], o2[40], o2[255]);
83
- let D = 0, L = 0;
84
- for (let f = 0; f < 256; f += 2) D ^= o2[f], L ^= o2[f + 1];
85
- y = ((L << 8 | D || 1) << 16 | S) >>> 0, m.fill(0), o2.fill(0);
86
- let C = 0;
87
- for (let f = p2, V = 1; f < e2.length; f += i, V++) for (let b = 0; b < i / 256; b++) {
88
- t2.signal.throwIfAborted();
89
- let U = f + b * 256;
90
- _(e2.subarray(U, U + 256), h, y & 255, y >>> 8 & 255, b, V), ++C % 128 === 0 && (await new Promise(($) => setTimeout($, 0)), t2.signal.throwIfAborted());
91
- }
92
- t2.signal.throwIfAborted(), a2.setUint32(92, y, true);
93
- } finally {
94
- m.fill(0), o2.fill(0), h.fill(0), y = 0;
95
- }
96
- }
97
- var le = "?ADSI$N??L??MBFOG???T@+#Y";
98
- var ue = { S: [3, 2], I: [4, 4], A: [1, 0], C: [1, 0], N: [6, 8], $: [5, 8], L: [9, 1], D: [2, 4], "+": [22, 4], "@": [21, 8], T: [20, 4], "#": [23, 17], M: [12, 0], B: [13, 0], F: [14, 0], Y: [24, 0] };
99
- var te = [0, 2, 3, 5, 6, 8];
100
- function be(e2) {
101
- let t2 = 0;
102
- for (; t2 < e2.length && `
103
- \r\v\f`.includes(e2[t2]); ) t2++;
104
- let a2 = t2;
105
- return (e2[t2] === "+" || e2[t2] === "-") && t2++, !e2[t2] || !"0123456789".includes(e2[t2]) ? 0 : Number.parseInt(e2.slice(a2), 10) || 0;
106
- }
107
- function ce(e2) {
108
- if (e2.every((p2) => p2 === 0)) return;
109
- let t2 = new Uint8Array(e2);
110
- t2[0] = t2[0] ^ 128;
111
- let a2 = new DataView(t2.buffer);
112
- return t2.length === 1 ? a2.getInt8(0) : t2.length === 2 ? a2.getInt16(0) : a2.getInt32(0);
113
- }
114
- function pe(e2) {
115
- if (e2.every((a2) => a2 === 0)) return;
116
- let t2 = new Uint8Array(e2);
117
- if (t2[0] & 128) t2[0] = t2[0] & 127;
118
- else for (let a2 = 0; a2 < 8; a2++) t2[a2] = t2[a2] ^ 255;
119
- return new DataView(t2.buffer).getFloat64(0);
120
- }
121
- function he(e2, t2) {
122
- if (!e2[0] || (e2[0] & 63) !== t2) return;
123
- let a2 = !(e2[0] & 128), p2 = [];
124
- for (let d = 2; d < 34; d++) p2.push(String.fromCharCode(48 + ((d % 2 ? e2[d >> 1] & 15 : e2[d >> 1] >> 4) ^ (a2 ? 15 : 0))));
125
- let i = p2.slice(0, 32 - t2).join("");
126
- for (; i.length > 1 && i[0] === "0"; ) i = i.slice(1);
127
- return `${a2 ? "-" : ""}${i || "0"}.${p2.slice(32 - t2).join("")}`;
128
- }
129
- async function Me(e2, t2) {
130
- let a2 = Q(e2, t2), p2 = [], i = a2.view;
131
- async function d(w) {
132
- await t2.diagnostic?.({ code: "paradox", severity: "warning", message: w });
133
- }
134
- async function s(w) {
135
- throw await d(w), await d("Unable to get header."), new e("io", "E Error while opening Paradox file.");
136
- }
137
- if (e2.length < 88) return s("Could not read header from paradox file.");
138
- let c = e2[4], m = e2[5], o2 = e2[57];
139
- if (c > 8) return s(`Paradox file has unknown file type (${c}).`);
140
- if (m < 1 || m > 32) return s(`Paradox file has unknown table size (${m}).`);
141
- if (o2 < 3 || o2 > 15) return s(`Paradox file has unknown file version (0x${o2.toString(16).toUpperCase()}).`);
142
- let h = i.getUint16(0, true), y = i.getUint16(2, true), M = i.getUint32(6, true);
143
- if (!h) return s("Paradox file has zero record size.");
144
- if (!y) return s("Paradox file has zero header size.");
145
- let A = i.getUint16(33, true), S = i.getUint16(12, true), D = m * 1024, L = te.includes(c) && o2 >= 5 && o2 <= 12, C = L ? 120 : 88;
146
- if (y > e2.length || C + A * 2 + 4 > y) return s("Could not read header from paradox file.");
147
- let f = i.getUint32(37, true);
148
- if (f === 4278255360) {
149
- if (!L) return s("Paradox encryption header is missing.");
150
- f = i.getUint32(92, true);
151
- }
152
- f && (e2 = await de(e2, y, D, f, t2), i = new DataView(e2.buffer, e2.byteOffset, e2.byteLength));
153
- let V = L ? i.getUint16(106, true) : 0, b = [];
154
- for (let w = 0; w < A; w++, C += 2) {
155
- await a2.tick();
156
- let x = e2[C], v = e2[C + 1];
157
- b.push({ type: x, length: x === 23 ? 17 : v, precision: x === 23 ? v : 0, name: "" });
158
- }
159
- C += 4 + (te.includes(c) ? A * 4 : 0);
160
- let U = o2 === 12 ? 261 : 79;
161
- if (C + U > y) return s("Could not read header from paradox file.");
162
- let $ = e2.subarray(C, C + U), n = $.indexOf(0), I = new TextDecoder().decode($.subarray(0, n < 0 ? $.length : n)) || "Sheet1";
163
- C += U;
164
- for (let [w, x] of b.entries()) {
165
- let v = C;
166
- for (; v < y && v - C < 299 && e2[v] !== 0; ) v++;
167
- if (v >= y) return s("Could not read header from paradox file.");
168
- x.name = new TextDecoder().decode(e2.subarray(C, v)), C = v + 1;
169
- let g = `${x.name},${le[x.type] ?? "?"},${x.type === 23 ? x.precision : x.length}`, l = o(new TextDecoder().decode(new TextEncoder().encode(g).subarray(0, 29)), 0, w, t2);
170
- a2.add(p2, 0, w, l.value, { ...l, style: { ...l.style, bold: true } });
171
- }
172
- if (b.reduce((w, x) => w + x.length, 0) + (c === 1 ? 6 : 0) > h || h > D - 6) return s("Could not read record from paradox file.");
173
- if (te.includes(c)) {
174
- let w = i.getUint16(14, true), x = 0;
175
- for (let v = 0; v < S && w; v++) {
176
- await a2.tick();
177
- let g = y + (w - 1) * D;
178
- if (g + 6 > e2.length) break;
179
- x += Math.floor(i.getUint16(g + 4, true) / h) + 1, w = i.getUint16(g, true);
180
- }
181
- x !== M && await d(`Number of records counted in blocks does not match number of records in header (${x} != ${M})`);
182
- }
183
- V === 0 && await d("Target encoding could not be set.");
184
- let T = i.getUint16(14, true), z = 1, O = /* @__PURE__ */ new Set();
185
- for (let w = 0; w < S && T && z <= M; w++) {
186
- if (await a2.tick(), O.has(T) || T > S) {
187
- await d(`Could not get head of data block nr. ${T}.`);
188
- break;
189
- }
190
- O.add(T);
191
- let x = y + (T - 1) * D;
192
- if (x + 6 > e2.length) {
193
- await d(`Could not get head of data block nr. ${T}.`);
194
- break;
195
- }
196
- let v = i.getUint16(x + 4, true), g = i.getUint16(x, true);
197
- if (c !== 1 || v + h <= D - 6) for (let l = 0; l <= v && z <= M; l += h, z++) {
198
- await a2.tick();
199
- let B = x + 6 + l;
200
- if (B + h > e2.length || B + h > x + D) {
201
- await d(`Could not read record ${z - 1}.`);
202
- break;
203
- }
204
- let k = B;
205
- for (let [E, r] of b.entries()) {
206
- await a2.tick();
207
- let u = e2.subarray(k, k + r.length);
208
- k += r.length;
209
- let F, R;
210
- if (r.type === 1 && u[0]) try {
211
- F = { kind: "string", value: X(u, V) };
212
- } catch (P) {
213
- if (!(P instanceof RangeError)) throw P;
214
- }
215
- else if ([2, 3, 4, 9, 20, 22].includes(r.type)) {
216
- let P = r.type === 9 ? 1 : r.type === 3 ? 2 : 4;
217
- if (u.length < P) {
218
- await d("Could not read record from paradox file.");
219
- continue;
220
- }
221
- let q = ce(u.subarray(0, P));
222
- if (q !== void 0) if (r.type === 9) F = { kind: "boolean", value: q !== 0 };
223
- else if (r.type === 20) F = H(q / 864e5), R = "h:mm:ss";
224
- else if (r.type === 2) {
225
- let Y = q - 693594;
226
- F = H(Y <= 60 ? Y - 1 : Y), R = "m/d/yy";
227
- } else F = H(q);
228
- } else if ([5, 6, 21].includes(r.type)) {
229
- if (u.length < 8) {
230
- await d("Could not read record from paradox file.");
231
- continue;
232
- }
233
- let P = pe(u.subarray(0, 8));
234
- P !== void 0 && (F = H(r.type === 21 ? P / 864e5 - 693594 : P), R = r.type === 5 ? "$#,##0.00" : r.type === 21 ? "m/d/yy h:mm" : void 0);
235
- } else if (r.type === 23) {
236
- let P = he(u, r.precision);
237
- P !== void 0 && (F = { kind: "string", value: P });
238
- } else if (r.type === 12) {
239
- if (u.length < 10) {
240
- await d("Could not read record from paradox file.");
241
- continue;
242
- }
243
- let P = new DataView(u.buffer, u.byteOffset, u.length).getUint32(u.length - 6, true);
244
- P && P <= u.length - 10 ? F = { kind: "string", value: X(u.subarray(0, P), 28591) } : P && await d("Blob data is not contained in record and a blob file is not set.");
245
- } else r.type !== 1 && (F = { kind: "string", value: `Field type ${r.type} is not supported.` });
246
- z < 65536 && E < 256 && a2.add(p2, z, E, F, R ? { format: R } : {});
247
- }
248
- if (c === 1 && z < 65536) {
249
- for (let E = 0; E < 3; E++) {
250
- let r = ce(e2.subarray(k + 2 * E, k + 2 * E + 2));
251
- a2.add(p2, z, A + E, r === void 0 ? void 0 : H(r));
252
- }
253
- a2.add(p2, z, A + 3, H(T));
254
- }
255
- }
256
- T = g;
257
- }
258
- return { sheets: [{ id: I, name: I, size: { columns: 256, rows: 65536 }, cells: p2 }], activeSheet: I };
259
- }
260
- async function Ne(e2, t2, a2) {
261
- a2.signal.throwIfAborted();
262
- let p2 = false;
263
- for (let d of t2) for (let [s, c] of p(d)) if (s === "encryption") {
264
- if (c !== "paradox") throw new e("invalid-request", "Invalid Paradox encryption profile");
265
- p2 = true;
266
- }
267
- let i = await we(e2, a2);
268
- if (p2) try {
269
- if (!i.length) throw new e("invalid-request", "Invalid Paradox schema for encrypted export");
270
- await se(i, a2);
271
- } catch (d) {
272
- throw i.fill(0), d;
273
- }
274
- return i;
275
- }
276
- async function we(e2, t2) {
277
- let a2 = t(e2), p2 = Q(new Uint8Array(), t2), i = /* @__PURE__ */ new Map(), d = 0, s = 0, c = 1 / 0;
278
- async function m(n) {
279
- await t2.diagnostic?.({ code: "paradox", severity: "warning", message: n });
280
- }
281
- for (let n of a2.cells) await p2.tick(), i.set(`${n.row}:${n.column}`, n), (n.cachedResult ?? n.value).kind !== "blank" && (d = Math.max(d, n.row), s = Math.max(s, n.column), c = Math.min(c, n.row));
282
- let o2 = [];
283
- if (s >= t2.limits.cells) throw new e("resource-limit", "ssconvert database cells limit exceeded");
284
- for (let n = 0; n <= s; n++) {
285
- await p2.tick();
286
- let I = i.get(`0:${n}`);
287
- if (!I || (I.cachedResult ?? I.value).kind === "blank") throw new e("io", "E First line of sheet must contain database specification.");
288
- let W = await a(I, e2, t2, "preserve"), T = W.indexOf(",");
289
- if (T < 0) return await m("Field specification must be a comma separated value (Name,Type,Size,Prec)."), new Uint8Array();
290
- let z = W.slice(T + 1), O = z[0];
291
- if (!O || O === ",") return await m(`${n}. field specification ${O === "," ? "misses type" : "ended unexpectedly"}.`), new Uint8Array();
292
- let w = ue[O];
293
- if (!w) return await m(`${n}. field type '${O}' is unknown.`), new Uint8Array();
294
- let [x, v] = w, g = v, l = 0;
295
- if (!v || x === 23) {
296
- let B = z.indexOf(","), k = B < 0 ? "" : z.slice(B + 1), E = parseInt(k, 10);
297
- if (!Number.isFinite(E)) return await m("Field specification misses the column size."), new Uint8Array();
298
- let r = 0;
299
- for (; r < k.length && ` \r
300
- `.includes(k[r]); ) r++;
301
- for ((k[r] === "+" || k[r] === "-") && r++; r < k.length && "0123456789".includes(k[r]); ) r++;
302
- r < k.length && await m(`The remainder '${k.slice(r + 1)}' of the specification for field ${n + 1} is being disregarded.`), x === 23 ? l = E : g = E;
303
- }
304
- if (g < 1 || g > 255 || l < 0 || l > 32 || [12, 13, 14].includes(x) && g < 10) throw new e("unsupported-feature", "Unsupported ssconvert feature: invalid Paradox field dimensions");
305
- o2.push({ name: W.slice(0, T), type: x, length: g, precision: l });
306
- }
307
- let h = o2.reduce((n, I) => n + I.length, 0), y = h < 80 ? 2 : h < 140 ? 3 : 16;
308
- if (h > y * 1024 - 6) throw new e("unsupported-feature", "Unsupported ssconvert feature: Paradox record exceeds block size");
309
- let M = o2.map((n) => Z(n.name + "\0", "UTF-8", false, t2)), A = 120 + o2.length * 10 + 269 + M.reduce((n, I) => n + I.length, 0) + 8, S = (Math.floor(A / 2048) + 1) * 2048, D = y * 1024, L = Math.floor((D - 6) / h), C = Math.max(0, d - (c === 1 / 0 ? 0 : c)), f = Math.ceil(C / L), V = S + f * D;
310
- if (f > 65535 || S > 65535 || h > 65535 || V > t2.limits.outputBytes) throw new e("resource-limit", "ssconvert output bytes limit exceeded");
311
- let b = new Uint8Array(V), U = new DataView(b.buffer);
312
- U.setUint16(0, h, true), U.setUint16(2, S, true), b[4] = 2, b[5] = y, U.setUint32(6, C, true);
313
- for (let n of [10, 12, 16, 58]) U.setUint16(n, f, true);
314
- U.setUint16(14, f ? 1 : 0, true), U.setUint16(33, o2.length, true), U.setUint32(37, 4278255360, true), b[45] = 2, b[46] = 1, b[57] = 12, b[62] = 31, b[63] = 15, b[86] = 32, U.setUint16(88, 268, true), U.setUint16(90, 268, true), U.setUint32(96, Math.floor((t2.clock?.now() ?? 0) / 1e3), true), U.setUint16(100, o2.length + 1, true), U.setUint16(106, 1252, true), b[108] = 1, b[109] = 1;
315
- let $ = 120;
316
- for (let n of o2) b[$++] = n.type, b[$++] = n.type === 23 ? n.precision : n.length;
317
- $ += 4 + o2.length * 4, b.set(new TextEncoder().encode(a2.name).subarray(0, 260), $), $ += 261;
318
- for (let n of M) b.set(n, $), $ += n.length;
319
- for (let n = 0; n < o2.length; n++) U.setUint16($, n + 1, true), $ += 2;
320
- b.set(new TextEncoder().encode("ANSIINTL"), $), $ += 9, U.setUint16(81, $, true);
321
- for (let n = 0; n < f; n++) {
322
- let I = S + n * D, W = Math.min(L, C - n * L);
323
- U.setUint16(I, n + 1 < f ? n + 2 : 0, true), U.setUint16(I + 2, n, true), U.setInt16(I + 4, (W - 1) * h, true);
324
- for (let T = 0; T < W; T++) {
325
- let z = (c === 1 / 0 ? 0 : c) + 1 + n * L + T, O = I + 6 + T * h;
326
- for (let [w, x] of o2.entries()) {
327
- await p2.tick();
328
- let v = i.get(`${z}:${w}`), g = v?.cachedResult ?? v?.value, l = b.subarray(O, O + x.length), B = new DataView(l.buffer, l.byteOffset, l.length);
329
- if (O += x.length, !g || g.kind === "blank") continue;
330
- let k = await a(v, e2, t2, "preserve"), E = [2, 3, 4, 22].includes(x.type), r = g.kind === "number" ? g.value : g.kind === "boolean" ? Number(g.value) : g.kind === "string" ? E ? be(g.value) : ae(g.value) : 0;
331
- if ([2, 3, 4, 9, 20, 22].includes(x.type)) x.type === 2 && (r = Math.trunc(r), r += (r < 60 ? 1 : 0) + 693594), x.type === 20 && (r = Math.trunc((r - Math.trunc(r)) * 864e5)), x.type === 9 ? B.setInt8(0, g.kind === "string" ? +(g.value.toLowerCase() === "true") : +(r !== 0)) : x.type === 3 ? B.setInt16(0, Math.trunc(r)) : B.setInt32(0, Math.trunc(r)), l[0] = l[0] ^ 128;
332
- else if ([5, 6, 21].includes(x.type)) if (x.type === 21 && (r = (r + (r < 60 ? 1 : 0) + 693594) * 864e5), B.setFloat64(0, r), r >= 0) l[0] = l[0] | 128;
333
- else for (let u = 0; u < 8; u++) l[u] = l[u] ^ 255;
334
- else if (x.type === 1) {
335
- let u = new TextEncoder().encode(k).length;
336
- u > x.length && await m(`Field ${w + 1} in line ${z + 1} has possibly been cut off. Data has ${u} ${u === 1 ? "character" : "characters"}.`);
337
- try {
338
- l.set(Z(k, "CP1252", false, t2).subarray(0, x.length));
339
- } catch (F) {
340
- if (!(F instanceof e) || F.code === "resource-limit") throw F;
341
- }
342
- } else if (x.type === 23) {
343
- let u = k.startsWith("-"), F = u ? 15 : 0, R = k.indexOf(".");
344
- l.fill(u ? 255 : 0), l[0] = (u ? 64 : 192) + x.precision;
345
- let P = R < 0 ? k.slice(0, x.precision) : k.slice(0, R), q = R < 0 ? "" : k.slice(R + 1), fe = (x.precision === 32 ? "" : P.split("").filter((j) => "0123456789".includes(j)).join("").padStart(32 - x.precision, "0").slice(-(32 - x.precision))) + q.padEnd(x.precision, "0").slice(0, x.precision);
346
- for (let j = 0; j < 32; j++) {
347
- let xe = (Number(fe[j]) || 0) ^ F, J = j + 2 >> 1;
348
- l[J] = j % 2 ? l[J] & 240 | xe : l[J] & 15 | xe << 4;
349
- }
350
- } else if (x.type === 12 || x.type === 14) {
351
- let u = new TextEncoder().encode(k);
352
- u.length > l.length - 10 ? (await m("Paradox database has no blob file."), await m(`Field ${w + 1} in row ${z + 1} could not be written.`)) : (l.set(u), B.setUint32(l.length - 6, u.length, true));
353
- }
354
- }
355
- }
356
- }
357
- return b;
358
- }
359
- export {
360
- Me as readParadox,
361
- Ne as writeParadox
362
- };
@@ -1,56 +0,0 @@
1
- import { Binary, invalidBiff } from "./biff-binary.js";
2
- /** LibreOffice oleprops.cxx:943/1160: absolute sections, relative property values.
3
- * Unknown section bodies remain opaque; callers choose which values to inspect. */
4
- export function readBiffPropertySections(bytes, admit, accountWork) {
5
- const file = new Binary(bytes);
6
- file.check(0, 28);
7
- if (file.u16(0) !== 0xfffe || file.u16(2) > 1)
8
- invalidBiff("invalid property-set header");
9
- const count = file.u32(24), tableEnd = 28 + count * 20;
10
- file.check(28, count * 20);
11
- admit(count);
12
- const sections = [];
13
- for (let i = 0; i < count; i++) {
14
- const at = 28 + i * 20, offset = file.u32(at + 16);
15
- if (offset < tableEnd || offset % 4)
16
- invalidBiff("invalid property section offset");
17
- // Native libgsf byte-string dictionaries and final values need not end on a word boundary.
18
- const size = file.u32(offset);
19
- if (size < 8)
20
- invalidBiff("invalid property section size");
21
- file.check(offset, size);
22
- const guid = Array.from(file.slice(at, 16), byte => byte.toString(16).padStart(2, "0")).join("");
23
- sections.push({ guid, offset, end: offset + size });
24
- }
25
- accountWork(count * Math.ceil(Math.log2(count + 1)));
26
- sections.sort((a, b) => a.offset - b.offset);
27
- for (let i = 1; i < sections.length; i++)
28
- if (sections[i].offset < sections[i - 1].end)
29
- invalidBiff("overlapping property sections");
30
- return sections;
31
- }
32
- export function readBiffPropertyValues(section, admit, accountWork) {
33
- const propertyCount = section.u32(4);
34
- section.check(8, propertyCount * 8);
35
- admit(propertyCount);
36
- const pointers = [], ids = new Set();
37
- for (let i = 0; i < propertyCount; i++) {
38
- const id = section.u32(8 + i * 8), at = section.u32(12 + i * 8);
39
- if (at < 8 + propertyCount * 8 || at > section.bytes.length - 4)
40
- invalidBiff("invalid property offset");
41
- if (ids.has(id))
42
- invalidBiff("duplicate property ID");
43
- ids.add(id);
44
- pointers.push({ id, at });
45
- }
46
- accountWork(propertyCount * Math.ceil(Math.log2(propertyCount + 1)));
47
- pointers.sort((a, b) => a.at - b.at);
48
- const values = new Map();
49
- for (let i = 0; i < pointers.length; i++) {
50
- const { id, at } = pointers[i], next = pointers[i + 1]?.at ?? section.bytes.length;
51
- if (next === at)
52
- invalidBiff("overlapping property values");
53
- values.set(id, new Binary(section.slice(at, next - at)));
54
- }
55
- return values;
56
- }