@poe-platform/safe-bash 0.1.813 → 0.1.815

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 (528) hide show
  1. package/dist/image-ast/index.js +1 -1
  2. package/dist/mp4-ast/index.d.ts +3 -0
  3. package/dist/mp4-ast/mp4-fragment-source.d.ts +35 -0
  4. package/dist/mp4-ast/mp4-sample-source.d.ts +55 -0
  5. package/dist/mp4-ast/mp4-source.d.ts +32 -0
  6. package/dist/mp4-ast/types.d.ts +11 -0
  7. package/dist/office-xml/retained-xml-document.d.ts +6 -0
  8. package/dist/pdf-ast/content/evaluator.d.ts +4 -0
  9. package/dist/pdf-ast/cos/object-reader.d.ts +8 -0
  10. package/dist/pdf-ast/cos/value-parser.d.ts +1 -0
  11. package/dist/pdf-ast/edit/forms.d.ts +1 -0
  12. package/dist/pdf-ast/edit/retained-form-appearances.d.ts +10 -0
  13. package/dist/pdf-ast/edit/retained-form-data.d.ts +9 -0
  14. package/dist/pdf-ast/edit/retained-graph.d.ts +6 -0
  15. package/dist/pdf-ast/edit/retained-info-updates.d.ts +33 -0
  16. package/dist/pdf-ast/index.d.ts +2 -1
  17. package/dist/pdf-ast/index.js +895 -139
  18. package/dist/pdf-ast/retained-document.d.ts +5 -0
  19. package/dist/safe-bash/command-chunks/biff-A7XPBWAK-DCLG5QKF.js +5417 -0
  20. package/dist/safe-bash/command-chunks/{chunk-34G2SQX2.js → chunk-2BLTUQNK.js} +2 -2
  21. package/dist/safe-bash/command-chunks/{chunk-LLU2IQEJ.js → chunk-2BNGPR6Z.js} +2 -2
  22. package/dist/safe-bash/command-chunks/{chunk-XIDGHIGB.js → chunk-2PKBXGXD.js} +5 -5
  23. package/dist/safe-bash/command-chunks/{chunk-6SRHWVEB.js → chunk-2VVJRVYM.js} +1 -1
  24. package/dist/safe-bash/command-chunks/{chunk-G5QVZQCO.js → chunk-3EASXF5D.js} +5 -5
  25. package/dist/safe-bash/command-chunks/{chunk-U3SBHEKH.js → chunk-3EB2FSAN.js} +9 -9
  26. package/dist/safe-bash/command-chunks/{chunk-VB2TUPO2.js → chunk-3EW7GYHM.js} +9 -9
  27. package/dist/safe-bash/command-chunks/{chunk-GVWVRPG6.js → chunk-3GRMU7TM.js} +6 -6
  28. package/dist/safe-bash/command-chunks/{chunk-6L4IYQAT.js → chunk-3MG5EAMX.js} +4 -4
  29. package/dist/safe-bash/command-chunks/{chunk-RASQPOSV.js → chunk-3SPLP2DB.js} +1 -1
  30. package/dist/safe-bash/command-chunks/{chunk-K5COUQAQ.js → chunk-3VGQTLO6.js} +1 -1
  31. package/dist/safe-bash/command-chunks/{chunk-K7CV55K5.js → chunk-3YEQI5B7.js} +10 -10
  32. package/dist/safe-bash/command-chunks/{chunk-KCE5D4Z4.js → chunk-3ZRCL756.js} +3 -3
  33. package/dist/safe-bash/command-chunks/{chunk-SOFM3GPG.js → chunk-42MEXZBJ.js} +1 -1
  34. package/dist/safe-bash/command-chunks/{chunk-PKLJRB7W.js → chunk-44F5TOHZ.js} +219 -90
  35. package/dist/safe-bash/command-chunks/{chunk-GQ2ZSPZ3.js → chunk-46AMTJPE.js} +10 -10
  36. package/dist/safe-bash/command-chunks/{chunk-MTWZEPAR.js → chunk-47IAU25U.js} +2 -2
  37. package/dist/safe-bash/command-chunks/{chunk-6GI3NTCW.js → chunk-4B2ZUGLT.js} +4 -4
  38. package/dist/safe-bash/command-chunks/{chunk-X64XGIXZ.js → chunk-4EHY6J2Z.js} +5 -5
  39. package/dist/safe-bash/command-chunks/{chunk-QQVACHZA.js → chunk-4EZJV4FZ.js} +1 -1
  40. package/dist/safe-bash/command-chunks/{chunk-SSKMPDN4.js → chunk-4GQKCUS5.js} +15 -15
  41. package/dist/safe-bash/command-chunks/{chunk-UOBW5K3M.js → chunk-4RRYWHED.js} +7 -7
  42. package/dist/safe-bash/command-chunks/{chunk-PINR7QET.js → chunk-4UPKVQWH.js} +8 -8
  43. package/dist/safe-bash/command-chunks/{chunk-I4GMCWAT.js → chunk-4YLACJHE.js} +6 -6
  44. package/dist/safe-bash/command-chunks/{chunk-P3WU3PSL.js → chunk-5L4YGRQU.js} +3 -3
  45. package/dist/safe-bash/command-chunks/{chunk-WPVBUVFK.js → chunk-5LFGXN3D.js} +6 -6
  46. package/dist/safe-bash/command-chunks/{chunk-YXD6VGVG.js → chunk-5OM3UIK3.js} +3 -3
  47. package/dist/safe-bash/command-chunks/{chunk-RLCQ7BN3.js → chunk-6CDDKNNA.js} +4 -3
  48. package/dist/safe-bash/command-chunks/{chunk-TQEB4DH4.js → chunk-6EINUY5G.js} +149 -165
  49. package/dist/safe-bash/command-chunks/{chunk-C5QDEB3I.js → chunk-6LPSKLLD.js} +3 -3
  50. package/dist/safe-bash/command-chunks/{chunk-XLYIVBAR.js → chunk-6QYSF7I2.js} +7 -7
  51. package/dist/safe-bash/command-chunks/{chunk-6IWE7PTK.js → chunk-6VBDJC6V.js} +6 -6
  52. package/dist/safe-bash/command-chunks/{chunk-6N5GHM72.js → chunk-6WNVGCXD.js} +8 -8
  53. package/dist/safe-bash/command-chunks/{chunk-PSCOXGCA.js → chunk-6XES7Z4G.js} +12 -12
  54. package/dist/safe-bash/command-chunks/{chunk-AFROLW6S.js → chunk-6XGDWFNQ.js} +4 -4
  55. package/dist/safe-bash/command-chunks/{chunk-WTE23QXN.js → chunk-6ZGCKUAM.js} +3 -3
  56. package/dist/safe-bash/command-chunks/{chunk-RIV6XN7K.js → chunk-7DOLY7IV.js} +2 -2
  57. package/dist/safe-bash/command-chunks/{chunk-ET2VPDUA.js → chunk-7KZ5LWV2.js} +1 -1
  58. package/dist/safe-bash/command-chunks/{chunk-NGR5KOPQ.js → chunk-A347DLRB.js} +3 -3
  59. package/dist/safe-bash/command-chunks/{chunk-ZM2Y4Z3C.js → chunk-A45UG4KT.js} +4 -4
  60. package/dist/safe-bash/command-chunks/{chunk-2Z3WRRFT.js → chunk-ADHFF2IM.js} +9 -9
  61. package/dist/safe-bash/command-chunks/{chunk-ATI464W3.js → chunk-AG2SNMP5.js} +1 -1
  62. package/dist/safe-bash/command-chunks/{chunk-HCKYUQ3L.js → chunk-AM5LANIE.js} +7 -7
  63. package/dist/safe-bash/command-chunks/{chunk-RBTC7OFT.js → chunk-AVOGFREX.js} +5 -5
  64. package/dist/safe-bash/command-chunks/{chunk-G3RUXKVY.js → chunk-AWPI4DZR.js} +3 -3
  65. package/dist/safe-bash/command-chunks/{chunk-FYMNHG7R.js → chunk-AXXZNB7U.js} +13 -13
  66. package/dist/safe-bash/command-chunks/{chunk-2E2H7MBH.js → chunk-AY3KQ4EN.js} +7 -7
  67. package/dist/safe-bash/command-chunks/{chunk-DMCI6T6N.js → chunk-BLGGAHQW.js} +1 -1
  68. package/dist/safe-bash/command-chunks/{chunk-CU4DLVME.js → chunk-BLIFGBIO.js} +2 -2
  69. package/dist/safe-bash/command-chunks/{chunk-2V6FOLXV.js → chunk-BS3ZEQGT.js} +14 -14
  70. package/dist/safe-bash/command-chunks/{chunk-WFVSUXJL.js → chunk-BS5JEUEW.js} +8 -8
  71. package/dist/safe-bash/command-chunks/{chunk-X53AEG36.js → chunk-BZMNC7Q5.js} +7 -7
  72. package/dist/safe-bash/command-chunks/{chunk-5KGEZ3RW.js → chunk-CCMAHM3I.js} +2 -2
  73. package/dist/safe-bash/command-chunks/{chunk-PK36TVXB.js → chunk-CFMJXJS5.js} +1 -1
  74. package/dist/safe-bash/command-chunks/{chunk-3LJAXFH5.js → chunk-CIRDVCAZ.js} +7 -7
  75. package/dist/safe-bash/command-chunks/{chunk-UZL7G57V.js → chunk-CKEMZUE3.js} +7 -7
  76. package/dist/safe-bash/command-chunks/{chunk-S2N2V5U4.js → chunk-CQBACD2V.js} +2 -2
  77. package/dist/safe-bash/command-chunks/{chunk-G7NENPYV.js → chunk-CSE4VQKG.js} +12 -1
  78. package/dist/safe-bash/command-chunks/{chunk-X6RHJ6YN.js → chunk-CXME4YHU.js} +23 -0
  79. package/dist/safe-bash/command-chunks/{chunk-FTLDRH47.js → chunk-CZ5K2YPU.js} +16 -16
  80. package/dist/safe-bash/command-chunks/{chunk-7PRL6RJ6.js → chunk-DBLQUZGN.js} +2 -2
  81. package/dist/safe-bash/command-chunks/{chunk-5VQVZPP3.js → chunk-DBNJEXHK.js} +3 -3
  82. package/dist/safe-bash/command-chunks/{chunk-ZO5WBWLL.js → chunk-DN6MSXY7.js} +2 -2
  83. package/dist/safe-bash/command-chunks/{chunk-GXLXWZWH.js → chunk-DZH54L3F.js} +3 -3
  84. package/dist/safe-bash/command-chunks/{chunk-6CY5BHBS.js → chunk-EBHOZIBS.js} +6 -6
  85. package/dist/safe-bash/command-chunks/{chunk-3Y5EME26.js → chunk-ENEIE44W.js} +2 -2
  86. package/dist/safe-bash/command-chunks/{chunk-TKRLZIFI.js → chunk-EQWFKNHJ.js} +17 -17
  87. package/dist/safe-bash/command-chunks/{chunk-YV72XQKL.js → chunk-ETXPMVR6.js} +13 -13
  88. package/dist/safe-bash/command-chunks/{chunk-4Z6W5EOC.js → chunk-EV5G535P.js} +8 -8
  89. package/dist/safe-bash/command-chunks/{chunk-PZMU3Z4L.js → chunk-EVYKV3QI.js} +5 -5
  90. package/dist/safe-bash/command-chunks/{chunk-D6UMSC45.js → chunk-F4YFTO2K.js} +11 -11
  91. package/dist/safe-bash/command-chunks/{chunk-QM2HZJSJ.js → chunk-F762XDNG.js} +3 -3
  92. package/dist/safe-bash/command-chunks/{chunk-SGPCXAG7.js → chunk-FOONI6BD.js} +7 -7
  93. package/dist/safe-bash/command-chunks/{chunk-DYLNU57U.js → chunk-FSVJ67G5.js} +1 -1
  94. package/dist/safe-bash/command-chunks/{chunk-CLKOGAR3.js → chunk-FSYMSWJU.js} +8 -8
  95. package/dist/safe-bash/command-chunks/{chunk-FWPVQGYK.js → chunk-FUQMEUAT.js} +6 -6
  96. package/dist/safe-bash/command-chunks/{chunk-KXPCSVAT.js → chunk-FXCSPPYE.js} +20 -20
  97. package/dist/safe-bash/command-chunks/{chunk-7QZ2HP2F.js → chunk-FYYFV6PW.js} +6 -6
  98. package/dist/safe-bash/command-chunks/{chunk-3OETVNJA.js → chunk-G2COZLXX.js} +9 -9
  99. package/dist/safe-bash/command-chunks/{chunk-MKX4JAZ6.js → chunk-GCHB7VNX.js} +17 -17
  100. package/dist/safe-bash/command-chunks/{chunk-4Y6O2K35.js → chunk-GLAF45M7.js} +1 -1
  101. package/dist/safe-bash/command-chunks/chunk-GPGLTWNR.js +271 -0
  102. package/dist/safe-bash/command-chunks/{chunk-PI6MOMHA.js → chunk-GXMPXMDP.js} +11 -11
  103. package/dist/safe-bash/command-chunks/{chunk-57DDYKE5.js → chunk-GYM5ICK4.js} +7 -7
  104. package/dist/safe-bash/command-chunks/{chunk-5MFDRSGG.js → chunk-H33D4R26.js} +4 -4
  105. package/dist/safe-bash/command-chunks/{chunk-3ZDANXIC.js → chunk-HELAVGZH.js} +3 -3
  106. package/dist/safe-bash/command-chunks/{chunk-S4QH5BXZ.js → chunk-HGIMFVI2.js} +4 -4
  107. package/dist/safe-bash/command-chunks/{chunk-35IPOBWL.js → chunk-HI6ZYH3W.js} +10 -10
  108. package/dist/safe-bash/command-chunks/{chunk-RGOQKIG6.js → chunk-HK6MSB7Z.js} +5 -5
  109. package/dist/safe-bash/command-chunks/{chunk-IHSOOSNC.js → chunk-HQ2UN2L2.js} +17 -17
  110. package/dist/safe-bash/command-chunks/{chunk-7ZE3VIAN.js → chunk-IB5QP4LF.js} +2 -2
  111. package/dist/safe-bash/command-chunks/{chunk-UCR5YDV3.js → chunk-IBYMPAUW.js} +1 -1
  112. package/dist/safe-bash/command-chunks/{chunk-LABOWPFB.js → chunk-IHXZMAMY.js} +9 -9
  113. package/dist/safe-bash/command-chunks/{chunk-PVGZMLC6.js → chunk-IWHNRYER.js} +3 -3
  114. package/dist/safe-bash/command-chunks/{chunk-PPO7YUZF.js → chunk-JGKSWDGP.js} +1 -1
  115. package/dist/safe-bash/command-chunks/{chunk-GKILM4HZ.js → chunk-JR3Q6QNL.js} +7 -7
  116. package/dist/safe-bash/command-chunks/{chunk-D55REQA3.js → chunk-JUHOL5KB.js} +1 -1
  117. package/dist/safe-bash/command-chunks/{chunk-3O2YEI47.js → chunk-JVKE7YZN.js} +3 -3
  118. package/dist/safe-bash/command-chunks/{chunk-6NATRKUJ.js → chunk-JW6WVNTM.js} +1 -1
  119. package/dist/safe-bash/command-chunks/{chunk-IK6K2HCG.js → chunk-JWORWL72.js} +1 -1
  120. package/dist/safe-bash/command-chunks/{chunk-N32GSM3J.js → chunk-K2WOMJOQ.js} +1 -1
  121. package/dist/safe-bash/command-chunks/{chunk-73NYFNAS.js → chunk-KASXIRKD.js} +12 -9
  122. package/dist/safe-bash/command-chunks/{chunk-HKOMXGJS.js → chunk-KBAQHE5Y.js} +2 -2
  123. package/dist/safe-bash/command-chunks/{chunk-T3E5RV3U.js → chunk-KCLJGRU7.js} +12 -12
  124. package/dist/safe-bash/command-chunks/chunk-KHUT7BB5.js +65 -0
  125. package/dist/safe-bash/command-chunks/{chunk-TUDFMNPP.js → chunk-KINIV2SV.js} +1 -1
  126. package/dist/safe-bash/command-chunks/{chunk-43TRBJ2N.js → chunk-KPHLESD4.js} +4 -4
  127. package/dist/safe-bash/command-chunks/{chunk-C5KLFZGT.js → chunk-KSBNZTAZ.js} +6 -6
  128. package/dist/safe-bash/command-chunks/{chunk-4Y34ZG4T.js → chunk-KUOCGGEU.js} +11 -11
  129. package/dist/safe-bash/command-chunks/{chunk-ML5R5JML.js → chunk-KY4LCHUF.js} +1 -1
  130. package/dist/safe-bash/command-chunks/{chunk-KBUBSMCQ.js → chunk-LDW3RF7Y.js} +12 -12
  131. package/dist/safe-bash/command-chunks/{chunk-U27XPNLP.js → chunk-LEO4VRIN.js} +2 -2
  132. package/dist/safe-bash/command-chunks/{chunk-GZ3VIWNN.js → chunk-LKGTH2Q7.js} +7 -7
  133. package/dist/safe-bash/command-chunks/{chunk-TODWFDYB.js → chunk-LNTEV56A.js} +2 -2
  134. package/dist/safe-bash/command-chunks/{chunk-DVGXLBUW.js → chunk-LZ2JFMKT.js} +10 -10
  135. package/dist/safe-bash/command-chunks/{chunk-6D2BMAF4.js → chunk-MEM2ZPMI.js} +2 -2
  136. package/dist/safe-bash/command-chunks/{chunk-GNXTMSYN.js → chunk-MGMTRGKM.js} +4 -4
  137. package/dist/safe-bash/command-chunks/{chunk-B3NLITWP.js → chunk-MKK6FM5H.js} +7 -7
  138. package/dist/safe-bash/command-chunks/{chunk-BK7ISUJL.js → chunk-MKOIPOXX.js} +3 -3
  139. package/dist/safe-bash/command-chunks/chunk-MLOYUXUV.js +244 -0
  140. package/dist/safe-bash/command-chunks/{chunk-CBNKHBLD.js → chunk-MNK3DDH6.js} +2 -2
  141. package/dist/safe-bash/command-chunks/{chunk-JVGUVHWI.js → chunk-MPXMRTMY.js} +10 -10
  142. package/dist/safe-bash/command-chunks/{chunk-EJTNVXWF.js → chunk-MVLVIMJ6.js} +6 -6
  143. package/dist/safe-bash/command-chunks/{chunk-TY4WDAHM.js → chunk-MYZ46FQL.js} +1 -1
  144. package/dist/safe-bash/command-chunks/{chunk-TBAIMDGL.js → chunk-N4MUBJCT.js} +1 -1
  145. package/dist/safe-bash/command-chunks/{chunk-NPLVFAD6.js → chunk-N6G3345Q.js} +8 -8
  146. package/dist/safe-bash/command-chunks/{chunk-4PBNMKAT.js → chunk-NEMUPUUB.js} +7 -7
  147. package/dist/safe-bash/command-chunks/{chunk-MUUWBZIC.js → chunk-NEVQWOU6.js} +10 -10
  148. package/dist/safe-bash/command-chunks/{chunk-7NXTEWPR.js → chunk-NEYITAAO.js} +208 -254
  149. package/dist/safe-bash/command-chunks/{chunk-KZ5ODST6.js → chunk-NFGCBQN3.js} +2 -2
  150. package/dist/safe-bash/command-chunks/{chunk-LD7BONZY.js → chunk-NFII726L.js} +2 -2
  151. package/dist/safe-bash/command-chunks/{chunk-JQPNA77Y.js → chunk-NHNZYWPW.js} +2 -2
  152. package/dist/safe-bash/command-chunks/{chunk-ZYLGNIGA.js → chunk-NQINS4XY.js} +1 -1
  153. package/dist/safe-bash/command-chunks/{chunk-UAF4IX5H.js → chunk-NRFTYZ2R.js} +6 -6
  154. package/dist/safe-bash/command-chunks/{chunk-THMZLJQD.js → chunk-NYFYTL5G.js} +18 -18
  155. package/dist/safe-bash/command-chunks/{chunk-SMSGLRIH.js → chunk-OTF2AJ5M.js} +6 -6
  156. package/dist/safe-bash/command-chunks/{chunk-NPFHUS4X.js → chunk-OVQP6KH5.js} +6 -6
  157. package/dist/safe-bash/command-chunks/{chunk-QFF5KBOM.js → chunk-P2LT6TGR.js} +9 -9
  158. package/dist/safe-bash/command-chunks/{chunk-BEHUSUOY.js → chunk-PLMF35XK.js} +4 -4
  159. package/dist/safe-bash/command-chunks/{chunk-PXWS3Q7L.js → chunk-PLR5IULU.js} +5 -5
  160. package/dist/safe-bash/command-chunks/{chunk-DBLHCJJU.js → chunk-PS5GDFIP.js} +2 -2
  161. package/dist/safe-bash/command-chunks/{chunk-P7EL2FWW.js → chunk-Q5PWYPQV.js} +7 -7
  162. package/dist/safe-bash/command-chunks/{chunk-AJI55RS7.js → chunk-Q7TVCBU2.js} +1 -1
  163. package/dist/safe-bash/command-chunks/{chunk-EHTOHOTR.js → chunk-QB72X7FF.js} +9 -9
  164. package/dist/safe-bash/command-chunks/{chunk-GOBUDKZ3.js → chunk-QDVDBN2N.js} +4 -4
  165. package/dist/safe-bash/command-chunks/{chunk-F3GP3EXE.js → chunk-RGDOYWOD.js} +2 -2
  166. package/dist/safe-bash/command-chunks/{chunk-MNHBQBF6.js → chunk-RHDERFMR.js} +5 -5
  167. package/dist/safe-bash/command-chunks/{chunk-3KMOXEGH.js → chunk-RHU44OMN.js} +2 -2
  168. package/dist/safe-bash/command-chunks/{chunk-XG6UWQV5.js → chunk-RIVKF77R.js} +6 -6
  169. package/dist/safe-bash/command-chunks/{chunk-UOR6PXZZ.js → chunk-ROL5AEX6.js} +1 -1
  170. package/dist/safe-bash/command-chunks/{chunk-3TYDSGAH.js → chunk-RQYPFLZJ.js} +6 -6
  171. package/dist/safe-bash/command-chunks/{chunk-3Y4XZB24.js → chunk-RTNI47C5.js} +4 -4
  172. package/dist/safe-bash/command-chunks/{chunk-W5LLKV5H.js → chunk-RV5AGXOV.js} +2 -2
  173. package/dist/safe-bash/command-chunks/{chunk-JUJHYPYL.js → chunk-RXQ2G2YK.js} +9 -9
  174. package/dist/safe-bash/command-chunks/{chunk-EVU7FLDA.js → chunk-S2QNBAN6.js} +7 -7
  175. package/dist/safe-bash/command-chunks/{chunk-YE6OAKK7.js → chunk-S43QRKDC.js} +7 -7
  176. package/dist/safe-bash/command-chunks/{chunk-774GLJAO.js → chunk-S7HIOT7Z.js} +4 -4
  177. package/dist/safe-bash/command-chunks/{chunk-3D24WDND.js → chunk-SEPUP6TZ.js} +1 -1
  178. package/dist/safe-bash/command-chunks/{chunk-JPMYPOYZ.js → chunk-SUTHGUD3.js} +28 -28
  179. package/dist/safe-bash/command-chunks/{chunk-D6WJY6QO.js → chunk-SWAKALDJ.js} +10 -10
  180. package/dist/safe-bash/command-chunks/{chunk-WGH3RLJY.js → chunk-T5S4SJGO.js} +9 -9
  181. package/dist/safe-bash/command-chunks/{chunk-7JEIWA3A.js → chunk-TID5TSQW.js} +5 -5
  182. package/dist/safe-bash/command-chunks/{chunk-EZ4NQIPL.js → chunk-TJLXSENN.js} +1 -1
  183. package/dist/safe-bash/command-chunks/{chunk-HVW53ARH.js → chunk-TKCUGMRZ.js} +24 -20
  184. package/dist/safe-bash/command-chunks/{chunk-5P6I2T63.js → chunk-TXPDKEGY.js} +8 -8
  185. package/dist/safe-bash/command-chunks/{chunk-CTDC4LJT.js → chunk-U3C6IT2C.js} +55 -36
  186. package/dist/safe-bash/command-chunks/{chunk-MPKY37QR.js → chunk-UJERQEJB.js} +1 -1
  187. package/dist/safe-bash/command-chunks/{chunk-V37D6AHO.js → chunk-USGZN2KE.js} +5 -5
  188. package/dist/safe-bash/command-chunks/{chunk-JAHJWVGF.js → chunk-UYGQEQIP.js} +5 -5
  189. package/dist/safe-bash/command-chunks/{chunk-MPORWUTU.js → chunk-V5XC43BX.js} +8 -8
  190. package/dist/safe-bash/command-chunks/{chunk-AIMSZBWP.js → chunk-V7E3PZOK.js} +9 -9
  191. package/dist/safe-bash/command-chunks/{chunk-CNHRVUHA.js → chunk-VDTFVRYX.js} +1 -1
  192. package/dist/safe-bash/command-chunks/{chunk-M3Z5PU2M.js → chunk-VT2PHQ63.js} +15 -15
  193. package/dist/safe-bash/command-chunks/{chunk-QDVI2YB6.js → chunk-VUWXLH3E.js} +2 -2
  194. package/dist/safe-bash/command-chunks/{chunk-O675URF4.js → chunk-W3ZSWK76.js} +8 -8
  195. package/dist/safe-bash/command-chunks/{chunk-T6C5QP7T.js → chunk-WAT2562G.js} +6039 -5958
  196. package/dist/safe-bash/command-chunks/{chunk-JPA2PUYI.js → chunk-WBKB7HBZ.js} +8 -8
  197. package/dist/safe-bash/command-chunks/{chunk-6244HYJY.js → chunk-WJ2ERUCQ.js} +1 -1
  198. package/dist/safe-bash/command-chunks/{chunk-U5TWQFZY.js → chunk-WTVJLHMG.js} +1 -1
  199. package/dist/safe-bash/command-chunks/{chunk-SLQWQKXP.js → chunk-WWHMI4S3.js} +9 -9
  200. package/dist/safe-bash/command-chunks/{chunk-2UBZALAK.js → chunk-WYZG3DRR.js} +1 -1
  201. package/dist/safe-bash/command-chunks/{chunk-T5ERNELL.js → chunk-WZRFS5OY.js} +4 -4
  202. package/dist/safe-bash/command-chunks/{chunk-2DGJOOXM.js → chunk-X6OHFKBL.js} +8 -8
  203. package/dist/safe-bash/command-chunks/{chunk-S6ZTBXYO.js → chunk-XKAUKLF7.js} +13 -13
  204. package/dist/safe-bash/command-chunks/{chunk-NKTULXVD.js → chunk-XM5QJCPD.js} +8 -8
  205. package/dist/safe-bash/command-chunks/{chunk-BBAB7LC4.js → chunk-XMTR7QGL.js} +4 -4
  206. package/dist/safe-bash/command-chunks/{chunk-5IFRAI7Y.js → chunk-XNGM3W5R.js} +1 -1
  207. package/dist/safe-bash/command-chunks/{chunk-Z5BIM5B7.js → chunk-XTEIT5CI.js} +1 -1
  208. package/dist/safe-bash/command-chunks/{chunk-4DLIUTQV.js → chunk-XU6S3XUZ.js} +11 -11
  209. package/dist/safe-bash/command-chunks/{chunk-EXOQGXEU.js → chunk-XUJAQA3S.js} +30 -30
  210. package/dist/safe-bash/command-chunks/{chunk-VVWXY6IA.js → chunk-Y42KSX63.js} +6 -6
  211. package/dist/safe-bash/command-chunks/{chunk-R2BMZAHG.js → chunk-Y54L4P4J.js} +5 -5
  212. package/dist/safe-bash/command-chunks/{chunk-6WQD7LRA.js → chunk-YAD7EV4N.js} +14 -14
  213. package/dist/safe-bash/command-chunks/{chunk-YUXTK3XA.js → chunk-YRPXBGRX.js} +3 -3
  214. package/dist/safe-bash/command-chunks/{chunk-JORIVUPM.js → chunk-YW2VYN4V.js} +34 -15
  215. package/dist/safe-bash/command-chunks/{chunk-NMPED6L5.js → chunk-Z2WNYEPD.js} +4 -4
  216. package/dist/safe-bash/command-chunks/{chunk-7PZHWMK6.js → chunk-Z7QOSXQC.js} +7 -7
  217. package/dist/safe-bash/command-chunks/{chunk-7UC2Q6Z6.js → chunk-ZIGENXGC.js} +248 -6
  218. package/dist/safe-bash/command-chunks/{chunk-VQOINPVF.js → chunk-ZQM37BGE.js} +2 -2
  219. package/dist/safe-bash/command-chunks/{chunk-W3HV45CI.js → chunk-ZSQZHFWS.js} +9 -9
  220. package/dist/safe-bash/command-chunks/{chunk-IDJQP3A6.js → chunk-ZTMZO4IT.js} +1 -1
  221. package/dist/safe-bash/command-chunks/{chunk-V6XBEYPC.js → chunk-ZU2KJMXO.js} +8 -8
  222. package/dist/safe-bash/command-chunks/{chunk-YXKNJ6EM.js → chunk-ZXELXF2H.js} +5 -5
  223. package/dist/safe-bash/command-chunks/{clipboard-BBDK33GP-VB22F7GI.js → clipboard-BBDK33GP-QZ4ERNQX.js} +2 -2
  224. package/dist/safe-bash/command-chunks/{command-engine-X3OLN7N6.js → command-engine-M7S4QIXV.js} +942 -683
  225. package/dist/safe-bash/command-chunks/{engine-XUCIFZ7V-LJFGZM6O.js → engine-YUYZJIB4-NZUDFEHL.js} +1 -1
  226. package/dist/safe-bash/command-chunks/{gnumeric-UJPXWBVR-YPXTNEDZ.js → gnumeric-UJPXWBVR-7VOHQAPM.js} +2 -2
  227. package/dist/safe-bash/command-chunks/{model-store-E7BHBFJC.js → model-store-UB5DWMAP.js} +24 -24
  228. package/dist/safe-bash-command-awk/awk-runtime.js +3 -3
  229. package/dist/safe-bash-command-awk/awk.js +4 -4
  230. package/dist/safe-bash-command-awk/index.js +4 -4
  231. package/dist/safe-bash-command-diff/diff.js +2 -2
  232. package/dist/safe-bash-command-diff/index.js +3 -3
  233. package/dist/safe-bash-command-diff/sync.js +2 -2
  234. package/dist/safe-bash-command-du/du.js +2 -2
  235. package/dist/safe-bash-command-du/index.js +2 -2
  236. package/dist/safe-bash-command-ffmpeg/index.js +1 -1
  237. package/dist/safe-bash-command-ffprobe/index.js +2 -2
  238. package/dist/safe-bash-command-ffprobe/media.d.ts +8 -2
  239. package/dist/safe-bash-command-ffprobe/media.js +4 -2
  240. package/dist/safe-bash-command-html-to-markdown/index.js +3 -234
  241. package/dist/safe-bash-command-html-to-markdown/stored-text.d.ts +50 -0
  242. package/dist/safe-bash-command-html-to-markdown/stored-text.js +12 -0
  243. package/dist/safe-bash-command-htmlq/contracts.d.ts +5 -0
  244. package/dist/safe-bash-command-htmlq/index.js +1715 -292
  245. package/dist/safe-bash-command-htmlq/selectors.d.ts +38 -1
  246. package/dist/safe-bash-command-htmlq/serializer.d.ts +1 -0
  247. package/dist/safe-bash-command-htmlq/tree.d.ts +1 -0
  248. package/dist/safe-bash-command-iconv/command.js +2 -2
  249. package/dist/safe-bash-command-iconv/index.js +2 -2
  250. package/dist/safe-bash-command-llm/command.js +3 -3
  251. package/dist/safe-bash-command-llm/index.js +9 -9
  252. package/dist/safe-bash-command-llm/openai.js +2 -2
  253. package/dist/safe-bash-command-llm/providers/index.js +2 -2
  254. package/dist/safe-bash-command-llm/providers/openai.js +2 -2
  255. package/dist/safe-bash-command-node/commands/node/browser.js +2 -2
  256. package/dist/safe-bash-command-node/commands/node/default-runtime.js +2 -2
  257. package/dist/safe-bash-command-node/commands/node/safejs.js +2 -2
  258. package/dist/safe-bash-command-pandoc/command.js +4 -4
  259. package/dist/safe-bash-command-pandoc/index.js +40 -40
  260. package/dist/safe-bash-command-patch/index.js +7 -6
  261. package/dist/safe-bash-command-patch/patch-formats.d.ts +7 -1
  262. package/dist/safe-bash-command-patch/patch-formats.js +7 -4
  263. package/dist/safe-bash-command-patch/patch-gnu-paths.d.ts +7 -7
  264. package/dist/safe-bash-command-patch/patch-gnu-reject.d.ts +2 -2
  265. package/dist/safe-bash-command-patch/patch-gnu-reject.js +3 -2
  266. package/dist/safe-bash-command-patch/patch-publication.js +3 -2
  267. package/dist/safe-bash-command-patch/patch-text.d.ts +13 -0
  268. package/dist/safe-bash-command-patch/patch.js +7 -6
  269. package/dist/safe-bash-command-patch/stored-patch.d.ts +51 -0
  270. package/dist/safe-bash-command-patch/stored-target.d.ts +41 -0
  271. package/dist/safe-bash-command-patch/unified.d.ts +28 -9
  272. package/dist/safe-bash-command-patch/unified.js +4 -1
  273. package/dist/safe-bash-command-pdftk/index.js +758 -433
  274. package/dist/safe-bash-command-playwright-cli/index.js +26 -26
  275. package/dist/safe-bash-command-playwright-cli/playwright/abilities.js +10 -10
  276. package/dist/safe-bash-command-playwright-cli/playwright/controller.js +14 -14
  277. package/dist/safe-bash-command-playwright-cli/playwright/index.js +23 -23
  278. package/dist/safe-bash-command-playwright-cli/playwright/snapshot.js +2 -2
  279. package/dist/safe-bash-command-playwright-cli/playwright/standard-capabilities.js +6 -6
  280. package/dist/safe-bash-command-playwright-cli/playwright/storage-capabilities.js +4 -4
  281. package/dist/safe-bash-command-pptx/command-engine.d.ts +2 -1
  282. package/dist/safe-bash-command-pptx/engine.js +1 -1
  283. package/dist/safe-bash-command-pptx/index.d.ts +1 -1
  284. package/dist/safe-bash-command-pptx/index.js +163 -17
  285. package/dist/safe-bash-command-pptx/streaming-inputs.d.ts +7 -2
  286. package/dist/safe-bash-command-python/executor.js +5 -5
  287. package/dist/safe-bash-command-python/index.js +5 -5
  288. package/dist/safe-bash-command-python/jspi.js +2 -2
  289. package/dist/safe-bash-command-soffice/index.js +1 -1
  290. package/dist/safe-bash-command-sort/index.js +3 -3
  291. package/dist/safe-bash-command-ssconvert/index.js +2 -2
  292. package/dist/safe-bash-command-tar/create.js +2 -2
  293. package/dist/safe-bash-command-tar/extract.js +2 -2
  294. package/dist/safe-bash-command-tar/index.js +8 -8
  295. package/dist/safe-bash-command-tar/modes.js +4 -4
  296. package/dist/safe-bash-command-timeout/index.js +3 -3
  297. package/dist/safe-bash-command-tree/index.js +2 -2
  298. package/dist/safe-bash-command-tree/tree.js +2 -2
  299. package/dist/safe-bash-command-xz/index.js +5 -5
  300. package/dist/safe-bash-compression-engine/files.js +2 -2
  301. package/dist/safe-bash-compression-engine/operand.js +4 -4
  302. package/dist/safe-bash-contracts/diagnostics.js +3 -3
  303. package/dist/safe-bash-contracts/escaping.js +10 -10
  304. package/dist/safe-bash-contracts/filesystem-descriptor.js +1 -1
  305. package/dist/safe-bash-contracts/filesystem-output.js +6 -6
  306. package/dist/safe-bash-contracts/index.js +33 -33
  307. package/dist/safe-bash-contracts/io.js +2 -2
  308. package/dist/safe-bash-contracts/output.js +3 -3
  309. package/dist/safe-bash-docx-engine/ancillary-resources.js +5 -5
  310. package/dist/safe-bash-docx-engine/batch-operations.js +63 -63
  311. package/dist/safe-bash-docx-engine/batch-result-schema.js +74 -74
  312. package/dist/safe-bash-docx-engine/batch.js +74 -74
  313. package/dist/safe-bash-docx-engine/bookmarks.js +13 -13
  314. package/dist/safe-bash-docx-engine/charts.js +6 -6
  315. package/dist/safe-bash-docx-engine/command-option-rules.js +3 -3
  316. package/dist/safe-bash-docx-engine/comments.js +21 -21
  317. package/dist/safe-bash-docx-engine/control-bindings.js +16 -16
  318. package/dist/safe-bash-docx-engine/control-repeat.js +16 -16
  319. package/dist/safe-bash-docx-engine/controls.js +14 -14
  320. package/dist/safe-bash-docx-engine/create.js +8 -8
  321. package/dist/safe-bash-docx-engine/diagrams.js +6 -6
  322. package/dist/safe-bash-docx-engine/diff.js +8 -8
  323. package/dist/safe-bash-docx-engine/document-properties.js +12 -12
  324. package/dist/safe-bash-docx-engine/equations.js +12 -12
  325. package/dist/safe-bash-docx-engine/extract.js +9 -9
  326. package/dist/safe-bash-docx-engine/fields.js +18 -18
  327. package/dist/safe-bash-docx-engine/font-inventory.js +13 -13
  328. package/dist/safe-bash-docx-engine/font-resources.js +3 -3
  329. package/dist/safe-bash-docx-engine/image-batch-operations.js +11 -11
  330. package/dist/safe-bash-docx-engine/image-insertion.js +17 -17
  331. package/dist/safe-bash-docx-engine/image-layout.js +14 -14
  332. package/dist/safe-bash-docx-engine/image-replacement.js +19 -19
  333. package/dist/safe-bash-docx-engine/images.js +14 -14
  334. package/dist/safe-bash-docx-engine/index.js +102 -102
  335. package/dist/safe-bash-docx-engine/inspection.js +15 -15
  336. package/dist/safe-bash-docx-engine/invocation.js +4 -4
  337. package/dist/safe-bash-docx-engine/io.js +6 -6
  338. package/dist/safe-bash-docx-engine/links.js +17 -17
  339. package/dist/safe-bash-docx-engine/lists.js +16 -16
  340. package/dist/safe-bash-docx-engine/locations.js +10 -10
  341. package/dist/safe-bash-docx-engine/notes.js +18 -18
  342. package/dist/safe-bash-docx-engine/objects.js +14 -14
  343. package/dist/safe-bash-docx-engine/pack.js +9 -9
  344. package/dist/safe-bash-docx-engine/package-view-batch-operations.js +19 -19
  345. package/dist/safe-bash-docx-engine/pandoc-adapter.js +25 -25
  346. package/dist/safe-bash-docx-engine/paragraph-edit.js +21 -21
  347. package/dist/safe-bash-docx-engine/publication.js +6 -6
  348. package/dist/safe-bash-docx-engine/removal.js +16 -16
  349. package/dist/safe-bash-docx-engine/revision-decisions.js +16 -16
  350. package/dist/safe-bash-docx-engine/revision-edit.js +15 -15
  351. package/dist/safe-bash-docx-engine/revisions.js +12 -12
  352. package/dist/safe-bash-docx-engine/run-format.js +15 -15
  353. package/dist/safe-bash-docx-engine/sanitize.js +29 -29
  354. package/dist/safe-bash-docx-engine/sections.js +15 -15
  355. package/dist/safe-bash-docx-engine/settings.js +6 -6
  356. package/dist/safe-bash-docx-engine/shape-edit.js +16 -16
  357. package/dist/safe-bash-docx-engine/signatures.js +11 -11
  358. package/dist/safe-bash-docx-engine/stories.js +18 -18
  359. package/dist/safe-bash-docx-engine/structure-model-batch-operations.js +34 -34
  360. package/dist/safe-bash-docx-engine/style-model-batch-operations.js +24 -24
  361. package/dist/safe-bash-docx-engine/style-model-result-schema.js +39 -39
  362. package/dist/safe-bash-docx-engine/styles.js +14 -14
  363. package/dist/safe-bash-docx-engine/table-edit.js +23 -23
  364. package/dist/safe-bash-docx-engine/table-read.js +11 -11
  365. package/dist/safe-bash-docx-engine/template.js +17 -17
  366. package/dist/safe-bash-docx-engine/text-replace.js +15 -15
  367. package/dist/safe-bash-docx-engine/text-resource-read.js +11 -11
  368. package/dist/safe-bash-docx-engine/text.js +11 -11
  369. package/dist/safe-bash-docx-engine/validation.js +4 -4
  370. package/dist/safe-bash-docx-engine/xml-parts.js +17 -17
  371. package/dist/safe-bash-io-engine/commands/text-programs/shared.js +4 -4
  372. package/dist/safe-bash-line-ending-engine/command.js +3 -3
  373. package/dist/safe-bash-line-ending-engine/convert.js +2 -2
  374. package/dist/safe-bash-line-ending-engine/index.js +6 -6
  375. package/dist/safe-bash-line-ending-engine/info.js +2 -2
  376. package/dist/safe-bash-markdown-engine/commonmark-blocks.js +4 -4
  377. package/dist/safe-bash-markdown-engine/commonmark-inlines.js +4 -4
  378. package/dist/safe-bash-markdown-engine/commonmark-syntax.js +2 -2
  379. package/dist/safe-bash-markdown-engine/gfm-syntax.js +3 -3
  380. package/dist/safe-bash-markdown-engine/index.js +5 -5
  381. package/dist/safe-bash-network-engine/transfer.js +3 -3
  382. package/dist/safe-bash-presentation-engine/accessibility.js +30 -30
  383. package/dist/safe-bash-presentation-engine/animation-editing.js +15 -15
  384. package/dist/safe-bash-presentation-engine/animations.js +15 -15
  385. package/dist/safe-bash-presentation-engine/backgrounds.js +16 -16
  386. package/dist/safe-bash-presentation-engine/bytes.js +3 -3
  387. package/dist/safe-bash-presentation-engine/chart-editing.js +33 -33
  388. package/dist/safe-bash-presentation-engine/chart-object-operations.js +24 -24
  389. package/dist/safe-bash-presentation-engine/charts.js +30 -30
  390. package/dist/safe-bash-presentation-engine/command-placeholder.js +58 -58
  391. package/dist/safe-bash-presentation-engine/comments.js +16 -16
  392. package/dist/safe-bash-presentation-engine/connector-operations.js +31 -31
  393. package/dist/safe-bash-presentation-engine/connectors.js +28 -28
  394. package/dist/safe-bash-presentation-engine/content-types.js +4 -4
  395. package/dist/safe-bash-presentation-engine/creation.js +6 -6
  396. package/dist/safe-bash-presentation-engine/diff.js +31 -31
  397. package/dist/safe-bash-presentation-engine/drawing-format.js +19 -19
  398. package/dist/safe-bash-presentation-engine/drawing-operations.js +30 -30
  399. package/dist/safe-bash-presentation-engine/drawing-schema.js +20 -20
  400. package/dist/safe-bash-presentation-engine/equations.js +16 -16
  401. package/dist/safe-bash-presentation-engine/errors.js +2 -2
  402. package/dist/safe-bash-presentation-engine/fields.js +16 -16
  403. package/dist/safe-bash-presentation-engine/font-metrics.js +3 -3
  404. package/dist/safe-bash-presentation-engine/image-extraction.js +19 -19
  405. package/dist/safe-bash-presentation-engine/image-formatting.js +31 -31
  406. package/dist/safe-bash-presentation-engine/image-insertion.js +17 -17
  407. package/dist/safe-bash-presentation-engine/image-replacement.js +20 -20
  408. package/dist/safe-bash-presentation-engine/image-value.js +4 -4
  409. package/dist/safe-bash-presentation-engine/images.js +18 -18
  410. package/dist/safe-bash-presentation-engine/index.js +114 -114
  411. package/dist/safe-bash-presentation-engine/layouts.js +15 -15
  412. package/dist/safe-bash-presentation-engine/length.js +3 -3
  413. package/dist/safe-bash-presentation-engine/links.js +15 -15
  414. package/dist/safe-bash-presentation-engine/masters.js +14 -14
  415. package/dist/safe-bash-presentation-engine/media-editing.js +23 -23
  416. package/dist/safe-bash-presentation-engine/media-extraction.js +16 -16
  417. package/dist/safe-bash-presentation-engine/media.js +15 -15
  418. package/dist/safe-bash-presentation-engine/memberships.js +14 -14
  419. package/dist/safe-bash-presentation-engine/notes.d.ts +1 -0
  420. package/dist/safe-bash-presentation-engine/notes.js +21 -15
  421. package/dist/safe-bash-presentation-engine/ole-enum.js +4 -4
  422. package/dist/safe-bash-presentation-engine/ole-insertion.js +19 -19
  423. package/dist/safe-bash-presentation-engine/opaque-objects.js +9 -9
  424. package/dist/safe-bash-presentation-engine/package-reader.js +5 -5
  425. package/dist/safe-bash-presentation-engine/package-tools.js +18 -18
  426. package/dist/safe-bash-presentation-engine/package-uri.js +3 -3
  427. package/dist/safe-bash-presentation-engine/package-writer.js +4 -4
  428. package/dist/safe-bash-presentation-engine/presentation-model.js +57 -57
  429. package/dist/safe-bash-presentation-engine/presentation-settings.js +13 -13
  430. package/dist/safe-bash-presentation-engine/properties.js +15 -15
  431. package/dist/safe-bash-presentation-engine/relationships.js +4 -4
  432. package/dist/safe-bash-presentation-engine/resource-limits.js +1 -1
  433. package/dist/safe-bash-presentation-engine/retained-frame-formatting.d.ts +14 -0
  434. package/dist/safe-bash-presentation-engine/retained-inspection.js +13 -13
  435. package/dist/safe-bash-presentation-engine/retained-notes.d.ts +27 -0
  436. package/dist/safe-bash-presentation-engine/retained-package.js +5 -5
  437. package/dist/safe-bash-presentation-engine/retained-text.d.ts +9 -2
  438. package/dist/safe-bash-presentation-engine/retained-text.js +130 -31
  439. package/dist/safe-bash-presentation-engine/retained-xml-document.d.ts +1 -0
  440. package/dist/safe-bash-presentation-engine/sanitize.js +16 -16
  441. package/dist/safe-bash-presentation-engine/selectors.js +10 -10
  442. package/dist/safe-bash-presentation-engine/shape-groups.js +30 -30
  443. package/dist/safe-bash-presentation-engine/shape-operations.js +29 -29
  444. package/dist/safe-bash-presentation-engine/shape-path-operations.js +31 -31
  445. package/dist/safe-bash-presentation-engine/shape-paths.js +15 -15
  446. package/dist/safe-bash-presentation-engine/shape-presets.js +3 -3
  447. package/dist/safe-bash-presentation-engine/shape-selection.js +30 -30
  448. package/dist/safe-bash-presentation-engine/shape-transforms.js +17 -17
  449. package/dist/safe-bash-presentation-engine/shapes.js +26 -26
  450. package/dist/safe-bash-presentation-engine/slide-copy.js +16 -16
  451. package/dist/safe-bash-presentation-engine/slide-import.js +17 -17
  452. package/dist/safe-bash-presentation-engine/slide-merge-split.js +19 -19
  453. package/dist/safe-bash-presentation-engine/slide-model.js +42 -42
  454. package/dist/safe-bash-presentation-engine/slide-removal.js +17 -17
  455. package/dist/safe-bash-presentation-engine/slide-transfer-budget.js +9 -9
  456. package/dist/safe-bash-presentation-engine/slides.js +18 -18
  457. package/dist/safe-bash-presentation-engine/table-operations.js +32 -32
  458. package/dist/safe-bash-presentation-engine/table-spans.js +31 -31
  459. package/dist/safe-bash-presentation-engine/tables.js +30 -30
  460. package/dist/safe-bash-presentation-engine/tags.js +15 -15
  461. package/dist/safe-bash-presentation-engine/template-bindings.js +32 -32
  462. package/dist/safe-bash-presentation-engine/template-repeat.js +39 -39
  463. package/dist/safe-bash-presentation-engine/text-fitting.js +26 -26
  464. package/dist/safe-bash-presentation-engine/text-frames.d.ts +13 -0
  465. package/dist/safe-bash-presentation-engine/text-frames.js +28 -26
  466. package/dist/safe-bash-presentation-engine/text-paragraphs.js +26 -26
  467. package/dist/safe-bash-presentation-engine/text-reading.js +11 -11
  468. package/dist/safe-bash-presentation-engine/text-replacement.js +16 -16
  469. package/dist/safe-bash-presentation-engine/text-runs.js +19 -19
  470. package/dist/safe-bash-presentation-engine/themes.js +15 -15
  471. package/dist/safe-bash-presentation-engine/transitions.js +15 -15
  472. package/dist/safe-bash-presentation-engine/validation.js +9 -9
  473. package/dist/safe-bash-presentation-engine/xml-parts.js +18 -18
  474. package/dist/safe-bash-presentation-engine/xml-view.js +3 -3
  475. package/dist/safe-bash-presentation-engine/xml.js +3 -3
  476. package/dist/safe-bash-query-engine/index.js +4 -4
  477. package/dist/safe-bash-query-engine/interpreter.js +2 -2
  478. package/dist/safe-bash-query-engine/query-core.js +4 -4
  479. package/dist/safe-bash-xml-engine/document.js +3 -3
  480. package/dist/safe-bash-xml-engine/evaluate.js +1 -1
  481. package/dist/safe-bash-xml-engine/index.js +6 -6
  482. package/dist/safe-bash-xml-engine/query.js +2 -2
  483. package/dist/safe-bash-xml-engine/stored-document.d.ts +2 -2
  484. package/dist/safe-bash-xml-engine/stored-document.js +1 -1
  485. package/dist/safe-bash-xml-engine/stored-evaluate.js +1 -1
  486. package/dist/safe-bash-zip-engine/zip/repair.js +3 -3
  487. package/dist/safe-bash-zip-engine/zip/volumes.js +3 -3
  488. package/dist/spreadsheet-engine/datasource.js +16 -2
  489. package/dist/spreadsheet-engine/formulas/diagnostics.d.ts +2 -1
  490. package/dist/spreadsheet-engine/formulas/diagnostics.js +2 -2
  491. package/dist/spreadsheet-engine/formulas/evaluator.d.ts +1 -1
  492. package/dist/spreadsheet-engine/formulas/evaluator.js +2 -1
  493. package/dist/spreadsheet-format-xls/biff-encrypted-properties.js +7 -6
  494. package/dist/spreadsheet-format-xls/biff-properties-merge.js +41 -22
  495. package/dist/spreadsheet-format-xls/biff-properties.js +94 -109
  496. package/dist/spreadsheet-format-xls/biff-property-dictionary.d.ts +5 -0
  497. package/dist/spreadsheet-format-xls/biff-property-dictionary.js +75 -0
  498. package/dist/spreadsheet-format-xls/biff-property-range.d.ts +17 -3
  499. package/dist/spreadsheet-format-xls/biff-property-range.js +178 -37
  500. package/dist/spreadsheet-format-xls/biff-property-values.d.ts +31 -0
  501. package/dist/spreadsheet-format-xls/biff-property-values.js +158 -0
  502. package/package.json +5 -2
  503. package/dist/safe-bash/command-chunks/biff-4ALVARRF-7SRX6R6N.js +0 -5192
  504. package/dist/safe-bash/command-chunks/chunk-63EMPQ7Z.js +0 -115
  505. package/dist/safe-bash/command-chunks/{chunk-X2HVVMTW.js → chunk-AW4Q3GZW.js} +6 -6
  506. package/dist/safe-bash/command-chunks/{chunk-JC2EV66U.js → chunk-BJXADHRT.js} +3 -3
  507. package/dist/safe-bash/command-chunks/{chunk-XI2LETBJ.js → chunk-BXU5Y7I5.js} +3 -3
  508. package/dist/safe-bash/command-chunks/{chunk-PVLPWVRH.js → chunk-D3HW7R2N.js} +3 -3
  509. package/dist/safe-bash/command-chunks/{chunk-OLK3DCJD.js → chunk-DYERIXPU.js} +3 -3
  510. package/dist/safe-bash/command-chunks/{chunk-WYBCSJFG.js → chunk-FWCUEZ3K.js} +3 -3
  511. package/dist/safe-bash/command-chunks/{chunk-FF2SQ2GP.js → chunk-GGH376XQ.js} +3 -3
  512. package/dist/safe-bash/command-chunks/{chunk-D66Q7QJ3.js → chunk-JRSZ5IGD.js} +6 -6
  513. package/dist/safe-bash/command-chunks/{chunk-3JST2Q7G.js → chunk-KRRG4MGH.js} +3 -3
  514. package/dist/safe-bash/command-chunks/{chunk-Z3YB4EVE.js → chunk-KSM5CCHT.js} +8 -8
  515. package/dist/safe-bash/command-chunks/{chunk-NJ4NTTCR.js → chunk-LNLACEAN.js} +8 -8
  516. package/dist/safe-bash/command-chunks/{chunk-NBTG6NF6.js → chunk-LTJRUMK6.js} +3 -3
  517. package/dist/safe-bash/command-chunks/{chunk-XCYTG7CR.js → chunk-NJGL5JQ6.js} +3 -3
  518. package/dist/safe-bash/command-chunks/{chunk-SZ66JC25.js → chunk-Q7J2NTH2.js} +3 -3
  519. package/dist/safe-bash/command-chunks/{chunk-MDV7W5AS.js → chunk-SKNI2XQA.js} +3 -3
  520. package/dist/safe-bash/command-chunks/{chunk-7ZWACKCG.js → chunk-T6OXG7QQ.js} +3 -3
  521. package/dist/safe-bash/command-chunks/{chunk-ECDEPKKW.js → chunk-W25EIKDJ.js} +3 -3
  522. package/dist/safe-bash/command-chunks/{chunk-4YSBUQPV.js → chunk-W2FKFEVY.js} +3 -3
  523. package/dist/safe-bash/command-chunks/{chunk-2CIDPOUV.js → chunk-WSNHJZQ5.js} +3 -3
  524. package/dist/safe-bash/command-chunks/{chunk-4H3TYOVC.js → chunk-Y7AXMCFV.js} +3 -3
  525. package/dist/safe-bash/command-chunks/{chunk-U6IEK2CI.js → chunk-YPG55QTP.js} +7 -7
  526. package/dist/safe-bash/command-chunks/{chunk-252L5YC5.js → chunk-Z37OM247.js} +6 -6
  527. package/dist/safe-bash/command-chunks/{pln-DFS7VLVS-JATX6FS7.js → pln-DFS7VLVS-OVOBS4QX.js} +3 -3
  528. package/dist/safe-bash/command-chunks/{psion-YBI6JEQI-6OMC2PGC.js → psion-YBI6JEQI-GY4S6ZLC.js} +3 -3
