@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
@@ -16,8 +16,8 @@ import {
16
16
  } from "./chunk-VXIC7SS3.js";
17
17
 
18
18
  // packages/safe-bash-command-diff/src/diff.ts
19
- import { closeDocumentResources as closeDocumentResources2 } from "../../safe-bash-diff-engine/document.js";
20
- import { PagedStorage as PagedStorage3 } from "@poe-platform/safe-fs/storage";
19
+ import { closeDocumentResources as closeDocumentResources3 } from "../../safe-bash-diff-engine/document.js";
20
+ import { PagedStorage as PagedStorage4 } from "@poe-platform/safe-fs/storage";
21
21
 
22
22
  // packages/safe-bash-command-diff/src/indexed.ts
23
23
  import { writeDiagnostic } from "../../safe-bash-contracts/escaping.js";
@@ -156,6 +156,7 @@ async function renderEd(next, count, group, budget, append) {
156
156
  for (let index = count - 1; index >= 0; index--) {
157
157
  const change = await group(index);
158
158
  budget.hunk();
159
+ if (change.ignored) continue;
159
160
  const start = change.oldStart + 1, end = change.oldStart + change.oldCount;
160
161
  const range2 = change.oldCount > 1 ? `${start},${end}` : `${start}`;
161
162
  await append(encodeBytes2(`${change.oldCount ? range2 : change.oldStart}${change.oldCount ? change.newCount ? "c" : "d" : "a"}
@@ -219,26 +220,26 @@ async function renderSideBySide(old, next, count, group, options, budget, append
219
220
  return (await document.data.read(8 + bounds.end - 1, 1))[0] === 10;
220
221
  };
221
222
  const row = async (left, right, common) => {
222
- if (common && options.suppressCommon) return;
223
+ if (common && left !== void 0 && right !== void 0 && options.suppressCommon) return;
223
224
  if (options.width > budget.limits.maxOutputBytes) throw new ToolError("output byte limit exceeded");
224
225
  const leftLf = await terminated(old, left), rightLf = await terminated(next, right);
225
- const marker = common ? " " : left === void 0 ? ">" : right === void 0 ? "<" : !leftLf && rightLf ? "\\" : leftLf && !rightLf ? "/" : "|";
226
+ const marker = common ? left === void 0 ? ")" : right === void 0 ? "(" : " " : left === void 0 ? ">" : right === void 0 ? "<" : !leftLf && rightLf ? "\\" : leftLf && !rightLf ? "/" : "|";
226
227
  const colored = options.color && (marker === "<" || marker === ">");
227
228
  if (colored) await append(encodeBytes2(`\x1B[${marker === "<" ? 31 : 32}m`));
228
229
  const column = left === void 0 ? 0 : await clipped(old, left, half, options.expand, utf8, append);
229
- if (common && options.leftColumn) {
230
+ if (marker === " " && options.leftColumn) {
230
231
  await padding(column, markerColumn);
231
232
  await append(encodeBytes2("(" + (leftLf ? "\n" : "")));
232
233
  return;
233
234
  }
234
- if (!common) {
235
+ if (marker !== " ") {
235
236
  await padding(column, markerColumn);
236
237
  await append(encodeBytes2(marker));
237
238
  }
238
239
  if (right !== void 0) {
239
240
  const bounds = await next.line(right);
240
241
  if (bounds.end - bounds.start > Number(rightLf)) {
241
- await padding(common ? column : markerColumn + 1, rightStart);
242
+ await padding(marker === " " ? column : markerColumn + 1, rightStart);
242
243
  await clipped(next, right, half, options.expand, utf8, append);
243
244
  }
244
245
  }
@@ -246,9 +247,20 @@ async function renderSideBySide(old, next, count, group, options, budget, append
246
247
  if (colored) await append(encodeBytes2("\x1B[0m"));
247
248
  };
248
249
  let oldPosition = 0, newPosition = 0;
249
- for (let index = 0; index < count; index++) {
250
- const change = await group(index);
251
- while (oldPosition < change.oldStart) await row(oldPosition++, newPosition++, true);
250
+ for (let index = 0; index <= count; ) {
251
+ let change;
252
+ while (index < count) {
253
+ const candidate = await group(index++);
254
+ if (!candidate.ignored) {
255
+ change = candidate;
256
+ break;
257
+ }
258
+ }
259
+ const oldEnd = change?.oldStart ?? old.length, newEnd = change?.newStart ?? next.length;
260
+ while (oldPosition < oldEnd || newPosition < newEnd) {
261
+ await row(oldPosition < oldEnd ? oldPosition++ : void 0, newPosition < newEnd ? newPosition++ : void 0, true);
262
+ }
263
+ if (!change) break;
252
264
  budget.hunk();
253
265
  for (let offset = 0; offset < Math.max(change.oldCount, change.newCount); offset++) {
254
266
  await row(
@@ -260,12 +272,85 @@ async function renderSideBySide(old, next, count, group, options, budget, append
260
272
  oldPosition = change.oldStart + change.oldCount;
261
273
  newPosition = change.newStart + change.newCount;
262
274
  }
263
- while (oldPosition < old.length) await row(oldPosition++, newPosition++, true);
264
275
  }
265
276
 
266
277
  // packages/safe-bash-command-diff/src/indexed.ts
267
- import { PagedStorage as PagedStorage2 } from "@poe-platform/safe-fs/storage";
268
- import { IndexedDocument, closeDocumentResources } from "../../safe-bash-diff-engine/document.js";
278
+ import { encodeBytes as encodeBytes3 } from "../../safe-bash-io-engine/byte-encoding.js";
279
+
280
+ // packages/safe-bash-command-diff/src/indexed-pattern.ts
281
+ import { IntegerTable, PagedStorage as PagedStorage2, PagedStorageCache } from "@poe-platform/safe-fs/storage";
282
+ import { closeDocumentResources } from "../../safe-bash-diff-engine/document.js";
283
+ async function matchesPattern(pattern, document, start, end, utf8, budget) {
284
+ if (await pattern.supportsStreamTest(budget)) return pattern.testStream(documentText(document, start, end, utf8), budget);
285
+ const cache = new PagedStorageCache(16);
286
+ const text = new PagedStorage2(budget.context, 16, cache);
287
+ const records = new PagedStorage2(budget.context, 16, cache);
288
+ const index = new PagedStorage2(budget.context, 16, cache);
289
+ const hashes = new IntegerTable(index, 256);
290
+ let length = 0, cursor = 8, tail = 8;
291
+ const record = async (offset) => {
292
+ const header = await records.read(offset, 16);
293
+ const size = new DataView(header.buffer).getFloat64(8, true);
294
+ const result = new Uint8Array(size);
295
+ for (let at = 0; at < size; at += 16384) result.set(await records.read(offset + at, Math.min(16384, size - at)), at);
296
+ return result;
297
+ };
298
+ try {
299
+ for await (const chunk of documentText(document, start, end, utf8)) {
300
+ for (let at = 0; at < chunk.length; at += 8192) {
301
+ const count = Math.min(8192, chunk.length - at), bytes = new Uint8Array(count * 2), view = new DataView(bytes.buffer);
302
+ for (let unit = 0; unit < count; unit++) view.setUint16(unit * 2, chunk.charCodeAt(at + unit), true);
303
+ await text.append(bytes);
304
+ length += count;
305
+ budget.step(count);
306
+ const pause = budget.checkpoint();
307
+ if (pause) await pause;
308
+ }
309
+ }
310
+ return await pattern.testStored({
311
+ length,
312
+ async read(start2, count) {
313
+ const bytes = await text.read(8 + start2 * 2, count * 2), view = new DataView(bytes.buffer);
314
+ let result = "";
315
+ for (let at = 0; at < count; at++) result += String.fromCharCode(view.getUint16(at * 2, true));
316
+ return result;
317
+ },
318
+ async enqueue(state) {
319
+ const bytes = new Uint8Array(16 + state.length * 8), view = new DataView(bytes.buffer);
320
+ view.setFloat64(8, bytes.length, true);
321
+ for (let at = 0; at < state.length; at++) view.setFloat64(16 + at * 8, state[at], true);
322
+ let hash = 2166136261;
323
+ for (let at = 8; at < bytes.length; at++) hash = Math.imul(hash ^ bytes[at], 16777619) >>> 0;
324
+ const head = Number(await hashes.get(BigInt(hash)) ?? 0n);
325
+ for (let offset2 = head; offset2; ) {
326
+ const previous = await record(offset2);
327
+ budget.step(previous.length);
328
+ const pause = budget.checkpoint();
329
+ if (pause) await pause;
330
+ if (previous.length === bytes.length && previous.subarray(8).every((byte, at) => byte === bytes[at + 8])) return;
331
+ offset2 = new DataView(previous.buffer).getFloat64(0, true);
332
+ }
333
+ view.setFloat64(0, head, true);
334
+ const offset = await records.append(bytes);
335
+ tail = offset + bytes.length;
336
+ await hashes.set(BigInt(hash), BigInt(offset));
337
+ budget.step(bytes.length);
338
+ },
339
+ async dequeue() {
340
+ if (cursor === tail) return void 0;
341
+ const bytes = await record(cursor), view = new DataView(bytes.buffer);
342
+ cursor += bytes.length;
343
+ return Array.from({ length: (bytes.length - 16) / 8 }, (_, at) => view.getFloat64(16 + at * 8, true));
344
+ }
345
+ }, budget);
346
+ } finally {
347
+ await closeDocumentResources([text, records, index]);
348
+ }
349
+ }
350
+
351
+ // packages/safe-bash-command-diff/src/indexed.ts
352
+ import { PagedStorage as PagedStorage3 } from "@poe-platform/safe-fs/storage";
353
+ import { IndexedDocument, closeDocumentResources as closeDocumentResources2 } from "../../safe-bash-diff-engine/document.js";
269
354
  import { ToolError as ToolError2 } from "../../safe-bash-diff-engine/shared.js";
270
355
  var encoder = new TextEncoder();
271
356
  async function buildGroups(old, next, matrix, groups, budget, admitLines = true) {
@@ -304,7 +389,7 @@ async function buildGroups(old, next, matrix, groups, budget, admitLines = true)
304
389
  let group;
305
390
  const flush = async () => {
306
391
  if (!group) return;
307
- const bytes = new Uint8Array(32), view = new DataView(bytes.buffer);
392
+ const bytes = new Uint8Array(40), view = new DataView(bytes.buffer);
308
393
  view.setFloat64(0, group.oldStart, true);
309
394
  view.setFloat64(8, group.newStart, true);
310
395
  view.setFloat64(16, group.oldCount, true);
@@ -338,6 +423,16 @@ async function buildGroups(old, next, matrix, groups, budget, admitLines = true)
338
423
  function range(start, count, unified = false) {
339
424
  return count === 0 ? `${start}${unified ? ",0" : ""}` : count === 1 ? `${start + 1}` : `${start + 1},${unified ? count : start + count}`;
340
425
  }
426
+ async function blank(document, position, whitespace) {
427
+ const bounds = await document.line(position);
428
+ let end = bounds.end;
429
+ if ((await document.data.read(8 + end - 1, 1))[0] === 10) end--;
430
+ if (!whitespace) return bounds.start === end;
431
+ for await (const bytes of document.range(bounds.start, end)) {
432
+ for (const byte of bytes) if (byte !== 32 && byte !== 9 && byte !== 11 && byte !== 12 && byte !== 13) return false;
433
+ }
434
+ return true;
435
+ }
341
436
  async function line(document, position, prefix, output, color) {
342
437
  const { append, options, utf8 } = output;
343
438
  const bounds = await document.line(position);
@@ -364,15 +459,15 @@ async function indexedDiff(budget, options, left, right, nested, append, sources
364
459
  else await document.load(input);
365
460
  };
366
461
  const keys = [];
367
- const matrix = new PagedStorage2(budget.context, 8), groups = new PagedStorage2(budget.context, 16);
462
+ const matrix = new PagedStorage3(budget.context, 8), groups = new PagedStorage3(budget.context, 16);
368
463
  budget.context.registerCleanup?.(() => matrix.close());
369
464
  budget.context.registerCleanup?.(() => groups.close());
370
465
  const text = async (value, color) => {
371
466
  await append(encoder.encode(color === void 0 ? value : colorText(value, color, options)));
372
467
  };
373
468
  const group = async (index) => {
374
- const bytes = await groups.read(8 + index * 32, 32), view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
375
- return { oldStart: view.getFloat64(0, true), newStart: view.getFloat64(8, true), oldCount: view.getFloat64(16, true), newCount: view.getFloat64(24, true) };
469
+ const bytes = await groups.read(8 + index * 40, 40), view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
470
+ return { oldStart: view.getFloat64(0, true), newStart: view.getFloat64(8, true), oldCount: view.getFloat64(16, true), newCount: view.getFloat64(24, true), ignored: !!view.getUint8(32) };
376
471
  };
377
472
  try {
378
473
  await load(old, sources.left);
@@ -428,7 +523,7 @@ async function indexedDiff(budget, options, left, right, nested, append, sources
428
523
  await oldKeys.load(comparisonSource(old, options, utf8));
429
524
  await nextKeys.load(comparisonSource(next, options, utf8));
430
525
  }
431
- if (options.brief) {
526
+ if (options.brief && !options.ignoreBlank && !options.ignorePatterns.length) {
432
527
  let same = oldKeys.size === nextKeys.size && oldKeys.length === nextKeys.length;
433
528
  for (let index = 0; same && index < oldKeys.length; index++) same = await oldKeys.equal(index, nextKeys, index);
434
529
  if (!same) {
@@ -441,20 +536,53 @@ async function indexedDiff(budget, options, left, right, nested, append, sources
441
536
  }
442
537
  const render = { append, options, utf8: old.validUtf8 && next.validUtf8 };
443
538
  const count = sameRaw ? 0 : await buildGroups(oldKeys, nextKeys, matrix, groups, budget, !counted);
539
+ let visible = count;
540
+ if (options.ignoreBlank || options.ignorePatterns.length) for (let index = 0; index < count; index++) {
541
+ const change = await group(index);
542
+ let ignored = true;
543
+ for (const [document, start, length] of [[old, change.oldStart, change.oldCount], [next, change.newStart, change.newCount]]) {
544
+ for (let row = 0; row < length; row++) {
545
+ budget.step();
546
+ let matches = options.ignoreBlank && await blank(document, start + row, options.whitespace !== "exact");
547
+ const bounds = await document.line(start + row);
548
+ const bodyEnd = bounds.end - Number((await document.data.read(8 + bounds.end - 1, 1))[0] === 10);
549
+ for (const pattern of options.ignorePatterns) {
550
+ if (await matchesPattern(pattern, document, bounds.start, bodyEnd, render.utf8, budget)) {
551
+ matches = true;
552
+ break;
553
+ }
554
+ }
555
+ ignored &&= matches;
556
+ const checkpoint = budget.checkpoint();
557
+ if (checkpoint) await checkpoint;
558
+ }
559
+ }
560
+ if (ignored) {
561
+ visible--;
562
+ await groups.write(8 + index * 40 + 32, new Uint8Array([1]));
563
+ }
564
+ }
565
+ if (options.brief) {
566
+ if (visible) await text(`Files ${options.labels[0] ?? left} and ${options.labels[1] ?? right} differ
567
+ `);
568
+ else if (options.reportSame && !trouble) await text(`Files ${options.labels[0] ?? left} and ${options.labels[1] ?? right} are identical
569
+ `);
570
+ return { different: visible > 0, trouble };
571
+ }
444
572
  if (options.format === "side") {
445
- if (nested && (count || !options.suppressCommon)) await text(["diff", ...options.optionArgs.map(quoteDiffArgument), quoteDiffName(options.labels[0] ?? left), quoteDiffName(options.labels[1] ?? right)].join(" ") + "\n");
446
- await renderSideBySide(old, next, count, group, options, budget, append);
447
- if (!count && options.reportSame) await text(`Files ${options.labels[0] ?? left} and ${options.labels[1] ?? right} are identical
573
+ if (nested && (visible || !options.suppressCommon)) await text(["diff", ...options.optionArgs.map(quoteDiffArgument), quoteDiffName(options.labels[0] ?? left), quoteDiffName(options.labels[1] ?? right)].join(" ") + "\n");
574
+ if (!nested || visible || !options.suppressCommon) await renderSideBySide(old, next, count, group, options, budget, append);
575
+ if (!visible && options.reportSame && !trouble) await text(`Files ${options.labels[0] ?? left} and ${options.labels[1] ?? right} are identical
448
576
  `);
449
- return { different: count > 0, trouble };
577
+ return { different: visible > 0, trouble };
450
578
  }
451
- if (!count) {
579
+ if (!visible && (options.format !== "ifdef" || !count)) {
452
580
  if (options.format === "ifdef") for await (const bytes of old.range(0, old.size)) await append(bytes);
453
581
  if (options.reportSame && !trouble) await text(`Files ${options.labels[0] ?? left} and ${options.labels[1] ?? right} are identical
454
582
  `);
455
583
  return { different: false, trouble };
456
584
  }
457
- if (nested) await text(["diff", ...options.optionArgs.map(quoteDiffArgument), quoteDiffName(options.labels[0] ?? left), quoteDiffName(options.labels[1] ?? right)].join(" ") + "\n");
585
+ if (nested && visible) await text(["diff", ...options.optionArgs.map(quoteDiffArgument), quoteDiffName(options.labels[0] ?? left), quoteDiffName(options.labels[1] ?? right)].join(" ") + "\n");
458
586
  if (options.format === "ed") {
459
587
  await renderEd(next, count, group, budget, append);
460
588
  return { different: true, trouble };
@@ -463,6 +591,7 @@ async function indexedDiff(budget, options, left, right, nested, append, sources
463
591
  for (let index = 0; index < count; index++) {
464
592
  const change = await group(index);
465
593
  budget.hunk();
594
+ if (change.ignored) continue;
466
595
  await text(`${range(change.oldStart, change.oldCount)}${change.oldCount === 0 ? "a" : change.newCount === 0 ? "d" : "c"}${range(change.newStart, change.newCount)}
467
596
  `, 36);
468
597
  for (let row = 0; row < change.oldCount; row++) await line(old, change.oldStart + row, "< ", render, 31);
@@ -480,6 +609,13 @@ async function indexedDiff(budget, options, left, right, nested, append, sources
480
609
  const oldEnd = change.oldCount ? (await old.line(change.oldStart + change.oldCount - 1)).end : oldStart;
481
610
  const newStart = change.newStart < next.length ? (await next.line(change.newStart)).start : next.size;
482
611
  const newEnd = change.newCount ? (await next.line(change.newStart + change.newCount - 1)).end : newStart;
612
+ if (change.ignored) {
613
+ if (options.format === "ifdef") {
614
+ for await (const bytes of old.range(position, oldEnd)) await append(bytes);
615
+ position = oldEnd;
616
+ }
617
+ continue;
618
+ }
483
619
  if (options.format === "rcs") {
484
620
  if (change.oldCount) await text(`d${change.oldStart + 1} ${change.oldCount}
485
621
  `);
@@ -502,7 +638,9 @@ async function indexedDiff(budget, options, left, right, nested, append, sources
502
638
  }
503
639
  }
504
640
  if (options.format === "ifdef") for await (const bytes of old.range(position, old.size)) await append(bytes);
505
- return { different: true, trouble };
641
+ if (!visible && options.reportSame && !trouble) await text(`Files ${options.labels[0] ?? left} and ${options.labels[1] ?? right} are identical
642
+ `);
643
+ return { different: visible > 0, trouble };
506
644
  }
507
645
  const unified = options.format === "unified";
508
646
  await text(`${unified ? "---" : "***"} ${options.labels[0] ?? quoteDiffName(sources.left === void 0 ? "/dev/null" : left)}
@@ -511,20 +649,49 @@ async function indexedDiff(budget, options, left, right, nested, append, sources
511
649
  `, 1);
512
650
  for (let index = 0; index < count; ) {
513
651
  const first = await group(index);
514
- let last = first, end = index + 1;
652
+ let last = first, end = index + 1, changed = !first.ignored;
515
653
  while (end < count) {
516
654
  const following = await group(end);
517
- if (following.oldStart - last.oldStart - last.oldCount > 2 * options.context) break;
655
+ const gap = following.oldStart - last.oldStart - last.oldCount;
656
+ if (gap > 2 * options.context || following.ignored && gap >= options.context) break;
657
+ changed ||= !following.ignored;
518
658
  last = following;
519
659
  end++;
520
660
  }
661
+ if (!changed) {
662
+ index = end;
663
+ continue;
664
+ }
521
665
  const lead = Math.min(options.context, first.oldStart);
522
666
  const trail = Math.min(options.context, old.length - last.oldStart - last.oldCount);
523
667
  const oldStart = first.oldStart - lead, newStart = first.newStart - lead;
524
668
  const oldEnd = last.oldStart + last.oldCount + trail, newEnd = last.newStart + last.newCount + trail;
525
669
  budget.hunk();
670
+ let heading = "";
671
+ for (let position = oldStart - 1; options.functions.length && position >= 0; position--) {
672
+ const bounds = await old.line(position);
673
+ let matches = false;
674
+ for (const pattern of options.functions) {
675
+ if (await matchesPattern(pattern, old, bounds.start, bounds.end, render.utf8, budget)) {
676
+ matches = true;
677
+ break;
678
+ }
679
+ }
680
+ if (matches) {
681
+ const bodyEnd = bounds.end - Number((await old.data.read(8 + bounds.end - 1, 1))[0] === 10);
682
+ for await (const block of documentText(old, bounds.start, bodyEnd, render.utf8)) {
683
+ heading += block.slice(0, 40 - heading.length);
684
+ if (heading.length === 40) break;
685
+ }
686
+ break;
687
+ }
688
+ budget.step();
689
+ const pause = budget.checkpoint();
690
+ if (pause) await pause;
691
+ }
526
692
  if (unified) {
527
693
  await text(`@@ -${range(oldStart, oldEnd - oldStart, true)} +${range(newStart, newEnd - newStart, true)} @@`, 36);
694
+ if (heading) await append(encodeBytes3(` ${heading}`, render.utf8 ? "utf8" : "latin1"));
528
695
  await text("\n");
529
696
  let position = oldStart;
530
697
  for (let at = index; at < end; at++) {
@@ -535,18 +702,20 @@ async function indexedDiff(budget, options, left, right, nested, append, sources
535
702
  }
536
703
  while (position < oldEnd) await line(old, position++, " ", render);
537
704
  } else {
538
- await text("***************\n");
705
+ await text("***************");
706
+ if (heading) await append(encodeBytes3(` ${heading}`, render.utf8 ? "utf8" : "latin1"));
707
+ await text("\n");
539
708
  await text(`*** ${range(oldStart, oldEnd - oldStart)} ****
540
709
  `, 36);
541
710
  for (const side of ["old", "new"]) {
542
711
  if (side === "new") await text(`--- ${range(newStart, newEnd - newStart)} ----
543
712
  `, 36);
544
- let changed = false;
713
+ let changed2 = false;
545
714
  for (let at = index; at < end; at++) {
546
715
  const change = await group(at);
547
- changed ||= (side === "old" ? change.oldCount : change.newCount) > 0;
716
+ changed2 ||= (side === "old" ? change.oldCount : change.newCount) > 0;
548
717
  }
549
- if (!changed) continue;
718
+ if (!changed2) continue;
550
719
  const document = side === "old" ? old : next;
551
720
  let position = side === "old" ? oldStart : newStart;
552
721
  for (let at = index; at < end; at++) {
@@ -564,7 +733,7 @@ async function indexedDiff(budget, options, left, right, nested, append, sources
564
733
  }
565
734
  return { different: true, trouble };
566
735
  } finally {
567
- await closeDocumentResources([
736
+ await closeDocumentResources2([
568
737
  ...rawOld === stdin.document ? [] : [rawOld],
569
738
  ...rawNext === stdin.document ? [] : [rawNext],
570
739
  ...keys,
@@ -638,7 +807,7 @@ import { basename, createCommandArguments, isFsError, writeBytes } from "../../s
638
807
  import { publicDiagnosticMessage } from "../../safe-bash-contracts/diagnostics.js";
639
808
  import { writeDiagnostic as writeDiagnostic2 } from "../../safe-bash-contracts/escaping.js";
640
809
  import { ToolError as ToolError3, definition, host, inspect, sameIdentity } from "../../safe-bash-diff-engine/shared.js";
641
- import { byteLength, decodeBytes as decodeBytes2, encodeBytes as encodeBytes3 } from "../../safe-bash-io-engine/byte-encoding.js";
810
+ import { byteLength, decodeBytes as decodeBytes2, encodeBytes as encodeBytes4 } from "../../safe-bash-io-engine/byte-encoding.js";
642
811
  import { pathOf } from "../../safe-bash-io-engine/internal.js";
643
812
  import { Pattern } from "../../safe-bash-regex-engine/text/regex.js";
644
813
  async function comparisonLines(lines, options, budget) {
@@ -804,13 +973,13 @@ function childPath(directory, name) {
804
973
  return `${directory.slice(0, end)}/${name}`;
805
974
  }
806
975
  async function run(context, budget) {
807
- const storage = new PagedStorage3(context, 32);
976
+ const storage = new PagedStorage4(context, 32);
808
977
  const stdin = {};
809
978
  context.registerCleanup?.(() => storage.close());
810
979
  try {
811
980
  return await runStored(context, budget, storage, stdin);
812
981
  } finally {
813
- await closeDocumentResources2([storage, ...stdin.document ? [stdin.document] : []]);
982
+ await closeDocumentResources3([storage, ...stdin.document ? [stdin.document] : []]);
814
983
  }
815
984
  }
816
985
  async function runStored(context, budget, storage, stdinDocument) {
@@ -824,7 +993,7 @@ async function runStored(context, budget, storage, stdinDocument) {
824
993
  outputSize += bytes.length;
825
994
  };
826
995
  const append = async (text) => {
827
- await appendBytes(encodeBytes3(text, encoding));
996
+ await appendBytes(encodeBytes4(text, encoding));
828
997
  };
829
998
  let different = false;
830
999
  let trouble = false;
@@ -943,7 +1112,7 @@ async function runStored(context, budget, storage, stdinDocument) {
943
1112
  budget.step();
944
1113
  if (!entry.name || entry.name === "." || entry.name === ".." || /[/\\\0\r\n\t]/u.test(entry.name)) throw new ToolError3("unsafe directory entry name");
945
1114
  let excluded = false;
946
- const byteName = exclusions.length ? decodeBytes2(encodeBytes3(entry.name), "latin1") : entry.name;
1115
+ const byteName = exclusions.length ? decodeBytes2(encodeBytes4(entry.name), "latin1") : entry.name;
947
1116
  for (const pattern of exclusions) if (await pattern.find(byteName, budget)) {
948
1117
  excluded = true;
949
1118
  break;
@@ -1013,7 +1182,14 @@ async function runStored(context, budget, storage, stdinDocument) {
1013
1182
  const capabilities = await host(context, async () => await context.fs.capabilitiesFor?.(pathOf(context, path), { signal: context.signal }) ?? context.fs.capabilities);
1014
1183
  return capabilities.streamingRead !== false;
1015
1184
  };
1016
- if (!options.ignoreBlank && options.ignorePatterns.length === 0 && !options.functions.length && await canIndex(left, leftStat) && await canIndex(right, rightStat)) {
1185
+ let storedPatterns = true;
1186
+ for (const pattern of [...options.ignorePatterns, ...options.functions]) {
1187
+ if (!await pattern.supportsStoredTest(budget)) {
1188
+ storedPatterns = false;
1189
+ break;
1190
+ }
1191
+ }
1192
+ if (storedPatterns && await canIndex(left, leftStat) && await canIndex(right, rightStat)) {
1017
1193
  const result = await indexedDiff(budget, options, left, right, pair.nested, appendBytes, {
1018
1194
  left: !leftStat ? void 0 : isStdin(left) ? "-" : streamType(leftStat.type) ? { stream: pathOf(context, left) } : pathOf(context, left),
1019
1195
  right: !rightStat ? void 0 : isStdin(right) ? "-" : streamType(rightStat.type) ? { stream: pathOf(context, right) } : pathOf(context, right)
@@ -1030,7 +1206,7 @@ async function runStored(context, budget, storage, stdinDocument) {
1030
1206
  };
1031
1207
  const oldBytes = await read(left, leftStat);
1032
1208
  const newBytes = await read(right, rightStat);
1033
- const label = (name) => encoding === "latin1" ? decodeBytes2(encodeBytes3(name), "latin1") : name;
1209
+ const label = (name) => encoding === "latin1" ? decodeBytes2(encodeBytes4(name), "latin1") : name;
1034
1210
  let incompleteEdLine = false;
1035
1211
  const reportSame = async () => {
1036
1212
  if (options.reportSame && !incompleteEdLine) await append(`Files ${label(options.labels[0] ?? left)} and ${label(options.labels[1] ?? right)} are identical
@@ -1062,8 +1238,8 @@ async function runStored(context, budget, storage, stdinDocument) {
1062
1238
  {
1063
1239
  const decoder = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
1064
1240
  try {
1065
- const oldDecoded = decoder.decode(encodeBytes3(oldBytes, "latin1"));
1066
- const newDecoded = decoder.decode(encodeBytes3(newBytes, "latin1"));
1241
+ const oldDecoded = decoder.decode(encodeBytes4(oldBytes, "latin1"));
1242
+ const newDecoded = decoder.decode(encodeBytes4(newBytes, "latin1"));
1067
1243
  oldText = oldDecoded;
1068
1244
  newText = newDecoded;
1069
1245
  encoding = "utf8";
@@ -1141,7 +1317,7 @@ async function runStored(context, budget, storage, stdinDocument) {
1141
1317
  if (options.paginate && outputSize) {
1142
1318
  const title = ["diff", ...context.args].join(" ");
1143
1319
  const argumentValues = createCommandArguments(["-f", "-h", title]);
1144
- const pages = new PagedStorage3(context, 16);
1320
+ const pages = new PagedStorage4(context, 16);
1145
1321
  context.registerCleanup?.(() => pages.close());
1146
1322
  let pageBytes = 0;
1147
1323
  try {
@@ -1171,7 +1347,7 @@ async function runStored(context, budget, storage, stdinDocument) {
1171
1347
  return trouble ? 2 : different ? 1 : 0;
1172
1348
  }
1173
1349
  function globPattern(source, ignoreCase) {
1174
- source = decodeBytes2(encodeBytes3(source), "latin1");
1350
+ source = decodeBytes2(encodeBytes4(source), "latin1");
1175
1351
  let result = "^";
1176
1352
  const oppositeCase = (character) => !ignoreCase ? "" : character >= "A" && character <= "Z" ? character.toLowerCase() : character >= "a" && character <= "z" ? character.toUpperCase() : "";
1177
1353
  for (let index = 0; index < source.length; index++) {
@@ -3,29 +3,29 @@ import {
3
3
  readShapePath,
4
4
  shapePathXml,
5
5
  validateShapePath
6
- } from "./chunk-FIIAYCWS.js";
6
+ } from "./chunk-KZ5ODST6.js";
7
7
  import {
8
8
  addShape,
9
9
  nodeFor,
10
10
  selected,
11
11
  validateSelection
12
- } from "./chunk-TW73OXPR.js";
12
+ } from "./chunk-EJTNVXWF.js";
13
13
  import {
14
14
  validateShapeOptions
15
- } from "./chunk-IT7TAC3F.js";
15
+ } from "./chunk-HVW53ARH.js";
16
16
  import {
17
17
  Length
18
- } from "./chunk-6QBMND4A.js";
18
+ } from "./chunk-6SRHWVEB.js";
19
19
  import {
20
20
  loadShared,
21
21
  required
22
- } from "./chunk-56NYSX65.js";
22
+ } from "./chunk-2Z3WRRFT.js";
23
23
  import {
24
24
  SelectionError
25
- } from "./chunk-X7FA7ZD5.js";
25
+ } from "./chunk-O675URF4.js";
26
26
  import {
27
27
  OfficeError
28
- } from "./chunk-Q73EMLLZ.js";
28
+ } from "./chunk-X6RHJ6YN.js";
29
29
 
30
30
  // packages/safe-bash-presentation-engine/src/shape-path-operations.ts
31
31
  function optionsFor(options, adding = false) {
@@ -1,25 +1,25 @@
1
1
  import {
2
2
  nodeFor
3
- } from "./chunk-TW73OXPR.js";
3
+ } from "./chunk-EJTNVXWF.js";
4
4
  import {
5
5
  TextFrame,
6
6
  applyFrameFormatting,
7
7
  readShape
8
- } from "./chunk-IT7TAC3F.js";
8
+ } from "./chunk-HVW53ARH.js";
9
9
  import {
10
10
  Length
11
- } from "./chunk-6QBMND4A.js";
11
+ } from "./chunk-6SRHWVEB.js";
12
12
  import {
13
13
  attr,
14
14
  child,
15
15
  required
16
- } from "./chunk-56NYSX65.js";
16
+ } from "./chunk-2Z3WRRFT.js";
17
17
  import {
18
18
  parseXmlPart
19
- } from "./chunk-554Z6IKP.js";
19
+ } from "./chunk-7PRL6RJ6.js";
20
20
  import {
21
21
  OfficeError
22
- } from "./chunk-Q73EMLLZ.js";
22
+ } from "./chunk-X6RHJ6YN.js";
23
23
 
24
24
  // packages/safe-bash-presentation-engine/src/tables.ts
25
25
  import { SaxesParser } from "saxes";
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  readXmlCoordinate,
3
3
  readXmlInteger
4
- } from "./chunk-CRV2Q3PB.js";
4
+ } from "./chunk-EZ4NQIPL.js";
5
5
  import {
6
6
  Length
7
- } from "./chunk-6QBMND4A.js";
7
+ } from "./chunk-6SRHWVEB.js";
8
8
  import {
9
9
  attr,
10
10
  child
11
- } from "./chunk-56NYSX65.js";
11
+ } from "./chunk-2Z3WRRFT.js";
12
12
  import {
13
13
  OfficeError
14
- } from "./chunk-Q73EMLLZ.js";
14
+ } from "./chunk-X6RHJ6YN.js";
15
15
 
16
16
  // packages/safe-bash-presentation-engine/src/shape-transforms.ts
17
17
  function invalid() {
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  readShape
3
- } from "./chunk-IT7TAC3F.js";
3
+ } from "./chunk-HVW53ARH.js";
4
4
  import {
5
5
  projectShapePoint
6
- } from "./chunk-YSMNXMAO.js";
6
+ } from "./chunk-3Y4XZB24.js";
7
7
  import {
8
8
  Length
9
- } from "./chunk-6QBMND4A.js";
9
+ } from "./chunk-6SRHWVEB.js";
10
10
  import {
11
11
  attr,
12
12
  child,
13
13
  required
14
- } from "./chunk-56NYSX65.js";
14
+ } from "./chunk-2Z3WRRFT.js";
15
15
  import {
16
16
  parseXmlPart
17
- } from "./chunk-554Z6IKP.js";
17
+ } from "./chunk-7PRL6RJ6.js";
18
18
  import {
19
19
  ValueError
20
- } from "./chunk-S6R3IB36.js";
20
+ } from "./chunk-D55REQA3.js";
21
21
  import {
22
22
  OfficeError
23
- } from "./chunk-Q73EMLLZ.js";
23
+ } from "./chunk-X6RHJ6YN.js";
24
24
 
25
25
  // packages/safe-bash-presentation-engine/src/connectors.ts
26
26
  var connectorValues = { STRAIGHT: 1, ELBOW: 2, CURVE: 3, MIXED: -2 };
@@ -1,27 +1,27 @@
1
1
  import {
2
2
  readProperties
3
- } from "./chunk-6M6TM5Z5.js";
3
+ } from "./chunk-5VQVZPP3.js";
4
4
  import {
5
5
  nodeFor
6
- } from "./chunk-TW73OXPR.js";
6
+ } from "./chunk-EJTNVXWF.js";
7
7
  import {
8
8
  readPresentationText
9
- } from "./chunk-33YCKZZX.js";
9
+ } from "./chunk-C5KLFZGT.js";
10
10
  import {
11
11
  readSelectionIndex
12
- } from "./chunk-X7FA7ZD5.js";
12
+ } from "./chunk-O675URF4.js";
13
13
  import {
14
14
  readPackage
15
- } from "./chunk-XPD636C4.js";
15
+ } from "./chunk-PVGZMLC6.js";
16
16
  import {
17
17
  readBinary
18
- } from "./chunk-PNGDJA6M.js";
18
+ } from "./chunk-LD7BONZY.js";
19
19
  import {
20
20
  parseXmlPart
21
- } from "./chunk-554Z6IKP.js";
21
+ } from "./chunk-7PRL6RJ6.js";
22
22
  import {
23
23
  OfficeError
24
- } from "./chunk-Q73EMLLZ.js";
24
+ } from "./chunk-X6RHJ6YN.js";
25
25
 
26
26
  // packages/safe-bash-presentation-engine/src/diff.ts
27
27
  import { sha256 } from "@noble/hashes/sha2.js";