@poe-platform/safe-bash 0.1.806 → 0.1.807

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 (856) hide show
  1. package/README.md +4 -0
  2. package/dist/image-ast/portable.d.ts +8 -0
  3. package/dist/image-ast/portable.js +2 -0
  4. package/dist/safe-bash/chunks/{chunk-KRA6WK4Z.js → chunk-3Y54SR4R.js} +6 -6
  5. package/dist/safe-bash/chunks/{chunk-OYJI4L4J.js → chunk-PPAA3LJS.js} +1 -1
  6. package/dist/safe-bash/chunks/{chunk-SCROOJV7.js → chunk-XZ2Y4RWC.js} +2 -2
  7. package/dist/safe-bash/command-chunks/{biff-AU4VGVMD-6EQ64QPG.js → biff-YBHP7ZES-M7TU7NA5.js} +1211 -1205
  8. package/dist/safe-bash/command-chunks/chunk-2A6TBB4F.js +14 -0
  9. package/dist/safe-bash/command-chunks/chunk-2AF7J6FE.js +372 -0
  10. package/dist/safe-bash/command-chunks/{chunk-AITNVBXO.js → chunk-2ANW3FXH.js} +4 -4
  11. package/dist/safe-bash/command-chunks/chunk-2B6XWO6A.js +730 -0
  12. package/dist/safe-bash/command-chunks/chunk-2BKOSQD3.js +11 -0
  13. package/dist/safe-bash/command-chunks/chunk-2EUH5B6A.js +127 -0
  14. package/dist/safe-bash/command-chunks/chunk-2FOLUJLI.js +400 -0
  15. package/dist/safe-bash/command-chunks/{chunk-CZLX3KVF.js → chunk-2GILUQJY.js} +4 -6
  16. package/dist/safe-bash/command-chunks/chunk-2HHGDJ7J.js +280 -0
  17. package/dist/safe-bash/command-chunks/chunk-2NE2GPSF.js +546 -0
  18. package/dist/safe-bash/command-chunks/chunk-2P7BLWWI.js +272 -0
  19. package/dist/safe-bash/command-chunks/chunk-2PSVE7I5.js +101 -0
  20. package/dist/safe-bash/command-chunks/chunk-2UUFZMOH.js +503 -0
  21. package/dist/safe-bash/command-chunks/chunk-2VGAC6S6.js +393 -0
  22. package/dist/safe-bash/command-chunks/chunk-2W54TAGI.js +162 -0
  23. package/dist/safe-bash/command-chunks/chunk-326A5G42.js +328 -0
  24. package/dist/safe-bash/command-chunks/chunk-36KIT4DU.js +218 -0
  25. package/dist/safe-bash/command-chunks/chunk-3CHQG25N.js +455 -0
  26. package/dist/safe-bash/command-chunks/chunk-3JQ3RF2O.js +72 -0
  27. package/dist/safe-bash/command-chunks/chunk-3MLJWSYL.js +92 -0
  28. package/dist/safe-bash/command-chunks/{chunk-ASYR2LU7.js → chunk-3RQCLLQA.js} +5 -5
  29. package/dist/safe-bash/command-chunks/chunk-3SEQG5JH.js +521 -0
  30. package/dist/safe-bash/command-chunks/chunk-3SWT2KYH.js +78 -0
  31. package/dist/safe-bash/command-chunks/chunk-3VETFXYR.js +170 -0
  32. package/dist/safe-bash/command-chunks/chunk-3W6PTHHB.js +65 -0
  33. package/dist/safe-bash/command-chunks/chunk-457CU3IC.js +8 -0
  34. package/dist/safe-bash/command-chunks/chunk-45BW6MGM.js +250 -0
  35. package/dist/safe-bash/command-chunks/chunk-47MFDPH4.js +419 -0
  36. package/dist/safe-bash/command-chunks/chunk-4ATHODCG.js +444 -0
  37. package/dist/safe-bash/command-chunks/chunk-4DJICIFV.js +227 -0
  38. package/dist/safe-bash/command-chunks/chunk-4FNQPK7C.js +385 -0
  39. package/dist/safe-bash/command-chunks/chunk-4LXDJES2.js +65 -0
  40. package/dist/safe-bash/command-chunks/chunk-4QRXKUD2.js +662 -0
  41. package/dist/safe-bash/command-chunks/chunk-4QYNOBWZ.js +455 -0
  42. package/dist/safe-bash/command-chunks/{chunk-MWNWT6HG.js → chunk-4XFFIKA3.js} +5 -5
  43. package/dist/safe-bash/command-chunks/chunk-5AU5ENL5.js +180 -0
  44. package/dist/safe-bash/command-chunks/chunk-5DFZAJHL.js +324 -0
  45. package/dist/safe-bash/command-chunks/chunk-5GEFJROP.js +270 -0
  46. package/dist/safe-bash/command-chunks/chunk-5HWX4XYW.js +263 -0
  47. package/dist/safe-bash/command-chunks/chunk-5LKNP4IF.js +872 -0
  48. package/dist/safe-bash/command-chunks/chunk-5OEHUIVE.js +240 -0
  49. package/dist/safe-bash/command-chunks/chunk-6EHVFKM7.js +171 -0
  50. package/dist/safe-bash/command-chunks/chunk-6JTPLJ3B.js +155 -0
  51. package/dist/safe-bash/command-chunks/chunk-6KLUPQ65.js +496 -0
  52. package/dist/safe-bash/command-chunks/chunk-6NS5RXQ7.js +285 -0
  53. package/dist/safe-bash/command-chunks/chunk-6PJIQEH4.js +3472 -0
  54. package/dist/safe-bash/command-chunks/chunk-763ECQWB.js +566 -0
  55. package/dist/safe-bash/command-chunks/chunk-7DADVPKN.js +23 -0
  56. package/dist/safe-bash/command-chunks/chunk-7LEADSSA.js +164 -0
  57. package/dist/safe-bash/command-chunks/chunk-7MMSBVUP.js +732 -0
  58. package/dist/safe-bash/command-chunks/chunk-7OXNWLSL.js +35 -0
  59. package/dist/safe-bash/command-chunks/chunk-7PZASWL6.js +354 -0
  60. package/dist/safe-bash/command-chunks/{chunk-ZBR3UH4P.js → chunk-7QH3WAMQ.js} +2 -2
  61. package/dist/safe-bash/command-chunks/{chunk-CB3HTIDK.js → chunk-7SOE7XIS.js} +11 -11
  62. package/dist/safe-bash/command-chunks/chunk-7Y3ZQ6FE.js +56 -0
  63. package/dist/safe-bash/command-chunks/chunk-A2YEQYCC.js +289 -0
  64. package/dist/safe-bash/command-chunks/chunk-A3XE767Q.js +502 -0
  65. package/dist/safe-bash/command-chunks/{chunk-MWY75E3F.js → chunk-A6LCBGE6.js} +187 -187
  66. package/dist/safe-bash/command-chunks/{chunk-HFUL6E5I.js → chunk-A7CE4EIU.js} +33 -151
  67. package/dist/safe-bash/command-chunks/chunk-A7EMM3SB.js +297 -0
  68. package/dist/safe-bash/command-chunks/{chunk-G3YO3JIN.js → chunk-ABH5FMMA.js} +1 -1
  69. package/dist/safe-bash/command-chunks/chunk-AEJZEGW7.js +1376 -0
  70. package/dist/safe-bash/command-chunks/chunk-AELXRNM6.js +207 -0
  71. package/dist/safe-bash/command-chunks/chunk-AEZIPWRI.js +260 -0
  72. package/dist/safe-bash/command-chunks/{chunk-AHD3CGAY.js → chunk-AFPXADZG.js} +4 -4
  73. package/dist/safe-bash/command-chunks/chunk-AIOB34IX.js +201 -0
  74. package/dist/safe-bash/command-chunks/chunk-AJEYCC4X.js +262 -0
  75. package/dist/safe-bash/command-chunks/chunk-ALMHXDKZ.js +321 -0
  76. package/dist/safe-bash/command-chunks/chunk-AQ6RTM2M.js +309 -0
  77. package/dist/safe-bash/command-chunks/chunk-AQNFEGMZ.js +481 -0
  78. package/dist/safe-bash/command-chunks/{chunk-2AKKYY5G.js → chunk-ASZ4EMKE.js} +1 -1
  79. package/dist/safe-bash/command-chunks/chunk-AYJGINE5.js +144 -0
  80. package/dist/safe-bash/command-chunks/{chunk-MRFW2E6B.js → chunk-B4UWZCQR.js} +1 -1
  81. package/dist/safe-bash/command-chunks/chunk-BDYKJTBQ.js +43 -0
  82. package/dist/safe-bash/command-chunks/chunk-BERVTMQB.js +41 -0
  83. package/dist/safe-bash/command-chunks/chunk-BZOY2UMP.js +275 -0
  84. package/dist/safe-bash/command-chunks/{chunk-W47KIMSP.js → chunk-C2EYJT4S.js} +1 -1
  85. package/dist/safe-bash/command-chunks/chunk-CK5Q6RDE.js +342 -0
  86. package/dist/safe-bash/command-chunks/chunk-CKEODJVT.js +992 -0
  87. package/dist/safe-bash/command-chunks/{chunk-Z7UIOPHJ.js → chunk-DCMSPMMD.js} +1 -1
  88. package/dist/safe-bash/command-chunks/chunk-DE66JRWJ.js +352 -0
  89. package/dist/safe-bash/command-chunks/chunk-DKNNYPOI.js +409 -0
  90. package/dist/safe-bash/command-chunks/chunk-DV745GFU.js +294 -0
  91. package/dist/safe-bash/command-chunks/chunk-DXX2Z2QA.js +33 -0
  92. package/dist/safe-bash/command-chunks/chunk-E7AYF54A.js +473 -0
  93. package/dist/safe-bash/command-chunks/chunk-EDSFQJAU.js +159 -0
  94. package/dist/safe-bash/command-chunks/{chunk-UQ3KEUCF.js → chunk-ESD5ZD74.js} +7 -1
  95. package/dist/safe-bash/command-chunks/chunk-EUXUCRCI.js +1739 -0
  96. package/dist/safe-bash/command-chunks/chunk-F2ORFLCH.js +3669 -0
  97. package/dist/safe-bash/command-chunks/chunk-FANIWOBM.js +311 -0
  98. package/dist/safe-bash/command-chunks/chunk-FOO3AXFK.js +47 -0
  99. package/dist/safe-bash/command-chunks/chunk-FRZ5P5AB.js +131 -0
  100. package/dist/safe-bash/command-chunks/chunk-FZSQMMYV.js +276 -0
  101. package/dist/safe-bash/command-chunks/{chunk-P6NUIMMX.js → chunk-G5F2VSQ7.js} +1 -1
  102. package/dist/safe-bash/command-chunks/chunk-GGOZXIGH.js +299 -0
  103. package/dist/safe-bash/command-chunks/chunk-GIESJLR2.js +241 -0
  104. package/dist/safe-bash/command-chunks/chunk-GLPIFP7N.js +385 -0
  105. package/dist/safe-bash/command-chunks/chunk-GZ2N24A2.js +342 -0
  106. package/dist/safe-bash/command-chunks/chunk-H2NWPMNW.js +216 -0
  107. package/dist/safe-bash/command-chunks/chunk-HHLVI2CB.js +3949 -0
  108. package/dist/safe-bash/command-chunks/chunk-HJDE7ZNV.js +82 -0
  109. package/dist/safe-bash/command-chunks/chunk-HOAM3F5I.js +124 -0
  110. package/dist/safe-bash/command-chunks/chunk-HPKUFWHW.js +482 -0
  111. package/dist/safe-bash/command-chunks/chunk-HPMVMOD2.js +109 -0
  112. package/dist/safe-bash/command-chunks/chunk-HQAHDJPX.js +8 -0
  113. package/dist/safe-bash/command-chunks/chunk-HR2Y6YEP.js +12 -0
  114. package/dist/safe-bash/command-chunks/chunk-HUNXIAOL.js +62 -0
  115. package/dist/safe-bash/command-chunks/chunk-I4JWZOSP.js +244 -0
  116. package/dist/safe-bash/command-chunks/chunk-I6AMDG2T.js +85 -0
  117. package/dist/safe-bash/command-chunks/chunk-IB2Q5CL3.js +288 -0
  118. package/dist/safe-bash/command-chunks/chunk-IFNLDOJ4.js +316 -0
  119. package/dist/safe-bash/command-chunks/chunk-IKHBXETN.js +174 -0
  120. package/dist/safe-bash/command-chunks/chunk-IOSWG5JS.js +228 -0
  121. package/dist/safe-bash/command-chunks/chunk-IQFRPIXH.js +317 -0
  122. package/dist/safe-bash/command-chunks/chunk-IR6ZKAUH.js +582 -0
  123. package/dist/safe-bash/command-chunks/chunk-IW7PEB4I.js +297 -0
  124. package/dist/safe-bash/command-chunks/chunk-JGGRMERW.js +36 -0
  125. package/dist/safe-bash/command-chunks/chunk-JHAY3KYC.js +520 -0
  126. package/dist/safe-bash/command-chunks/{chunk-UO25D4WG.js → chunk-JITDS55R.js} +22 -22
  127. package/dist/safe-bash/command-chunks/chunk-JJK3CU7Z.js +6 -0
  128. package/dist/safe-bash/command-chunks/{chunk-XKZWUMH4.js → chunk-JN7GNI2C.js} +1 -1
  129. package/dist/safe-bash/command-chunks/chunk-JQ3EJKHF.js +160 -0
  130. package/dist/safe-bash/command-chunks/chunk-JQE256UO.js +292 -0
  131. package/dist/safe-bash/command-chunks/chunk-JQZ3BXWY.js +382 -0
  132. package/dist/safe-bash/command-chunks/{chunk-7DLR4HCC.js → chunk-JWSOFSGI.js} +22 -22
  133. package/dist/safe-bash/command-chunks/chunk-K3CDZMUN.js +168 -0
  134. package/dist/safe-bash/command-chunks/{chunk-SUYSZJI3.js → chunk-K5COUQAQ.js} +4 -4
  135. package/dist/safe-bash/command-chunks/chunk-K7HUXUN2.js +489 -0
  136. package/dist/safe-bash/command-chunks/chunk-KB3CY3QO.js +62 -0
  137. package/dist/safe-bash/command-chunks/chunk-KCBVOYAY.js +92 -0
  138. package/dist/safe-bash/command-chunks/chunk-KD25ICP4.js +366 -0
  139. package/dist/safe-bash/command-chunks/chunk-KDKQ5D55.js +180 -0
  140. package/dist/safe-bash/command-chunks/chunk-KNKDUEDW.js +521 -0
  141. package/dist/safe-bash/command-chunks/chunk-KR2PQ7GD.js +174 -0
  142. package/dist/safe-bash/command-chunks/chunk-KS6WUDPM.js +153 -0
  143. package/dist/safe-bash/command-chunks/{chunk-XFHUSZBM.js → chunk-KUGV3SSL.js} +5 -5
  144. package/dist/safe-bash/command-chunks/chunk-L2JAP5KO.js +249 -0
  145. package/dist/safe-bash/command-chunks/chunk-L2KEA6SN.js +271 -0
  146. package/dist/safe-bash/command-chunks/chunk-L3WY5ASN.js +526 -0
  147. package/dist/safe-bash/command-chunks/chunk-L4XEXXVQ.js +399 -0
  148. package/dist/safe-bash/command-chunks/chunk-LDTUZIJK.js +90 -0
  149. package/dist/safe-bash/command-chunks/chunk-LHDB4QO5.js +479 -0
  150. package/dist/safe-bash/command-chunks/chunk-LHL6RWGJ.js +548 -0
  151. package/dist/safe-bash/command-chunks/chunk-LHRXDH45.js +164 -0
  152. package/dist/safe-bash/command-chunks/chunk-LQOKYG3O.js +153 -0
  153. package/dist/safe-bash/command-chunks/chunk-LRDME6WV.js +12 -0
  154. package/dist/safe-bash/command-chunks/chunk-LWVDJB5S.js +305 -0
  155. package/dist/safe-bash/command-chunks/chunk-M57GLLK4.js +27 -0
  156. package/dist/safe-bash/command-chunks/chunk-MAHX3IW3.js +108 -0
  157. package/dist/safe-bash/command-chunks/{chunk-LQZSR6DT.js → chunk-MDV7W5AS.js} +2 -2
  158. package/dist/safe-bash/command-chunks/chunk-MG7AJD5E.js +168 -0
  159. package/dist/safe-bash/command-chunks/chunk-MHJ3DQUE.js +213 -0
  160. package/dist/safe-bash/command-chunks/chunk-MLGNBD7V.js +552 -0
  161. package/dist/safe-bash/command-chunks/chunk-MN2M33JK.js +237 -0
  162. package/dist/safe-bash/command-chunks/chunk-MOL3TRBT.js +32 -0
  163. package/dist/safe-bash/command-chunks/chunk-MQFXMBGD.js +75 -0
  164. package/dist/safe-bash/command-chunks/chunk-MQPWE22J.js +171 -0
  165. package/dist/safe-bash/command-chunks/chunk-MQU6Q75R.js +523 -0
  166. package/dist/safe-bash/command-chunks/chunk-MWAAMNAM.js +353 -0
  167. package/dist/safe-bash/command-chunks/chunk-MZ4BTMTI.js +240 -0
  168. package/dist/safe-bash/command-chunks/chunk-N4DY4FPA.js +679 -0
  169. package/dist/safe-bash/command-chunks/chunk-N74TJL6X.js +183 -0
  170. package/dist/safe-bash/command-chunks/chunk-NA5Q4V2H.js +304 -0
  171. package/dist/safe-bash/command-chunks/chunk-NSM366N6.js +22 -0
  172. package/dist/safe-bash/command-chunks/chunk-NY4ZPV3N.js +523 -0
  173. package/dist/safe-bash/command-chunks/chunk-NYBF2BVE.js +17 -0
  174. package/dist/safe-bash/command-chunks/chunk-OBK24KGM.js +24 -0
  175. package/dist/safe-bash/command-chunks/{chunk-GDAS4LY7.js → chunk-OEKLEUUW.js} +4 -4
  176. package/dist/safe-bash/command-chunks/chunk-OGWJD5QP.js +404 -0
  177. package/dist/safe-bash/command-chunks/chunk-OIPATOZW.js +154 -0
  178. package/dist/safe-bash/command-chunks/chunk-OP6J3OLL.js +243 -0
  179. package/dist/safe-bash/command-chunks/chunk-OTTMIB3C.js +266 -0
  180. package/dist/safe-bash/command-chunks/{chunk-OZHPB4KD.js → chunk-OU4VE5CR.js} +12 -12
  181. package/dist/safe-bash/command-chunks/chunk-P42REFYL.js +228 -0
  182. package/dist/safe-bash/command-chunks/{chunk-YJ3TFZB2.js → chunk-PQOAM5SC.js} +1 -1
  183. package/dist/safe-bash/command-chunks/chunk-PQOIOVF2.js +444 -0
  184. package/dist/safe-bash/command-chunks/chunk-PRQEVUNE.js +205 -0
  185. package/dist/safe-bash/command-chunks/{chunk-W5OR7COJ.js → chunk-PVLPWVRH.js} +21 -21
  186. package/dist/safe-bash/command-chunks/{chunk-BNG4ZMZ3.js → chunk-PXL4NBYP.js} +1 -78
  187. package/dist/safe-bash/command-chunks/chunk-Q6W5FRZG.js +41 -0
  188. package/dist/safe-bash/command-chunks/{chunk-KLCHCSIV.js → chunk-QGD64UHJ.js} +1 -1
  189. package/dist/safe-bash/command-chunks/chunk-QHS7PDG3.js +188 -0
  190. package/dist/safe-bash/command-chunks/chunk-QXCSASIE.js +151 -0
  191. package/dist/safe-bash/command-chunks/chunk-QYCBVKFT.js +255 -0
  192. package/dist/safe-bash/command-chunks/chunk-R4TYL2G6.js +1529 -0
  193. package/dist/safe-bash/command-chunks/chunk-RAXJVM4U.js +625 -0
  194. package/dist/safe-bash/command-chunks/chunk-RBFZYSZZ.js +207 -0
  195. package/dist/safe-bash/command-chunks/chunk-RJHVJZ4H.js +185 -0
  196. package/dist/safe-bash/command-chunks/chunk-RKPPUYZE.js +213 -0
  197. package/dist/safe-bash/command-chunks/chunk-RMJNV6Q7.js +23 -0
  198. package/dist/safe-bash/command-chunks/{chunk-MR2RLUPV.js → chunk-RQHQCJMV.js} +11 -9
  199. package/dist/safe-bash/command-chunks/chunk-RR6QQ25D.js +71 -0
  200. package/dist/safe-bash/command-chunks/{chunk-JW3KIZU6.js → chunk-RUXY7GN5.js} +1 -1
  201. package/dist/safe-bash/command-chunks/chunk-RZC7QHL6.js +112 -0
  202. package/dist/safe-bash/command-chunks/chunk-RZJRR4UJ.js +1677 -0
  203. package/dist/safe-bash/command-chunks/chunk-S4OBYRNI.js +639 -0
  204. package/dist/safe-bash/command-chunks/{chunk-DQNDEWCI.js → chunk-S65T5JJO.js} +12 -12
  205. package/dist/safe-bash/command-chunks/chunk-S6PPBBXX.js +77 -0
  206. package/dist/safe-bash/command-chunks/chunk-SCG4LK5U.js +265 -0
  207. package/dist/safe-bash/command-chunks/chunk-SDTC2BLK.js +143 -0
  208. package/dist/safe-bash/command-chunks/chunk-SEK43FRN.js +357 -0
  209. package/dist/safe-bash/command-chunks/chunk-SH45NZ2P.js +194 -0
  210. package/dist/safe-bash/command-chunks/chunk-SM733XRT.js +250 -0
  211. package/dist/safe-bash/command-chunks/chunk-SSRGI476.js +116 -0
  212. package/dist/safe-bash/command-chunks/chunk-SUUD352U.js +127 -0
  213. package/dist/safe-bash/command-chunks/{chunk-B5F2KQYA.js → chunk-SWUVHT7G.js} +1 -1
  214. package/dist/safe-bash/command-chunks/chunk-TBAH4XGI.js +38 -0
  215. package/dist/safe-bash/command-chunks/chunk-TBVWTZTR.js +469 -0
  216. package/dist/safe-bash/command-chunks/chunk-TGHQGJNR.js +144 -0
  217. package/dist/safe-bash/command-chunks/{chunk-Q6JLT2EY.js → chunk-TL3KDYEM.js} +8 -110
  218. package/dist/safe-bash/command-chunks/chunk-TVAEX4WQ.js +473 -0
  219. package/dist/safe-bash/command-chunks/chunk-TZ2J6LGM.js +163 -0
  220. package/dist/safe-bash/command-chunks/chunk-UICO7H6S.js +186 -0
  221. package/dist/safe-bash/command-chunks/chunk-UJTJFMIN.js +501 -0
  222. package/dist/safe-bash/command-chunks/chunk-UMWWCLBG.js +109 -0
  223. package/dist/safe-bash/command-chunks/chunk-UPXFSGQG.js +134 -0
  224. package/dist/safe-bash/command-chunks/chunk-UWUYSXYT.js +272 -0
  225. package/dist/safe-bash/command-chunks/{chunk-5FMXQUDY.js → chunk-UZOGSYJP.js} +1 -1
  226. package/dist/safe-bash/command-chunks/chunk-V3RGA5PS.js +125 -0
  227. package/dist/safe-bash/command-chunks/chunk-VEUQWV2V.js +287 -0
  228. package/dist/safe-bash/command-chunks/chunk-VGKYTZT5.js +161 -0
  229. package/dist/safe-bash/command-chunks/chunk-VQUEIEVP.js +410 -0
  230. package/dist/safe-bash/command-chunks/chunk-VU3YUC3U.js +169 -0
  231. package/dist/safe-bash/command-chunks/chunk-W32KW66B.js +27 -0
  232. package/dist/safe-bash/command-chunks/chunk-W543LSYH.js +899 -0
  233. package/dist/safe-bash/command-chunks/chunk-W5YFDYHO.js +387 -0
  234. package/dist/safe-bash/command-chunks/chunk-W6DV2CLS.js +267 -0
  235. package/dist/safe-bash/command-chunks/chunk-WAKYUXVQ.js +215 -0
  236. package/dist/safe-bash/command-chunks/chunk-WGOL3MM6.js +125 -0
  237. package/dist/safe-bash/command-chunks/{chunk-N2A7V3WY.js → chunk-WHNYT34N.js} +3 -3
  238. package/dist/safe-bash/command-chunks/chunk-WOZCIRJ5.js +169 -0
  239. package/dist/safe-bash/command-chunks/chunk-WVB6ONZS.js +232 -0
  240. package/dist/safe-bash/command-chunks/chunk-WVESNAND.js +25 -0
  241. package/dist/safe-bash/command-chunks/chunk-XDEA3TL5.js +322 -0
  242. package/dist/safe-bash/command-chunks/chunk-XFEUWSYG.js +357 -0
  243. package/dist/safe-bash/command-chunks/chunk-XFMJ4RMS.js +2849 -0
  244. package/dist/safe-bash/command-chunks/chunk-XH6DXJHX.js +196 -0
  245. package/dist/safe-bash/command-chunks/chunk-XNJ67APB.js +6 -0
  246. package/dist/safe-bash/command-chunks/chunk-XP6BHGZ6.js +227 -0
  247. package/dist/safe-bash/command-chunks/chunk-XXFHTGV2.js +142 -0
  248. package/dist/safe-bash/command-chunks/chunk-Y5GI5PVT.js +139 -0
  249. package/dist/safe-bash/command-chunks/chunk-Y6KHC3JB.js +177 -0
  250. package/dist/safe-bash/command-chunks/{chunk-2UWPMSME.js → chunk-Y72LPXST.js} +8 -8
  251. package/dist/safe-bash/command-chunks/chunk-YDRWQZNB.js +69 -0
  252. package/dist/safe-bash/command-chunks/{chunk-P4OJBL2B.js → chunk-YFZ6FPIC.js} +1 -1
  253. package/dist/safe-bash/command-chunks/chunk-YH4DC4RP.js +171 -0
  254. package/dist/safe-bash/command-chunks/chunk-YH7KKMMN.js +463 -0
  255. package/dist/safe-bash/command-chunks/{chunk-MN3BB4WW.js → chunk-YP3WWV5N.js} +4 -4
  256. package/dist/safe-bash/command-chunks/chunk-YPVBU7QF.js +2817 -0
  257. package/dist/safe-bash/command-chunks/chunk-YQYVEVUE.js +1621 -0
  258. package/dist/safe-bash/command-chunks/chunk-YRNBIU5U.js +175 -0
  259. package/dist/safe-bash/command-chunks/chunk-Z7ESJVFP.js +10 -0
  260. package/dist/safe-bash/command-chunks/chunk-ZTAFAHY3.js +653 -0
  261. package/dist/safe-bash/command-chunks/chunk-ZXKOMB24.js +85 -0
  262. package/dist/safe-bash/command-chunks/{clipboard-XCSQACOK-SHFXT53F.js → clipboard-6SDGQGC3-TVJ3CG7A.js} +4 -4
  263. package/dist/safe-bash/command-chunks/{command-engine-4TEGTXCQ.js → command-engine-KMLHVFMA.js} +356 -316
  264. package/dist/safe-bash/command-chunks/{engine-QDC5VCGO-LYAAFESF.js → engine-EOYR2WTY-KUFLFTDE.js} +2 -4
  265. package/dist/safe-bash/command-chunks/{gnumeric-OCFH63UT-YI7SG7TN.js → gnumeric-ABKSRBZJ-MPIIPXKP.js} +3 -3
  266. package/dist/safe-bash/command-chunks/inspection-command-ULEU7ZVV.js +7 -0
  267. package/dist/safe-bash/command-chunks/model-store-JUFU3RSW.js +54 -0
  268. package/dist/safe-bash/command-chunks/pdf-22JDKKAR-UDWNSWYB.js +338 -0
  269. package/dist/safe-bash/command-chunks/{pptx-XG3YSXWZ-XAG36NAB.js → pptx-YDKHIGCD-H7FU4VMJ.js} +2 -2
  270. package/dist/safe-bash/commands/bc/index.browser.js +2 -2
  271. package/dist/safe-bash/commands/diffpdf/index.d.ts +2 -0
  272. package/dist/safe-bash/commands/diffpdf/index.js +2 -0
  273. package/dist/safe-bash/commands/dot/index.d.ts +2 -0
  274. package/dist/safe-bash/commands/dot/index.js +2 -0
  275. package/dist/safe-bash/commands/llm/collections.browser.js +6 -0
  276. package/dist/safe-bash/commands/llm/collections.d.ts +2 -0
  277. package/dist/safe-bash/commands/llm/collections.js +2 -0
  278. package/dist/safe-bash/commands/pandoc/index.browser.js +1 -1
  279. package/dist/safe-bash/commands/rsvg-convert/index.d.ts +2 -0
  280. package/dist/safe-bash/commands/rsvg-convert/index.js +2 -0
  281. package/dist/safe-bash/commands/safejs/io.d.ts +1 -1
  282. package/dist/safe-bash/commands/safejs/io.js +1 -1
  283. package/dist/safe-bash/commands/safejs/options.d.ts +1 -1
  284. package/dist/safe-bash/commands/safejs/options.js +1 -1
  285. package/dist/safe-bash/commands/safejs/render.d.ts +1 -1
  286. package/dist/safe-bash/commands/safejs/render.js +1 -1
  287. package/dist/safe-bash/commands/safejs/runtime.d.ts +1 -1
  288. package/dist/safe-bash/commands/safejs/runtime.js +1 -1
  289. package/dist/safe-bash/commands/safejs/types.d.ts +1 -1
  290. package/dist/safe-bash/commands/safejs/types.js +1 -1
  291. package/dist/safe-bash/commands/wdiff/index.d.ts +2 -0
  292. package/dist/safe-bash/commands/wdiff/index.js +2 -0
  293. package/dist/safe-bash/core.d.ts +4 -0
  294. package/dist/safe-bash/core.js +4 -0
  295. package/dist/safe-bash/full-core.browser.js +59 -35
  296. package/dist/safe-bash/optional-host.browser.js +7 -7
  297. package/dist/safe-bash/plugins/index.browser.js +7 -7
  298. package/dist/safe-bash/registry-entry.browser.js +6 -6
  299. package/dist/safe-bash/search.browser.js +2 -2
  300. package/dist/safe-bash/shell-entry.browser.js +3 -3
  301. package/dist/safe-bash-checksum-engine/index.js +83 -40
  302. package/dist/safe-bash-checksum-engine/md5.d.ts +2 -0
  303. package/dist/safe-bash-checksum-engine/md5.js +7 -0
  304. package/dist/safe-bash-command-awk/awk-inspection.js +2 -2
  305. package/dist/safe-bash-command-awk/awk-runtime.js +2 -2
  306. package/dist/safe-bash-command-awk/awk.js +7 -7
  307. package/dist/safe-bash-command-awk/index.js +7 -7
  308. package/dist/safe-bash-command-chmod/command.js +1 -1
  309. package/dist/safe-bash-command-chmod/index.js +1 -1
  310. package/dist/safe-bash-command-csvkit/index.js +6 -6
  311. package/dist/safe-bash-command-diff/index.js +3 -3
  312. package/dist/safe-bash-command-diffpdf/LICENSE +21 -0
  313. package/dist/safe-bash-command-diffpdf/index.d.ts +12 -0
  314. package/dist/safe-bash-command-diffpdf/index.js +107 -0
  315. package/dist/safe-bash-command-docx/command.d.ts +36 -0
  316. package/dist/{safe-bash-docx-engine → safe-bash-command-docx}/discovery.d.ts +4 -4
  317. package/dist/safe-bash-command-docx/index.js +1 -1
  318. package/dist/{safe-bash-docx-engine → safe-bash-command-docx}/inspection-command.d.ts +6 -6
  319. package/dist/safe-bash-command-docx/sdk.d.ts +4 -0
  320. package/dist/safe-bash-command-docx/sdk.js +24 -0
  321. package/dist/safe-bash-command-dot/LICENSE +21 -0
  322. package/dist/safe-bash-command-dot/index.d.ts +14 -0
  323. package/dist/safe-bash-command-dot/index.js +1298 -0
  324. package/dist/safe-bash-command-du/arguments.d.ts +1 -1
  325. package/dist/safe-bash-command-du/arguments.js +1 -1
  326. package/dist/safe-bash-command-du/du.js +2 -2
  327. package/dist/safe-bash-command-du/index.js +2 -2
  328. package/dist/safe-bash-command-factor/command.js +2 -2
  329. package/dist/safe-bash-command-factor/index.js +2 -2
  330. package/dist/safe-bash-command-ffmpeg/index.js +16 -16
  331. package/dist/safe-bash-command-imagemagick/index.js +21 -53
  332. package/dist/safe-bash-command-llm/collections-embed.d.ts +23 -0
  333. package/dist/safe-bash-command-llm/collections.d.ts +38 -0
  334. package/dist/safe-bash-command-llm/collections.js +423 -0
  335. package/dist/safe-bash-command-llm/command.js +4 -2
  336. package/dist/safe-bash-command-llm/index.js +12 -8
  337. package/dist/safe-bash-command-llm/openai.js +4 -3
  338. package/dist/safe-bash-command-llm/providers/index.js +6 -4
  339. package/dist/safe-bash-command-llm/providers/openai.js +4 -3
  340. package/dist/safe-bash-command-node/commands/node/browser.js +9 -12
  341. package/dist/safe-bash-command-node/commands/node/buffer.js +2 -2
  342. package/dist/safe-bash-command-node/commands/node/default-runtime.js +9 -12
  343. package/dist/safe-bash-command-node/commands/node/filesystem.js +3 -3
  344. package/dist/safe-bash-command-node/commands/node/safejs.js +9 -12
  345. package/dist/safe-bash-command-node/commands/node/source-maps.js +2 -2
  346. package/dist/safe-bash-command-node/commands/node/timers.js +3 -3
  347. package/dist/safe-bash-command-node/commands/safejs/io.d.ts +1 -35
  348. package/dist/safe-bash-command-node/commands/safejs/io.js +3 -7
  349. package/dist/safe-bash-command-node/commands/safejs/options.d.ts +2 -22
  350. package/dist/safe-bash-command-node/commands/safejs/options.js +1 -1
  351. package/dist/safe-bash-command-node/commands/safejs/render.d.ts +1 -1
  352. package/dist/safe-bash-command-node/commands/safejs/render.js +3 -5
  353. package/dist/safe-bash-command-node/commands/safejs/runtime.d.ts +2 -25
  354. package/dist/safe-bash-command-node/commands/safejs/runtime.js +1 -7
  355. package/dist/safe-bash-command-node/commands/safejs/types.d.ts +2 -85
  356. package/dist/safe-bash-command-node/commands/safejs/types.js +1 -1
  357. package/dist/safe-bash-command-node/integrations/safejs/filesystem.d.ts +2 -5
  358. package/dist/safe-bash-command-node/integrations/safejs/filesystem.js +3 -3
  359. package/dist/safe-bash-command-node/integrations/safejs/shell.js +1 -1
  360. package/dist/safe-bash-command-node/integrations/safejs/values.d.ts +1 -7
  361. package/dist/safe-bash-command-node/integrations/safejs/values.js +1 -1
  362. package/dist/safe-bash-command-openssl/index.js +15452 -420
  363. package/dist/safe-bash-command-pandoc/command.js +1 -1
  364. package/dist/safe-bash-command-pandoc/index.js +1 -1
  365. package/dist/safe-bash-command-patch/index.js +5 -5
  366. package/dist/safe-bash-command-patch/patch.js +4 -4
  367. package/dist/safe-bash-command-playwright-cli/index.js +25 -25
  368. package/dist/safe-bash-command-playwright-cli/playwright/abilities.js +8 -8
  369. package/dist/safe-bash-command-playwright-cli/playwright/controller.js +16 -16
  370. package/dist/safe-bash-command-playwright-cli/playwright/index.js +25 -25
  371. package/dist/safe-bash-command-playwright-cli/playwright/standard-capabilities.js +4 -4
  372. package/dist/{safe-bash-pptx-engine → safe-bash-command-pptx}/command-engine.d.ts +5 -13
  373. package/dist/safe-bash-command-pptx/engine.d.ts +4 -0
  374. package/dist/safe-bash-command-pptx/engine.js +37 -0
  375. package/dist/safe-bash-command-pptx/index.js +1 -1
  376. package/dist/safe-bash-command-python/executor.js +15 -15
  377. package/dist/safe-bash-command-python/index.js +15 -15
  378. package/dist/safe-bash-command-python/jspi.js +4 -4
  379. package/dist/safe-bash-command-qrencode/index.js +1 -4
  380. package/dist/safe-bash-command-rsvg-convert/LICENSE +21 -0
  381. package/dist/safe-bash-command-rsvg-convert/index.d.ts +13 -0
  382. package/dist/safe-bash-command-rsvg-convert/index.js +84 -0
  383. package/dist/safe-bash-command-safejs/LICENSE +21 -0
  384. package/dist/safe-bash-command-safejs/filesystem.d.ts +5 -0
  385. package/dist/safe-bash-command-safejs/filesystem.js +7 -0
  386. package/dist/safe-bash-command-safejs/index.d.ts +4 -0
  387. package/dist/safe-bash-command-safejs/index.js +19 -0
  388. package/dist/safe-bash-command-safejs/io.d.ts +35 -0
  389. package/dist/safe-bash-command-safejs/io.js +12 -0
  390. package/dist/safe-bash-command-safejs/options.d.ts +22 -0
  391. package/dist/safe-bash-command-safejs/options.js +11 -0
  392. package/dist/safe-bash-command-safejs/render.d.ts +1 -0
  393. package/dist/safe-bash-command-safejs/render.js +9 -0
  394. package/dist/safe-bash-command-safejs/runtime.d.ts +25 -0
  395. package/dist/safe-bash-command-safejs/runtime.js +13 -0
  396. package/dist/safe-bash-command-safejs/types.d.ts +85 -0
  397. package/dist/safe-bash-command-safejs/types.js +7 -0
  398. package/dist/safe-bash-command-safejs/values.d.ts +7 -0
  399. package/dist/safe-bash-command-safejs/values.js +19 -0
  400. package/dist/safe-bash-command-sips/index.js +1 -14
  401. package/dist/safe-bash-command-ssconvert/index.js +413 -546
  402. package/dist/safe-bash-command-ssconvert/rendering/chart/axis.d.ts +1 -26
  403. package/dist/safe-bash-command-ssconvert/rendering/chart/error-bar.d.ts +1 -39
  404. package/dist/safe-bash-command-ssconvert/rendering/chart/layout.d.ts +1 -24
  405. package/dist/safe-bash-command-ssconvert/rendering/chart/line.d.ts +1 -23
  406. package/dist/safe-bash-command-ssconvert/rendering/chart/marker.d.ts +1 -35
  407. package/dist/safe-bash-command-ssconvert/rendering/chart/pie.d.ts +1 -32
  408. package/dist/safe-bash-command-ssconvert/rendering/images/index.d.ts +1 -26
  409. package/dist/safe-bash-command-ssconvert/rendering/print/header-footer.d.ts +1 -16
  410. package/dist/safe-bash-command-ssconvert/rendering/print/layout.d.ts +1 -65
  411. package/dist/safe-bash-command-ssconvert/rendering/print/pagination.d.ts +1 -34
  412. package/dist/safe-bash-command-tar/create.js +4 -4
  413. package/dist/safe-bash-command-tar/extract.js +4 -4
  414. package/dist/safe-bash-command-tar/index.js +16 -14
  415. package/dist/safe-bash-command-tar/modes.js +6 -6
  416. package/dist/safe-bash-command-tar/options.d.ts +3 -1
  417. package/dist/safe-bash-command-tar/options.js +1 -1
  418. package/dist/safe-bash-command-unzip/index.js +4 -4
  419. package/dist/safe-bash-command-wdiff/LICENSE +21 -0
  420. package/dist/safe-bash-command-wdiff/index.d.ts +12 -0
  421. package/dist/safe-bash-command-wdiff/index.js +123 -0
  422. package/dist/safe-bash-compression-engine/bounded-codec.js +2 -2
  423. package/dist/safe-bash-compression-engine/codec-loader.js +1 -1
  424. package/dist/safe-bash-compression-engine/files.js +5 -5
  425. package/dist/safe-bash-compression-engine/index.js +4 -4
  426. package/dist/safe-bash-compression-engine/operand.js +5 -5
  427. package/dist/safe-bash-compression-engine/stream.js +4 -4
  428. package/dist/safe-bash-compression-engine/zstd-decode.js +3 -3
  429. package/dist/safe-bash-contracts/escaping.js +2 -2
  430. package/dist/safe-bash-contracts/index.js +15 -15
  431. package/dist/safe-bash-docx-engine/admission.js +31 -0
  432. package/dist/safe-bash-docx-engine/ancillary-resources.js +38 -0
  433. package/dist/safe-bash-docx-engine/archive.js +24 -0
  434. package/dist/safe-bash-docx-engine/argument-json.js +25 -0
  435. package/dist/safe-bash-docx-engine/batch-operations.d.ts +7 -0
  436. package/dist/safe-bash-docx-engine/batch-operations.js +95 -0
  437. package/dist/safe-bash-docx-engine/batch-result-schema.d.ts +2 -0
  438. package/dist/safe-bash-docx-engine/batch-result-schema.js +145 -0
  439. package/dist/safe-bash-docx-engine/batch.js +106 -0
  440. package/dist/safe-bash-docx-engine/bookmarks.js +43 -0
  441. package/dist/safe-bash-docx-engine/budget.js +18 -0
  442. package/dist/safe-bash-docx-engine/charts.js +35 -0
  443. package/dist/safe-bash-docx-engine/command-option-rules.d.ts +1 -0
  444. package/dist/safe-bash-docx-engine/command-option-rules.js +24 -0
  445. package/dist/safe-bash-docx-engine/command-properties.d.ts +1 -0
  446. package/dist/safe-bash-docx-engine/command-properties.js +18 -0
  447. package/dist/safe-bash-docx-engine/command-selection.d.ts +1 -0
  448. package/dist/safe-bash-docx-engine/command-selection.js +15 -0
  449. package/dist/safe-bash-docx-engine/comments.js +53 -0
  450. package/dist/safe-bash-docx-engine/control-bindings.js +45 -0
  451. package/dist/safe-bash-docx-engine/control-repeat.js +46 -0
  452. package/dist/safe-bash-docx-engine/controls.js +52 -0
  453. package/dist/safe-bash-docx-engine/create.js +36 -0
  454. package/dist/safe-bash-docx-engine/diagrams.js +43 -0
  455. package/dist/safe-bash-docx-engine/diff.js +33 -0
  456. package/dist/safe-bash-docx-engine/discovery-result-schema.d.ts +72 -0
  457. package/dist/safe-bash-docx-engine/discovery-result-schema.js +36 -0
  458. package/dist/safe-bash-docx-engine/document-properties.js +43 -0
  459. package/dist/safe-bash-docx-engine/equations.js +53 -0
  460. package/dist/safe-bash-docx-engine/extract.js +40 -0
  461. package/dist/safe-bash-docx-engine/fields.js +48 -0
  462. package/dist/safe-bash-docx-engine/font-inventory.js +40 -0
  463. package/dist/safe-bash-docx-engine/font-resources.js +33 -0
  464. package/dist/safe-bash-docx-engine/image-batch-operations.d.ts +4 -0
  465. package/dist/safe-bash-docx-engine/image-batch-operations.js +35 -0
  466. package/dist/safe-bash-docx-engine/image-insertion.js +46 -0
  467. package/dist/safe-bash-docx-engine/image-layout.js +43 -0
  468. package/dist/safe-bash-docx-engine/image-replacement.js +48 -0
  469. package/dist/safe-bash-docx-engine/images.js +49 -0
  470. package/dist/safe-bash-docx-engine/index.d.ts +1 -3
  471. package/dist/safe-bash-docx-engine/index.js +369 -19350
  472. package/dist/safe-bash-docx-engine/inspection.js +49 -0
  473. package/dist/safe-bash-docx-engine/invocation.d.ts +50 -0
  474. package/dist/safe-bash-docx-engine/invocation.js +66 -0
  475. package/dist/safe-bash-docx-engine/io-errors.js +11 -0
  476. package/dist/safe-bash-docx-engine/io.js +29 -0
  477. package/dist/safe-bash-docx-engine/links.js +47 -0
  478. package/dist/safe-bash-docx-engine/lists.js +46 -0
  479. package/dist/safe-bash-docx-engine/location-token.js +27 -0
  480. package/dist/safe-bash-docx-engine/locations.js +39 -0
  481. package/dist/safe-bash-docx-engine/model-context.js +15 -0
  482. package/dist/safe-bash-docx-engine/model-errors.js +13 -0
  483. package/dist/safe-bash-docx-engine/notes.js +48 -0
  484. package/dist/safe-bash-docx-engine/objects.js +49 -0
  485. package/dist/safe-bash-docx-engine/operation-json-schema.js +21 -0
  486. package/dist/safe-bash-docx-engine/operation-schema.js +29 -0
  487. package/dist/safe-bash-docx-engine/pack-uri-batch-operations.d.ts +3 -0
  488. package/dist/safe-bash-docx-engine/pack-uri-batch-operations.js +15 -0
  489. package/dist/safe-bash-docx-engine/pack.js +38 -0
  490. package/dist/safe-bash-docx-engine/package-view-batch-operations.d.ts +4 -0
  491. package/dist/safe-bash-docx-engine/package-view-batch-operations.js +47 -0
  492. package/dist/safe-bash-docx-engine/package-xml.js +25 -0
  493. package/dist/safe-bash-docx-engine/pandoc-adapter.js +55 -6
  494. package/dist/safe-bash-docx-engine/paragraph-edit.js +52 -0
  495. package/dist/safe-bash-docx-engine/part-provider.js +18 -0
  496. package/dist/safe-bash-docx-engine/property-values.js +46 -0
  497. package/dist/safe-bash-docx-engine/publication.js +40 -0
  498. package/dist/safe-bash-docx-engine/removal.js +44 -0
  499. package/dist/safe-bash-docx-engine/revision-decisions.js +46 -0
  500. package/dist/safe-bash-docx-engine/revision-edit.js +43 -0
  501. package/dist/safe-bash-docx-engine/revisions.js +42 -0
  502. package/dist/safe-bash-docx-engine/run-format.js +43 -0
  503. package/dist/safe-bash-docx-engine/sanitize.js +59 -0
  504. package/dist/safe-bash-docx-engine/sections.js +47 -0
  505. package/dist/safe-bash-docx-engine/settings.js +36 -0
  506. package/dist/safe-bash-docx-engine/shape-edit.js +47 -0
  507. package/dist/safe-bash-docx-engine/signatures.js +42 -0
  508. package/dist/safe-bash-docx-engine/simple-selection.d.ts +1 -1
  509. package/dist/safe-bash-docx-engine/stories.js +48 -0
  510. package/dist/safe-bash-docx-engine/structure-model-batch-operations.d.ts +3 -0
  511. package/dist/safe-bash-docx-engine/structure-model-batch-operations.js +64 -0
  512. package/dist/safe-bash-docx-engine/style-model-batch-operations.js +57 -0
  513. package/dist/safe-bash-docx-engine/style-model-result-schema.d.ts +4 -0
  514. package/dist/safe-bash-docx-engine/style-model-result-schema.js +76 -0
  515. package/dist/safe-bash-docx-engine/styles.js +44 -0
  516. package/dist/safe-bash-docx-engine/table-edit.js +52 -0
  517. package/dist/safe-bash-docx-engine/table-read.js +38 -0
  518. package/dist/safe-bash-docx-engine/template.js +45 -0
  519. package/dist/safe-bash-docx-engine/text-replace.js +47 -0
  520. package/dist/safe-bash-docx-engine/text-resource-read.js +42 -0
  521. package/dist/safe-bash-docx-engine/text.js +36 -0
  522. package/dist/safe-bash-docx-engine/validation.js +30 -0
  523. package/dist/safe-bash-docx-engine/xml-parts.js +48 -0
  524. package/dist/safe-bash-markdown-engine/index.js +3 -3
  525. package/dist/safe-bash-network-engine/aggregate.js +3 -3
  526. package/dist/safe-bash-network-engine/args.js +3 -3
  527. package/dist/safe-bash-network-engine/body.js +4 -4
  528. package/dist/safe-bash-network-engine/decode.js +3 -3
  529. package/dist/safe-bash-network-engine/fetch-transport.js +3 -3
  530. package/dist/safe-bash-network-engine/index.js +3 -3
  531. package/dist/safe-bash-network-engine/output.js +3 -3
  532. package/dist/safe-bash-network-engine/platform-portable.js +3 -3
  533. package/dist/safe-bash-network-engine/shared.js +2 -2
  534. package/dist/safe-bash-network-engine/transfer.js +20 -20
  535. package/dist/safe-bash-pptx-engine/bytes.d.ts +1 -4
  536. package/dist/safe-bash-pptx-engine/bytes.js +2 -11
  537. package/dist/safe-bash-pptx-engine/index.d.ts +1 -103
  538. package/dist/safe-bash-pptx-engine/index.js +1 -662
  539. package/dist/safe-bash-presentation-engine/LICENSE +21 -0
  540. package/dist/safe-bash-presentation-engine/accessibility.js +43 -0
  541. package/dist/safe-bash-presentation-engine/animation-editing.js +29 -0
  542. package/dist/safe-bash-presentation-engine/animations.js +23 -0
  543. package/dist/safe-bash-presentation-engine/backgrounds.js +26 -0
  544. package/dist/safe-bash-presentation-engine/bytes.d.ts +4 -0
  545. package/dist/safe-bash-presentation-engine/bytes.js +13 -0
  546. package/dist/safe-bash-presentation-engine/chart-editing.js +60 -0
  547. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-enums.d.ts +2 -2
  548. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-object-operations.d.ts +1 -1
  549. package/dist/safe-bash-presentation-engine/chart-object-operations.js +35 -0
  550. package/dist/safe-bash-presentation-engine/charts.js +41 -0
  551. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/color-enums.d.ts +5 -5
  552. package/dist/safe-bash-presentation-engine/command-placeholder.js +64 -0
  553. package/dist/safe-bash-presentation-engine/comments.js +32 -0
  554. package/dist/safe-bash-presentation-engine/connector-operations.js +50 -0
  555. package/dist/safe-bash-presentation-engine/connectors.js +49 -0
  556. package/dist/safe-bash-presentation-engine/content-types.js +9 -0
  557. package/dist/safe-bash-presentation-engine/contracts.js +0 -0
  558. package/dist/safe-bash-presentation-engine/creation.js +15 -0
  559. package/dist/safe-bash-presentation-engine/diff.js +40 -0
  560. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/drawing-enums.d.ts +20 -20
  561. package/dist/safe-bash-presentation-engine/drawing-format.js +44 -0
  562. package/dist/safe-bash-presentation-engine/drawing-operations.js +41 -0
  563. package/dist/safe-bash-presentation-engine/drawing-schema.d.ts +1549 -0
  564. package/dist/safe-bash-presentation-engine/drawing-schema.js +33 -0
  565. package/dist/safe-bash-presentation-engine/equations.js +30 -0
  566. package/dist/safe-bash-presentation-engine/errors.js +23 -0
  567. package/dist/safe-bash-presentation-engine/fields.js +32 -0
  568. package/dist/safe-bash-presentation-engine/font-metrics.js +12 -0
  569. package/dist/safe-bash-presentation-engine/image-extraction.js +29 -0
  570. package/dist/safe-bash-presentation-engine/image-formatting.js +43 -0
  571. package/dist/safe-bash-presentation-engine/image-insertion.js +26 -0
  572. package/dist/safe-bash-presentation-engine/image-metadata.d.ts +9 -0
  573. package/dist/safe-bash-presentation-engine/image-metadata.js +9 -0
  574. package/dist/safe-bash-presentation-engine/image-replacement.js +30 -0
  575. package/dist/safe-bash-presentation-engine/image-value.js +15 -0
  576. package/dist/safe-bash-presentation-engine/images.js +30 -0
  577. package/dist/safe-bash-presentation-engine/index.d.ts +100 -0
  578. package/dist/safe-bash-presentation-engine/index.js +791 -0
  579. package/dist/safe-bash-presentation-engine/layouts.js +31 -0
  580. package/dist/safe-bash-presentation-engine/length.js +21 -0
  581. package/dist/safe-bash-presentation-engine/links.js +33 -0
  582. package/dist/safe-bash-presentation-engine/masters.js +54 -0
  583. package/dist/safe-bash-presentation-engine/media-editing.js +35 -0
  584. package/dist/safe-bash-presentation-engine/media-extraction.js +24 -0
  585. package/dist/safe-bash-presentation-engine/media.js +23 -0
  586. package/dist/safe-bash-presentation-engine/memberships.js +24 -0
  587. package/dist/safe-bash-presentation-engine/notes.js +27 -0
  588. package/dist/safe-bash-presentation-engine/ole-enum.js +10 -0
  589. package/dist/safe-bash-presentation-engine/ole-insertion.js +29 -0
  590. package/dist/safe-bash-presentation-engine/opaque-objects.js +21 -0
  591. package/dist/safe-bash-presentation-engine/package-reader.js +13 -0
  592. package/dist/safe-bash-presentation-engine/package-tools.js +25 -0
  593. package/dist/safe-bash-presentation-engine/package-uri.d.ts +13 -0
  594. package/dist/safe-bash-presentation-engine/package-uri.js +16 -0
  595. package/dist/safe-bash-presentation-engine/package-writer.js +13 -0
  596. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/presentation-model.d.ts +1 -1
  597. package/dist/safe-bash-presentation-engine/presentation-model.js +63 -0
  598. package/dist/safe-bash-presentation-engine/presentation-settings.js +25 -0
  599. package/dist/safe-bash-presentation-engine/properties.js +37 -0
  600. package/dist/safe-bash-presentation-engine/publication.d.ts +10 -0
  601. package/dist/safe-bash-presentation-engine/publication.js +0 -0
  602. package/dist/safe-bash-presentation-engine/relationships.js +16 -0
  603. package/dist/safe-bash-presentation-engine/resource-limits.js +8 -0
  604. package/dist/safe-bash-presentation-engine/sanitize.js +24 -0
  605. package/dist/safe-bash-presentation-engine/selector-schema.js +7 -0
  606. package/dist/safe-bash-presentation-engine/selectors.js +26 -0
  607. package/dist/safe-bash-presentation-engine/shape-groups.js +47 -0
  608. package/dist/safe-bash-presentation-engine/shape-operations.js +48 -0
  609. package/dist/safe-bash-presentation-engine/shape-path-operations.js +44 -0
  610. package/dist/safe-bash-presentation-engine/shape-paths.js +31 -0
  611. package/dist/safe-bash-presentation-engine/shape-presets.js +11 -0
  612. package/dist/safe-bash-presentation-engine/shape-selection.js +43 -0
  613. package/dist/safe-bash-presentation-engine/shape-transforms.js +28 -0
  614. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-types.d.ts +1 -1
  615. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shapes.d.ts +1 -1
  616. package/dist/safe-bash-presentation-engine/shapes.js +66 -0
  617. package/dist/safe-bash-presentation-engine/slide-copy.js +24 -0
  618. package/dist/safe-bash-presentation-engine/slide-import.js +27 -0
  619. package/dist/safe-bash-presentation-engine/slide-merge-split.js +33 -0
  620. package/dist/safe-bash-presentation-engine/slide-model.js +74 -0
  621. package/dist/safe-bash-presentation-engine/slide-removal.js +25 -0
  622. package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +17 -0
  623. package/dist/safe-bash-presentation-engine/slides.js +26 -0
  624. package/dist/safe-bash-presentation-engine/table-operations.js +51 -0
  625. package/dist/safe-bash-presentation-engine/table-spans.js +42 -0
  626. package/dist/safe-bash-presentation-engine/tables.js +45 -0
  627. package/dist/safe-bash-presentation-engine/tags.js +25 -0
  628. package/dist/safe-bash-presentation-engine/template-bindings.js +44 -0
  629. package/dist/safe-bash-presentation-engine/template-repeat.js +51 -0
  630. package/dist/safe-bash-presentation-engine/text-fitting.js +39 -0
  631. package/dist/safe-bash-presentation-engine/text-frames.js +52 -0
  632. package/dist/safe-bash-presentation-engine/text-paragraphs.js +58 -0
  633. package/dist/safe-bash-presentation-engine/text-reading.js +23 -0
  634. package/dist/safe-bash-presentation-engine/text-replacement.js +24 -0
  635. package/dist/safe-bash-presentation-engine/text-runs.js +45 -0
  636. package/dist/safe-bash-presentation-engine/themes.js +31 -0
  637. package/dist/safe-bash-presentation-engine/transitions.js +27 -0
  638. package/dist/safe-bash-presentation-engine/validation.js +14 -0
  639. package/dist/safe-bash-presentation-engine/xml-parts.js +25 -0
  640. package/dist/safe-bash-presentation-engine/xml-view.js +8 -0
  641. package/dist/safe-bash-presentation-engine/xml.js +8 -0
  642. package/dist/safe-bash-sqlite-engine/sqlite-edit-snapshot.d.ts +15 -0
  643. package/dist/safe-bash-sqlite-engine/sqlite-finalization.d.ts +7 -0
  644. package/dist/safe-bash-sqlite-engine/sqlite-pages.d.ts +18 -0
  645. package/dist/safe-bash-sqlite-engine/sqlite-record-read.d.ts +8 -0
  646. package/dist/safe-bash-sqlite-engine/sqlite-record-write.d.ts +20 -0
  647. package/dist/safe-bash-sqlite-engine/storage.d.ts +2 -0
  648. package/dist/safe-bash-sqlite-engine/storage.js +236 -55
  649. package/dist/safe-bash-svg-engine/LICENSE +21 -0
  650. package/dist/safe-bash-svg-engine/index.d.ts +8 -0
  651. package/dist/safe-bash-svg-engine/index.js +477 -0
  652. package/dist/safe-bash-zip-engine/index.js +3 -3
  653. package/dist/safe-bash-zip-engine/zip/repair.js +3 -3
  654. package/dist/safe-bash-zip-engine/zip/sfx.js +3 -3
  655. package/dist/safe-bash-zip-engine/zip-format.js +3 -3
  656. package/dist/safe-playwright-cloudflare/browser-provider.generated.js +55 -18
  657. package/dist/safe-playwright-cloudflare/browser-run-code-guest.generated.js +1 -1
  658. package/dist/spreadsheet-engine/datasource.js +4 -1
  659. package/dist/spreadsheet-engine/formulas/functions/math.js +3 -1
  660. package/dist/spreadsheet-engine/rendering/chart/axis.d.ts +26 -0
  661. package/dist/spreadsheet-engine/rendering/chart/axis.js +61 -0
  662. package/dist/spreadsheet-engine/rendering/chart/error-bar.d.ts +39 -0
  663. package/dist/spreadsheet-engine/rendering/chart/error-bar.js +59 -0
  664. package/dist/spreadsheet-engine/rendering/chart/layout.d.ts +24 -0
  665. package/dist/spreadsheet-engine/rendering/chart/layout.js +54 -0
  666. package/dist/spreadsheet-engine/rendering/chart/line.d.ts +23 -0
  667. package/dist/spreadsheet-engine/rendering/chart/line.js +56 -0
  668. package/dist/spreadsheet-engine/rendering/chart/marker.d.ts +35 -0
  669. package/dist/spreadsheet-engine/rendering/chart/marker.js +52 -0
  670. package/dist/spreadsheet-engine/rendering/chart/pie.d.ts +32 -0
  671. package/dist/spreadsheet-engine/rendering/chart/pie.js +47 -0
  672. package/dist/{safe-bash-command-ssconvert → spreadsheet-engine}/rendering/images/codecs.d.ts +0 -1
  673. package/dist/spreadsheet-engine/rendering/images/codecs.js +253 -0
  674. package/dist/spreadsheet-engine/rendering/images/index.d.ts +26 -0
  675. package/dist/spreadsheet-engine/rendering/images/index.js +144 -0
  676. package/dist/spreadsheet-engine/rendering/images/profile-raster.d.ts +4 -0
  677. package/dist/spreadsheet-engine/rendering/images/profile-raster.js +72 -0
  678. package/dist/spreadsheet-engine/rendering/images/scene.d.ts +3 -0
  679. package/dist/spreadsheet-engine/rendering/images/scene.js +34 -0
  680. package/dist/spreadsheet-engine/rendering/print/cell-style.d.ts +10 -0
  681. package/dist/spreadsheet-engine/rendering/print/cell-style.js +52 -0
  682. package/dist/spreadsheet-engine/rendering/print/font-normalization-data.d.ts +43 -0
  683. package/dist/spreadsheet-engine/rendering/print/font-normalization-data.js +1558 -0
  684. package/dist/spreadsheet-engine/rendering/print/font-normalization.d.ts +3 -0
  685. package/dist/spreadsheet-engine/rendering/print/font-normalization.js +113 -0
  686. package/dist/spreadsheet-engine/rendering/print/font-shaping.d.ts +18 -0
  687. package/dist/spreadsheet-engine/rendering/print/font-shaping.js +271 -0
  688. package/dist/spreadsheet-engine/rendering/print/harfbuzz/data.d.ts +1 -0
  689. package/dist/spreadsheet-engine/rendering/print/harfbuzz/data.js +2 -0
  690. package/dist/spreadsheet-engine/rendering/print/header-footer.d.ts +16 -0
  691. package/dist/spreadsheet-engine/rendering/print/header-footer.js +92 -0
  692. package/dist/spreadsheet-engine/rendering/print/layout.d.ts +65 -0
  693. package/dist/spreadsheet-engine/rendering/print/layout.js +75 -0
  694. package/dist/spreadsheet-engine/rendering/print/pagination.d.ts +34 -0
  695. package/dist/spreadsheet-engine/rendering/print/pagination.js +126 -0
  696. package/dist/spreadsheet-engine/rendering/print/settings.d.ts +42 -0
  697. package/dist/spreadsheet-engine/rendering/print/settings.js +159 -0
  698. package/dist/spreadsheet-format-xls/biff-metadata.js +3 -3
  699. package/dist/spreadsheet-format-xls/biff-write-metadata.d.ts +1 -1
  700. package/dist/spreadsheet-format-xls/biff-write-metadata.js +20 -3
  701. package/dist/spreadsheet-format-xls/biff-write.js +1 -1
  702. package/package.json +239 -12
  703. package/third-party/spreadsheet-engine/scripts/harfbuzz/README.md +39 -0
  704. package/third-party/spreadsheet-engine/scripts/harfbuzz/allocator.cc +18 -0
  705. package/third-party/spreadsheet-engine/scripts/harfbuzz/build.mjs +94 -0
  706. package/third-party/spreadsheet-engine/scripts/harfbuzz/completion.patch +98 -0
  707. package/third-party/spreadsheet-engine/scripts/harfbuzz/config-override.h +19 -0
  708. package/third-party/spreadsheet-engine/scripts/harfbuzz/exports.json +29 -0
  709. package/third-party/spreadsheet-engine/scripts/harfbuzz/sources.json +274 -0
  710. package/third-party/spreadsheet-engine/scripts/harfbuzz/verify.d.mts +10 -0
  711. package/third-party/spreadsheet-engine/scripts/harfbuzz/verify.mjs +96 -0
  712. package/third-party/spreadsheet-engine/scripts/harfbuzz/verify.test.mjs +60 -0
  713. package/third-party/spreadsheet-engine/src/rendering/images/NOTICE.md +22 -0
  714. package/third-party/spreadsheet-engine/src/rendering/print/NOTICE.md +30 -0
  715. package/third-party/spreadsheet-engine/src/rendering/print/font-normalization-NOTICE.md +64 -0
  716. package/third-party/spreadsheet-engine/src/rendering/print/font-normalization-data.ts +1558 -0
  717. package/third-party/spreadsheet-engine/src/rendering/print/font-normalization.ts +91 -0
  718. package/third-party/spreadsheet-engine/src/rendering/print/harfbuzz/EMSCRIPTEN-LICENSE.txt +102 -0
  719. package/third-party/spreadsheet-engine/src/rendering/print/harfbuzz/HARFBUZZ-LICENSE.txt +42 -0
  720. package/third-party/spreadsheet-engine/src/rendering/print/harfbuzz/LIBCXX-LICENSE.txt +311 -0
  721. package/third-party/spreadsheet-engine/src/rendering/print/harfbuzz/LIBCXXABI-LICENSE.txt +311 -0
  722. package/third-party/spreadsheet-engine/src/rendering/print/harfbuzz/MUSL-LICENSE.txt +193 -0
  723. package/third-party/spreadsheet-engine/src/rendering/print/harfbuzz/NOTICE.md +41 -0
  724. package/third-party/spreadsheet-engine/src/rendering/print/harfbuzz/data.ts +2 -0
  725. package/dist/safe-bash/command-chunks/chunk-C5TUE2FE.js +0 -169
  726. package/dist/safe-bash/command-chunks/chunk-CVKW2YIC.js +0 -13631
  727. package/dist/safe-bash/command-chunks/chunk-JBGGUHQY.js +0 -17617
  728. package/dist/safe-bash/command-chunks/chunk-S4R2JDPL.js +0 -35
  729. package/dist/safe-bash/command-chunks/chunk-TU5IFVCX.js +0 -33708
  730. package/dist/safe-bash/command-chunks/chunk-TUWGIF22.js +0 -328
  731. package/dist/safe-bash/command-chunks/data-2FJOPYXA-PDKMLCGR.js +0 -8
  732. package/dist/safe-bash/command-chunks/index.browser-2NLML6H4.js +0 -269
  733. package/dist/safe-bash/command-chunks/model-store-EEI3QS4G.js +0 -10
  734. package/dist/safe-bash/command-chunks/pdf-M2GFAR2A-FCJMJCAP.js +0 -683
  735. package/dist/safe-bash-command-ssconvert/rendering/images/formats.d.ts +0 -2
  736. package/dist/safe-bash-docx-engine/command.d.ts +0 -65
  737. package/dist/safe-bash/chunks/{chunk-4T4RQYRI.js → chunk-5HRGBHZH.js} +10 -10
  738. package/dist/safe-bash/chunks/{chunk-QUS6X4MS.js → chunk-EOQMDRTY.js} +0 -0
  739. package/dist/safe-bash/command-chunks/{chunk-2L3JKGUH.js → chunk-4LYZBDZF.js} +4 -4
  740. package/dist/safe-bash/command-chunks/{chunk-EMMSXKEJ.js → chunk-4Q4R3VZU.js} +0 -0
  741. package/dist/safe-bash/command-chunks/{chunk-5RLK2QSY.js → chunk-7JEIWA3A.js} +5 -5
  742. package/dist/safe-bash/command-chunks/{chunk-AV6N7DDA.js → chunk-DDYPQAXN.js} +3 -3
  743. package/dist/safe-bash/command-chunks/{chunk-OOB7YCFQ.js → chunk-FMJKCVSQ.js} +3 -3
  744. package/dist/safe-bash/command-chunks/{chunk-FUL2C4EX.js → chunk-HFKS6AET.js} +3 -3
  745. package/dist/safe-bash/command-chunks/{chunk-2M3WUEDX.js → chunk-J6K5Q53O.js} +10 -10
  746. package/dist/safe-bash/command-chunks/{chunk-ATWMLV75.js → chunk-RJXZYDSN.js} +7 -7
  747. package/dist/safe-bash/command-chunks/{chunk-JD3NSHFT.js → chunk-TVGIJ56E.js} +3 -3
  748. package/dist/safe-bash/command-chunks/{chunk-3I33KPQH.js → chunk-X2HVVMTW.js} +6 -6
  749. package/dist/safe-bash/command-chunks/{odf-UKSXPNOZ-NCL5P7YL.js → odf-UKSXPNOZ-BV2LCKTB.js} +0 -0
  750. package/dist/{safe-bash/command-chunks/chunk-3SVT5VB7.js → safe-bash-docx-engine/operation-types.js} +0 -0
  751. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/accessibility.d.ts +0 -0
  752. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/animation-editing.d.ts +0 -0
  753. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/animations.d.ts +0 -0
  754. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/backgrounds.d.ts +0 -0
  755. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-data-model.d.ts +0 -0
  756. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-editing.d.ts +0 -0
  757. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-font-operations.d.ts +0 -0
  758. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-model-axes.d.ts +0 -0
  759. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-model-core.d.ts +0 -0
  760. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-model-series.d.ts +0 -0
  761. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-model.d.ts +0 -0
  762. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-objects.d.ts +0 -0
  763. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/chart-workbook.d.ts +0 -0
  764. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/charts.d.ts +0 -0
  765. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/command-placeholder.d.ts +0 -0
  766. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/comments.d.ts +0 -0
  767. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/connector-operations.d.ts +0 -0
  768. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/connectors-model.d.ts +0 -0
  769. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/connectors.d.ts +0 -0
  770. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/content-types.d.ts +0 -0
  771. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/contracts.d.ts +0 -0
  772. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/creation.d.ts +0 -0
  773. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/diagram-resources.d.ts +0 -0
  774. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/diff.d.ts +0 -0
  775. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/drawing-format.d.ts +0 -0
  776. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/drawing-operations.d.ts +0 -0
  777. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/equations.d.ts +0 -0
  778. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/errors.d.ts +0 -0
  779. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/fields.d.ts +0 -0
  780. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/font-metrics.d.ts +0 -0
  781. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/freeform-builder.d.ts +0 -0
  782. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/group-model.d.ts +0 -0
  783. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/image-extraction.d.ts +0 -0
  784. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/image-formatting.d.ts +0 -0
  785. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/image-insertion.d.ts +0 -0
  786. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/image-replacement.d.ts +0 -0
  787. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/image-value.d.ts +0 -0
  788. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/images.d.ts +0 -0
  789. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/inventory.d.ts +0 -0
  790. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/language-enum.d.ts +0 -0
  791. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/layouts.d.ts +0 -0
  792. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/length.d.ts +0 -0
  793. package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/links-model.d.ts +4 -4
  794. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/links.d.ts +0 -0
  795. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/masters.d.ts +0 -0
  796. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/media-editing.d.ts +0 -0
  797. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/media-enum.d.ts +0 -0
  798. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/media-extraction.d.ts +0 -0
  799. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/media.d.ts +0 -0
  800. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/memberships.d.ts +0 -0
  801. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/modern-comments.d.ts +0 -0
  802. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/notes.d.ts +0 -0
  803. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/ole-enum.d.ts +0 -0
  804. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/ole-insertion.d.ts +0 -0
  805. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/opaque-objects.d.ts +0 -0
  806. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/package-reader.d.ts +0 -0
  807. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/package-tools.d.ts +0 -0
  808. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/package-view.d.ts +0 -0
  809. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/package-writer.d.ts +0 -0
  810. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/paragraph-alignment.d.ts +0 -0
  811. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/presentation-settings.d.ts +0 -0
  812. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/properties.d.ts +0 -0
  813. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/relationships.d.ts +0 -0
  814. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/resource-limits.d.ts +0 -0
  815. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/sanitize.d.ts +0 -0
  816. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/selector-schema.d.ts +0 -0
  817. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/selectors.d.ts +0 -0
  818. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-adjustments.d.ts +0 -0
  819. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-groups.d.ts +0 -0
  820. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-operations.d.ts +0 -0
  821. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-path-operations.d.ts +0 -0
  822. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-paths.d.ts +0 -0
  823. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-placeholder-types.d.ts +0 -0
  824. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-presets.d.ts +0 -0
  825. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-selection.d.ts +0 -0
  826. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/shape-transforms.d.ts +0 -0
  827. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slide-copy.d.ts +0 -0
  828. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slide-import.d.ts +0 -0
  829. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slide-layout-model.d.ts +0 -0
  830. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slide-merge-split.d.ts +0 -0
  831. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slide-model.d.ts +0 -0
  832. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slide-removal.d.ts +0 -0
  833. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slide-transfer-budget.d.ts +0 -0
  834. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/slides.d.ts +0 -0
  835. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/table-operations.d.ts +0 -0
  836. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/table-spans.d.ts +0 -0
  837. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/tables-model.d.ts +0 -0
  838. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/tables.d.ts +0 -0
  839. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/tags.d.ts +0 -0
  840. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/template-bindings.d.ts +0 -0
  841. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/template-repeat.d.ts +0 -0
  842. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-fitting.d.ts +0 -0
  843. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-frame-enums.d.ts +0 -0
  844. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-frames.d.ts +0 -0
  845. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-paragraphs.d.ts +0 -0
  846. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-reading.d.ts +0 -0
  847. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-replacement.d.ts +0 -0
  848. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-run-color.d.ts +0 -0
  849. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-runs.d.ts +0 -0
  850. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/text-style-resolution.d.ts +0 -0
  851. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/themes.d.ts +0 -0
  852. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/transitions.d.ts +0 -0
  853. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/validation.d.ts +0 -0
  854. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/xml-parts.d.ts +0 -0
  855. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/xml-view.d.ts +0 -0
  856. /package/dist/{safe-bash-pptx-engine → safe-bash-presentation-engine}/xml.d.ts +0 -0