@@ -1,13 +1,250 @@
1
1
  import "./chunk-37XCUS43.js";
2
- import "./chunk-IOEUZ4EA.js";
2
+ import {
3
+ ZipDirectoryIndex
4
+ } from "./chunk-IOEUZ4EA.js";
3
5
  import {
4
6
  yieldEventLoop
5
7
  } from "./chunk-E6SK3OU2.js";
8
+ import {
9
+ BackedJson,
10
+ parseBackedJson
11
+ } from "./chunk-NUGQQDGE.js";
6
12
  import "./chunk-65DS4IOB.js";
7
13
 
14
+ // packages/safe-bash-command-pptx/src/command-engine.ts
15
+ import { stageRetainedNotes } from "../../safe-bash-presentation-engine/notes.js";
16
+
17
+ // packages/safe-bash-command-pptx/src/retained-pack-manifest.ts
18
+ import { PagedStorage } from "@poe-platform/safe-fs/storage";
19
+ import { resourceContext } from "../../safe-bash-presentation-engine/resource-limits.js";
20
+ import { OfficeError as OfficeError2 } from "../../safe-bash-presentation-engine/errors.js";
21
+ import { asciiKey, partName } from "../../safe-bash-presentation-engine/package-uri.js";
22
+
23
+ // packages/safe-bash-command-pptx/src/command-package-path.ts
24
+ import { OfficeError } from "../../safe-bash-presentation-engine/errors.js";
25
+ function usage(message) {
26
+ throw new OfficeError("invalid-value", message, "usage");
27
+ }
28
+ function scopedPackagePath(manifest, path) {
29
+ if (path === "-") return path;
30
+ if (path.includes("\\") || [...path].some((c) => c.charCodeAt(0) < 32))
31
+ usage("Invalid scoped file path.");
32
+ const prefix = path.startsWith("/") ? "" : manifest === "-" ? "/" : manifest.slice(0, manifest.lastIndexOf("/") + 1);
33
+ const absolute = (prefix + path).startsWith("/");
34
+ const segments = [];
35
+ for (const segment of (prefix + path).split("/")) {
36
+ if (!segment || segment === ".") continue;
37
+ if (segment === "..") {
38
+ if (!segments.length) usage("Scoped path escapes its root.");
39
+ segments.pop();
40
+ } else segments.push(segment);
41
+ }
42
+ return (absolute ? "/" : "") + segments.join("/");
43
+ }
44
+
45
+ // packages/safe-bash-command-pptx/src/retained-pack-manifest.ts
46
+ async function openRetainedPackManifest(source3, settings, options2) {
47
+ const context = resourceContext(settings), signal = context.signal ?? new AbortController().signal;
48
+ const working = { ...settings.workingStorage }, cacheBytes = working.cacheBytes ?? 1024 * 1024;
49
+ if (!working.fs || typeof working.directory !== "string" || !working.directory.startsWith("/") || !Number.isSafeInteger(cacheBytes) || cacheBytes < 16384 || cacheBytes % 16384)
50
+ throw new OfficeError2("invalid-value", "Explicit manifest storage and a valid cache budget are required.", "usage");
51
+ const manifestPath = options2.manifest, outputPath = options2.output;
52
+ const pages = new PagedStorage({ fs: working.fs, cwd: working.directory, env: {}, signal }, cacheBytes / 16384);
53
+ const index = new PagedStorage({ fs: working.fs, cwd: working.directory, env: {}, signal }, cacheBytes / 16384);
54
+ let closed = false, closing, count = 0, parts = 0;
55
+ const check = () => {
56
+ if (closed) throw new OfficeError2("invalid-handle", "Manifest is closed.", "admit");
57
+ if (signal.aborted) throw new OfficeError2("cancelled", "Operation cancelled.", "admit");
58
+ };
59
+ const usage14 = () => {
60
+ throw new OfficeError2("invalid-value", "Manifest requires unique canonical parts, hashes and explicit scoped files.", "usage");
61
+ };
62
+ const limit = () => {
63
+ throw new OfficeError2("resource-limit", "Manifest exceeds input limits.", "admit");
64
+ };
65
+ const failure = (error) => error instanceof OfficeError2 ? error : new OfficeError2(signal.aborted ? "cancelled" : error && typeof error === "object" && "code" in error && error.code === "EFBIG" ? "resource-limit" : "io-failure", "Manifest input or storage failed.", "admit");
66
+ const close = () => {
67
+ closed = true;
68
+ return closing ??= (async () => {
69
+ const outcomes = await Promise.allSettled([pages.close(), index.close()]);
70
+ for (const outcome of outcomes) if (outcome.status === "rejected") throw outcome.reason;
71
+ })();
72
+ };
73
+ let work = 0;
74
+ const cooperate = async (units = 1) => {
75
+ check();
76
+ work += units;
77
+ if (work >= 4096) {
78
+ work = 0;
79
+ await yieldEventLoop();
80
+ check();
81
+ }
82
+ };
83
+ const tree = new BackedJson(pages, cooperate), names = new ZipDirectoryIndex(index, { signal });
84
+ async function text2(position) {
85
+ let value = "";
86
+ for await (const fragment of tree.scalarChunks(position)) {
87
+ check();
88
+ value += fragment;
89
+ }
90
+ return value;
91
+ }
92
+ async function fields2(position, keys) {
93
+ const header = await tree.describe(position);
94
+ if (header.kind !== "object" || header.children !== keys.length * 2) usage14();
95
+ const result = {};
96
+ let key;
97
+ for await (const child of tree.children(position)) {
98
+ check();
99
+ if (key === void 0) {
100
+ key = await tree.smallText(child, Math.max(...keys.map((key2) => key2.length)));
101
+ if (key === void 0 || !keys.includes(key)) usage14();
102
+ } else {
103
+ result[key] = child;
104
+ key = void 0;
105
+ }
106
+ }
107
+ return result;
108
+ }
109
+ async function member(row) {
110
+ const fields3 = { part: await tree.property(row, "part"), sha256: await tree.property(row, "sha256") };
111
+ const part = await tree.smallText(fields3.part, 65535), sha2565 = await tree.smallText(fields3.sha256, 64);
112
+ if (part === void 0) return limit();
113
+ if (sha2565 === void 0) return usage14();
114
+ return { part, sha256: sha2565 };
115
+ }
116
+ async function pathAt(row) {
117
+ const file = await tree.property(row, "file"), path = await tree.property(file, "vfsPath");
118
+ return scopedPackagePath(manifestPath, await text2(path));
119
+ }
120
+ async function* decoded() {
121
+ let iterator, exhausted = false, size = 0;
122
+ const decoder = new TextDecoder("utf-8", { fatal: true });
123
+ try {
124
+ iterator = source3[Symbol.asyncIterator]();
125
+ for (let reads = 0; reads < context.limits.maxReads; reads++) {
126
+ await cooperate();
127
+ const item = await iterator.next();
128
+ check();
129
+ if (item.done) {
130
+ exhausted = true;
131
+ let tail;
132
+ try {
133
+ tail = decoder.decode();
134
+ } catch {
135
+ usage14();
136
+ }
137
+ if (tail) yield tail;
138
+ return;
139
+ }
140
+ if (!(item.value instanceof Uint8Array)) throw new OfficeError2("invalid-type", "Manifest source returned invalid bytes.", "admit");
141
+ size += item.value.length;
142
+ if (!Number.isSafeInteger(size) || size > Math.min(context.limits.maxBytes, context.xmlLimits.maxBytes)) limit();
143
+ for (let offset = 0; offset < item.value.length; offset += 16384) {
144
+ check();
145
+ let fragment;
146
+ try {
147
+ fragment = decoder.decode(item.value.subarray(offset, offset + 16384), { stream: true });
148
+ } catch {
149
+ usage14();
150
+ }
151
+ if (fragment) yield fragment;
152
+ }
153
+ }
154
+ limit();
155
+ } finally {
156
+ if (!exhausted) try {
157
+ await iterator?.return?.();
158
+ } catch {
159
+ }
160
+ }
161
+ }
162
+ try {
163
+ check();
164
+ await parseBackedJson(decoded(), tree, index, cooperate, usage14, void 0, false, (depth) => {
165
+ if (depth > 32) usage14();
166
+ });
167
+ parts = (await fields2(tree.rootPosition, ["parts"])).parts;
168
+ const array = await tree.describe(parts);
169
+ if (array.kind !== "array" || !array.children) usage14();
170
+ count = array.children;
171
+ if (count > context.archiveLimits.maxMembers) limit();
172
+ let stdin = manifestPath === "-" ? 1 : 0;
173
+ if (outputPath !== "-" && outputPath === manifestPath) usage14();
174
+ for await (const row of tree.children(parts)) {
175
+ check();
176
+ const values3 = await fields2(row, ["part", "sha256", "file"]);
177
+ for (const key2 of ["part", "sha256"]) if ((await tree.describe(values3[key2])).kind !== "string") usage14();
178
+ const item = await member(row);
179
+ try {
180
+ if (partName(item.part, false) !== item.part) usage14();
181
+ } catch {
182
+ usage14();
183
+ }
184
+ if (item.sha256.length !== 64 || [...item.sha256].some((character) => !"0123456789abcdef".includes(character))) usage14();
185
+ const key = asciiKey(item.part);
186
+ if (await names.get(key) !== void 0) usage14();
187
+ await names.set(key, row);
188
+ const file = await fields2(values3.file, ["vfsPath"]);
189
+ if ((await tree.describe(file.vfsPath)).kind !== "string") usage14();
190
+ const rawPath = await text2(file.vfsPath);
191
+ if (!rawPath.length) usage14();
192
+ const path = scopedPackagePath(manifestPath, rawPath);
193
+ if (path === "-" && ++stdin > 1 || outputPath !== "-" && path === outputPath) usage14();
194
+ }
195
+ return Object.freeze({
196
+ count,
197
+ close,
198
+ async *members() {
199
+ try {
200
+ check();
201
+ for await (const row of tree.children(parts)) {
202
+ check();
203
+ yield await member(row);
204
+ }
205
+ check();
206
+ } catch (error) {
207
+ throw failure(error);
208
+ }
209
+ },
210
+ async path(part) {
211
+ try {
212
+ check();
213
+ const row = await names.get(asciiKey(part));
214
+ if (row === void 0) throw new OfficeError2("missing-binding", "Manifest member is absent.", "admit");
215
+ return await pathAt(row);
216
+ } catch (error) {
217
+ throw failure(error);
218
+ }
219
+ },
220
+ async *paths() {
221
+ try {
222
+ check();
223
+ yield manifestPath;
224
+ for await (const row of tree.children(parts)) {
225
+ check();
226
+ yield await pathAt(row);
227
+ }
228
+ check();
229
+ } catch (error) {
230
+ throw failure(error);
231
+ }
232
+ }
233
+ });
234
+ } catch (error) {
235
+ const primary = failure(error);
236
+ await close().catch(() => {
237
+ });
238
+ throw primary;
239
+ }
240
+ }
241
+
242
+ // packages/safe-bash-command-pptx/src/command-engine.ts
243
+ import { stageRetainedPackage } from "../../safe-bash-presentation-engine/package-tools.js";
244
+
8
245
  // packages/safe-bash-command-pptx/src/command-extract-streaming.ts
9
246
  import { openRetainedPackageExtraction, stageRetainedExtractionOutput } from "../../safe-bash-presentation-engine/package-tools.js";
10
- import { OfficeError } from "../../safe-bash-presentation-engine/errors.js";
247
+ import { OfficeError as OfficeError3 } from "../../safe-bash-presentation-engine/errors.js";
11
248
  async function prepareRetainedExtraction(args, request, options2) {
12
249
  const { streaming, signal } = request, context = { ...options2.context, signal, workingStorage: streaming.workingStorage };
13
250
  const input = await streaming.openInput(args.input, Math.min(context.limits.maxBytes, context.archiveLimits.maxArchiveBytes));
@@ -21,7 +258,7 @@ async function prepareRetainedExtraction(args, request, options2) {
21
258
  let total = 0;
22
259
  for await (const member of extraction.members()) total += member.size;
23
260
  if (extraction.count > (args.limits?.maxOutputs ?? context.archiveLimits.maxMembers) || !Number.isSafeInteger(total) || total > options2.maxOutputBytes)
24
- throw new OfficeError("resource-limit", "Package extraction exceeds output limits.", "validate-intent");
261
+ throw new OfficeError3("resource-limit", "Package extraction exceeds output limits.", "validate-intent");
25
262
  if (!request.publishOutputStreams && (!args.allowPartialOutput || !request.publishOutput)) throw Object.assign(new Error("Extraction requires a publication capability."), { code: "publication-unsupported" });
26
263
  response = await stageRetainedExtractionOutput(extraction, context, { directory: args.outputDir, json: args.json, maxOutputBytes: options2.maxOutputBytes, allowPartialOutput: args.allowPartialOutput ?? false });
27
264
  async function* publications(dryRun) {
@@ -63,7 +300,7 @@ import { openPackageArchive } from "../../safe-bash-presentation-engine/retained
63
300
 
64
301
  // packages/safe-bash-command-pptx/src/capabilities-discovery.ts
65
302
  import { parseContentTypes } from "../../safe-bash-presentation-engine/content-types.js";
66
- import { OfficeError as OfficeError2 } from "../../safe-bash-presentation-engine/errors.js";
303
+ import { OfficeError as OfficeError4 } from "../../safe-bash-presentation-engine/errors.js";
67
304
  import { readRelationshipGraph } from "../../safe-bash-presentation-engine/relationships.js";
68
305
  import { readPackage } from "../../safe-bash-presentation-engine/package-reader.js";
69
306
  import { parseXmlPart } from "../../safe-bash-presentation-engine/xml.js";
@@ -100,7 +337,7 @@ function declaredFeatureCapabilities(features, operations) {
100
337
  Object.entries(features).map(([name, feature]) => {
101
338
  const paths = feature.operations ?? (feature.operation ? [feature.operation] : featureOperations[name]);
102
339
  if (!paths?.length || paths.some((path) => !Object.hasOwn(operations, path))) {
103
- throw new OfficeError2(
340
+ throw new OfficeError4(
104
341
  "invalid-value",
105
342
  "Capability references an undeclared operation.",
106
343
  "usage"
@@ -150,7 +387,7 @@ async function assessCapabilities(input, context) {
150
387
  try {
151
388
  contentType = types.get(part);
152
389
  } catch (error) {
153
- if (!(error instanceof OfficeError2) || error.code !== "missing-binding") throw error;
390
+ if (!(error instanceof OfficeError4) || error.code !== "missing-binding") throw error;
154
391
  }
155
392
  }
156
393
  const type = contentType?.split(";", 1)[0].trim().toLowerCase();
@@ -165,7 +402,7 @@ async function assessCapabilities(input, context) {
165
402
  const data = reader.get(part);
166
403
  xmlBytes += data.length;
167
404
  if (xmlBytes > context.xmlLimits.maxBytes || nodes >= context.xmlLimits.maxNodes)
168
- throw new OfficeError2(
405
+ throw new OfficeError4(
169
406
  "resource-limit",
170
407
  "Capability XML inspection limit exceeded.",
171
408
  "index"
@@ -176,7 +413,7 @@ async function assessCapabilities(input, context) {
176
413
  });
177
414
  nodes += xml.nodeCount;
178
415
  if (nodes > context.xmlLimits.maxNodes)
179
- throw new OfficeError2("resource-limit", "Capability XML node limit exceeded.", "index");
416
+ throw new OfficeError4("resource-limit", "Capability XML node limit exceeded.", "index");
180
417
  const pending = [xml.root];
181
418
  let visited = 0;
182
419
  while (pending.length) {
@@ -3515,7 +3752,7 @@ var discoverySchemas = Object.fromEntries([
3515
3752
  }]));
3516
3753
 
3517
3754
  // packages/safe-bash-command-pptx/src/command-objects-add.ts
3518
- import { OfficeError as OfficeError3 } from "../../safe-bash-presentation-engine/errors.js";
3755
+ import { OfficeError as OfficeError5 } from "../../safe-bash-presentation-engine/errors.js";
3519
3756
  import { addOleObject } from "../../safe-bash-presentation-engine/ole-insertion.js";
3520
3757
  var objectsAddUsage = "Usage: pptx objects add INPUT --slide N --file PATH --icon PATH (--program-id TEXT | --program DOCX|PPTX|XLSX) [--icon-content-type TYPE]\n --left LENGTH --top LENGTH --width LENGTH --height LENGTH --icon-width LENGTH --icon-height LENGTH --name TEXT\n --output PATH|--in-place|--dry-run [--force] [--json] [--limit NAME=VALUE]\nEmbed explicit inert bytes with an explicit icon. No activation or recursive payload parsing.\n";
3521
3758
  var length = {
@@ -3622,24 +3859,24 @@ var objectsAddSchema = {
3622
3859
  }
3623
3860
  }
3624
3861
  };
3625
- function usage(message) {
3626
- throw new OfficeError3("invalid-value", message, "usage");
3862
+ function usage2(message) {
3863
+ throw new OfficeError5("invalid-value", message, "usage");
3627
3864
  }
3628
3865
  function validateObjectsAddCommand(args, positionals, seen) {
3629
3866
  const allowed = Object.keys(objectsAddSchema.options.properties).map(
3630
3867
  (key) => "--" + [...key].map((c) => c >= "A" && c <= "Z" ? "-" + c.toLowerCase() : c).join("")
3631
3868
  );
3632
3869
  if ([...seen].some((flag) => !allowed.includes(flag)))
3633
- usage("Option does not apply to object insertion.");
3870
+ usage2("Option does not apply to object insertion.");
3634
3871
  if (positionals.length !== 1 || !positionals[0])
3635
- usage("Object insertion requires exactly one input.");
3872
+ usage2("Object insertion requires exactly one input.");
3636
3873
  args.input = positionals[0];
3637
3874
  if (seen.has("--program-id") && seen.has("--program"))
3638
- usage("Program and program ID are mutually exclusive.");
3875
+ usage2("Program and program ID are mutually exclusive.");
3639
3876
  if (!args.slide || !args.file || !args.icon || !args.objectAdd?.progId)
3640
- usage("Object insertion requires slide, file, icon and program ID.");
3877
+ usage2("Object insertion requires slide, file, icon and program ID.");
3641
3878
  if ([args.input, args.file, args.icon].filter((path) => path === "-").length > 1)
3642
- usage("Only one input may consume stdin.");
3879
+ usage2("Only one input may consume stdin.");
3643
3880
  if (!args.iconContentType) {
3644
3881
  const extension = args.icon.slice(args.icon.lastIndexOf(".") + 1).toLowerCase();
3645
3882
  const type = {
@@ -3652,16 +3889,16 @@ function validateObjectsAddCommand(args, positionals, seen) {
3652
3889
  tiff: "image/tiff",
3653
3890
  wmf: "image/x-wmf"
3654
3891
  };
3655
- if (!type[extension]) usage("Icon requires a supported extension or explicit content type.");
3892
+ if (!type[extension]) usage2("Icon requires a supported extension or explicit content type.");
3656
3893
  args.iconContentType = type[extension];
3657
3894
  }
3658
3895
  if (args.inPlace && (args.input === "-" || args.output))
3659
- usage("In-place requires a named input and no output flag.");
3660
- if (!args.dryRun && !args.inPlace && !args.output) usage("Mutation requires a destination.");
3661
- if (args.force && !args.output) usage("Force requires an explicit output.");
3896
+ usage2("In-place requires a named input and no output flag.");
3897
+ if (!args.dryRun && !args.inPlace && !args.output) usage2("Mutation requires a destination.");
3898
+ if (args.force && !args.output) usage2("Force requires an explicit output.");
3662
3899
  if (args.output === args.input && args.output !== "-")
3663
- usage("Replacing input requires --in-place.");
3664
- if (args.output === "-" && args.json && !args.dryRun) usage("Binary stdout conflicts with JSON.");
3900
+ usage2("Replacing input requires --in-place.");
3901
+ if (args.output === "-" && args.json && !args.dryRun) usage2("Binary stdout conflicts with JSON.");
3665
3902
  }
3666
3903
  async function executeObjectsAddCommand(args, request, options2) {
3667
3904
  const context = { ...options2.context, signal: request.signal };
@@ -3853,7 +4090,7 @@ var packageToolsSchemas = Object.fromEntries(
3853
4090
  );
3854
4091
 
3855
4092
  // packages/safe-bash-command-pptx/src/command-engine-values.ts
3856
- import { OfficeError as OfficeError4 } from "../../safe-bash-presentation-engine/errors.js";
4093
+ import { OfficeError as OfficeError6 } from "../../safe-bash-presentation-engine/errors.js";
3857
4094
  function commandLength(value, minimum = 1) {
3858
4095
  const units = { emu: 1, in: 914400, cm: 36e4, mm: 36e3, pt: 12700 };
3859
4096
  const unit = Object.keys(units).find((candidate) => value.endsWith(candidate));
@@ -3862,7 +4099,7 @@ function commandLength(value, minimum = 1) {
3862
4099
  if (!unit || pieces.length > 2 || !pieces[0] || pieces.some(
3863
4100
  (piece) => !piece || [...piece].some((character) => character < "0" || character > "9")
3864
4101
  ))
3865
- throw new OfficeError4(
4102
+ throw new OfficeError6(
3866
4103
  "invalid-value",
3867
4104
  "Lengths require a decimal and emu, in, cm, mm or pt unit.",
3868
4105
  "usage"
@@ -3870,13 +4107,13 @@ function commandLength(value, minimum = 1) {
3870
4107
  const raw = Number(digits) * units[unit];
3871
4108
  const result = Math.sign(raw) * Math.round(Math.abs(raw));
3872
4109
  if (!Number.isFinite(raw) || Math.abs(raw) > Number.MAX_SAFE_INTEGER || !Number.isSafeInteger(result) || result < minimum)
3873
- throw new OfficeError4("invalid-value", "Length is outside the supported range.", "usage");
4110
+ throw new OfficeError6("invalid-value", "Length is outside the supported range.", "usage");
3874
4111
  return result;
3875
4112
  }
3876
4113
  function commandTimestamp(value) {
3877
4114
  const date = new Date(value);
3878
4115
  if (!Number.isFinite(date.getTime()) || !value.endsWith("Z") || date.toISOString() !== value && date.toISOString() !== value.slice(0, -1) + ".000Z")
3879
- throw new OfficeError4(
4116
+ throw new OfficeError6(
3880
4117
  "invalid-value",
3881
4118
  "Timestamp requires a valid UTC date with seconds and Z suffix.",
3882
4119
  "usage"
@@ -3910,7 +4147,7 @@ function commandJson(value) {
3910
4147
  }
3911
4148
  return JSON.parse(value);
3912
4149
  } catch {
3913
- throw new OfficeError4(
4150
+ throw new OfficeError6(
3914
4151
  "invalid-value",
3915
4152
  "Structured slides require valid JSON without duplicate keys, at most 32 levels deep.",
3916
4153
  "usage"
@@ -3920,31 +4157,15 @@ function commandJson(value) {
3920
4157
 
3921
4158
  // packages/safe-bash-command-pptx/src/command-package-tools.ts
3922
4159
  import { sha256 } from "@noble/hashes/sha2.js";
3923
- import { OfficeError as OfficeError5 } from "../../safe-bash-presentation-engine/errors.js";
3924
- import { asciiKey, partName } from "../../safe-bash-presentation-engine/package-uri.js";
4160
+ import { OfficeError as OfficeError7 } from "../../safe-bash-presentation-engine/errors.js";
4161
+ import { asciiKey as asciiKey2, partName as partName2 } from "../../safe-bash-presentation-engine/package-uri.js";
3925
4162
  import { extractPackage, packPackage } from "../../safe-bash-presentation-engine/package-tools.js";
3926
- function usage2(message) {
3927
- throw new OfficeError5("invalid-value", message, "usage");
3928
- }
3929
- function scopedPath(manifest, path) {
3930
- if (path === "-") return path;
3931
- if (path.includes("\\") || [...path].some((c) => c.charCodeAt(0) < 32))
3932
- usage2("Invalid scoped file path.");
3933
- const prefix = path.startsWith("/") ? "" : manifest === "-" ? "/" : manifest.slice(0, manifest.lastIndexOf("/") + 1);
3934
- const absolute = (prefix + path).startsWith("/");
3935
- const segments = [];
3936
- for (const segment of (prefix + path).split("/")) {
3937
- if (!segment || segment === ".") continue;
3938
- if (segment === "..") {
3939
- if (!segments.length) usage2("Scoped path escapes its root.");
3940
- segments.pop();
3941
- } else segments.push(segment);
3942
- }
3943
- return (absolute ? "/" : "") + segments.join("/");
4163
+ function usage3(message) {
4164
+ throw new OfficeError7("invalid-value", message, "usage");
3944
4165
  }
3945
4166
  function canonical(part) {
3946
4167
  try {
3947
- return typeof part === "string" && partName(part, false) === part;
4168
+ return typeof part === "string" && partName2(part, false) === part;
3948
4169
  } catch {
3949
4170
  return false;
3950
4171
  }
@@ -3954,23 +4175,23 @@ function validatePackageCommand(args, positionals, seen) {
3954
4175
  (key) => "--" + [...key].map((c) => c >= "A" && c <= "Z" ? "-" + c.toLowerCase() : c).join("")
3955
4176
  );
3956
4177
  if ([...seen].some((flag) => !allowed.includes(flag)))
3957
- usage2("Option does not apply to package tools.");
4178
+ usage3("Option does not apply to package tools.");
3958
4179
  if (args.operation === "extract") {
3959
- if (positionals.length !== 1 || !positionals[0]) usage2("Extraction requires one input.");
4180
+ if (positionals.length !== 1 || !positionals[0]) usage3("Extraction requires one input.");
3960
4181
  args.input = positionals[0];
3961
4182
  if (!args.outputDir || args.outputDir === "-")
3962
- usage2("Extraction requires an output directory.");
3963
- if (args.parts && (!args.parts.length || args.parts.some((part) => !canonical(part)) || new Set(args.parts.map(asciiKey)).size !== args.parts.length))
3964
- usage2("Parts require unique canonical part URIs.");
4183
+ usage3("Extraction requires an output directory.");
4184
+ if (args.parts && (!args.parts.length || args.parts.some((part) => !canonical(part)) || new Set(args.parts.map(asciiKey2)).size !== args.parts.length))
4185
+ usage3("Parts require unique canonical part URIs.");
3965
4186
  } else {
3966
4187
  if (positionals.length || !args.manifest)
3967
- usage2("Pack requires a manifest and no positional inputs.");
3968
- if (!args.output && !args.dryRun) usage2("Pack requires output or dry-run.");
3969
- if (args.force && !args.output) usage2("Force requires output.");
4188
+ usage3("Pack requires a manifest and no positional inputs.");
4189
+ if (!args.output && !args.dryRun) usage3("Pack requires output or dry-run.");
4190
+ if (args.force && !args.output) usage3("Force requires output.");
3970
4191
  if (args.output === "-" && args.json && !args.dryRun)
3971
- usage2("Binary stdout cannot be combined with JSON.");
4192
+ usage3("Binary stdout cannot be combined with JSON.");
3972
4193
  if (args.output === args.manifest && args.output !== "-")
3973
- usage2("Output cannot replace manifest.");
4194
+ usage3("Output cannot replace manifest.");
3974
4195
  }
3975
4196
  }
3976
4197
  async function executePackageCommand(args, request, options2) {
@@ -3991,7 +4212,7 @@ async function executePackageCommand(args, request, options2) {
3991
4212
  );
3992
4213
  const files = await extractPackage(bytes2, context, args.parts ? { parts: args.parts } : {});
3993
4214
  if (files.length > (args.limits?.maxOutputs ?? context.archiveLimits.maxMembers) || files.reduce((sum, file) => sum + file.bytes.length, 0) > options2.maxOutputBytes)
3994
- throw new OfficeError5(
4215
+ throw new OfficeError7(
3995
4216
  "resource-limit",
3996
4217
  "Package extraction exceeds output limits.",
3997
4218
  "validate-intent"
@@ -4023,7 +4244,7 @@ async function executePackageCommand(args, request, options2) {
4023
4244
  };
4024
4245
  }
4025
4246
  if (args.creation?.author !== void 0 || args.creation?.timestamp !== void 0)
4026
- throw new OfficeError5(
4247
+ throw new OfficeError7(
4027
4248
  "unsupported-edit",
4028
4249
  "Pack metadata overrides are unavailable; source properties are preserved.",
4029
4250
  "validate-intent"
@@ -4033,28 +4254,28 @@ async function executePackageCommand(args, request, options2) {
4033
4254
  Math.min(context.limits.maxBytes, context.xmlLimits.maxBytes)
4034
4255
  );
4035
4256
  if (encoded.length > Math.min(context.limits.maxBytes, context.xmlLimits.maxBytes))
4036
- throw new OfficeError5("resource-limit", "Manifest exceeds byte limit.", "admit");
4257
+ throw new OfficeError7("resource-limit", "Manifest exceeds byte limit.", "admit");
4037
4258
  let value;
4038
4259
  try {
4039
4260
  value = commandJson(new TextDecoder("utf-8", { fatal: true }).decode(encoded));
4040
4261
  } catch {
4041
- usage2("Manifest must be valid JSON.");
4262
+ usage3("Manifest must be valid JSON.");
4042
4263
  }
4043
4264
  if (!value || typeof value !== "object" || Array.isArray(value) || Object.keys(value).some((key) => key !== "parts") || !("parts" in value) || !Array.isArray(value.parts) || !value.parts.length)
4044
- usage2("Manifest requires a nonempty parts array.");
4265
+ usage3("Manifest requires a nonempty parts array.");
4045
4266
  if (value.parts.length > context.archiveLimits.maxMembers)
4046
- throw new OfficeError5("resource-limit", "Manifest exceeds member limit.", "admit");
4267
+ throw new OfficeError7("resource-limit", "Manifest exceeds member limit.", "admit");
4047
4268
  const parts = value.parts;
4048
4269
  for (const item of parts)
4049
4270
  if (!item || typeof item !== "object" || Object.keys(item).some((key) => !["part", "sha256", "file"].includes(key)) || !canonical(item.part) || typeof item.sha256 !== "string" || item.sha256.length !== 64 || [...item.sha256].some((c) => !"0123456789abcdef".includes(c)) || !item.file || typeof item.file !== "object" || Object.keys(item.file).length !== 1 || typeof item.file.vfsPath !== "string" || !item.file.vfsPath.length)
4050
- usage2("Manifest parts require canonical URIs, hashes and explicit scoped files.");
4051
- if (new Set(parts.map((item) => asciiKey(item.part))).size !== parts.length)
4052
- usage2("Manifest parts must be unique.");
4053
- const paths = parts.map((item) => scopedPath(args.manifest, item.file.vfsPath));
4271
+ usage3("Manifest parts require canonical URIs, hashes and explicit scoped files.");
4272
+ if (new Set(parts.map((item) => asciiKey2(item.part))).size !== parts.length)
4273
+ usage3("Manifest parts must be unique.");
4274
+ const paths = parts.map((item) => scopedPackagePath(args.manifest, item.file.vfsPath));
4054
4275
  if ([args.manifest, ...paths].filter((path) => path === "-").length > 1)
4055
- usage2("Only one manifest input may consume stdin.");
4276
+ usage3("Only one manifest input may consume stdin.");
4056
4277
  if (args.output !== "-" && paths.includes(args.output))
4057
- usage2("Output cannot replace a source file.");
4278
+ usage3("Output cannot replace a source file.");
4058
4279
  let total = 0;
4059
4280
  const members = [];
4060
4281
  for (const [index, item] of parts.entries()) {
@@ -4065,7 +4286,7 @@ async function executePackageCommand(args, request, options2) {
4065
4286
  );
4066
4287
  total += bytes2.length;
4067
4288
  if (bytes2.length > context.archiveLimits.maxEntryBytes || total > context.archiveLimits.maxTotalBytes)
4068
- throw new OfficeError5("resource-limit", "Manifest contents exceed byte limit.", "admit");
4289
+ throw new OfficeError7("resource-limit", "Manifest contents exceed byte limit.", "admit");
4069
4290
  members.push({ part: item.part, sha256: item.sha256, bytes: bytes2 });
4070
4291
  }
4071
4292
  const bytes = await packPackage(
@@ -4074,7 +4295,7 @@ async function executePackageCommand(args, request, options2) {
4074
4295
  args.creation?.kind ? { kind: args.creation.kind } : {}
4075
4296
  );
4076
4297
  if (bytes.length > options2.maxOutputBytes)
4077
- throw new OfficeError5("resource-limit", "Packed output exceeds byte limit.", "validate-intent");
4298
+ throw new OfficeError7("resource-limit", "Packed output exceeds byte limit.", "validate-intent");
4078
4299
  const dryRun = args.dryRun ?? false;
4079
4300
  const fingerprint = [...sha256(bytes)].map((byte) => byte.toString(16).padStart(2, "0")).join("");
4080
4301
  if (args.output && args.output !== "-" && !request.publishOutput)
@@ -4110,7 +4331,7 @@ async function executePackageCommand(args, request, options2) {
4110
4331
  }
4111
4332
 
4112
4333
  // packages/safe-bash-command-pptx/src/command-diff.ts
4113
- import { OfficeError as OfficeError6 } from "../../safe-bash-presentation-engine/errors.js";
4334
+ import { OfficeError as OfficeError8 } from "../../safe-bash-presentation-engine/errors.js";
4114
4335
  import { comparePresentations } from "../../safe-bash-presentation-engine/diff.js";
4115
4336
 
4116
4337
  // packages/safe-bash-command-pptx/src/diff-schema.ts
@@ -4216,7 +4437,7 @@ async function executeDiffCommand(request, options2) {
4216
4437
  let human = "";
4217
4438
  let exitCode = 0;
4218
4439
  const failure = (error) => {
4219
- const office = error instanceof OfficeError6 ? error : void 0;
4440
+ const office = error instanceof OfficeError8 ? error : void 0;
4220
4441
  const code = request.signal.aborted ? "cancelled" : office?.code ?? (error && typeof error === "object" && "code" in error && error.code === "resource-limit" ? "resource-limit" : "io-failure");
4221
4442
  exitCode = code === "cancelled" ? 130 : 2;
4222
4443
  const message = office?.message ?? (code === "cancelled" ? "Comparison cancelled." : "Comparison input could not be read.");
@@ -4233,20 +4454,20 @@ async function executeDiffCommand(request, options2) {
4233
4454
  errors: [{ code, message, context: { phase: office?.phase ?? "admit" } }]
4234
4455
  };
4235
4456
  };
4236
- const usage13 = (message) => {
4237
- throw new OfficeError6("invalid-value", message, "usage");
4457
+ const usage14 = (message) => {
4458
+ throw new OfficeError8("invalid-value", message, "usage");
4238
4459
  };
4239
4460
  try {
4240
4461
  let byteCount = 0;
4241
4462
  const args = request.args.map((bytes2) => {
4242
- if (!(bytes2 instanceof Uint8Array)) usage13("Arguments must be byte arrays.");
4463
+ if (!(bytes2 instanceof Uint8Array)) usage14("Arguments must be byte arrays.");
4243
4464
  byteCount += bytes2.byteLength;
4244
4465
  if (byteCount > options2.maxArgumentBytes)
4245
- throw new OfficeError6("resource-limit", "Argument limit exceeded.", "admit");
4466
+ throw new OfficeError8("resource-limit", "Argument limit exceeded.", "admit");
4246
4467
  try {
4247
4468
  return new TextDecoder("utf-8", { fatal: true }).decode(bytes2);
4248
4469
  } catch {
4249
- return usage13("Arguments must be UTF-8.");
4470
+ return usage14("Arguments must be UTF-8.");
4250
4471
  }
4251
4472
  });
4252
4473
  const delimiter = args.indexOf("--");
@@ -4265,31 +4486,31 @@ async function executeDiffCommand(request, options2) {
4265
4486
  }
4266
4487
  if (!positionalOnly && arg.startsWith("-") && arg !== "-") {
4267
4488
  if (!["--json", "--mode", "--limit", "--help"].includes(arg))
4268
- usage13("Unknown comparison option.");
4269
- if (seen.has(arg) && arg !== "--limit") usage13("Duplicate comparison option.");
4489
+ usage14("Unknown comparison option.");
4490
+ if (seen.has(arg) && arg !== "--limit") usage14("Duplicate comparison option.");
4270
4491
  seen.add(arg);
4271
4492
  if (arg === "--json" || arg === "--help") continue;
4272
4493
  const value = args[++i];
4273
- if (!value) usage13("Comparison option requires a value.");
4494
+ if (!value) usage14("Comparison option requires a value.");
4274
4495
  if (arg === "--mode") {
4275
- if (!diffModes.includes(value)) usage13("Unsupported comparison mode.");
4496
+ if (!diffModes.includes(value)) usage14("Unsupported comparison mode.");
4276
4497
  mode = value;
4277
4498
  } else {
4278
4499
  const parts = value.split("=");
4279
4500
  const name = parts[0];
4280
4501
  const number = Number(parts[1]);
4281
4502
  if (parts.length !== 2 || !["maxBytes", "maxNodes", "maxDepth", "maxOutputBytes"].includes(name) || !parts[1] || ![...parts[1]].every((c) => c >= "0" && c <= "9") || !Number.isSafeInteger(number) || number <= 0 || Object.hasOwn(limits, name))
4282
- usage13("Invalid comparison limit.");
4503
+ usage14("Invalid comparison limit.");
4283
4504
  limits[name] = number;
4284
4505
  }
4285
4506
  } else {
4286
- if (!arg || arg.includes("\0")) usage13("Invalid comparison input.");
4507
+ if (!arg || arg.includes("\0")) usage14("Invalid comparison input.");
4287
4508
  positionals.push(arg);
4288
4509
  }
4289
4510
  }
4290
4511
  if (seen.has("--help")) {
4291
4512
  if (positionals.length || [...seen].some((flag) => flag !== "--help" && flag !== "--json"))
4292
- usage13("Comparison help does not accept inputs or options.");
4513
+ usage14("Comparison help does not accept inputs or options.");
4293
4514
  result = {
4294
4515
  version: 1,
4295
4516
  operation: "help",
@@ -4303,7 +4524,7 @@ async function executeDiffCommand(request, options2) {
4303
4524
  human = diffUsage;
4304
4525
  } else {
4305
4526
  if (positionals.length !== 2 || positionals.every((path) => path === "-"))
4306
- usage13("Comparison requires two inputs and at most one stdin consumer.");
4527
+ usage14("Comparison requires two inputs and at most one stdin consumer.");
4307
4528
  maxOutputBytes = limits.maxOutputBytes ?? maxOutputBytes;
4308
4529
  const context = {
4309
4530
  ...options2.context,
@@ -4320,7 +4541,7 @@ async function executeDiffCommand(request, options2) {
4320
4541
  }
4321
4542
  };
4322
4543
  if (mode === "effective-formatting")
4323
- throw new OfficeError6(
4544
+ throw new OfficeError8(
4324
4545
  "unsupported-profile",
4325
4546
  "Effective formatting comparison is not supported.",
4326
4547
  "usage"
@@ -4355,7 +4576,7 @@ async function executeDiffCommand(request, options2) {
4355
4576
  let bytes = encoder.encode(json ? JSON.stringify(result) + "\n" : human);
4356
4577
  if (bytes.length > maxOutputBytes) {
4357
4578
  result = failure(
4358
- new OfficeError6("resource-limit", "Comparison output limit exceeded.", "admit")
4579
+ new OfficeError8("resource-limit", "Comparison output limit exceeded.", "admit")
4359
4580
  );
4360
4581
  bytes = encoder.encode(json ? JSON.stringify(result) + "\n" : human);
4361
4582
  }
@@ -4475,7 +4696,7 @@ var templateSchema = {
4475
4696
 
4476
4697
  // packages/safe-bash-command-pptx/src/command-template.ts
4477
4698
  import { sha256 as sha2562 } from "@noble/hashes/sha2.js";
4478
- import { OfficeError as OfficeError7 } from "../../safe-bash-presentation-engine/errors.js";
4699
+ import { OfficeError as OfficeError9 } from "../../safe-bash-presentation-engine/errors.js";
4479
4700
  import {
4480
4701
  applyTemplateBindings,
4481
4702
  validateTemplateBindings
@@ -4488,8 +4709,8 @@ function validateTemplateData(value) {
4488
4709
  if (Array.isArray(value)) validateTemplateBindings(value);
4489
4710
  else validateTemplateRepeat(value);
4490
4711
  }
4491
- function usage3(message) {
4492
- throw new OfficeError7("invalid-value", message, "usage");
4712
+ function usage4(message) {
4713
+ throw new OfficeError9("invalid-value", message, "usage");
4493
4714
  }
4494
4715
  function validateTemplateCommand(args, positionals, seen) {
4495
4716
  if ([...seen].some(
@@ -4504,25 +4725,25 @@ function validateTemplateCommand(args, positionals, seen) {
4504
4725
  "--dry-run"
4505
4726
  ].includes(flag)
4506
4727
  ))
4507
- usage3("Option does not apply to template apply.");
4728
+ usage4("Option does not apply to template apply.");
4508
4729
  if (positionals.length !== 1 || !positionals[0])
4509
- usage3("Template apply requires exactly one input.");
4730
+ usage4("Template apply requires exactly one input.");
4510
4731
  args.input = positionals[0];
4511
4732
  if (args.bindings !== void 0 === (args.dataFile !== void 0))
4512
- usage3("Template apply requires exactly one binding source.");
4513
- if (args.dataFile === "") usage3("Binding file path must not be empty.");
4514
- if (args.input === "-" && args.dataFile === "-") usage3("Only one input may consume stdin.");
4515
- if (args.inPlace && args.input === "-") usage3("Stdin cannot be edited in place.");
4516
- if (args.inPlace && args.output) usage3("Output and in-place cannot be combined.");
4517
- if (!args.dryRun && !args.inPlace && !args.output) usage3("Mutation requires a destination.");
4518
- if (args.force && !args.output) usage3("Force requires an explicit output destination.");
4733
+ usage4("Template apply requires exactly one binding source.");
4734
+ if (args.dataFile === "") usage4("Binding file path must not be empty.");
4735
+ if (args.input === "-" && args.dataFile === "-") usage4("Only one input may consume stdin.");
4736
+ if (args.inPlace && args.input === "-") usage4("Stdin cannot be edited in place.");
4737
+ if (args.inPlace && args.output) usage4("Output and in-place cannot be combined.");
4738
+ if (!args.dryRun && !args.inPlace && !args.output) usage4("Mutation requires a destination.");
4739
+ if (args.force && !args.output) usage4("Force requires an explicit output destination.");
4519
4740
  if (args.output === args.input && args.output !== "-")
4520
- usage3("Replacing input requires --in-place.");
4741
+ usage4("Replacing input requires --in-place.");
4521
4742
  const destination = args.inPlace ? args.input : args.output;
4522
4743
  if (args.dataFile !== void 0 && args.dataFile !== "-" && destination === args.dataFile)
4523
- usage3("Output cannot replace the binding source.");
4744
+ usage4("Output cannot replace the binding source.");
4524
4745
  if (args.output === "-" && args.json && !args.dryRun)
4525
- usage3("Binary stdout cannot be combined with JSON.");
4746
+ usage4("Binary stdout cannot be combined with JSON.");
4526
4747
  }
4527
4748
  async function executeTemplateCommand(args, request, options2) {
4528
4749
  const context = { ...options2.context, signal: request.signal };
@@ -4536,7 +4757,7 @@ async function executeTemplateCommand(args, request, options2) {
4536
4757
  try {
4537
4758
  json = new TextDecoder("utf-8", { fatal: true }).decode(data);
4538
4759
  } catch {
4539
- usage3("Binding data must be UTF-8 JSON.");
4760
+ usage4("Binding data must be UTF-8 JSON.");
4540
4761
  }
4541
4762
  bindings = commandJson(json);
4542
4763
  }
@@ -4841,40 +5062,40 @@ var commentSchemas = Object.fromEntries(
4841
5062
  );
4842
5063
 
4843
5064
  // packages/safe-bash-command-pptx/src/command-comments.ts
4844
- import { OfficeError as OfficeError8 } from "../../safe-bash-presentation-engine/errors.js";
5065
+ import { OfficeError as OfficeError10 } from "../../safe-bash-presentation-engine/errors.js";
4845
5066
  import { mutateComments, readComments, readCommentAuthors } from "../../safe-bash-presentation-engine/comments.js";
4846
5067
  import { SelectionError } from "../../safe-bash-presentation-engine/selectors.js";
4847
- function usage4(message) {
4848
- throw new OfficeError8("invalid-value", message, "usage");
5068
+ function usage5(message) {
5069
+ throw new OfficeError10("invalid-value", message, "usage");
4849
5070
  }
4850
5071
  function validateCommentsCommand(args, positionals, seen) {
4851
5072
  const allowed = Object.keys(commentSchemas[args.operation].options.properties).map(
4852
5073
  (key) => "--" + [...key].map((c) => c >= "A" && c <= "Z" ? "-" + c.toLowerCase() : c).join("")
4853
5074
  );
4854
5075
  if ([...seen].some((flag) => !allowed.includes(flag)))
4855
- usage4("Option does not apply to comments.");
4856
- if (positionals.length !== 1 || !positionals[0]) usage4("Comments require exactly one input.");
5076
+ usage5("Option does not apply to comments.");
5077
+ if (positionals.length !== 1 || !positionals[0]) usage5("Comments require exactly one input.");
4857
5078
  args.input = positionals[0];
4858
- if (args.scope !== void 0 && args.scope !== "slides") usage4("Comments require slides scope.");
5079
+ if (args.scope !== void 0 && args.scope !== "slides") usage5("Comments require slides scope.");
4859
5080
  if (args.token && ["--slide", "--scope", "--id"].some((flag) => seen.has(flag)))
4860
- usage4("Opaque and simple selectors cannot be combined.");
5081
+ usage5("Opaque and simple selectors cannot be combined.");
4861
5082
  if (args.operation === "comments.list" || args.operation === "comments.get") return;
4862
5083
  if (!args.token && args.slide === void 0 && !args.all)
4863
5084
  throw new SelectionError("missing-selection");
4864
5085
  if (args.operation === "comments.add" && [args.commentEdit?.text, args.commentEdit?.author, args.commentEdit?.timestamp].some(
4865
5086
  (value) => value === void 0
4866
5087
  ))
4867
- usage4("Comment creation requires text, author and timestamp.");
5088
+ usage5("Comment creation requires text, author and timestamp.");
4868
5089
  if (args.operation === "comments.set" && !Object.keys(args.commentEdit ?? {}).some((key) => key !== "id"))
4869
- usage4("Comment update requires an edit.");
4870
- if (args.inPlace && args.input === "-") usage4("Stdin cannot be edited in place.");
4871
- if (args.inPlace && args.output) usage4("Output and in-place cannot be combined.");
4872
- if (!args.dryRun && !args.inPlace && !args.output) usage4("Mutation requires a destination.");
4873
- if (args.force && !args.output) usage4("Force requires an explicit output destination.");
5090
+ usage5("Comment update requires an edit.");
5091
+ if (args.inPlace && args.input === "-") usage5("Stdin cannot be edited in place.");
5092
+ if (args.inPlace && args.output) usage5("Output and in-place cannot be combined.");
5093
+ if (!args.dryRun && !args.inPlace && !args.output) usage5("Mutation requires a destination.");
5094
+ if (args.force && !args.output) usage5("Force requires an explicit output destination.");
4874
5095
  if (args.output === args.input && args.output !== "-")
4875
- usage4("Replacing input requires --in-place.");
5096
+ usage5("Replacing input requires --in-place.");
4876
5097
  if (args.output === "-" && args.json && !args.dryRun)
4877
- usage4("Binary stdout cannot be combined with JSON.");
5098
+ usage5("Binary stdout cannot be combined with JSON.");
4878
5099
  }
4879
5100
  async function executeCommentsCommand(args, request, options2) {
4880
5101
  const context = { ...options2.context, signal: request.signal };
@@ -5347,43 +5568,43 @@ var accessibilitySchemas = Object.fromEntries(
5347
5568
  );
5348
5569
 
5349
5570
  // packages/safe-bash-command-pptx/src/command-accessibility.ts
5350
- import { OfficeError as OfficeError9 } from "../../safe-bash-presentation-engine/errors.js";
5571
+ import { OfficeError as OfficeError11 } from "../../safe-bash-presentation-engine/errors.js";
5351
5572
  import {
5352
5573
  readAccessibility,
5353
5574
  mutateAccessibility,
5354
5575
  validateAccessibilityUpdate
5355
5576
  } from "../../safe-bash-presentation-engine/accessibility.js";
5356
5577
  import { SelectionError as SelectionError2 } from "../../safe-bash-presentation-engine/selectors.js";
5357
- function usage5(message) {
5358
- throw new OfficeError9("invalid-value", message, "usage");
5578
+ function usage6(message) {
5579
+ throw new OfficeError11("invalid-value", message, "usage");
5359
5580
  }
5360
5581
  function validateAccessibilityCommand(args, positionals, seen) {
5361
5582
  const allowed = Object.keys(accessibilitySchemas[args.operation].options.properties).map(
5362
5583
  (key) => "--" + [...key].map((c) => c >= "A" && c <= "Z" ? "-" + c.toLowerCase() : c).join("")
5363
5584
  );
5364
5585
  if ([...seen].some((flag) => !allowed.includes(flag)))
5365
- usage5("Option does not apply to accessibility.");
5586
+ usage6("Option does not apply to accessibility.");
5366
5587
  if (positionals.length !== 1 || !positionals[0])
5367
- usage5("Accessibility requires exactly one input.");
5588
+ usage6("Accessibility requires exactly one input.");
5368
5589
  args.input = positionals[0];
5369
5590
  if (args.scope !== void 0 && !["slides", "layouts", "masters"].includes(args.scope))
5370
- usage5("Unsupported accessibility scope.");
5591
+ usage6("Unsupported accessibility scope.");
5371
5592
  if (args.token && ["--slide", "--shape", "--scope", "--all"].some((flag) => seen.has(flag)))
5372
- usage5("Opaque and simple selectors cannot be combined.");
5593
+ usage6("Opaque and simple selectors cannot be combined.");
5373
5594
  if (args.shape !== void 0 && args.slide === void 0)
5374
- usage5("Shape selection requires a slide.");
5595
+ usage6("Shape selection requires a slide.");
5375
5596
  if (args.operation !== "accessibility.set") return;
5376
5597
  validateAccessibilityUpdate(args.accessibilityEdit ?? {});
5377
5598
  if (!args.token && args.slide === void 0 && !args.all)
5378
- usage5("Accessibility mutation requires explicit selection.");
5379
- if (args.inPlace && args.input === "-") usage5("Stdin cannot be edited in place.");
5380
- if (args.inPlace && args.output) usage5("Output and in-place cannot be combined.");
5381
- if (!args.dryRun && !args.inPlace && !args.output) usage5("Mutation requires a destination.");
5382
- if (args.force && !args.output) usage5("Force requires an output destination.");
5599
+ usage6("Accessibility mutation requires explicit selection.");
5600
+ if (args.inPlace && args.input === "-") usage6("Stdin cannot be edited in place.");
5601
+ if (args.inPlace && args.output) usage6("Output and in-place cannot be combined.");
5602
+ if (!args.dryRun && !args.inPlace && !args.output) usage6("Mutation requires a destination.");
5603
+ if (args.force && !args.output) usage6("Force requires an output destination.");
5383
5604
  if (args.output === args.input && args.output !== "-")
5384
- usage5("Replacing input requires --in-place.");
5605
+ usage6("Replacing input requires --in-place.");
5385
5606
  if (args.output === "-" && args.json && !args.dryRun)
5386
- usage5("Binary stdout cannot be combined with JSON.");
5607
+ usage6("Binary stdout cannot be combined with JSON.");
5387
5608
  }
5388
5609
  async function executeAccessibilityCommand(args, request, options2) {
5389
5610
  const context = { ...options2.context, signal: request.signal };
@@ -5465,13 +5686,13 @@ async function executeAccessibilityCommand(args, request, options2) {
5465
5686
  }
5466
5687
 
5467
5688
  // packages/safe-bash-command-pptx/src/command-metadata.ts
5468
- import { OfficeError as OfficeError10 } from "../../safe-bash-presentation-engine/errors.js";
5689
+ import { OfficeError as OfficeError12 } from "../../safe-bash-presentation-engine/errors.js";
5469
5690
  import { coreDefinition, mutateProperty, readProperties } from "../../safe-bash-presentation-engine/properties.js";
5470
5691
  import { sanitize as sanitizePresentation } from "../../safe-bash-presentation-engine/sanitize.js";
5471
5692
  import { mutateTags, readTags } from "../../safe-bash-presentation-engine/tags.js";
5472
5693
  import { SelectionError as SelectionError3 } from "../../safe-bash-presentation-engine/selectors.js";
5473
- function usage6(message) {
5474
- throw new OfficeError10("invalid-value", message, "usage");
5694
+ function usage7(message) {
5695
+ throw new OfficeError12("invalid-value", message, "usage");
5475
5696
  }
5476
5697
  function removalCategories(value) {
5477
5698
  const categories = ["notes", "comments", "properties", "links", "objects"];
@@ -5480,37 +5701,37 @@ function removalCategories(value) {
5480
5701
  try {
5481
5702
  parsed = JSON.parse(value);
5482
5703
  } catch {
5483
- usage6("Remove requires a category or a JSON array of categories.");
5704
+ usage7("Remove requires a category or a JSON array of categories.");
5484
5705
  }
5485
5706
  }
5486
5707
  const values3 = Array.isArray(parsed) ? parsed : [parsed];
5487
- if (!values3.length || values3.some((item) => typeof item !== "string" || !categories.includes(item)) || new Set(values3).size !== values3.length) usage6("Remove requires distinct notes, comments, properties, links or objects categories.");
5708
+ if (!values3.length || values3.some((item) => typeof item !== "string" || !categories.includes(item)) || new Set(values3).size !== values3.length) usage7("Remove requires distinct notes, comments, properties, links or objects categories.");
5488
5709
  return values3;
5489
5710
  }
5490
5711
  function validateMetadataCommand(args, positionals, seen) {
5491
5712
  const allowed = Object.keys(metadataSchemas[args.operation].options.properties).map((key) => "--" + [...key].map((c) => c >= "A" && c <= "Z" ? "-" + c.toLowerCase() : c).join(""));
5492
- if ([...seen].some((flag) => !allowed.includes(flag))) usage6("Option does not apply to this metadata operation.");
5493
- if (positionals.length !== 1 || !positionals[0]) usage6("Metadata operations require exactly one input.");
5713
+ if ([...seen].some((flag) => !allowed.includes(flag))) usage7("Option does not apply to this metadata operation.");
5714
+ if (positionals.length !== 1 || !positionals[0]) usage7("Metadata operations require exactly one input.");
5494
5715
  args.input = positionals[0];
5495
5716
  const tags = args.operation.startsWith("tags."), sanitize = args.operation === "sanitize";
5496
5717
  const action = args.operation.split(".")[1];
5497
- if (args.scope !== void 0 && !(tags ? ["slides", "presentation"] : ["presentation"]).includes(args.scope)) usage6("Unsupported metadata scope.");
5498
- if (args.token && ["--slide", "--scope", "--all"].some((flag) => seen.has(flag))) usage6("Opaque and simple selectors cannot be combined.");
5499
- if (args.scope === "presentation" && args.slide !== void 0) usage6("Presentation scope rejects slide selection.");
5500
- if (!tags && !sanitize && action !== "list" && !args.metadataName) usage6("Property name is required.");
5501
- if (args.metadataName === "") usage6("Metadata names cannot be empty.");
5502
- if (action === "add" && (!args.metadataName || args.metadataValue === void 0)) usage6("New tags require name and value.");
5503
- if (action === "set" && (tags ? args.metadataName === void 0 && args.metadataValue === void 0 : args.metadataValue === void 0)) usage6("Metadata edit value is required.");
5504
- if (args.metadataType !== void 0 && !["string", "number", "boolean", "date"].includes(args.metadataType)) usage6("Unknown property type.");
5718
+ if (args.scope !== void 0 && !(tags ? ["slides", "presentation"] : ["presentation"]).includes(args.scope)) usage7("Unsupported metadata scope.");
5719
+ if (args.token && ["--slide", "--scope", "--all"].some((flag) => seen.has(flag))) usage7("Opaque and simple selectors cannot be combined.");
5720
+ if (args.scope === "presentation" && args.slide !== void 0) usage7("Presentation scope rejects slide selection.");
5721
+ if (!tags && !sanitize && action !== "list" && !args.metadataName) usage7("Property name is required.");
5722
+ if (args.metadataName === "") usage7("Metadata names cannot be empty.");
5723
+ if (action === "add" && (!args.metadataName || args.metadataValue === void 0)) usage7("New tags require name and value.");
5724
+ if (action === "set" && (tags ? args.metadataName === void 0 && args.metadataValue === void 0 : args.metadataValue === void 0)) usage7("Metadata edit value is required.");
5725
+ if (args.metadataType !== void 0 && !["string", "number", "boolean", "date"].includes(args.metadataType)) usage7("Unknown property type.");
5505
5726
  if (sanitize) removalCategories(args.metadataRemove);
5506
5727
  if (!sanitize && ["list", "get"].includes(action)) return;
5507
5728
  if (tags && !args.token && args.slide === void 0 && args.scope !== "presentation" && !args.all) throw new SelectionError3("missing-selection");
5508
- if (args.inPlace && args.input === "-") usage6("Stdin cannot be edited in place.");
5509
- if (args.inPlace && args.output) usage6("Output and in-place cannot be combined.");
5510
- if (!args.dryRun && !args.inPlace && !args.output) usage6("Mutation requires a destination.");
5511
- if (args.force && !args.output) usage6("Force requires an output destination.");
5512
- if (args.output === args.input && args.output !== "-") usage6("Replacing input requires --in-place.");
5513
- if (args.output === "-" && args.json && !args.dryRun) usage6("Binary stdout cannot be combined with JSON.");
5729
+ if (args.inPlace && args.input === "-") usage7("Stdin cannot be edited in place.");
5730
+ if (args.inPlace && args.output) usage7("Output and in-place cannot be combined.");
5731
+ if (!args.dryRun && !args.inPlace && !args.output) usage7("Mutation requires a destination.");
5732
+ if (args.force && !args.output) usage7("Force requires an output destination.");
5733
+ if (args.output === args.input && args.output !== "-") usage7("Replacing input requires --in-place.");
5734
+ if (args.output === "-" && args.json && !args.dryRun) usage7("Binary stdout cannot be combined with JSON.");
5514
5735
  }
5515
5736
  async function executeMetadataCommand(args, request, options2) {
5516
5737
  const context = { ...options2.context, signal: request.signal };
@@ -5545,15 +5766,15 @@ async function executeMetadataCommand(args, request, options2) {
5545
5766
  const type = args.metadataType ?? known[0]?.type ?? coreDefinition(args.metadataName)?.[2];
5546
5767
  let value = args.metadataValue;
5547
5768
  if (action === "set" && type === "boolean") {
5548
- if (value !== "true" && value !== "false") usage6("Boolean properties require true or false.");
5769
+ if (value !== "true" && value !== "false") usage7("Boolean properties require true or false.");
5549
5770
  value = value === "true";
5550
5771
  } else if (action === "set" && type === "number") {
5551
5772
  try {
5552
5773
  value = JSON.parse(args.metadataValue);
5553
5774
  } catch {
5554
- usage6("Number properties require a finite JSON number.");
5775
+ usage7("Number properties require a finite JSON number.");
5555
5776
  }
5556
- if (typeof value !== "number" || !Number.isFinite(value)) usage6("Number properties require a finite JSON number.");
5777
+ if (typeof value !== "number" || !Number.isFinite(value)) usage7("Number properties require a finite JSON number.");
5557
5778
  }
5558
5779
  bytes = (await mutateProperty(original, action, { name: args.metadataName, ...action === "set" ? { value, ...type === void 0 ? {} : { type } } : {} }, context)).bytes;
5559
5780
  affected = 1;
@@ -5573,22 +5794,22 @@ ${sanitization.retained.map((entry) => `Retained ${entry.category} ${entry.kind}
5573
5794
  }
5574
5795
 
5575
5796
  // packages/safe-bash-command-pptx/src/command-notes.ts
5576
- import { OfficeError as OfficeError11 } from "../../safe-bash-presentation-engine/errors.js";
5797
+ import { OfficeError as OfficeError13 } from "../../safe-bash-presentation-engine/errors.js";
5577
5798
  import { mutateNotes, readNotes, validateNotesOptions } from "../../safe-bash-presentation-engine/notes.js";
5578
5799
  import { readSelectionIndex, SelectionError as SelectionError4 } from "../../safe-bash-presentation-engine/selectors.js";
5579
- function usage7(message) {
5580
- throw new OfficeError11("invalid-value", message, "usage");
5800
+ function usage8(message) {
5801
+ throw new OfficeError13("invalid-value", message, "usage");
5581
5802
  }
5582
5803
  function validateNotesCommand(args, positionals, seen) {
5583
5804
  const allowed = Object.keys(noteSchemas[args.operation].options.properties).map(
5584
5805
  (key) => "--" + [...key].map((c) => c >= "A" && c <= "Z" ? "-" + c.toLowerCase() : c).join("")
5585
5806
  );
5586
- if ([...seen].some((flag) => !allowed.includes(flag))) usage7("Option does not apply to notes.");
5587
- if (positionals.length !== 1 || !positionals[0]) usage7("Notes require exactly one input.");
5807
+ if ([...seen].some((flag) => !allowed.includes(flag))) usage8("Option does not apply to notes.");
5808
+ if (positionals.length !== 1 || !positionals[0]) usage8("Notes require exactly one input.");
5588
5809
  args.input = positionals[0];
5589
- if (args.scope !== void 0 && args.scope !== "notes") usage7("Notes require notes scope.");
5810
+ if (args.scope !== void 0 && args.scope !== "notes") usage8("Notes require notes scope.");
5590
5811
  if (args.token && ["--slide", "--scope"].some((flag) => seen.has(flag)))
5591
- usage7("Opaque and simple selectors cannot be combined.");
5812
+ usage8("Opaque and simple selectors cannot be combined.");
5592
5813
  if (args.operation === "notes.list" || args.operation === "notes.get") return;
5593
5814
  if (!args.token && args.slide === void 0 && !args.all)
5594
5815
  throw new SelectionError4("missing-selection");
@@ -5596,14 +5817,14 @@ function validateNotesCommand(args, positionals, seen) {
5596
5817
  selection: { kind: "slide" },
5597
5818
  ...args.noteText === void 0 ? {} : { text: args.noteText }
5598
5819
  });
5599
- if (args.inPlace && args.input === "-") usage7("Stdin cannot be edited in place.");
5600
- if (args.inPlace && args.output) usage7("Output and in-place cannot be combined.");
5601
- if (!args.dryRun && !args.inPlace && !args.output) usage7("Mutation requires a destination.");
5602
- if (args.force && !args.output) usage7("Force requires an explicit output destination.");
5820
+ if (args.inPlace && args.input === "-") usage8("Stdin cannot be edited in place.");
5821
+ if (args.inPlace && args.output) usage8("Output and in-place cannot be combined.");
5822
+ if (!args.dryRun && !args.inPlace && !args.output) usage8("Mutation requires a destination.");
5823
+ if (args.force && !args.output) usage8("Force requires an explicit output destination.");
5603
5824
  if (args.output === args.input && args.output !== "-")
5604
- usage7("Replacing input requires --in-place.");
5825
+ usage8("Replacing input requires --in-place.");
5605
5826
  if (args.output === "-" && args.json && !args.dryRun)
5606
- usage7("Binary stdout cannot be combined with JSON.");
5827
+ usage8("Binary stdout cannot be combined with JSON.");
5607
5828
  }
5608
5829
  async function executeNotesCommand(args, request, options2) {
5609
5830
  const context = { ...options2.context, signal: request.signal };
@@ -5859,33 +6080,33 @@ var linkSchemas = Object.fromEntries(
5859
6080
  // packages/safe-bash-command-pptx/src/command-links.ts
5860
6081
  import { readPackage as readPackage2 } from "../../safe-bash-presentation-engine/package-reader.js";
5861
6082
  import { parseXmlPart as parseXmlPart2 } from "../../safe-bash-presentation-engine/xml.js";
5862
- import { OfficeError as OfficeError12 } from "../../safe-bash-presentation-engine/errors.js";
6083
+ import { OfficeError as OfficeError14 } from "../../safe-bash-presentation-engine/errors.js";
5863
6084
  import { listLinks, setLink, removeLink, isOrdinaryLinkUrl } from "../../safe-bash-presentation-engine/links.js";
5864
6085
  import { readShapes } from "../../safe-bash-presentation-engine/shape-operations.js";
5865
6086
  import { SelectionError as SelectionError5 } from "../../safe-bash-presentation-engine/selectors.js";
5866
- function usage8(message) {
5867
- throw new OfficeError12("invalid-value", message, "usage");
6087
+ function usage9(message) {
6088
+ throw new OfficeError14("invalid-value", message, "usage");
5868
6089
  }
5869
6090
  function validateLinkCommand(args, positionals, seen) {
5870
6091
  const allowed = Object.keys(linkSchemas[args.operation].options.properties).map(
5871
6092
  (key) => "--" + [...key].map((c) => c >= "A" && c <= "Z" ? "-" + c.toLowerCase() : c).join("")
5872
6093
  );
5873
- if ([...seen].some((flag) => !allowed.includes(flag))) usage8("Option does not apply to links.");
5874
- if (positionals.length !== 1 || !positionals[0]) usage8("Links require exactly one input.");
6094
+ if ([...seen].some((flag) => !allowed.includes(flag))) usage9("Option does not apply to links.");
6095
+ if (positionals.length !== 1 || !positionals[0]) usage9("Links require exactly one input.");
5875
6096
  args.input = positionals[0];
5876
- if (args.scope !== void 0 && args.scope !== "slides") usage8("Links support slides scope.");
6097
+ if (args.scope !== void 0 && args.scope !== "slides") usage9("Links support slides scope.");
5877
6098
  if (args.token && ["--slide", "--shape", "--scope"].some((flag) => seen.has(flag)))
5878
- usage8("Opaque and simple selectors cannot be combined.");
6099
+ usage9("Opaque and simple selectors cannot be combined.");
5879
6100
  if (args.shape !== void 0 && args.slide === void 0)
5880
- usage8("Shape selection requires a slide.");
6101
+ usage9("Shape selection requires a slide.");
5881
6102
  const edit = args.linkEdit ?? {};
5882
6103
  if (edit.trigger !== void 0 && !["click", "hover"].includes(edit.trigger))
5883
- usage8("Unsupported link trigger.");
6104
+ usage9("Unsupported link trigger.");
5884
6105
  if (edit.path !== void 0 && (!Array.isArray(edit.path) || edit.path.some((value) => !Number.isSafeInteger(value) || value < 0)))
5885
- usage8("Link path requires an array of nonnegative integer child positions.");
6106
+ usage9("Link path requires an array of nonnegative integer child positions.");
5886
6107
  if (["links.list", "links.get"].includes(args.operation)) return;
5887
6108
  if (!args.token && args.slide === void 0 && !args.all)
5888
- usage8("Link mutation requires explicit selection.");
6109
+ usage9("Link mutation requires explicit selection.");
5889
6110
  if (args.operation !== "links.remove") {
5890
6111
  const url = edit.url !== void 0, slide = edit.targetSlide !== void 0;
5891
6112
  if (Number(url) + Number(slide) + Number(
@@ -5893,20 +6114,20 @@ function validateLinkCommand(args, positionals, seen) {
5893
6114
  edit.action ?? ""
5894
6115
  )
5895
6116
  ) !== 1)
5896
- usage8("Provide exactly one link destination.");
6117
+ usage9("Provide exactly one link destination.");
5897
6118
  if (url && (!isOrdinaryLinkUrl(edit.url) || edit.action !== void 0 && edit.action !== "url"))
5898
- usage8("URL action must agree with its destination.");
6119
+ usage9("URL action must agree with its destination.");
5899
6120
  if (slide && edit.action !== void 0 && edit.action !== "slide")
5900
- usage8("Slide action must agree with its destination.");
6121
+ usage9("Slide action must agree with its destination.");
5901
6122
  }
5902
- if (args.inPlace && args.input === "-") usage8("Stdin cannot be edited in place.");
5903
- if (args.inPlace && args.output) usage8("Output and in-place cannot be combined.");
5904
- if (!args.dryRun && !args.inPlace && !args.output) usage8("Mutation requires a destination.");
5905
- if (args.force && !args.output) usage8("Force requires an explicit output destination.");
6123
+ if (args.inPlace && args.input === "-") usage9("Stdin cannot be edited in place.");
6124
+ if (args.inPlace && args.output) usage9("Output and in-place cannot be combined.");
6125
+ if (!args.dryRun && !args.inPlace && !args.output) usage9("Mutation requires a destination.");
6126
+ if (args.force && !args.output) usage9("Force requires an explicit output destination.");
5906
6127
  if (args.output === args.input && args.output !== "-")
5907
- usage8("Replacing input requires --in-place.");
6128
+ usage9("Replacing input requires --in-place.");
5908
6129
  if (args.output === "-" && args.json && !args.dryRun)
5909
- usage8("Binary stdout cannot be combined with JSON.");
6130
+ usage9("Binary stdout cannot be combined with JSON.");
5910
6131
  }
5911
6132
  var actionNames = {
5912
6133
  url: "hyperlink",
@@ -6002,7 +6223,7 @@ async function executeLinkCommand(args, request, options2) {
6002
6223
  if (args.operation === "links.add" && selectedLinks.some(
6003
6224
  (link) => link.part === selection.owner && link.shapeId === selection.id && (path ? link.path.length === path.length + 1 && path.every((position, i) => link.path[i] === position) : existingShapeLinks.has(JSON.stringify([link.part, link.shapeId])))
6004
6225
  ))
6005
- throw new OfficeError12(
6226
+ throw new OfficeError14(
6006
6227
  "unsupported-edit",
6007
6228
  "Selected trigger already contains a link.",
6008
6229
  "validate-intent"
@@ -7029,11 +7250,11 @@ import { readAnimations } from "../../safe-bash-presentation-engine/animations.j
7029
7250
  import { mutateAnimations, mutateAnimationsBatch, validateAnimationOptions as validateAnimationOptions2 } from "../../safe-bash-presentation-engine/animation-editing.js";
7030
7251
 
7031
7252
  // packages/safe-bash-command-pptx/src/animation-batch-command.ts
7032
- import { OfficeError as OfficeError13 } from "../../safe-bash-presentation-engine/errors.js";
7253
+ import { OfficeError as OfficeError15 } from "../../safe-bash-presentation-engine/errors.js";
7033
7254
  import { validateAnimationOptions } from "../../safe-bash-presentation-engine/animation-editing.js";
7034
7255
  import { decodeSelectionToken, SelectionError as SelectionError6 } from "../../safe-bash-presentation-engine/selectors.js";
7035
7256
  function invalid(message) {
7036
- throw new OfficeError13("invalid-value", message, "usage");
7257
+ throw new OfficeError15("invalid-value", message, "usage");
7037
7258
  }
7038
7259
  function record(value, keys) {
7039
7260
  if (!value || typeof value !== "object" || Array.isArray(value) || Object.keys(value).some((key) => !keys.includes(key))) invalid("Invalid animation batch fields.");
@@ -7241,31 +7462,31 @@ var equationSchemas = Object.fromEntries(["list", "get", "add"].map((action) =>
7241
7462
  }));
7242
7463
 
7243
7464
  // packages/safe-bash-command-pptx/src/command-equations.ts
7244
- import { OfficeError as OfficeError14 } from "../../safe-bash-presentation-engine/errors.js";
7465
+ import { OfficeError as OfficeError16 } from "../../safe-bash-presentation-engine/errors.js";
7245
7466
  import { readEquations, mutateEquations } from "../../safe-bash-presentation-engine/equations.js";
7246
7467
  import { SelectionError as SelectionError7 } from "../../safe-bash-presentation-engine/selectors.js";
7247
- function usage9(message) {
7248
- throw new OfficeError14("invalid-value", message, "usage");
7468
+ function usage10(message) {
7469
+ throw new OfficeError16("invalid-value", message, "usage");
7249
7470
  }
7250
7471
  function validateEquationCommand(args, positionals, seen) {
7251
7472
  const schema = equationSchemas[args.operation];
7252
7473
  const allowed = Object.keys(schema.options.properties).map((key) => "--" + [...key].map((c) => c >= "A" && c <= "Z" ? "-" + c.toLowerCase() : c).join(""));
7253
- if ([...seen].some((flag) => !allowed.includes(flag))) usage9("Option does not apply to equations.");
7254
- if (positionals.length !== 1 || !positionals[0]) usage9("Equations require exactly one input.");
7474
+ if ([...seen].some((flag) => !allowed.includes(flag))) usage10("Option does not apply to equations.");
7475
+ if (positionals.length !== 1 || !positionals[0]) usage10("Equations require exactly one input.");
7255
7476
  args.input = positionals[0];
7256
- if (args.scope !== void 0 && args.scope !== "slides") usage9("Equations support slides scope.");
7257
- if (args.token && ["--slide", "--shape", "--scope"].some((flag) => seen.has(flag))) usage9("Opaque and simple selectors cannot be combined.");
7258
- if (args.shape !== void 0 && args.slide === void 0) usage9("Shape selection requires a slide.");
7477
+ if (args.scope !== void 0 && args.scope !== "slides") usage10("Equations support slides scope.");
7478
+ if (args.token && ["--slide", "--shape", "--scope"].some((flag) => seen.has(flag))) usage10("Opaque and simple selectors cannot be combined.");
7479
+ if (args.shape !== void 0 && args.slide === void 0) usage10("Shape selection requires a slide.");
7259
7480
  if (args.operation !== "equations.add") return;
7260
- if (!args.file) usage9("Equation insertion requires --file.");
7261
- if (!args.token && !args.shape) usage9("Equation insertion requires a shape selector.");
7262
- if (args.input === "-" && args.file === "-") usage9("Only one input may consume stdin.");
7263
- if (args.inPlace && args.input === "-") usage9("Stdin cannot be edited in place.");
7264
- if (args.inPlace && args.output) usage9("Output and in-place cannot be combined.");
7265
- if (!args.dryRun && !args.inPlace && !args.output) usage9("Mutation requires a destination.");
7266
- if (args.force && !args.output) usage9("Force requires an explicit output destination.");
7267
- if (args.output === args.input && args.output !== "-") usage9("Replacing input requires --in-place.");
7268
- if (args.output === "-" && args.json && !args.dryRun) usage9("Binary stdout cannot be combined with JSON.");
7481
+ if (!args.file) usage10("Equation insertion requires --file.");
7482
+ if (!args.token && !args.shape) usage10("Equation insertion requires a shape selector.");
7483
+ if (args.input === "-" && args.file === "-") usage10("Only one input may consume stdin.");
7484
+ if (args.inPlace && args.input === "-") usage10("Stdin cannot be edited in place.");
7485
+ if (args.inPlace && args.output) usage10("Output and in-place cannot be combined.");
7486
+ if (!args.dryRun && !args.inPlace && !args.output) usage10("Mutation requires a destination.");
7487
+ if (args.force && !args.output) usage10("Force requires an explicit output destination.");
7488
+ if (args.output === args.input && args.output !== "-") usage10("Replacing input requires --in-place.");
7489
+ if (args.output === "-" && args.json && !args.dryRun) usage10("Binary stdout cannot be combined with JSON.");
7269
7490
  }
7270
7491
  async function executeEquationCommand(args, request, options2) {
7271
7492
  const context = { ...options2.context, signal: request.signal };
@@ -7396,30 +7617,30 @@ var opaqueSchemas = Object.fromEntries(["objects.list", "objects.extract", "font
7396
7617
 
7397
7618
  // packages/safe-bash-command-pptx/src/command-opaque.ts
7398
7619
  import { sha256 as sha2563 } from "@noble/hashes/sha2.js";
7399
- import { OfficeError as OfficeError15 } from "../../safe-bash-presentation-engine/errors.js";
7620
+ import { OfficeError as OfficeError17 } from "../../safe-bash-presentation-engine/errors.js";
7400
7621
  import { extractObject, readFonts, readObjects } from "../../safe-bash-presentation-engine/opaque-objects.js";
7401
- import { partName as partName2 } from "../../safe-bash-presentation-engine/package-uri.js";
7402
- function usage10(message) {
7403
- throw new OfficeError15("invalid-value", message, "usage");
7622
+ import { partName as partName3 } from "../../safe-bash-presentation-engine/package-uri.js";
7623
+ function usage11(message) {
7624
+ throw new OfficeError17("invalid-value", message, "usage");
7404
7625
  }
7405
7626
  function validateOpaqueCommand(args, positionals, seen) {
7406
7627
  const schema = opaqueSchemas[args.operation];
7407
7628
  const allowed = Object.keys(schema.options.properties).map((key) => "--" + [...key].map((c) => c >= "A" && c <= "Z" ? "-" + c.toLowerCase() : c).join(""));
7408
- if ([...seen].some((flag) => !allowed.includes(flag))) usage10("Option does not apply to opaque resources.");
7409
- if (positionals.length !== 1 || !positionals[0]) usage10("Opaque resources require exactly one input.");
7629
+ if ([...seen].some((flag) => !allowed.includes(flag))) usage11("Option does not apply to opaque resources.");
7630
+ if (positionals.length !== 1 || !positionals[0]) usage11("Opaque resources require exactly one input.");
7410
7631
  args.input = positionals[0];
7411
7632
  const scope = args.operation === "fonts.list" ? "presentation" : "shared";
7412
- if (args.scope !== void 0 && args.scope !== scope) usage10("Unsupported opaque resource scope.");
7633
+ if (args.scope !== void 0 && args.scope !== scope) usage11("Unsupported opaque resource scope.");
7413
7634
  if (args.operation !== "objects.extract") return;
7414
- if (!args.part) usage10("Object extraction requires --part.");
7635
+ if (!args.part) usage11("Object extraction requires --part.");
7415
7636
  try {
7416
- if (partName2(args.part, false) !== args.part) usage10("Object extraction requires a canonical package part.");
7637
+ if (partName3(args.part, false) !== args.part) usage11("Object extraction requires a canonical package part.");
7417
7638
  } catch {
7418
- usage10("Object extraction requires a canonical package part.");
7639
+ usage11("Object extraction requires a canonical package part.");
7419
7640
  }
7420
- if (!args.outputDir && !args.dryRun) usage10("Object extraction requires --output-dir.");
7421
- if (args.outputDir === "-") usage10("Output directories cannot be stdout.");
7422
- if (args.force && !args.outputDir) usage10("Force requires an output directory.");
7641
+ if (!args.outputDir && !args.dryRun) usage11("Object extraction requires --output-dir.");
7642
+ if (args.outputDir === "-") usage11("Output directories cannot be stdout.");
7643
+ if (args.force && !args.outputDir) usage11("Force requires an output directory.");
7423
7644
  }
7424
7645
  async function executeOpaqueCommand(args, request, options2) {
7425
7646
  const context = { ...options2.context, signal: request.signal };
@@ -7437,7 +7658,7 @@ async function executeOpaqueCommand(args, request, options2) {
7437
7658
  }
7438
7659
  const extracted = await extractObject(bytes, { part: args.part }, context);
7439
7660
  const files = [{ part: extracted.part, name: extracted.name, bytes: extracted.bytes }, ...extracted.dependencies];
7440
- if (files.length > (args.limits?.maxOutputs ?? context.archiveLimits.maxMembers)) throw new OfficeError15("resource-limit", "Opaque output count exceeds limit.", "validate-intent");
7661
+ if (files.length > (args.limits?.maxOutputs ?? context.archiveLimits.maxMembers)) throw new OfficeError17("resource-limit", "Opaque output count exceeds limit.", "validate-intent");
7441
7662
  const dryRun = args.dryRun ?? false;
7442
7663
  const allowPartialOutput = args.allowPartialOutput ?? false;
7443
7664
  if (!dryRun && !request.publishOutputs && (!allowPartialOutput || !request.publishOutput)) throw Object.assign(new Error("Object extraction requires atomic publication or explicit partial output."), { code: "publication-unsupported" });
@@ -7469,7 +7690,7 @@ import { readMedia } from "../../safe-bash-presentation-engine/media.js";
7469
7690
  import { extractMedia } from "../../safe-bash-presentation-engine/media-extraction.js";
7470
7691
 
7471
7692
  // packages/safe-bash-command-pptx/src/command-media-editing.ts
7472
- import { OfficeError as OfficeError16 } from "../../safe-bash-presentation-engine/errors.js";
7693
+ import { OfficeError as OfficeError18 } from "../../safe-bash-presentation-engine/errors.js";
7473
7694
  import { addMedia, replaceMedia } from "../../safe-bash-presentation-engine/media-editing.js";
7474
7695
 
7475
7696
  // packages/safe-bash-command-pptx/src/media-schema.ts
@@ -7718,56 +7939,56 @@ for (const action of ["add", "replace", "extract"]) {
7718
7939
  }
7719
7940
 
7720
7941
  // packages/safe-bash-command-pptx/src/command-media-editing.ts
7721
- function usage11(message) {
7722
- throw new OfficeError16("invalid-value", message, "usage");
7942
+ function usage12(message) {
7943
+ throw new OfficeError18("invalid-value", message, "usage");
7723
7944
  }
7724
7945
  function validateMediaEditingCommand(args, positionals, seen) {
7725
7946
  const allowed = Object.keys(mediaSchemas[args.operation].options.properties).map(
7726
7947
  (key) => "--" + [...key].map((c) => c >= "A" && c <= "Z" ? "-" + c.toLowerCase() : c).join("")
7727
7948
  );
7728
7949
  if ([...seen].some((flag) => !allowed.includes(flag)))
7729
- usage11("Option does not apply to this media operation.");
7730
- if (positionals.length !== 1 || !positionals[0]) usage11("Media requires exactly one input.");
7950
+ usage12("Option does not apply to this media operation.");
7951
+ if (positionals.length !== 1 || !positionals[0]) usage12("Media requires exactly one input.");
7731
7952
  args.input = positionals[0];
7732
7953
  if (args.token && ["--slide", "--shape", "--scope", "--all"].some((flag) => seen.has(flag)))
7733
- usage11("Opaque and simple selectors cannot be combined.");
7954
+ usage12("Opaque and simple selectors cannot be combined.");
7734
7955
  if (args.shape !== void 0 && args.slide === void 0)
7735
- usage11("Shape selection requires an owning slide.");
7956
+ usage12("Shape selection requires an owning slide.");
7736
7957
  if (args.operation === "media.extract") {
7737
7958
  if (!args.outputDir || args.outputDir === "-")
7738
- usage11("Media extraction requires an output directory.");
7959
+ usage12("Media extraction requires an output directory.");
7739
7960
  return;
7740
7961
  }
7741
7962
  if (args.operation === "media.add" && args.scope !== void 0 && args.scope !== "slides")
7742
- usage11("Media editing requires slides scope.");
7743
- if (!args.file) usage11("Media mutation requires --file.");
7963
+ usage12("Media editing requires slides scope.");
7964
+ if (!args.file) usage12("Media mutation requires --file.");
7744
7965
  if (args.operation === "media.add") {
7745
7966
  if (args.slide === void 0 || !args.mediaEdit?.kind || !args.mediaEdit.contentType || ["left", "top", "width", "height"].some(
7746
7967
  (key) => args.mediaEdit?.[key] === void 0
7747
7968
  ))
7748
- usage11("Media insertion requires slide, kind, MIME type and explicit geometry.");
7749
- if (!args.poster) usage11("Media insertion requires an explicit poster.");
7969
+ usage12("Media insertion requires slide, kind, MIME type and explicit geometry.");
7970
+ if (!args.poster) usage12("Media insertion requires an explicit poster.");
7750
7971
  } else {
7751
- if (!args.poster) usage11("Media replacement requires an explicit poster.");
7972
+ if (!args.poster) usage12("Media replacement requires an explicit poster.");
7752
7973
  if (!args.token && args.shape === void 0 && !args.all)
7753
- usage11("Media replacement requires a shape selector or all.");
7974
+ usage12("Media replacement requires a shape selector or all.");
7754
7975
  }
7755
7976
  if ([args.input, args.file, args.poster].filter((value) => value === "-").length > 1)
7756
- usage11("Only one input may consume stdin.");
7977
+ usage12("Only one input may consume stdin.");
7757
7978
  if (args.poster && !args.posterContentType) {
7758
7979
  const extension = args.poster.slice(args.poster.lastIndexOf(".") + 1).toLowerCase();
7759
7980
  const inferred = { png: "image/png", jpg: "image/jpeg", jpeg: "image/jpeg", gif: "image/gif", bmp: "image/bmp", tif: "image/tiff", tiff: "image/tiff", wmf: "image/x-wmf" }[extension];
7760
- if (!inferred) usage11("Poster requires an explicit content type or supported extension.");
7981
+ if (!inferred) usage12("Poster requires an explicit content type or supported extension.");
7761
7982
  args.posterContentType = inferred;
7762
7983
  }
7763
- if (args.inPlace && args.input === "-") usage11("Stdin cannot be edited in place.");
7764
- if (args.inPlace && args.output) usage11("Output and in-place cannot be combined.");
7765
- if (!args.dryRun && !args.inPlace && !args.output) usage11("Mutation requires a destination.");
7766
- if (args.force && !args.output) usage11("Force requires an explicit output destination.");
7984
+ if (args.inPlace && args.input === "-") usage12("Stdin cannot be edited in place.");
7985
+ if (args.inPlace && args.output) usage12("Output and in-place cannot be combined.");
7986
+ if (!args.dryRun && !args.inPlace && !args.output) usage12("Mutation requires a destination.");
7987
+ if (args.force && !args.output) usage12("Force requires an explicit output destination.");
7767
7988
  if (args.output === args.input && args.output !== "-")
7768
- usage11("Replacing input requires --in-place.");
7989
+ usage12("Replacing input requires --in-place.");
7769
7990
  if (args.output === "-" && args.json && !args.dryRun)
7770
- usage11("Binary stdout cannot be combined with JSON.");
7991
+ usage12("Binary stdout cannot be combined with JSON.");
7771
7992
  }
7772
7993
  async function executeMediaEditingCommand(args, request, options2) {
7773
7994
  const context = { ...options2.context, signal: request.signal };
@@ -8813,9 +9034,9 @@ import {
8813
9034
  import { readBackgrounds, mutateBackground } from "../../safe-bash-presentation-engine/backgrounds.js";
8814
9035
  import { replacePresentationText } from "../../safe-bash-presentation-engine/text-replacement.js";
8815
9036
  import { readPresentationText } from "../../safe-bash-presentation-engine/text-reading.js";
8816
- import { OfficeError as OfficeError17 } from "../../safe-bash-presentation-engine/errors.js";
9037
+ import { OfficeError as OfficeError19 } from "../../safe-bash-presentation-engine/errors.js";
8817
9038
  import { sha256 as sha2564 } from "@noble/hashes/sha2.js";
8818
- import { packageUri, partName as partName3 } from "../../safe-bash-presentation-engine/package-uri.js";
9039
+ import { packageUri, partName as partName4 } from "../../safe-bash-presentation-engine/package-uri.js";
8819
9040
  import {
8820
9041
  SelectionError as SelectionError8,
8821
9042
  decodeSelectionToken as decodeSelectionToken2,
@@ -8848,7 +9069,7 @@ import {
8848
9069
  import { getXmlPart, stageRetainedXmlPart, stageRetainedXmlReplacement, replaceXmlPart } from "../../safe-bash-presentation-engine/xml-parts.js";
8849
9070
  import { validatePresentation, openRetainedPresentationValidation } from "../../safe-bash-presentation-engine/validation.js";
8850
9071
  import { readPackage as readPackage3 } from "../../safe-bash-presentation-engine/package-reader.js";
8851
- import { resourceContext } from "../../safe-bash-presentation-engine/resource-limits.js";
9072
+ import { resourceContext as resourceContext2 } from "../../safe-bash-presentation-engine/resource-limits.js";
8852
9073
  var scopes2 = [
8853
9074
  "slides",
8854
9075
  "notes",
@@ -9014,15 +9235,15 @@ Dimension conflicts reject by default; destination policy retains source coordin
9014
9235
  Slides add requires an exact layout name or part URI; position defaults to append.
9015
9236
  Title/body match placeholder types; indexed bindings use --placeholders-json.
9016
9237
  `;
9017
- function usage12(message) {
9018
- throw new OfficeError17("invalid-value", message, "usage");
9238
+ function usage13(message) {
9239
+ throw new OfficeError19("invalid-value", message, "usage");
9019
9240
  }
9020
9241
  function paragraphTabLength(length4) {
9021
9242
  if (Object.keys(length4).some((key) => !["value", "unit"].includes(key)) || typeof length4.value !== "number" || !Number.isFinite(length4.value) || length4.value < 0 || typeof length4.unit !== "string")
9022
- usage12("Tabs require finite explicit lengths.");
9243
+ usage13("Tabs require finite explicit lengths.");
9023
9244
  const emu = length4.value * commandLength("1" + length4.unit, 0);
9024
9245
  if (!Number.isFinite(emu) || emu > Number.MAX_SAFE_INTEGER)
9025
- usage12("Tab length is outside the supported range.");
9246
+ usage13("Tab length is outside the supported range.");
9026
9247
  return Math.round(emu) / 12700;
9027
9248
  }
9028
9249
  var runFlags = [
@@ -9270,11 +9491,11 @@ function parse(raw, maximum, output3) {
9270
9491
  const decoder = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true });
9271
9492
  for (let index = 0; index < raw.length; index++) {
9272
9493
  const bytes = raw[index];
9273
- if (!(bytes instanceof Uint8Array)) usage12("Arguments must be byte arrays.");
9494
+ if (!(bytes instanceof Uint8Array)) usage13("Arguments must be byte arrays.");
9274
9495
  size += bytes.length + 1;
9275
9496
  if (size > maximum) {
9276
- if (invalidUtf8) usage12("Arguments must be UTF-8.");
9277
- throw new OfficeError17("resource-limit", "Argument limit exceeded.", "usage");
9497
+ if (invalidUtf8) usage13("Arguments must be UTF-8.");
9498
+ throw new OfficeError19("resource-limit", "Argument limit exceeded.", "usage");
9278
9499
  }
9279
9500
  try {
9280
9501
  args.push(decoder.decode(bytes));
@@ -9345,9 +9566,9 @@ function parse(raw, maximum, output3) {
9345
9566
  else if (scalarOptions.includes(argument)) hintValue = true;
9346
9567
  }
9347
9568
  }
9348
- if (invalidUtf8) usage12("Arguments must be UTF-8.");
9569
+ if (invalidUtf8) usage13("Arguments must be UTF-8.");
9349
9570
  if (args[0] === "accessibility" && ["--help", "-h"].includes(args[1])) {
9350
- if (args.slice(2).some((argument) => argument !== "--json")) usage12("Unexpected help option.");
9571
+ if (args.slice(2).some((argument) => argument !== "--json")) usage13("Unexpected help option.");
9351
9572
  return { operation: "help", json: output3.json, schemaPath: "accessibility" };
9352
9573
  }
9353
9574
  if (args[0] === "text" && ["runs", "paragraphs", "frames"].includes(args[1]) && ["get", "set", "list"].includes(args[2])) {
@@ -9452,7 +9673,7 @@ function parse(raw, maximum, output3) {
9452
9673
  "help",
9453
9674
  "version"
9454
9675
  ].includes(operation))
9455
- usage12("Unsupported operation.");
9676
+ usage13("Unsupported operation.");
9456
9677
  const result = { operation, json: false };
9457
9678
  const positionals = [];
9458
9679
  const seen = /* @__PURE__ */ new Set();
@@ -9482,10 +9703,10 @@ function parse(raw, maximum, output3) {
9482
9703
  "--height",
9483
9704
  "--workbook-policy"
9484
9705
  ].includes(argument)) {
9485
- if (seen.has(argument)) usage12("Repeated option.");
9706
+ if (seen.has(argument)) usage13("Repeated option.");
9486
9707
  seen.add(argument);
9487
9708
  const value2 = args[++index];
9488
- if (value2 === void 0) usage12("Chart option requires a value.");
9709
+ if (value2 === void 0) usage13("Chart option requires a value.");
9489
9710
  const key = argument.slice(2);
9490
9711
  if (key === "workbook-policy") result.chartWorkbookPolicy = value2;
9491
9712
  else {
@@ -9493,10 +9714,10 @@ function parse(raw, maximum, output3) {
9493
9714
  if (key === "data" || key === "objects") parsed = commandJson(value2);
9494
9715
  else if (key === "style") {
9495
9716
  if (!value2.length || [...value2].some((c) => c < "0" || c > "9"))
9496
- usage12("Chart style requires an integer.");
9717
+ usage13("Chart style requires an integer.");
9497
9718
  parsed = Number(value2);
9498
9719
  } else if (key === "legend") {
9499
- if (!["true", "false"].includes(value2)) usage12("Legend requires true or false.");
9720
+ if (!["true", "false"].includes(value2)) usage13("Legend requires true or false.");
9500
9721
  parsed = value2 === "true";
9501
9722
  } else if (["left", "top", "width", "height"].includes(key))
9502
9723
  parsed = commandLength(
@@ -9510,14 +9731,14 @@ function parse(raw, maximum, output3) {
9510
9731
  if (operation.startsWith("tables.") && (argument === "--table" || argument === "--cell" || ["--from", "--to", "--position", "--span-policy"].includes(argument) || Object.keys(tableValues).some(
9511
9732
  (key) => "--" + [...key].map((c) => c >= "A" && c <= "Z" ? "-" + c.toLowerCase() : c).join("") === argument
9512
9733
  ))) {
9513
- if (seen.has(argument)) usage12("Repeated option.");
9734
+ if (seen.has(argument)) usage13("Repeated option.");
9514
9735
  seen.add(argument);
9515
9736
  const value2 = args[++index];
9516
- if (value2 === void 0) usage12("Table option requires a value.");
9737
+ if (value2 === void 0) usage13("Table option requires a value.");
9517
9738
  const key = argument.slice(2).split("-").map((word, i) => i ? word[0].toUpperCase() + word.slice(1) : word).join("");
9518
9739
  if (key === "table" || key === "rows" || key === "columns" || key === "position") {
9519
9740
  if (!value2.length || [...value2].some((c) => c < "0" || c > "9") || !Number.isSafeInteger(Number(value2)) || Number(value2) < 1)
9520
- usage12("Table positions and dimensions require positive integers.");
9741
+ usage13("Table positions and dimensions require positive integers.");
9521
9742
  if (key === "position") result.tablePosition = Number(value2);
9522
9743
  else if (key === "table") result.table = Number(value2);
9523
9744
  else result.tableEdit = { ...result.tableEdit, [key]: Number(value2) };
@@ -9526,7 +9747,7 @@ function parse(raw, maximum, output3) {
9526
9747
  try {
9527
9748
  tableCell(value2);
9528
9749
  } catch {
9529
- usage12("Cell requires one-based row,column coordinates.");
9750
+ usage13("Cell requires one-based row,column coordinates.");
9530
9751
  }
9531
9752
  if (key === "from") result.tableFrom = value2;
9532
9753
  else if (key === "to") result.tableTo = value2;
@@ -9548,7 +9769,7 @@ function parse(raw, maximum, output3) {
9548
9769
  let parsed = value2;
9549
9770
  if (key === "data") parsed = commandJson(value2);
9550
9771
  else if (["firstRow", "lastRow", "firstCol", "lastCol", "horzBand", "vertBand"].includes(key)) {
9551
- if (!["true", "false"].includes(value2)) usage12("Table style flags require true or false.");
9772
+ if (!["true", "false"].includes(value2)) usage13("Table style flags require true or false.");
9552
9773
  parsed = value2 === "true";
9553
9774
  } else if (value2 === "null" && !["text"].includes(key)) parsed = null;
9554
9775
  else if (lengths.includes(key))
@@ -9573,10 +9794,10 @@ function parse(raw, maximum, output3) {
9573
9794
  "--line-width",
9574
9795
  "--line-color"
9575
9796
  ].includes(argument)) {
9576
- if (seen.has(argument)) usage12("Repeated option.");
9797
+ if (seen.has(argument)) usage13("Repeated option.");
9577
9798
  seen.add(argument);
9578
9799
  const value2 = args[++index];
9579
- if (value2 === void 0) usage12("Connector option requires a value.");
9800
+ if (value2 === void 0) usage13("Connector option requires a value.");
9580
9801
  const keys = {
9581
9802
  "--begin-x": "beginX",
9582
9803
  "--begin-y": "beginY",
@@ -9590,7 +9811,7 @@ function parse(raw, maximum, output3) {
9590
9811
  };
9591
9812
  const key = keys[argument] ?? argument.slice(2);
9592
9813
  if (key === "site" && (!value2 || [...value2].some((c) => c < "0" || c > "9")))
9593
- usage12("Sites require nonnegative decimal integers.");
9814
+ usage13("Sites require nonnegative decimal integers.");
9594
9815
  const parsed = key === "lineWidth" ? value2 === "null" ? null : new Emu(commandLength(value2, 0)) : ["beginX", "beginY", "endX", "endY"].includes(key) ? new Emu(commandLength(value2, -Number.MAX_SAFE_INTEGER)) : ["beginTarget", "endTarget"].includes(key) ? commandJson(value2) : key === "site" ? Number(value2) : key === "kind" && ["1", "2", "3"].includes(value2) ? Number(value2) : key !== "name" && value2 === "null" ? null : value2;
9595
9816
  result.connectorEdit = { ...result.connectorEdit, [key]: parsed };
9596
9817
  continue;
@@ -9607,14 +9828,14 @@ function parse(raw, maximum, output3) {
9607
9828
  "--offset-x",
9608
9829
  "--offset-y"
9609
9830
  ].includes(argument)) {
9610
- if (seen.has(argument)) usage12("Repeated option.");
9831
+ if (seen.has(argument)) usage13("Repeated option.");
9611
9832
  seen.add(argument);
9612
9833
  const value2 = args[++index];
9613
- if (value2 === void 0) usage12("Shape selection option requires a value.");
9834
+ if (value2 === void 0) usage13("Shape selection option requires a value.");
9614
9835
  if (argument === "--shapes") {
9615
9836
  const locations = commandJson(value2);
9616
9837
  if (!Array.isArray(locations) || locations.length === 0)
9617
- usage12("Shapes requires a nonempty location array.");
9838
+ usage13("Shapes requires a nonempty location array.");
9618
9839
  result.shapes = locations;
9619
9840
  } else {
9620
9841
  const key = argument === "--coordinate-system" ? "coordinateSystem" : argument === "--offset-x" ? "offsetX" : argument === "--offset-y" ? "offsetY" : argument.slice(2);
@@ -9627,24 +9848,24 @@ function parse(raw, maximum, output3) {
9627
9848
  continue;
9628
9849
  }
9629
9850
  if (["shapes.group", "shapes.ungroup"].includes(operation) && ["--shapes", "--tolerance"].includes(argument)) {
9630
- if (seen.has(argument)) usage12("Repeated option.");
9851
+ if (seen.has(argument)) usage13("Repeated option.");
9631
9852
  seen.add(argument);
9632
9853
  const value2 = args[++index];
9633
- if (value2 === void 0) usage12("Group option requires a value.");
9854
+ if (value2 === void 0) usage13("Group option requires a value.");
9634
9855
  if (argument === "--tolerance") result.tolerance = new Emu(commandLength(value2, 0));
9635
9856
  else {
9636
9857
  const locations = commandJson(value2);
9637
9858
  if (!Array.isArray(locations) || locations.length < 2)
9638
- usage12("Grouping requires at least two shape locations.");
9859
+ usage13("Grouping requires at least two shape locations.");
9639
9860
  result.shapes = locations;
9640
9861
  }
9641
9862
  continue;
9642
9863
  }
9643
9864
  if (operation.startsWith("fields.") && ["--kind", "--text", "--update", "--timestamp"].includes(argument)) {
9644
- if (seen.has(argument)) usage12("Repeated option.");
9865
+ if (seen.has(argument)) usage13("Repeated option.");
9645
9866
  seen.add(argument);
9646
9867
  const value2 = args[++index];
9647
- if (value2 === void 0) usage12("Field option requires a value.");
9868
+ if (value2 === void 0) usage13("Field option requires a value.");
9648
9869
  const key = argument.slice(2);
9649
9870
  result.fieldEdit = {
9650
9871
  ...result.fieldEdit,
@@ -9653,13 +9874,13 @@ function parse(raw, maximum, output3) {
9653
9874
  continue;
9654
9875
  }
9655
9876
  if (operation.startsWith("animations.") && ["--kind", "--trigger", "--duration", "--delay", "--target"].includes(argument)) {
9656
- if (seen.has(argument)) usage12("Repeated option.");
9877
+ if (seen.has(argument)) usage13("Repeated option.");
9657
9878
  seen.add(argument);
9658
9879
  const value2 = args[++index];
9659
- if (value2 === void 0) usage12("Animation option requires a value.");
9880
+ if (value2 === void 0) usage13("Animation option requires a value.");
9660
9881
  let parsed = value2;
9661
9882
  if (argument === "--duration" || argument === "--delay") {
9662
- if (!value2.length || [...value2].some((character) => character < "0" || character > "9")) usage12("Timing requires integer milliseconds.");
9883
+ if (!value2.length || [...value2].some((character) => character < "0" || character > "9")) usage13("Timing requires integer milliseconds.");
9663
9884
  parsed = Number(value2);
9664
9885
  }
9665
9886
  if (argument === "--target") parsed = animationTargetArgument(value2.trimStart().startsWith("{") ? commandJson(value2) : value2);
@@ -9667,31 +9888,31 @@ function parse(raw, maximum, output3) {
9667
9888
  continue;
9668
9889
  }
9669
9890
  if (operation === "batch" && ["--ops-json", "--ops-file"].includes(argument)) {
9670
- if (seen.has(argument)) usage12("Repeated option.");
9891
+ if (seen.has(argument)) usage13("Repeated option.");
9671
9892
  seen.add(argument);
9672
9893
  const value2 = args[++index];
9673
- if (!value2) usage12("Batch option requires a value.");
9894
+ if (!value2) usage13("Batch option requires a value.");
9674
9895
  if (argument === "--ops-json") result.animationBatch = parseAnimationBatch(commandJson(value2));
9675
9896
  else result.opsFile = value2;
9676
9897
  continue;
9677
9898
  }
9678
9899
  if (operation.startsWith("comments.") && ["--id", "--text", "--author", "--author-id", "--initials", "--timestamp", "--left", "--top"].includes(argument)) {
9679
- if (seen.has(argument)) usage12("Repeated option.");
9900
+ if (seen.has(argument)) usage13("Repeated option.");
9680
9901
  seen.add(argument);
9681
9902
  const value2 = args[++index];
9682
- if (value2 === void 0) usage12("Comment option requires a value.");
9903
+ if (value2 === void 0) usage13("Comment option requires a value.");
9683
9904
  const key = argument === "--author-id" ? "authorId" : argument.slice(2);
9684
9905
  const parsed = ["left", "top"].includes(key) ? commandLength(value2, -Number.MAX_SAFE_INTEGER) : key === "timestamp" ? commandTimestamp(value2).toISOString() : value2;
9685
9906
  result.commentEdit = { ...result.commentEdit, [key]: parsed };
9686
9907
  continue;
9687
9908
  }
9688
9909
  if (Object.hasOwn(accessibilitySchemas, operation) && ["--title", "--alt-text", "--decorative"].includes(argument)) {
9689
- if (seen.has(argument)) usage12("Repeated option.");
9910
+ if (seen.has(argument)) usage13("Repeated option.");
9690
9911
  seen.add(argument);
9691
9912
  const value2 = args[++index];
9692
- if (value2 === void 0) usage12("Accessibility option requires a value.");
9913
+ if (value2 === void 0) usage13("Accessibility option requires a value.");
9693
9914
  if (argument === "--decorative") {
9694
- if (value2 !== "true" && value2 !== "false") usage12("Decorative requires true or false.");
9915
+ if (value2 !== "true" && value2 !== "false") usage13("Decorative requires true or false.");
9695
9916
  result.accessibilityEdit = { ...result.accessibilityEdit, decorative: value2 === "true" };
9696
9917
  } else {
9697
9918
  const key = argument === "--alt-text" ? "altText" : "title";
@@ -9700,10 +9921,10 @@ function parse(raw, maximum, output3) {
9700
9921
  continue;
9701
9922
  }
9702
9923
  if (Object.hasOwn(metadataSchemas, operation) && ["--name", "--value", "--type", "--remove"].includes(argument)) {
9703
- if (seen.has(argument)) usage12("Repeated option.");
9924
+ if (seen.has(argument)) usage13("Repeated option.");
9704
9925
  seen.add(argument);
9705
9926
  const value2 = args[++index];
9706
- if (value2 === void 0) usage12("Metadata option requires a value.");
9927
+ if (value2 === void 0) usage13("Metadata option requires a value.");
9707
9928
  if (argument === "--name") result.metadataName = value2;
9708
9929
  else if (argument === "--value") result.metadataValue = value2;
9709
9930
  else if (argument === "--type") result.metadataType = value2;
@@ -9711,49 +9932,49 @@ function parse(raw, maximum, output3) {
9711
9932
  continue;
9712
9933
  }
9713
9934
  if (operation.startsWith("notes.") && argument === "--text") {
9714
- if (seen.has(argument)) usage12("Repeated option.");
9935
+ if (seen.has(argument)) usage13("Repeated option.");
9715
9936
  seen.add(argument);
9716
9937
  const value2 = args[++index];
9717
- if (value2 === void 0) usage12("Notes text requires a value.");
9938
+ if (value2 === void 0) usage13("Notes text requires a value.");
9718
9939
  result.noteText = value2;
9719
9940
  continue;
9720
9941
  }
9721
9942
  if (operation.startsWith("links.") && ["--url", "--target-slide", "--action", "--trigger", "--sanitize", "--path"].includes(argument)) {
9722
- if (seen.has(argument)) usage12("Repeated option.");
9943
+ if (seen.has(argument)) usage13("Repeated option.");
9723
9944
  seen.add(argument);
9724
9945
  if (argument === "--sanitize") {
9725
9946
  result.linkEdit = { ...result.linkEdit, sanitize: true };
9726
9947
  continue;
9727
9948
  }
9728
9949
  const value2 = args[++index];
9729
- if (value2 === void 0) usage12("Link option requires a value.");
9730
- if (argument === "--target-slide" && (!value2.length || [...value2].some((c) => c < "0" || c > "9") || !Number.isSafeInteger(Number(value2)) || Number(value2) < 1)) usage12("Slide target requires a positive integer.");
9950
+ if (value2 === void 0) usage13("Link option requires a value.");
9951
+ if (argument === "--target-slide" && (!value2.length || [...value2].some((c) => c < "0" || c > "9") || !Number.isSafeInteger(Number(value2)) || Number(value2) < 1)) usage13("Slide target requires a positive integer.");
9731
9952
  const key = argument === "--target-slide" ? "targetSlide" : argument.slice(2);
9732
9953
  result.linkEdit = { ...result.linkEdit, [key]: argument === "--target-slide" ? Number(value2) : argument === "--path" ? commandJson(value2) : value2 };
9733
9954
  continue;
9734
9955
  }
9735
9956
  if (operation.startsWith("transitions.") && ["--kind", "--direction", "--duration", "--advance-after", "--advance-on-click"].includes(argument)) {
9736
- if (seen.has(argument)) usage12("Repeated option.");
9957
+ if (seen.has(argument)) usage13("Repeated option.");
9737
9958
  seen.add(argument);
9738
9959
  const value2 = args[++index];
9739
- if (value2 === void 0) usage12("Transition option requires a value.");
9960
+ if (value2 === void 0) usage13("Transition option requires a value.");
9740
9961
  let parsed = value2;
9741
9962
  if (argument === "--duration" || argument === "--advance-after") {
9742
9963
  if (argument === "--advance-after" && value2 === "null") parsed = null;
9743
9964
  else {
9744
- if (!value2.length || [...value2].some((character) => character < "0" || character > "9")) usage12("Timing requires integer milliseconds.");
9965
+ if (!value2.length || [...value2].some((character) => character < "0" || character > "9")) usage13("Timing requires integer milliseconds.");
9745
9966
  parsed = Number(value2);
9746
9967
  }
9747
9968
  }
9748
9969
  if (argument === "--advance-on-click") {
9749
- if (value2 !== "true" && value2 !== "false") usage12("Advance on click requires true or false.");
9970
+ if (value2 !== "true" && value2 !== "false") usage13("Advance on click requires true or false.");
9750
9971
  parsed = value2 === "true";
9751
9972
  }
9752
9973
  const key = argument === "--advance-after" ? "advanceAfter" : argument === "--advance-on-click" ? "advanceOnClick" : argument.slice(2);
9753
9974
  result.transitionEdit = { ...result.transitionEdit, [key]: parsed };
9754
9975
  continue;
9755
9976
  }
9756
- if (seen.has(argument) && argument !== "--limit") usage12("Repeated option.");
9977
+ if (seen.has(argument) && argument !== "--limit") usage13("Repeated option.");
9757
9978
  seen.add(argument);
9758
9979
  if (argument === "--json") {
9759
9980
  result.json = true;
@@ -9761,7 +9982,7 @@ function parse(raw, maximum, output3) {
9761
9982
  }
9762
9983
  if (argument === "--unique") {
9763
9984
  if (!["images.list", "images.extract"].includes(operation))
9764
- usage12("Unique requires images list or extract.");
9985
+ usage13("Unique requires images list or extract.");
9765
9986
  result.unique = true;
9766
9987
  continue;
9767
9988
  }
@@ -9774,7 +9995,7 @@ function parse(raw, maximum, output3) {
9774
9995
  continue;
9775
9996
  }
9776
9997
  if (argument === "--shared") {
9777
- if (operation !== "images.replace") usage12("Shared requires images replace.");
9998
+ if (operation !== "images.replace") usage13("Shared requires images replace.");
9778
9999
  result.imageReplace = { ...result.imageReplace, shared: true };
9779
10000
  continue;
9780
10001
  }
@@ -9791,12 +10012,12 @@ function parse(raw, maximum, output3) {
9791
10012
  }
9792
10013
  if (argument === "--allow-partial-output") {
9793
10014
  if (!["extract", "slides.split", "images.extract", "media.extract", "objects.extract"].includes(operation))
9794
- usage12("Partial output requires a multi-file operation.");
10015
+ usage13("Partial output requires a multi-file operation.");
9795
10016
  result.allowPartialOutput = true;
9796
10017
  continue;
9797
10018
  }
9798
10019
  if (argument === "--first") {
9799
- if (operation !== "text.replace") usage12("First requires text replace.");
10020
+ if (operation !== "text.replace") usage13("First requires text replace.");
9800
10021
  result.first = true;
9801
10022
  continue;
9802
10023
  }
@@ -9804,7 +10025,7 @@ function parse(raw, maximum, output3) {
9804
10025
  result.all = true;
9805
10026
  continue;
9806
10027
  }
9807
- if (!scalarOptions.includes(argument)) usage12("Unsupported option.");
10028
+ if (!scalarOptions.includes(argument)) usage13("Unsupported option.");
9808
10029
  const booleanValueOptions = [
9809
10030
  "--preserve-geometry",
9810
10031
  "--preserve-crop",
@@ -9829,9 +10050,9 @@ function parse(raw, maximum, output3) {
9829
10050
  "--matching-name",
9830
10051
  "--with"
9831
10052
  ].includes(argument))
9832
- usage12("Missing option value.");
10053
+ usage13("Missing option value.");
9833
10054
  if (["--data-json", "--data-file"].includes(argument)) {
9834
- if (operation !== "template.apply") usage12("Binding sources require template apply.");
10055
+ if (operation !== "template.apply") usage13("Binding sources require template apply.");
9835
10056
  if (argument === "--data-file") result.dataFile = value;
9836
10057
  else {
9837
10058
  const bindings = commandJson(value);
@@ -9842,7 +10063,7 @@ function parse(raw, maximum, output3) {
9842
10063
  }
9843
10064
  if (operation === "objects.add" && ["--icon", "--icon-content-type", "--program", "--program-id", "--name", "--left", "--top", "--width", "--height", "--icon-width", "--icon-height"].includes(argument)) {
9844
10065
  if (argument === "--program") {
9845
- if (!Object.hasOwn(PROG_ID, value)) usage12("Unknown registered program.");
10066
+ if (!Object.hasOwn(PROG_ID, value)) usage13("Unknown registered program.");
9846
10067
  result.objectAdd = { ...result.objectAdd, progId: PROG_ID[value] };
9847
10068
  } else if (argument === "--icon") result.icon = value;
9848
10069
  else if (argument === "--icon-content-type") result.iconContentType = value;
@@ -9858,10 +10079,10 @@ function parse(raw, maximum, output3) {
9858
10079
  else if (argument === "--poster-content-type") result.posterContentType = value;
9859
10080
  else {
9860
10081
  const key = argument === "--mime-type" ? "contentType" : argument.slice(2).split("-").map((part, i) => i ? part[0].toUpperCase() + part.slice(1) : part).join("");
9861
- if (key === "kind" && !["audio", "video"].includes(value)) usage12("Media kind requires audio or video.");
9862
- if (key === "loop" && !["true", "false"].includes(value)) usage12("Loop requires true or false.");
10082
+ if (key === "kind" && !["audio", "video"].includes(value)) usage13("Media kind requires audio or video.");
10083
+ if (key === "loop" && !["true", "false"].includes(value)) usage13("Loop requires true or false.");
9863
10084
  const parsed = ["left", "top", "width", "height"].includes(key) ? commandLength(value, ["width", "height"].includes(key) ? 1 : -27273042316900) : key === "loop" ? value === "true" : ["trimStart", "trimEnd", "volume"].includes(key) ? Number(value) : value;
9864
- if (typeof parsed === "number" && !Number.isFinite(parsed)) usage12("Media values must be finite.");
10085
+ if (typeof parsed === "number" && !Number.isFinite(parsed)) usage13("Media values must be finite.");
9865
10086
  result.mediaEdit = { ...result.mediaEdit, [key]: parsed };
9866
10087
  }
9867
10088
  continue;
@@ -9870,13 +10091,13 @@ function parse(raw, maximum, output3) {
9870
10091
  const key = argument.slice(2).split("-").map((part, i) => i ? part[0].toUpperCase() + part.slice(1) : part).join("");
9871
10092
  let parsed = value;
9872
10093
  if (key === "flipHorizontal" || key === "flipVertical") {
9873
- if (value !== "true" && value !== "false") usage12("Picture flips require true or false.");
10094
+ if (value !== "true" && value !== "false") usage13("Picture flips require true or false.");
9874
10095
  parsed = value === "true";
9875
10096
  } else if (key === "borderWidth") parsed = commandLength(value, 0);
9876
10097
  else if (key !== "borderColor" && key !== "altText") {
9877
10098
  parsed = Number(value);
9878
10099
  if (!value.trim() || !Number.isFinite(parsed))
9879
- usage12("Picture values must be finite numbers.");
10100
+ usage13("Picture values must be finite numbers.");
9880
10101
  }
9881
10102
  result.imageSet = { ...result.imageSet, [key]: parsed };
9882
10103
  continue;
@@ -9890,9 +10111,9 @@ function parse(raw, maximum, output3) {
9890
10111
  ].includes(argument)) {
9891
10112
  const key = argument.slice(2).split("-").map((part, i) => i ? part[0].toUpperCase() + part.slice(1) : part).join("");
9892
10113
  if (key === "contentType" && !["image/png", "image/jpeg", "image/gif", "image/bmp", "image/tiff", "image/x-wmf"].includes(value))
9893
- usage12("Unsupported image content type.");
10114
+ usage13("Unsupported image content type.");
9894
10115
  if (argument.startsWith("--preserve-") && value !== "true" && value !== "false")
9895
- usage12("Image preservation requires true or false.");
10116
+ usage13("Image preservation requires true or false.");
9896
10117
  result.imageReplace = {
9897
10118
  ...result.imageReplace,
9898
10119
  [key]: argument.startsWith("--preserve-") ? value === "true" : value
@@ -9904,18 +10125,18 @@ function parse(raw, maximum, output3) {
9904
10125
  )) {
9905
10126
  const key = argument === "--content-type" ? "contentType" : argument === "--alt-text" ? "altText" : argument.slice(2);
9906
10127
  if (key === "fit" && !["contain", "cover", "stretch"].includes(value))
9907
- usage12("Invalid image fit.");
10128
+ usage13("Invalid image fit.");
9908
10129
  if (key === "contentType" && !["image/png", "image/jpeg", "image/gif", "image/bmp", "image/tiff", "image/x-wmf"].includes(value))
9909
- usage12("Unsupported image content type.");
10130
+ usage13("Unsupported image content type.");
9910
10131
  const parsed = ["left", "top", "width", "height"].includes(key) ? commandLength(value, key === "left" || key === "top" ? -27273042316900 : 1) : value;
9911
10132
  result.imageAdd = { ...result.imageAdd, [key]: parsed };
9912
10133
  continue;
9913
10134
  }
9914
10135
  if (argument === "--image") {
9915
10136
  if (operation !== "images.list" && operation !== "images.extract" && operation !== "images.replace" && operation !== "images.set")
9916
- usage12("Image selection requires images list, extract, replace or set.");
10137
+ usage13("Image selection requires images list, extract, replace or set.");
9917
10138
  if (!value.length || [...value].some((c) => c < "0" || c > "9") || !Number.isSafeInteger(Number(value)) || Number(value) < 1)
9918
- usage12("Image positions require positive integers.");
10139
+ usage13("Image positions require positive integers.");
9919
10140
  result.image = Number(value);
9920
10141
  continue;
9921
10142
  }
@@ -9926,17 +10147,17 @@ function parse(raw, maximum, output3) {
9926
10147
  try {
9927
10148
  parsed = admitFontMetrics(JSON.parse(value));
9928
10149
  } catch (error) {
9929
- if (error instanceof OfficeError17) throw error;
9930
- usage12("Metrics require a valid JSON metric object.");
10150
+ if (error instanceof OfficeError19) throw error;
10151
+ usage13("Metrics require a valid JSON metric object.");
9931
10152
  }
9932
10153
  } else if (["bold", "italic", "wrap"].includes(key)) {
9933
- if (!["true", "false"].includes(value)) usage12("Text fit switches require true or false.");
10154
+ if (!["true", "false"].includes(value)) usage13("Text fit switches require true or false.");
9934
10155
  parsed = value === "true";
9935
10156
  } else if (key.startsWith("margin")) parsed = commandLength(value) / 12700;
9936
10157
  else if (key !== "fontFamily") {
9937
10158
  const pieces = value.split(".");
9938
10159
  if (pieces.length > 2 || pieces.some((p) => !p || [...p].some((c) => c < "0" || c > "9")))
9939
- usage12("Text fit sizes and spacing require decimal numbers.");
10160
+ usage13("Text fit sizes and spacing require decimal numbers.");
9940
10161
  parsed = Number(value);
9941
10162
  }
9942
10163
  result.fitEdit = { ...result.fitEdit, [key]: parsed };
@@ -9948,13 +10169,13 @@ function parse(raw, maximum, output3) {
9948
10169
  if (value === "null" && key !== "text") parsed = null;
9949
10170
  else if (key.startsWith("margin")) parsed = commandLength(value, -2147483648) / 12700;
9950
10171
  else if (key === "wrap") {
9951
- if (!["true", "false"].includes(value)) usage12("Wrap requires true, false or null.");
10172
+ if (!["true", "false"].includes(value)) usage13("Wrap requires true, false or null.");
9952
10173
  parsed = value === "true";
9953
10174
  } else if (key === "columns" || key === "rotation") {
9954
10175
  const digits = key === "rotation" && value.startsWith("-") ? value.slice(1) : value;
9955
10176
  const pieces = digits.split(".");
9956
10177
  if (pieces.length > (key === "columns" ? 1 : 2) || pieces.some((piece) => !piece || [...piece].some((c) => c < "0" || c > "9")) || !Number.isFinite(Number(value)))
9957
- usage12("Columns require an integer; rotation requires finite decimal degrees.");
10178
+ usage13("Columns require an integer; rotation requires finite decimal degrees.");
9958
10179
  parsed = Number(value);
9959
10180
  }
9960
10181
  result.frameEdit = { ...result.frameEdit, [key]: parsed };
@@ -9964,12 +10185,12 @@ function parse(raw, maximum, output3) {
9964
10185
  let key = argument.slice(2).split("-").map((part, index2) => index2 ? part[0].toUpperCase() + part.slice(1) : part).join("");
9965
10186
  let parsed = value;
9966
10187
  if (key === "direction") {
9967
- if (seen.has("--rtl")) usage12("Direction and RTL cannot be combined.");
9968
- if (!["ltr", "rtl", "null"].includes(value)) usage12("Direction requires ltr, rtl or null.");
10188
+ if (seen.has("--rtl")) usage13("Direction and RTL cannot be combined.");
10189
+ if (!["ltr", "rtl", "null"].includes(value)) usage13("Direction requires ltr, rtl or null.");
9969
10190
  key = "rtl";
9970
10191
  parsed = value === "null" ? null : value === "rtl";
9971
10192
  } else if (key === "numbering") {
9972
- if (seen.has("--bullet")) usage12("Bullet and numbering cannot be combined.");
10193
+ if (seen.has("--bullet")) usage13("Bullet and numbering cannot be combined.");
9973
10194
  const schemes = {
9974
10195
  decimal: "arabicPeriod",
9975
10196
  "lower-alpha": "alphaLcPeriod",
@@ -9978,7 +10199,7 @@ function parse(raw, maximum, output3) {
9978
10199
  "upper-roman": "romanUcPeriod"
9979
10200
  };
9980
10201
  if (!Object.hasOwn(schemes, value) && !["none", "null"].includes(value))
9981
- usage12("Unsupported numbering style.");
10202
+ usage13("Unsupported numbering style.");
9982
10203
  key = "bullet";
9983
10204
  parsed = value === "null" ? null : value === "none" ? { kind: "none" } : { kind: "numbered", scheme: schemes[value] };
9984
10205
  } else if (value === "null" && key !== "paragraph") parsed = null;
@@ -9992,11 +10213,11 @@ function parse(raw, maximum, output3) {
9992
10213
  ].includes(key))
9993
10214
  parsed = commandLength(value, key === "indent" ? -Number.MAX_SAFE_INTEGER : 0) / 12700;
9994
10215
  else if (key === "rtl") {
9995
- if (!["true", "false"].includes(value)) usage12("RTL requires true, false or null.");
10216
+ if (!["true", "false"].includes(value)) usage13("RTL requires true, false or null.");
9996
10217
  parsed = value === "true";
9997
10218
  } else if (["paragraph", "level"].includes(key)) {
9998
10219
  if (![...value].every((c) => c >= "0" && c <= "9") || !Number.isSafeInteger(Number(value)) || key === "paragraph" && Number(value) < 1)
9999
- usage12("Invalid paragraph position or level.");
10220
+ usage13("Invalid paragraph position or level.");
10000
10221
  parsed = Number(value) - (key === "paragraph" ? 1 : 0);
10001
10222
  } else if (key === "lineSpacing") {
10002
10223
  const pieces = value.split(".");
@@ -10008,7 +10229,7 @@ function parse(raw, maximum, output3) {
10008
10229
  parsed = value.startsWith("{") ? commandJson(value) : { kind: "character", character: value };
10009
10230
  else if (key === "tabs") {
10010
10231
  const tabs = commandJson(value);
10011
- if (!Array.isArray(tabs)) usage12("Tabs require an array or null.");
10232
+ if (!Array.isArray(tabs)) usage13("Tabs require an array or null.");
10012
10233
  parsed = tabs.map((tab) => {
10013
10234
  if (tab && typeof tab === "object" && "unit" in tab) {
10014
10235
  const record3 = tab;
@@ -10021,7 +10242,7 @@ function parse(raw, maximum, output3) {
10021
10242
  const aligned = tab;
10022
10243
  const length4 = tab.position;
10023
10244
  if (Object.keys(aligned).some((key2) => !["position", "alignment"].includes(key2)))
10024
- usage12("Tabs require finite explicit lengths.");
10245
+ usage13("Tabs require finite explicit lengths.");
10025
10246
  return {
10026
10247
  position: paragraphTabLength(length4),
10027
10248
  alignment: aligned.alignment
@@ -10031,9 +10252,9 @@ function parse(raw, maximum, output3) {
10031
10252
  });
10032
10253
  }
10033
10254
  if (argument === "--rtl" && seen.has("--direction"))
10034
- usage12("Direction and RTL cannot be combined.");
10255
+ usage13("Direction and RTL cannot be combined.");
10035
10256
  if (argument === "--bullet" && seen.has("--numbering"))
10036
- usage12("Bullet and numbering cannot be combined.");
10257
+ usage13("Bullet and numbering cannot be combined.");
10037
10258
  result.paragraphEdit = { ...result.paragraphEdit, [key]: parsed };
10038
10259
  continue;
10039
10260
  }
@@ -10044,20 +10265,20 @@ function parse(raw, maximum, output3) {
10044
10265
  else if (["complexScriptCharset", "complexScriptPitchFamily"].includes(key)) {
10045
10266
  const digits = value.startsWith("-") ? value.slice(1) : value;
10046
10267
  if (!digits || [...digits].some((c) => c < "0" || c > "9") || !Number.isSafeInteger(Number(value)))
10047
- usage12("Font classification requires an integer or null.");
10268
+ usage13("Font classification requires an integer or null.");
10048
10269
  parsed = Number(value);
10049
10270
  } else if (["size", "spacing"].includes(key))
10050
10271
  parsed = commandLength(value, key === "spacing" ? -Number.MAX_SAFE_INTEGER : 1) / 12700;
10051
10272
  else if (["bold", "italic", "rtl"].includes(key)) {
10052
- if (!["true", "false"].includes(value)) usage12("Emphasis requires true, false or null.");
10273
+ if (!["true", "false"].includes(value)) usage13("Emphasis requires true, false or null.");
10053
10274
  parsed = value === "true";
10054
10275
  } else if (["paragraph", "run"].includes(key)) {
10055
10276
  if (![...value].every((c) => c >= "0" && c <= "9") || !Number.isSafeInteger(Number(value)) || Number(value) < 1)
10056
- usage12("Text positions require positive one-based integers.");
10277
+ usage13("Text positions require positive one-based integers.");
10057
10278
  parsed = Number(value) - 1;
10058
10279
  } else if (key === "baseline") {
10059
10280
  if (!value.trim() || !Number.isFinite(Number(value)))
10060
- usage12("Baseline requires a finite percentage.");
10281
+ usage13("Baseline requires a finite percentage.");
10061
10282
  parsed = Number(value);
10062
10283
  } else if (["color", "highlight"].includes(key) && value.startsWith("{"))
10063
10284
  parsed = commandJson(value);
@@ -10068,20 +10289,20 @@ function parse(raw, maximum, output3) {
10068
10289
  continue;
10069
10290
  }
10070
10291
  if (argument === "--style-json") {
10071
- if (operation !== "text.replace") usage12("Style override requires text replace.");
10292
+ if (operation !== "text.replace") usage13("Style override requires text replace.");
10072
10293
  const style = commandJson(value);
10073
10294
  if (!style || typeof style !== "object" || Array.isArray(style) || Object.keys(style).length === 0 || Object.entries(style).some(
10074
10295
  ([key, field]) => !["bold", "italic"].includes(key) || typeof field !== "boolean"
10075
10296
  ))
10076
- usage12("Style requires explicit bold or italic boolean values.");
10297
+ usage13("Style requires explicit bold or italic boolean values.");
10077
10298
  result.style = style;
10078
10299
  continue;
10079
10300
  }
10080
10301
  if (["--find", "--with", "--occurrence"].includes(argument)) {
10081
- if (operation !== "text.replace") usage12("Match options require text replace.");
10302
+ if (operation !== "text.replace") usage13("Match options require text replace.");
10082
10303
  if (argument === "--occurrence") {
10083
10304
  if (![...value].every((c) => c >= "0" && c <= "9") || !Number.isSafeInteger(Number(value)) || Number(value) < 1)
10084
- usage12("Occurrence must be a positive integer.");
10305
+ usage13("Occurrence must be a positive integer.");
10085
10306
  result.occurrence = Number(value);
10086
10307
  } else if (argument === "--find") result.find = value;
10087
10308
  else result.with = value;
@@ -10098,7 +10319,7 @@ function parse(raw, maximum, output3) {
10098
10319
  ].includes(argument)) {
10099
10320
  const key = argument === "--placeholder-policy" ? "placeholderPolicy" : argument === "--show-master-shapes" ? "showMasterShapes" : argument === "--matching-name" ? "matchingName" : argument === "--placeholders-json" ? "placeholders" : argument.slice(2);
10100
10321
  if (["preserve", "showMasterShapes"].includes(key) && !["true", "false"].includes(value))
10101
- usage12("Expected true or false.");
10322
+ usage13("Expected true or false.");
10102
10323
  result.layoutEdit = {
10103
10324
  ...result.layoutEdit,
10104
10325
  [key]: key === "placeholders" ? commandJson(value) : ["preserve", "showMasterShapes"].includes(key) ? value === "true" : value
@@ -10137,18 +10358,18 @@ function parse(raw, maximum, output3) {
10137
10358
  }
10138
10359
  if (operation === "shapes.drawing.set" && ["--fill", "--line", "--shadow-inherit"].includes(argument)) {
10139
10360
  if (argument === "--shadow-inherit" && !["true", "false"].includes(value))
10140
- usage12("Shadow inheritance requires true or false.");
10361
+ usage13("Shadow inheritance requires true or false.");
10141
10362
  const key = argument === "--shadow-inherit" ? "shadowInherit" : argument.slice(2);
10142
10363
  result.drawingEdit = { ...result.drawingEdit, [key]: commandJson(value) };
10143
10364
  continue;
10144
10365
  }
10145
10366
  if (operation === "shapes.effects.set" && ["--shadow", "--opacity", "--shadow-blur", "--shadow-color"].includes(argument)) {
10146
10367
  if (argument === "--shadow") {
10147
- if (!["true", "false"].includes(value)) usage12("Shadow requires true or false.");
10368
+ if (!["true", "false"].includes(value)) usage13("Shadow requires true or false.");
10148
10369
  result.shadowEnabled = value === "true";
10149
10370
  } else if (argument === "--opacity") {
10150
10371
  if (!value.trim() || !Number.isFinite(Number(value)) || Number(value) < 0 || Number(value) > 1)
10151
- usage12("Opacity requires a ratio from zero to one.");
10372
+ usage13("Opacity requires a ratio from zero to one.");
10152
10373
  result.shadowOpacity = Number(value);
10153
10374
  } else if (argument === "--shadow-blur")
10154
10375
  result.shadowBlur = { value: commandLength(value, 0), unit: "emu" };
@@ -10157,7 +10378,7 @@ function parse(raw, maximum, output3) {
10157
10378
  continue;
10158
10379
  }
10159
10380
  if (operation.startsWith("shapes.paths.") && argument === "--close") {
10160
- if (!["true", "false"].includes(value)) usage12("Close requires true or false.");
10381
+ if (!["true", "false"].includes(value)) usage13("Close requires true or false.");
10161
10382
  result.close = value === "true";
10162
10383
  continue;
10163
10384
  }
@@ -10195,18 +10416,18 @@ function parse(raw, maximum, output3) {
10195
10416
  value,
10196
10417
  ["left", "top"].includes(key) ? -27273042316900 : key === "lineWidth" ? 0 : 1
10197
10418
  );
10198
- if (Math.abs(length4) > 27273042316900) usage12("Shape geometry exceeds DrawingML bounds.");
10419
+ if (Math.abs(length4) > 27273042316900) usage13("Shape geometry exceeds DrawingML bounds.");
10199
10420
  parsed = { value: length4, unit: "emu" };
10200
10421
  } else if (key === "flipHorizontal" || key === "flipVertical") {
10201
- if (!["true", "false"].includes(value)) usage12("Flips require true or false.");
10422
+ if (!["true", "false"].includes(value)) usage13("Flips require true or false.");
10202
10423
  parsed = value === "true";
10203
10424
  } else if (key === "locked") {
10204
10425
  if (!["true", "false", "null"].includes(value))
10205
- usage12("Locked requires true, false or null.");
10426
+ usage13("Locked requires true, false or null.");
10206
10427
  parsed = value === "null" ? null : value === "true";
10207
10428
  } else if (key === "rotation") {
10208
10429
  if (!value.trim() || !Number.isFinite(Number(value)))
10209
- usage12("Rotation requires finite degrees.");
10430
+ usage13("Rotation requires finite degrees.");
10210
10431
  parsed = Number(value);
10211
10432
  } else if (key === "kind" && value.length && [...value].every((c) => c >= "0" && c <= "9"))
10212
10433
  parsed = Number(value);
@@ -10244,7 +10465,7 @@ function parse(raw, maximum, output3) {
10244
10465
  "--loop",
10245
10466
  "--show-type"
10246
10467
  ].includes(argument) || operation === "settings.set" && ["--width", "--height"].includes(argument)) {
10247
- if (operation !== "settings.set") usage12("Settings options require settings set.");
10468
+ if (operation !== "settings.set") usage13("Settings options require settings set.");
10248
10469
  if (["--width", "--height", "--notes-width", "--notes-height"].includes(argument)) {
10249
10470
  const key = argument === "--notes-width" ? "notesWidth" : argument === "--notes-height" ? "notesHeight" : argument.slice(2);
10250
10471
  result.settings = {
@@ -10253,7 +10474,7 @@ function parse(raw, maximum, output3) {
10253
10474
  };
10254
10475
  } else if (argument === "--orientation" || argument === "--notes-orientation") {
10255
10476
  if (value !== "portrait" && value !== "landscape")
10256
- usage12("Orientation requires portrait or landscape.");
10477
+ usage13("Orientation requires portrait or landscape.");
10257
10478
  result.settings = {
10258
10479
  ...result.settings,
10259
10480
  [argument === "--orientation" ? "orientation" : "notesOrientation"]: value
@@ -10261,17 +10482,17 @@ function parse(raw, maximum, output3) {
10261
10482
  } else if (argument === "--slide-number-start") {
10262
10483
  const digits = value.startsWith("-") ? value.slice(1) : value;
10263
10484
  if (!digits.length || ![...digits].every((c) => c >= "0" && c <= "9") || !Number.isSafeInteger(Number(value)))
10264
- usage12("Slide-number start requires a safe integer.");
10485
+ usage13("Slide-number start requires a safe integer.");
10265
10486
  result.settings = { ...result.settings, slideNumberStart: Number(value) };
10266
10487
  } else if (argument === "--loop" || argument === "--scale-content") {
10267
- if (value !== "true" && value !== "false") usage12("Boolean settings require true or false.");
10488
+ if (value !== "true" && value !== "false") usage13("Boolean settings require true or false.");
10268
10489
  result.settings = {
10269
10490
  ...result.settings,
10270
10491
  [argument === "--loop" ? "loop" : "scaleContent"]: value === "true"
10271
10492
  };
10272
10493
  } else {
10273
10494
  if (value !== "speaker" && value !== "window" && value !== "kiosk")
10274
- usage12("Unknown show type.");
10495
+ usage13("Unknown show type.");
10275
10496
  result.settings = { ...result.settings, showType: value };
10276
10497
  }
10277
10498
  continue;
@@ -10281,24 +10502,24 @@ function parse(raw, maximum, output3) {
10281
10502
  else if (argument === "--slides") {
10282
10503
  const slides = commandJson(value);
10283
10504
  if (!Array.isArray(slides) || !slides.length || slides.some((item) => !Number.isSafeInteger(item) || item < 1) || new Set(slides).size !== slides.length)
10284
- usage12("Members require a nonempty array of unique one-based slide positions.");
10505
+ usage13("Members require a nonempty array of unique one-based slide positions.");
10285
10506
  result.membership = { ...result.membership, slides };
10286
10507
  } else {
10287
10508
  if (![...value].every((c) => c >= "0" && c <= "9") || !Number.isSafeInteger(Number(value)) || Number(value) < 1)
10288
- usage12("Section positions must be positive integers.");
10509
+ usage13("Section positions must be positive integers.");
10289
10510
  result.membership = { ...result.membership, position: Number(value) };
10290
10511
  }
10291
10512
  continue;
10292
10513
  }
10293
10514
  if (argument === "--sources") {
10294
- if (operation !== "slides.merge") usage12("Sources require slides merge.");
10515
+ if (operation !== "slides.merge") usage13("Sources require slides merge.");
10295
10516
  const sources = commandJson(value);
10296
10517
  if (!Array.isArray(sources) || !sources.length || sources.some(
10297
10518
  (source3) => !source3 || typeof source3 !== "object" || Array.isArray(source3) || Object.keys(source3).length !== 1 || typeof source3.vfsPath !== "string" || !source3.vfsPath.length
10298
10519
  ))
10299
- usage12("Sources require a nonempty ordered array of scoped vfsPath inputs.");
10520
+ usage13("Sources require a nonempty ordered array of scoped vfsPath inputs.");
10300
10521
  const paths = sources.map((source3) => source3.vfsPath);
10301
- if (new Set(paths).size !== paths.length) usage12("Source inputs must be unique.");
10522
+ if (new Set(paths).size !== paths.length) usage13("Source inputs must be unique.");
10302
10523
  result.sources = paths;
10303
10524
  continue;
10304
10525
  }
@@ -10306,57 +10527,57 @@ function parse(raw, maximum, output3) {
10306
10527
  if (argument === "--manifest") result.manifest = value;
10307
10528
  else {
10308
10529
  const parts = commandJson(value);
10309
- if (!Array.isArray(parts) || parts.some((part) => typeof part !== "string")) usage12("Parts require a string array.");
10530
+ if (!Array.isArray(parts) || parts.some((part) => typeof part !== "string")) usage13("Parts require a string array.");
10310
10531
  result.parts = parts;
10311
10532
  }
10312
10533
  continue;
10313
10534
  }
10314
10535
  if (argument === "--sha256") {
10315
10536
  if (operation !== "images.extract" || value.length !== 64 || !Array.from(value).every((character) => "0123456789abcdef".includes(character)))
10316
- usage12("Image extraction requires a lowercase SHA256 hash.");
10537
+ usage13("Image extraction requires a lowercase SHA256 hash.");
10317
10538
  result.imageSha256 = value;
10318
10539
  continue;
10319
10540
  }
10320
10541
  if (argument === "--output-dir" || argument === "--slides") {
10321
10542
  if (operation !== "slides.split" && !(["extract", "images.extract", "media.extract", "objects.extract"].includes(operation) && argument === "--output-dir"))
10322
- usage12("Option requires a multi-file operation.");
10543
+ usage13("Option requires a multi-file operation.");
10323
10544
  if (argument === "--output-dir") result.outputDir = value;
10324
10545
  else {
10325
10546
  const positions = commandJson(value);
10326
10547
  if (!Array.isArray(positions) || !positions.length || positions.some((position) => !Number.isSafeInteger(position) || position < 1) || new Set(positions).size !== positions.length)
10327
- usage12("Slides require a nonempty array of unique one-based positions.");
10548
+ usage13("Slides require a nonempty array of unique one-based positions.");
10328
10549
  result.splitSlides = positions;
10329
10550
  }
10330
10551
  continue;
10331
10552
  }
10332
10553
  if (argument === "--reference-policy") {
10333
10554
  if (operation !== "slides.remove" || value !== "remove")
10334
- usage12("Slide removal reference policy must be remove.");
10555
+ usage13("Slide removal reference policy must be remove.");
10335
10556
  result.referencePolicy = value;
10336
10557
  continue;
10337
10558
  }
10338
10559
  if (argument === "--media-policy") {
10339
10560
  if (operation !== "slides.duplicate" || !["shared-media", "isolated-instance"].includes(value))
10340
- usage12("Slide duplication media policy must be shared-media or isolated-instance.");
10561
+ usage13("Slide duplication media policy must be shared-media or isolated-instance.");
10341
10562
  result.copyMediaPolicy = value;
10342
10563
  continue;
10343
10564
  }
10344
10565
  if (["--source", "--source-slides", "--theme-policy", "--dimension-policy"].includes(argument)) {
10345
10566
  if (operation !== "slides.import" && operation !== "slides.merge")
10346
- usage12("Option requires slides import or merge.");
10567
+ usage13("Option requires slides import or merge.");
10347
10568
  if (operation === "slides.merge" && argument === "--source")
10348
- usage12("Merge requires --sources.");
10569
+ usage13("Merge requires --sources.");
10349
10570
  if (argument === "--source") result.source = value;
10350
10571
  else if (argument === "--source-slides") {
10351
10572
  const positions = commandJson(value);
10352
10573
  if (!Array.isArray(positions) || !positions.length || positions.some((position) => !Number.isSafeInteger(position) || position < 1) || new Set(positions).size !== positions.length)
10353
- usage12("Source slides require a nonempty array of unique one-based positions.");
10574
+ usage13("Source slides require a nonempty array of unique one-based positions.");
10354
10575
  result.importing = { ...result.importing, sourceSlides: positions };
10355
10576
  } else if (argument === "--theme-policy") {
10356
- if (value !== "source" && value !== "destination") usage12("Unknown theme policy.");
10577
+ if (value !== "source" && value !== "destination") usage13("Unknown theme policy.");
10357
10578
  result.importing = { ...result.importing, themePolicy: value };
10358
10579
  } else {
10359
- if (value !== "reject" && value !== "destination") usage12("Unknown dimension policy.");
10580
+ if (value !== "reject" && value !== "destination") usage13("Unknown dimension policy.");
10360
10581
  result.importing = { ...result.importing, dimensionPolicy: value };
10361
10582
  }
10362
10583
  continue;
@@ -10374,7 +10595,7 @@ function parse(raw, maximum, output3) {
10374
10595
  if (operation === "slides.import" || operation === "slides.duplicate" || operation === "slides.move" || operation === "slides.set") {
10375
10596
  if (argument === "--position") {
10376
10597
  if (![...value].every((character) => character >= "0" && character <= "9") || !Number.isSafeInteger(Number(value)) || Number(value) < 1)
10377
- usage12("Slide positions must be positive one-based integers.");
10598
+ usage13("Slide positions must be positive one-based integers.");
10378
10599
  if (operation === "slides.import")
10379
10600
  result.importing = { ...result.importing, position: Number(value) };
10380
10601
  else result.mutation = { ...result.mutation, position: Number(value) };
@@ -10382,30 +10603,30 @@ function parse(raw, maximum, output3) {
10382
10603
  result.mutation = { ...result.mutation, name: value };
10383
10604
  else if (operation === "slides.set" && argument === "--hidden") {
10384
10605
  if (value !== "true" && value !== "false")
10385
- usage12("Slide boolean options require true or false.");
10606
+ usage13("Slide boolean options require true or false.");
10386
10607
  result.mutation = { ...result.mutation, hidden: value === "true" };
10387
- } else usage12("Option is unavailable for this slide operation.");
10608
+ } else usage13("Option is unavailable for this slide operation.");
10388
10609
  continue;
10389
10610
  }
10390
- if (operation !== "slides.add") usage12("Slide addition options require slides add.");
10611
+ if (operation !== "slides.add") usage13("Slide addition options require slides add.");
10391
10612
  result.addition ??= {};
10392
10613
  if (argument === "--position") {
10393
10614
  if (![...value].every((character) => character >= "0" && character <= "9") || !Number.isSafeInteger(Number(value)) || Number(value) < 1)
10394
- usage12("Insertion positions must be positive one-based integers.");
10615
+ usage13("Insertion positions must be positive one-based integers.");
10395
10616
  result.addition = { ...result.addition, position: Number(value) };
10396
10617
  } else if (argument === "--hidden" || argument === "--follow-master-background") {
10397
10618
  if (value !== "true" && value !== "false")
10398
- usage12("Slide boolean options require true or false.");
10619
+ usage13("Slide boolean options require true or false.");
10399
10620
  result.addition = {
10400
10621
  ...result.addition,
10401
10622
  [argument === "--hidden" ? "hidden" : "followMasterBackground"]: value === "true"
10402
10623
  };
10403
10624
  } else if (argument === "--placeholders-json") {
10404
10625
  const placeholders = commandJson(value);
10405
- if (!Array.isArray(placeholders)) usage12("Placeholders require an array.");
10626
+ if (!Array.isArray(placeholders)) usage13("Placeholders require an array.");
10406
10627
  for (const binding of placeholders) {
10407
10628
  if (!binding || typeof binding !== "object" || Array.isArray(binding) || Object.keys(binding).some((key) => !["type", "index", "text"].includes(key)) || typeof binding.type !== "string" || !binding.type.length || typeof binding.text !== "string" || Object.hasOwn(binding, "index") && (!Number.isSafeInteger(binding.index) || binding.index < 0 || binding.index > 4294967295))
10408
- usage12("Placeholder bindings require type, optional nonnegative index, and text.");
10629
+ usage13("Placeholder bindings require type, optional nonnegative index, and text.");
10409
10630
  }
10410
10631
  result.addition = { ...result.addition, placeholders };
10411
10632
  } else result.addition = { ...result.addition, [argument.slice(2)]: value };
@@ -10422,16 +10643,16 @@ function parse(raw, maximum, output3) {
10422
10643
  "--slides-json",
10423
10644
  "--properties-json"
10424
10645
  ].includes(argument)) {
10425
- if (operation !== "create" && operation !== "pack") usage12("Creation options require create or pack.");
10646
+ if (operation !== "create" && operation !== "pack") usage13("Creation options require create or pack.");
10426
10647
  result.creation ??= {};
10427
10648
  if (argument === "--template") result.template = value;
10428
10649
  else if (argument === "--width" || argument === "--height")
10429
10650
  result.creation = { ...result.creation, [argument.slice(2)]: commandLength(value) };
10430
10651
  else if (argument === "--kind") {
10431
- if (!["pptx", "potx", "ppsx"].includes(value)) usage12("Unknown presentation kind.");
10652
+ if (!["pptx", "potx", "ppsx"].includes(value)) usage13("Unknown presentation kind.");
10432
10653
  result.creation = { ...result.creation, kind: value };
10433
10654
  } else if (argument === "--dialect") {
10434
- if (!["strict", "transitional"].includes(value)) usage12("Unknown presentation dialect.");
10655
+ if (!["strict", "transitional"].includes(value)) usage13("Unknown presentation dialect.");
10435
10656
  result.creation = { ...result.creation, dialect: value };
10436
10657
  } else if (argument === "--author") result.creation = { ...result.creation, author: value };
10437
10658
  else if (argument === "--timestamp")
@@ -10439,7 +10660,7 @@ function parse(raw, maximum, output3) {
10439
10660
  else if (argument === "--properties-json") {
10440
10661
  const properties = commandJson(value);
10441
10662
  if (!properties || typeof properties !== "object" || Array.isArray(properties))
10442
- usage12("Properties require an object.");
10663
+ usage13("Properties require an object.");
10443
10664
  if (Object.keys(properties).some(
10444
10665
  (key) => ![
10445
10666
  "title",
@@ -10459,11 +10680,11 @@ function parse(raw, maximum, output3) {
10459
10680
  "lastPrinted"
10460
10681
  ].includes(key)
10461
10682
  ))
10462
- usage12("Unknown creation property.");
10683
+ usage13("Unknown creation property.");
10463
10684
  for (const key of ["created", "modified", "lastPrinted"]) {
10464
10685
  if (Object.hasOwn(properties, key)) {
10465
10686
  const dates = properties;
10466
- if (typeof dates[key] !== "string") usage12("Property dates require UTC strings.");
10687
+ if (typeof dates[key] !== "string") usage13("Property dates require UTC strings.");
10467
10688
  dates[key] = commandTimestamp(dates[key]);
10468
10689
  }
10469
10690
  }
@@ -10485,36 +10706,36 @@ function parse(raw, maximum, output3) {
10485
10706
  }
10486
10707
  if (argument === "--selection-json") {
10487
10708
  if (operation !== "slides.move" && operation !== "slides.set" && operation !== "slides.remove" && operation !== "slides.duplicate")
10488
- usage12("Selection JSON requires a supported slide mutation.");
10709
+ usage13("Selection JSON requires a supported slide mutation.");
10489
10710
  const selection = commandJson(value);
10490
10711
  if (!selection || typeof selection !== "object")
10491
- usage12("Selection JSON requires a query or nonempty query array.");
10712
+ usage13("Selection JSON requires a query or nonempty query array.");
10492
10713
  const queries = Array.isArray(selection) ? selection : [selection];
10493
- if (!queries.length) usage12("Selection arrays must not be empty.");
10714
+ if (!queries.length) usage13("Selection arrays must not be empty.");
10494
10715
  for (const query of queries) {
10495
10716
  if (!query || typeof query !== "object" || Array.isArray(query) || Object.keys(query).some(
10496
10717
  (key) => !["kind", "scope", "owner", "position", "id", "name", "token", "all"].includes(key)
10497
10718
  ))
10498
- usage12("Invalid slide selection query.");
10719
+ usage13("Invalid slide selection query.");
10499
10720
  if (query.token !== void 0) {
10500
10721
  if (typeof query.token !== "string" || Object.keys(query).some((key) => !["kind", "token"].includes(key)) || query.kind !== void 0 && query.kind !== "slide")
10501
- usage12("Invalid slide token query.");
10722
+ usage13("Invalid slide token query.");
10502
10723
  decodeSelectionToken2(query.token);
10503
10724
  continue;
10504
10725
  }
10505
10726
  if (query.kind !== "slide" || query.scope !== void 0 && query.scope !== "slides" || query.all !== void 0 && typeof query.all !== "boolean")
10506
- usage12("Selection queries must address slides.");
10727
+ usage13("Selection queries must address slides.");
10507
10728
  for (const key of ["id", "name", "owner"])
10508
10729
  if (query[key] !== void 0 && (typeof query[key] !== "string" || key !== "name" && !query[key]))
10509
- usage12("Invalid slide selection value.");
10730
+ usage13("Invalid slide selection value.");
10510
10731
  if ([query.position, query.id, query.name].filter((item) => item !== void 0).length > 1)
10511
- usage12("Slide identity selectors cannot be combined.");
10732
+ usage13("Slide identity selectors cannot be combined.");
10512
10733
  if (!query.all && query.position === void 0 && query.id === void 0 && query.name === void 0)
10513
- usage12("Slide selection requires an identity or all.");
10734
+ usage13("Slide selection requires an identity or all.");
10514
10735
  if (query.position !== void 0) {
10515
10736
  const position = query.position;
10516
10737
  if (!position || typeof position !== "object" || Array.isArray(position) || Object.keys(position).some((key) => !["coordinateSystem", "value"].includes(key)) || !["one-based", "zero-based"].includes(position.coordinateSystem) || !Number.isSafeInteger(position.value) || position.value < (position.coordinateSystem === "one-based" ? 1 : 0))
10517
- usage12("Invalid slide selection coordinate.");
10738
+ usage13("Invalid slide selection coordinate.");
10518
10739
  }
10519
10740
  }
10520
10741
  result.selection = selection;
@@ -10524,9 +10745,9 @@ function parse(raw, maximum, output3) {
10524
10745
  const pieces = value.split("=");
10525
10746
  const [name, digits] = pieces;
10526
10747
  if (pieces.length !== 2 || !name || !digits || ![...digits].every((c) => c >= "0" && c <= "9") || !Number.isSafeInteger(Number(digits)) || Number(digits) < 1)
10527
- usage12("Limits require NAME=POSITIVE_INTEGER.");
10748
+ usage13("Limits require NAME=POSITIVE_INTEGER.");
10528
10749
  result.limits ??= {};
10529
- if (Object.hasOwn(result.limits, name)) usage12("Repeated limit name.");
10750
+ if (Object.hasOwn(result.limits, name)) usage13("Repeated limit name.");
10530
10751
  if (![
10531
10752
  "maxBytes",
10532
10753
  "maxNodes",
@@ -10534,21 +10755,21 @@ function parse(raw, maximum, output3) {
10534
10755
  "maxOutputBytes",
10535
10756
  ...["extract", "images.extract", "media.extract", "objects.extract"].includes(operation) ? ["maxOutputs"] : []
10536
10757
  ].includes(name))
10537
- usage12("Unknown limit name.");
10758
+ usage13("Unknown limit name.");
10538
10759
  result.limits[name] = Number(digits);
10539
10760
  } else if (argument === "--placeholder") {
10540
- if (!value.length || ![...value].every((c) => c >= "0" && c <= "9") || (!Number.isSafeInteger(Number(value)) || Number(value) > 4294967295)) usage12("Placeholder idx must be a nonnegative integer.");
10761
+ if (!value.length || ![...value].every((c) => c >= "0" && c <= "9") || (!Number.isSafeInteger(Number(value)) || Number(value) > 4294967295)) usage13("Placeholder idx must be a nonnegative integer.");
10541
10762
  result.placeholder = Number(value);
10542
10763
  } else if (argument === "--slide") {
10543
10764
  if (![...value].every((character) => character >= "0" && character <= "9") || !Number.isSafeInteger(Number(value)) || Number(value) < 1)
10544
- usage12("Slide positions must be positive one-based integers.");
10765
+ usage13("Slide positions must be positive one-based integers.");
10545
10766
  result.slide = Number(value);
10546
10767
  } else if (argument === "--shape") result.shape = value;
10547
10768
  else if (argument === "--part") {
10548
10769
  if (operation === "objects.list" || operation === "fonts.list")
10549
- usage12("Part selection requires object extraction.");
10770
+ usage13("Part selection requires object extraction.");
10550
10771
  try {
10551
- result.part = partName3(value, false);
10772
+ result.part = partName4(value, false);
10552
10773
  } catch {
10553
10774
  throw new SelectionError8("invalid-selection");
10554
10775
  }
@@ -10556,7 +10777,7 @@ function parse(raw, maximum, output3) {
10556
10777
  else if (argument === "--file") result.file = value;
10557
10778
  else if (argument === "--output") result.output = value;
10558
10779
  else {
10559
- if (!scopes2.includes(value)) usage12("Unknown scope.");
10780
+ if (!scopes2.includes(value)) usage13("Unknown scope.");
10560
10781
  result.scope = value;
10561
10782
  }
10562
10783
  }
@@ -10580,42 +10801,42 @@ function parse(raw, maximum, output3) {
10580
10801
  "--dry-run"
10581
10802
  ];
10582
10803
  if ([...seen].some((option) => !allowed.includes(option)))
10583
- usage12("Option does not apply to images set.");
10584
- if (positionals.length !== 1 || !positionals[0]) usage12("Image formatting requires one input.");
10585
- if (!result.imageSet) usage12("Image formatting requires an update.");
10804
+ usage13("Option does not apply to images set.");
10805
+ if (positionals.length !== 1 || !positionals[0]) usage13("Image formatting requires one input.");
10806
+ if (!result.imageSet) usage13("Image formatting requires an update.");
10586
10807
  if (result.scope === "presentation" || result.scope === "shared")
10587
- usage12("Image formatting requires an occurrence scope.");
10808
+ usage13("Image formatting requires an occurrence scope.");
10588
10809
  if (result.token && ["--slide", "--image", "--scope", "--all"].some((option) => seen.has(option)))
10589
- usage12("Opaque and simple selectors cannot be combined.");
10810
+ usage13("Opaque and simple selectors cannot be combined.");
10590
10811
  if (result.image !== void 0 && (!result.scope || result.scope === "slides") && result.slide === void 0)
10591
- usage12("Slide image selection requires a slide.");
10812
+ usage13("Slide image selection requires a slide.");
10592
10813
  result.input = positionals[0];
10593
10814
  result.imageSet = {
10594
10815
  ...result.imageSet,
10595
10816
  ...result.all ? { all: true } : {},
10596
10817
  ...result.allowEmpty ? { allowEmpty: true } : {}
10597
10818
  };
10598
- if (result.inPlace && result.input === "-") usage12("Stdin cannot be edited in place.");
10599
- if (result.inPlace && result.output) usage12("Output and in-place cannot be combined.");
10819
+ if (result.inPlace && result.input === "-") usage13("Stdin cannot be edited in place.");
10820
+ if (result.inPlace && result.output) usage13("Output and in-place cannot be combined.");
10600
10821
  if (!result.dryRun && !result.inPlace && !result.output)
10601
- usage12("Mutation requires a destination.");
10602
- if (result.force && !result.output) usage12("Force requires an explicit output destination.");
10822
+ usage13("Mutation requires a destination.");
10823
+ if (result.force && !result.output) usage13("Force requires an explicit output destination.");
10603
10824
  if (result.output === result.input && result.output !== "-")
10604
- usage12("Replacing input requires --in-place.");
10825
+ usage13("Replacing input requires --in-place.");
10605
10826
  if (result.output === "-" && result.json && !result.dryRun)
10606
- usage12("Binary stdout cannot be combined with JSON.");
10827
+ usage13("Binary stdout cannot be combined with JSON.");
10607
10828
  return result;
10608
10829
  }
10609
10830
  if (result.placeholder !== void 0) {
10610
10831
  if (!["images.add", "tables.add", "charts.add"].includes(operation) || result.slide === void 0)
10611
- usage12("Placeholder insertion requires an add operation and --slide.");
10832
+ usage13("Placeholder insertion requires an add operation and --slide.");
10612
10833
  if (["--left", "--top", "--width", "--height", "--fit"].some((flag) => seen.has(flag)))
10613
- usage12("Placeholder insertion uses inherited geometry.");
10614
- if (operation === "tables.add" && (!result.tableEdit?.rows || !result.tableEdit?.columns)) usage12("Table placeholder insertion requires rows and columns.");
10834
+ usage13("Placeholder insertion uses inherited geometry.");
10835
+ if (operation === "tables.add" && (!result.tableEdit?.rows || !result.tableEdit?.columns)) usage13("Table placeholder insertion requires rows and columns.");
10615
10836
  if (operation === "tables.add" && Object.keys(result.tableEdit ?? {}).some((key) => !["rows", "columns"].includes(key)))
10616
- usage12("Table placeholder insertion accepts rows and columns.");
10837
+ usage13("Table placeholder insertion accepts rows and columns.");
10617
10838
  if (operation === "charts.add" && Object.keys(result.chartEdit ?? {}).some((key) => !["type", "data"].includes(key)))
10618
- usage12("Chart placeholder insertion accepts type and data.");
10839
+ usage13("Chart placeholder insertion accepts type and data.");
10619
10840
  }
10620
10841
  if (operation === "images.add" || operation === "images.replace") {
10621
10842
  const replacing = operation === "images.replace";
@@ -10643,19 +10864,19 @@ function parse(raw, maximum, output3) {
10643
10864
  "--dry-run"
10644
10865
  ];
10645
10866
  if ([...seen].some((option) => !allowed.includes(option)))
10646
- usage12("Option does not apply to this image operation.");
10867
+ usage13("Option does not apply to this image operation.");
10647
10868
  if (positionals.length !== 1 || !positionals[0] || !replacing && result.slide === void 0 || !result.file)
10648
- usage12("Image mutation requires one input, selection and file.");
10869
+ usage13("Image mutation requires one input, selection and file.");
10649
10870
  if (replacing) {
10650
- if (result.scope === "presentation") usage12("Presentation scope has no image owners.");
10871
+ if (result.scope === "presentation") usage13("Presentation scope has no image owners.");
10651
10872
  if (result.scope === "shared" && !result.imageReplace?.shared)
10652
- usage12("Shared scope requires explicit shared replacement.");
10873
+ usage13("Shared scope requires explicit shared replacement.");
10653
10874
  if (result.token && ["--slide", "--image", "--scope", "--all"].some((option) => seen.has(option)))
10654
- usage12("Opaque and simple selectors cannot be combined.");
10875
+ usage13("Opaque and simple selectors cannot be combined.");
10655
10876
  if (!result.token && result.image === void 0 && !result.all)
10656
- usage12("Image replacement requires an image selector or all.");
10877
+ usage13("Image replacement requires an image selector or all.");
10657
10878
  if (result.image !== void 0 && (!result.scope || result.scope === "slides") && result.slide === void 0)
10658
- usage12("Slide image selection requires a slide.");
10879
+ usage13("Slide image selection requires a slide.");
10659
10880
  result.imageReplace = {
10660
10881
  ...result.imageReplace,
10661
10882
  ...result.all ? { all: true } : {},
@@ -10664,28 +10885,28 @@ function parse(raw, maximum, output3) {
10664
10885
  }
10665
10886
  result.input = positionals[0];
10666
10887
  if (result.input === "-" && result.file === "-")
10667
- usage12("Document and image cannot both use stdin.");
10888
+ usage13("Document and image cannot both use stdin.");
10668
10889
  const imageOptions = replacing ? result.imageReplace : result.imageAdd;
10669
10890
  if (!imageOptions?.contentType) {
10670
10891
  const extension = result.file.slice(result.file.lastIndexOf(".") + 1).toLowerCase();
10671
10892
  const contentType = { png: "image/png", jpg: "image/jpeg", jpeg: "image/jpeg", gif: "image/gif", bmp: "image/bmp", tif: "image/tiff", tiff: "image/tiff", wmf: "image/x-wmf" }[extension];
10672
10893
  if (!contentType)
10673
- usage12("Image file requires an explicit supported content type or extension.");
10894
+ usage13("Image file requires an explicit supported content type or extension.");
10674
10895
  if (replacing) result.imageReplace = { ...result.imageReplace, contentType };
10675
10896
  else result.imageAdd = { ...result.imageAdd, contentType };
10676
10897
  }
10677
10898
  const both = result.imageAdd?.width !== void 0 && result.imageAdd?.height !== void 0;
10678
10899
  if (!replacing && !both && result.imageAdd?.fit !== void 0)
10679
- usage12("Both dimensions and explicit fit must be supplied together.");
10680
- if (result.inPlace && result.input === "-") usage12("Stdin cannot be edited in place.");
10681
- if (result.inPlace && result.output) usage12("Output and in-place cannot be combined.");
10900
+ usage13("Both dimensions and explicit fit must be supplied together.");
10901
+ if (result.inPlace && result.input === "-") usage13("Stdin cannot be edited in place.");
10902
+ if (result.inPlace && result.output) usage13("Output and in-place cannot be combined.");
10682
10903
  if (!result.dryRun && !result.inPlace && !result.output)
10683
- usage12("Mutation requires a destination.");
10684
- if (result.force && !result.output) usage12("Force requires an explicit output destination.");
10904
+ usage13("Mutation requires a destination.");
10905
+ if (result.force && !result.output) usage13("Force requires an explicit output destination.");
10685
10906
  if (result.output === result.input && result.output !== "-")
10686
- usage12("Replacing input requires --in-place.");
10907
+ usage13("Replacing input requires --in-place.");
10687
10908
  if (result.output === "-" && result.json && !result.dryRun)
10688
- usage12("Binary stdout cannot be combined with JSON.");
10909
+ usage13("Binary stdout cannot be combined with JSON.");
10689
10910
  return result;
10690
10911
  }
10691
10912
  if (["media.add", "media.replace", "media.extract"].includes(operation)) {
@@ -10695,9 +10916,9 @@ function parse(raw, maximum, output3) {
10695
10916
  if (Object.hasOwn(mediaSchemas, operation)) {
10696
10917
  const allowed = ["--json", "--limit", "--scope", "--slide", "--shape", "--select"];
10697
10918
  if ([...seen].some((option) => !allowed.includes(option)))
10698
- usage12("Option does not apply to media inspection.");
10919
+ usage13("Option does not apply to media inspection.");
10699
10920
  if (positionals.length !== 1 || !positionals[0])
10700
- usage12("Media inspection requires exactly one input.");
10921
+ usage13("Media inspection requires exactly one input.");
10701
10922
  if (result.scope !== void 0 && ![
10702
10923
  "slides",
10703
10924
  "layouts",
@@ -10707,11 +10928,11 @@ function parse(raw, maximum, output3) {
10707
10928
  "handout-master",
10708
10929
  "shared"
10709
10930
  ].includes(result.scope))
10710
- usage12("Unsupported media scope.");
10931
+ usage13("Unsupported media scope.");
10711
10932
  if (result.token && ["--slide", "--shape", "--scope"].some((option) => seen.has(option)))
10712
- usage12("Opaque and simple selectors cannot be combined.");
10933
+ usage13("Opaque and simple selectors cannot be combined.");
10713
10934
  if (result.shape !== void 0 && result.slide === void 0)
10714
- usage12("Shape selection requires an owning slide.");
10935
+ usage13("Shape selection requires an owning slide.");
10715
10936
  result.input = positionals[0];
10716
10937
  return result;
10717
10938
  }
@@ -10760,47 +10981,47 @@ function parse(raw, maximum, output3) {
10760
10981
  (key) => "--" + [...key].map((c) => c >= "A" && c <= "Z" ? "-" + c.toLowerCase() : c).join("")
10761
10982
  );
10762
10983
  if ([...seen].some((flag) => !allowed.includes(flag)))
10763
- usage12("Option does not apply to chart mutation.");
10984
+ usage13("Option does not apply to chart mutation.");
10764
10985
  if (positionals.length !== 1 || !positionals[0])
10765
- usage12("Chart mutation requires exactly one input.");
10986
+ usage13("Chart mutation requires exactly one input.");
10766
10987
  result.input = positionals[0];
10767
10988
  if (result.scope !== void 0 && result.scope !== "slides")
10768
- usage12("Chart mutation supports slides scope.");
10989
+ usage13("Chart mutation supports slides scope.");
10769
10990
  if (result.token && ["--slide", "--shape", "--scope", "--all"].some((flag) => seen.has(flag)))
10770
- usage12("Opaque and simple selectors cannot be combined.");
10991
+ usage13("Opaque and simple selectors cannot be combined.");
10771
10992
  const edit = result.chartEdit ?? {};
10772
10993
  const { type, ...update } = edit;
10773
10994
  validateChartUpdate(update);
10774
10995
  if (operation === "charts.add") {
10775
10996
  if (!result.slide || result.token || result.shape || result.all || result.allowEmpty)
10776
- usage12("Chart addition requires one slide.");
10997
+ usage13("Chart addition requires one slide.");
10777
10998
  if (!type || !chartTypes2.includes(type) || !edit.data || result.placeholder === void 0 && [edit.left, edit.top, edit.width, edit.height].some((value) => value === void 0))
10778
- usage12("Chart addition requires type, data and geometry.");
10999
+ usage13("Chart addition requires type, data and geometry.");
10779
11000
  validateChartData(edit.data, type);
10780
- } else if (!Object.keys(edit).length) usage12("Chart mutation requires an update.");
11001
+ } else if (!Object.keys(edit).length) usage13("Chart mutation requires an update.");
10781
11002
  if (operation === "charts.replace" && (!edit.data || !["synchronize-simple", "reject-complex"].includes(result.chartWorkbookPolicy)))
10782
- usage12("Chart replacement requires data and an explicit workbook policy.");
10783
- if (result.inPlace && result.input === "-") usage12("Stdin cannot be edited in place.");
10784
- if (result.output && result.inPlace) usage12("Output and in-place are mutually exclusive.");
11003
+ usage13("Chart replacement requires data and an explicit workbook policy.");
11004
+ if (result.inPlace && result.input === "-") usage13("Stdin cannot be edited in place.");
11005
+ if (result.output && result.inPlace) usage13("Output and in-place are mutually exclusive.");
10785
11006
  if (!result.dryRun && !result.inPlace && !result.output)
10786
- usage12("Mutation requires a destination.");
10787
- if (result.force && !result.output) usage12("Force requires an explicit output destination.");
11007
+ usage13("Mutation requires a destination.");
11008
+ if (result.force && !result.output) usage13("Force requires an explicit output destination.");
10788
11009
  if (result.output === result.input && result.output !== "-")
10789
- usage12("Replacing input requires --in-place.");
11010
+ usage13("Replacing input requires --in-place.");
10790
11011
  if (result.output === "-" && result.json && !result.dryRun)
10791
- usage12("Binary stdout cannot be combined with JSON.");
11012
+ usage13("Binary stdout cannot be combined with JSON.");
10792
11013
  return result;
10793
11014
  }
10794
11015
  if (operation === "charts.list" || operation === "charts.get") {
10795
11016
  const allowed = ["--json", "--limit", "--scope", "--slide", "--shape", "--select"];
10796
11017
  if ([...seen].some((option) => !allowed.includes(option)))
10797
- usage12("Option does not apply to chart inspection.");
11018
+ usage13("Option does not apply to chart inspection.");
10798
11019
  if (positionals.length !== 1 || !positionals[0])
10799
- usage12("Chart inspection requires exactly one input.");
11020
+ usage13("Chart inspection requires exactly one input.");
10800
11021
  if (result.scope !== void 0 && result.scope !== "slides")
10801
- usage12("Chart inspection supports slides scope.");
11022
+ usage13("Chart inspection supports slides scope.");
10802
11023
  if (result.token && ["--slide", "--shape", "--scope"].some((option) => seen.has(option)))
10803
- usage12("Opaque and simple selectors cannot be combined.");
11024
+ usage13("Opaque and simple selectors cannot be combined.");
10804
11025
  result.input = positionals[0];
10805
11026
  return result;
10806
11027
  }
@@ -10817,33 +11038,33 @@ function parse(raw, maximum, output3) {
10817
11038
  ...extracting ? ["--sha256", "--output-dir", "--allow-partial-output", "--force", "--dry-run"] : []
10818
11039
  ];
10819
11040
  if (extracting) {
10820
- if (!result.outputDir && !result.dryRun) usage12("Image extraction requires --output-dir.");
10821
- if (result.outputDir === "-") usage12("Output directories cannot be stdout.");
10822
- if (result.force && !result.outputDir) usage12("Force requires an output directory.");
11041
+ if (!result.outputDir && !result.dryRun) usage13("Image extraction requires --output-dir.");
11042
+ if (result.outputDir === "-") usage13("Output directories cannot be stdout.");
11043
+ if (result.force && !result.outputDir) usage13("Force requires an output directory.");
10823
11044
  }
10824
11045
  if ([...seen].some((option) => !allowed.includes(option)))
10825
- usage12("Option does not apply to images list.");
11046
+ usage13("Option does not apply to images list.");
10826
11047
  if (positionals.length !== 1 || !positionals[0])
10827
- usage12("Image inventory requires exactly one input.");
10828
- if (result.scope === "presentation") usage12("Presentation scope has no image owners.");
11048
+ usage13("Image inventory requires exactly one input.");
11049
+ if (result.scope === "presentation") usage13("Presentation scope has no image owners.");
10829
11050
  if (result.token && ["--slide", "--image", "--scope"].some((option) => seen.has(option)))
10830
- usage12("Opaque and simple selectors cannot be combined.");
11051
+ usage13("Opaque and simple selectors cannot be combined.");
10831
11052
  result.input = positionals[0];
10832
11053
  return result;
10833
11054
  }
10834
11055
  if (operation === "batch") {
10835
11056
  const allowed = ["--json", "--limit", "--ops-json", "--ops-file", "--output", "--in-place", "--force", "--dry-run"];
10836
- if ([...seen].some((flag) => !allowed.includes(flag))) usage12("Option does not apply to batch.");
10837
- if (positionals.length !== 1 || !positionals[0]) usage12("Batch requires one input.");
10838
- if (result.animationBatch !== void 0 === (result.opsFile !== void 0)) usage12("Batch requires exactly one operation source.");
11057
+ if ([...seen].some((flag) => !allowed.includes(flag))) usage13("Option does not apply to batch.");
11058
+ if (positionals.length !== 1 || !positionals[0]) usage13("Batch requires one input.");
11059
+ if (result.animationBatch !== void 0 === (result.opsFile !== void 0)) usage13("Batch requires exactly one operation source.");
10839
11060
  result.input = positionals[0];
10840
- if (result.input === "-" && result.opsFile === "-") usage12("Document and batch cannot both use stdin.");
10841
- if (result.inPlace && result.input === "-") usage12("Stdin cannot be edited in place.");
10842
- if (result.inPlace && result.output) usage12("Output and in-place cannot be combined.");
10843
- if (result.animationBatch?.length && !result.dryRun && !result.inPlace && !result.output) usage12("Mutation requires a destination.");
10844
- if (result.force && !result.output) usage12("Force requires an explicit output destination.");
10845
- if (result.output === result.input && result.output !== "-") usage12("Replacing input requires --in-place.");
10846
- if (result.output === "-" && result.json && !result.dryRun) usage12("Binary stdout cannot be combined with JSON.");
11061
+ if (result.input === "-" && result.opsFile === "-") usage13("Document and batch cannot both use stdin.");
11062
+ if (result.inPlace && result.input === "-") usage13("Stdin cannot be edited in place.");
11063
+ if (result.inPlace && result.output) usage13("Output and in-place cannot be combined.");
11064
+ if (result.animationBatch?.length && !result.dryRun && !result.inPlace && !result.output) usage13("Mutation requires a destination.");
11065
+ if (result.force && !result.output) usage13("Force requires an explicit output destination.");
11066
+ if (result.output === result.input && result.output !== "-") usage13("Replacing input requires --in-place.");
11067
+ if (result.output === "-" && result.json && !result.dryRun) usage13("Binary stdout cannot be combined with JSON.");
10847
11068
  return result;
10848
11069
  }
10849
11070
  if (Object.hasOwn(animationSchemas, operation)) {
@@ -10859,21 +11080,21 @@ function parse(raw, maximum, output3) {
10859
11080
  ...mutation2 ? ["--all", "--allow-empty", "--output", "--in-place", "--force", "--dry-run"] : [],
10860
11081
  ...editing ? ["--kind", "--trigger", "--duration", "--delay", "--target"] : []
10861
11082
  ];
10862
- if ([...seen].some((flag) => !allowed.includes(flag))) usage12("Option does not apply to animations.");
10863
- if (positionals.length !== 1 || !positionals[0]) usage12("Animations require one input.");
11083
+ if ([...seen].some((flag) => !allowed.includes(flag))) usage13("Option does not apply to animations.");
11084
+ if (positionals.length !== 1 || !positionals[0]) usage13("Animations require one input.");
10864
11085
  result.input = positionals[0];
10865
- if (result.scope !== void 0 && result.scope !== "slides") usage12("Animations require slides scope.");
10866
- if (result.token && ["--scope", "--slide", "--shape"].some((flag) => seen.has(flag))) usage12("Opaque and simple selectors cannot be combined.");
10867
- if (result.shape !== void 0 && result.slide === void 0) usage12("Shape selection requires a slide.");
11086
+ if (result.scope !== void 0 && result.scope !== "slides") usage13("Animations require slides scope.");
11087
+ if (result.token && ["--scope", "--slide", "--shape"].some((flag) => seen.has(flag))) usage13("Opaque and simple selectors cannot be combined.");
11088
+ if (result.shape !== void 0 && result.slide === void 0) usage13("Shape selection requires a slide.");
10868
11089
  if (mutation2) {
10869
11090
  validateAnimationOptions2(operation.slice(11), result.animationEdit ?? {});
10870
- if (operation !== "animations.add" && !result.token && result.slide === void 0 && !result.all) usage12("Animation mutation requires a selector or --all.");
10871
- if (result.inPlace && result.input === "-") usage12("Stdin cannot be edited in place.");
10872
- if (result.inPlace && result.output) usage12("Output and in-place cannot be combined.");
10873
- if (!result.dryRun && !result.inPlace && !result.output) usage12("Mutation requires a destination.");
10874
- if (result.force && !result.output) usage12("Force requires an explicit output destination.");
10875
- if (result.output === result.input && result.output !== "-") usage12("Replacing input requires --in-place.");
10876
- if (result.output === "-" && result.json && !result.dryRun) usage12("Binary stdout cannot be combined with JSON.");
11091
+ if (operation !== "animations.add" && !result.token && result.slide === void 0 && !result.all) usage13("Animation mutation requires a selector or --all.");
11092
+ if (result.inPlace && result.input === "-") usage13("Stdin cannot be edited in place.");
11093
+ if (result.inPlace && result.output) usage13("Output and in-place cannot be combined.");
11094
+ if (!result.dryRun && !result.inPlace && !result.output) usage13("Mutation requires a destination.");
11095
+ if (result.force && !result.output) usage13("Force requires an explicit output destination.");
11096
+ if (result.output === result.input && result.output !== "-") usage13("Replacing input requires --in-place.");
11097
+ if (result.output === "-" && result.json && !result.dryRun) usage13("Binary stdout cannot be combined with JSON.");
10877
11098
  }
10878
11099
  return result;
10879
11100
  }
@@ -10889,20 +11110,20 @@ function parse(raw, maximum, output3) {
10889
11110
  ...mutation2 ? ["--all", "--allow-empty", "--output", "--in-place", "--force", "--dry-run"] : [],
10890
11111
  ...editing ? ["--kind", "--direction", "--duration", "--advance-after", "--advance-on-click"] : []
10891
11112
  ];
10892
- if ([...seen].some((flag) => !allowed.includes(flag))) usage12("Option does not apply to transitions.");
10893
- if (positionals.length !== 1 || !positionals[0]) usage12("Transitions require one input.");
11113
+ if ([...seen].some((flag) => !allowed.includes(flag))) usage13("Option does not apply to transitions.");
11114
+ if (positionals.length !== 1 || !positionals[0]) usage13("Transitions require one input.");
10894
11115
  result.input = positionals[0];
10895
- if (result.scope !== void 0 && result.scope !== "slides") usage12("Transitions require slides scope.");
10896
- if (result.token && ["--scope", "--slide"].some((flag) => seen.has(flag))) usage12("Opaque and simple selectors cannot be combined.");
11116
+ if (result.scope !== void 0 && result.scope !== "slides") usage13("Transitions require slides scope.");
11117
+ if (result.token && ["--scope", "--slide"].some((flag) => seen.has(flag))) usage13("Opaque and simple selectors cannot be combined.");
10897
11118
  if (mutation2) {
10898
11119
  validateTransitionOptions(operation.slice(12), { ...result.transitionEdit, selection: {} });
10899
- if (!result.token && result.slide === void 0 && !result.all) usage12("Transition mutation requires a selector or --all.");
10900
- if (result.inPlace && result.input === "-") usage12("Stdin cannot be edited in place.");
10901
- if (result.inPlace && result.output) usage12("Output and in-place cannot be combined.");
10902
- if (!result.dryRun && !result.inPlace && !result.output) usage12("Mutation requires a destination.");
10903
- if (result.force && !result.output) usage12("Force requires an explicit output destination.");
10904
- if (result.output === result.input && result.output !== "-") usage12("Replacing input requires --in-place.");
10905
- if (result.output === "-" && result.json && !result.dryRun) usage12("Binary stdout cannot be combined with JSON.");
11120
+ if (!result.token && result.slide === void 0 && !result.all) usage13("Transition mutation requires a selector or --all.");
11121
+ if (result.inPlace && result.input === "-") usage13("Stdin cannot be edited in place.");
11122
+ if (result.inPlace && result.output) usage13("Output and in-place cannot be combined.");
11123
+ if (!result.dryRun && !result.inPlace && !result.output) usage13("Mutation requires a destination.");
11124
+ if (result.force && !result.output) usage13("Force requires an explicit output destination.");
11125
+ if (result.output === result.input && result.output !== "-") usage13("Replacing input requires --in-place.");
11126
+ if (result.output === "-" && result.json && !result.dryRun) usage13("Binary stdout cannot be combined with JSON.");
10906
11127
  }
10907
11128
  return result;
10908
11129
  }
@@ -10943,18 +11164,18 @@ function parse(raw, maximum, output3) {
10943
11164
  if (formatting && [...seen].some(
10944
11165
  (flag) => ["--style-json", "--find", "--with", "--first", "--occurrence"].includes(flag)
10945
11166
  ))
10946
- usage12("Match options do not apply to runs.");
11167
+ usage13("Match options do not apply to runs.");
10947
11168
  if ([...seen].some((flag) => !allowed.includes(flag)))
10948
- usage12("Option does not apply to this text operation.");
10949
- if (positionals.length !== 1 || !positionals[0]) usage12("Text operation requires one input.");
11169
+ usage13("Option does not apply to this text operation.");
11170
+ if (positionals.length !== 1 || !positionals[0]) usage13("Text operation requires one input.");
10950
11171
  if (result.scope === "presentation" || result.scope === "shared")
10951
- usage12("Text operation requires a text-bearing scope.");
11172
+ usage13("Text operation requires a text-bearing scope.");
10952
11173
  if (result.token && ["--scope", "--slide", "--shape", "--paragraph", "--run"].some((flag) => seen.has(flag)))
10953
- usage12("Opaque and simple selectors cannot be combined.");
11174
+ usage13("Opaque and simple selectors cannot be combined.");
10954
11175
  if (result.slide !== void 0 && (result.scope === "notes-master" || result.scope === "handout-master"))
10955
- usage12("Deck-level text master scopes do not accept slide selection.");
11176
+ usage13("Deck-level text master scopes do not accept slide selection.");
10956
11177
  if (result.shape && result.slide === void 0)
10957
- usage12("Shape selection requires an owning slide.");
11178
+ usage13("Shape selection requires an owning slide.");
10958
11179
  result.input = positionals[0];
10959
11180
  if (mutation2) {
10960
11181
  if (fields2)
@@ -10963,7 +11184,7 @@ function parse(raw, maximum, output3) {
10963
11184
  operation.slice(7)
10964
11185
  );
10965
11186
  if (fitting) {
10966
- if (!result.fitEdit?.metrics) usage12("Text fit requires --metrics JSON.");
11187
+ if (!result.fitEdit?.metrics) usage13("Text fit requires --metrics JSON.");
10967
11188
  validateTextFitOptions(result.fitEdit);
10968
11189
  }
10969
11190
  if (frames)
@@ -10977,20 +11198,20 @@ function parse(raw, maximum, output3) {
10977
11198
  if (formatting && !result.all && result.token === void 0 && result.slide === void 0 && result.shape === void 0 && result.paragraphEdit?.paragraph === void 0 && result.runEdit?.paragraph === void 0 && result.runEdit?.run === void 0)
10978
11199
  throw new SelectionError8("missing-selection");
10979
11200
  if (!formatting && (result.find === void 0 || result.with === void 0))
10980
- usage12("Text replace requires find and with.");
11201
+ usage13("Text replace requires find and with.");
10981
11202
  if (!formatting && [result.first === true, result.all === true, result.occurrence !== void 0].filter(
10982
11203
  Boolean
10983
11204
  ).length !== 1)
10984
- usage12("Text replace requires exactly one of first, all or occurrence.");
10985
- if (result.inPlace && result.input === "-") usage12("Stdin cannot be edited in place.");
10986
- if (result.inPlace && result.output) usage12("Output and in-place cannot be combined.");
11205
+ usage13("Text replace requires exactly one of first, all or occurrence.");
11206
+ if (result.inPlace && result.input === "-") usage13("Stdin cannot be edited in place.");
11207
+ if (result.inPlace && result.output) usage13("Output and in-place cannot be combined.");
10987
11208
  if (!result.dryRun && !result.inPlace && !result.output)
10988
- usage12("Mutation requires a destination.");
10989
- if (result.force && !result.output) usage12("Force requires an explicit output destination.");
11209
+ usage13("Mutation requires a destination.");
11210
+ if (result.force && !result.output) usage13("Force requires an explicit output destination.");
10990
11211
  if (result.output === result.input && result.output !== "-")
10991
- usage12("Replacing input requires --in-place.");
11212
+ usage13("Replacing input requires --in-place.");
10992
11213
  if (result.output === "-" && result.json && !result.dryRun)
10993
- usage12("Binary stdout cannot be combined with JSON.");
11214
+ usage13("Binary stdout cannot be combined with JSON.");
10994
11215
  }
10995
11216
  return result;
10996
11217
  }
@@ -11010,11 +11231,11 @@ function parse(raw, maximum, output3) {
11010
11231
  (key) => "--" + [...key].map((c) => c >= "A" && c <= "Z" ? "-" + c.toLowerCase() : c).join("")
11011
11232
  );
11012
11233
  if ([...seen].some((flag) => !flags.includes(flag)))
11013
- usage12("Option does not apply to this shape operation.");
11014
- if (positionals.length !== 1 || !positionals[0]) usage12("Shape operations require one input.");
11234
+ usage13("Option does not apply to this shape operation.");
11235
+ if (positionals.length !== 1 || !positionals[0]) usage13("Shape operations require one input.");
11015
11236
  result.input = positionals[0];
11016
11237
  if (result.token && (result.slide !== void 0 || result.part || result.shape || result.all))
11017
- usage12("Opaque and simple selectors cannot be combined.");
11238
+ usage13("Opaque and simple selectors cannot be combined.");
11018
11239
  if (operation.startsWith("tables."))
11019
11240
  validateTableSelection(
11020
11241
  {
@@ -11032,28 +11253,28 @@ function parse(raw, maximum, output3) {
11032
11253
  if (operation.startsWith("tables.")) {
11033
11254
  if (operation === "tables.merge") {
11034
11255
  if (!result.tableFrom || !result.tableTo)
11035
- usage12("Merge requires from and to coordinates.");
11256
+ usage13("Merge requires from and to coordinates.");
11036
11257
  result.tableStructure = {
11037
11258
  kind: "merge",
11038
11259
  from: tableCell(result.tableFrom),
11039
11260
  to: tableCell(result.tableTo)
11040
11261
  };
11041
11262
  } else if (operation === "tables.split") {
11042
- if (!result.cell) usage12("Split requires one merge origin cell.");
11263
+ if (!result.cell) usage13("Split requires one merge origin cell.");
11043
11264
  result.tableStructure = { kind: "split", cell: tableCell(result.cell) };
11044
11265
  } else if (operation.startsWith("tables.rows.") || operation.startsWith("tables.columns.")) {
11045
11266
  const adding = operation.endsWith(".add");
11046
11267
  if (!result.tablePosition || !(adding ? ["expand", "reject"] : ["shrink", "reject"]).includes(
11047
11268
  result.tableSpanPolicy
11048
11269
  ))
11049
- usage12("A position and explicit span policy are required.");
11270
+ usage13("A position and explicit span policy are required.");
11050
11271
  result.tableStructure = {
11051
11272
  kind: operation.slice(7).split(".").join("-"),
11052
11273
  position: result.tablePosition - 1,
11053
11274
  spanPolicy: result.tableSpanPolicy
11054
11275
  };
11055
11276
  } else {
11056
- if (!result.tableEdit) usage12("A table edit is required.");
11277
+ if (!result.tableEdit) usage13("A table edit is required.");
11057
11278
  validateTableUpdate(
11058
11279
  {
11059
11280
  ...result.tableEdit,
@@ -11064,14 +11285,14 @@ function parse(raw, maximum, output3) {
11064
11285
  }
11065
11286
  } else if (operation === "shapes.remove") {
11066
11287
  if (result.connectorEdit?.detachPolicy !== void 0 && !["detach", "remove"].includes(result.connectorEdit.detachPolicy))
11067
- usage12("Invalid detach policy.");
11288
+ usage13("Invalid detach policy.");
11068
11289
  } else if (connector) {
11069
11290
  if (operation !== "connectors.remove")
11070
11291
  validateConnectorOptions(result.connectorEdit ?? {}, operation === "connectors.add");
11071
11292
  } else if (operation === "shapes.effects.set" || operation === "shapes.drawing.set") {
11072
11293
  if (operation === "shapes.effects.set") {
11073
11294
  if (result.shadowEnabled === void 0 || result.shadowOpacity === void 0 || result.shadowBlur === void 0 || result.shadowColor === void 0)
11074
- usage12("Shadow requires explicit shadow, opacity, blur and color.");
11295
+ usage13("Shadow requires explicit shadow, opacity, blur and color.");
11075
11296
  result.drawingEdit = {
11076
11297
  shadow: result.shadowEnabled ? {
11077
11298
  blur: result.shadowBlur,
@@ -11082,7 +11303,7 @@ function parse(raw, maximum, output3) {
11082
11303
  }
11083
11304
  if (result.drawingFill) {
11084
11305
  if (result.drawingEdit?.fill !== void 0)
11085
- usage12("Structured fill and simple fill flags cannot be mixed.");
11306
+ usage13("Structured fill and simple fill flags cannot be mixed.");
11086
11307
  result.drawingEdit = {
11087
11308
  ...result.drawingEdit,
11088
11309
  fill: result.drawingFill
@@ -11090,9 +11311,9 @@ function parse(raw, maximum, output3) {
11090
11311
  }
11091
11312
  if (result.file !== void 0) {
11092
11313
  if (result.input === "-" && result.file === "-")
11093
- usage12("Document and image cannot both use stdin.");
11314
+ usage13("Document and image cannot both use stdin.");
11094
11315
  if (result.drawingEdit?.fill?.kind !== "picture" || result.drawingEdit.fill.relationshipId !== void 0)
11095
- usage12("File requires picture fill without a relationship ID.");
11316
+ usage13("File requires picture fill without a relationship ID.");
11096
11317
  }
11097
11318
  validateDrawingUpdate(
11098
11319
  result.file !== void 0 && result.drawingEdit?.fill?.kind === "picture" ? {
@@ -11102,7 +11323,7 @@ function parse(raw, maximum, output3) {
11102
11323
  );
11103
11324
  } else if (selectionMutation) {
11104
11325
  if (result.shapes && (result.slide !== void 0 || result.part || result.shape || result.token || result.all || result.allowEmpty))
11105
- usage12("Location arrays and simple or opaque selectors cannot be combined.");
11326
+ usage13("Location arrays and simple or opaque selectors cannot be combined.");
11106
11327
  result.selectionEdit = {
11107
11328
  ...result.selectionEdit,
11108
11329
  action: operation.slice(7),
@@ -11117,9 +11338,9 @@ function parse(raw, maximum, output3) {
11117
11338
  };
11118
11339
  validateShapeSelectionOptions(result.selectionEdit);
11119
11340
  } else if (grouping) {
11120
- if (result.tolerance === void 0) usage12("Grouping requires explicit tolerance.");
11341
+ if (result.tolerance === void 0) usage13("Grouping requires explicit tolerance.");
11121
11342
  if (operation === "shapes.group" && result.shapes === void 0)
11122
- usage12("Grouping requires shape locations.");
11343
+ usage13("Grouping requires shape locations.");
11123
11344
  validateGroupOptions(
11124
11345
  {
11125
11346
  tolerance: result.tolerance,
@@ -11136,30 +11357,30 @@ function parse(raw, maximum, output3) {
11136
11357
  );
11137
11358
  } else if (operation.startsWith("shapes.paths.")) {
11138
11359
  if (result.path !== void 0 && (result.vertices !== void 0 || result.close !== void 0))
11139
- usage12("Path and vertices/close cannot be combined.");
11360
+ usage13("Path and vertices/close cannot be combined.");
11140
11361
  if (result.vertices !== void 0) {
11141
- if (result.close === void 0) usage12("Vertices require explicit --close true|false.");
11362
+ if (result.close === void 0) usage13("Vertices require explicit --close true|false.");
11142
11363
  if (!Array.isArray(result.vertices) || result.vertices.some((vertex) => Array.isArray(vertex)))
11143
- usage12("Vertices require objects with x and y coordinates.");
11364
+ usage13("Vertices require objects with x and y coordinates.");
11144
11365
  result.path = pathFromVertices(result.vertices, result.close);
11145
11366
  }
11146
- if (result.path === void 0) usage12("Path mutation requires --path or --vertices.");
11367
+ if (result.path === void 0) usage13("Path mutation requires --path or --vertices.");
11147
11368
  validateShapePath(result.path);
11148
11369
  if (operation.endsWith(".add"))
11149
11370
  validateShapeOptions({ ...result.shapeEdit, kind: "text-box" }, true);
11150
11371
  } else {
11151
- if (!result.shapeEdit) usage12("Shape mutation requires update fields.");
11372
+ if (!result.shapeEdit) usage13("Shape mutation requires update fields.");
11152
11373
  validateShapeOptions(result.shapeEdit, operation === "shapes.add");
11153
11374
  }
11154
- if (result.inPlace && result.input === "-") usage12("Stdin cannot be edited in place.");
11155
- if (result.inPlace && result.output) usage12("Output and in-place cannot be combined.");
11375
+ if (result.inPlace && result.input === "-") usage13("Stdin cannot be edited in place.");
11376
+ if (result.inPlace && result.output) usage13("Output and in-place cannot be combined.");
11156
11377
  if (!result.dryRun && !result.inPlace && !result.output)
11157
- usage12("Mutation requires a destination.");
11158
- if (result.force && !result.output) usage12("Force requires an explicit output destination.");
11378
+ usage13("Mutation requires a destination.");
11379
+ if (result.force && !result.output) usage13("Force requires an explicit output destination.");
11159
11380
  if (result.output === result.input && result.output !== "-")
11160
- usage12("Replacing input requires --in-place.");
11381
+ usage13("Replacing input requires --in-place.");
11161
11382
  if (result.output === "-" && result.json && !result.dryRun)
11162
- usage12("Binary stdout cannot be combined with JSON.");
11383
+ usage13("Binary stdout cannot be combined with JSON.");
11163
11384
  }
11164
11385
  return result;
11165
11386
  }
@@ -11174,53 +11395,53 @@ function parse(raw, maximum, output3) {
11174
11395
  (key) => key === "placeholders" ? "--placeholders-json" : "--" + [...key].map((char) => char >= "A" && char <= "Z" ? "-" + char.toLowerCase() : char).join("")
11175
11396
  );
11176
11397
  if ([...seen].some((flag) => !flags.includes(flag)))
11177
- usage12("Option does not apply to this shared-content operation.");
11398
+ usage13("Option does not apply to this shared-content operation.");
11178
11399
  if (positionals.length !== 1 || !positionals[0])
11179
- usage12("Shared-content operations require one input.");
11400
+ usage13("Shared-content operations require one input.");
11180
11401
  result.input = positionals[0];
11181
11402
  if (mutation2 && !applying && !background && result.scope === void 0)
11182
- usage12("Shared-content mutation requires explicit scope.");
11403
+ usage13("Shared-content mutation requires explicit scope.");
11183
11404
  if (result.scope !== void 0 && !(theme ? ["shared"] : background ? ["slides", "layouts", "masters", "shared"] : applying ? ["slides"] : layout ? ["layouts", "shared"] : ["masters", "shared"]).includes(result.scope))
11184
- usage12("Scope does not match this shared-content operation.");
11405
+ usage13("Scope does not match this shared-content operation.");
11185
11406
  if (applying && result.token && result.scope !== void 0)
11186
- usage12("Opaque selectors cannot be combined with scope.");
11407
+ usage13("Opaque selectors cannot be combined with scope.");
11187
11408
  if (result.token && (result.part || result.slide !== void 0 || result.shape || result.all))
11188
- usage12("Opaque and simple selectors cannot be combined.");
11409
+ usage13("Opaque and simple selectors cannot be combined.");
11189
11410
  if (result.part && result.slide !== void 0)
11190
- usage12("Part and slide selectors cannot be combined.");
11411
+ usage13("Part and slide selectors cannot be combined.");
11191
11412
  const edit = result.masterEdit;
11192
- if (operation === "masters.add" && !edit?.name) usage12("Master creation requires a name.");
11413
+ if (operation === "masters.add" && !edit?.name) usage13("Master creation requires a name.");
11193
11414
  if (operation === "masters.set" && edit?.name === void 0 && edit?.text === void 0)
11194
- usage12("Master set requires name or text.");
11415
+ usage13("Master set requires name or text.");
11195
11416
  if (operation === "masters.set" && edit?.text !== void 0 && !result.shape && !result.token)
11196
- usage12("Master text edits require a selected text shape.");
11417
+ usage13("Master text edits require a selected text shape.");
11197
11418
  if (operation === "layouts.add" && (!edit?.name || !edit.master))
11198
- usage12("Layout creation requires name and master.");
11419
+ usage13("Layout creation requires name and master.");
11199
11420
  if (operation === "layouts.set" && !edit && !result.layoutEdit)
11200
- usage12("Layout set requires update fields.");
11421
+ usage13("Layout set requires update fields.");
11201
11422
  if (operation === "layouts.set" && edit?.text !== void 0 && !result.shape && !result.token)
11202
- usage12("Layout text requires a selected shape.");
11423
+ usage13("Layout text requires a selected shape.");
11203
11424
  if (layout && mutation2 && operation !== "layouts.add" && !result.part && !result.token && result.slide === void 0 && !result.all)
11204
- usage12("Layout mutation requires an explicit selector.");
11425
+ usage13("Layout mutation requires an explicit selector.");
11205
11426
  if (applying && (!result.layoutEdit?.layout || !["type-index", "reject-unmatched"].includes(result.layoutEdit.placeholderPolicy)))
11206
- usage12("Layout application requires layout and placeholder policy.");
11427
+ usage13("Layout application requires layout and placeholder policy.");
11207
11428
  if (operation === "shapes.add" && (edit?.kind !== "text-box" || [edit.x, edit.y, edit.width, edit.height].some((value) => value === void 0)))
11208
- usage12("Master shape creation requires text-box kind and explicit geometry.");
11429
+ usage13("Master shape creation requires text-box kind and explicit geometry.");
11209
11430
  if (operation === "shapes.set" && (!edit || !result.shape && !result.token))
11210
- usage12("Shape edits require update fields and a selected shape.");
11431
+ usage13("Shape edits require update fields and a selected shape.");
11211
11432
  if (operation === "themes.set" && (!result.themeEdit || result.themeEdit.colorSlot === void 0 !== (result.themeEdit.color === void 0) || result.themeEdit.fontSlot === void 0 !== (result.themeEdit.font === void 0)))
11212
- usage12("Theme set requires paired palette or font values, or a name.");
11433
+ usage13("Theme set requires paired palette or font values, or a name.");
11213
11434
  if (result.themeEdit?.colorSlot !== void 0 && !themeColorSlots.includes(result.themeEdit.colorSlot))
11214
- usage12("Unknown theme color slot.");
11435
+ usage13("Unknown theme color slot.");
11215
11436
  if (result.themeEdit?.fontSlot !== void 0 && !themeFontSlots.includes(result.themeEdit.fontSlot))
11216
- usage12("Unknown theme font slot.");
11437
+ usage13("Unknown theme font slot.");
11217
11438
  if (background && result.scope === "shared" && !result.part && !result.token)
11218
- usage12("Shared background scope requires an exact part or selector.");
11439
+ usage13("Shared background scope requires an exact part or selector.");
11219
11440
  if (operation === "backgrounds.set") {
11220
11441
  if (!result.part && !result.token && result.slide === void 0 && !result.all)
11221
- usage12("Background mutation requires a selector or all.");
11442
+ usage13("Background mutation requires a selector or all.");
11222
11443
  if (result.file === "-" && result.input === "-")
11223
- usage12("Presentation and image cannot both read stdin.");
11444
+ usage13("Presentation and image cannot both read stdin.");
11224
11445
  const edit2 = result.backgroundEdit;
11225
11446
  const required = {
11226
11447
  solid: ["color"],
@@ -11229,24 +11450,24 @@ function parse(raw, maximum, output3) {
11229
11450
  inherit: [],
11230
11451
  "style-reference": ["styleIndex", "styleColor"]
11231
11452
  };
11232
- if (!edit2?.kind || !Object.hasOwn(required, edit2.kind)) usage12("Background kind is required.");
11453
+ if (!edit2?.kind || !Object.hasOwn(required, edit2.kind)) usage13("Background kind is required.");
11233
11454
  const fields2 = { ...edit2, ...result.file === void 0 ? {} : { file: result.file } };
11234
11455
  const keys = required[edit2.kind];
11235
11456
  if (keys.some((key) => !Object.hasOwn(fields2, key)) || Object.keys(fields2).some(
11236
11457
  (key) => key !== "kind" && !keys.includes(key) && !(edit2.kind === "gradient" && key === "angle")
11237
11458
  ))
11238
- usage12("Background payload does not match its kind.");
11459
+ usage13("Background payload does not match its kind.");
11239
11460
  }
11240
11461
  if (mutation2) {
11241
- if (result.inPlace && result.input === "-") usage12("Stdin cannot be edited in place.");
11242
- if (result.inPlace && result.output) usage12("Output and in-place cannot be combined.");
11462
+ if (result.inPlace && result.input === "-") usage13("Stdin cannot be edited in place.");
11463
+ if (result.inPlace && result.output) usage13("Output and in-place cannot be combined.");
11243
11464
  if (!result.dryRun && !result.inPlace && !result.output)
11244
- usage12("Mutation requires a destination.");
11245
- if (result.force && !result.output) usage12("Force requires an explicit output destination.");
11465
+ usage13("Mutation requires a destination.");
11466
+ if (result.force && !result.output) usage13("Force requires an explicit output destination.");
11246
11467
  if (result.output === result.input && result.output !== "-")
11247
- usage12("Replacing input requires --in-place.");
11468
+ usage13("Replacing input requires --in-place.");
11248
11469
  if (result.output === "-" && result.json && !result.dryRun)
11249
- usage12("Binary stdout cannot be combined with JSON.");
11470
+ usage13("Binary stdout cannot be combined with JSON.");
11250
11471
  }
11251
11472
  return result;
11252
11473
  }
@@ -11273,20 +11494,20 @@ function parse(raw, maximum, output3) {
11273
11494
  ] : []
11274
11495
  ];
11275
11496
  if ([...seen].some((flag) => !allowed.includes(flag)))
11276
- usage12("Option does not apply to this settings operation.");
11277
- if (positionals.length !== 1 || !positionals[0]) usage12("Settings require one input.");
11497
+ usage13("Option does not apply to this settings operation.");
11498
+ if (positionals.length !== 1 || !positionals[0]) usage13("Settings require one input.");
11278
11499
  result.input = positionals[0];
11279
11500
  if (mutation2) {
11280
- if (!result.settings) usage12("Settings set requires update fields.");
11281
- if (result.inPlace && result.input === "-") usage12("Stdin cannot be edited in place.");
11282
- if (result.inPlace && result.output) usage12("Output and in-place cannot be combined.");
11501
+ if (!result.settings) usage13("Settings set requires update fields.");
11502
+ if (result.inPlace && result.input === "-") usage13("Stdin cannot be edited in place.");
11503
+ if (result.inPlace && result.output) usage13("Output and in-place cannot be combined.");
11283
11504
  if (!result.dryRun && !result.inPlace && !result.output)
11284
- usage12("Mutation requires a destination.");
11285
- if (result.force && !result.output) usage12("Force requires an explicit output destination.");
11505
+ usage13("Mutation requires a destination.");
11506
+ if (result.force && !result.output) usage13("Force requires an explicit output destination.");
11286
11507
  if (result.output === result.input && result.output !== "-")
11287
- usage12("Replacing input requires --in-place.");
11508
+ usage13("Replacing input requires --in-place.");
11288
11509
  if (result.output === "-" && result.json && !result.dryRun)
11289
- usage12("Binary stdout cannot be combined with JSON.");
11510
+ usage13("Binary stdout cannot be combined with JSON.");
11290
11511
  }
11291
11512
  return result;
11292
11513
  }
@@ -11303,32 +11524,32 @@ function parse(raw, maximum, output3) {
11303
11524
  ...["add", "set"].includes(action) ? ["--name", "--slides", "--position"] : []
11304
11525
  ];
11305
11526
  if ([...seen].some((flag) => !allowed.includes(flag)))
11306
- usage12("Option does not apply to this membership operation.");
11527
+ usage13("Option does not apply to this membership operation.");
11307
11528
  if (positionals.length !== 1 || !positionals[0])
11308
- usage12("Membership operations require one input.");
11529
+ usage13("Membership operations require one input.");
11309
11530
  result.input = positionals[0];
11310
11531
  if (result.scope !== void 0 && result.scope !== "presentation")
11311
- usage12("Membership operations require presentation scope.");
11532
+ usage13("Membership operations require presentation scope.");
11312
11533
  if (result.token && ["--slide", "--scope", "--all"].some((flag) => seen.has(flag)))
11313
- usage12("Opaque and simple selectors cannot be combined.");
11534
+ usage13("Opaque and simple selectors cannot be combined.");
11314
11535
  if (action === "add" && (result.membership?.name === void 0 || !result.membership.slides))
11315
- usage12("Membership creation requires name and slides.");
11316
- if (action === "set" && !result.membership) usage12("Membership set requires update fields.");
11536
+ usage13("Membership creation requires name and slides.");
11537
+ if (action === "set" && !result.membership) usage13("Membership set requires update fields.");
11317
11538
  if (mutation2) {
11318
- if (result.inPlace && result.input === "-") usage12("Stdin cannot be edited in place.");
11319
- if (result.inPlace && result.output) usage12("Output and in-place cannot be combined.");
11539
+ if (result.inPlace && result.input === "-") usage13("Stdin cannot be edited in place.");
11540
+ if (result.inPlace && result.output) usage13("Output and in-place cannot be combined.");
11320
11541
  if (!result.dryRun && !result.inPlace && !result.output)
11321
- usage12("Mutation requires a destination.");
11322
- if (result.force && !result.output) usage12("Force requires an explicit output destination.");
11542
+ usage13("Mutation requires a destination.");
11543
+ if (result.force && !result.output) usage13("Force requires an explicit output destination.");
11323
11544
  if (result.output === result.input && result.output !== "-")
11324
- usage12("Replacing input requires --in-place.");
11545
+ usage13("Replacing input requires --in-place.");
11325
11546
  if (result.output === "-" && result.json && !result.dryRun)
11326
- usage12("Binary stdout cannot be combined with JSON.");
11547
+ usage13("Binary stdout cannot be combined with JSON.");
11327
11548
  }
11328
11549
  return result;
11329
11550
  }
11330
11551
  if (result.allowEmpty && !slideMutation)
11331
- usage12("Allow-empty requires a supported slide mutation.");
11552
+ usage13("Allow-empty requires a supported slide mutation.");
11332
11553
  if (operation === "slides.merge" || operation === "slides.split") {
11333
11554
  const allowed = [
11334
11555
  "--json",
@@ -11345,36 +11566,36 @@ function parse(raw, maximum, output3) {
11345
11566
  ] : ["--slides", "--output-dir", "--allow-partial-output"]
11346
11567
  ];
11347
11568
  if ([...seen].some((option) => !allowed.includes(option)))
11348
- usage12("Option does not apply to this assembly operation.");
11569
+ usage13("Option does not apply to this assembly operation.");
11349
11570
  if (positionals.length !== 1 || !positionals[0])
11350
- usage12("Assembly requires one destination or source input.");
11571
+ usage13("Assembly requires one destination or source input.");
11351
11572
  result.input = positionals[0];
11352
11573
  if (operation === "slides.split") {
11353
- if (!result.splitSlides) usage12("Split requires --slides.");
11354
- if (!result.outputDir && !result.dryRun) usage12("Split requires --output-dir.");
11355
- if (result.outputDir === "-") usage12("Output directories cannot be stdout.");
11356
- if (result.force && !result.outputDir) usage12("Force requires an output directory.");
11574
+ if (!result.splitSlides) usage13("Split requires --slides.");
11575
+ if (!result.outputDir && !result.dryRun) usage13("Split requires --output-dir.");
11576
+ if (result.outputDir === "-") usage13("Output directories cannot be stdout.");
11577
+ if (result.force && !result.outputDir) usage13("Force requires an output directory.");
11357
11578
  } else {
11358
11579
  if (!result.sources || !result.importing?.themePolicy)
11359
- usage12("Merge requires sources and an explicit theme policy.");
11580
+ usage13("Merge requires sources and an explicit theme policy.");
11360
11581
  if ([result.input, ...result.sources].filter((path) => path === "-").length > 1)
11361
- usage12("Only one input may consume stdin.");
11362
- if (result.inPlace && result.input === "-") usage12("Stdin cannot be edited in place.");
11363
- if (result.inPlace && result.output) usage12("Output and in-place cannot be combined.");
11582
+ usage13("Only one input may consume stdin.");
11583
+ if (result.inPlace && result.input === "-") usage13("Stdin cannot be edited in place.");
11584
+ if (result.inPlace && result.output) usage13("Output and in-place cannot be combined.");
11364
11585
  if (!result.dryRun && !result.inPlace && !result.output)
11365
- usage12("Merge requires a destination.");
11366
- if (result.force && !result.output) usage12("Force requires an explicit output destination.");
11586
+ usage13("Merge requires a destination.");
11587
+ if (result.force && !result.output) usage13("Force requires an explicit output destination.");
11367
11588
  if (result.output === result.input && result.output !== "-")
11368
- usage12("Replacing input requires --in-place.");
11589
+ usage13("Replacing input requires --in-place.");
11369
11590
  if (result.sources.includes(result.inPlace ? result.input : result.output ?? "") && (result.inPlace || result.output !== "-"))
11370
- usage12("Merge output cannot replace a source.");
11591
+ usage13("Merge output cannot replace a source.");
11371
11592
  if (result.output === "-" && result.json && !result.dryRun)
11372
- usage12("Binary stdout cannot be combined with JSON.");
11593
+ usage13("Binary stdout cannot be combined with JSON.");
11373
11594
  }
11374
11595
  return result;
11375
11596
  }
11376
11597
  if (operation === "create") {
11377
- if (positionals.length) usage12("Creation takes no input positional arguments.");
11598
+ if (positionals.length) usage13("Creation takes no input positional arguments.");
11378
11599
  const allowed = [
11379
11600
  "--width",
11380
11601
  "--height",
@@ -11392,11 +11613,11 @@ function parse(raw, maximum, output3) {
11392
11613
  "--dry-run"
11393
11614
  ];
11394
11615
  if ([...seen].some((option) => !allowed.includes(option)))
11395
- usage12("Option does not apply to creation.");
11396
- if (!result.output && !result.dryRun) usage12("Creation requires an output destination.");
11397
- if (result.force && !result.output) usage12("Force requires an explicit output destination.");
11616
+ usage13("Option does not apply to creation.");
11617
+ if (!result.output && !result.dryRun) usage13("Creation requires an output destination.");
11618
+ if (result.force && !result.output) usage13("Force requires an explicit output destination.");
11398
11619
  if (result.output === "-" && result.json && !result.dryRun)
11399
- usage12("Binary stdout cannot be combined with JSON.");
11620
+ usage13("Binary stdout cannot be combined with JSON.");
11400
11621
  return result;
11401
11622
  }
11402
11623
  if (operation === "slides.import") {
@@ -11414,14 +11635,14 @@ function parse(raw, maximum, output3) {
11414
11635
  "--dry-run"
11415
11636
  ];
11416
11637
  if ([...seen].some((option) => !allowed.includes(option)))
11417
- usage12("Option does not apply to slide import.");
11638
+ usage13("Option does not apply to slide import.");
11418
11639
  if (!result.source || !result.importing?.sourceSlides)
11419
- usage12("Import requires source and source slides.");
11420
- if (positionals[0] === "-" && result.source === "-") usage12("Only one input may consume stdin.");
11640
+ usage13("Import requires source and source slides.");
11641
+ if (positionals[0] === "-" && result.source === "-") usage13("Only one input may consume stdin.");
11421
11642
  if (result.output === result.source && result.output !== "-")
11422
- usage12("Import output cannot replace its source.");
11643
+ usage13("Import output cannot replace its source.");
11423
11644
  if (result.inPlace && positionals[0] === result.source)
11424
- usage12("Import in-place destination must differ from source.");
11645
+ usage13("Import in-place destination must differ from source.");
11425
11646
  } else if (operation === "slides.add") {
11426
11647
  const allowed = [
11427
11648
  "--layout",
@@ -11440,11 +11661,11 @@ function parse(raw, maximum, output3) {
11440
11661
  "--dry-run"
11441
11662
  ];
11442
11663
  if ([...seen].some((option) => !allowed.includes(option)))
11443
- usage12("Option does not apply to slide addition.");
11664
+ usage13("Option does not apply to slide addition.");
11444
11665
  if (positionals.length !== 1 || !positionals[0])
11445
- usage12("Slide addition requires exactly one input.");
11666
+ usage13("Slide addition requires exactly one input.");
11446
11667
  result.input = positionals[0];
11447
- if (!result.addition?.layout) usage12("Slide addition requires --layout.");
11668
+ if (!result.addition?.layout) usage13("Slide addition requires --layout.");
11448
11669
  } else if (slideMutation) {
11449
11670
  const allowed = [
11450
11671
  "--selection-json",
@@ -11464,29 +11685,29 @@ function parse(raw, maximum, output3) {
11464
11685
  ...operation === "slides.set" ? ["--name", "--hidden"] : []
11465
11686
  ];
11466
11687
  if ([...seen].some((option) => !allowed.includes(option)))
11467
- usage12("Option does not apply to this slide mutation.");
11688
+ usage13("Option does not apply to this slide mutation.");
11468
11689
  if (seen.has("--selection-json") && ["--slide", "--select", "--scope", "--all"].some((flag) => seen.has(flag)))
11469
- usage12("Structured and simple selectors cannot be combined.");
11690
+ usage13("Structured and simple selectors cannot be combined.");
11470
11691
  if (!seen.has("--selection-json") && result.slide === void 0 && !result.token && !result.all)
11471
- usage12("Slide mutation requires a selector or --all.");
11692
+ usage13("Slide mutation requires a selector or --all.");
11472
11693
  if (operation !== "slides.remove" && (!result.mutation || (operation === "slides.move" || operation === "slides.duplicate") && result.mutation.position === void 0))
11473
- usage12("Slide mutation requires update fields; move/duplicate require --position.");
11694
+ usage13("Slide mutation requires update fields; move/duplicate require --position.");
11474
11695
  if (result.scope !== void 0 && result.scope !== "slides")
11475
- usage12("Slide mutations require slides scope.");
11696
+ usage13("Slide mutations require slides scope.");
11476
11697
  } else if (operation === "validate") {
11477
11698
  if ([...seen].some((flag) => flag !== "--json" && flag !== "--limit"))
11478
- usage12("Option does not apply to validation.");
11699
+ usage13("Option does not apply to validation.");
11479
11700
  if (result.limits && ["maxOutputs", "maxOutputBytes"].some((name) => Object.hasOwn(result.limits, name)))
11480
- usage12("Output limits do not apply to validation.");
11481
- if (positionals.length !== 1 || !positionals[0]) usage12("Validation requires exactly one nonempty input.");
11701
+ usage13("Output limits do not apply to validation.");
11702
+ if (positionals.length !== 1 || !positionals[0]) usage13("Validation requires exactly one nonempty input.");
11482
11703
  result.input = positionals[0];
11483
11704
  return result;
11484
11705
  } else if (operation !== "inspect" && !xml) {
11485
11706
  if ([...seen].some((option) => option !== "--json" && !(operation === "capabilities" && option === "--limit")))
11486
- usage12("Selection options require inspect.");
11707
+ usage13("Selection options require inspect.");
11487
11708
  if (operation === "capabilities") {
11488
- if (result.limits && Object.hasOwn(result.limits, "maxOutputs")) usage12("Output-count limits do not apply to capabilities.");
11489
- if (positionals.length > 1 || positionals[0] === "") usage12("Capabilities accepts at most one nonempty input.");
11709
+ if (result.limits && Object.hasOwn(result.limits, "maxOutputs")) usage13("Output-count limits do not apply to capabilities.");
11710
+ if (positionals.length > 1 || positionals[0] === "") usage13("Capabilities accepts at most one nonempty input.");
11490
11711
  if (positionals[0] !== void 0) result.input = positionals[0];
11491
11712
  return result;
11492
11713
  }
@@ -11547,43 +11768,43 @@ function parse(raw, maximum, output3) {
11547
11768
  result.schemaPath = positionals.join(".");
11548
11769
  return result;
11549
11770
  }
11550
- if (positionals.length) usage12("Unexpected input.");
11771
+ if (positionals.length) usage13("Unexpected input.");
11551
11772
  return result;
11552
11773
  }
11553
- if (positionals.length !== 1) usage12("Inspection requires exactly one input.");
11774
+ if (positionals.length !== 1) usage13("Inspection requires exactly one input.");
11554
11775
  result.input = positionals[0];
11555
- if (result.input.length === 0) usage12("Input path must not be empty.");
11776
+ if (result.input.length === 0) usage13("Input path must not be empty.");
11556
11777
  if (result.token && ["--slide", "--shape", "--part", "--scope", "--all"].some((option) => seen.has(option)))
11557
- usage12("Opaque and simple selectors cannot be combined.");
11778
+ usage13("Opaque and simple selectors cannot be combined.");
11558
11779
  if (result.part && result.slide !== void 0)
11559
- usage12("Part and slide selectors cannot be combined.");
11780
+ usage13("Part and slide selectors cannot be combined.");
11560
11781
  if (result.shape && result.slide === void 0 && !result.part)
11561
- usage12("Shape selection requires an owning slide or part.");
11782
+ usage13("Shape selection requires an owning slide or part.");
11562
11783
  if (result.slide !== void 0 && result.scope !== void 0 && result.scope !== "slides")
11563
- usage12("Slide positions require slides scope.");
11784
+ usage13("Slide positions require slides scope.");
11564
11785
  const mutationOptions = ["--file", "--output", "--in-place", "--force", "--dry-run"];
11565
11786
  if (operation !== "xml.set" && operation !== "slides.add" && operation !== "slides.import" && !slideMutation && mutationOptions.some((option) => seen.has(option)))
11566
- usage12("Publication options require xml set.");
11787
+ usage13("Publication options require xml set.");
11567
11788
  if (!xml && operation !== "inspect" && operation !== "slides.add" && operation !== "slides.import" && !slideMutation && result.limits)
11568
- usage12("Limit overrides require inspect, XML operations or slides add.");
11569
- if (operation !== "xml.get" && result.pretty) usage12("Pretty output requires xml get.");
11789
+ usage13("Limit overrides require inspect, XML operations or slides add.");
11790
+ if (operation !== "xml.get" && result.pretty) usage13("Pretty output requires xml get.");
11570
11791
  if (xml) {
11571
11792
  if (result.slide !== void 0 || result.shape || result.all)
11572
- usage12("XML operations require one part selector.");
11573
- if (!result.part && !result.token) usage12("XML operations require a part or opaque selector.");
11793
+ usage13("XML operations require one part selector.");
11794
+ if (!result.part && !result.token) usage13("XML operations require a part or opaque selector.");
11574
11795
  }
11575
11796
  if (operation === "xml.set" || operation === "slides.add" || operation === "slides.import" || slideMutation) {
11576
- if (operation === "xml.set" && !result.file) usage12("XML replacement requires --file.");
11577
- if (result.input === "-" && result.file === "-") usage12("Only one input may consume stdin.");
11578
- if (result.inPlace && result.input === "-") usage12("Stdin cannot be edited in place.");
11579
- if (result.inPlace && result.output) usage12("Output and in-place cannot be combined.");
11797
+ if (operation === "xml.set" && !result.file) usage13("XML replacement requires --file.");
11798
+ if (result.input === "-" && result.file === "-") usage13("Only one input may consume stdin.");
11799
+ if (result.inPlace && result.input === "-") usage13("Stdin cannot be edited in place.");
11800
+ if (result.inPlace && result.output) usage13("Output and in-place cannot be combined.");
11580
11801
  if (!result.dryRun && !result.inPlace && !result.output)
11581
- usage12("Mutation requires a destination.");
11582
- if (result.force && !result.output) usage12("Force requires an explicit output destination.");
11802
+ usage13("Mutation requires a destination.");
11803
+ if (result.force && !result.output) usage13("Force requires an explicit output destination.");
11583
11804
  if (result.output === result.input && result.output !== "-")
11584
- usage12("Replacing input requires --in-place.");
11805
+ usage13("Replacing input requires --in-place.");
11585
11806
  if (result.output === "-" && result.json && !result.dryRun)
11586
- usage12("Binary stdout cannot be combined with JSON.");
11807
+ usage13("Binary stdout cannot be combined with JSON.");
11587
11808
  }
11588
11809
  return result;
11589
11810
  }
@@ -11652,7 +11873,7 @@ async function transferLocations(bytes, budget) {
11652
11873
  (edge) => relationshipNamespaces.some((namespace) => edge.type === `${namespace}/officeDocument`)
11653
11874
  );
11654
11875
  const root = roots.length === 1 ? roots[0].targetPart : void 0;
11655
- if (!root) throw new OfficeError17("invalid-opc", "Presentation part is missing.", "index");
11876
+ if (!root) throw new OfficeError19("invalid-opc", "Presentation part is missing.", "index");
11656
11877
  const relationshipNamespace = roots[0].type.slice(0, -"/officeDocument".length);
11657
11878
  const xml = budget.xml(reader.get(root));
11658
11879
  const fingerprint = Array.from(sha2564(bytes), (byte) => byte.toString(16).padStart(2, "0")).join(
@@ -11671,7 +11892,7 @@ async function transferLocations(bytes, budget) {
11671
11892
  (edge) => edge.id === reference && edge.type === `${relationshipNamespace}/slide`
11672
11893
  )?.targetPart;
11673
11894
  if (!id || !owner || !reader.has(owner))
11674
- throw new OfficeError17("invalid-opc", "Referenced slide is missing.", "index");
11895
+ throw new OfficeError19("invalid-opc", "Referenced slide is missing.", "index");
11675
11896
  return {
11676
11897
  fingerprint,
11677
11898
  scope: "slides",
@@ -11754,7 +11975,7 @@ async function executeRequest(request, options2, owned) {
11754
11975
  let allowPartialOutput = false;
11755
11976
  try {
11756
11977
  request.signal.throwIfAborted();
11757
- if (!Array.isArray(request.args)) usage12("Arguments must be byte arrays.");
11978
+ if (!Array.isArray(request.args)) usage13("Arguments must be byte arrays.");
11758
11979
  const args = parse(request.args, options2.maxArgumentBytes, output3);
11759
11980
  if (args.limits) {
11760
11981
  const validation = options2.context.validationLimits;
@@ -11780,14 +12001,47 @@ async function executeRequest(request, options2, owned) {
11780
12001
  output3.json = args.json;
11781
12002
  output3.operation = args.operation;
11782
12003
  const operation2 = args.operation;
11783
- if (args.operation === "extract" && request.streaming && (!request.publishOutputs || request.publishOutputStreams) && (!request.preflightOutput || request.preflightOutputStream)) {
12004
+ if (args.operation === "pack" && request.streaming) {
12005
+ if (args.creation?.author !== void 0 || args.creation?.timestamp !== void 0) throw new OfficeError19("unsupported-edit", "Pack metadata overrides are unavailable; source properties are preserved.", "validate-intent");
12006
+ const streaming = request.streaming, context = { ...options2.context, signal: request.signal, workingStorage: streaming.workingStorage };
12007
+ const input = await streaming.openInput(args.manifest, Math.min(context.limits.maxBytes, context.xmlLimits.maxBytes));
12008
+ const manifest = await openRetainedPackManifest(input.stream(), context, { manifest: args.manifest, ...args.output === void 0 ? {} : { output: args.output } });
12009
+ owned.push(manifest);
12010
+ let total = 0;
12011
+ const packed = await stageRetainedPackage(manifest.members(), async function* (part) {
12012
+ const source3 = await streaming.openInput(await manifest.path(part), Math.min(context.limits.maxBytes, context.archiveLimits.maxEntryBytes, context.archiveLimits.maxTotalBytes - total));
12013
+ total += source3.size;
12014
+ yield* source3.stream();
12015
+ }, context, args.creation?.kind ? { kind: args.creation.kind } : {});
12016
+ owned.push(packed);
12017
+ if (packed.size > options2.maxOutputBytes) throw new OfficeError19("resource-limit", "Packed output exceeds byte limit.", "validate-intent");
12018
+ const dryRun = args.dryRun ?? false;
12019
+ result = {
12020
+ version: 1,
12021
+ operation: operation2,
12022
+ ok: true,
12023
+ warnings: [],
12024
+ errors: [],
12025
+ locations: [],
12026
+ affected: packed.count,
12027
+ data: { effects: ["packed"], outputs: dryRun ? [] : [{ path: args.output, sha256: packed.fingerprint, bytes: packed.size }], fingerprint: dryRun ? null : packed.fingerprint, dryRun }
12028
+ };
12029
+ human = `${dryRun ? "Validated" : "Packed"} ${packed.count} package part(s)
12030
+ `;
12031
+ if (args.output && args.output !== "-") {
12032
+ if (!request.publishOutput) throw Object.assign(new Error("Output publication unavailable."), { code: "publication-unsupported" });
12033
+ publication = { outputPath: args.output, protectedInputPaths: manifest.paths(), bytes: packed.bytes(), originalBytes: input, inPlace: false, force: args.force ?? false, dryRun };
12034
+ } else if (args.output === "-" && !dryRun) stagedOutput = { close: packed.close, async write(sink) {
12035
+ for await (const bytes of packed.bytes()) await sink.write(bytes);
12036
+ } };
12037
+ } else if (args.operation === "extract" && request.streaming && (!request.publishOutputs || request.publishOutputStreams) && (!request.preflightOutput || request.preflightOutputStream)) {
11784
12038
  retainedExtraction = await prepareRetainedExtraction(args, request, options2);
11785
12039
  owned.push(retainedExtraction);
11786
12040
  result = success(operation2, null);
11787
12041
  } else if (args.operation === "xml.set" && request.streaming) {
11788
12042
  if (args.token) decodeSelectionToken2(args.token);
11789
12043
  const streaming = request.streaming, context = { ...options2.context, signal: request.signal, workingStorage: streaming.workingStorage };
11790
- if (!context.validationLimits) throw new OfficeError17("invalid-value", "XML operations require explicit validation limits.", "usage");
12044
+ if (!context.validationLimits) throw new OfficeError19("invalid-value", "XML operations require explicit validation limits.", "usage");
11791
12045
  const input = await streaming.openInput(args.input, Math.min(context.limits.maxBytes, context.archiveLimits.maxArchiveBytes));
11792
12046
  const maxReplacementBytes = Math.min(context.validationLimits.maxBytes, context.archiveLimits.maxEntryBytes), file = args.file;
11793
12047
  async function* replacement() {
@@ -11827,8 +12081,8 @@ async function executeRequest(request, options2, owned) {
11827
12081
  publication = { inputPath: args.input, outputPath: destination, bytes: staged.bytes(), originalBytes: input, inPlace: args.inPlace ?? false, force: args.force ?? false, dryRun };
11828
12082
  }
11829
12083
  result = success(operation2, null);
11830
- } else if ((args.operation === "inspect" || args.operation === "text.get" || args.operation === "fields.list" || args.operation === "fields.get" || args.operation === "xml.get") && request.streaming) {
11831
- if (args.token) decodeSelectionToken2(args.token);
12084
+ } else if ((args.operation === "inspect" || args.operation === "text.get" || args.operation === "fields.list" || args.operation === "fields.get" || args.operation === "text.frames.list" || args.operation === "text.frames.get" || args.operation === "notes.list" || args.operation === "notes.get" || args.operation === "xml.get") && request.streaming) {
12085
+ if (args.token && args.operation !== "notes.list" && args.operation !== "notes.get") decodeSelectionToken2(args.token);
11832
12086
  const input = await request.streaming.openInput(args.input, Math.min(options2.context.limits.maxBytes, options2.context.archiveLimits.maxArchiveBytes));
11833
12087
  const hash = sha2564.create();
11834
12088
  for await (const bytes of input.stream()) {
@@ -11840,8 +12094,13 @@ async function executeRequest(request, options2, owned) {
11840
12094
  const archive = await openPackageArchive(input, context);
11841
12095
  let failed = false;
11842
12096
  try {
11843
- const scope = args.token ? decodeSelectionToken2(args.token).scope : args.scope;
11844
- stagedOutput = args.operation === "xml.get" ? await stageRetainedXmlPart(archive, fingerprint, {
12097
+ const scope = args.operation === "notes.list" || args.operation === "notes.get" ? void 0 : args.token ? decodeSelectionToken2(args.token).scope : args.scope;
12098
+ stagedOutput = args.operation === "notes.list" || args.operation === "notes.get" ? await stageRetainedNotes(archive, fingerprint, { selection: {
12099
+ kind: "slide",
12100
+ ...args.token ? { token: args.token } : {},
12101
+ ...args.slide === void 0 ? {} : { position: { coordinateSystem: "one-based", value: args.slide } },
12102
+ ...!args.token && (args.all || args.operation === "notes.list") ? { all: true } : {}
12103
+ } }, context, { json: args.json, operation: args.operation, maxOutputBytes: options2.maxOutputBytes }) : args.operation === "xml.get" ? await stageRetainedXmlPart(archive, fingerprint, {
11845
12104
  ...args.token === void 0 ? {} : { token: args.token },
11846
12105
  ...args.slide === void 0 ? {} : { slide: args.slide },
11847
12106
  ...args.shape === void 0 ? {} : { shape: args.shape },
@@ -11862,7 +12121,7 @@ async function executeRequest(request, options2, owned) {
11862
12121
  }, context, { json: args.json, maxOutputBytes: options2.maxOutputBytes });
11863
12122
  } catch (error) {
11864
12123
  failed = true;
11865
- if (error instanceof OfficeError17 && error.code === "resource-limit" && error.phase === "publish") return outputLimitFailure(operation2, args.json);
12124
+ if (error instanceof OfficeError19 && error.code === "resource-limit" && error.phase === "publish") return outputLimitFailure(operation2, args.json);
11866
12125
  throw error;
11867
12126
  } finally {
11868
12127
  try {
@@ -11887,7 +12146,7 @@ async function executeRequest(request, options2, owned) {
11887
12146
  let failed = false;
11888
12147
  try {
11889
12148
  validation = await openRetainedPresentationValidation(archive, context, limits);
11890
- if (!validation.valid) throw new OfficeError17("invalid-opc", "Presentation semantic validation failed.", "index");
12149
+ if (!validation.valid) throw new OfficeError19("invalid-opc", "Presentation semantic validation failed.", "index");
11891
12150
  result = success(operation2, { valid: true, schema: validation.schema, rules: validation.rules, issues: [] });
11892
12151
  } catch (error) {
11893
12152
  failed = true;
@@ -11902,15 +12161,15 @@ async function executeRequest(request, options2, owned) {
11902
12161
  const bytes = await request.readInput(args.input, maxBytes);
11903
12162
  const reader = await readPackage3(bytes, { ...options2.context, signal: request.signal });
11904
12163
  const validation = validatePresentation(reader, limits);
11905
- if (!validation.valid) throw new OfficeError17("invalid-opc", "Presentation semantic validation failed.", "index");
12164
+ if (!validation.valid) throw new OfficeError19("invalid-opc", "Presentation semantic validation failed.", "index");
11906
12165
  result = success(operation2, validation);
11907
12166
  }
11908
12167
  human = "Presentation is semantically valid; XML schema validation not checked.\n";
11909
12168
  } else if (args.operation === "help") {
11910
- const usage13 = args.schemaPath === "validate" ? "Usage: pptx validate INPUT [--json] [--limit NAME=VALUE]\nBounded semantic validation; XML schema validation is not checked.\n" : args.schemaPath && Object.hasOwn(packageToolsSchemas, args.schemaPath) ? packageToolsUsage : args.schemaPath === "objects.add" ? objectsAddUsage : args.schemaPath && Object.hasOwn(opaqueSchemas, args.schemaPath) ? opaqueUsage : args.schemaPath?.startsWith("equations.") ? equationsUsage : args.schemaPath === "text.fit" ? "Usage: pptx text fit INPUT --metrics JSON [selection] [output]\nSelection: --slide N --shape NAME | --select TOKEN | --all\nOutput: --output PATH | --in-place | --dry-run\n--font-family NAME --min-size N --max-size N\n--bold true|false --italic true|false --wrap true|false\n--margin-left LENGTH --margin-right LENGTH\n--margin-top LENGTH --margin-bottom LENGTH --line-spacing MULTIPLIER\n--json --allow-empty --force --scope SCOPE --limit NAME=VALUE\nDefaults: Calibri, 1..18pt, regular, wrap, line spacing 1.\nSupplied scalar metrics; horizontal single-column shapes with local extents.\nNo host font discovery. Platform rendering may differ.\n" : args.schemaPath?.startsWith("text.frames.") ? frameHelp : args.schemaPath?.startsWith("text.paragraphs.") ? paragraphHelp : args.schemaPath?.startsWith("text.runs.") ? runHelp : help;
12169
+ const usage14 = args.schemaPath === "validate" ? "Usage: pptx validate INPUT [--json] [--limit NAME=VALUE]\nBounded semantic validation; XML schema validation is not checked.\n" : args.schemaPath && Object.hasOwn(packageToolsSchemas, args.schemaPath) ? packageToolsUsage : args.schemaPath === "objects.add" ? objectsAddUsage : args.schemaPath && Object.hasOwn(opaqueSchemas, args.schemaPath) ? opaqueUsage : args.schemaPath?.startsWith("equations.") ? equationsUsage : args.schemaPath === "text.fit" ? "Usage: pptx text fit INPUT --metrics JSON [selection] [output]\nSelection: --slide N --shape NAME | --select TOKEN | --all\nOutput: --output PATH | --in-place | --dry-run\n--font-family NAME --min-size N --max-size N\n--bold true|false --italic true|false --wrap true|false\n--margin-left LENGTH --margin-right LENGTH\n--margin-top LENGTH --margin-bottom LENGTH --line-spacing MULTIPLIER\n--json --allow-empty --force --scope SCOPE --limit NAME=VALUE\nDefaults: Calibri, 1..18pt, regular, wrap, line spacing 1.\nSupplied scalar metrics; horizontal single-column shapes with local extents.\nNo host font discovery. Platform rendering may differ.\n" : args.schemaPath?.startsWith("text.frames.") ? frameHelp : args.schemaPath?.startsWith("text.paragraphs.") ? paragraphHelp : args.schemaPath?.startsWith("text.runs.") ? runHelp : help;
11911
12170
  let resolvedUsage = args.schemaPath === "shapes.remove" ? "Usage: pptx shapes remove INPUT --slide N --shape NAME [--detach-policy detach|remove] [output]\nSelection also accepts --select TOKEN or --all. Referenced targets require explicit policy.\nDetach keeps connectors with free coordinates; remove deletes affected connectors. Timing references reject deletion.\nOutput: --output PATH | --in-place | --dry-run; --force --json --limit NAME=VALUE.\n" : args.schemaPath?.startsWith("tables.") ? "Usage: pptx tables list|get|add|set|merge|split INPUT [--slide N --table N --cell row,column] [properties] [output]\nMerge: --from row,column --to row,column; split: --cell row,column (merge origin).\nRows/columns: tables rows|columns add|remove INPUT --position N --span-policy expand|shrink|reject\nInsertion accepts expand/reject; deletion accepts shrink/reject. Partial intersecting merges fail.\nAdd: --rows N --columns N --left LENGTH --top LENGTH --width LENGTH --height LENGTH [--data JSON]\nPlaceholder add: --slide N --placeholder IDX --rows N --columns N. Inherits position/width; rows set height.\nSet: --text TEXT (one cell), --data JSON, --row-height LENGTH, --column-width LENGTH, --style ID\nFormatting: --fill RGB --border-color RGB --border-width LENGTH --margin-left|right|top|bottom LENGTH\nStyle flags: --first-row|last-row|first-col|last-col|horz-band|vert-band true|false; --vertical-anchor top|middle|bottom\nOutput: --output PATH or --in-place; --dry-run validates without publication. Selectors are one-based.\n" : args.schemaPath?.startsWith("connectors.") ? "Usage: pptx connectors list|get|add|set|remove INPUT [selection] [properties] [output]\nSelection: --slide N [--shape NAME | --all] | --select TOKEN.\nAdd requires --kind STRAIGHT|ELBOW|CURVE --begin-x LENGTH --begin-y LENGTH --end-x LENGTH --end-y LENGTH.\nAttach: --begin-target LOCATION_JSON --end-target LOCATION_JSON --site N (zero-based).\nSet target null to detach one endpoint; --detach-policy detach detaches both, remove removes the connector.\nLengths use explicit emu/in/cm/mm/pt in parent coordinates. --name TEXT sets the name.\nLine: --line-color RGB|solid|null --line-width LENGTH|null. Solid preserves existing solid color.\nOutput: --output PATH | --in-place | --dry-run; --force --json --limit NAME=VALUE.\nTargets: rect/ellipse/roundRect sites 0..3. Grouped connectors require same-parent targets.\nNonzero-rotated coordinate edits reject; arbitrary routing/guide geometry is preserve-only.\n" : ["shapes.move", "shapes.align", "shapes.distribute", "shapes.duplicate"].includes(
11912
12171
  args.schemaPath ?? ""
11913
- ) ? "Usage: pptx shapes move|align|distribute|duplicate INPUT [selection] --coordinate-system slide|group [output]\nSelection: --shapes JSON Location array, or --slide N [--shape NAME | --all], or --select TOKEN.\nMove: --order front|back|forward|backward OR --position N (one-based).\nAlign: --alignment left|center|right|top|middle|bottom. Distribute: --axis horizontal|vertical.\nDuplicate: --offset-x LENGTH --offset-y LENGTH (explicit units, signed offsets).\nHidden siblings participate; locked selections fail. Mixed slides or parent groups fail.\nOutput: --output PATH | --in-place | --dry-run; --force, --json, --limit NAME=VALUE.\n" : args.schemaPath?.startsWith("shapes.paths.") ? "Usage: pptx shapes paths list|get|add|set INPUT [selection] [path] [output]\nRead: list|get INPUT [selection]. Add/set require --path JSON or --vertices JSON.\nPath: {unit:emu,width,height,commands:[move|line|quadratic|cubic|close]}\nCoordinates: integer local EMUs, -2147483647..2147483647; viewport 1..2147483647.\nAt most 4096 commands; explicit closure; command order preserved without winding evaluation.\nAlternatively --vertices JSON --close true|false uses {x,y} local EMU vertices and a derived viewport.\nAdd placement: --left LENGTH --top LENGTH --width LENGTH --height LENGTH.\nAdd accepts shape name, text, paint and metadata properties. Lengths require emu/in/cm/mm/pt.\nSelection: --slide N [--shape NAME] | --part URI --scope SCOPE | --select TOKEN.\nSet: selects one shape unless --all; --allow-empty accepts zero matches.\nScopes: slides (default), layouts, masters; shared requires --part URI.\nOutput: --output PATH | --in-place | --dry-run; --force --json --limit NAME=VALUE.\nUnsupported formulas, arcs and arbitrary existing geometry are preserve-only.\n" : ["shapes.group", "shapes.ungroup"].includes(args.schemaPath ?? "") ? "Usage: pptx shapes group|ungroup INPUT --tolerance LENGTH [selection] [output]\nGroup: --shapes JSON array of at least two inspected Location objects.\nShapes must be distinct contiguous siblings; original IDs and z-order are retained.\nUngroup: --slide N --shape NAME | --select TOKEN; selects one group.\nSelection: --part URI --scope SCOPE. Exact cardinality; --all/--allow-empty are unsupported.\nTolerance is explicit nonnegative EMU precision using emu/in/cm/mm/pt lengths.\nIdentity groups preserve child XML; transformed ungrouping supports nested groups and rectangles\nwithout text, styles or strokes.\nTransformed ungrouping supports quarter-turn rotation chains only.\nWorld geometry must remain within tolerance; unsupported geometry and references fail.\nOutput: --output PATH | --in-place | --dry-run; --force --json --limit NAME=VALUE.\n" : args.schemaPath?.startsWith("shapes.drawing.") || args.schemaPath === "shapes.effects.set" ? "Usage: pptx shapes drawing get|set INPUT [selection] [paint] [output]\n pptx shapes effects set INPUT [selection] --shadow true|false\n --opacity RATIO --shadow-blur LENGTH --shadow-color COLOR [output]\nPaint: --fill-kind inherit|none|solid|gradient|pattern|picture\n --color COLOR; gradient: --stops JSON --angle DEGREES\n pattern: --pattern PRESET [--foreground COLOR --background COLOR]\n picture: --file PATH --mode stretch|tile\nAdvanced paint: --fill JSON --line JSON --shadow-inherit true|false\nCOLOR is six-digit RGB or JSON with rgb/theme, optional brightness and opacity.\nSelection: --slide N --shape NAME | --part URI --scope SCOPE | --select TOKEN\nScopes: slides (default), layouts, masters; shared requires a part.\nSet selects one shape unless --all; --allow-empty accepts zero matches.\nOutput: --output PATH | --in-place | --dry-run; --force --json --limit NAME=VALUE.\nLengths require emu/in/cm/mm/pt. Simple shadows have zero offset.\nComplex effects and 3D remain intact; editing unsupported effects fails.\n" : args.schemaPath?.startsWith("shapes.") ? "Usage: pptx shapes list|get|add|set INPUT [selection] [properties] [output]\nSelection: --slide N --shape NAME | --select TOKEN; --part URI --scope SCOPE\nScopes: slides (default), layouts, masters; shared requires a part.\nAdd: --kind text-box|PRESET --left LENGTH --top LENGTH --width LENGTH --height LENGTH\nProperties: --name TEXT --text TEXT --title TEXT --description TEXT --alt-text TEXT\n --locked true|false|null --rotation DEGREES --fill RGB --line-color RGB --line-width LENGTH\n --flip-horizontal true|false --flip-vertical true|false\n --adjustments JSON_ARRAY (normalized preset values in guide order)\n Geometry uses parent coordinates; inspection corners use slide EMUs.\nLengths require emu/in/cm/mm/pt. Presets use enum names or numeric values from schema.\nNull clears direct title/description/lock; null fill/line color disables fill/line.\nOmitted values stay unchanged.\nNull line width restores inherited width.\nFill/line color solid selects solid fill; existing solid colors are retained.\nShape IDs are read-only. Unsupported geometry and advanced formatting are preserve-only.\nOutput: --output PATH | --in-place | --dry-run; --force --json --limit NAME=VALUE\nSet: --all edits every match; --allow-empty accepts zero matches.\n" : args.schemaPath?.startsWith("fields.") ? "Usage: pptx fields list|get|set|add|remove INPUT [options]\nSelection: --slide N --shape NAME | --select TOKEN\n --scope SCOPE --json --limit NAME=VALUE\nMutation: --all --allow-empty\nOutput: --output PATH | --in-place | --dry-run; --force\nSet/add: --kind slide-number|date|footer|header\n --update preserve|explicit --text TEXT --timestamp UTC\nAdd requires --kind and one text body; appends to its last paragraph.\nPreserve is default: retains the cache (empty on add), rejects text/time.\nExplicit requires text; date fields also require a caller UTC timestamp.\nNo field evaluation, automatic numbering or inherited-content flattening.\nList/get are read-only; get requires one field. Remove accepts no policy.\n" : usage13;
12172
+ ) ? "Usage: pptx shapes move|align|distribute|duplicate INPUT [selection] --coordinate-system slide|group [output]\nSelection: --shapes JSON Location array, or --slide N [--shape NAME | --all], or --select TOKEN.\nMove: --order front|back|forward|backward OR --position N (one-based).\nAlign: --alignment left|center|right|top|middle|bottom. Distribute: --axis horizontal|vertical.\nDuplicate: --offset-x LENGTH --offset-y LENGTH (explicit units, signed offsets).\nHidden siblings participate; locked selections fail. Mixed slides or parent groups fail.\nOutput: --output PATH | --in-place | --dry-run; --force, --json, --limit NAME=VALUE.\n" : args.schemaPath?.startsWith("shapes.paths.") ? "Usage: pptx shapes paths list|get|add|set INPUT [selection] [path] [output]\nRead: list|get INPUT [selection]. Add/set require --path JSON or --vertices JSON.\nPath: {unit:emu,width,height,commands:[move|line|quadratic|cubic|close]}\nCoordinates: integer local EMUs, -2147483647..2147483647; viewport 1..2147483647.\nAt most 4096 commands; explicit closure; command order preserved without winding evaluation.\nAlternatively --vertices JSON --close true|false uses {x,y} local EMU vertices and a derived viewport.\nAdd placement: --left LENGTH --top LENGTH --width LENGTH --height LENGTH.\nAdd accepts shape name, text, paint and metadata properties. Lengths require emu/in/cm/mm/pt.\nSelection: --slide N [--shape NAME] | --part URI --scope SCOPE | --select TOKEN.\nSet: selects one shape unless --all; --allow-empty accepts zero matches.\nScopes: slides (default), layouts, masters; shared requires --part URI.\nOutput: --output PATH | --in-place | --dry-run; --force --json --limit NAME=VALUE.\nUnsupported formulas, arcs and arbitrary existing geometry are preserve-only.\n" : ["shapes.group", "shapes.ungroup"].includes(args.schemaPath ?? "") ? "Usage: pptx shapes group|ungroup INPUT --tolerance LENGTH [selection] [output]\nGroup: --shapes JSON array of at least two inspected Location objects.\nShapes must be distinct contiguous siblings; original IDs and z-order are retained.\nUngroup: --slide N --shape NAME | --select TOKEN; selects one group.\nSelection: --part URI --scope SCOPE. Exact cardinality; --all/--allow-empty are unsupported.\nTolerance is explicit nonnegative EMU precision using emu/in/cm/mm/pt lengths.\nIdentity groups preserve child XML; transformed ungrouping supports nested groups and rectangles\nwithout text, styles or strokes.\nTransformed ungrouping supports quarter-turn rotation chains only.\nWorld geometry must remain within tolerance; unsupported geometry and references fail.\nOutput: --output PATH | --in-place | --dry-run; --force --json --limit NAME=VALUE.\n" : args.schemaPath?.startsWith("shapes.drawing.") || args.schemaPath === "shapes.effects.set" ? "Usage: pptx shapes drawing get|set INPUT [selection] [paint] [output]\n pptx shapes effects set INPUT [selection] --shadow true|false\n --opacity RATIO --shadow-blur LENGTH --shadow-color COLOR [output]\nPaint: --fill-kind inherit|none|solid|gradient|pattern|picture\n --color COLOR; gradient: --stops JSON --angle DEGREES\n pattern: --pattern PRESET [--foreground COLOR --background COLOR]\n picture: --file PATH --mode stretch|tile\nAdvanced paint: --fill JSON --line JSON --shadow-inherit true|false\nCOLOR is six-digit RGB or JSON with rgb/theme, optional brightness and opacity.\nSelection: --slide N --shape NAME | --part URI --scope SCOPE | --select TOKEN\nScopes: slides (default), layouts, masters; shared requires a part.\nSet selects one shape unless --all; --allow-empty accepts zero matches.\nOutput: --output PATH | --in-place | --dry-run; --force --json --limit NAME=VALUE.\nLengths require emu/in/cm/mm/pt. Simple shadows have zero offset.\nComplex effects and 3D remain intact; editing unsupported effects fails.\n" : args.schemaPath?.startsWith("shapes.") ? "Usage: pptx shapes list|get|add|set INPUT [selection] [properties] [output]\nSelection: --slide N --shape NAME | --select TOKEN; --part URI --scope SCOPE\nScopes: slides (default), layouts, masters; shared requires a part.\nAdd: --kind text-box|PRESET --left LENGTH --top LENGTH --width LENGTH --height LENGTH\nProperties: --name TEXT --text TEXT --title TEXT --description TEXT --alt-text TEXT\n --locked true|false|null --rotation DEGREES --fill RGB --line-color RGB --line-width LENGTH\n --flip-horizontal true|false --flip-vertical true|false\n --adjustments JSON_ARRAY (normalized preset values in guide order)\n Geometry uses parent coordinates; inspection corners use slide EMUs.\nLengths require emu/in/cm/mm/pt. Presets use enum names or numeric values from schema.\nNull clears direct title/description/lock; null fill/line color disables fill/line.\nOmitted values stay unchanged.\nNull line width restores inherited width.\nFill/line color solid selects solid fill; existing solid colors are retained.\nShape IDs are read-only. Unsupported geometry and advanced formatting are preserve-only.\nOutput: --output PATH | --in-place | --dry-run; --force --json --limit NAME=VALUE\nSet: --all edits every match; --allow-empty accepts zero matches.\n" : args.schemaPath?.startsWith("fields.") ? "Usage: pptx fields list|get|set|add|remove INPUT [options]\nSelection: --slide N --shape NAME | --select TOKEN\n --scope SCOPE --json --limit NAME=VALUE\nMutation: --all --allow-empty\nOutput: --output PATH | --in-place | --dry-run; --force\nSet/add: --kind slide-number|date|footer|header\n --update preserve|explicit --text TEXT --timestamp UTC\nAdd requires --kind and one text body; appends to its last paragraph.\nPreserve is default: retains the cache (empty on add), rejects text/time.\nExplicit requires text; date fields also require a caller UTC timestamp.\nNo field evaluation, automatic numbering or inherited-content flattening.\nList/get are read-only; get requires one field. Remove accepts no policy.\n" : usage14;
11914
12173
  if (args.schemaPath === "diff") resolvedUsage = diffUsage;
11915
12174
  if (args.schemaPath?.startsWith("comments.")) resolvedUsage = commentsUsage;
11916
12175
  if (args.schemaPath?.startsWith("notes.")) resolvedUsage = notesUsage;
@@ -12259,11 +12518,11 @@ ${JSON.stringify(result.data, null, 2)}
12259
12518
  try {
12260
12519
  text2 = new TextDecoder("utf-8", { fatal: true }).decode(encoded2);
12261
12520
  } catch {
12262
- usage12("Batch JSON must be UTF-8.");
12521
+ usage13("Batch JSON must be UTF-8.");
12263
12522
  }
12264
12523
  items = parseAnimationBatch(commandJson(text2));
12265
12524
  }
12266
- if (items.length && !args.dryRun && !args.inPlace && !args.output) usage12("Mutation requires a destination.");
12525
+ if (items.length && !args.dryRun && !args.inPlace && !args.output) usage13("Mutation requires a destination.");
12267
12526
  const bytes = await request.readInput(args.input, Math.min(context.limits.maxBytes, context.archiveLimits.maxArchiveBytes));
12268
12527
  const index = await readSelectionIndex2(bytes, context);
12269
12528
  const changed = await mutateAnimationsBatch(bytes, resolveAnimationBatch(items, index), context);
@@ -13498,13 +13757,13 @@ ${item.parts.map((part) => ` ${part}
13498
13757
  const inputs = [];
13499
13758
  for (const path of [args.input, ...args.sources ?? []]) {
13500
13759
  if (remaining < 1)
13501
- throw new OfficeError17("resource-limit", "Combined input limit exceeded.", "admit");
13760
+ throw new OfficeError19("resource-limit", "Combined input limit exceeded.", "admit");
13502
13761
  const bytes = await request.readInput(
13503
13762
  path,
13504
13763
  Math.min(remaining, context.archiveLimits.maxArchiveBytes)
13505
13764
  );
13506
13765
  if (bytes.length > remaining || bytes.length > context.archiveLimits.maxArchiveBytes)
13507
- throw new OfficeError17("resource-limit", "Combined input limit exceeded.", "admit");
13766
+ throw new OfficeError19("resource-limit", "Combined input limit exceeded.", "admit");
13508
13767
  remaining -= bytes.length;
13509
13768
  inputs.push(await budget.read(bytes));
13510
13769
  }
@@ -13605,7 +13864,7 @@ ${JSON.stringify(result.data, null, 2)}
13605
13864
  }
13606
13865
  } else if (args.operation === "create") {
13607
13866
  if (args.template)
13608
- throw new OfficeError17(
13867
+ throw new OfficeError19(
13609
13868
  "unsupported-profile",
13610
13869
  "Template-based creation is unavailable.",
13611
13870
  "validate-intent"
@@ -13657,7 +13916,7 @@ ${JSON.stringify(result.data, null, 2)}
13657
13916
  );
13658
13917
  } catch (error) {
13659
13918
  if (error && typeof error === "object" && "code" in error && error.code === "resource-limit")
13660
- throw new OfficeError17("resource-limit", "Input limit exceeded.", "admit");
13919
+ throw new OfficeError19("resource-limit", "Input limit exceeded.", "admit");
13661
13920
  throw error;
13662
13921
  }
13663
13922
  const index = await readSelectionIndex2(bytes, { ...options2.context, signal: request.signal });
@@ -13802,7 +14061,7 @@ ${JSON.stringify(result.data, null, 2)}
13802
14061
  const part = metadata2 ?? records[0].part;
13803
14062
  const validationLimits = options2.context.validationLimits;
13804
14063
  if (!validationLimits)
13805
- throw new OfficeError17(
14064
+ throw new OfficeError19(
13806
14065
  "invalid-value",
13807
14066
  "XML operations require explicit validation limits.",
13808
14067
  "usage"
@@ -13878,10 +14137,10 @@ ${xml.xml}
13878
14137
  await stagedOutput?.close().catch(() => {
13879
14138
  });
13880
14139
  stagedOutput = void 0;
13881
- if (error instanceof OfficeError17 && error.code === "resource-limit" && error.phase === "publish") return outputLimitFailure(output3.operation, output3.json);
14140
+ if (error instanceof OfficeError19 && error.code === "resource-limit" && error.phase === "publish") return outputLimitFailure(output3.operation, output3.json);
13882
14141
  if (request.signal.aborted)
13883
14142
  return { exitCode: 130, stdout: new Uint8Array(), stderr: new Uint8Array() };
13884
- const office = error instanceof OfficeError17 ? error : void 0;
14143
+ const office = error instanceof OfficeError19 ? error : void 0;
13885
14144
  const capabilityCode = error && typeof error === "object" && "code" in error ? error.code : void 0;
13886
14145
  const limit = office?.code === "resource-limit" || capabilityCode === "resource-limit";
13887
14146
  const unsupported = capabilityCode === "publication-unsupported";
@@ -13984,7 +14243,7 @@ ${JSON.stringify(failure.data)}
13984
14243
  } catch (error) {
13985
14244
  if (request.signal.aborted)
13986
14245
  return { exitCode: 130, stdout: new Uint8Array(), stderr: new Uint8Array() };
13987
- const office = error instanceof OfficeError17 ? error : void 0;
14246
+ const office = error instanceof OfficeError19 ? error : void 0;
13988
14247
  const rawCode = error && typeof error === "object" && "code" in error ? error.code : void 0;
13989
14248
  const code = typeof rawCode === "string" && [
13990
14249
  "resource-limit",
@@ -14066,7 +14325,7 @@ async function execute(request, options2) {
14066
14325
  }
14067
14326
  }
14068
14327
  function createPptxCommandEngine(settings = {}) {
14069
- const context = resourceContext(settings.context);
14328
+ const context = resourceContext2(settings.context);
14070
14329
  const options2 = {
14071
14330
  maxArgumentBytes: settings.maxArgumentBytes ?? Infinity,
14072
14331
  maxOutputBytes: settings.maxOutputBytes ?? Infinity,