@@ -0,0 +1,1298 @@
1
+ import "../safe-bash/command-chunks/chunk-65DS4IOB.js";
2
+
3
+ // packages/graphviz-ast/src/dot.ts
4
+ var compass = /* @__PURE__ */ new Set(["n", "ne", "e", "se", "s", "sw", "w", "nw", "c", "_"]);
5
+ var whitespace = (c) => c === " " || c === "\n" || c === "\r" || c === " " || c === "\f";
6
+ var digit = (c) => c >= "0" && c <= "9";
7
+ var letter = (c) => c === "_" || c >= "a" && c <= "z" || c >= "A" && c <= "Z" || c.charCodeAt(0) >= 128;
8
+ function tokenize(source) {
9
+ const tokens = [];
10
+ let i = 0;
11
+ const fail = (message) => {
12
+ throw new SyntaxError(`${message} at offset ${i}`);
13
+ };
14
+ while (i < source.length) {
15
+ const c = source[i];
16
+ if (whitespace(c)) {
17
+ i++;
18
+ continue;
19
+ }
20
+ if (c === "#" || source.startsWith("//", i)) {
21
+ while (i < source.length && source[i] !== "\n") i++;
22
+ continue;
23
+ }
24
+ if (source.startsWith("/*", i)) {
25
+ const end = source.indexOf("*/", i + 2);
26
+ if (end < 0) fail("Unterminated comment");
27
+ i = end + 2;
28
+ continue;
29
+ }
30
+ const offset = i;
31
+ if (source.startsWith("->", i) || source.startsWith("--", i)) {
32
+ tokens.push({ value: source.slice(i, i + 2), kind: "symbol", offset });
33
+ i += 2;
34
+ continue;
35
+ }
36
+ if ("{}[]=:;, +".includes(c)) {
37
+ tokens.push({ value: c, kind: "symbol", offset });
38
+ i++;
39
+ continue;
40
+ }
41
+ if (c === '"') {
42
+ let value = "";
43
+ i++;
44
+ while (i < source.length && source[i] !== '"') {
45
+ if (source[i] === "\\") {
46
+ i++;
47
+ if (i === source.length) fail("Unterminated escape");
48
+ if (source[i] === "\n") {
49
+ i++;
50
+ continue;
51
+ }
52
+ if (source[i] === "\r" && source[i + 1] === "\n") {
53
+ i += 2;
54
+ continue;
55
+ }
56
+ const escaped = source[i];
57
+ value += escaped === '"' || escaped === "\\" ? escaped : "\\" + escaped;
58
+ i++;
59
+ } else value += source[i++];
60
+ }
61
+ if (source[i] !== '"') fail("Unterminated string");
62
+ i++;
63
+ tokens.push({ value, kind: "quoted", offset });
64
+ continue;
65
+ }
66
+ if (c === "<") {
67
+ let depth = 0;
68
+ let quote = "";
69
+ do {
70
+ const ch = source[i++];
71
+ if (quote) {
72
+ if (ch === quote) quote = "";
73
+ } else if (ch === '"' || ch === "'") quote = ch;
74
+ else if (ch === "<") {
75
+ if (source.startsWith("!--", i)) {
76
+ const end = source.indexOf("-->", i + 3);
77
+ if (end < 0) fail("Unterminated HTML comment");
78
+ i = end + 3;
79
+ } else depth++;
80
+ } else if (ch === ">") depth--;
81
+ } while (i < source.length && depth > 0);
82
+ if (depth !== 0 || quote) fail("Unterminated HTML ID");
83
+ tokens.push({ value: source.slice(offset, i), kind: "html", offset });
84
+ continue;
85
+ }
86
+ if (letter(c)) {
87
+ i++;
88
+ while (i < source.length && (letter(source[i]) || digit(source[i]))) i++;
89
+ } else if (digit(c) || c === "." || c === "-") {
90
+ if (c === "-") i++;
91
+ let digits = 0;
92
+ while (i < source.length && digit(source[i])) {
93
+ i++;
94
+ digits++;
95
+ }
96
+ if (source[i] === ".") {
97
+ i++;
98
+ while (i < source.length && digit(source[i])) {
99
+ i++;
100
+ digits++;
101
+ }
102
+ }
103
+ if (!digits) fail("Invalid numeric ID");
104
+ } else fail("Unexpected character");
105
+ tokens.push({ value: source.slice(offset, i), kind: "id", offset });
106
+ }
107
+ tokens.push({ value: "", kind: "eof", offset: source.length });
108
+ return tokens;
109
+ }
110
+ function parseDot(source) {
111
+ const tokens = tokenize(source);
112
+ let position = 0;
113
+ let nesting = 0;
114
+ const peek = () => tokens[position];
115
+ const fail = (message) => {
116
+ throw new SyntaxError(`${message} at offset ${peek().offset}`);
117
+ };
118
+ const accept = (value) => {
119
+ if (peek().value !== value || peek().kind !== "symbol") return false;
120
+ position++;
121
+ return true;
122
+ };
123
+ const keyword = (value) => peek().kind === "id" && peek().value.toLowerCase() === value;
124
+ const expect = (value) => {
125
+ if (!accept(value)) fail(`Expected ${value}`);
126
+ };
127
+ const id = () => {
128
+ const token = peek();
129
+ if (!["id", "html", "quoted"].includes(token.kind)) fail("Expected ID");
130
+ position++;
131
+ let value = token.value;
132
+ if (token.kind === "quoted")
133
+ while (accept("+")) {
134
+ if (peek().kind !== "quoted") fail("Expected quoted string after +");
135
+ value += peek().value;
136
+ position++;
137
+ }
138
+ return value;
139
+ };
140
+ const attrs = () => {
141
+ const result = /* @__PURE__ */ Object.create(null);
142
+ while (accept("[")) {
143
+ while (!accept("]")) {
144
+ const key = id();
145
+ expect("=");
146
+ result[key] = id();
147
+ accept(",");
148
+ accept(";");
149
+ }
150
+ }
151
+ return { ...result };
152
+ };
153
+ const ref = (name) => {
154
+ const result = { id: name };
155
+ if (accept(":")) {
156
+ const port = id();
157
+ if (accept(":")) {
158
+ result.port = port;
159
+ result.compass = id();
160
+ if (!compass.has(result.compass)) fail("Invalid compass point");
161
+ } else if (compass.has(port)) result.compass = port;
162
+ else result.port = port;
163
+ }
164
+ return result;
165
+ };
166
+ let strict = false;
167
+ if (keyword("strict")) {
168
+ strict = true;
169
+ position++;
170
+ }
171
+ if (!keyword("digraph") && !keyword("graph")) fail("Expected graph or digraph");
172
+ const directed = keyword("digraph");
173
+ position++;
174
+ const graph = { kind: "graph", directed, strict, statements: [] };
175
+ if (peek().kind !== "symbol") graph.id = id();
176
+ function subgraph() {
177
+ const result = { kind: "subgraph", statements: [] };
178
+ if (keyword("subgraph")) {
179
+ position++;
180
+ if (peek().value !== "{") result.id = id();
181
+ }
182
+ result.statements = statements();
183
+ return result;
184
+ }
185
+ function statements() {
186
+ if (++nesting > 256) fail("DOT nesting exceeds 256");
187
+ expect("{");
188
+ const result = [];
189
+ while (!accept("}")) {
190
+ if (accept(";") || accept(",")) continue;
191
+ if (["graph", "node", "edge"].some(keyword) && tokens[position + 1]?.value === "[") {
192
+ const target = peek().value.toLowerCase();
193
+ position++;
194
+ result.push({ kind: "attributes", target, attributes: attrs() });
195
+ continue;
196
+ }
197
+ let endpoint;
198
+ if (keyword("subgraph") || peek().value === "{") endpoint = subgraph();
199
+ else {
200
+ const name = id();
201
+ if (accept("=")) {
202
+ result.push({ kind: "attributes", target: "graph", attributes: { [name]: id() } });
203
+ continue;
204
+ }
205
+ endpoint = ref(name);
206
+ }
207
+ if (peek().value === "->" || peek().value === "--") {
208
+ const endpoints = [endpoint];
209
+ while (peek().value === "->" || peek().value === "--") {
210
+ if (peek().value !== (directed ? "->" : "--")) fail("Wrong edge operator for graph type");
211
+ position++;
212
+ endpoints.push(keyword("subgraph") || peek().value === "{" ? subgraph() : ref(id()));
213
+ }
214
+ result.push({ kind: "edge", endpoints, attributes: attrs() });
215
+ } else if ("kind" in endpoint) result.push(endpoint);
216
+ else result.push({ kind: "node", node: endpoint, attributes: attrs() });
217
+ accept(";");
218
+ }
219
+ nesting--;
220
+ return result;
221
+ }
222
+ graph.statements = statements();
223
+ if (peek().kind !== "eof") fail("Trailing input");
224
+ return graph;
225
+ }
226
+
227
+ // packages/graphviz-ast/src/model.ts
228
+ function resolveGraph(graph) {
229
+ const nodes = /* @__PURE__ */ new Map();
230
+ const edges = [];
231
+ const strictEdges = /* @__PURE__ */ new Map();
232
+ const clusters = [];
233
+ const ranks = [];
234
+ function walk(statements, inherited, cluster) {
235
+ const scope = {
236
+ graph: { ...inherited.graph },
237
+ node: { ...inherited.node },
238
+ edge: { ...inherited.edge }
239
+ };
240
+ const ids = /* @__PURE__ */ new Set();
241
+ const node = (ref, attributes = {}) => {
242
+ let existing = nodes.get(ref.id);
243
+ if (!existing) {
244
+ existing = { id: ref.id, attributes: { ...scope.node } };
245
+ nodes.set(ref.id, existing);
246
+ }
247
+ Object.assign(existing.attributes, attributes);
248
+ ids.add(ref.id);
249
+ return ref;
250
+ };
251
+ const subgraph = (sub) => {
252
+ const isCluster = sub.id?.startsWith("cluster") ?? false;
253
+ const nested = walk(sub.statements, scope, isCluster ? sub.id : cluster);
254
+ for (const id of nested.ids) ids.add(id);
255
+ if (isCluster)
256
+ clusters.push({
257
+ id: sub.id,
258
+ attributes: nested.attributes,
259
+ nodes: nested.ids,
260
+ ...cluster !== void 0 ? { parent: cluster } : {}
261
+ });
262
+ if (nested.attributes.rank) ranks.push({ rank: nested.attributes.rank, nodes: nested.ids });
263
+ return nested.ids.map((id) => ({ id }));
264
+ };
265
+ for (const statement of statements) {
266
+ if (statement.kind === "attributes")
267
+ Object.assign(scope[statement.target], statement.attributes);
268
+ else if (statement.kind === "node") node(statement.node, statement.attributes);
269
+ else if (statement.kind === "subgraph") subgraph(statement);
270
+ else {
271
+ const endpoints = statement.endpoints.map(
272
+ (endpoint) => "kind" in endpoint ? subgraph(endpoint) : [node(endpoint)]
273
+ );
274
+ for (let i = 1; i < endpoints.length; i++)
275
+ for (const tail of endpoints[i - 1])
276
+ for (const head of endpoints[i]) {
277
+ const pair2 = graph.directed || tail.id <= head.id ? [tail.id, head.id] : [head.id, tail.id];
278
+ const key = JSON.stringify(pair2);
279
+ const existing = strictEdges.get(key);
280
+ if (graph.strict && existing) {
281
+ Object.assign(existing.attributes, statement.attributes);
282
+ continue;
283
+ }
284
+ const edge = {
285
+ tail: { ...tail },
286
+ head: { ...head },
287
+ attributes: { ...scope.edge, ...statement.attributes }
288
+ };
289
+ edges.push(edge);
290
+ if (graph.strict) strictEdges.set(key, edge);
291
+ }
292
+ }
293
+ }
294
+ return { ids: [...ids], attributes: scope.graph };
295
+ }
296
+ const root = walk(graph.statements, { graph: {}, node: {}, edge: {} });
297
+ return { attributes: root.attributes, nodes: [...nodes.values()], edges, clusters, ranks };
298
+ }
299
+
300
+ // packages/graphviz-ast/src/metrics.ts
301
+ function textWidth(text2, size, font = "Times-Roman") {
302
+ let width = 0;
303
+ const mono = font.toLowerCase().includes("mono") || font.toLowerCase().includes("courier");
304
+ const sans = font.toLowerCase().includes("arial") || font.toLowerCase().includes("helvetica");
305
+ for (const c of text2) {
306
+ let advance = 0.5;
307
+ if (mono) advance = 0.6;
308
+ else if (" ilI.,'!:;|".includes(c)) advance = 0.278;
309
+ else if ("mwMW@%&".includes(c)) advance = c === "W" || c === "M" ? 0.944 : 0.778;
310
+ else if (c >= "A" && c <= "Z") advance = 0.667;
311
+ else if (c.codePointAt(0) >= 11904) advance = 1;
312
+ else if ("frt()[]".includes(c)) advance = 0.333;
313
+ else if (sans) advance = 0.556;
314
+ width += advance * size;
315
+ }
316
+ return width;
317
+ }
318
+ function numeric(value, fallback, min = 0) {
319
+ const n = Number(value);
320
+ return value !== void 0 && value.trim() !== "" && Number.isFinite(n) && n >= min ? n : fallback;
321
+ }
322
+ function pair(value, fallback) {
323
+ const parts = value?.split(",");
324
+ const x = numeric(parts?.[0], fallback);
325
+ return [x, numeric(parts?.[1], x)];
326
+ }
327
+ function labelLines(label, id = "") {
328
+ if (label.startsWith("<") && label.endsWith(">")) {
329
+ let text2 = "";
330
+ let i = 1;
331
+ while (i < label.length - 1) {
332
+ if (label[i] === "<") {
333
+ const end = label.indexOf(">", i + 1);
334
+ if (end < 0) break;
335
+ const tag = label.slice(i + 1, end).toLowerCase().trim();
336
+ if (tag.startsWith("br") || tag === "/tr") text2 += "\n";
337
+ else if (tag === "/td") text2 += " ";
338
+ i = end + 1;
339
+ } else text2 += label[i++];
340
+ }
341
+ return decodeEntities(text2).trim().split("\n");
342
+ }
343
+ return label.split("\\N").join(id).split("\\n").join("\n").split("\\l").join("\n").split("\\r").join("\n").split("\n");
344
+ }
345
+ function decodeEntities(text2) {
346
+ let result = "";
347
+ for (let i = 0; i < text2.length; i++) {
348
+ if (text2[i] !== "&") {
349
+ result += text2[i];
350
+ continue;
351
+ }
352
+ const end = text2.indexOf(";", i + 1);
353
+ if (end < 0) {
354
+ result += "&";
355
+ continue;
356
+ }
357
+ const name = text2.slice(i + 1, end);
358
+ const known = {
359
+ amp: "&",
360
+ lt: "<",
361
+ gt: ">",
362
+ quot: '"',
363
+ apos: "'",
364
+ nbsp: " "
365
+ };
366
+ let value = known[name];
367
+ if (name.startsWith("#")) {
368
+ const n = name.startsWith("#x") ? Number.parseInt(name.slice(2), 16) : Number(name.slice(1));
369
+ if (Number.isInteger(n) && n > 0 && n <= 1114111) value = String.fromCodePoint(n);
370
+ }
371
+ if (value === void 0) result += "&";
372
+ else {
373
+ result += value;
374
+ i = end;
375
+ }
376
+ }
377
+ return result;
378
+ }
379
+ function recordFields(label) {
380
+ let i = 0;
381
+ const parse = () => {
382
+ const fields = [];
383
+ let text2 = "";
384
+ let port;
385
+ const flush = () => {
386
+ fields.push({ label: text2.trim(), ...port !== void 0 ? { port } : {} });
387
+ text2 = "";
388
+ port = void 0;
389
+ };
390
+ while (i < label.length) {
391
+ const c = label[i++];
392
+ if (c === "\\" && i < label.length) text2 += label[i++];
393
+ else if (c === "{") {
394
+ if (text2 || port) flush();
395
+ fields.push({ label: "", children: parse() });
396
+ } else if (c === "}") {
397
+ if (text2 || port || !fields.length) flush();
398
+ return fields;
399
+ } else if (c === "|") {
400
+ if (text2 || port || !fields.length) flush();
401
+ } else if (c === "<") {
402
+ const end = label.indexOf(">", i);
403
+ if (end >= 0) {
404
+ port = label.slice(i, end);
405
+ i = end + 1;
406
+ } else text2 += c;
407
+ } else text2 += c;
408
+ }
409
+ if (text2 || port || !fields.length) flush();
410
+ return fields;
411
+ };
412
+ return parse();
413
+ }
414
+ function nodeSize(id, attributes) {
415
+ const size = numeric(attributes.fontsize, 14, 1);
416
+ const shape2 = attributes.shape ?? "ellipse";
417
+ let lines = labelLines(attributes.label ?? id, id);
418
+ if (shape2 === "record" || shape2 === "Mrecord") {
419
+ const flatten = (fields) => fields.flatMap((field) => field.children ? flatten(field.children) : [field.label]);
420
+ lines = [flatten(recordFields(attributes.label ?? id)).join(" ")];
421
+ }
422
+ const [mx, my] = pair(attributes.margin, 0.11);
423
+ let width = Math.max(...lines.map((line) => textWidth(line, size, attributes.fontname)), 0) + mx * 144;
424
+ let height = lines.length * size * 1.2 + my * 144;
425
+ if (shape2 === "ellipse" || shape2 === "oval" || shape2 === "diamond") {
426
+ width *= Math.SQRT2;
427
+ height *= Math.SQRT2;
428
+ }
429
+ width = Math.max(
430
+ width,
431
+ numeric(attributes.width, shape2 === "plaintext" || shape2 === "none" ? 0 : 0.75) * 72
432
+ );
433
+ height = Math.max(
434
+ height,
435
+ numeric(attributes.height, shape2 === "plaintext" || shape2 === "none" ? 0 : 0.5) * 72
436
+ );
437
+ if (attributes.fixedsize === "true") {
438
+ width = numeric(attributes.width, 0.75) * 72;
439
+ height = numeric(attributes.height, 0.5) * 72;
440
+ }
441
+ if (shape2 === "circle" || shape2 === "doublecircle") width = height = Math.max(width, height);
442
+ return [Math.max(1, width), Math.max(1, height)];
443
+ }
444
+
445
+ // packages/graphviz-ast/src/layered.ts
446
+ function feedbackOrder(count, arcs) {
447
+ const remaining = new Set(Array.from({ length: count }, (_, i) => i));
448
+ const left = [];
449
+ const right = [];
450
+ const incoming = Array.from({ length: count }, () => []);
451
+ const outgoing = Array.from({ length: count }, () => []);
452
+ for (const arc of arcs)
453
+ if (arc.from !== arc.to) {
454
+ incoming[arc.to].push(arc);
455
+ outgoing[arc.from].push(arc);
456
+ }
457
+ while (remaining.size) {
458
+ let chosen = -1;
459
+ let best = -Infinity;
460
+ for (const v of remaining) {
461
+ const ins = incoming[v].filter((e) => remaining.has(e.from));
462
+ const outs = outgoing[v].filter((e) => remaining.has(e.to));
463
+ if (!outs.length) {
464
+ right.push(v);
465
+ chosen = v;
466
+ break;
467
+ }
468
+ if (!ins.length) {
469
+ left.push(v);
470
+ chosen = v;
471
+ break;
472
+ }
473
+ const score = outs.reduce((s, e) => s + e.weight, 0) - ins.reduce((s, e) => s + e.weight, 0);
474
+ if (score > best) {
475
+ chosen = v;
476
+ best = score;
477
+ }
478
+ }
479
+ if (left.at(-1) !== chosen && right.at(-1) !== chosen) left.push(chosen);
480
+ remaining.delete(chosen);
481
+ }
482
+ return [...left, ...right.reverse()];
483
+ }
484
+ function assignRanks(count, arcs, order) {
485
+ const rank = Array(count).fill(0);
486
+ const outgoing = Array.from({ length: count }, () => []);
487
+ for (const arc of arcs) outgoing[arc.from].push(arc);
488
+ for (const v of order)
489
+ for (const e of outgoing[v]) rank[e.to] = Math.max(rank[e.to], rank[v] + e.minlen);
490
+ const slack = (e) => rank[e.to] - rank[e.from] - e.minlen;
491
+ const tree = /* @__PURE__ */ new Set();
492
+ const connected = /* @__PURE__ */ new Set();
493
+ for (let seed = 0; seed < count; seed++) {
494
+ if (connected.has(seed)) continue;
495
+ const component = /* @__PURE__ */ new Set([seed]);
496
+ while (true) {
497
+ let boundary2;
498
+ let least = Infinity;
499
+ for (const e of arcs)
500
+ if (component.has(e.from) !== component.has(e.to) && !connected.has(e.from) && !connected.has(e.to)) {
501
+ if (slack(e) < least) {
502
+ least = slack(e);
503
+ boundary2 = e;
504
+ }
505
+ }
506
+ if (!boundary2) break;
507
+ const shift = component.has(boundary2.from) ? least : -least;
508
+ for (const v of component) rank[v] = rank[v] + shift;
509
+ tree.add(boundary2);
510
+ component.add(boundary2.from);
511
+ component.add(boundary2.to);
512
+ }
513
+ for (const v of component) connected.add(v);
514
+ }
515
+ const limit = Math.max(32, count * Math.max(1, arcs.length) * 4);
516
+ for (let iteration = 0; iteration < limit; iteration++) {
517
+ let changed = false;
518
+ for (const leaving of tree) {
519
+ const adjacency = Array.from({ length: count }, () => []);
520
+ for (const e of tree)
521
+ if (e !== leaving) {
522
+ adjacency[e.from].push(e.to);
523
+ adjacency[e.to].push(e.from);
524
+ }
525
+ const side = /* @__PURE__ */ new Set([leaving.to]);
526
+ const queue = [leaving.to];
527
+ for (let i = 0; i < queue.length; i++)
528
+ for (const v of adjacency[queue[i]])
529
+ if (!side.has(v)) {
530
+ side.add(v);
531
+ queue.push(v);
532
+ }
533
+ let cut = 0;
534
+ for (const e of arcs)
535
+ if (side.has(e.from) !== side.has(e.to)) cut += side.has(e.to) ? e.weight : -e.weight;
536
+ if (cut >= -1e-9) continue;
537
+ let entering;
538
+ let delta = Infinity;
539
+ for (const e of arcs)
540
+ if (side.has(e.from) && !side.has(e.to) && slack(e) < delta) {
541
+ delta = slack(e);
542
+ entering = e;
543
+ }
544
+ if (!entering || delta <= 1e-9) continue;
545
+ for (const v of side) rank[v] = rank[v] + delta;
546
+ tree.delete(leaving);
547
+ tree.add(entering);
548
+ changed = true;
549
+ break;
550
+ }
551
+ if (!changed) break;
552
+ }
553
+ const min = Math.min(...rank, 0);
554
+ return rank.map((r) => r - min);
555
+ }
556
+ function crossings(layers, arcs, vertices) {
557
+ let count = 0;
558
+ for (let r = 0; r < layers.length - 1; r++) {
559
+ const between = arcs.filter(
560
+ (e) => vertices[e.from].rank === r && vertices[e.to].rank === r + 1
561
+ );
562
+ for (let i = 0; i < between.length; i++)
563
+ for (let j = i + 1; j < between.length; j++) {
564
+ const a = between[i];
565
+ const b = between[j];
566
+ if ((vertices[a.from].order - vertices[b.from].order) * (vertices[a.to].order - vertices[b.to].order) < 0)
567
+ count++;
568
+ }
569
+ }
570
+ return count;
571
+ }
572
+ var median = (values) => {
573
+ values.sort((a, b) => a - b);
574
+ const m = Math.floor(values.length / 2);
575
+ return values.length % 2 ? values[m] : (values[m - 1] + values[m]) / 2;
576
+ };
577
+ function minimizeCrossings(layers, vertices, arcs) {
578
+ const update = () => layers.forEach(
579
+ (layer) => layer.forEach((v, i) => {
580
+ vertices[v].order = i;
581
+ })
582
+ );
583
+ update();
584
+ let best = layers.map((layer) => [...layer]);
585
+ let bestCount = crossings(layers, arcs, vertices);
586
+ const incoming = Array.from({ length: vertices.length }, () => []);
587
+ const outgoing = Array.from({ length: vertices.length }, () => []);
588
+ for (const e of arcs) {
589
+ incoming[e.to].push(e.from);
590
+ outgoing[e.from].push(e.to);
591
+ }
592
+ for (let pass = 0; pass < 12; pass++) {
593
+ const down = pass % 2 === 0;
594
+ for (let step = 1; step < layers.length; step++) {
595
+ const r = down ? step : layers.length - 1 - step;
596
+ const layer = layers[r];
597
+ const scores = /* @__PURE__ */ new Map();
598
+ for (const v of layer) {
599
+ const neighbors = (down ? incoming[v] : outgoing[v]).map((n) => vertices[n].order);
600
+ scores.set(
601
+ v,
602
+ neighbors.length ? pass % 4 < 2 ? neighbors.reduce((s, n) => s + n, 0) / neighbors.length : median(neighbors) : vertices[v].order
603
+ );
604
+ }
605
+ layer.sort(
606
+ (a, b) => scores.get(a) - scores.get(b) || vertices[a].order - vertices[b].order
607
+ );
608
+ update();
609
+ }
610
+ for (let sweep = 0; sweep < 4; sweep++) {
611
+ let improved = false;
612
+ for (const layer of layers)
613
+ for (let i = 1; i < layer.length; i++) {
614
+ const before = crossings(layers, arcs, vertices);
615
+ [layer[i - 1], layer[i]] = [layer[i], layer[i - 1]];
616
+ update();
617
+ if (crossings(layers, arcs, vertices) < before) improved = true;
618
+ else {
619
+ [layer[i - 1], layer[i]] = [layer[i], layer[i - 1]];
620
+ update();
621
+ }
622
+ }
623
+ if (!improved) break;
624
+ }
625
+ const count = crossings(layers, arcs, vertices);
626
+ if (count < bestCount) {
627
+ bestCount = count;
628
+ best = layers.map((layer) => [...layer]);
629
+ }
630
+ }
631
+ layers.splice(0, layers.length, ...best);
632
+ update();
633
+ }
634
+ function assignCoordinates(layers, vertices, arcs, nodesep, ranksep) {
635
+ const candidates = [];
636
+ for (const down of [true, false])
637
+ for (const right of [false, true]) {
638
+ const rows = layers.map((layer) => right ? [...layer].reverse() : [...layer]);
639
+ if (!down) rows.reverse();
640
+ const root = vertices.map((_, i) => i);
641
+ const align = [...root];
642
+ const neighbors = Array.from({ length: vertices.length }, () => []);
643
+ for (const e of arcs) neighbors[down ? e.to : e.from].push(down ? e.from : e.to);
644
+ const positions = /* @__PURE__ */ new Map();
645
+ rows.forEach((row) => row.forEach((v, i) => positions.set(v, i)));
646
+ const blocked = /* @__PURE__ */ new Set();
647
+ for (const a of arcs)
648
+ for (const b of arcs) {
649
+ if (vertices[a.from].rank !== vertices[b.from].rank) continue;
650
+ if (vertices[b.from].width !== 0 || vertices[b.to].width !== 0) continue;
651
+ if ((positions.get(a.from) - positions.get(b.from)) * (positions.get(a.to) - positions.get(b.to)) < 0)
652
+ blocked.add(`${a.from}:${a.to}`);
653
+ }
654
+ for (let r = 1; r < rows.length; r++) {
655
+ let previous = -1;
656
+ for (const v of rows[r]) {
657
+ const ns = neighbors[v].sort((a, b) => positions.get(a) - positions.get(b));
658
+ for (const m of [Math.floor((ns.length - 1) / 2), Math.floor(ns.length / 2)]) {
659
+ const u = ns[m];
660
+ if (u === void 0) continue;
661
+ const key = down ? `${u}:${v}` : `${v}:${u}`;
662
+ if (align[v] === v && positions.get(u) > previous && !blocked.has(key)) {
663
+ align[u] = v;
664
+ root[v] = root[u];
665
+ align[v] = root[v];
666
+ previous = positions.get(u);
667
+ }
668
+ }
669
+ }
670
+ }
671
+ const roots = [...new Set(root)];
672
+ const x = Array(vertices.length).fill(0);
673
+ const constraints = [];
674
+ for (const row of rows)
675
+ for (let i = 1; i < row.length; i++) {
676
+ const a = row[i - 1];
677
+ const b = row[i];
678
+ if (root[a] !== root[b])
679
+ constraints.push({
680
+ from: root[a],
681
+ to: root[b],
682
+ gap: (vertices[a].width + vertices[b].width) / 2 + nodesep
683
+ });
684
+ }
685
+ for (let iteration = 0; iteration < roots.length; iteration++)
686
+ for (const e of constraints) x[e.to] = Math.max(x[e.to], x[e.from] + e.gap);
687
+ const coords = vertices.map((_, v) => (right ? -1 : 1) * x[root[v]]);
688
+ const min = Math.min(...coords, 0);
689
+ candidates.push(coords.map((value) => value - min));
690
+ }
691
+ const extents = candidates.map((values) => Math.max(...values, 0) - Math.min(...values, 0));
692
+ const reference = extents.indexOf(Math.min(...extents));
693
+ const target = candidates[reference];
694
+ for (const values of candidates) {
695
+ const delta = (Math.min(...target, 0) + Math.max(...target, 0) - Math.min(...values, 0) - Math.max(...values, 0)) / 2;
696
+ for (let i = 0; i < values.length; i++) values[i] = values[i] + delta;
697
+ }
698
+ for (let v = 0; v < vertices.length; v++)
699
+ vertices[v].x = median(candidates.map((values) => values[v]));
700
+ for (const layer of layers)
701
+ for (let i = 1; i < layer.length; i++) {
702
+ const a = vertices[layer[i - 1]];
703
+ const b = vertices[layer[i]];
704
+ b.x = Math.max(b.x, a.x + (a.width + b.width) / 2 + nodesep);
705
+ }
706
+ let y = 0;
707
+ let previousHeight = 0;
708
+ for (const layer of layers) {
709
+ const height = Math.max(...layer.map((v) => vertices[v].height), 0);
710
+ y += previousHeight / 2 + height / 2 + (y ? ranksep : 0);
711
+ for (const v of layer) vertices[v].y = y;
712
+ previousHeight = height;
713
+ }
714
+ }
715
+
716
+ // packages/graphviz-ast/src/layout.ts
717
+ var fmt = (n) => String(Math.round(n * 1e3) / 1e3);
718
+ var xy = (p) => `${fmt(p.x)},${fmt(p.y)}`;
719
+ function splinePath(points) {
720
+ if (points.length < 2) return "";
721
+ if (points.length === 2) {
722
+ const a = points[0];
723
+ const b = points[1];
724
+ return `M${xy(a)}C${xy({ x: a.x, y: (a.y + b.y) / 2 })} ${xy({ x: b.x, y: (a.y + b.y) / 2 })} ${xy(b)}`;
725
+ }
726
+ const p = [points[0], points[0], ...points, points.at(-1), points.at(-1)];
727
+ let result = `M${xy(points[0])}`;
728
+ for (let i = 0; i + 3 < p.length; i++) {
729
+ const a = p[i];
730
+ const b = p[i + 1];
731
+ const c = p[i + 2];
732
+ const d = p[i + 3];
733
+ const c1 = { x: (2 * b.x + c.x) / 3, y: (2 * b.y + c.y) / 3 };
734
+ const c2 = { x: (b.x + 2 * c.x) / 3, y: (b.y + 2 * c.y) / 3 };
735
+ const end = { x: (b.x + 4 * c.x + d.x) / 6, y: (b.y + 4 * c.y + d.y) / 6 };
736
+ if (i > 0) result += `C${xy(c1)} ${xy(c2)} ${xy(end)}`;
737
+ void a;
738
+ }
739
+ return result;
740
+ }
741
+ function boundary(node, toward, ref) {
742
+ const center = ref.port !== void 0 && node.ports[ref.port] ? node.ports[ref.port] : node;
743
+ let dx = toward.x - center.x;
744
+ let dy = toward.y - center.y;
745
+ const directions = {
746
+ n: [0, -1],
747
+ ne: [1, -1],
748
+ e: [1, 0],
749
+ se: [1, 1],
750
+ s: [0, 1],
751
+ sw: [-1, 1],
752
+ w: [-1, 0],
753
+ nw: [-1, -1]
754
+ };
755
+ if (ref.compass === "c") return { x: center.x, y: center.y };
756
+ if (ref.compass && directions[ref.compass]) [dx, dy] = directions[ref.compass];
757
+ if (!dx && !dy) dy = 1;
758
+ const rx = node.width / 2;
759
+ const ry = node.height / 2;
760
+ const shape2 = node.attributes.shape ?? "ellipse";
761
+ let scale;
762
+ if (["ellipse", "oval", "circle", "doublecircle"].includes(shape2))
763
+ scale = 1 / Math.sqrt(dx * dx / (rx * rx) + dy * dy / (ry * ry));
764
+ else if (shape2 === "diamond") scale = 1 / (Math.abs(dx) / rx + Math.abs(dy) / ry);
765
+ else scale = Math.min(dx ? rx / Math.abs(dx) : Infinity, dy ? ry / Math.abs(dy) : Infinity);
766
+ if (ref.port && !ref.compass) return { x: center.x, y: center.y };
767
+ return { x: center.x + dx * scale, y: center.y + dy * scale };
768
+ }
769
+ function ports(node) {
770
+ if (!["record", "Mrecord"].includes(node.attributes.shape ?? "")) return;
771
+ const walk = (fields, x, y, w, h, horizontal) => {
772
+ fields.forEach((field, i) => {
773
+ const width = horizontal ? w / fields.length : w;
774
+ const height = horizontal ? h : h / fields.length;
775
+ const left = x + (horizontal ? i * width : 0);
776
+ const top = y + (horizontal ? 0 : i * height);
777
+ if (field.port !== void 0)
778
+ node.ports[field.port] = { x: left + width / 2, y: top + height / 2 };
779
+ if (field.children) walk(field.children, left, top, width, height, !horizontal);
780
+ });
781
+ };
782
+ walk(
783
+ recordFields(node.attributes.label ?? node.id),
784
+ node.x - node.width / 2,
785
+ node.y - node.height / 2,
786
+ node.width,
787
+ node.height,
788
+ true
789
+ );
790
+ }
791
+ function layoutGraph(graph, options = {}) {
792
+ const model = resolveGraph(graph);
793
+ const attributes = { ...model.attributes, ...options.graph };
794
+ const rankdir = attributes.rankdir ?? "TB";
795
+ const horizontal = rankdir === "LR" || rankdir === "RL";
796
+ const nodes = model.nodes.map((n) => {
797
+ const attrs = { ...n.attributes, ...options.node };
798
+ const [width, height] = nodeSize(n.id, attrs);
799
+ return { id: n.id, attributes: attrs, width, height, x: 0, y: 0, rank: 0, ports: {} };
800
+ });
801
+ const index = new Map(nodes.map((n, i) => [n.id, i]));
802
+ const parent = nodes.map((_, i) => i);
803
+ const find = (i) => {
804
+ while (parent[i] !== i) {
805
+ parent[i] = parent[parent[i]];
806
+ i = parent[i];
807
+ }
808
+ return i;
809
+ };
810
+ for (const group of model.ranks)
811
+ for (const id of group.nodes.slice(1))
812
+ parent[find(index.get(id))] = find(index.get(group.nodes[0]));
813
+ const representatives = [...new Set(parent.map((_, i) => find(i)))];
814
+ const groupIndex = new Map(representatives.map((r, i) => [r, i]));
815
+ const groupOf = nodes.map((_, i) => groupIndex.get(find(i)));
816
+ const edgeAttributes = model.edges.map((e) => ({ ...e.attributes, ...options.edge }));
817
+ const originalArcs = model.edges.flatMap((e, i) => {
818
+ const from = groupOf[index.get(e.tail.id)];
819
+ const to = groupOf[index.get(e.head.id)];
820
+ if (from === to || edgeAttributes[i].constraint === "false") return [];
821
+ return [
822
+ {
823
+ from,
824
+ to,
825
+ minlen: Math.max(1, Math.round(numeric(edgeAttributes[i].minlen, 1))),
826
+ weight: numeric(edgeAttributes[i].weight, 1)
827
+ }
828
+ ];
829
+ });
830
+ let order = feedbackOrder(representatives.length, originalArcs);
831
+ const minGroups = /* @__PURE__ */ new Set();
832
+ const maxGroups = /* @__PURE__ */ new Set();
833
+ for (const group of model.ranks) {
834
+ const target = group.rank === "min" || group.rank === "source" ? minGroups : group.rank === "max" || group.rank === "sink" ? maxGroups : void 0;
835
+ if (target) for (const id of group.nodes) target.add(groupOf[index.get(id)]);
836
+ }
837
+ order = [
838
+ ...order.filter((v) => minGroups.has(v)),
839
+ ...order.filter((v) => !minGroups.has(v) && !maxGroups.has(v)),
840
+ ...order.filter((v) => !minGroups.has(v) && maxGroups.has(v))
841
+ ];
842
+ const ordinal = new Map(order.map((v, i) => [v, i]));
843
+ const arcs = originalArcs.map(
844
+ (e) => ordinal.get(e.from) < ordinal.get(e.to) ? { ...e } : { ...e, from: e.to, to: e.from }
845
+ );
846
+ for (const min of minGroups)
847
+ for (let v = 0; v < representatives.length; v++)
848
+ if (v !== min && !minGroups.has(v)) arcs.push({ from: min, to: v, minlen: 1, weight: 0 });
849
+ for (const max of maxGroups)
850
+ for (let v = 0; v < representatives.length; v++)
851
+ if (v !== max && !maxGroups.has(v)) arcs.push({ from: v, to: max, minlen: 1, weight: 0 });
852
+ const ranks = assignRanks(representatives.length, arcs, order);
853
+ const vertices = nodes.map((n, i) => ({
854
+ rank: ranks[groupOf[i]] ?? 0,
855
+ width: horizontal ? n.height : n.width,
856
+ height: horizontal ? n.width : n.height,
857
+ x: 0,
858
+ y: 0,
859
+ order: 0
860
+ }));
861
+ const segments = [];
862
+ const routes = [];
863
+ model.edges.forEach((e, i) => {
864
+ let from = index.get(e.tail.id);
865
+ let to = index.get(e.head.id);
866
+ const reverse = vertices[from].rank > vertices[to].rank;
867
+ if (reverse) [from, to] = [to, from];
868
+ const route = [from];
869
+ for (let rank = vertices[from].rank + 1; rank < vertices[to].rank; rank++) {
870
+ route.push(vertices.length);
871
+ vertices.push({ rank, width: 0, height: 0, x: 0, y: 0, order: 0 });
872
+ }
873
+ route.push(to);
874
+ for (let j = 1; j < route.length; j++)
875
+ if (vertices[route[j - 1]].rank !== vertices[route[j]].rank)
876
+ segments.push({
877
+ from: route[j - 1],
878
+ to: route[j],
879
+ minlen: 1,
880
+ weight: numeric(edgeAttributes[i].weight, 1)
881
+ });
882
+ routes.push(reverse ? route.reverse() : route);
883
+ });
884
+ const layers = Array.from(
885
+ { length: Math.max(...vertices.map((v) => v.rank), 0) + 1 },
886
+ () => []
887
+ );
888
+ vertices.forEach((v, i) => layers[v.rank].push(i));
889
+ const clusterOf = /* @__PURE__ */ new Map();
890
+ model.clusters.forEach((c, i) => c.nodes.forEach((id) => clusterOf.set(id, i)));
891
+ for (const layer of layers)
892
+ layer.sort(
893
+ (a, b) => (clusterOf.get(nodes[a]?.id ?? "") ?? -1) - (clusterOf.get(nodes[b]?.id ?? "") ?? -1)
894
+ );
895
+ minimizeCrossings(layers, vertices, segments);
896
+ assignCoordinates(
897
+ layers,
898
+ vertices,
899
+ segments,
900
+ numeric(attributes.nodesep, 0.25) * 72,
901
+ numeric(attributes.ranksep?.split(" ")[0], 0.5) * 72
902
+ );
903
+ const maxY = Math.max(...vertices.map((v) => v.y), 0);
904
+ const transform = (p) => {
905
+ const y = rankdir === "BT" || rankdir === "RL" ? maxY - p.y : p.y;
906
+ return horizontal ? { x: y, y: p.x } : { x: p.x, y };
907
+ };
908
+ nodes.forEach((n, i) => {
909
+ Object.assign(n, transform(vertices[i]));
910
+ n.rank = vertices[i].rank;
911
+ ports(n);
912
+ });
913
+ const clusters = model.clusters.map((c) => {
914
+ const members = c.nodes.map((id) => nodes[index.get(id)]);
915
+ const margin = numeric(c.attributes.margin, 8);
916
+ const x = (members.length ? Math.min(...members.map((n) => n.x - n.width / 2)) : 0) - margin;
917
+ const y = (members.length ? Math.min(...members.map((n) => n.y - n.height / 2)) : 0) - margin - (c.attributes.label ? 24 : 0);
918
+ const right = Math.max(...members.map((n) => n.x + n.width / 2), x) + margin;
919
+ const bottom = Math.max(...members.map((n) => n.y + n.height / 2), y) + margin;
920
+ return { ...c, x, y, width: right - x, height: bottom - y };
921
+ });
922
+ for (const c of clusters)
923
+ if (c.parent) {
924
+ const p = clusters.find((item) => item.id === c.parent);
925
+ if (!p) continue;
926
+ const right = Math.max(p.x + p.width, c.x + c.width + 8);
927
+ const bottom = Math.max(p.y + p.height, c.y + c.height + 8);
928
+ p.x = Math.min(p.x, c.x - 8);
929
+ p.y = Math.min(p.y, c.y - 8);
930
+ p.width = right - p.x;
931
+ p.height = bottom - p.y;
932
+ }
933
+ const splines = attributes.splines ?? "true";
934
+ const parallels = /* @__PURE__ */ new Map();
935
+ const edges = model.edges.map((e, i) => {
936
+ const tail = nodes[index.get(e.tail.id)];
937
+ const head = nodes[index.get(e.head.id)];
938
+ let points = routes[i].map((v) => transform(vertices[v]));
939
+ const key = JSON.stringify([e.tail.id, e.head.id]);
940
+ const parallel = parallels.get(key) ?? 0;
941
+ parallels.set(key, parallel + 1);
942
+ if (tail === head) {
943
+ points = [
944
+ { x: tail.x + tail.width / 2, y: tail.y },
945
+ { x: tail.x + tail.width / 2 + 32 + parallel * 12, y: tail.y - tail.height },
946
+ { x: tail.x + tail.width / 2 + 32 + parallel * 12, y: tail.y + tail.height },
947
+ { x: tail.x + tail.width / 2, y: tail.y + tail.height / 4 }
948
+ ];
949
+ } else {
950
+ if (tail.rank === head.rank) {
951
+ const offset = 30 + parallel * 12;
952
+ points = [
953
+ tail,
954
+ horizontal ? { x: tail.x - tail.width / 2 - offset, y: tail.y } : { x: tail.x, y: tail.y - tail.height / 2 - offset },
955
+ horizontal ? { x: head.x - head.width / 2 - offset, y: head.y } : { x: head.x, y: head.y - head.height / 2 - offset },
956
+ head
957
+ ];
958
+ } else if (points.length === 2 && parallel)
959
+ points.splice(1, 0, {
960
+ x: (tail.x + head.x) / 2 + (horizontal ? 0 : parallel * 16),
961
+ y: (tail.y + head.y) / 2 + (horizontal ? parallel * 16 : 0)
962
+ });
963
+ points[0] = boundary(tail, points[1], e.tail);
964
+ points[points.length - 1] = boundary(head, points.at(-2), e.head);
965
+ }
966
+ if (splines === "line" || splines === "false") points = [points[0], points.at(-1)];
967
+ if (splines === "ortho") {
968
+ const orthogonal = [points[0]];
969
+ for (let j = 1; j < points.length; j++) {
970
+ const a = points[j - 1];
971
+ const b = points[j];
972
+ if (horizontal)
973
+ orthogonal.push({ x: (a.x + b.x) / 2, y: a.y }, { x: (a.x + b.x) / 2, y: b.y });
974
+ else orthogonal.push({ x: a.x, y: (a.y + b.y) / 2 }, { x: b.x, y: (a.y + b.y) / 2 });
975
+ orthogonal.push(b);
976
+ }
977
+ points = orthogonal;
978
+ }
979
+ return {
980
+ ...e,
981
+ attributes: edgeAttributes[i],
982
+ reversed: tail.rank > head.rank,
983
+ points,
984
+ path: "",
985
+ label: points[Math.floor(points.length / 2)]
986
+ };
987
+ });
988
+ const [mx, my] = pair(attributes.margin, 0);
989
+ const [px, py] = pair(attributes.pad, 0.0555);
990
+ const all = [
991
+ ...nodes.flatMap((n) => [
992
+ { x: n.x - n.width / 2, y: n.y - n.height / 2 },
993
+ { x: n.x + n.width / 2, y: n.y + n.height / 2 }
994
+ ]),
995
+ ...clusters.flatMap((c) => [
996
+ { x: c.x, y: c.y },
997
+ { x: c.x + c.width, y: c.y + c.height }
998
+ ]),
999
+ ...edges.flatMap((e) => e.points)
1000
+ ];
1001
+ const minX = Math.min(...all.map((p) => p.x), 0);
1002
+ const minY = Math.min(...all.map((p) => p.y), 0);
1003
+ const maxX = Math.max(...all.map((p) => p.x), 0);
1004
+ const maxExtentY = Math.max(...all.map((p) => p.y), 0);
1005
+ const dx = (mx + px) * 72 - minX;
1006
+ const dy = (my + py) * 72 - minY;
1007
+ for (const n of nodes) {
1008
+ n.x += dx;
1009
+ n.y += dy;
1010
+ for (const p of Object.values(n.ports)) {
1011
+ p.x += dx;
1012
+ p.y += dy;
1013
+ }
1014
+ }
1015
+ for (const c of clusters) {
1016
+ c.x += dx;
1017
+ c.y += dy;
1018
+ }
1019
+ for (const e of edges) {
1020
+ e.points = e.points.map((p) => ({ x: p.x + dx, y: p.y + dy }));
1021
+ e.label = { x: e.label.x + dx, y: e.label.y + dy };
1022
+ e.path = splines === "none" || splines === "" ? "" : splines === "true" || splines === "spline" ? splinePath(e.points) : e.points.map((p, i) => `${i ? "L" : "M"}${xy(p)}`).join("");
1023
+ }
1024
+ const labelHeight = attributes.label ? numeric(attributes.fontsize, 14) * 1.2 + 12 : 0;
1025
+ return {
1026
+ ...graph.id !== void 0 ? { id: graph.id } : {},
1027
+ directed: graph.directed,
1028
+ strict: graph.strict,
1029
+ attributes,
1030
+ nodes,
1031
+ edges,
1032
+ clusters,
1033
+ width: Math.max(1, maxX - minX + (mx + px) * 144),
1034
+ height: Math.max(1, maxExtentY - minY + (my + py) * 144 + labelHeight)
1035
+ };
1036
+ }
1037
+
1038
+ // packages/graphviz-ast/src/svg.ts
1039
+ var f = (n) => String(Math.round(n * 1e3) / 1e3);
1040
+ var escape = (s) => s.split("&").join("&amp;").split("<").join("&lt;").split(">").join("&gt;").split('"').join("&quot;");
1041
+ function style(a, filled = false) {
1042
+ const parts = [
1043
+ `fill="${escape(filled || a.style?.includes("filled") ? a.fillcolor ?? "lightgrey" : "none")}"`,
1044
+ `stroke="${escape(a.color ?? "black")}"`
1045
+ ];
1046
+ if (a.penwidth) parts.push(`stroke-width="${f(numeric(a.penwidth, 1))}"`);
1047
+ if (a.style?.includes("dashed")) parts.push('stroke-dasharray="5,3"');
1048
+ if (a.style?.includes("dotted")) parts.push('stroke-dasharray="1,3"');
1049
+ return parts.join(" ");
1050
+ }
1051
+ function text(label, x, y, a, id = "") {
1052
+ const size = numeric(a.fontsize, 14, 1);
1053
+ const lines = labelLines(label, id);
1054
+ return lines.map(
1055
+ (line, i) => `<text text-anchor="middle" x="${f(x)}" y="${f(y + (i - (lines.length - 1) / 2) * size * 1.2 + size * 0.35)}" font-family="${escape(a.fontname ?? "Times,serif")}" font-size="${f(size)}" fill="${escape(a.fontcolor ?? "black")}">${escape(line)}</text>`
1056
+ ).join("");
1057
+ }
1058
+ function shape(node) {
1059
+ const { x, y, width: w, height: h, attributes: a } = node;
1060
+ const s = a.shape ?? "ellipse";
1061
+ const left = x - w / 2;
1062
+ const top = y - h / 2;
1063
+ const right = x + w / 2;
1064
+ const bottom = y + h / 2;
1065
+ const path = (d) => `<path ${style(a)} d="${d}"/>`;
1066
+ const polygon = (points) => `<polygon ${style(a)} points="${points.map((p) => `${f(p.x)},${f(p.y)}`).join(" ")}"/>`;
1067
+ const rect = (radius = 0) => `<rect ${style(a)} x="${f(left)}" y="${f(top)}" width="${f(w)}" height="${f(h)}"${radius ? ` rx="${f(radius)}"` : ""}/>`;
1068
+ const ellipse = (rx, ry) => `<ellipse ${style(a)} cx="${f(x)}" cy="${f(y)}" rx="${f(rx)}" ry="${f(ry)}"/>`;
1069
+ if (s === "plaintext" || s === "none") return "";
1070
+ if (s === "ellipse" || s === "oval" || s === "circle") return ellipse(w / 2, h / 2);
1071
+ if (s === "doublecircle")
1072
+ return ellipse(w / 2, h / 2) + ellipse(Math.max(1, w / 2 - 4), Math.max(1, h / 2 - 4));
1073
+ if (s === "diamond")
1074
+ return polygon([
1075
+ { x, y: top },
1076
+ { x: right, y },
1077
+ { x, y: bottom },
1078
+ { x: left, y }
1079
+ ]);
1080
+ if (s === "cylinder") {
1081
+ const arc = Math.min(10, h / 5);
1082
+ return path(
1083
+ `M${f(left)},${f(top + arc)}C${f(left)},${f(top - arc / 3)} ${f(right)},${f(top - arc / 3)} ${f(right)},${f(top + arc)}L${f(right)},${f(bottom - arc)}C${f(right)},${f(bottom + arc / 3)} ${f(left)},${f(bottom + arc / 3)} ${f(left)},${f(bottom - arc)}Z`
1084
+ ) + path(
1085
+ `M${f(left)},${f(top + arc)}C${f(left)},${f(top + arc * 2)} ${f(right)},${f(top + arc * 2)} ${f(right)},${f(top + arc)}`
1086
+ );
1087
+ }
1088
+ if (s === "folder" || s === "tab")
1089
+ return polygon([
1090
+ { x: left, y: top + 8 },
1091
+ { x: left, y: top },
1092
+ { x: left + w * 0.35, y: top },
1093
+ { x: left + w * 0.35 + 8, y: top + 8 },
1094
+ { x: right, y: top + 8 },
1095
+ { x: right, y: bottom },
1096
+ { x: left, y: bottom }
1097
+ ]);
1098
+ if (s === "note")
1099
+ return polygon([
1100
+ { x: left, y: top },
1101
+ { x: right - 10, y: top },
1102
+ { x: right, y: top + 10 },
1103
+ { x: right, y: bottom },
1104
+ { x: left, y: bottom }
1105
+ ]) + path(`M${f(right - 10)},${f(top)}L${f(right - 10)},${f(top + 10)}L${f(right)},${f(top + 10)}`);
1106
+ if (s === "component")
1107
+ return rect() + `<rect ${style(a)} x="${f(left - 4)}" y="${f(top + h * 0.2)}" width="8" height="${f(h * 0.2)}"/><rect ${style(a)} x="${f(left - 4)}" y="${f(top + h * 0.6)}" width="8" height="${f(h * 0.2)}"/>`;
1108
+ return rect(s === "Mrecord" || a.style?.includes("rounded") ? 8 : 0);
1109
+ }
1110
+ function record(node) {
1111
+ const walk = (fields, x, y, w, h, horizontal) => fields.map((field, i) => {
1112
+ const width = horizontal ? w / fields.length : w;
1113
+ const height = horizontal ? h : h / fields.length;
1114
+ const left = x + (horizontal ? i * width : 0);
1115
+ const top = y + (horizontal ? 0 : i * height);
1116
+ const divider = i ? `<path fill="none" stroke="${escape(node.attributes.color ?? "black")}" d="M${f(left)},${f(top)}L${f(horizontal ? left : left + width)},${f(horizontal ? top + height : top)}"/>` : "";
1117
+ return divider + (field.children ? walk(field.children, left, top, width, height, !horizontal) : text(field.label, left + width / 2, top + height / 2, node.attributes, node.id));
1118
+ }).join("");
1119
+ return walk(
1120
+ recordFields(node.attributes.label ?? node.id),
1121
+ node.x - node.width / 2,
1122
+ node.y - node.height / 2,
1123
+ node.width,
1124
+ node.height,
1125
+ true
1126
+ );
1127
+ }
1128
+ function arrow(point, previous, attributes) {
1129
+ const size = numeric(attributes.arrowsize, 1) * 10;
1130
+ let dx = point.x - previous.x;
1131
+ let dy = point.y - previous.y;
1132
+ const length = Math.hypot(dx, dy) || 1;
1133
+ dx /= length;
1134
+ dy /= length;
1135
+ const base = { x: point.x - size * dx, y: point.y - size * dy };
1136
+ return `<polygon fill="${escape(attributes.color ?? "black")}" stroke="${escape(attributes.color ?? "black")}" points="${f(point.x)},${f(point.y)} ${f(base.x + dy * size * 0.4)},${f(base.y - dx * size * 0.4)} ${f(base.x - dy * size * 0.4)},${f(base.y + dx * size * 0.4)}"/>`;
1137
+ }
1138
+ function renderSvg(layout) {
1139
+ const content = [
1140
+ `<svg xmlns="http://www.w3.org/2000/svg" width="${f(layout.width)}pt" height="${f(layout.height)}pt" viewBox="0 0 ${f(layout.width)} ${f(layout.height)}"><g class="graph"><title>${escape(layout.id ?? "G")}</title>`
1141
+ ];
1142
+ if (layout.attributes.bgcolor)
1143
+ content.push(
1144
+ `<rect x="0" y="0" width="${f(layout.width)}" height="${f(layout.height)}" fill="${escape(layout.attributes.bgcolor)}"/>`
1145
+ );
1146
+ for (const c of [...layout.clusters].reverse()) {
1147
+ content.push(
1148
+ `<g class="cluster"><title>${escape(c.id)}</title><rect ${style(c.attributes)} x="${f(c.x)}" y="${f(c.y)}" width="${f(c.width)}" height="${f(c.height)}"/>${c.attributes.label ? text(c.attributes.label, c.x + c.width / 2, c.y + 12, c.attributes) : ""}</g>`
1149
+ );
1150
+ }
1151
+ for (const e of layout.edges) {
1152
+ if (e.attributes.style?.includes("invis")) continue;
1153
+ content.push(
1154
+ `<g class="edge"><title>${escape(e.tail.id)}${layout.directed ? "-&gt;" : "--"}${escape(e.head.id)}</title>`
1155
+ );
1156
+ if (e.path) {
1157
+ content.push(`<path ${style({ ...e.attributes, fillcolor: "none" })} d="${e.path}"/>`);
1158
+ if ((layout.directed && e.attributes.dir !== "none" && e.attributes.dir !== "back" || e.attributes.dir === "both" || e.attributes.dir === "forward") && e.attributes.arrowhead !== "none")
1159
+ content.push(arrow(e.points.at(-1), e.points.at(-2), e.attributes));
1160
+ if ((e.attributes.dir === "back" || e.attributes.dir === "both") && e.attributes.arrowtail !== "none")
1161
+ content.push(arrow(e.points[0], e.points[1], e.attributes));
1162
+ }
1163
+ if (e.attributes.label)
1164
+ content.push(text(e.attributes.label, e.label.x, e.label.y - 8, e.attributes));
1165
+ content.push("</g>");
1166
+ }
1167
+ for (const n of layout.nodes) {
1168
+ if (n.attributes.style?.includes("invis")) continue;
1169
+ content.push(
1170
+ `<g class="node"><title>${escape(n.id)}</title>${shape(n)}${n.attributes.shape === "record" || n.attributes.shape === "Mrecord" ? record(n) : text(n.attributes.label ?? n.id, n.x, n.y, n.attributes, n.id)}</g>`
1171
+ );
1172
+ }
1173
+ if (layout.attributes.label)
1174
+ content.push(
1175
+ text(layout.attributes.label, layout.width / 2, layout.height - 12, layout.attributes)
1176
+ );
1177
+ content.push("</g></svg>");
1178
+ return content.join("");
1179
+ }
1180
+
1181
+ // packages/safe-bash-command-dot/src/index.ts
1182
+ import { commandRuntimeIdentity, getCommandArguments } from "../safe-bash-contracts/index.js";
1183
+ import { InputByteBudget, collectBytes, writeBytes } from "../safe-bash-contracts/io.js";
1184
+ import { resolvePath } from "../safe-bash-contracts/path.js";
1185
+ import { createOutputOperation } from "../safe-bash-contracts/output.js";
1186
+ import { writeFileOutput } from "../safe-bash-contracts/filesystem-output-budget.js";
1187
+ import { inheritYieldCheckpoint, yieldTurn } from "../safe-bash-contracts/yield.js";
1188
+ function createDotCommand(options = {}) {
1189
+ const maxInputBytes = InputByteBudget.limit(options.limits?.maxInputBytes ?? 1024 * 1024);
1190
+ const maxNodes = InputByteBudget.limit(options.limits?.maxNodes ?? 1e4);
1191
+ const maxPixels = InputByteBudget.limit(options.limits?.maxPixels ?? 16e6);
1192
+ const maxLayoutCost = InputByteBudget.limit(options.limits?.maxLayoutCost ?? 1e8);
1193
+ return { name: "dot", runtimeIdentity: commandRuntimeIdentity, async execute(context) {
1194
+ return new InputByteBudget(maxInputBytes, context.inputBudget).run(context, async (context2) => {
1195
+ const operation = createOutputOperation(context2, { write: async () => {
1196
+ } });
1197
+ inheritYieldCheckpoint(context2.signal, operation.signal);
1198
+ try {
1199
+ const args = getCommandArguments(context2).args;
1200
+ let format = "svg";
1201
+ let output;
1202
+ let input;
1203
+ let positional = false;
1204
+ const diagnostic = async (message) => {
1205
+ await writeBytes(context2.stderr, new TextEncoder().encode(`dot: ${message}
1206
+ `), operation.signal);
1207
+ return { exitCode: 1 };
1208
+ };
1209
+ for (let i = 0; i < args.length; i++) {
1210
+ const arg = args[i];
1211
+ if (!positional && arg === "--") {
1212
+ positional = true;
1213
+ continue;
1214
+ }
1215
+ if (!positional && (arg === "--help" || arg === "-?")) {
1216
+ await writeBytes(operation.child(context2.stdout).output, new TextEncoder().encode("Usage: dot -Tsvg|-Tpdf|-Tpng [-o OUTPUT] [INPUT]\n"), operation.signal);
1217
+ return { exitCode: 0 };
1218
+ }
1219
+ if (!positional && arg.startsWith("-T")) {
1220
+ format = arg.slice(2) || args[++i] || "";
1221
+ continue;
1222
+ }
1223
+ if (!positional && arg === "-o") {
1224
+ output = args[++i];
1225
+ if (!output) return diagnostic("missing output path");
1226
+ continue;
1227
+ }
1228
+ if (!positional && arg.startsWith("-") && arg !== "-") return diagnostic(`unsupported option ${arg}`);
1229
+ if (input !== void 0) return diagnostic("expected at most one input");
1230
+ input = arg;
1231
+ }
1232
+ if (format !== "svg" && format !== "pdf" && format !== "png") return diagnostic(`unsupported format ${format}`);
1233
+ const bytes = !input || input === "-" ? await collectBytes(context2.stdin, { signal: operation.signal }) : await context2.fs.readFile(resolvePath(context2.cwd, input), { signal: operation.signal });
1234
+ await yieldTurn(operation.signal);
1235
+ let svg;
1236
+ try {
1237
+ const graph = parseDot(new TextDecoder().decode(bytes));
1238
+ let count = 0;
1239
+ let edges = 0;
1240
+ let minlen = 1;
1241
+ let extremalRank = false;
1242
+ const visit = (value) => {
1243
+ if (value === null || typeof value !== "object") return 0;
1244
+ if (++count > maxNodes) throw new RangeError("graph node limit exceeded");
1245
+ const record2 = value;
1246
+ if (typeof record2.minlen === "string" && Number.isFinite(Number(record2.minlen))) minlen = Math.max(minlen, Math.round(Number(record2.minlen)));
1247
+ if (["min", "max", "source", "sink"].includes(String(record2.rank))) extremalRank = true;
1248
+ let references = typeof record2.id === "string" && !("kind" in record2) ? 1 : 0;
1249
+ for (const [key, child] of Object.entries(record2)) {
1250
+ if (Array.isArray(child)) {
1251
+ let previous = 0;
1252
+ for (const item of child) {
1253
+ const current = visit(item);
1254
+ if (key === "endpoints") {
1255
+ edges += previous * current;
1256
+ previous = current;
1257
+ }
1258
+ references += current;
1259
+ }
1260
+ } else references += visit(child);
1261
+ }
1262
+ return references;
1263
+ };
1264
+ visit(graph);
1265
+ const rankSpan = count * minlen;
1266
+ const expanded = count + (edges + (extremalRank ? count * count : 0)) * rankSpan;
1267
+ const cost = expanded * expanded;
1268
+ if (!Number.isSafeInteger(cost) || cost > maxLayoutCost) throw new RangeError("graph layout cost limit exceeded");
1269
+ svg = renderSvg(layoutGraph(graph));
1270
+ } catch (error) {
1271
+ operation.signal.throwIfAborted();
1272
+ return diagnostic(error instanceof Error ? error.message : "invalid graph");
1273
+ }
1274
+ await yieldTurn(operation.signal);
1275
+ const rendered = format === "svg" ? new TextEncoder().encode(svg) : await (await import("../safe-bash-svg-engine/index.js")).renderSvgDocument(svg, format, { signal: operation.signal, maxNodes, maxPixels });
1276
+ if (output && output !== "-") await writeFileOutput(context2, rendered, (data) => context2.fs.writeFile(resolvePath(context2.cwd, output), data, { signal: operation.signal }));
1277
+ else await writeBytes(operation.child(context2.stdout).output, rendered, operation.signal);
1278
+ return { exitCode: 0 };
1279
+ } finally {
1280
+ await operation.close();
1281
+ }
1282
+ });
1283
+ } };
1284
+ }
1285
+ function createDotCommands(options = {}) {
1286
+ return [createDotCommand(options)];
1287
+ }
1288
+ function dotCommands(options = {}) {
1289
+ const commands = createDotCommands(options);
1290
+ return { name: "dot", setup(host) {
1291
+ for (const command of commands) host.commands.register(command, { replace: options.replace ?? false });
1292
+ } };
1293
+ }
1294
+ export {
1295
+ createDotCommand,
1296
+ createDotCommands,
1297
+ dotCommands
1298
+ };