@shopify/cli 4.8.4 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (490) hide show
  1. package/dist/analytics-QK4RFCB6.js +1 -0
  2. package/dist/analytics-R6I5APDB.js +1 -0
  3. package/dist/assets/hydrogen/starter/package.json +1 -1
  4. package/dist/bootstrap.js +1 -3
  5. package/dist/chunk-22LJALHJ.js +7 -0
  6. package/dist/{chunk-APUYMORT.js → chunk-23K3B23N.js} +1 -1
  7. package/dist/chunk-2KLXRVGQ.js +317 -0
  8. package/dist/{chunk-QXR5DJC2.js → chunk-2LZQM5JG.js} +1 -1
  9. package/dist/chunk-2OHSGC4Q.js +1 -0
  10. package/dist/chunk-2Q3WIH7S.js +6 -0
  11. package/dist/{chunk-FRRA5MI2.js → chunk-2W6M7YDY.js} +1 -1
  12. package/dist/{chunk-NHOF2IN6.js → chunk-2YFB3PTV.js} +9 -9
  13. package/dist/chunk-2YRVHJEY.js +4 -0
  14. package/dist/{chunk-3CZ7DKE5.js → chunk-3AASYIOA.js} +3 -3
  15. package/dist/chunk-3DMDSAWK.js +20 -0
  16. package/dist/{chunk-KWQGJ3VC.js → chunk-3SG5EJFC.js} +1 -1
  17. package/dist/chunk-3T2WMZHC.js +1 -0
  18. package/dist/{chunk-773TIA5M.js → chunk-3VYOLEQE.js} +2 -2
  19. package/dist/chunk-3WVEL423.js +1 -0
  20. package/dist/{chunk-SVYHWGMI.js → chunk-3ZK5JZLY.js} +1 -1
  21. package/dist/chunk-44QTWXOJ.js +8 -0
  22. package/dist/{chunk-4QBJ5JBX.js → chunk-4A7FPJVT.js} +16 -15
  23. package/dist/chunk-4TQFTZVD.js +18 -0
  24. package/dist/chunk-4WACZNFF.js +1 -0
  25. package/dist/{chunk-RIM7FNP3.js → chunk-4XSYMLQG.js} +1 -1
  26. package/dist/{chunk-EJJPEWSB.js → chunk-4Y22EM45.js} +1 -1
  27. package/dist/chunk-53U6XS3J.js +1 -0
  28. package/dist/chunk-55NKAIIT.js +1 -0
  29. package/dist/chunk-55PABKRC.js +5 -0
  30. package/dist/chunk-5BLXN5WU.js +1 -0
  31. package/dist/{chunk-LAMTFOVF.js → chunk-5BYVVXGD.js} +1 -1
  32. package/dist/{chunk-Z5KYKXMH.js → chunk-5HEBS5DG.js} +3 -3
  33. package/dist/{chunk-LEW5IJK6.js → chunk-5HONV6NQ.js} +1 -1
  34. package/dist/chunk-5RL6DKWR.js +5 -0
  35. package/dist/chunk-5XO6PAMV.js +1 -0
  36. package/dist/chunk-6DHY67FO.js +6 -0
  37. package/dist/{chunk-6QADNGH4.js → chunk-6GA56I3E.js} +1 -1
  38. package/dist/chunk-6IL3B5Z5.js +4 -0
  39. package/dist/{chunk-RHBLXZGU.js → chunk-6ILP6QCH.js} +1 -1
  40. package/dist/{chunk-H7TDIRIU.js → chunk-6RBCFXJT.js} +1 -1
  41. package/dist/{chunk-WAJRWCZY.js → chunk-72HS7MHV.js} +1 -1
  42. package/dist/{chunk-SPNM3GES.js → chunk-74HXMIDM.js} +1 -1
  43. package/dist/{chunk-ZAH6QID2.js → chunk-77B77IGP.js} +1 -1
  44. package/dist/chunk-7DRKDQRT.js +1 -0
  45. package/dist/chunk-7HDJBEBP.js +3 -0
  46. package/dist/chunk-7IGMIDKK.js +15 -0
  47. package/dist/chunk-7QQPAT4L.js +1 -0
  48. package/dist/chunk-7Y4X5I6N.js +1 -0
  49. package/dist/{chunk-WGFGWDWP.js → chunk-7ZSN2QT5.js} +1 -1
  50. package/dist/chunk-A54V5UCD.js +5 -0
  51. package/dist/{chunk-VETLNJ56.js → chunk-AD4S2VEI.js} +1 -1
  52. package/dist/chunk-ADW7ECNU.js +7 -0
  53. package/dist/chunk-AS2O62JX.js +1 -0
  54. package/dist/chunk-ASUARYJD.js +1 -0
  55. package/dist/chunk-B4RPJYDH.js +1 -0
  56. package/dist/{chunk-ZCNNJCTQ.js → chunk-BJOJNAKH.js} +1 -1
  57. package/dist/chunk-BL5JWD3Y.js +16 -0
  58. package/dist/chunk-BOFCBTX7.js +1 -0
  59. package/dist/chunk-BPIQ4YTW.js +1 -0
  60. package/dist/chunk-C6FZII5S.js +1 -0
  61. package/dist/{chunk-NBXXTQWA.js → chunk-CACPRKUF.js} +1 -1
  62. package/dist/{chunk-QVO5CAJN.js → chunk-CHLSNYF7.js} +1 -1
  63. package/dist/chunk-CMICT4XI.js +1 -0
  64. package/dist/chunk-CPFAATMO.js +6 -0
  65. package/dist/{chunk-CSOCXWP6.js → chunk-CSRNHTHO.js} +2 -2
  66. package/dist/chunk-D3K42KBL.js +9 -0
  67. package/dist/chunk-DGMRL5DQ.js +1 -0
  68. package/dist/chunk-DKJPE42V.js +2 -0
  69. package/dist/{chunk-AIILEPSK.js → chunk-DYA5UUXL.js} +1 -1
  70. package/dist/chunk-E5ND6RBL.js +1 -0
  71. package/dist/{chunk-XKHKXUQY.js → chunk-E75DJTAF.js} +1 -1
  72. package/dist/chunk-ECEOBSGD.js +1 -0
  73. package/dist/{chunk-NDT3F2PR.js → chunk-EYSZRIUL.js} +1 -1
  74. package/dist/chunk-FCULF3JA.js +1 -0
  75. package/dist/chunk-FL34EOXG.js +1 -0
  76. package/dist/chunk-FW5HGFSZ.js +20 -0
  77. package/dist/{chunk-XRJCD3AO.js → chunk-G54BKNIX.js} +1 -1
  78. package/dist/{chunk-74CYT3VX.js → chunk-G7OIACY5.js} +1 -1
  79. package/dist/{chunk-IHH5XTPV.js → chunk-GALDYSEX.js} +1 -1
  80. package/dist/{chunk-A5U4KKNV.js → chunk-GDQLA5NB.js} +1 -1
  81. package/dist/{chunk-6A3TDSON.js → chunk-GJJBOCKD.js} +3 -3
  82. package/dist/{chunk-TAY7HU7X.js → chunk-GQZPGTG7.js} +20 -20
  83. package/dist/{chunk-XHXKPRF5.js → chunk-GVRFO4CV.js} +1 -1
  84. package/dist/chunk-HB3MJYBK.js +1 -0
  85. package/dist/{chunk-AEUCDGTB.js → chunk-HDQXFGYG.js} +1 -1
  86. package/dist/chunk-HSTNTHWM.js +1 -0
  87. package/dist/{chunk-A3U7JDUC.js → chunk-HSZC2LBB.js} +1 -1
  88. package/dist/chunk-I4FGM6UH.js +8 -0
  89. package/dist/chunk-I7GYNNCU.js +6 -0
  90. package/dist/{chunk-ZVA5F4QC.js → chunk-IBTQO3JD.js} +1 -1
  91. package/dist/{chunk-XWXAFJFC.js → chunk-IISE7SBT.js} +1 -1
  92. package/dist/chunk-IUZZWXJG.js +3 -0
  93. package/dist/chunk-IWML2HLC.js +5 -0
  94. package/dist/{chunk-CTNBSUVU.js → chunk-JA2QZ635.js} +2 -2
  95. package/dist/chunk-JOJRABPY.js +3 -0
  96. package/dist/chunk-JQKB3D37.js +1 -0
  97. package/dist/chunk-JROJL6RV.js +1 -0
  98. package/dist/{chunk-GINXNPAR.js → chunk-JTPVSO6Y.js} +1 -1
  99. package/dist/chunk-JWDUSMCA.js +1 -0
  100. package/dist/{chunk-CBMX6XI7.js → chunk-KLYJDAP6.js} +1 -1
  101. package/dist/{chunk-4HOJJCZ6.js → chunk-KVROYIUQ.js} +1 -1
  102. package/dist/chunk-L5XWYTHY.js +836 -0
  103. package/dist/chunk-LOTGSNS5.js +2 -0
  104. package/dist/{chunk-FGRW7GT4.js → chunk-LQLFMDVD.js} +1 -1
  105. package/dist/{chunk-7LZ34C4S.js → chunk-LSWFHTJT.js} +1 -1
  106. package/dist/{chunk-HYPY5WH6.js → chunk-LV2IWYGL.js} +1 -1
  107. package/dist/{chunk-W4SGAPPR.js → chunk-LYPNQFWX.js} +1 -1
  108. package/dist/{chunk-U6URYCC6.js → chunk-MRVQ6XRW.js} +1 -1
  109. package/dist/chunk-MVVHISCR.js +2 -0
  110. package/dist/{chunk-UJBMY5WR.js → chunk-N4DE5H65.js} +1 -1
  111. package/dist/{chunk-W6ST525S.js → chunk-N56BJ3F7.js} +1 -1
  112. package/dist/{chunk-W4SQE6NR.js → chunk-NF7MOA4K.js} +1 -1
  113. package/dist/{chunk-7KLPRSQR.js → chunk-NGN7U2UF.js} +1 -1
  114. package/dist/{chunk-TCFGEOE4.js → chunk-NTVEJYKI.js} +1 -1
  115. package/dist/chunk-NYABB6XW.js +1 -0
  116. package/dist/{chunk-DH3DMUE2.js → chunk-O6E7YL7N.js} +2 -2
  117. package/dist/chunk-OASB6XPV.js +16 -0
  118. package/dist/{chunk-WY7QF7VU.js → chunk-OBYY45BX.js} +1 -1
  119. package/dist/chunk-OETFY7FE.js +28 -0
  120. package/dist/{chunk-QZEDYQVT.js → chunk-OEZATTOS.js} +1 -1
  121. package/dist/{chunk-D6LQ56XT.js → chunk-OG7SF4FU.js} +1 -1
  122. package/dist/chunk-OM243CQ6.js +6 -0
  123. package/dist/chunk-P3Z5RLVV.js +3 -0
  124. package/dist/{chunk-HINK4QAR.js → chunk-PBBZNGS4.js} +1 -1
  125. package/dist/chunk-PGTKKP2B.js +11 -0
  126. package/dist/chunk-PK4ID32C.js +1 -0
  127. package/dist/{chunk-7FVCUY54.js → chunk-PVOWU77O.js} +1 -1
  128. package/dist/{chunk-66HW6J57.js → chunk-PXD2WJOI.js} +3 -3
  129. package/dist/chunk-PXXTSW6I.js +4 -0
  130. package/dist/{chunk-AU7GNCOK.js → chunk-PZHE37Z4.js} +1 -1
  131. package/dist/{chunk-TA2M37OB.js → chunk-Q34PKJRR.js} +1 -1
  132. package/dist/{chunk-S5H5U3PR.js → chunk-Q3O3AFZT.js} +1 -1
  133. package/dist/chunk-Q45XAEG2.js +16 -0
  134. package/dist/{chunk-QKTBYAUD.js → chunk-QAXFCAOV.js} +5 -5
  135. package/dist/{chunk-FY47X4NG.js → chunk-QBGSSUJP.js} +1 -1
  136. package/dist/chunk-QILWHHAQ.js +1 -0
  137. package/dist/chunk-QJST4LZX.js +1 -0
  138. package/dist/chunk-QQN4PJZD.js +1 -0
  139. package/dist/{chunk-6P5FGN6P.js → chunk-QSKOR3ED.js} +1 -1
  140. package/dist/{chunk-FRVRTOTF.js → chunk-QTEWTPAQ.js} +2 -2
  141. package/dist/chunk-QWDJRSJJ.js +1 -0
  142. package/dist/{chunk-GTAYTMCP.js → chunk-R757TSQ6.js} +1 -1
  143. package/dist/chunk-RCIU7NHA.js +1 -0
  144. package/dist/chunk-RGIUP4FW.js +1 -0
  145. package/dist/{chunk-RDS2WYQH.js → chunk-RHNFWHFY.js} +1 -1
  146. package/dist/{chunk-VG3YVCZW.js → chunk-S7536EWZ.js} +4 -4
  147. package/dist/{chunk-VBICZDA4.js → chunk-SDFO7P2M.js} +1 -1
  148. package/dist/{chunk-JQPPLSFT.js → chunk-SDJNAUU6.js} +1 -1
  149. package/dist/chunk-SGBLCVUX.js +1 -0
  150. package/dist/chunk-SJARQZVN.js +3 -0
  151. package/dist/chunk-SKRUMRB4.js +383 -0
  152. package/dist/{chunk-5Z6EW3FA.js → chunk-SW5EWGBJ.js} +1 -1
  153. package/dist/chunk-SXPWOYLT.js +7 -0
  154. package/dist/chunk-T234RERA.js +7 -0
  155. package/dist/chunk-TJJVX7CU.js +4 -0
  156. package/dist/{chunk-L4LDNEFK.js → chunk-TMV37ENR.js} +1 -1
  157. package/dist/{chunk-BYX7SQPM.js → chunk-TNXZWQZU.js} +1 -1
  158. package/dist/{chunk-67QK26HI.js → chunk-TO7TXDLU.js} +1 -1
  159. package/dist/chunk-TSLZNTFM.js +3 -0
  160. package/dist/{chunk-BG7QQU23.js → chunk-UFU2LGFK.js} +1 -1
  161. package/dist/chunk-VDDNDA5K.js +15 -0
  162. package/dist/{chunk-T4V7KOGJ.js → chunk-VFO5OYQ4.js} +1 -1
  163. package/dist/{chunk-HXVUDGLH.js → chunk-VFP3PUGZ.js} +24 -24
  164. package/dist/{chunk-6QDOCBD4.js → chunk-VZUHMW5E.js} +4 -3
  165. package/dist/chunk-W7CBJNXD.js +12 -0
  166. package/dist/chunk-WCAGYCT7.js +4 -0
  167. package/dist/{chunk-DPNZWBT5.js → chunk-WNO2V53C.js} +1 -1
  168. package/dist/{chunk-Y4BBTWM5.js → chunk-WPUQTUDX.js} +1 -1
  169. package/dist/chunk-WU7MSL3I.js +8 -0
  170. package/dist/chunk-WXV35TPE.js +1 -0
  171. package/dist/{chunk-2WATX3XV.js → chunk-XBSWZ6BT.js} +6 -6
  172. package/dist/chunk-XCNJL7ES.js +1 -0
  173. package/dist/{chunk-C4Y7PQDQ.js → chunk-XFZDFDZV.js} +1 -1
  174. package/dist/chunk-XTYSJIZY.js +1 -0
  175. package/dist/chunk-Y5ZN62VF.js +1 -0
  176. package/dist/{chunk-PNNW7YQG.js → chunk-YAH5WFYR.js} +3 -3
  177. package/dist/{chunk-DUNE3INK.js → chunk-YBQKJHZW.js} +1 -1
  178. package/dist/chunk-YD66PU3Y.js +1 -0
  179. package/dist/chunk-YGFEUXKQ.js +1 -0
  180. package/dist/chunk-YJWNM4XO.js +18 -0
  181. package/dist/{chunk-L3JBKCAS.js → chunk-YQQHBFMA.js} +1 -1
  182. package/dist/chunk-YRHFPXC3.js +1 -0
  183. package/dist/chunk-YTJ3EPD3.js +1 -0
  184. package/dist/chunk-YX5GRXRS.js +2368 -0
  185. package/dist/chunk-Z35PUKKP.js +7 -0
  186. package/dist/{chunk-7VQBIGJB.js → chunk-Z3XIZMEM.js} +1 -1
  187. package/dist/chunk-ZGASBRSQ.js +5 -0
  188. package/dist/{chunk-OY6L7J53.js → chunk-ZHJ6KA43.js} +1 -1
  189. package/dist/{chunk-YHTONNIZ.js → chunk-ZO4IBP4B.js} +1 -1
  190. package/dist/chunk-ZOYSMJ27.js +1 -0
  191. package/dist/chunk-ZPCCSPAE.js +3 -0
  192. package/dist/chunk-ZSJXZCAW.js +4 -0
  193. package/dist/{chunk-CP56F5UR.js → chunk-ZSVR5NEO.js} +1 -1
  194. package/dist/{chunk-JJJIRCQP.js → chunk-ZUVAHONX.js} +1 -1
  195. package/dist/chunk-ZVDFCUJT.js +2 -0
  196. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  197. package/dist/cli/commands/app/build.js +1 -1
  198. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  199. package/dist/cli/commands/app/bulk/execute.js +1 -1
  200. package/dist/cli/commands/app/bulk/status.js +1 -1
  201. package/dist/cli/commands/app/config/link.js +1 -1
  202. package/dist/cli/commands/app/config/pull.js +1 -1
  203. package/dist/cli/commands/app/config/use.js +1 -1
  204. package/dist/cli/commands/app/config/validate.js +1 -1
  205. package/dist/cli/commands/app/demo/watcher.js +1 -1
  206. package/dist/cli/commands/app/deploy.js +1 -1
  207. package/dist/cli/commands/app/dev/clean.js +1 -1
  208. package/dist/cli/commands/app/dev.js +1 -1
  209. package/dist/cli/commands/app/env/pull.js +1 -1
  210. package/dist/cli/commands/app/env/show.js +1 -1
  211. package/dist/cli/commands/app/execute.js +1 -1
  212. package/dist/cli/commands/app/function/build.js +1 -1
  213. package/dist/cli/commands/app/function/info.js +1 -1
  214. package/dist/cli/commands/app/function/replay.js +1 -1
  215. package/dist/cli/commands/app/function/run.js +1 -1
  216. package/dist/cli/commands/app/function/schema.js +1 -1
  217. package/dist/cli/commands/app/function/typegen.js +1 -1
  218. package/dist/cli/commands/app/generate/extension.js +1 -1
  219. package/dist/cli/commands/app/graphiql.js +1 -1
  220. package/dist/cli/commands/app/import/channel-config.js +1 -0
  221. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -0
  222. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -0
  223. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  224. package/dist/cli/commands/app/import-extensions.js +1 -1
  225. package/dist/cli/commands/app/info.js +1 -1
  226. package/dist/cli/commands/app/init.js +1 -1
  227. package/dist/cli/commands/app/logs.js +1 -1
  228. package/dist/cli/commands/app/release.js +1 -1
  229. package/dist/cli/commands/app/security/check.js +1 -0
  230. package/dist/cli/commands/app/security/clean.js +1 -0
  231. package/dist/cli/commands/app/security/instructions.js +1 -0
  232. package/dist/cli/commands/app/security/record.js +1 -0
  233. package/dist/cli/commands/app/security/review.js +1 -0
  234. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  235. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  236. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  237. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  238. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  239. package/dist/cli/commands/app/versions/list.js +1 -1
  240. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  241. package/dist/cli/commands/auth/login.d.ts +16 -1
  242. package/dist/cli/commands/auth/login.js +1 -1
  243. package/dist/cli/commands/auth/logout.d.ts +16 -1
  244. package/dist/cli/commands/auth/logout.js +1 -1
  245. package/dist/cli/commands/cache/clear.js +1 -1
  246. package/dist/cli/commands/config/autoupgrade/off.d.ts +13 -0
  247. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  248. package/dist/cli/commands/config/autoupgrade/on.d.ts +13 -0
  249. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  250. package/dist/cli/commands/config/autoupgrade/status.d.ts +13 -0
  251. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  252. package/dist/cli/commands/debug/command-flags.js +1 -1
  253. package/dist/cli/commands/doc/fetch.d.ts +2 -0
  254. package/dist/cli/commands/doc/fetch.js +1 -1
  255. package/dist/cli/commands/doc/search.d.ts +1 -0
  256. package/dist/cli/commands/doc/search.js +1 -1
  257. package/dist/cli/commands/docs/generate.js +1 -1
  258. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  259. package/dist/cli/commands/doctor-release/theme/index.d.ts +1 -0
  260. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  261. package/dist/cli/commands/help.d.ts +431 -1
  262. package/dist/cli/commands/help.js +1 -1
  263. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  264. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  265. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  266. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  267. package/dist/cli/commands/notifications/generate.js +1 -1
  268. package/dist/cli/commands/notifications/list.js +1 -1
  269. package/dist/cli/commands/organization/list.js +1 -1
  270. package/dist/cli/commands/search.d.ts +11 -1
  271. package/dist/cli/commands/search.js +1 -1
  272. package/dist/cli/commands/send-analytics.js +1 -1
  273. package/dist/cli/commands/theme/check.js +1 -1
  274. package/dist/cli/commands/theme/console.js +1 -1
  275. package/dist/cli/commands/theme/delete.js +1 -1
  276. package/dist/cli/commands/theme/dev.js +1 -1
  277. package/dist/cli/commands/theme/duplicate.js +1 -1
  278. package/dist/cli/commands/theme/info.js +1 -1
  279. package/dist/cli/commands/theme/init.js +1 -1
  280. package/dist/cli/commands/theme/language-server.js +1 -1
  281. package/dist/cli/commands/theme/list.js +1 -1
  282. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  283. package/dist/cli/commands/theme/open.js +1 -1
  284. package/dist/cli/commands/theme/package.js +1 -1
  285. package/dist/cli/commands/theme/preview.js +1 -1
  286. package/dist/cli/commands/theme/profile.js +1 -1
  287. package/dist/cli/commands/theme/publish.js +1 -1
  288. package/dist/cli/commands/theme/pull.js +1 -1
  289. package/dist/cli/commands/theme/push.js +1 -1
  290. package/dist/cli/commands/theme/rename.js +1 -1
  291. package/dist/cli/commands/theme/share.js +1 -1
  292. package/dist/cli/commands/upgrade.js +1 -1
  293. package/dist/cli/commands/version.d.ts +15 -1
  294. package/dist/cli/commands/version.js +1 -1
  295. package/dist/cli/help.d.ts +5 -2
  296. package/dist/cli/help.js +6 -2
  297. package/dist/cli/services/commands/auth/login/types.d.ts +11 -0
  298. package/dist/cli/services/commands/auth/login/types.js +7 -0
  299. package/dist/cli/services/commands/config/autoupgrade/index.d.ts +3 -0
  300. package/dist/cli/services/commands/config/autoupgrade/index.js +9 -0
  301. package/dist/cli/services/commands/config/autoupgrade/result.d.ts +2 -0
  302. package/dist/cli/services/commands/config/autoupgrade/result.js +15 -0
  303. package/dist/cli/services/commands/config/autoupgrade/types.d.ts +10 -0
  304. package/dist/cli/services/commands/config/autoupgrade/types.js +7 -0
  305. package/dist/cli/services/commands/doc/fetch.d.ts +1 -1
  306. package/dist/cli/services/commands/doc/fetch.js +11 -2
  307. package/dist/cli/services/commands/help/index.d.ts +3 -0
  308. package/dist/cli/services/commands/help/index.js +51 -0
  309. package/dist/cli/services/commands/help/result.d.ts +2 -0
  310. package/dist/cli/services/commands/help/result.js +6 -0
  311. package/dist/cli/services/commands/help/types.d.ts +431 -0
  312. package/dist/cli/services/commands/help/types.js +71 -0
  313. package/dist/cli/services/commands/search/index.d.ts +2 -0
  314. package/dist/cli/services/commands/search/index.js +8 -0
  315. package/dist/cli/services/commands/search/result.d.ts +2 -0
  316. package/dist/cli/services/commands/search/result.js +12 -0
  317. package/dist/cli/services/commands/search/types.d.ts +10 -0
  318. package/dist/cli/services/commands/search/types.js +7 -0
  319. package/dist/cli/services/commands/version/index.d.ts +2 -0
  320. package/dist/cli/services/commands/version/index.js +5 -0
  321. package/dist/cli/services/commands/version/result.d.ts +2 -0
  322. package/dist/cli/services/commands/version/result.js +6 -0
  323. package/dist/cli/services/commands/version/types.d.ts +10 -0
  324. package/dist/cli/services/commands/version/types.js +7 -0
  325. package/dist/command-json-schema-Y3N2NUZN.js +1 -0
  326. package/dist/command-registry.js +1 -1
  327. package/dist/{conf-store-H3UAVGN5.js → conf-store-5ZA3ILWV.js} +1 -1
  328. package/dist/custom-oclif-loader-VQKMCXNH.js +1 -0
  329. package/dist/deprecations-PFQXWNF6.js +1 -0
  330. package/dist/dist-4X53WJBQ.js +1 -0
  331. package/dist/dist-5M2V3YCM.js +1 -0
  332. package/dist/environment-ZUTBXY7U.js +1 -0
  333. package/dist/environments-3RUZ7F4Q.js +1 -0
  334. package/dist/error-FBSXLW22.js +1 -0
  335. package/dist/error-handler-D5BURRJ7.js +1 -0
  336. package/dist/fs-ZLV5W4TV.js +1 -0
  337. package/dist/hooks/did-you-mean.js +1 -1
  338. package/dist/hooks/hydrogen-init.js +1 -1
  339. package/dist/hooks/plugin-plugins.js +1 -1
  340. package/dist/hooks/postrun.js +1 -1
  341. package/dist/hooks/prerun.js +1 -1
  342. package/dist/hooks/public-metadata.js +1 -1
  343. package/dist/hooks/sensitive-metadata.js +1 -1
  344. package/dist/hooks/tunnel-provider.js +1 -1
  345. package/dist/hooks/tunnel-start.js +1 -1
  346. package/dist/http-proxy-node16-D3JUYA5D.js +38 -0
  347. package/dist/index.js +13 -14
  348. package/dist/is-global-GZ5CIXQA.js +1 -0
  349. package/dist/json-error-2BL3UZ7H.js +1 -0
  350. package/dist/lib-AD2G3QH3.js +1 -0
  351. package/dist/lib-VEVNMHDE.js +1 -0
  352. package/dist/lib-ZQW4E7QU.js +1 -0
  353. package/dist/local-KAZJAYLX.js +1 -0
  354. package/dist/metadata-M3ZE24WB.js +1 -0
  355. package/dist/{morph-BMYYMQNX.js → morph-42EXMN3K.js} +3 -3
  356. package/dist/node-package-manager-RVPONQBY.js +1 -0
  357. package/dist/notifications-system-MYEMV7JF.js +1 -0
  358. package/dist/os-DRUILZZR.js +1 -0
  359. package/dist/output-SDE274Y5.js +1 -0
  360. package/dist/{path-MBXP7ZIC.js → path-6YMSTSWG.js} +1 -1
  361. package/dist/system-5FQ3L5PA.js +1 -0
  362. package/dist/tsconfig.tsbuildinfo +1 -1
  363. package/dist/ui-TEZZM7SE.js +1 -0
  364. package/dist/uncaught-error-handler.d.ts +6 -0
  365. package/dist/uncaught-error-handler.js +33 -0
  366. package/dist/upgrade-3PIVJYBL.js +1 -0
  367. package/dist/version-FMWTVLMF.js +1 -0
  368. package/dist/version-IAMVSP7U.js +1 -0
  369. package/dist/workerd-WRW4ZUYM.js +18 -0
  370. package/oclif.manifest.json +2646 -226
  371. package/package.json +17 -8
  372. package/dist/analytics-M4OC7RPG.js +0 -1
  373. package/dist/analytics-RGIJMP4U.js +0 -1
  374. package/dist/chunk-2HW6VRJT.js +0 -2
  375. package/dist/chunk-2HYR6EUD.js +0 -1
  376. package/dist/chunk-2IRRFPEY.js +0 -1
  377. package/dist/chunk-2KD4LHRT.js +0 -5
  378. package/dist/chunk-2SL443J6.js +0 -1
  379. package/dist/chunk-2VJ6NBPV.js +0 -15
  380. package/dist/chunk-2ZROBXJX.js +0 -11
  381. package/dist/chunk-3DIRCEXA.js +0 -1
  382. package/dist/chunk-3DT4NS4S.js +0 -4
  383. package/dist/chunk-3IQ6WXDD.js +0 -3
  384. package/dist/chunk-43FRAUV6.js +0 -19
  385. package/dist/chunk-44QD4QNO.js +0 -1
  386. package/dist/chunk-4DLRS7MT.js +0 -12
  387. package/dist/chunk-4F3XYIEY.js +0 -1
  388. package/dist/chunk-4OMKKYFC.js +0 -9
  389. package/dist/chunk-4ZTRKEA2.js +0 -1
  390. package/dist/chunk-5DMFEDKY.js +0 -28
  391. package/dist/chunk-66G2HJ2A.js +0 -3
  392. package/dist/chunk-6B727IUY.js +0 -5
  393. package/dist/chunk-6C5AVMKR.js +0 -375
  394. package/dist/chunk-6CR2EEZ3.js +0 -6
  395. package/dist/chunk-6V6UNUMM.js +0 -3
  396. package/dist/chunk-6XLFFOPK.js +0 -1
  397. package/dist/chunk-A3V2A2I4.js +0 -2
  398. package/dist/chunk-AQPOPSQ7.js +0 -1
  399. package/dist/chunk-BAWBC66R.js +0 -5
  400. package/dist/chunk-BHJ3TGS7.js +0 -1
  401. package/dist/chunk-BHTHUKHU.js +0 -1
  402. package/dist/chunk-BV62ZERJ.js +0 -6
  403. package/dist/chunk-CFQ5G2QS.js +0 -1
  404. package/dist/chunk-CNK3ZO2B.js +0 -836
  405. package/dist/chunk-CRALWNNO.js +0 -1
  406. package/dist/chunk-CVW2HMQO.js +0 -317
  407. package/dist/chunk-D6QTOQEJ.js +0 -6
  408. package/dist/chunk-DDZEYA2I.js +0 -8
  409. package/dist/chunk-DO4SRE4M.js +0 -3
  410. package/dist/chunk-DZZORIWL.js +0 -4
  411. package/dist/chunk-EQ2PD2ZA.js +0 -2
  412. package/dist/chunk-ERBXXVOZ.js +0 -2
  413. package/dist/chunk-FW3RORD7.js +0 -1
  414. package/dist/chunk-G2YTINLI.js +0 -6
  415. package/dist/chunk-GCN4O7HM.js +0 -1
  416. package/dist/chunk-GGPMDCCB.js +0 -8
  417. package/dist/chunk-GJHBAOGJ.js +0 -1
  418. package/dist/chunk-H2HR2AQE.js +0 -7
  419. package/dist/chunk-HYM3HBDG.js +0 -20
  420. package/dist/chunk-IHEBV2KO.js +0 -1
  421. package/dist/chunk-JWHQPDOK.js +0 -3
  422. package/dist/chunk-JXG2T76F.js +0 -6
  423. package/dist/chunk-K2DP5Z76.js +0 -1
  424. package/dist/chunk-KUZ5Z6HM.js +0 -1
  425. package/dist/chunk-KZU727AL.js +0 -1
  426. package/dist/chunk-L2DCUVZV.js +0 -1
  427. package/dist/chunk-L3M7PTHU.js +0 -15
  428. package/dist/chunk-LBA6FGKC.js +0 -3
  429. package/dist/chunk-LX5UXWZ7.js +0 -1
  430. package/dist/chunk-M7VQLMSW.js +0 -1
  431. package/dist/chunk-MBRFIXCU.js +0 -1705
  432. package/dist/chunk-MYLMGH7Y.js +0 -1
  433. package/dist/chunk-NKC3K3XP.js +0 -1
  434. package/dist/chunk-O72SHE3Q.js +0 -7
  435. package/dist/chunk-OAG72Q2O.js +0 -1
  436. package/dist/chunk-OPOPO7DG.js +0 -7
  437. package/dist/chunk-OUA6EOLX.js +0 -11
  438. package/dist/chunk-OYCAYEQE.js +0 -7
  439. package/dist/chunk-PGWQHSDV.js +0 -1
  440. package/dist/chunk-PM3HRKPR.js +0 -1
  441. package/dist/chunk-POMWFTBD.js +0 -16
  442. package/dist/chunk-R3GLEZSE.js +0 -4
  443. package/dist/chunk-RHNZA4IL.js +0 -5
  444. package/dist/chunk-SCLGMVNB.js +0 -1
  445. package/dist/chunk-TU47HMTL.js +0 -1
  446. package/dist/chunk-UPGRXCFS.js +0 -4
  447. package/dist/chunk-V2GLAK2W.js +0 -1
  448. package/dist/chunk-V4774HTF.js +0 -1
  449. package/dist/chunk-VDGTHMIQ.js +0 -3
  450. package/dist/chunk-VJ5YOXKL.js +0 -1
  451. package/dist/chunk-WGUCRVII.js +0 -3
  452. package/dist/chunk-X4V2CD2H.js +0 -8
  453. package/dist/chunk-XOYICV6P.js +0 -1
  454. package/dist/chunk-XYUTD6IU.js +0 -1
  455. package/dist/chunk-YNFXYVYN.js +0 -2
  456. package/dist/chunk-Z2HN5L6G.js +0 -6
  457. package/dist/chunk-ZVJD6CUY.js +0 -18
  458. package/dist/cli/commands/app/doctor/instructions.js +0 -1
  459. package/dist/cli/commands/app/doctor.js +0 -1
  460. package/dist/cli/commands/config/autoupgrade/constants.d.ts +0 -4
  461. package/dist/cli/commands/config/autoupgrade/constants.js +0 -1
  462. package/dist/cli/services/commands/search.d.ts +0 -1
  463. package/dist/cli/services/commands/search.js +0 -7
  464. package/dist/cli/services/commands/version.d.ts +0 -1
  465. package/dist/cli/services/commands/version.js +0 -6
  466. package/dist/custom-oclif-loader-BWAMUFQ4.js +0 -1
  467. package/dist/deprecations-TEUM7CML.js +0 -1
  468. package/dist/dist-62I5X3FS.js +0 -1
  469. package/dist/dist-YHZ5BTYD.js +0 -1
  470. package/dist/environments-LAFWOQWO.js +0 -1
  471. package/dist/error-6ZCGAC5E.js +0 -1
  472. package/dist/error-handler-JNCW56EC.js +0 -1
  473. package/dist/fs-QEWOWUPQ.js +0 -1
  474. package/dist/http-proxy-node16-A6AKKRQH.js +0 -38
  475. package/dist/is-global-UYMEAGDR.js +0 -1
  476. package/dist/lib-2BR2WN7L.js +0 -1
  477. package/dist/lib-M72BVWQ3.js +0 -1
  478. package/dist/lib-P3APEIHY.js +0 -1
  479. package/dist/local-Z4ZEMWE4.js +0 -1
  480. package/dist/metadata-ZCQMB5AB.js +0 -1
  481. package/dist/node-package-manager-HMOTOBDS.js +0 -1
  482. package/dist/notifications-system-RT3CY6LZ.js +0 -1
  483. package/dist/os-G6KDPJMC.js +0 -1
  484. package/dist/output-BJCZYDNG.js +0 -1
  485. package/dist/system-T4H2ISV6.js +0 -1
  486. package/dist/ui-4MQSY5IN.js +0 -1
  487. package/dist/upgrade-4234MIYJ.js +0 -1
  488. package/dist/version-FRSRSCRX.js +0 -1
  489. package/dist/version-RF7QQXRX.js +0 -1
  490. package/dist/workerd-7E4H2DM3.js +0 -18
@@ -1,13 +1,13 @@
1
- import{a as Mc,e as jc,f as Bc}from"./chunk-XWXAFJFC.js";import{a as $c}from"./chunk-HYPY5WH6.js";import{c as Rc,i as Lc,o as hy}from"./chunk-YLQ3LNNY.js";import{b as fn}from"./chunk-4DLRS7MT.js";import{D as cn,S as wc,U as Ec,V as bc,ka as Dc,oa as Cc,t as xc}from"./chunk-CNK3ZO2B.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as po}from"./chunk-6QADNGH4.js";import{A as Xe,C as ln,D as tt,E as rt,H as Ic,J as Sr,v as Be,y as mt,z as Cr}from"./chunk-6C5AVMKR.js";import{a as ly}from"./chunk-QZEDYQVT.js";import{h as I,k as hn}from"./chunk-OAG72Q2O.js";import{a as gc,c as yc,d as co,e as Dr,f as ry,g as lo,h as iy,i as ny,j as vc,k as ho,m as ay,n as fo,p as uy,u as cy}from"./chunk-TR4OWSEX.js";import{a as ty,b as et}from"./chunk-2KD4LHRT.js";import{b as ey}from"./chunk-I5A6BPCP.js";import{a as oy}from"./chunk-ET2CGROE.js";import{c as sy}from"./chunk-TOLPNBZK.js";import{$a as mc,Ab as me,Ca as uo,Ea as un,T as cc,Ta as U,W as lc,Wa as pc,Y as hc,_ as fc,gb as Sc,ia as Q0,ma as X,mb as Oc,ob as Pc,pa as br,qb as gt,rb as Nc,sb as Ar,ua as V,wa as on,xb as it,ya as an}from"./chunk-43FRAUV6.js";import{i as W}from"./chunk-B4OMIONW.js";import{a as Z0,b as dc}from"./chunk-LD6ZCTZ3.js";import{d as N,f as J,g as kt,i as le,j as Tt,k as sn,n as uc}from"./chunk-773TIA5M.js";import{a as F,c as E,e as nn,g as y}from"./chunk-VKWPEFWQ.js";var Ot=E(mo=>{"use strict";y();Object.defineProperty(mo,"__esModule",{value:!0});var py=e=>{process.stdout.write(e)},my=e=>{process.stderr.write(e)};mo.default={stderr:my,stdout:py}});var yt=E(Ce=>{"use strict";y();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.existsSync=Ce.safeReadJson=Ce.readJsonSync=Ce.readJson=Ce.fileExists=Ce.dirExists=void 0;var zc=F("node:fs"),go=F("node:fs/promises"),gy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};Ce.dirExists=gy;var yy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};Ce.fileExists=yy;async function Jc(e){let t=await(0,go.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=Jc;function vy(e,t=!0){let r=(0,zc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=vy;async function xy(e){try{return await Jc(e)}catch{}}Ce.safeReadJson=xy;function wy(e){return(0,zc.existsSync)(e)}Ce.existsSync=wy});var oe=E(q=>{"use strict";y();Object.defineProperty(q,"__esModule",{value:!0});q.mergeNestedObjects=q.mapValues=q.uniq=q.isNotFalsy=q.isTruthy=q.capitalize=q.sumBy=q.maxBy=q.isProd=q.castArray=q.sortBy=q.last=q.uniqBy=q.compact=q.pickBy=void 0;function Ey(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}q.pickBy=Ey;function by(e){return e.filter(t=>!!t)}q.compact=by;function Dy(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}q.uniqBy=Dy;function Cy(e){if(e)return e.at(-1)}q.last=Cy;function yo(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=yo(e[0],t[0]);return r!==0?r:yo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Sy(e,t){return e.sort((r,i)=>yo(t(r),t(i)))}q.sortBy=Sy;function Ay(e){return e===void 0?[]:Array.isArray(e)?e:[e]}q.castArray=Ay;function _y(){return!["development","test"].includes(process.env.NODE_ENV??"")}q.isProd=_y;function Fy(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}q.maxBy=Fy;function ky(e,t){return e.reduce((r,i)=>r+t(i),0)}q.sumBy=ky;function Ty(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}q.capitalize=Ty;function Oy(e){return["1","true","y","yes"].includes(e.toLowerCase())}q.isTruthy=Oy;function Py(e){return!["0","false","n","no"].includes(e.toLowerCase())}q.isNotFalsy=Py;function Iy(e){return[...new Set(e)].sort()}q.uniq=Iy;function Ny(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}q.mapValues=Ny;function My(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function jy(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(My(r,t)??{})).reverse())}q.mergeNestedObjects=jy});var Gc=E(ge=>{"use strict";y();Object.defineProperty(ge,"__esModule",{value:!0});ge.string=ge.url=ge.file=ge.directory=ge.integer=ge.boolean=ge.custom=void 0;var By=F("node:url"),Wc=yt(),Ry=oe();function Vt(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}ge.custom=Vt;ge.boolean=Vt({parse:async e=>!!e&&(0,Ry.isNotFalsy)(e)});ge.integer=Vt({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ge.directory=Vt({async parse(e,t,r){return r.exists?(0,Wc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Wc.fileExists)(e):e}});ge.url=Vt({async parse(e){try{return new By.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var Ly=Vt({});ge.string=Ly});var Xc=E((sT,$y)=>{$y.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var Ve=E(xo=>{"use strict";y();Object.defineProperty(xo,"__esModule",{value:!0});var qy=F("node:fs"),Uy=F("node:path"),vo=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Xc().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,qy.readFileSync)((0,Uy.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};xo.default=vo});var Pt=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.settings=void 0;global.oclif||(global.oclif={});dn.settings=global.oclif});var Yt=E(_r=>{"use strict";y();Object.defineProperty(_r,"__esModule",{value:!0});_r.errtermwidth=_r.stdtermwidth=void 0;var Hy=Pt();function Vc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Yc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Hy.settings.columns;_r.stdtermwidth=Yc||Vc(process.stdout);_r.errtermwidth=Yc||Vc(process.stderr)});var bo=E(pn=>{"use strict";y();Object.defineProperty(pn,"__esModule",{value:!0});pn.Logger=void 0;var Kc=F("node:fs/promises"),zy=F("node:path"),Jy=Dr(),Wy=()=>new Date().toISOString(),wo,Gy=e=>new Promise(t=>{wo&&wo.unref(),wo=setTimeout(()=>t(null),e)});function Xy(e){return e.endsWith(`
1
+ import{a as Mc,e as jc,f as Bc}from"./chunk-IISE7SBT.js";import{a as $c}from"./chunk-LV2IWYGL.js";import{c as Rc,i as Lc,o as hy}from"./chunk-YLQ3LNNY.js";import{b as fn}from"./chunk-FW5HGFSZ.js";import{J as wc,L as Ec,M as bc,ba as Dc,fa as Cc,l as xc,u as cn}from"./chunk-L5XWYTHY.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as po}from"./chunk-6GA56I3E.js";import{A as Xe,C as ln,D as tt,E as rt,H as Ic,J as Sr,v as Be,y as mt,z as Cr}from"./chunk-SKRUMRB4.js";import{a as ly}from"./chunk-OEZATTOS.js";import{i as I,l as hn}from"./chunk-FCULF3JA.js";import{Aa as on,Ab as Pc,Ca as an,Cb as gt,Db as Nc,Eb as Ar,Ga as fo,Ia as un,Kb as it,Nb as me,X as fc,Xa as U,_ as dc,_a as yc,aa as pc,ca as mc,db as vc,ma as uy,qa as X,ta as Dr,tb as Sc,ya as V,yb as Oc}from"./chunk-YJWNM4XO.js";import{i as W}from"./chunk-B4OMIONW.js";import{a as cy,b as gc}from"./chunk-LD6ZCTZ3.js";import{d as N,f as J,g as kt,i as le,j as Tt,k as sn,n as hc}from"./chunk-3VYOLEQE.js";import{a as uc,c as cc,d as uo,e as br,f as ey,g as co,h as ty,i as ry,j as lc,k as lo,m as sy,n as ho,p as oy,u as ay}from"./chunk-TR4OWSEX.js";import{b as Z0,c as et}from"./chunk-ZGASBRSQ.js";import{b as Q0}from"./chunk-I5A6BPCP.js";import{a as ny}from"./chunk-ET2CGROE.js";import{c as iy}from"./chunk-TOLPNBZK.js";import{a as F,c as E,e as nn,g as y}from"./chunk-VKWPEFWQ.js";var Ot=E(mo=>{"use strict";y();Object.defineProperty(mo,"__esModule",{value:!0});var py=e=>{process.stdout.write(e)},my=e=>{process.stderr.write(e)};mo.default={stderr:my,stdout:py}});var yt=E(Ce=>{"use strict";y();Object.defineProperty(Ce,"__esModule",{value:!0});Ce.existsSync=Ce.safeReadJson=Ce.readJsonSync=Ce.readJson=Ce.fileExists=Ce.dirExists=void 0;var zc=F("node:fs"),go=F("node:fs/promises"),gy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No directory found at ${e}`)}if(!t.isDirectory())throw new Error(`${e} exists but is not a directory`);return e};Ce.dirExists=gy;var yy=async e=>{let t;try{t=await(0,go.stat)(e)}catch{throw new Error(`No file found at ${e}`)}if(!t.isFile())throw new Error(`${e} exists but is not a file`);return e};Ce.fileExists=yy;async function Jc(e){let t=await(0,go.readFile)(e,"utf8");return JSON.parse(t)}Ce.readJson=Jc;function vy(e,t=!0){let r=(0,zc.readFileSync)(e,"utf8");return t?JSON.parse(r):r}Ce.readJsonSync=vy;async function xy(e){try{return await Jc(e)}catch{}}Ce.safeReadJson=xy;function wy(e){return(0,zc.existsSync)(e)}Ce.existsSync=wy});var oe=E(q=>{"use strict";y();Object.defineProperty(q,"__esModule",{value:!0});q.mergeNestedObjects=q.mapValues=q.uniq=q.isNotFalsy=q.isTruthy=q.capitalize=q.sumBy=q.maxBy=q.isProd=q.castArray=q.sortBy=q.last=q.uniqBy=q.compact=q.pickBy=void 0;function Ey(e,t){return Object.entries(e).reduce((r,[i,n])=>(t(n)&&(r[i]=n),r),{})}q.pickBy=Ey;function by(e){return e.filter(t=>!!t)}q.compact=by;function Dy(e,t){return e.filter((r,i)=>{let n=t(r);return!e.some((o,s)=>s>i&&t(o)===n)})}q.uniqBy=Dy;function Cy(e){if(e)return e.at(-1)}q.last=Cy;function yo(e,t){if(e=e===void 0?0:e,t=t===void 0?0:t,Array.isArray(e)&&Array.isArray(t)){if(e.length===0&&t.length===0)return 0;let r=yo(e[0],t[0]);return r!==0?r:yo(e.slice(1),t.slice(1))}return e<t?-1:e>t?1:0}function Sy(e,t){return e.sort((r,i)=>yo(t(r),t(i)))}q.sortBy=Sy;function Ay(e){return e===void 0?[]:Array.isArray(e)?e:[e]}q.castArray=Ay;function _y(){return!["development","test"].includes(process.env.NODE_ENV??"")}q.isProd=_y;function Fy(e,t){if(e.length!==0)return e.reduce((r,i)=>{let n=t(i),o=t(r);return n>o?i:r})}q.maxBy=Fy;function ky(e,t){return e.reduce((r,i)=>r+t(i),0)}q.sumBy=ky;function Ty(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():""}q.capitalize=Ty;function Oy(e){return["1","true","y","yes"].includes(e.toLowerCase())}q.isTruthy=Oy;function Py(e){return!["0","false","n","no"].includes(e.toLowerCase())}q.isNotFalsy=Py;function Iy(e){return[...new Set(e)].sort()}q.uniq=Iy;function Ny(e,t){return Object.entries(e).reduce((r,[i,n])=>(r[i]=t(n,i),r),{})}q.mapValues=Ny;function My(e,t){return t.split(".").reduce((r,i)=>r?.[i],e)}function jy(e,t){return Object.fromEntries(e.flatMap(r=>Object.entries(My(r,t)??{})).reverse())}q.mergeNestedObjects=jy});var Gc=E(ge=>{"use strict";y();Object.defineProperty(ge,"__esModule",{value:!0});ge.string=ge.url=ge.file=ge.directory=ge.integer=ge.boolean=ge.custom=void 0;var By=F("node:url"),Wc=yt(),Ry=oe();function Vt(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],type:"option"})}ge.custom=Vt;ge.boolean=Vt({parse:async e=>!!e&&(0,Ry.isNotFalsy)(e)});ge.integer=Vt({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new Error(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new Error(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new Error(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});ge.directory=Vt({async parse(e,t,r){return r.exists?(0,Wc.dirExists)(e):e}});ge.file=Vt({async parse(e,t,r){return r.exists?(0,Wc.fileExists)(e):e}});ge.url=Vt({async parse(e){try{return new By.URL(e)}catch{throw new Error(`Expected a valid url but received: ${e}`)}}});var Ly=Vt({});ge.string=Ly});var Xc=E((sT,$y)=>{$y.exports={name:"@oclif/core",description:"base library for oclif CLIs",version:"3.26.5",author:"Salesforce",bugs:"https://github.com/oclif/core/issues",dependencies:{"@types/cli-progress":"^3.11.5","ansi-escapes":"^4.3.2","ansi-styles":"^4.3.0",cardinal:"^2.1.1",chalk:"^4.1.2","clean-stack":"^3.0.1","cli-progress":"^3.12.0",color:"^4.2.3",debug:"^4.3.4",ejs:"^3.1.10","get-package-type":"^0.1.0",globby:"^11.1.0",hyperlinker:"^1.0.0","indent-string":"^4.0.0","is-wsl":"^2.2.0","js-yaml":"^3.14.1",minimatch:"^9.0.4","natural-orderby":"^2.0.3","object-treeify":"^1.1.33","password-prompt":"^1.1.3","slice-ansi":"^4.0.0","string-width":"^4.2.3","strip-ansi":"^6.0.1","supports-color":"^8.1.1","supports-hyperlinks":"^2.2.0","widest-line":"^3.1.0",wordwrap:"^1.0.0","wrap-ansi":"^7.0.0"},devDependencies:{"@commitlint/config-conventional":"^17.8.1","@oclif/plugin-help":"^6","@oclif/plugin-plugins":"^4","@oclif/prettier-config":"^0.2.1","@oclif/test":"^3.2.11","@types/ansi-styles":"^3.2.1","@types/benchmark":"^2.1.5","@types/chai":"^4.3.11","@types/chai-as-promised":"^7.1.8","@types/clean-stack":"^2.1.1","@types/color":"^3.0.6","@types/debug":"^4.1.10","@types/ejs":"^3.1.5","@types/indent-string":"^4.0.1","@types/js-yaml":"^3.12.7","@types/mocha":"^10.0.6","@types/node":"^18","@types/node-notifier":"^8.0.5","@types/pnpapi":"^0.0.5","@types/slice-ansi":"^4.0.0","@types/strip-ansi":"^5.2.1","@types/supports-color":"^8.1.1","@types/wordwrap":"^1.0.3","@types/wrap-ansi":"^3.0.0",benchmark:"^2.1.4",chai:"^4.4.1","chai-as-promised":"^7.1.1",commitlint:"^17.8.1","cross-env":"^7.0.3",eslint:"^8.57.0","eslint-config-oclif":"^5.1.3","eslint-config-oclif-typescript":"^3.1.6","eslint-config-prettier":"^9.1.0","fancy-test":"^3.0.14",globby:"^11.1.0",husky:"^8","lint-staged":"^14.0.1",madge:"^6.1.0",mocha:"^10.4.0",nyc:"^15.1.0",prettier:"^3.2.5",shx:"^0.3.4",sinon:"^16.1.3","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"^5"},engines:{node:">=18.0.0"},files:["/lib","/flush.js","/flush.d.ts","/handle.js"],homepage:"https://github.com/oclif/core",keywords:["oclif","cli","command","command line","parser","args","argv"],license:"MIT",main:"./lib/index.js",repository:"oclif/core",oclif:{bin:"oclif",devPlugins:["@oclif/plugin-help","@oclif/plugin-plugins"]},publishConfig:{access:"public"},scripts:{build:"shx rm -rf lib && tsc",commitlint:"commitlint",compile:"tsc",format:'prettier --write "+(src|test)/**/*.+(ts|js|json)"',lint:"eslint . --ext .ts",posttest:"yarn lint && yarn test:circular-deps",prepack:"yarn run build",prepare:"husky install",pretest:"yarn build && tsc -p test --noEmit --skipLibCheck","test:circular-deps":"madge lib/ -c","test:debug":'nyc mocha --debug-brk --inspect "test/**/*.test.ts"',"test:integration":'mocha --forbid-only "test/**/*.integration.ts" --parallel --timeout 1200000',"test:interoperability":"cross-env DEBUG=integration:* ts-node test/integration/interop.ts","test:perf":"ts-node test/perf/parser.perf.ts",test:'nyc mocha --forbid-only "test/**/*.test.ts"'},types:"lib/index.d.ts"}});var Ve=E(xo=>{"use strict";y();Object.defineProperty(xo,"__esModule",{value:!0});var qy=F("node:fs"),Uy=F("node:path"),vo=class e extends Map{static instance;constructor(){super(),this.set("@oclif/core",this.getOclifCoreMeta())}static getInstance(){return e.instance||(e.instance=new e),e.instance}get(t){return super.get(t)}getOclifCoreMeta(){try{return{name:"@oclif/core",version:Xc().version}}catch{try{return{name:"@oclif/core",version:JSON.parse((0,qy.readFileSync)((0,Uy.join)(__dirname,"..","package.json"),"utf8"))}}catch{return{name:"@oclif/core",version:"unknown"}}}}};xo.default=vo});var Pt=E(dn=>{"use strict";y();Object.defineProperty(dn,"__esModule",{value:!0});dn.settings=void 0;global.oclif||(global.oclif={});dn.settings=global.oclif});var Yt=E(_r=>{"use strict";y();Object.defineProperty(_r,"__esModule",{value:!0});_r.errtermwidth=_r.stdtermwidth=void 0;var Hy=Pt();function Vc(e){if(!e.isTTY)return 80;let t=e.getWindowSize()[0];return t<1?80:t<40?40:t}var Yc=Number.parseInt(process.env.OCLIF_COLUMNS,10)||Hy.settings.columns;_r.stdtermwidth=Yc||Vc(process.stdout);_r.errtermwidth=Yc||Vc(process.stderr)});var bo=E(pn=>{"use strict";y();Object.defineProperty(pn,"__esModule",{value:!0});pn.Logger=void 0;var Kc=F("node:fs/promises"),zy=F("node:path"),Jy=br(),Wy=()=>new Date().toISOString(),wo,Gy=e=>new Promise(t=>{wo&&wo.unref(),wo=setTimeout(()=>t(null),e)});function Xy(e){return e.endsWith(`
2
2
  `)?e.replace(/\n$/,""):e}var Eo=class{file;buffer=[];flushing=Promise.resolve();constructor(t){this.file=t}async flush(t=0){await Gy(t),this.flushing=this.flushing.then(async()=>{if(this.buffer.length===0)return;let r=this.buffer;this.buffer=[],await(0,Kc.mkdir)((0,zy.dirname)(this.file),{recursive:!0}),await(0,Kc.appendFile)(this.file,r.join(`
3
3
  `)+`
4
4
  `)}),await this.flushing}log(t){t=Jy(Xy(t));let r=t.split(`
5
- `).map(i=>`${Wy()} ${i}`.trimEnd());this.buffer.push(...r),this.flush(50).catch(console.error)}};pn.Logger=Eo});var Kt=E(mn=>{"use strict";y();Object.defineProperty(mn,"__esModule",{value:!0});mn.config=void 0;var mi=Pt(),Vy=bo();function Yy(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}mn.config={get debug(){return!!mi.settings.debug},set debug(e){mi.settings.debug=e,e&&Yy()},get errlog(){return mi.settings.errlog},set errlog(e){e?(this.errorLogger=new Vy.Logger(e),mi.settings.errlog=e):(delete this.errorLogger,delete mi.settings.errlog)},errorLogger:void 0}});var Qt=E(vt=>{"use strict";y();var yi=vt&&vt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vt,"__esModule",{value:!0});vt.CLIError=vt.addOclifExitCode=void 0;var Qc=yi(Be()),Ky=yi(yc()),Do=yi(co()),Qy=yi(ho()),Zy=yi(Ve()),ev=Yt(),tv=Kt();function Zc(e,t){return"oclif"in e||(e.oclif={}),e.oclif.exit=t?.exit===void 0?Zy.default.getInstance().get("exitCodes")?.default??2:t.exit,e}vt.addOclifExitCode=Zc;var gi=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(t,r={}){super(t instanceof Error?t.message:t),Zc(this,r),this.code=r.code,this.suggestions=r.suggestions}get bang(){try{return Qc.default.red(process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,Ky.default)(super.stack,{pretty:!0})}render(){if(tv.config.debug)return this.stack;let t=`${this.name}: ${this.message}`;return t=(0,Qy.default)(t,ev.errtermwidth-6,{hard:!0,trim:!1}),t=(0,Do.default)(t,3),t=(0,Do.default)(t,1,{includeEmptyLines:!0,indent:this.bang}),t=(0,Do.default)(t,1),t}};vt.CLIError=gi;(function(e){class t extends e{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return Qc.default.yellow(process.platform==="win32"?"\xBB":"\u203A")}catch{}}}e.Warn=t})(gi||(vt.CLIError=gi={}))});var yn=E(gn=>{"use strict";y();Object.defineProperty(gn,"__esModule",{value:!0});gn.ExitError=void 0;var rv=Qt(),Co=class extends rv.CLIError{code="EEXIT";constructor(t=1){super(`EEXIT: ${t}`,{exit:t})}render(){return""}};gn.ExitError=Co});var xn=E(Zt=>{"use strict";y();var el=Zt&&Zt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.applyPrettyPrintOptions=void 0;var vn=el(co()),iv=el(ho()),nv=Yt(),sv=Kt();function ov(e,t){let r=["message","code","ref","suggestions"];for(let i of r)!(i in e)&&t[i]&&(e[i]=t[i]);return e}Zt.applyPrettyPrintOptions=ov;var av=e=>{let t="Try this:";if(!e||e.length===0)return;if(e.length===1)return`${t} ${e[0]}`;let r=e.map(i=>`* ${i}`).join(`
5
+ `).map(i=>`${Wy()} ${i}`.trimEnd());this.buffer.push(...r),this.flush(50).catch(console.error)}};pn.Logger=Eo});var Kt=E(mn=>{"use strict";y();Object.defineProperty(mn,"__esModule",{value:!0});mn.config=void 0;var mi=Pt(),Vy=bo();function Yy(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}mn.config={get debug(){return!!mi.settings.debug},set debug(e){mi.settings.debug=e,e&&Yy()},get errlog(){return mi.settings.errlog},set errlog(e){e?(this.errorLogger=new Vy.Logger(e),mi.settings.errlog=e):(delete this.errorLogger,delete mi.settings.errlog)},errorLogger:void 0}});var Qt=E(vt=>{"use strict";y();var yi=vt&&vt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vt,"__esModule",{value:!0});vt.CLIError=vt.addOclifExitCode=void 0;var Qc=yi(Be()),Ky=yi(cc()),Do=yi(uo()),Qy=yi(lo()),Zy=yi(Ve()),ev=Yt(),tv=Kt();function Zc(e,t){return"oclif"in e||(e.oclif={}),e.oclif.exit=t?.exit===void 0?Zy.default.getInstance().get("exitCodes")?.default??2:t.exit,e}vt.addOclifExitCode=Zc;var gi=class extends Error{code;oclif={};skipOclifErrorHandling;suggestions;constructor(t,r={}){super(t instanceof Error?t.message:t),Zc(this,r),this.code=r.code,this.suggestions=r.suggestions}get bang(){try{return Qc.default.red(process.platform==="win32"?"\xBB":"\u203A")}catch{}}get stack(){return(0,Ky.default)(super.stack,{pretty:!0})}render(){if(tv.config.debug)return this.stack;let t=`${this.name}: ${this.message}`;return t=(0,Qy.default)(t,ev.errtermwidth-6,{hard:!0,trim:!1}),t=(0,Do.default)(t,3),t=(0,Do.default)(t,1,{includeEmptyLines:!0,indent:this.bang}),t=(0,Do.default)(t,1),t}};vt.CLIError=gi;(function(e){class t extends e{constructor(i){super(i instanceof Error?i.message:i),this.name="Warning"}get bang(){try{return Qc.default.yellow(process.platform==="win32"?"\xBB":"\u203A")}catch{}}}e.Warn=t})(gi||(vt.CLIError=gi={}))});var yn=E(gn=>{"use strict";y();Object.defineProperty(gn,"__esModule",{value:!0});gn.ExitError=void 0;var rv=Qt(),Co=class extends rv.CLIError{code="EEXIT";constructor(t=1){super(`EEXIT: ${t}`,{exit:t})}render(){return""}};gn.ExitError=Co});var xn=E(Zt=>{"use strict";y();var el=Zt&&Zt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.applyPrettyPrintOptions=void 0;var vn=el(uo()),iv=el(lo()),nv=Yt(),sv=Kt();function ov(e,t){let r=["message","code","ref","suggestions"];for(let i of r)!(i in e)&&t[i]&&(e[i]=t[i]);return e}Zt.applyPrettyPrintOptions=ov;var av=e=>{let t="Try this:";if(!e||e.length===0)return;if(e.length===1)return`${t} ${e[0]}`;let r=e.map(i=>`* ${i}`).join(`
6
6
  `);return`${t}
7
7
  ${(0,vn.default)(r,2)}`};function uv(e){if(sv.config.debug)return e.stack;let{bang:t,code:r,message:i,name:n,ref:o,suggestions:s}=e,c=i?`${n||"Error"}: ${i}`:void 0,h=r?`Code: ${r}`:void 0,m=av(s),d=o?`Reference: ${o}`:void 0,f=[c,h,m,d].filter(Boolean).join(`
8
8
  `),p=(0,iv.default)(f,nv.errtermwidth-6,{hard:!0,trim:!1});return p=(0,vn.default)(p,3),p=(0,vn.default)(p,1,{includeEmptyLines:!0,indent:t||""}),p=(0,vn.default)(p,1),p}Zt.default=uv});var So=E(Oe=>{"use strict";y();var cv=Oe&&Oe.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),lv=Oe&&Oe.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),hv=Oe&&Oe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&cv(t,e,r);return lv(t,e),t},fv=Oe&&Oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.error=void 0;var dv=fv(Ot()),tl=Kt(),rl=Qt(),il=hv(xn());function nl(e,t={}){let r;if(typeof e=="string")r=new rl.CLIError(e,t);else if(e instanceof Error)r=(0,rl.addOclifExitCode)(e,t);else throw new TypeError("first argument must be a string or instance of Error");if(r=(0,il.applyPrettyPrintOptions)(r,t),t.exit===!1){let i=(0,il.default)(r);i&&dv.default.stderr(i+`
9
- `),tl.config.errorLogger&&tl.config.errorLogger.log(r?.stack??"")}else throw r}Oe.error=nl;Oe.default=nl});var _o=E(wn=>{"use strict";y();Object.defineProperty(wn,"__esModule",{value:!0});wn.ModuleLoadError=void 0;var pv=Qt(),Ao=class extends pv.CLIError{code="MODULE_NOT_FOUND";constructor(t){super(`[MODULE_NOT_FOUND] ${t}`,{exit:1}),this.name="ModuleLoadError"}};wn.ModuleLoadError=Ao});var ol=E((AT,sl)=>{y();sl.exports=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}});var cl=E((FT,ul)=>{"use strict";y();var mv=ol(),gv=Array.prototype.concat,yv=Array.prototype.slice,al=ul.exports=function(t){for(var r=[],i=0,n=t.length;i<n;i++){var o=t[i];mv(o)?r=gv.call(r,yv.call(o)):r.push(o)}return r};al.wrap=function(e){return function(){return e(al(arguments))}}});var dl=E((TT,fl)=>{y();var vi=iy(),xi=cl(),ll=Object.hasOwnProperty,hl=Object.create(null);for(En in vi)ll.call(vi,En)&&(hl[vi[En]]=En);var En,Pe=fl.exports={to:{},get:{}};Pe.get=function(e){var t=e.substring(0,3).toLowerCase(),r,i;switch(t){case"hsl":r=Pe.get.hsl(e),i="hsl";break;case"hwb":r=Pe.get.hwb(e),i="hwb";break;default:r=Pe.get.rgb(e),i="rgb";break}return r?{model:i,value:r}:null};Pe.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],c,h,m;if(c=e.match(r)){for(m=c[2],c=c[1],h=0;h<3;h++){var d=h*2;s[h]=parseInt(c.slice(d,d+2),16)}m&&(s[3]=parseInt(m,16)/255)}else if(c=e.match(t)){for(c=c[1],m=c[3],h=0;h<3;h++)s[h]=parseInt(c[h]+c[h],16);m&&(s[3]=parseInt(m+m,16)/255)}else if(c=e.match(i)){for(h=0;h<3;h++)s[h]=parseInt(c[h+1],0);c[4]&&(c[5]?s[3]=parseFloat(c[4])*.01:s[3]=parseFloat(c[4]))}else if(c=e.match(n)){for(h=0;h<3;h++)s[h]=Math.round(parseFloat(c[h+1])*2.55);c[4]&&(c[5]?s[3]=parseFloat(c[4])*.01:s[3]=parseFloat(c[4]))}else return(c=e.match(o))?c[1]==="transparent"?[0,0,0,0]:ll.call(vi,c[1])?(s=vi[c[1]],s[3]=1,s):null:null;for(h=0;h<3;h++)s[h]=It(s[h],0,255);return s[3]=It(s[3],0,1),s};Pe.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=It(parseFloat(r[2]),0,100),s=It(parseFloat(r[3]),0,100),c=It(isNaN(i)?1:i,0,1);return[n,o,s,c]}return null};Pe.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=It(parseFloat(r[2]),0,100),s=It(parseFloat(r[3]),0,100),c=It(isNaN(i)?1:i,0,1);return[n,o,s,c]}return null};Pe.to.hex=function(){var e=xi(arguments);return"#"+bn(e[0])+bn(e[1])+bn(e[2])+(e[3]<1?bn(Math.round(e[3]*255)):"")};Pe.to.rgb=function(){var e=xi(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};Pe.to.rgb.percent=function(){var e=xi(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+i+"%)":"rgba("+t+"%, "+r+"%, "+i+"%, "+e[3]+")"};Pe.to.hsl=function(){var e=xi(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};Pe.to.hwb=function(){var e=xi(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};Pe.to.keyword=function(e){return hl[e.slice(0,3)]};function It(e,t,r){return Math.min(Math.max(t,e),r)}function bn(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}});var gl=E((PT,ml)=>{y();var Fr=dl(),Ie=ny(),pl=["keyword","gray","hex"],Fo={};for(let e of Object.keys(Ie))Fo[[...Ie[e].labels].sort().join("")]=e;var Dn={};function he(e,t){if(!(this instanceof he))return new he(e,t);if(t&&t in pl&&(t=null),t&&!(t in Ie))throw new Error("Unknown model: "+t);let r,i;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof he)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let n=Fr.get(e);if(n===null)throw new Error("Unable to parse color from string: "+e);this.model=n.model,i=Ie[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(e.length>0){this.model=t||"rgb",i=Ie[this.model].channels;let n=Array.prototype.slice.call(e,0,i);this.color=ko(n,i),this.valpha=typeof e[i]=="number"?e[i]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(e);"alpha"in e&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let o=n.sort().join("");if(!(o in Fo))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Fo[o];let{labels:s}=Ie[this.model],c=[];for(r=0;r<s.length;r++)c.push(e[s[r]]);this.color=ko(c)}if(Dn[this.model])for(i=Ie[this.model].channels,r=0;r<i;r++){let n=Dn[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}he.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Fr.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return Fr.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return Fr.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=Ie[this.model],{labels:r}=Ie[this.model];for(let i=0;i<t;i++)e[r[i]]=this.color[i];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new he([...this.color.map(xv(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new he([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Y("rgb",0,ae(255)),green:Y("rgb",1,ae(255)),blue:Y("rgb",2,ae(255)),hue:Y(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:Y("hsl",1,ae(100)),lightness:Y("hsl",2,ae(100)),saturationv:Y("hsv",1,ae(100)),value:Y("hsv",2,ae(100)),chroma:Y("hcg",1,ae(100)),gray:Y("hcg",2,ae(100)),white:Y("hwb",1,ae(100)),wblack:Y("hwb",2,ae(100)),cyan:Y("cmyk",0,ae(100)),magenta:Y("cmyk",1,ae(100)),yellow:Y("cmyk",2,ae(100)),black:Y("cmyk",3,ae(100)),x:Y("xyz",0,ae(95.047)),y:Y("xyz",1,ae(100)),z:Y("xyz",2,ae(108.833)),l:Y("lab",0,ae(100)),a:Y("lab",1),b:Y("lab",2),keyword(e){return e!==void 0?new he(e):Ie[this.model].keyword(this.color)},hex(e){return e!==void 0?new he(e):Fr.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new he(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Fr.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,i]of e.entries()){let n=i/255;t[r]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return he.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),i=this.rgb(),n=t===void 0?.5:t,o=2*n-1,s=r.alpha()-i.alpha(),c=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,h=1-c;return he.rgb(c*r.red()+h*i.red(),c*r.green()+h*i.green(),c*r.blue()+h*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let e of Object.keys(Ie)){if(pl.includes(e))continue;let{channels:t}=Ie[e];he.prototype[e]=function(...r){return this.model===e?new he(this):r.length>0?new he(r,e):new he([...wv(Ie[this.model][e].raw(this.color)),this.valpha],e)},he[e]=function(...r){let i=r[0];return typeof i=="number"&&(i=ko(r,t)),new he(i,e)}}function vv(e,t){return Number(e.toFixed(t))}function xv(e){return function(t){return vv(t,e)}}function Y(e,t,r){e=Array.isArray(e)?e:[e];for(let i of e)(Dn[i]||(Dn[i]=[]))[t]=r;return e=e[0],function(i){let n;return i!==void 0?(r&&(i=r(i)),n=this[e](),n.color[t]=i,n):(n=this[e]().color[t],r&&(n=r(n)),n)}}function ae(e){return function(t){return Math.max(0,Math.min(e,t))}}function wv(e){return Array.isArray(e)?e:[e]}function ko(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}ml.exports=he});var yl=E(kr=>{"use strict";y();Object.defineProperty(kr,"__esModule",{value:!0});kr.THEME_KEYS=kr.STANDARD_CHALK=void 0;kr.STANDARD_CHALK=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"];kr.THEME_KEYS=["alias","bin","command","commandSummary","dollarSign","flag","flagDefaultValue","flagOptions","flagRequired","flagSeparator","sectionDescription","sectionHeader","topic","version"]});var er=E(ye=>{"use strict";y();var Ev=ye&&ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),bv=ye&&ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Dv=ye&&ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Ev(t,e,r);return bv(t,e),t},Cv=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});ye.getColor=ye.parseTheme=ye.colorize=void 0;var vl=Cv(Be()),Sv=Dv(gl()),Av=yl();function xl(e){return Av.STANDARD_CHALK.includes(e)}function _v(e,t){return xl(e)?vl.default[e](t):e?vl.default.hex(e)(t):t}ye.colorize=_v;function Fv(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,wl(r)]).filter(([t,r])=>r))}ye.parseTheme=Fv;function wl(e){try{return xl(e)?e:new Sv.default(e).hex()}catch{}}ye.getColor=wl});var Cn=E(xt=>{"use strict";y();var Cl=xt&&xt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xt,"__esModule",{value:!0});xt.memoizedWarn=xt.warn=void 0;var kv=Cl(Ot()),El=Kt(),bl=Qt(),Tv=Cl(xn());function To(e){let t;if(typeof e=="string")t=new bl.CLIError.Warn(e);else if(e instanceof Error)t=(0,bl.addOclifExitCode)(e);else throw new TypeError("first argument must be a string or instance of Error");let r=(0,Tv.default)(t);r&&kv.default.stderr(r+`
10
- `),El.config.errorLogger&&El.config.errorLogger.log(t?.stack??"")}xt.warn=To;var Dl=new Set;function Ov(e){Dl.has(e)||To(e),Dl.add(e)}xt.memoizedWarn=Ov;xt.default=To});var Tl=E(Tr=>{"use strict";y();var Pv=Tr&&Tr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.readTSConfig=void 0;var Iv=Pv(et()),Sl=F("node:fs/promises"),Fl=F("node:path"),Nv=Cn(),Al=oe(),Mv=(0,Iv.default)("read-tsconfig");function _l(e,t){try{return F.resolve(t,{paths:[e]})}catch{}}async function kl(e,t){let r;try{r=await t(e)}catch{r=!1}if(r)return e;let i=(0,Fl.dirname)(e);if(i!==e)return kl(i,t)}async function jv(e,t="tsconfig.json"){let r=[],i;try{i=oy()}catch{try{i=F(e+"/node_modules/typescript")}catch{}}if(!i){(0,Nv.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let n=async o=>{let s=await kl(o,async c=>(await(0,Sl.readdir)(c)).includes("package.json"));if(s)try{let c=await(0,Sl.readFile)(o,"utf8"),h=i?.parseConfigFileTextToJson(o,c).config;if(r.push(h),h.extends){if(h.extends.startsWith(".")){let d=_l(s,h.extends);return d?n(d):void 0}let m=_l(s,h.extends);if(m)return n(m)}return h}catch(c){Mv(c)}};return await n((0,Fl.join)(e,t)),{compilerOptions:(0,Al.mergeNestedObjects)(r,"compilerOptions"),"ts-node":(0,Al.mergeNestedObjects)(r,"ts-node")}}Tr.readTSConfig=jv});var Or=E(nt=>{"use strict";y();Object.defineProperty(nt,"__esModule",{value:!0});nt.collectUsableIds=nt.getCommandIdPermutations=nt.getPermutations=nt.Debug=void 0;var Ol=et();function Bv(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}function Rv(...e){if(!Ol)return(...r)=>{};let t=Ol(["config",...e].join(":"));return t.enabled&&Bv(),(...r)=>t(...r)}nt.Debug=Rv;function Oo(e){if(e.length===0)return[];if(e.length===1)return[e];let t=[],r=Oo(e.slice(1)),i=e[0];for(let n=0,o=r.length;n<o;n++){let s=r[n];for(let c=0,h=s.length;c<=h;c++){let m=s.slice(0,c),d=s.slice(c),f=[...m,i,...d];t.push(f)}}return t}nt.getPermutations=Oo;function Lv(e){return Oo(e.split(":")).flatMap(t=>t.join(":"))}nt.getCommandIdPermutations=Lv;var $v=e=>new Set(e.flatMap(t=>t.split(":").map((r,i,n)=>n.slice(0,i+1).join(":"))));nt.collectUsableIds=$v});var Pr=E(Re=>{"use strict";y();var qv=Re&&Re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Re,"__esModule",{value:!0});Re.tsPath=Re.TS_CONFIGS=void 0;var Pl=F("node:fs/promises"),Se=F("node:path"),Uv=qv(Ve()),wi=Cn(),Il=Pt(),Hv=yt(),zv=Tl(),Ml=oe(),Jv=Or(),te=(0,Jv.Debug)("ts-path");Re.TS_CONFIGS={};var Nl=new Set;function Wv(){return process.execPath.split(Se.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Se.sep).includes("ts-node")||process.execArgv[0].split(Se.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Se.sep).includes("tsx")?"tsx":"node"}var Sn=Wv();function Gv(e){return"code"in e&&e.code==="ENOENT"}async function Xv(e){try{if(Re.TS_CONFIGS[e])return Re.TS_CONFIGS[e];let t=await(0,zv.readTSConfig)(e);return t?(te("tsconfig: %O",t),Re.TS_CONFIGS[e]=t,Re.TS_CONFIGS[e]):void 0}catch(t){if(Gv(t))return;te(`Could not parse tsconfig.json. Skipping typescript path lookup for ${e}.`),(0,wi.memoizedWarn)(`Could not parse tsconfig.json for ${e}. Falling back to compiled source.`)}}async function Vv(e,t){if(Nl.has(e))return;te("registering ts-node at",e);let r=F.resolve("ts-node",{paths:[e,__dirname]});te("ts-node path:",r);let i;try{i=F(r)}catch{te(`Could not find ts-node at ${r}. Skipping ts-node registration for ${e}.`),(0,wi.memoizedWarn)(`Could not find ts-node at ${r}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let n=[(0,Se.join)(e,"node_modules","@types")],o=[];if(t.compilerOptions.rootDirs)for(let d of t.compilerOptions.rootDirs)o.push((0,Se.join)(e,d));else t.compilerOptions.rootDir?o.push((0,Se.join)(e,t.compilerOptions.rootDir)):t.compilerOptions.baseUrl?o.push((0,Se.join)(e,t.compilerOptions.baseUrl)):o.push((0,Se.join)(e,"src"));let{baseUrl:s,rootDir:c,...h}=t.compilerOptions,m={compilerOptions:{...h,rootDirs:o,typeRoots:n},...t["ts-node"],cwd:e,esm:t["ts-node"]?.esm??!0,experimentalSpecifierResolution:t["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:e,skipProject:!0,transpileOnly:!0};te("ts-node options: %O",m),i.register(m),Nl.add(e)}function Yv(e,t,r){return(r||e?.moduleType==="commonjs")&&t?.moduleType==="module"}function Kv(e,t,r){if(t?.moduleType!=="module"||r)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return Sn==="ts-node"&&i>=20}async function Qv(e,t){let r=await Xv(e);if(!r)return t;te(`Determining path for ${t}`),Sn==="tsx"||Sn==="bun"?te(`Skipping ts-node registration for ${e} because the runtime is: ${Sn}`):await Vv(e,r);let{baseUrl:i,outDir:n,rootDir:o,rootDirs:s}=r.compilerOptions,c=o??(s??[])[0]??i;if(!c)return te(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${t}`),t;if(!n)return te(`no outDir specified in tsconfig.json. Returning default path ${t}`),t;let h=(0,Se.join)(e,n),m=(0,Se.join)(e,c),d=(0,Se.relative)(h,t),f=(0,Se.join)(m,d).replace(/\.js$/,"");return te(`lib dir: ${h}`),te(`src dir: ${m}`),te(`src directory to find: ${f}`),(0,Hv.existsSync)(f)?(te(`Found source directory for ${t} at ${f}`),f):(await Promise.all([(0,Pl.access)(`${f}.ts`).then(()=>`${f}.ts`).catch(()=>!1),(0,Pl.access)(`${f}.tsx`).then(()=>`${f}.tsx`).catch(()=>!1)])).some(Boolean)?(te(`Found source file for ${t} at ${f}`),f):(te(`No source file found. Returning default path ${t}`),(0,Ml.isProd)()||(0,wi.memoizedWarn)(`Could not find source for ${t} based on tsconfig. Defaulting to compiled source.`),t)}async function Zv(e,t,r){let i=r?.options.isRoot?r:Uv.default.getInstance().get("rootPlugin");if(!t)return t;t=t.startsWith(e)?t:(0,Se.join)(e,t);let n=Il.settings.enableAutoTranspile??Il.settings.tsnodeEnabled;if(n===!1)return te(`Skipping typescript path lookup for ${e} because enableAutoTranspile is explicitly set to false`),t;let o=(0,Ml.isProd)();if(n===void 0&&o&&r?.type!=="link")return te(`Skipping typescript path lookup for ${e} because NODE_ENV is NOT "test" or "development"`),t;if(Yv(i,r,o))return te(`Skipping typescript path lookup for ${e} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${i?.moduleType})`),r?.type==="link"&&(0,wi.memoizedWarn)(`${r?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),t;if(Kv(e,r,o))return te(`Skipping typescript path lookup for ${e} because ts-node is run in node version ${process.version}"`),(0,wi.memoizedWarn)("ts-node executable cannot transpile ESM in Node 20. Existing compiled source will be used instead. See https://github.com/oclif/core/issues/817."),t;try{return await Qv(e,t)}catch(s){return te(s),t}}Re.tsPath=Zv});var Ei=E(st=>{"use strict";y();Object.defineProperty(st,"__esModule",{value:!0});st.isPathModule=st.loadWithDataFromManifest=st.loadWithData=st.load=void 0;var ex=F("node:fs"),An=F("node:path"),No=F("node:url"),jl=Pr(),Po=_o(),Rl=yt(),tx=ay(),rx=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],ix=e=>e.type!==void 0;function Mo(e,t,r){throw e.code==="MODULE_NOT_FOUND"||e.code==="ERR_MODULE_NOT_FOUND"?new Po.ModuleLoadError(`${t?"import()":"require"} failed to load ${r}: ${e.message}`):e}async function nx(e,t){let r,i;try{return{filePath:r,isESM:i}=await Ll(e,t),i?await import((0,No.pathToFileURL)(r).href):F(r)}catch(n){Mo(n,i,r??t)}}st.load=nx;async function sx(e,t){let r,i;try{({filePath:r,isESM:i}=await Ll(e,t));let n=i?await import((0,No.pathToFileURL)(r).href):F(r);return{filePath:r,isESM:i,module:n}}catch(n){Mo(n,i,r??t)}}st.loadWithData=sx;async function ox(e,t){let{id:r,isESM:i,relativePath:n}=e;if(!n)throw new Po.ModuleLoadError(`Cached command ${r} does not have a relative path`);if(i===void 0)throw new Po.ModuleLoadError(`Cached command ${r} does not have the isESM property set`);let o=(0,An.join)(t,n.join(An.sep));try{let s=i?await import((0,No.pathToFileURL)(o).href):F(o);return{filePath:o,isESM:i,module:s}}catch(s){Mo(s,i,o??t)}}st.loadWithDataFromManifest=ox;function Io(e){switch((0,An.extname)(e).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return tx.sync(e)==="module";case".mjs":case".mts":return!0;default:return!1}}st.isPathModule=Io;async function Ll(e,t){let r,i;try{i=F.resolve(t),r=Io(i)}catch{i=(ix(e)?await(0,jl.tsPath)(e.root,t,e):await(0,jl.tsPath)(e.root,t))??t;let n=!1,o=!1;if((0,Rl.existsSync)(i)){n=!0;try{(0,ex.lstatSync)(i)?.isDirectory?.()&&(n=!1,o=!0)}catch{}}if(!n){let s=Bl(i);!s&&o&&(s=Bl((0,An.join)(i,"index"))),s&&(i=s)}r=Io(i)}return{filePath:i,isESM:r}}function Bl(e){for(let t of rx){let r=`${e}${t}`;if((0,Rl.existsSync)(r))return r}return null}});var Fn=E(_n=>{"use strict";y();Object.defineProperty(_n,"__esModule",{value:!0});_n.SINGLE_COMMAND_CLI_SYMBOL=void 0;_n.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var jo=E(kn=>{"use strict";y();Object.defineProperty(kn,"__esModule",{value:!0});kn.cacheDefaultValue=void 0;var ax=async(e,t)=>{if(!(t&&e.noCacheDefault)){if(typeof e.defaultHelp=="function")try{return await e.defaultHelp({flags:{},options:e})}catch{return}if(typeof e.default=="function")try{return await e.default({flags:{},options:e})}catch{}else return e.default}};kn.cacheDefaultValue=ax});var Nr=E(Ir=>{"use strict";y();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.toConfiguredId=Ir.toStandardizedId=void 0;function ux(e,t){return e.replaceAll(new RegExp(t.topicSeparator,"g"),":")}Ir.toStandardizedId=ux;function cx(e,t){return e.replaceAll(new RegExp(":","g"),t.topicSeparator||":")}Ir.toConfiguredId=cx});var On=E(Tn=>{"use strict";y();Object.defineProperty(Tn,"__esModule",{value:!0});Tn.ensureArgObject=void 0;function lx(e){return Array.isArray(e)?(e??[]).reduce((t,r)=>({...t,[r.name]:r}),{}):e??{}}Tn.ensureArgObject=lx});var $l=E(Pn=>{"use strict";y();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.DocOpts=void 0;var hx=On(),Bo=class e{cmd;flagList;flagMap;constructor(t){this.cmd=t,this.flagMap={},this.flagList=Object.entries(t.flags||{}).filter(([r,i])=>!i.hidden).map(([r,i])=>(this.flagMap[r]=i,i))}static generate(t){return new e(t).toString()}toString(){let t=["<%= command.id %>"];if(this.cmd.args){let r=this.cmd.strict===!1?"...":"",i=Object.values((0,hx.ensureArgObject)(this.cmd.args)).map(n=>n.required?`${n.name.toUpperCase()}${r}`:`[${n.name.toUpperCase()}${r}]`)||[];t.push(...i)}try{t.push(...Object.values(this.groupFlagElements()))}catch{t.push(...this.flagList.map(r=>{let i=r.char?`-${r.char}`:`--${r.name}`;return r.type==="boolean"?i:`${i}=<value>`}))}return t.join(" ")}combineElementsToFlag(t,r,i,n){if(!this.flagMap[r])return;let o=this.flagMap[r]?.required;(typeof o!="boolean"||!o)&&(o=i.reduce((s,c)=>s||this.flagMap[c]?.required||!1,!1));for(let s of i)t[r]=`${t[r]||""}${n}${t[s]||""}`,delete t[s],delete this.flagMap[s];t[r]=o?`(${t[r]||""})`:`[${t[r]||""}]`,delete this.flagMap[r]}generateElements(t={},r=[]){let i=[];for(let n of r){let o="",s=n.char?`-${n.char}`:`--${n.name}`;n.type==="option"&&(o=n.options?` ${n.options.join("|")}`:" <value>");let c=`${s}${o}`;t[n.name]=c,i.push(c)}return i}groupFlagElements(){let t={};this.generateElements(t,this.flagList.filter(r=>r.required)),this.generateElements(t,this.flagList.filter(r=>!r.required));for(let r of this.flagList)Array.isArray(r.dependsOn)&&this.combineElementsToFlag(t,r.name,r.dependsOn," "),Array.isArray(r.exclusive)&&this.combineElementsToFlag(t,r.name,r.exclusive," | ");for(let r of Object.keys(this.flagMap)){let i=this.flagMap[r]||{};i.required||(t[i.name]=`[${t[i.name]||""}]`)}return t}};Pn.DocOpts=Bo});var Mr=E(ie=>{"use strict";y();var fx=ie&&ie.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),dx=ie&&ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),px=ie&&ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&fx(t,e,r);return dx(t,e),t};Object.defineProperty(ie,"__esModule",{value:!0});ie.normalizeArgv=ie.formatCommandDeprecationWarning=ie.formatFlagDeprecationWarning=ie.getHelpFlagAdditions=ie.standardizeIDFromArgv=ie.template=void 0;var mx=px(gc()),gx=Or(),yx=Nr();function vx(e){function t(r){return mx.render(r,e)}return t}ie.template=vx;var xx=e=>e.startsWith("-"),wx=e=>e.includes("=");function Ex(e,t){if(e.length===1)return e;let i=(n=>{let o=(0,gx.collectUsableIds)(t.commandIDs),s=[],c=d=>o.has(d),h=d=>(d?[...s,d]:s).filter(Boolean).join(":"),m=()=>{let d=h();if(!d)return!1;let f=t.findCommand(d);return!!(f&&(f.strict===!1||Object.keys(f.args??{}).length>0))};for(let d of n)if(c(h(d)))s.push(d);else{if(wx(d)||xx(d)||m())break;s.push(d)}return h()})(e);if(i){let n=e.slice(i.split(":").length);return[i,...n]}return e}function ql(e,t){return e.length===0||(t.topicSeparator===" "?e=Ex(e,t):t.topicSeparator!==":"&&(e[0]=(0,yx.toStandardizedId)(e[0],t))),e}ie.standardizeIDFromArgv=ql;function bx(e){let t=["--help"],r=e.pjson.oclif.additionalHelpFlags??[];return[...new Set([...t,...r]).values()]}ie.getHelpFlagAdditions=bx;function Dx(e,t){let r=`The "${e}" flag has been deprecated`;return t===!0?`${r}.`:t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r)}ie.formatFlagDeprecationWarning=Dx;function Cx(e,t){let r=`The "${e}" command has been deprecated`;return t?t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r):`${r}.`}ie.formatCommandDeprecationWarning=Cx;function Sx(e,t=process.argv.slice(2)){return e.topicSeparator!==":"&&!t[0]?.includes(":")&&(t=ql(t,e)),t}ie.normalizeArgv=Sx});var In=E(jr=>{"use strict";y();var Br=jr&&jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jr,"__esModule",{value:!0});jr.HelpFormatter=void 0;var Ax=Br(Be()),_x=Br(co()),Fx=Br(lo()),bi=Br(Dr()),kx=Br(uy()),Tx=Br(ho()),Ul=er(),Ox=Yt(),Px=Mr(),Ro=class{config;indentSpacing=2;opts;render;constructor(t,r={}){this.config=t,this.opts={maxWidth:Ox.stdtermwidth,...r},this.render=(0,Px.template)(this)}indent(t,r=this.indentSpacing){return(0,_x.default)(t,r)}renderList(t,r){if(t.length===0)return"";let i=()=>{let h="";for(let[m,d]of t)!m&&!d||(m&&(r.stripAnsi&&(m=(0,bi.default)(m)),h+=this.wrap(m.trim(),r.indentation)),d&&(r.stripAnsi&&(d=(0,bi.default)(d)),h+=`
9
+ `),tl.config.errorLogger&&tl.config.errorLogger.log(r?.stack??"")}else throw r}Oe.error=nl;Oe.default=nl});var _o=E(wn=>{"use strict";y();Object.defineProperty(wn,"__esModule",{value:!0});wn.ModuleLoadError=void 0;var pv=Qt(),Ao=class extends pv.CLIError{code="MODULE_NOT_FOUND";constructor(t){super(`[MODULE_NOT_FOUND] ${t}`,{exit:1}),this.name="ModuleLoadError"}};wn.ModuleLoadError=Ao});var ol=E((AT,sl)=>{y();sl.exports=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}});var cl=E((FT,ul)=>{"use strict";y();var mv=ol(),gv=Array.prototype.concat,yv=Array.prototype.slice,al=ul.exports=function(t){for(var r=[],i=0,n=t.length;i<n;i++){var o=t[i];mv(o)?r=gv.call(r,yv.call(o)):r.push(o)}return r};al.wrap=function(e){return function(){return e(al(arguments))}}});var dl=E((TT,fl)=>{y();var vi=ty(),xi=cl(),ll=Object.hasOwnProperty,hl=Object.create(null);for(En in vi)ll.call(vi,En)&&(hl[vi[En]]=En);var En,Pe=fl.exports={to:{},get:{}};Pe.get=function(e){var t=e.substring(0,3).toLowerCase(),r,i;switch(t){case"hsl":r=Pe.get.hsl(e),i="hsl";break;case"hwb":r=Pe.get.hwb(e),i="hwb";break;default:r=Pe.get.rgb(e),i="rgb";break}return r?{model:i,value:r}:null};Pe.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,r=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,i=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,s=[0,0,0,1],c,h,m;if(c=e.match(r)){for(m=c[2],c=c[1],h=0;h<3;h++){var d=h*2;s[h]=parseInt(c.slice(d,d+2),16)}m&&(s[3]=parseInt(m,16)/255)}else if(c=e.match(t)){for(c=c[1],m=c[3],h=0;h<3;h++)s[h]=parseInt(c[h]+c[h],16);m&&(s[3]=parseInt(m+m,16)/255)}else if(c=e.match(i)){for(h=0;h<3;h++)s[h]=parseInt(c[h+1],0);c[4]&&(c[5]?s[3]=parseFloat(c[4])*.01:s[3]=parseFloat(c[4]))}else if(c=e.match(n)){for(h=0;h<3;h++)s[h]=Math.round(parseFloat(c[h+1])*2.55);c[4]&&(c[5]?s[3]=parseFloat(c[4])*.01:s[3]=parseFloat(c[4]))}else return(c=e.match(o))?c[1]==="transparent"?[0,0,0,0]:ll.call(vi,c[1])?(s=vi[c[1]],s[3]=1,s):null:null;for(h=0;h<3;h++)s[h]=It(s[h],0,255);return s[3]=It(s[3],0,1),s};Pe.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=It(parseFloat(r[2]),0,100),s=It(parseFloat(r[3]),0,100),c=It(isNaN(i)?1:i,0,1);return[n,o,s,c]}return null};Pe.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,r=e.match(t);if(r){var i=parseFloat(r[4]),n=(parseFloat(r[1])%360+360)%360,o=It(parseFloat(r[2]),0,100),s=It(parseFloat(r[3]),0,100),c=It(isNaN(i)?1:i,0,1);return[n,o,s,c]}return null};Pe.to.hex=function(){var e=xi(arguments);return"#"+bn(e[0])+bn(e[1])+bn(e[2])+(e[3]<1?bn(Math.round(e[3]*255)):"")};Pe.to.rgb=function(){var e=xi(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};Pe.to.rgb.percent=function(){var e=xi(arguments),t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+i+"%)":"rgba("+t+"%, "+r+"%, "+i+"%, "+e[3]+")"};Pe.to.hsl=function(){var e=xi(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};Pe.to.hwb=function(){var e=xi(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};Pe.to.keyword=function(e){return hl[e.slice(0,3)]};function It(e,t,r){return Math.min(Math.max(t,e),r)}function bn(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}});var gl=E((PT,ml)=>{y();var Fr=dl(),Ie=ry(),pl=["keyword","gray","hex"],Fo={};for(let e of Object.keys(Ie))Fo[[...Ie[e].labels].sort().join("")]=e;var Dn={};function he(e,t){if(!(this instanceof he))return new he(e,t);if(t&&t in pl&&(t=null),t&&!(t in Ie))throw new Error("Unknown model: "+t);let r,i;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof he)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let n=Fr.get(e);if(n===null)throw new Error("Unable to parse color from string: "+e);this.model=n.model,i=Ie[this.model].channels,this.color=n.value.slice(0,i),this.valpha=typeof n.value[i]=="number"?n.value[i]:1}else if(e.length>0){this.model=t||"rgb",i=Ie[this.model].channels;let n=Array.prototype.slice.call(e,0,i);this.color=ko(n,i),this.valpha=typeof e[i]=="number"?e[i]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let n=Object.keys(e);"alpha"in e&&(n.splice(n.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let o=n.sort().join("");if(!(o in Fo))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Fo[o];let{labels:s}=Ie[this.model],c=[];for(r=0;r<s.length;r++)c.push(e[s[r]]);this.color=ko(c)}if(Dn[this.model])for(i=Ie[this.model].channels,r=0;r<i;r++){let n=Dn[this.model][r];n&&(this.color[r]=n(this.color[r]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}he.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Fr.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return Fr.to[t.model](r)},percentString(e){let t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return Fr.to.rgb.percent(r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=Ie[this.model],{labels:r}=Ie[this.model];for(let i=0;i<t;i++)e[r[i]]=this.color[i];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new he([...this.color.map(xv(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new he([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:Y("rgb",0,ae(255)),green:Y("rgb",1,ae(255)),blue:Y("rgb",2,ae(255)),hue:Y(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:Y("hsl",1,ae(100)),lightness:Y("hsl",2,ae(100)),saturationv:Y("hsv",1,ae(100)),value:Y("hsv",2,ae(100)),chroma:Y("hcg",1,ae(100)),gray:Y("hcg",2,ae(100)),white:Y("hwb",1,ae(100)),wblack:Y("hwb",2,ae(100)),cyan:Y("cmyk",0,ae(100)),magenta:Y("cmyk",1,ae(100)),yellow:Y("cmyk",2,ae(100)),black:Y("cmyk",3,ae(100)),x:Y("xyz",0,ae(95.047)),y:Y("xyz",1,ae(100)),z:Y("xyz",2,ae(108.833)),l:Y("lab",0,ae(100)),a:Y("lab",1),b:Y("lab",2),keyword(e){return e!==void 0?new he(e):Ie[this.model].keyword(this.color)},hex(e){return e!==void 0?new he(e):Fr.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new he(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Fr.to.hex(t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,i]of e.entries()){let n=i/255;t[r]=n<=.04045?n/12.92:((n+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return he.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),i=this.rgb(),n=t===void 0?.5:t,o=2*n-1,s=r.alpha()-i.alpha(),c=((o*s===-1?o:(o+s)/(1+o*s))+1)/2,h=1-c;return he.rgb(c*r.red()+h*i.red(),c*r.green()+h*i.green(),c*r.blue()+h*i.blue(),r.alpha()*n+i.alpha()*(1-n))}};for(let e of Object.keys(Ie)){if(pl.includes(e))continue;let{channels:t}=Ie[e];he.prototype[e]=function(...r){return this.model===e?new he(this):r.length>0?new he(r,e):new he([...wv(Ie[this.model][e].raw(this.color)),this.valpha],e)},he[e]=function(...r){let i=r[0];return typeof i=="number"&&(i=ko(r,t)),new he(i,e)}}function vv(e,t){return Number(e.toFixed(t))}function xv(e){return function(t){return vv(t,e)}}function Y(e,t,r){e=Array.isArray(e)?e:[e];for(let i of e)(Dn[i]||(Dn[i]=[]))[t]=r;return e=e[0],function(i){let n;return i!==void 0?(r&&(i=r(i)),n=this[e](),n.color[t]=i,n):(n=this[e]().color[t],r&&(n=r(n)),n)}}function ae(e){return function(t){return Math.max(0,Math.min(e,t))}}function wv(e){return Array.isArray(e)?e:[e]}function ko(e,t){for(let r=0;r<t;r++)typeof e[r]!="number"&&(e[r]=0);return e}ml.exports=he});var yl=E(kr=>{"use strict";y();Object.defineProperty(kr,"__esModule",{value:!0});kr.THEME_KEYS=kr.STANDARD_CHALK=void 0;kr.STANDARD_CHALK=["white","black","blue","yellow","green","red","magenta","cyan","gray","blackBright","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","bgGray","bgBlackBright","bgRedBright","bgGreenBright","bgYellowBright","bgBlueBright","bgMagentaBright","bgCyanBright","bgWhiteBright","bold","underline","dim","italic","strikethrough"];kr.THEME_KEYS=["alias","bin","command","commandSummary","dollarSign","flag","flagDefaultValue","flagOptions","flagRequired","flagSeparator","sectionDescription","sectionHeader","topic","version"]});var er=E(ye=>{"use strict";y();var Ev=ye&&ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),bv=ye&&ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Dv=ye&&ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Ev(t,e,r);return bv(t,e),t},Cv=ye&&ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ye,"__esModule",{value:!0});ye.getColor=ye.parseTheme=ye.colorize=void 0;var vl=Cv(Be()),Sv=Dv(gl()),Av=yl();function xl(e){return Av.STANDARD_CHALK.includes(e)}function _v(e,t){return xl(e)?vl.default[e](t):e?vl.default.hex(e)(t):t}ye.colorize=_v;function Fv(e){return Object.fromEntries(Object.entries(e).map(([t,r])=>[t,wl(r)]).filter(([t,r])=>r))}ye.parseTheme=Fv;function wl(e){try{return xl(e)?e:new Sv.default(e).hex()}catch{}}ye.getColor=wl});var Cn=E(xt=>{"use strict";y();var Cl=xt&&xt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xt,"__esModule",{value:!0});xt.memoizedWarn=xt.warn=void 0;var kv=Cl(Ot()),El=Kt(),bl=Qt(),Tv=Cl(xn());function To(e){let t;if(typeof e=="string")t=new bl.CLIError.Warn(e);else if(e instanceof Error)t=(0,bl.addOclifExitCode)(e);else throw new TypeError("first argument must be a string or instance of Error");let r=(0,Tv.default)(t);r&&kv.default.stderr(r+`
10
+ `),El.config.errorLogger&&El.config.errorLogger.log(t?.stack??"")}xt.warn=To;var Dl=new Set;function Ov(e){Dl.has(e)||To(e),Dl.add(e)}xt.memoizedWarn=Ov;xt.default=To});var Tl=E(Tr=>{"use strict";y();var Pv=Tr&&Tr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.readTSConfig=void 0;var Iv=Pv(et()),Sl=F("node:fs/promises"),Fl=F("node:path"),Nv=Cn(),Al=oe(),Mv=(0,Iv.default)("read-tsconfig");function _l(e,t){try{return F.resolve(t,{paths:[e]})}catch{}}async function kl(e,t){let r;try{r=await t(e)}catch{r=!1}if(r)return e;let i=(0,Fl.dirname)(e);if(i!==e)return kl(i,t)}async function jv(e,t="tsconfig.json"){let r=[],i;try{i=ny()}catch{try{i=F(e+"/node_modules/typescript")}catch{}}if(!i){(0,Nv.memoizedWarn)("Could not find typescript. Please ensure that typescript is a devDependency. Falling back to compiled source.");return}let n=async o=>{let s=await kl(o,async c=>(await(0,Sl.readdir)(c)).includes("package.json"));if(s)try{let c=await(0,Sl.readFile)(o,"utf8"),h=i?.parseConfigFileTextToJson(o,c).config;if(r.push(h),h.extends){if(h.extends.startsWith(".")){let d=_l(s,h.extends);return d?n(d):void 0}let m=_l(s,h.extends);if(m)return n(m)}return h}catch(c){Mv(c)}};return await n((0,Fl.join)(e,t)),{compilerOptions:(0,Al.mergeNestedObjects)(r,"compilerOptions"),"ts-node":(0,Al.mergeNestedObjects)(r,"ts-node")}}Tr.readTSConfig=jv});var Or=E(nt=>{"use strict";y();Object.defineProperty(nt,"__esModule",{value:!0});nt.collectUsableIds=nt.getCommandIdPermutations=nt.getPermutations=nt.Debug=void 0;var Ol=et();function Bv(){process.listenerCount("warning")>1||process.on("warning",e=>{console.error(e.stack),e.detail&&console.error(e.detail)})}function Rv(...e){if(!Ol)return(...r)=>{};let t=Ol(["config",...e].join(":"));return t.enabled&&Bv(),(...r)=>t(...r)}nt.Debug=Rv;function Oo(e){if(e.length===0)return[];if(e.length===1)return[e];let t=[],r=Oo(e.slice(1)),i=e[0];for(let n=0,o=r.length;n<o;n++){let s=r[n];for(let c=0,h=s.length;c<=h;c++){let m=s.slice(0,c),d=s.slice(c),f=[...m,i,...d];t.push(f)}}return t}nt.getPermutations=Oo;function Lv(e){return Oo(e.split(":")).flatMap(t=>t.join(":"))}nt.getCommandIdPermutations=Lv;var $v=e=>new Set(e.flatMap(t=>t.split(":").map((r,i,n)=>n.slice(0,i+1).join(":"))));nt.collectUsableIds=$v});var Pr=E(Re=>{"use strict";y();var qv=Re&&Re.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Re,"__esModule",{value:!0});Re.tsPath=Re.TS_CONFIGS=void 0;var Pl=F("node:fs/promises"),Se=F("node:path"),Uv=qv(Ve()),wi=Cn(),Il=Pt(),Hv=yt(),zv=Tl(),Ml=oe(),Jv=Or(),te=(0,Jv.Debug)("ts-path");Re.TS_CONFIGS={};var Nl=new Set;function Wv(){return process.execPath.split(Se.sep).includes("bun")?"bun":process.execArgv.length===0?"node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Se.sep).includes("ts-node")||process.execArgv[0].split(Se.sep).includes("ts-node")?"ts-node":process.execArgv[0]==="--require"&&process.execArgv[1].split(Se.sep).includes("tsx")?"tsx":"node"}var Sn=Wv();function Gv(e){return"code"in e&&e.code==="ENOENT"}async function Xv(e){try{if(Re.TS_CONFIGS[e])return Re.TS_CONFIGS[e];let t=await(0,zv.readTSConfig)(e);return t?(te("tsconfig: %O",t),Re.TS_CONFIGS[e]=t,Re.TS_CONFIGS[e]):void 0}catch(t){if(Gv(t))return;te(`Could not parse tsconfig.json. Skipping typescript path lookup for ${e}.`),(0,wi.memoizedWarn)(`Could not parse tsconfig.json for ${e}. Falling back to compiled source.`)}}async function Vv(e,t){if(Nl.has(e))return;te("registering ts-node at",e);let r=F.resolve("ts-node",{paths:[e,__dirname]});te("ts-node path:",r);let i;try{i=F(r)}catch{te(`Could not find ts-node at ${r}. Skipping ts-node registration for ${e}.`),(0,wi.memoizedWarn)(`Could not find ts-node at ${r}. Please ensure that ts-node is a devDependency. Falling back to compiled source.`);return}let n=[(0,Se.join)(e,"node_modules","@types")],o=[];if(t.compilerOptions.rootDirs)for(let d of t.compilerOptions.rootDirs)o.push((0,Se.join)(e,d));else t.compilerOptions.rootDir?o.push((0,Se.join)(e,t.compilerOptions.rootDir)):t.compilerOptions.baseUrl?o.push((0,Se.join)(e,t.compilerOptions.baseUrl)):o.push((0,Se.join)(e,"src"));let{baseUrl:s,rootDir:c,...h}=t.compilerOptions,m={compilerOptions:{...h,rootDirs:o,typeRoots:n},...t["ts-node"],cwd:e,esm:t["ts-node"]?.esm??!0,experimentalSpecifierResolution:t["ts-node"]?.experimentalSpecifierResolution??"explicit",scope:!0,scopeDir:e,skipProject:!0,transpileOnly:!0};te("ts-node options: %O",m),i.register(m),Nl.add(e)}function Yv(e,t,r){return(r||e?.moduleType==="commonjs")&&t?.moduleType==="module"}function Kv(e,t,r){if(t?.moduleType!=="module"||r)return!1;let i=Number.parseInt(process.version.replace("v","").split(".")[0],10);return Sn==="ts-node"&&i>=20}async function Qv(e,t){let r=await Xv(e);if(!r)return t;te(`Determining path for ${t}`),Sn==="tsx"||Sn==="bun"?te(`Skipping ts-node registration for ${e} because the runtime is: ${Sn}`):await Vv(e,r);let{baseUrl:i,outDir:n,rootDir:o,rootDirs:s}=r.compilerOptions,c=o??(s??[])[0]??i;if(!c)return te(`no rootDir, rootDirs, or baseUrl specified in tsconfig.json. Returning default path ${t}`),t;if(!n)return te(`no outDir specified in tsconfig.json. Returning default path ${t}`),t;let h=(0,Se.join)(e,n),m=(0,Se.join)(e,c),d=(0,Se.relative)(h,t),f=(0,Se.join)(m,d).replace(/\.js$/,"");return te(`lib dir: ${h}`),te(`src dir: ${m}`),te(`src directory to find: ${f}`),(0,Hv.existsSync)(f)?(te(`Found source directory for ${t} at ${f}`),f):(await Promise.all([(0,Pl.access)(`${f}.ts`).then(()=>`${f}.ts`).catch(()=>!1),(0,Pl.access)(`${f}.tsx`).then(()=>`${f}.tsx`).catch(()=>!1)])).some(Boolean)?(te(`Found source file for ${t} at ${f}`),f):(te(`No source file found. Returning default path ${t}`),(0,Ml.isProd)()||(0,wi.memoizedWarn)(`Could not find source for ${t} based on tsconfig. Defaulting to compiled source.`),t)}async function Zv(e,t,r){let i=r?.options.isRoot?r:Uv.default.getInstance().get("rootPlugin");if(!t)return t;t=t.startsWith(e)?t:(0,Se.join)(e,t);let n=Il.settings.enableAutoTranspile??Il.settings.tsnodeEnabled;if(n===!1)return te(`Skipping typescript path lookup for ${e} because enableAutoTranspile is explicitly set to false`),t;let o=(0,Ml.isProd)();if(n===void 0&&o&&r?.type!=="link")return te(`Skipping typescript path lookup for ${e} because NODE_ENV is NOT "test" or "development"`),t;if(Yv(i,r,o))return te(`Skipping typescript path lookup for ${e} because it's an ESM module (NODE_ENV: ${process.env.NODE_ENV}, root plugin module type: ${i?.moduleType})`),r?.type==="link"&&(0,wi.memoizedWarn)(`${r?.name} is a linked ESM module and cannot be auto-transpiled. Existing compiled source will be used instead.`),t;if(Kv(e,r,o))return te(`Skipping typescript path lookup for ${e} because ts-node is run in node version ${process.version}"`),(0,wi.memoizedWarn)("ts-node executable cannot transpile ESM in Node 20. Existing compiled source will be used instead. See https://github.com/oclif/core/issues/817."),t;try{return await Qv(e,t)}catch(s){return te(s),t}}Re.tsPath=Zv});var Ei=E(st=>{"use strict";y();Object.defineProperty(st,"__esModule",{value:!0});st.isPathModule=st.loadWithDataFromManifest=st.loadWithData=st.load=void 0;var ex=F("node:fs"),An=F("node:path"),No=F("node:url"),jl=Pr(),Po=_o(),Rl=yt(),tx=sy(),rx=[".ts",".js",".mjs",".cjs",".mts",".cts",".tsx",".jsx"],ix=e=>e.type!==void 0;function Mo(e,t,r){throw e.code==="MODULE_NOT_FOUND"||e.code==="ERR_MODULE_NOT_FOUND"?new Po.ModuleLoadError(`${t?"import()":"require"} failed to load ${r}: ${e.message}`):e}async function nx(e,t){let r,i;try{return{filePath:r,isESM:i}=await Ll(e,t),i?await import((0,No.pathToFileURL)(r).href):F(r)}catch(n){Mo(n,i,r??t)}}st.load=nx;async function sx(e,t){let r,i;try{({filePath:r,isESM:i}=await Ll(e,t));let n=i?await import((0,No.pathToFileURL)(r).href):F(r);return{filePath:r,isESM:i,module:n}}catch(n){Mo(n,i,r??t)}}st.loadWithData=sx;async function ox(e,t){let{id:r,isESM:i,relativePath:n}=e;if(!n)throw new Po.ModuleLoadError(`Cached command ${r} does not have a relative path`);if(i===void 0)throw new Po.ModuleLoadError(`Cached command ${r} does not have the isESM property set`);let o=(0,An.join)(t,n.join(An.sep));try{let s=i?await import((0,No.pathToFileURL)(o).href):F(o);return{filePath:o,isESM:i,module:s}}catch(s){Mo(s,i,o??t)}}st.loadWithDataFromManifest=ox;function Io(e){switch((0,An.extname)(e).toLowerCase()){case".js":case".jsx":case".ts":case".tsx":return tx.sync(e)==="module";case".mjs":case".mts":return!0;default:return!1}}st.isPathModule=Io;async function Ll(e,t){let r,i;try{i=F.resolve(t),r=Io(i)}catch{i=(ix(e)?await(0,jl.tsPath)(e.root,t,e):await(0,jl.tsPath)(e.root,t))??t;let n=!1,o=!1;if((0,Rl.existsSync)(i)){n=!0;try{(0,ex.lstatSync)(i)?.isDirectory?.()&&(n=!1,o=!0)}catch{}}if(!n){let s=Bl(i);!s&&o&&(s=Bl((0,An.join)(i,"index"))),s&&(i=s)}r=Io(i)}return{filePath:i,isESM:r}}function Bl(e){for(let t of rx){let r=`${e}${t}`;if((0,Rl.existsSync)(r))return r}return null}});var Fn=E(_n=>{"use strict";y();Object.defineProperty(_n,"__esModule",{value:!0});_n.SINGLE_COMMAND_CLI_SYMBOL=void 0;_n.SINGLE_COMMAND_CLI_SYMBOL=Symbol("SINGLE_COMMAND_CLI").toString()});var jo=E(kn=>{"use strict";y();Object.defineProperty(kn,"__esModule",{value:!0});kn.cacheDefaultValue=void 0;var ax=async(e,t)=>{if(!(t&&e.noCacheDefault)){if(typeof e.defaultHelp=="function")try{return await e.defaultHelp({flags:{},options:e})}catch{return}if(typeof e.default=="function")try{return await e.default({flags:{},options:e})}catch{}else return e.default}};kn.cacheDefaultValue=ax});var Nr=E(Ir=>{"use strict";y();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.toConfiguredId=Ir.toStandardizedId=void 0;function ux(e,t){return e.replaceAll(new RegExp(t.topicSeparator,"g"),":")}Ir.toStandardizedId=ux;function cx(e,t){return e.replaceAll(new RegExp(":","g"),t.topicSeparator||":")}Ir.toConfiguredId=cx});var On=E(Tn=>{"use strict";y();Object.defineProperty(Tn,"__esModule",{value:!0});Tn.ensureArgObject=void 0;function lx(e){return Array.isArray(e)?(e??[]).reduce((t,r)=>({...t,[r.name]:r}),{}):e??{}}Tn.ensureArgObject=lx});var $l=E(Pn=>{"use strict";y();Object.defineProperty(Pn,"__esModule",{value:!0});Pn.DocOpts=void 0;var hx=On(),Bo=class e{cmd;flagList;flagMap;constructor(t){this.cmd=t,this.flagMap={},this.flagList=Object.entries(t.flags||{}).filter(([r,i])=>!i.hidden).map(([r,i])=>(this.flagMap[r]=i,i))}static generate(t){return new e(t).toString()}toString(){let t=["<%= command.id %>"];if(this.cmd.args){let r=this.cmd.strict===!1?"...":"",i=Object.values((0,hx.ensureArgObject)(this.cmd.args)).map(n=>n.required?`${n.name.toUpperCase()}${r}`:`[${n.name.toUpperCase()}${r}]`)||[];t.push(...i)}try{t.push(...Object.values(this.groupFlagElements()))}catch{t.push(...this.flagList.map(r=>{let i=r.char?`-${r.char}`:`--${r.name}`;return r.type==="boolean"?i:`${i}=<value>`}))}return t.join(" ")}combineElementsToFlag(t,r,i,n){if(!this.flagMap[r])return;let o=this.flagMap[r]?.required;(typeof o!="boolean"||!o)&&(o=i.reduce((s,c)=>s||this.flagMap[c]?.required||!1,!1));for(let s of i)t[r]=`${t[r]||""}${n}${t[s]||""}`,delete t[s],delete this.flagMap[s];t[r]=o?`(${t[r]||""})`:`[${t[r]||""}]`,delete this.flagMap[r]}generateElements(t={},r=[]){let i=[];for(let n of r){let o="",s=n.char?`-${n.char}`:`--${n.name}`;n.type==="option"&&(o=n.options?` ${n.options.join("|")}`:" <value>");let c=`${s}${o}`;t[n.name]=c,i.push(c)}return i}groupFlagElements(){let t={};this.generateElements(t,this.flagList.filter(r=>r.required)),this.generateElements(t,this.flagList.filter(r=>!r.required));for(let r of this.flagList)Array.isArray(r.dependsOn)&&this.combineElementsToFlag(t,r.name,r.dependsOn," "),Array.isArray(r.exclusive)&&this.combineElementsToFlag(t,r.name,r.exclusive," | ");for(let r of Object.keys(this.flagMap)){let i=this.flagMap[r]||{};i.required||(t[i.name]=`[${t[i.name]||""}]`)}return t}};Pn.DocOpts=Bo});var Mr=E(ie=>{"use strict";y();var fx=ie&&ie.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),dx=ie&&ie.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),px=ie&&ie.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&fx(t,e,r);return dx(t,e),t};Object.defineProperty(ie,"__esModule",{value:!0});ie.normalizeArgv=ie.formatCommandDeprecationWarning=ie.formatFlagDeprecationWarning=ie.getHelpFlagAdditions=ie.standardizeIDFromArgv=ie.template=void 0;var mx=px(uc()),gx=Or(),yx=Nr();function vx(e){function t(r){return mx.render(r,e)}return t}ie.template=vx;var xx=e=>e.startsWith("-"),wx=e=>e.includes("=");function Ex(e,t){if(e.length===1)return e;let i=(n=>{let o=(0,gx.collectUsableIds)(t.commandIDs),s=[],c=d=>o.has(d),h=d=>(d?[...s,d]:s).filter(Boolean).join(":"),m=()=>{let d=h();if(!d)return!1;let f=t.findCommand(d);return!!(f&&(f.strict===!1||Object.keys(f.args??{}).length>0))};for(let d of n)if(c(h(d)))s.push(d);else{if(wx(d)||xx(d)||m())break;s.push(d)}return h()})(e);if(i){let n=e.slice(i.split(":").length);return[i,...n]}return e}function ql(e,t){return e.length===0||(t.topicSeparator===" "?e=Ex(e,t):t.topicSeparator!==":"&&(e[0]=(0,yx.toStandardizedId)(e[0],t))),e}ie.standardizeIDFromArgv=ql;function bx(e){let t=["--help"],r=e.pjson.oclif.additionalHelpFlags??[];return[...new Set([...t,...r]).values()]}ie.getHelpFlagAdditions=bx;function Dx(e,t){let r=`The "${e}" flag has been deprecated`;return t===!0?`${r}.`:t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r)}ie.formatFlagDeprecationWarning=Dx;function Cx(e,t){let r=`The "${e}" command has been deprecated`;return t?t.message?t.message:(t.version&&(r+=` and will be removed in version ${t.version}`),r+=t.to?`. Use "${t.to}" instead.`:".",r):`${r}.`}ie.formatCommandDeprecationWarning=Cx;function Sx(e,t=process.argv.slice(2)){return e.topicSeparator!==":"&&!t[0]?.includes(":")&&(t=ql(t,e)),t}ie.normalizeArgv=Sx});var In=E(jr=>{"use strict";y();var Br=jr&&jr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(jr,"__esModule",{value:!0});jr.HelpFormatter=void 0;var Ax=Br(Be()),_x=Br(uo()),Fx=Br(co()),bi=Br(br()),kx=Br(oy()),Tx=Br(lo()),Ul=er(),Ox=Yt(),Px=Mr(),Ro=class{config;indentSpacing=2;opts;render;constructor(t,r={}){this.config=t,this.opts={maxWidth:Ox.stdtermwidth,...r},this.render=(0,Px.template)(this)}indent(t,r=this.indentSpacing){return(0,_x.default)(t,r)}renderList(t,r){if(t.length===0)return"";let i=()=>{let h="";for(let[m,d]of t)!m&&!d||(m&&(r.stripAnsi&&(m=(0,bi.default)(m)),h+=this.wrap(m.trim(),r.indentation)),d&&(r.stripAnsi&&(d=(0,bi.default)(d)),h+=`
11
11
  `,h+=this.indent(this.wrap(d.trim(),r.indentation+2),4)),h+=`
12
12
 
13
13
  `);return h.trim()};if(r.multiline)return i();let n=(0,kx.default)(t.map(h=>h[0]).join(`
@@ -17,7 +17,7 @@ ${(0,vn.default)(r,2)}`};function uv(e){if(sv.config.debug)return e.stack;let{ba
17
17
  `),c+=`
18
18
  `,c+=this.indent(p.join(`
19
19
  `),n+2)}}return c&&(o+=s,o+=c),o.trim()}section(t,r){let i;if(typeof r=="string")i=this.render(r);else if(Array.isArray(r))i=r.map(o=>{if("name"in o){let h=o;return[this.render(h.name),this.render(h.description)]}let[s,c]=o;return[this.render(s),c&&this.render(c)]});else{if("header"in r)return this.section(r.header,r.body);i=r.map(o=>[o.name,o.description]).map(([o,s])=>[this.render(o),s&&this.render(s)])}let n=[(0,Ul.colorize)(this.config?.theme?.sectionHeader,Ax.default.bold(t)),(0,Ul.colorize)(this.config?.theme?.sectionDescription,this.indent(Array.isArray(i)?this.renderList(i,{indentation:2,stripAnsi:this.opts.stripAnsi}):i))].join(`
20
- `);return this.opts.stripAnsi?(0,bi.default)(n):n}wrap(t,r=this.indentSpacing){return(0,Tx.default)(this.render(t),this.opts.maxWidth-r,{hard:!0})}};jr.HelpFormatter=Ro});var Lo=E(tr=>{"use strict";y();var zl=tr&&tr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0});tr.CommandHelp=void 0;var Ix=zl(Be()),Nx=zl(Dr()),ue=er(),Mx=On(),Hl=Nr(),Rr=oe(),jx=$l(),Bx=In(),Lr=/\r\n|\n/;function Rx(e){return e==="alphabetical"?"alphabetical":e==="none"?"none":"alphabetical"}var Nn=class extends Bx.HelpFormatter{command;config;opts;constructor(t,r,i){super(r,i),this.command=t,this.config=r,this.opts=i}aliases(t){return!t||t.length===0?void 0:t.map(i=>[(0,ue.colorize)(this.config?.theme?.dollarSign,"$"),(0,ue.colorize)(this.config?.theme?.bin,this.config.bin),(0,ue.colorize)(this.config?.theme?.alias,i)].join(" ")).join(`
20
+ `);return this.opts.stripAnsi?(0,bi.default)(n):n}wrap(t,r=this.indentSpacing){return(0,Tx.default)(this.render(t),this.opts.maxWidth-r,{hard:!0})}};jr.HelpFormatter=Ro});var Lo=E(tr=>{"use strict";y();var zl=tr&&tr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(tr,"__esModule",{value:!0});tr.CommandHelp=void 0;var Ix=zl(Be()),Nx=zl(br()),ue=er(),Mx=On(),Hl=Nr(),Rr=oe(),jx=$l(),Bx=In(),Lr=/\r\n|\n/;function Rx(e){return e==="alphabetical"?"alphabetical":e==="none"?"none":"alphabetical"}var Nn=class extends Bx.HelpFormatter{command;config;opts;constructor(t,r,i){super(r,i),this.command=t,this.config=r,this.opts=i}aliases(t){return!t||t.length===0?void 0:t.map(i=>[(0,ue.colorize)(this.config?.theme?.dollarSign,"$"),(0,ue.colorize)(this.config?.theme?.bin,this.config.bin),(0,ue.colorize)(this.config?.theme?.alias,i)].join(" ")).join(`
21
21
  `)}arg(t){let r=t.name.toUpperCase();return t.required?`${r}`:`[${r}]`}args(t){if(t.filter(r=>r.description).length!==0)return t.map(r=>{let i=this.command.strict===!1?`${r.name.toUpperCase()}...`:r.name.toUpperCase(),n=r.description||"";return r.default&&(n=`${(0,ue.colorize)(this.config?.theme?.flagDefaultValue,`[default: ${r.default}]`)} ${n}`),r.options&&(n=`${(0,ue.colorize)(this.config?.theme?.flagOptions,`(${r.options.join("|")})`)} ${n}`),[(0,ue.colorize)(this.config?.theme?.flag,i),n?(0,ue.colorize)(this.config?.theme?.sectionDescription,n):void 0]})}defaultUsage(){return this.opts.docopts===void 0||this.opts.docopts?jx.DocOpts.generate(this.command):(0,Rr.compact)([this.command.id,Object.values(this.command.args??{})?.filter(t=>!t.hidden).map(t=>this.arg(t)).join(" ")]).join(" ")}description(){let t=this.command,r;if(this.opts.hideCommandSummaryInDescription)r=(t.description||"").split(Lr).slice(1);else if(t.description){let i=t.summary?`${t.summary}
22
22
  `:null;r=i?[...i.split(Lr),...(t.description||"").split(Lr)]:(t.description||"").split(Lr)}if(r)return this.wrap(r.join(`
23
23
  `))}examples(t){return!t||t.length===0?void 0:(0,Rr.castArray)(t).map(i=>{let n,o;if(typeof i=="string"){let m=i.split(Lr).filter(Boolean);if(m.length>=2&&!this.isCommand(m[0])&&m.slice(1).every(d=>this.isCommand(d)))n=m[0],o=m.slice(1);else return m.map(d=>this.formatIfCommand(d)).join(`
@@ -40,12 +40,12 @@ ${this.indent(this.wrap(n.description||"",this.indentSpacing*2))}`}).join(`
40
40
 
41
41
  `)}groupFlags(t){let r=[],i={};for(let n of t){let o=n.helpGroup;o?(i[o]||(i[o]=[]),i[o].push(n)):r.push(n)}return{flagGroups:i,mainFlags:r}}sections(){let t=[{generate:()=>this.usage(),header:this.opts.usageHeader||"USAGE"},{generate:({args:i},n)=>[{body:this.args(i),header:n}],header:"ARGUMENTS"},{generate:({flags:i},n)=>{let{flagGroups:o,mainFlags:s}=this.groupFlags(i),c=[],h=this.flags(s);h&&c.push({body:h,header:n});for(let[m,d]of Object.entries(o)){let f=this.flags(d);f&&c.push({body:f,header:`${m.toUpperCase()} ${n}`})}return(0,Rr.compact)(c)},header:"FLAGS"},{generate:()=>this.description(),header:"DESCRIPTION"},{generate:({cmd:i})=>this.aliases(i.aliases),header:"ALIASES"},{generate:({cmd:i})=>{let n=i.examples||i.example;return this.examples(n)},header:"EXAMPLES"},{generate:({flags:i})=>this.flagsDescriptions(i),header:"FLAG DESCRIPTIONS"}],r=this.opts.sections?.map(i=>i.toLowerCase());return t.filter(({header:i})=>!r||r.includes(i.toLowerCase()))}usage(){let{id:t,usage:r}=this.command,i=(0,Hl.toStandardizedId)(t,this.config),n=(0,Hl.toConfiguredId)(t,this.config);return(r?(0,Rr.castArray)(r):[this.defaultUsage()]).map(s=>{let c=this.opts.maxWidth-this.indentSpacing,h=(0,ue.colorize)(this.config?.theme?.dollarSign,"$"),m=(0,ue.colorize)(this.config?.theme?.bin,this.config.bin),d=(0,ue.colorize)(this.config?.theme?.command,"<%= command.id %>"),f=(0,ue.colorize)(this.config?.theme?.sectionDescription,s.replace("<%= command.id %>","").replace(i,"").replace(n,"").trim()),p=`${h} ${m} ${d} ${f}`.trim();if(p.length>c){let a=p.slice(0,Math.max(0,c)).lastIndexOf(" ");return p.slice(0,Math.max(0,a))+`
42
42
  `+this.indent(this.wrap(p.slice(Math.max(0,a)),this.indentSpacing*2))}return this.wrap(p)}).join(`
43
- `)}formatIfCommand(t){t=this.render(t);let r=(0,ue.colorize)(this.config?.theme?.dollarSign,"$");return t.startsWith(this.config.bin)?`${r} ${t}`:t.startsWith(`$ ${this.config.bin}`)?`${r}${t.replace("$","")}`:t}isCommand(t){return(0,Nx.default)(this.formatIfCommand(t)).startsWith(`${(0,ue.colorize)(this.config?.theme?.dollarSign,"$")} ${this.config.bin}`)}};tr.CommandHelp=Nn;tr.default=Nn});var Jl=E(Di=>{"use strict";y();var Lx=Di&&Di.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Di,"__esModule",{value:!0});var $x=Lx(Dr()),$r=er(),qx=oe(),Ux=In(),$o=class extends Ux.HelpFormatter{config;opts;constructor(t,r){super(t,r),this.config=t,this.opts=r}description(){let t=this.config.pjson.oclif.description||this.config.pjson.description||"";if(t=this.render(t),t=t.split(`
43
+ `)}formatIfCommand(t){t=this.render(t);let r=(0,ue.colorize)(this.config?.theme?.dollarSign,"$");return t.startsWith(this.config.bin)?`${r} ${t}`:t.startsWith(`$ ${this.config.bin}`)?`${r}${t.replace("$","")}`:t}isCommand(t){return(0,Nx.default)(this.formatIfCommand(t)).startsWith(`${(0,ue.colorize)(this.config?.theme?.dollarSign,"$")} ${this.config.bin}`)}};tr.CommandHelp=Nn;tr.default=Nn});var Jl=E(Di=>{"use strict";y();var Lx=Di&&Di.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Di,"__esModule",{value:!0});var $x=Lx(br()),$r=er(),qx=oe(),Ux=In(),$o=class extends Ux.HelpFormatter{config;opts;constructor(t,r){super(t,r),this.config=t,this.opts=r}description(){let t=this.config.pjson.oclif.description||this.config.pjson.description||"";if(t=this.render(t),t=t.split(`
44
44
  `).slice(1).join(`
45
45
  `),!!t)return this.section("DESCRIPTION",this.wrap((0,$r.colorize)(this.config?.theme?.sectionDescription,t)))}root(){let t=this.config.pjson.oclif.description||this.config.pjson.description||"";t=this.render(t),t=t.split(`
46
46
  `)[0];let r=(0,qx.compact)([(0,$r.colorize)(this.config?.theme?.commandSummary,t),this.version(),this.usage(),this.description()]).join(`
47
47
 
48
- `);return this.opts.stripAnsi&&(r=(0,$x.default)(r)),r}usage(){return this.section(this.opts.usageHeader||"USAGE",this.wrap(`${(0,$r.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,$r.colorize)(this.config?.theme?.bin,this.config.bin)} ${(0,$r.colorize)(this.config?.theme?.sectionDescription,"[COMMAND]")}`))}version(){return this.section("VERSION",this.wrap((0,$r.colorize)(this.config?.theme?.version,this.config.userAgent)))}};Di.default=$o});var Ai=E(fe=>{"use strict";y();var qo=fe&&fe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fe,"__esModule",{value:!0});fe.loadHelpClass=fe.Help=fe.HelpBase=fe.standardizeIDFromArgv=fe.normalizeArgv=fe.getHelpFlagAdditions=fe.CommandHelp=void 0;var Wl=F("node:util"),Gl=qo(Dr()),ot=er(),Xl=qo(Ot()),Hx=Pr(),zx=So(),Jx=Ei(),Vl=Fn(),Wx=jo(),Yl=Nr(),Ci=oe(),Gx=Lo(),Xx=In(),Vx=qo(Jl()),Si=Mr(),Yx=Lo();Object.defineProperty(fe,"CommandHelp",{enumerable:!0,get:function(){return Yx.CommandHelp}});var Uo=Mr();Object.defineProperty(fe,"getHelpFlagAdditions",{enumerable:!0,get:function(){return Uo.getHelpFlagAdditions}});Object.defineProperty(fe,"normalizeArgv",{enumerable:!0,get:function(){return Uo.normalizeArgv}});Object.defineProperty(fe,"standardizeIDFromArgv",{enumerable:!0,get:function(){return Uo.standardizeIDFromArgv}});function Kx(e,t){let r=(0,Si.getHelpFlagAdditions)(t);for(let i of e){if(i==="--")return;if(!(r.includes(i)||i==="help"))return i.startsWith("-")?void 0:i}}var Mn=class extends Xx.HelpFormatter{constructor(t,r={}){super(t,r),t.topicSeparator||(t.topicSeparator=":")}};fe.HelpBase=Mn;var jn=class extends Mn{CommandHelpClass=Gx.CommandHelp;constructor(t,r={}){super(t,r)}get sortedCommands(){let{commands:t}=this.config;return t=t.filter(r=>this.opts.all||!r.hidden),t=(0,Ci.sortBy)(t,r=>r.id),t=(0,Ci.uniqBy)(t,r=>r.id),t}get sortedTopics(){let t=this._topics;return t=t.filter(r=>this.opts.all||!r.hidden),t=(0,Ci.sortBy)(t,r=>r.name),t=(0,Ci.uniqBy)(t,r=>r.name),t}command(t){return this.formatCommand(t)}description(t){let r=this.render(t.description||"");return t.summary?r:r.split(`
48
+ `);return this.opts.stripAnsi&&(r=(0,$x.default)(r)),r}usage(){return this.section(this.opts.usageHeader||"USAGE",this.wrap(`${(0,$r.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,$r.colorize)(this.config?.theme?.bin,this.config.bin)} ${(0,$r.colorize)(this.config?.theme?.sectionDescription,"[COMMAND]")}`))}version(){return this.section("VERSION",this.wrap((0,$r.colorize)(this.config?.theme?.version,this.config.userAgent)))}};Di.default=$o});var Ai=E(fe=>{"use strict";y();var qo=fe&&fe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fe,"__esModule",{value:!0});fe.loadHelpClass=fe.Help=fe.HelpBase=fe.standardizeIDFromArgv=fe.normalizeArgv=fe.getHelpFlagAdditions=fe.CommandHelp=void 0;var Wl=F("node:util"),Gl=qo(br()),ot=er(),Xl=qo(Ot()),Hx=Pr(),zx=So(),Jx=Ei(),Vl=Fn(),Wx=jo(),Yl=Nr(),Ci=oe(),Gx=Lo(),Xx=In(),Vx=qo(Jl()),Si=Mr(),Yx=Lo();Object.defineProperty(fe,"CommandHelp",{enumerable:!0,get:function(){return Yx.CommandHelp}});var Uo=Mr();Object.defineProperty(fe,"getHelpFlagAdditions",{enumerable:!0,get:function(){return Uo.getHelpFlagAdditions}});Object.defineProperty(fe,"normalizeArgv",{enumerable:!0,get:function(){return Uo.normalizeArgv}});Object.defineProperty(fe,"standardizeIDFromArgv",{enumerable:!0,get:function(){return Uo.standardizeIDFromArgv}});function Kx(e,t){let r=(0,Si.getHelpFlagAdditions)(t);for(let i of e){if(i==="--")return;if(!(r.includes(i)||i==="help"))return i.startsWith("-")?void 0:i}}var Mn=class extends Xx.HelpFormatter{constructor(t,r={}){super(t,r),t.topicSeparator||(t.topicSeparator=":")}};fe.HelpBase=Mn;var jn=class extends Mn{CommandHelpClass=Gx.CommandHelp;constructor(t,r={}){super(t,r)}get sortedCommands(){let{commands:t}=this.config;return t=t.filter(r=>this.opts.all||!r.hidden),t=(0,Ci.sortBy)(t,r=>r.id),t=(0,Ci.uniqBy)(t,r=>r.id),t}get sortedTopics(){let t=this._topics;return t=t.filter(r=>this.opts.all||!r.hidden),t=(0,Ci.sortBy)(t,r=>r.name),t=(0,Ci.uniqBy)(t,r=>r.name),t}command(t){return this.formatCommand(t)}description(t){let r=this.render(t.description||"");return t.summary?r:r.split(`
49
49
  `).slice(1).join(`
50
50
  `)}formatCommand(t){return this.config.topicSeparator!==":"&&(t.id=t.id.replaceAll(":",this.config.topicSeparator),t.aliases=t.aliases&&t.aliases.map(i=>i.replaceAll(":",this.config.topicSeparator))),this.getCommandHelpClass(t).generate()}formatCommands(t){if(t.length===0)return"";let r=this.renderList(t.filter(i=>this.opts.hideAliasesFromRoot?!i.aliases?.includes(i.id):!0).map(i=>{this.config.topicSeparator!==":"&&(i.id=i.id.replaceAll(":",this.config.topicSeparator));let n=this.summary(i);return[(0,ot.colorize)(this.config?.theme?.command,i.id),n&&(0,ot.colorize)(this.config?.theme?.sectionDescription,(0,Gl.default)(n))]}),{indentation:2,spacer:`
51
51
  `,stripAnsi:this.opts.stripAnsi});return this.section("COMMANDS",r)}formatRoot(){return new Vx.default(this.config,this.opts).root()}formatTopic(t){let r=this.render(t.description||""),i=r.split(`
@@ -67,19 +67,19 @@ ${this.indent(this.wrap(n.description||"",this.indentSpacing*2))}`}).join(`
67
67
  `),this.log(this.formatTopic(t)),n.length>0&&(this.log(this.formatTopics(n)),this.log("")),o.length>0&&(this.log(this.formatCommands(o)),this.log(""))}summary(t){if(!(this.opts.sections&&!this.opts.sections.map(r=>r.toLowerCase()).includes("summary")))return t.summary?(0,ot.colorize)(this.config?.theme?.commandSummary,this.render(t.summary.split(`
68
68
  `)[0])):t.description&&(0,ot.colorize)(this.config?.theme?.commandSummary,this.render(t.description).split(`
69
69
  `)[0])}get _topics(){return this.config.topics.filter(t=>this.config.topics.some(i=>i.name.includes(`${t.name}:`)))}};fe.Help=jn;function Qx(e){return e&&e.default?e.default:e}async function Zx(e){let{pjson:t}=e,r=t.oclif?.helpClass;if(r)try{let i=await(0,Hx.tsPath)(e.root,r)??r,n=await(0,Jx.load)(e,i);return Qx(n)}catch(i){throw new Error(`Unable to load configured help class "${r}", failed with message:
70
- ${i.message}`)}return jn}fe.loadHelpClass=Zx});var Bn=E(Le=>{"use strict";y();var zo=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Le,"__esModule",{value:!0});Le.handle=Le.Exit=void 0;var ew=zo(yc()),tw=zo(Ve()),rw=Ai(),Ho=Kt(),iw=Qt(),nw=yn(),sw=zo(xn());Le.Exit={exit(e=0){process.exit(e)}};async function ow(e){try{e||(e=new iw.CLIError("no error?")),e.message==="SIGINT"&&Le.Exit.exit(1);let t=!(e instanceof nw.ExitError)&&!e.skipOclifErrorHandling,r=(0,sw.default)(e),i=(0,ew.default)(e.stack||"",{pretty:!0});if(t){console.error(r??i);let o=tw.default.getInstance().get("config");if(e.showHelp&&e.parse?.input?.argv&&o){let s={...o.pjson.oclif.helpOptions??o.pjson.helpOptions,sections:["flags","usage","arguments"],sendToStderr:!0},c=new rw.Help(o,s);console.error(),await c.showHelp(process.argv.slice(2))}}let n=e.oclif?.exit??1;Ho.config.errorLogger&&e.code!=="EEXIT"?(i&&Ho.config.errorLogger.log(i),await Ho.config.errorLogger.flush().then(()=>Le.Exit.exit(n)).catch(console.error)):Le.Exit.exit(n)}catch(t){console.error(e.stack),console.error(t.stack),Le.Exit.exit(1)}}Le.handle=ow});var $e=E(ne=>{"use strict";y();Object.defineProperty(ne,"__esModule",{value:!0});ne.warn=ne.exit=ne.Logger=ne.handle=ne.ModuleLoadError=ne.ExitError=ne.CLIError=ne.error=ne.config=void 0;var aw=yn(),uw=Kt();Object.defineProperty(ne,"config",{enumerable:!0,get:function(){return uw.config}});var cw=So();Object.defineProperty(ne,"error",{enumerable:!0,get:function(){return cw.error}});var lw=Qt();Object.defineProperty(ne,"CLIError",{enumerable:!0,get:function(){return lw.CLIError}});var hw=yn();Object.defineProperty(ne,"ExitError",{enumerable:!0,get:function(){return hw.ExitError}});var fw=_o();Object.defineProperty(ne,"ModuleLoadError",{enumerable:!0,get:function(){return fw.ModuleLoadError}});var dw=Bn();Object.defineProperty(ne,"handle",{enumerable:!0,get:function(){return dw.handle}});var pw=bo();Object.defineProperty(ne,"Logger",{enumerable:!0,get:function(){return pw.Logger}});function mw(e=0){throw new aw.ExitError(e)}ne.exit=mw;var gw=Cn();Object.defineProperty(ne,"warn",{enumerable:!0,get:function(){return gw.warn}})});var Ln=E(Rn=>{"use strict";y();Object.defineProperty(Rn,"__esModule",{value:!0});Rn.ActionBase=void 0;var Kl=F("node:util"),Ql=oe(),Jo=class{std="stderr";stdmocks;type;stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write};get output(){return this.globals.output}set output(t){this.globals.output=t}get running(){return!!this.task}get status(){return this.task?this.task.status:void 0}set status(t){let{task:r}=this;r&&r.status!==t&&(this._updateStatus(t,r.status),r.status=t)}get task(){return this.globals.action.task}set task(t){this.globals.action.task=t}pause(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=t();return i&&n&&this._resume(),o}async pauseAsync(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=await t();return i&&n&&this._resume(),o}start(t,r,i={}){this.std=i.stdout?"stdout":"stderr";let n={action:t,active:!!(this.task&&this.task.active),status:r};this.task=n,this._start(i),n.active=!0,this._stdout(!0)}stop(t="done"){let{task:r}=this;r&&(this._stop(t),r.active=!1,this.task=void 0,this._stdout(!1))}_flushStdout(){try{let t="",r;for(;this.stdmocks&&this.stdmocks.length>0;){let i=this.stdmocks.shift();r=i[0],this._write(r,i[1]),t+=i[1][0].toString("utf8")}t&&r&&t.at(-1)!==`
70
+ ${i.message}`)}return jn}fe.loadHelpClass=Zx});var Bn=E(Le=>{"use strict";y();var zo=Le&&Le.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Le,"__esModule",{value:!0});Le.handle=Le.Exit=void 0;var ew=zo(cc()),tw=zo(Ve()),rw=Ai(),Ho=Kt(),iw=Qt(),nw=yn(),sw=zo(xn());Le.Exit={exit(e=0){process.exit(e)}};async function ow(e){try{e||(e=new iw.CLIError("no error?")),e.message==="SIGINT"&&Le.Exit.exit(1);let t=!(e instanceof nw.ExitError)&&!e.skipOclifErrorHandling,r=(0,sw.default)(e),i=(0,ew.default)(e.stack||"",{pretty:!0});if(t){console.error(r??i);let o=tw.default.getInstance().get("config");if(e.showHelp&&e.parse?.input?.argv&&o){let s={...o.pjson.oclif.helpOptions??o.pjson.helpOptions,sections:["flags","usage","arguments"],sendToStderr:!0},c=new rw.Help(o,s);console.error(),await c.showHelp(process.argv.slice(2))}}let n=e.oclif?.exit??1;Ho.config.errorLogger&&e.code!=="EEXIT"?(i&&Ho.config.errorLogger.log(i),await Ho.config.errorLogger.flush().then(()=>Le.Exit.exit(n)).catch(console.error)):Le.Exit.exit(n)}catch(t){console.error(e.stack),console.error(t.stack),Le.Exit.exit(1)}}Le.handle=ow});var $e=E(ne=>{"use strict";y();Object.defineProperty(ne,"__esModule",{value:!0});ne.warn=ne.exit=ne.Logger=ne.handle=ne.ModuleLoadError=ne.ExitError=ne.CLIError=ne.error=ne.config=void 0;var aw=yn(),uw=Kt();Object.defineProperty(ne,"config",{enumerable:!0,get:function(){return uw.config}});var cw=So();Object.defineProperty(ne,"error",{enumerable:!0,get:function(){return cw.error}});var lw=Qt();Object.defineProperty(ne,"CLIError",{enumerable:!0,get:function(){return lw.CLIError}});var hw=yn();Object.defineProperty(ne,"ExitError",{enumerable:!0,get:function(){return hw.ExitError}});var fw=_o();Object.defineProperty(ne,"ModuleLoadError",{enumerable:!0,get:function(){return fw.ModuleLoadError}});var dw=Bn();Object.defineProperty(ne,"handle",{enumerable:!0,get:function(){return dw.handle}});var pw=bo();Object.defineProperty(ne,"Logger",{enumerable:!0,get:function(){return pw.Logger}});function mw(e=0){throw new aw.ExitError(e)}ne.exit=mw;var gw=Cn();Object.defineProperty(ne,"warn",{enumerable:!0,get:function(){return gw.warn}})});var Ln=E(Rn=>{"use strict";y();Object.defineProperty(Rn,"__esModule",{value:!0});Rn.ActionBase=void 0;var Kl=F("node:util"),Ql=oe(),Jo=class{std="stderr";stdmocks;type;stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write};get output(){return this.globals.output}set output(t){this.globals.output=t}get running(){return!!this.task}get status(){return this.task?this.task.status:void 0}set status(t){let{task:r}=this;r&&r.status!==t&&(this._updateStatus(t,r.status),r.status=t)}get task(){return this.globals.action.task}set task(t){this.globals.action.task=t}pause(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=t();return i&&n&&this._resume(),o}async pauseAsync(t,r){let{task:i}=this,n=i&&i.active;i&&n&&(this._pause(r),this._stdout(!1),i.active=!1);let o=await t();return i&&n&&this._resume(),o}start(t,r,i={}){this.std=i.stdout?"stdout":"stderr";let n={action:t,active:!!(this.task&&this.task.active),status:r};this.task=n,this._start(i),n.active=!0,this._stdout(!0)}stop(t="done"){let{task:r}=this;r&&(this._stop(t),r.active=!1,this.task=void 0,this._stdout(!1))}_flushStdout(){try{let t="",r;for(;this.stdmocks&&this.stdmocks.length>0;){let i=this.stdmocks.shift();r=i[0],this._write(r,i[1]),t+=i[1][0].toString("utf8")}t&&r&&t.at(-1)!==`
71
71
  `&&this._write(r,`
72
72
  `)}catch(t){this._write("stderr",(0,Kl.inspect)(t))}}_pause(t){throw new Error("not implemented")}_resume(){this.task&&this.start(this.task.action,this.task.status)}_start(t){throw new Error("not implemented")}_stdout(t){try{if(t){if(this.stdmocks)return;this.stdmockOrigs={stderr:process.stderr.write,stdout:process.stdout.write},this.stdmocks=[],process.stdout.write=(...r)=>(this.stdmocks.push(["stdout",r]),!0),process.stderr.write=(...r)=>(this.stdmocks.push(["stderr",r]),!0)}else{if(!this.stdmocks)return;delete this.stdmocks,process.stdout.write=this.stdmockOrigs.stdout,process.stderr.write=this.stdmockOrigs.stderr}}catch(r){this._write("stderr",(0,Kl.inspect)(r))}}_stop(t){throw new Error("not implemented")}_updateStatus(t,r){}_write(t,r){switch(t){case"stdout":{this.stdmockOrigs.stdout.apply(process.stdout,(0,Ql.castArray)(r));break}case"stderr":{this.stdmockOrigs.stderr.apply(process.stderr,(0,Ql.castArray)(r));break}default:throw new Error(`invalid std: ${t}`)}}get globals(){global.ux=global.ux||{};let t=global.ux;return t.action=t.action||{},t}};Rn.ActionBase=Jo});var Zl=E(Go=>{"use strict";y();Object.defineProperty(Go,"__esModule",{value:!0});var yw=Ln(),Wo=class extends yw.ActionBase{type="simple";_flush(){this._write(this.std,`
73
- `),this._flushStdout()}_pause(t){t?this._updateStatus(t):this._flush()}_render(t,r){this.task&&(this.task.active&&this._flush(),this._write(this.std,r?`${t}... ${r}`:`${t}...`))}_resume(){}_start(){this.task&&this._render(this.task.action,this.task.status)}_stop(t){this.task&&this._updateStatus(t,this.task.status,!0)}_updateStatus(t,r,i=!1){this.task&&(this.task.active&&!r?this._write(this.std,` ${t}`):this._write(this.std,`${this.task.action}... ${t}`),(i||!r)&&this._flush())}};Go.default=Wo});var eh=E(Xo=>{"use strict";y();Object.defineProperty(Xo,"__esModule",{value:!0});Xo.default={arc:{frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"],interval:100},arrow:{frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"],interval:100},arrow2:{frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "],interval:80},arrow3:{frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"],interval:120},balloon:{frames:[" ",".","o","O","@","*"," "],interval:140},balloon2:{frames:[".","o","O","\xB0","O","o","."],interval:120},bounce:{frames:["\u2801","\u2802","\u2804","\u2802"],interval:120},bouncingBall:{frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"],interval:80},bouncingBar:{frames:["[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"],interval:80},boxBounce:{frames:["\u2596","\u2598","\u259D","\u2597"],interval:120},boxBounce2:{frames:["\u258C","\u2580","\u2590","\u2584"],interval:100},circle:{frames:["\u25E1","\u2299","\u25E0"],interval:120},circleHalves:{frames:["\u25D0","\u25D3","\u25D1","\u25D2"],interval:50},circleQuarters:{frames:["\u25F4","\u25F7","\u25F6","\u25F5"],interval:120},clock:{frames:["\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "],interval:100},dots:{frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],interval:80},dots2:{frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"],interval:80},dots3:{frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"],interval:80},dots4:{frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"],interval:80},dots5:{frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"],interval:80},dots6:{frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"],interval:80},dots7:{frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"],interval:80},dots8:{frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"],interval:80},dots9:{frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"],interval:80},dots10:{frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"],interval:80},dots11:{frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"],interval:100},earth:{frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "],interval:180},flip:{frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"],interval:70},growHorizontal:{frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"],interval:120},growVertical:{frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"],interval:120},hamburger:{frames:["\u2631","\u2632","\u2634"],interval:100},hearts:{frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "],interval:100},hexagon:{frames:["\u2B21","\u2B22"],interval:400},line:{frames:["-","\\","|","/"],interval:130},line2:{frames:["\u2802","-","\u2013","\u2014","\u2013","-"],interval:100},monkey:{frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "],interval:300},moon:{frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "],interval:80},noise:{frames:["\u2593","\u2592","\u2591"],interval:100},pipe:{frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"],interval:100},pong:{frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"],interval:80},runner:{frames:["\u{1F6B6} ","\u{1F3C3} "],interval:140},simpleDots:{frames:[". ",".. ","..."," "],interval:400},simpleDotsScrolling:{frames:[". ",".. ","..."," .."," ."," "],interval:200},smiley:{frames:["\u{1F604} ","\u{1F61D} "],interval:200},squareCorners:{frames:["\u25F0","\u25F3","\u25F2","\u25F1"],interval:180},squish:{frames:["\u256B","\u256A"],interval:100},star:{frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"],interval:70},star2:{frames:["+","x","*"],interval:80},toggle:{frames:["\u22B6","\u22B7"],interval:250},toggle2:{frames:["\u25AB","\u25AA"],interval:80},toggle3:{frames:["\u25A1","\u25A0"],interval:120},toggle4:{frames:["\u25A0","\u25A1","\u25AA","\u25AB"],interval:100},toggle5:{frames:["\u25AE","\u25AF"],interval:100},toggle6:{frames:["\u101D","\u1040"],interval:300},toggle7:{frames:["\u29BE","\u29BF"],interval:80},toggle8:{frames:["\u25CD","\u25CC"],interval:100},toggle9:{frames:["\u25C9","\u25CE"],interval:100},toggle10:{frames:["\u3282","\u3280","\u3281"],interval:100},toggle11:{frames:["\u29C7","\u29C6"],interval:50},toggle12:{frames:["\u2617","\u2616"],interval:120},toggle13:{frames:["=","*","-"],interval:80},triangle:{frames:["\u25E2","\u25E3","\u25E4","\u25E5"],interval:50}}});var rh=E(Ye=>{"use strict";y();var vw=Ye&&Ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),xw=Ye&&Ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ww=Ye&&Ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&vw(t,e,r);return xw(t,e),t},$n=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ye,"__esModule",{value:!0});var Ew=$n(vc()),bw=$n(Be()),Dw=$n(Dr()),Vo=ww(ty()),Cw=Yt(),Sw=Ln(),th=$n(eh()),Yo=fo();function Aw(e){return Vo?(Vo.stdout?Vo.stdout.has256:(process.env.TERM||"").includes("256"))?`\x1B[38;5;104m${e}${Ew.default.reset.open}`:bw.default.magenta(e):e}var Ko=class extends Sw.ActionBase{frameIndex;frames;spinner;type="spinner";constructor(){super(),this.frames=this.getFrames(),this.frameIndex=0}_frame(){let t=this.frames[this.frameIndex];return this.frameIndex=++this.frameIndex%this.frames.length,Aw(t)}_lines(t){return(0,Dw.default)(t).split(`
73
+ `),this._flushStdout()}_pause(t){t?this._updateStatus(t):this._flush()}_render(t,r){this.task&&(this.task.active&&this._flush(),this._write(this.std,r?`${t}... ${r}`:`${t}...`))}_resume(){}_start(){this.task&&this._render(this.task.action,this.task.status)}_stop(t){this.task&&this._updateStatus(t,this.task.status,!0)}_updateStatus(t,r,i=!1){this.task&&(this.task.active&&!r?this._write(this.std,` ${t}`):this._write(this.std,`${this.task.action}... ${t}`),(i||!r)&&this._flush())}};Go.default=Wo});var eh=E(Xo=>{"use strict";y();Object.defineProperty(Xo,"__esModule",{value:!0});Xo.default={arc:{frames:["\u25DC","\u25E0","\u25DD","\u25DE","\u25E1","\u25DF"],interval:100},arrow:{frames:["\u2190","\u2196","\u2191","\u2197","\u2192","\u2198","\u2193","\u2199"],interval:100},arrow2:{frames:["\u2B06\uFE0F ","\u2197\uFE0F ","\u27A1\uFE0F ","\u2198\uFE0F ","\u2B07\uFE0F ","\u2199\uFE0F ","\u2B05\uFE0F ","\u2196\uFE0F "],interval:80},arrow3:{frames:["\u25B9\u25B9\u25B9\u25B9\u25B9","\u25B8\u25B9\u25B9\u25B9\u25B9","\u25B9\u25B8\u25B9\u25B9\u25B9","\u25B9\u25B9\u25B8\u25B9\u25B9","\u25B9\u25B9\u25B9\u25B8\u25B9","\u25B9\u25B9\u25B9\u25B9\u25B8"],interval:120},balloon:{frames:[" ",".","o","O","@","*"," "],interval:140},balloon2:{frames:[".","o","O","\xB0","O","o","."],interval:120},bounce:{frames:["\u2801","\u2802","\u2804","\u2802"],interval:120},bouncingBall:{frames:["( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF)","( \u25CF )","( \u25CF )","( \u25CF )","( \u25CF )","(\u25CF )"],interval:80},bouncingBar:{frames:["[ ]","[ =]","[ ==]","[ ===]","[====]","[=== ]","[== ]","[= ]"],interval:80},boxBounce:{frames:["\u2596","\u2598","\u259D","\u2597"],interval:120},boxBounce2:{frames:["\u258C","\u2580","\u2590","\u2584"],interval:100},circle:{frames:["\u25E1","\u2299","\u25E0"],interval:120},circleHalves:{frames:["\u25D0","\u25D3","\u25D1","\u25D2"],interval:50},circleQuarters:{frames:["\u25F4","\u25F7","\u25F6","\u25F5"],interval:120},clock:{frames:["\u{1F550} ","\u{1F551} ","\u{1F552} ","\u{1F553} ","\u{1F554} ","\u{1F555} ","\u{1F556} ","\u{1F557} ","\u{1F558} ","\u{1F559} ","\u{1F55A} "],interval:100},dots:{frames:["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],interval:80},dots2:{frames:["\u28FE","\u28FD","\u28FB","\u28BF","\u287F","\u28DF","\u28EF","\u28F7"],interval:80},dots3:{frames:["\u280B","\u2819","\u281A","\u281E","\u2816","\u2826","\u2834","\u2832","\u2833","\u2813"],interval:80},dots4:{frames:["\u2804","\u2806","\u2807","\u280B","\u2819","\u2838","\u2830","\u2820","\u2830","\u2838","\u2819","\u280B","\u2807","\u2806"],interval:80},dots5:{frames:["\u280B","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B"],interval:80},dots6:{frames:["\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2834","\u2832","\u2812","\u2802","\u2802","\u2812","\u281A","\u2819","\u2809","\u2801"],interval:80},dots7:{frames:["\u2808","\u2809","\u280B","\u2813","\u2812","\u2810","\u2810","\u2812","\u2816","\u2826","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808"],interval:80},dots8:{frames:["\u2801","\u2801","\u2809","\u2819","\u281A","\u2812","\u2802","\u2802","\u2812","\u2832","\u2834","\u2824","\u2804","\u2804","\u2824","\u2820","\u2820","\u2824","\u2826","\u2816","\u2812","\u2810","\u2810","\u2812","\u2813","\u280B","\u2809","\u2808","\u2808"],interval:80},dots9:{frames:["\u28B9","\u28BA","\u28BC","\u28F8","\u28C7","\u2867","\u2857","\u284F"],interval:80},dots10:{frames:["\u2884","\u2882","\u2881","\u2841","\u2848","\u2850","\u2860"],interval:80},dots11:{frames:["\u2801","\u2802","\u2804","\u2840","\u2880","\u2820","\u2810","\u2808"],interval:100},earth:{frames:["\u{1F30D} ","\u{1F30E} ","\u{1F30F} "],interval:180},flip:{frames:["_","_","_","-","`","`","'","\xB4","-","_","_","_"],interval:70},growHorizontal:{frames:["\u258F","\u258E","\u258D","\u258C","\u258B","\u258A","\u2589","\u258A","\u258B","\u258C","\u258D","\u258E"],interval:120},growVertical:{frames:["\u2581","\u2583","\u2584","\u2585","\u2586","\u2587","\u2586","\u2585","\u2584","\u2583"],interval:120},hamburger:{frames:["\u2631","\u2632","\u2634"],interval:100},hearts:{frames:["\u{1F49B} ","\u{1F499} ","\u{1F49C} ","\u{1F49A} ","\u2764\uFE0F "],interval:100},hexagon:{frames:["\u2B21","\u2B22"],interval:400},line:{frames:["-","\\","|","/"],interval:130},line2:{frames:["\u2802","-","\u2013","\u2014","\u2013","-"],interval:100},monkey:{frames:["\u{1F648} ","\u{1F648} ","\u{1F649} ","\u{1F64A} "],interval:300},moon:{frames:["\u{1F311} ","\u{1F312} ","\u{1F313} ","\u{1F314} ","\u{1F315} ","\u{1F316} ","\u{1F317} ","\u{1F318} "],interval:80},noise:{frames:["\u2593","\u2592","\u2591"],interval:100},pipe:{frames:["\u2524","\u2518","\u2534","\u2514","\u251C","\u250C","\u252C","\u2510"],interval:100},pong:{frames:["\u2590\u2802 \u258C","\u2590\u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802\u258C","\u2590 \u2820\u258C","\u2590 \u2840\u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590 \u2820 \u258C","\u2590 \u2802 \u258C","\u2590 \u2808 \u258C","\u2590 \u2802 \u258C","\u2590 \u2820 \u258C","\u2590 \u2840 \u258C","\u2590\u2820 \u258C"],interval:80},runner:{frames:["\u{1F6B6} ","\u{1F3C3} "],interval:140},simpleDots:{frames:[". ",".. ","..."," "],interval:400},simpleDotsScrolling:{frames:[". ",".. ","..."," .."," ."," "],interval:200},smiley:{frames:["\u{1F604} ","\u{1F61D} "],interval:200},squareCorners:{frames:["\u25F0","\u25F3","\u25F2","\u25F1"],interval:180},squish:{frames:["\u256B","\u256A"],interval:100},star:{frames:["\u2736","\u2738","\u2739","\u273A","\u2739","\u2737"],interval:70},star2:{frames:["+","x","*"],interval:80},toggle:{frames:["\u22B6","\u22B7"],interval:250},toggle2:{frames:["\u25AB","\u25AA"],interval:80},toggle3:{frames:["\u25A1","\u25A0"],interval:120},toggle4:{frames:["\u25A0","\u25A1","\u25AA","\u25AB"],interval:100},toggle5:{frames:["\u25AE","\u25AF"],interval:100},toggle6:{frames:["\u101D","\u1040"],interval:300},toggle7:{frames:["\u29BE","\u29BF"],interval:80},toggle8:{frames:["\u25CD","\u25CC"],interval:100},toggle9:{frames:["\u25C9","\u25CE"],interval:100},toggle10:{frames:["\u3282","\u3280","\u3281"],interval:100},toggle11:{frames:["\u29C7","\u29C6"],interval:50},toggle12:{frames:["\u2617","\u2616"],interval:120},toggle13:{frames:["=","*","-"],interval:80},triangle:{frames:["\u25E2","\u25E3","\u25E4","\u25E5"],interval:50}}});var rh=E(Ye=>{"use strict";y();var vw=Ye&&Ye.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),xw=Ye&&Ye.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ww=Ye&&Ye.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&vw(t,e,r);return xw(t,e),t},$n=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ye,"__esModule",{value:!0});var Ew=$n(lc()),bw=$n(Be()),Dw=$n(br()),Vo=ww(Z0()),Cw=Yt(),Sw=Ln(),th=$n(eh()),Yo=ho();function Aw(e){return Vo?(Vo.stdout?Vo.stdout.has256:(process.env.TERM||"").includes("256"))?`\x1B[38;5;104m${e}${Ew.default.reset.open}`:bw.default.magenta(e):e}var Ko=class extends Sw.ActionBase{frameIndex;frames;spinner;type="spinner";constructor(){super(),this.frames=this.getFrames(),this.frameIndex=0}_frame(){let t=this.frames[this.frameIndex];return this.frameIndex=++this.frameIndex%this.frames.length,Aw(t)}_lines(t){return(0,Dw.default)(t).split(`
74
74
  `).map(r=>Math.ceil(r.length/Cw.errtermwidth)).reduce((r,i)=>r+i,0)}_pause(t){this.spinner&&clearInterval(this.spinner),this._reset(),t&&this._render(` ${t}`),this.output=void 0}_render(t){if(!this.task)return;this._reset(),this._flushStdout();let r=t==="spinner"?` ${this._frame()}`:t||"",i=this.task.status?` ${this.task.status}`:"";this.output=`${this.task.action}...${r}${i}
75
- `,this._write(this.std,this.output)}_reset(){if(!this.output)return;let t=this._lines(this.output);this._write(this.std,Yo.cursorLeft+Yo.cursorUp(t)+Yo.eraseDown),this.output=void 0}_start(t){t.style&&(this.frames=this.getFrames(t)),this._reset(),this.spinner&&clearInterval(this.spinner),this._render(),this.spinner=setInterval(i=>this._render.bind(this)(i),process.platform==="win32"?500:100,"spinner"),this.spinner.unref()}_stop(t){this.task&&(this.task.status=t),this.spinner&&clearInterval(this.spinner),this._render(),this.output=void 0}getFrames(t){return t?.style?th.default[t.style].frames:th.default[process.platform==="win32"?"line":"dots2"].frames}};Ye.default=Ko});var Un=E(at=>{"use strict";y();var Qo=at&&at.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(at,"__esModule",{value:!0});at.config=at.Config=void 0;var _w=Qo(Ve()),Fw=Qo(Zl()),kw=Qo(rh()),ih=global,Nt=ih.ux||(ih.ux={}),Tw=!!process.stderr.isTTY&&!process.env.CI&&!["dumb","emacs-color"].includes(process.env.TERM)&&"spinner"||"simple",Ow=Tw==="spinner"?kw.default:Fw.default,qn=class{action=new Ow;errorsHandled=!1;outputLevel="info";showStackTrace=!0;get context(){return Nt.context||{}}set context(t){Nt.context=t}get debug(){return Nt.debug||process.env.DEBUG==="*"}set debug(t){Nt.debug=t}};at.Config=qn;function Pw(){let t=_w.default.getInstance().get("@oclif/core")?.version.split(".")[0]||"unknown";return Nt[t]||(Nt[t]=new qn),Nt[t]}at.config=Pw();at.default=at.config});var zn=E(Hn=>{"use strict";y();Object.defineProperty(Hn,"__esModule",{value:!0});Hn.flush=void 0;var Iw=$e();function Nw(e,t){function r(i,n=!1){return new Promise(o=>{let s=setTimeout(()=>o(null),i);n&&s.unref()})}return Promise.race([e,r(t,!0).then(()=>(0,Iw.error)("timed out"))])}async function Mw(){let e=new Promise(r=>{process.stdout.once("drain",()=>r(null))});if(!process.stdout.write(""))return e}async function jw(e=1e4){await Nw(Mw(),e)}Hn.flush=jw});var oh=E((IO,sh)=>{"use strict";y();var Mt=process.stdin,ut=process.stderr,Jn={hide:(e,t={})=>Jn.raw(e,!1,t),mask:(e,t={})=>Jn.raw(e,!0,t),raw:(e,t,r={})=>!Mt.setRawMode||process.env.TERM==="dumb"?Jn.notty(e):new Promise(function(i,n){let o=fo(),s="";ut.write(o.eraseLine),ut.write(o.cursorLeft),ut.write(e),Mt.resume(),Mt.setRawMode(!0);function c(){t?ut.write(o.cursorHide+o.cursorLeft+e+s.replace(/./g,"*")+`
75
+ `,this._write(this.std,this.output)}_reset(){if(!this.output)return;let t=this._lines(this.output);this._write(this.std,Yo.cursorLeft+Yo.cursorUp(t)+Yo.eraseDown),this.output=void 0}_start(t){t.style&&(this.frames=this.getFrames(t)),this._reset(),this.spinner&&clearInterval(this.spinner),this._render(),this.spinner=setInterval(i=>this._render.bind(this)(i),process.platform==="win32"?500:100,"spinner"),this.spinner.unref()}_stop(t){this.task&&(this.task.status=t),this.spinner&&clearInterval(this.spinner),this._render(),this.output=void 0}getFrames(t){return t?.style?th.default[t.style].frames:th.default[process.platform==="win32"?"line":"dots2"].frames}};Ye.default=Ko});var Un=E(at=>{"use strict";y();var Qo=at&&at.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(at,"__esModule",{value:!0});at.config=at.Config=void 0;var _w=Qo(Ve()),Fw=Qo(Zl()),kw=Qo(rh()),ih=global,Nt=ih.ux||(ih.ux={}),Tw=!!process.stderr.isTTY&&!process.env.CI&&!["dumb","emacs-color"].includes(process.env.TERM)&&"spinner"||"simple",Ow=Tw==="spinner"?kw.default:Fw.default,qn=class{action=new Ow;errorsHandled=!1;outputLevel="info";showStackTrace=!0;get context(){return Nt.context||{}}set context(t){Nt.context=t}get debug(){return Nt.debug||process.env.DEBUG==="*"}set debug(t){Nt.debug=t}};at.Config=qn;function Pw(){let t=_w.default.getInstance().get("@oclif/core")?.version.split(".")[0]||"unknown";return Nt[t]||(Nt[t]=new qn),Nt[t]}at.config=Pw();at.default=at.config});var zn=E(Hn=>{"use strict";y();Object.defineProperty(Hn,"__esModule",{value:!0});Hn.flush=void 0;var Iw=$e();function Nw(e,t){function r(i,n=!1){return new Promise(o=>{let s=setTimeout(()=>o(null),i);n&&s.unref()})}return Promise.race([e,r(t,!0).then(()=>(0,Iw.error)("timed out"))])}async function Mw(){let e=new Promise(r=>{process.stdout.once("drain",()=>r(null))});if(!process.stdout.write(""))return e}async function jw(e=1e4){await Nw(Mw(),e)}Hn.flush=jw});var oh=E((IO,sh)=>{"use strict";y();var Mt=process.stdin,ut=process.stderr,Jn={hide:(e,t={})=>Jn.raw(e,!1,t),mask:(e,t={})=>Jn.raw(e,!0,t),raw:(e,t,r={})=>!Mt.setRawMode||process.env.TERM==="dumb"?Jn.notty(e):new Promise(function(i,n){let o=ho(),s="";ut.write(o.eraseLine),ut.write(o.cursorLeft),ut.write(e),Mt.resume(),Mt.setRawMode(!0);function c(){t?ut.write(o.cursorHide+o.cursorLeft+e+s.replace(/./g,"*")+`
76
76
  `+o.cursorShow):ut.write(`
77
77
  `),Mt.removeListener("data",p),Mt.setRawMode(!1),Mt.pause()}function h(){r.required&&s.length===0||(c(),s=s.replace(/\r$/,""),s=s||r.default,i(s))}function m(){n(new Error("SIGINT")),c()}function d(){s.length!==0&&(s=s.substr(0,s.length-1),ut.write(o.cursorBackward(1)),ut.write(o.eraseEndLine))}function f(a){s+=a,ut.write(t?a:"*".repeat(a.length))}let p=function(a){switch(a){case"":case"\r":case`
78
78
  `:return h();case"":return m();default:return a.charCodeAt(0)===127?d():f(a)}};Mt.on("data",p)}),notty:e=>new Promise((t,r)=>{let i=ly();ut.write(e);let n=i.sync("sh",["-c","read -s PASS && echo $PASS"],{stdio:["inherit","pipe","inherit"],encoding:"utf8"});if(ut.write(`
79
- `),n.error)return r(n.error);t(n.stdout.trim())})};function nh(e,t={}){return t=Object.assign({method:"mask",required:t.default===void 0,default:""},t),Mt.setEncoding("utf8"),Jn[t.method](e,t).then(r=>r||(t.required?nh(e):""))}sh.exports=nh});var fh=E(ve=>{"use strict";y();var Bw=ve&&ve.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),Rw=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lw=ve&&ve.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Bw(t,e,r);return Rw(t,e),t},$w=ve&&ve.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ve,"__esModule",{value:!0});ve.anykey=ve.confirm=ve.prompt=void 0;var _i=$w(Be()),ah=Lw($e()),ch=Un();function Zo(e,t=100){if(t<0)throw new Error("no input");return new Promise((r,i)=>{let n;e.timeout&&(n=setTimeout(()=>{process.stdin.pause(),i(new Error("Prompt timeout"))},e.timeout),n.unref()),process.stdin.setEncoding("utf8"),process.stderr.write(e.prompt),process.stdin.resume(),process.stdin.once("data",o=>{n&&clearTimeout(n),process.stdin.pause();let s=(typeof o=="string"?o:o.toString()).trim();!e.default&&e.required&&s===""?r(Zo(e,t-1)):r(s||e.default)})})}function uh(e,t,r){let i="> ";return r&&t==="hide"&&(r="*".repeat(r.length)),e&&r?i=e+" "+_i.default.yellow("["+r+"]")+": ":e&&(i=`${e}: `),i}async function qw(e){let t=process.stdin.isRaw;process.stdin.setRawMode&&process.stdin.setRawMode(!0),e.required=e.required??!1;let r=await Zo(e);return process.stdin.setRawMode&&process.stdin.setRawMode(!!t),r}function Uw(e){let t=fo();process.stderr.write(t.cursorHide+t.cursorUp(1)+t.cursorLeft+e+t.cursorDown(1)+t.cursorLeft+t.cursorShow)}async function lh(e,t={}){let r=uh(e,t.type,t.default),i={default:"",isTTY:!!(process.env.TERM!=="dumb"&&process.stdin.isTTY),name:e,prompt:r,required:!0,type:"normal",...t},n=oh();switch(i.type){case"normal":return Zo(i);case"single":return qw(i);case"mask":return n(i.prompt,{default:i.default,method:i.type,required:i.required}).then(o=>(Uw(uh(e,"hide",t.default)),o));case"hide":return n(i.prompt,{default:i.default,method:i.type,required:i.required});default:throw new Error(`unexpected type ${i.type}`)}}async function hh(e,t={}){return ch.config.action.pauseAsync(()=>lh(e,t),_i.default.cyan("?"))}ve.prompt=hh;function Hw(e){return ch.config.action.pauseAsync(async()=>{let t=async()=>{let i=(await lh(e)).toLowerCase();return["n","no"].includes(i)?!1:["y","yes"].includes(i)?!0:t()};return t()},_i.default.cyan("?"))}ve.confirm=Hw;async function zw(e){let t=!!process.stdin.setRawMode;e||(e=t?`Press any key to continue or ${_i.default.yellow("q")} to exit`:`Press enter to continue or ${_i.default.yellow("q")} to exit`);let r=await hh(e,{required:!1,type:"single"});return t&&process.stderr.write(`
79
+ `),n.error)return r(n.error);t(n.stdout.trim())})};function nh(e,t={}){return t=Object.assign({method:"mask",required:t.default===void 0,default:""},t),Mt.setEncoding("utf8"),Jn[t.method](e,t).then(r=>r||(t.required?nh(e):""))}sh.exports=nh});var fh=E(ve=>{"use strict";y();var Bw=ve&&ve.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),Rw=ve&&ve.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),Lw=ve&&ve.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Bw(t,e,r);return Rw(t,e),t},$w=ve&&ve.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ve,"__esModule",{value:!0});ve.anykey=ve.confirm=ve.prompt=void 0;var _i=$w(Be()),ah=Lw($e()),ch=Un();function Zo(e,t=100){if(t<0)throw new Error("no input");return new Promise((r,i)=>{let n;e.timeout&&(n=setTimeout(()=>{process.stdin.pause(),i(new Error("Prompt timeout"))},e.timeout),n.unref()),process.stdin.setEncoding("utf8"),process.stderr.write(e.prompt),process.stdin.resume(),process.stdin.once("data",o=>{n&&clearTimeout(n),process.stdin.pause();let s=(typeof o=="string"?o:o.toString()).trim();!e.default&&e.required&&s===""?r(Zo(e,t-1)):r(s||e.default)})})}function uh(e,t,r){let i="> ";return r&&t==="hide"&&(r="*".repeat(r.length)),e&&r?i=e+" "+_i.default.yellow("["+r+"]")+": ":e&&(i=`${e}: `),i}async function qw(e){let t=process.stdin.isRaw;process.stdin.setRawMode&&process.stdin.setRawMode(!0),e.required=e.required??!1;let r=await Zo(e);return process.stdin.setRawMode&&process.stdin.setRawMode(!!t),r}function Uw(e){let t=ho();process.stderr.write(t.cursorHide+t.cursorUp(1)+t.cursorLeft+e+t.cursorDown(1)+t.cursorLeft+t.cursorShow)}async function lh(e,t={}){let r=uh(e,t.type,t.default),i={default:"",isTTY:!!(process.env.TERM!=="dumb"&&process.stdin.isTTY),name:e,prompt:r,required:!0,type:"normal",...t},n=oh();switch(i.type){case"normal":return Zo(i);case"single":return qw(i);case"mask":return n(i.prompt,{default:i.default,method:i.type,required:i.required}).then(o=>(Uw(uh(e,"hide",t.default)),o));case"hide":return n(i.prompt,{default:i.default,method:i.type,required:i.required});default:throw new Error(`unexpected type ${i.type}`)}}async function hh(e,t={}){return ch.config.action.pauseAsync(()=>lh(e,t),_i.default.cyan("?"))}ve.prompt=hh;function Hw(e){return ch.config.action.pauseAsync(async()=>{let t=async()=>{let i=(await lh(e)).toLowerCase();return["n","no"].includes(i)?!1:["y","yes"].includes(i)?!0:t()};return t()},_i.default.cyan("?"))}ve.confirm=Hw;async function zw(e){let t=!!process.stdin.setRawMode;e||(e=t?`Press any key to continue or ${_i.default.yellow("q")} to exit`:`Press enter to continue or ${_i.default.yellow("q")} to exit`);let r=await hh(e,{required:!1,type:"single"});return t&&process.stderr.write(`
80
80
  `),r==="q"&&ah.error("quit"),r===""&&ah.error("ctrl-c"),r}ve.anykey=zw});var ph=E(Fi=>{"use strict";y();var Jw=Fi&&Fi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Fi,"__esModule",{value:!0});var Ww=Jw(Be()),dh=F("node:util");function Gw(e,t){let r=[],i=Object.keys(e).map(c=>c.toString().length),n=Math.max(...i)+2;function o(c){return typeof c=="string"||typeof c=="number"?c:typeof c=="object"?Object.keys(c).map(h=>h+": "+(0,dh.inspect)(c[h])).join(", "):(0,dh.inspect)(c)}let s=(c,h)=>`${Ww.default.blue(c)}:`+" ".repeat(n-c.length-1)+o(h);for(let c of t||Object.keys(e).sort()){let h=e[c];if(Array.isArray(h)){if(h.length>0){r.push(s(c,h[0]));for(let m of h.slice(1))r.push(" ".repeat(n)+o(m))}}else h!=null&&r.push(s(c,h))}return r.join(`
81
81
  `)}Fi.default=Gw});var gh=E((LO,mh)=>{y();var ea=class{constructor(t,r,i){this.etaBufferLength=t||100,this.valueBuffer=[i],this.timeBuffer=[r],this.eta="0"}update(t,r,i){this.valueBuffer.push(r),this.timeBuffer.push(t),this.calculate(i-r)}getTime(){return this.eta}calculate(t){let r=this.valueBuffer.length,i=Math.min(this.etaBufferLength,r),n=this.valueBuffer[r-1]-this.valueBuffer[r-i],o=this.timeBuffer[r-1]-this.timeBuffer[r-i],s=n/o;this.valueBuffer=this.valueBuffer.slice(-this.etaBufferLength),this.timeBuffer=this.timeBuffer.slice(-this.etaBufferLength);let c=Math.ceil(t/s/1e3);isNaN(c)?this.eta="NULL":isFinite(c)?c>1e7?this.eta="INF":c<0?this.eta=0:this.eta=c:this.eta="INF"}};mh.exports=ea});var ra=E((qO,yh)=>{y();var rr=F("readline"),ta=class{constructor(t){this.stream=t,this.linewrap=!0,this.dy=0}cursorSave(){this.stream.isTTY&&this.stream.write("\x1B7")}cursorRestore(){this.stream.isTTY&&this.stream.write("\x1B8")}cursor(t){this.stream.isTTY&&(t?this.stream.write("\x1B[?25h"):this.stream.write("\x1B[?25l"))}cursorTo(t=null,r=null){this.stream.isTTY&&rr.cursorTo(this.stream,t,r)}cursorRelative(t=null,r=null){this.stream.isTTY&&(this.dy=this.dy+r,rr.moveCursor(this.stream,t,r))}cursorRelativeReset(){this.stream.isTTY&&(rr.moveCursor(this.stream,0,-this.dy),rr.cursorTo(this.stream,0,null),this.dy=0)}clearRight(){this.stream.isTTY&&rr.clearLine(this.stream,1)}clearLine(){this.stream.isTTY&&rr.clearLine(this.stream,0)}clearBottom(){this.stream.isTTY&&rr.clearScreenDown(this.stream)}newline(){this.stream.write(`
82
- `),this.dy++}write(t,r=!1){this.linewrap===!0&&r===!1?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};yh.exports=ta});var ia=E((HO,vh)=>{y();vh.exports=function(t,r,i){if(r.autopadding!==!0)return t;function n(o,s){return(r.autopaddingChar+o).slice(-s)}return i==="percentage"?n(t,3):t}});var na=E((JO,xh)=>{y();xh.exports=function(t,r){let i=Math.round(t*r.barsize),n=r.barsize-i;return r.barCompleteString.substr(0,i)+r.barGlue+r.barIncompleteString.substr(0,n)}});var sa=E((GO,wh)=>{y();wh.exports=function(t,r,i){function n(s){return i?i*Math.round(s/i):s}function o(s){return(r.autopaddingChar+s).slice(-2)}return t>3600?o(Math.floor(t/3600))+"h"+o(n(t%3600/60))+"m":t>60?o(Math.floor(t/60))+"m"+o(n(t%60))+"s":t>10?o(n(t))+"s":o(t)+"s"}});var oa=E((VO,Eh)=>{y();var Xw=lo(),Vw=ia(),Yw=na(),Kw=sa();Eh.exports=function(t,r,i){let n=t.format,o=t.formatTime||Kw,s=t.formatValue||Vw,c=t.formatBar||Yw,h=Math.floor(r.progress*100)+"",m=r.stopTime||Date.now(),d=Math.round((m-r.startTime)/1e3),f=Object.assign({},i,{bar:c(r.progress,t),percentage:s(h,t,"percentage"),total:s(r.total,t,"total"),value:s(r.value,t,"value"),eta:s(r.eta,t,"eta"),eta_formatted:o(r.eta,t,5),duration:s(d,t,"duration"),duration_formatted:o(d,t,1)});n=n.replace(/\{(\w+)\}/g,function(u,l){return typeof f[l]<"u"?f[l]:u});let p=Math.max(0,r.maxWidth-Xw(n)-2),a=Math.floor(p/2);switch(t.align){case"right":n=p>0?" ".repeat(p)+n:n;break;case"center":n=a>0?" ".repeat(a)+n:n;break;default:break}return n}});var Wn=E((KO,bh)=>{y();function H(e,t){return typeof e>"u"||e===null?t:e}bh.exports={parse:function(t,r){let i={},n=Object.assign({},r,t);return i.throttleTime=1e3/H(n.fps,10),i.stream=H(n.stream,process.stderr),i.terminal=H(n.terminal,null),i.clearOnComplete=H(n.clearOnComplete,!1),i.stopOnComplete=H(n.stopOnComplete,!1),i.barsize=H(n.barsize,40),i.align=H(n.align,"left"),i.hideCursor=H(n.hideCursor,!1),i.linewrap=H(n.linewrap,!1),i.barGlue=H(n.barGlue,""),i.barCompleteChar=H(n.barCompleteChar,"="),i.barIncompleteChar=H(n.barIncompleteChar,"-"),i.format=H(n.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),i.formatTime=H(n.formatTime,null),i.formatValue=H(n.formatValue,null),i.formatBar=H(n.formatBar,null),i.etaBufferLength=H(n.etaBuffer,10),i.etaAsynchronousUpdate=H(n.etaAsynchronousUpdate,!1),i.progressCalculationRelative=H(n.progressCalculationRelative,!1),i.synchronousUpdate=H(n.synchronousUpdate,!0),i.noTTYOutput=H(n.noTTYOutput,!1),i.notTTYSchedule=H(n.notTTYSchedule,2e3),i.emptyOnZero=H(n.emptyOnZero,!1),i.forceRedraw=H(n.forceRedraw,!1),i.autopadding=H(n.autopadding,!1),i.gracefulExit=H(n.gracefulExit,!1),i},assignDerivedOptions:function(t){return t.barCompleteString=t.barCompleteChar.repeat(t.barsize+1),t.barIncompleteString=t.barIncompleteChar.repeat(t.barsize+1),t.autopaddingChar=t.autopadding?H(t.autopaddingChar," "):"",t}}});var aa=E((eP,Ch)=>{y();var Dh=gh(),Qw=ra(),Zw=oa(),eE=Wn(),tE=F("events");Ch.exports=class extends tE{constructor(t){super(),this.options=eE.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new Qw(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new Dh(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:Zw}render(t=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let i=this.formatter(this.options,r,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=i)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(i),this.terminal.clearRight(),this.lastDrawnString=i,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,r,i){this.value=r||0,this.total=typeof t<"u"&&t>=0?t:100,this.startValue=r||0,this.payload=i||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new Dh(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,r={}){typeof t=="number"&&(this.value=t,this.eta.update(Date.now(),t,this.total));let i=(typeof t=="object"?t:r)||{};this.emit("update",this.total,this.value);for(let n in i)this.payload[n]=i[n];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,r={}){typeof t=="object"?this.update(this.value+1,t):this.update(this.value+t,r)}getTotal(){return this.total}setTotal(t){typeof t<"u"&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var Ah=E((iP,Sh)=>{y();var rE=aa(),iE=Wn();Sh.exports=class extends rE{constructor(t,r){super(iE.parse(t,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,r){this.timer&&(super.update(t,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(t,r,i){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(t,r,i),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var Fh=E((oP,_h)=>{y();var nE=ra(),sE=aa(),oE=Wn(),aE=F("events");_h.exports=class extends aE{constructor(t,r){super(),this.bars=[],this.options=oE.parse(t,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new nE(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,r,i,n={}){let o=new sE(Object.assign({},this.options,{terminal:this.terminal},n));return this.bars.push(o),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,o.start(t,r,i),this.emit("start")),o}remove(t){let r=this.bars.indexOf(t);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(t=>t.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}});var Th=E((uP,kh)=>{y();kh.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var Ph=E((lP,Oh)=>{y();Oh.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Nh=E((fP,Ih)=>{y();Ih.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var jh=E((pP,Mh)=>{y();Mh.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var Rh=E((gP,Bh)=>{y();var uE=Th(),cE=Ph(),lE=Nh(),hE=jh();Bh.exports={legacy:uE,shades_classic:cE,shades_grey:lE,rect:hE}});var qh=E((vP,$h)=>{y();var Lh=Ah(),fE=Fh(),dE=Rh(),pE=oa(),mE=ia(),gE=na(),yE=sa();$h.exports={Bar:Lh,SingleBar:Lh,MultiBar:fE,Presets:dE,Format:{Formatter:pE,BarFormat:gE,ValueFormat:mE,TimeFormat:yE}}});var Uh=E(ua=>{"use strict";y();Object.defineProperty(ua,"__esModule",{value:!0});var vE=qh();function xE(e={}){return new vE.SingleBar({noTTYOutput:process.env.TERM==="dumb"||!process.stdin.isTTY,...e})}ua.default=xE});var nr=E((bP,ir)=>{"use strict";y();function Hh(e){return typeof e>"u"||e===null}function wE(e){return typeof e=="object"&&e!==null}function EE(e){return Array.isArray(e)?e:Hh(e)?[]:[e]}function bE(e,t){var r,i,n,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)n=o[r],e[n]=t[n];return e}function DE(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}function CE(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}ir.exports.isNothing=Hh;ir.exports.isObject=wE;ir.exports.toArray=EE;ir.exports.repeat=DE;ir.exports.isNegativeZero=CE;ir.exports.extend=bE});var qr=E((CP,zh)=>{"use strict";y();function ki(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ki.prototype=Object.create(Error.prototype);ki.prototype.constructor=ki;ki.prototype.toString=function(t){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!t&&this.mark&&(r+=" "+this.mark.toString()),r};zh.exports=ki});var Gh=E((AP,Wh)=>{"use strict";y();var Jh=nr();function ca(e,t,r,i,n){this.name=e,this.buffer=t,this.position=r,this.line=i,this.column=n}ca.prototype.getSnippet=function(t,r){var i,n,o,s,c;if(!this.buffer)return null;for(t=t||4,r=r||75,i="",n=this.position;n>0&&`\0\r
82
+ `),this.dy++}write(t,r=!1){this.linewrap===!0&&r===!1?this.stream.write(t.substr(0,this.getWidth())):this.stream.write(t)}lineWrapping(t){this.stream.isTTY&&(this.linewrap=t,t?this.stream.write("\x1B[?7h"):this.stream.write("\x1B[?7l"))}isTTY(){return this.stream.isTTY===!0}getWidth(){return this.stream.columns||(this.stream.isTTY?80:200)}};yh.exports=ta});var ia=E((HO,vh)=>{y();vh.exports=function(t,r,i){if(r.autopadding!==!0)return t;function n(o,s){return(r.autopaddingChar+o).slice(-s)}return i==="percentage"?n(t,3):t}});var na=E((JO,xh)=>{y();xh.exports=function(t,r){let i=Math.round(t*r.barsize),n=r.barsize-i;return r.barCompleteString.substr(0,i)+r.barGlue+r.barIncompleteString.substr(0,n)}});var sa=E((GO,wh)=>{y();wh.exports=function(t,r,i){function n(s){return i?i*Math.round(s/i):s}function o(s){return(r.autopaddingChar+s).slice(-2)}return t>3600?o(Math.floor(t/3600))+"h"+o(n(t%3600/60))+"m":t>60?o(Math.floor(t/60))+"m"+o(n(t%60))+"s":t>10?o(n(t))+"s":o(t)+"s"}});var oa=E((VO,Eh)=>{y();var Xw=co(),Vw=ia(),Yw=na(),Kw=sa();Eh.exports=function(t,r,i){let n=t.format,o=t.formatTime||Kw,s=t.formatValue||Vw,c=t.formatBar||Yw,h=Math.floor(r.progress*100)+"",m=r.stopTime||Date.now(),d=Math.round((m-r.startTime)/1e3),f=Object.assign({},i,{bar:c(r.progress,t),percentage:s(h,t,"percentage"),total:s(r.total,t,"total"),value:s(r.value,t,"value"),eta:s(r.eta,t,"eta"),eta_formatted:o(r.eta,t,5),duration:s(d,t,"duration"),duration_formatted:o(d,t,1)});n=n.replace(/\{(\w+)\}/g,function(u,l){return typeof f[l]<"u"?f[l]:u});let p=Math.max(0,r.maxWidth-Xw(n)-2),a=Math.floor(p/2);switch(t.align){case"right":n=p>0?" ".repeat(p)+n:n;break;case"center":n=a>0?" ".repeat(a)+n:n;break;default:break}return n}});var Wn=E((KO,bh)=>{y();function H(e,t){return typeof e>"u"||e===null?t:e}bh.exports={parse:function(t,r){let i={},n=Object.assign({},r,t);return i.throttleTime=1e3/H(n.fps,10),i.stream=H(n.stream,process.stderr),i.terminal=H(n.terminal,null),i.clearOnComplete=H(n.clearOnComplete,!1),i.stopOnComplete=H(n.stopOnComplete,!1),i.barsize=H(n.barsize,40),i.align=H(n.align,"left"),i.hideCursor=H(n.hideCursor,!1),i.linewrap=H(n.linewrap,!1),i.barGlue=H(n.barGlue,""),i.barCompleteChar=H(n.barCompleteChar,"="),i.barIncompleteChar=H(n.barIncompleteChar,"-"),i.format=H(n.format,"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}"),i.formatTime=H(n.formatTime,null),i.formatValue=H(n.formatValue,null),i.formatBar=H(n.formatBar,null),i.etaBufferLength=H(n.etaBuffer,10),i.etaAsynchronousUpdate=H(n.etaAsynchronousUpdate,!1),i.progressCalculationRelative=H(n.progressCalculationRelative,!1),i.synchronousUpdate=H(n.synchronousUpdate,!0),i.noTTYOutput=H(n.noTTYOutput,!1),i.notTTYSchedule=H(n.notTTYSchedule,2e3),i.emptyOnZero=H(n.emptyOnZero,!1),i.forceRedraw=H(n.forceRedraw,!1),i.autopadding=H(n.autopadding,!1),i.gracefulExit=H(n.gracefulExit,!1),i},assignDerivedOptions:function(t){return t.barCompleteString=t.barCompleteChar.repeat(t.barsize+1),t.barIncompleteString=t.barIncompleteChar.repeat(t.barsize+1),t.autopaddingChar=t.autopadding?H(t.autopaddingChar," "):"",t}}});var aa=E((eP,Ch)=>{y();var Dh=gh(),Qw=ra(),Zw=oa(),eE=Wn(),tE=F("events");Ch.exports=class extends tE{constructor(t){super(),this.options=eE.assignDerivedOptions(t),this.terminal=this.options.terminal?this.options.terminal:new Qw(this.options.stream),this.value=0,this.startValue=0,this.total=100,this.lastDrawnString=null,this.startTime=null,this.stopTime=null,this.lastRedraw=Date.now(),this.eta=new Dh(this.options.etaBufferLength,0,0),this.payload={},this.isActive=!1,this.formatter=typeof this.options.format=="function"?this.options.format:Zw}render(t=!1){let r={progress:this.getProgress(),eta:this.eta.getTime(),startTime:this.startTime,stopTime:this.stopTime,total:this.total,value:this.value,maxWidth:this.terminal.getWidth()};this.options.etaAsynchronousUpdate&&this.updateETA();let i=this.formatter(this.options,r,this.payload);(t||this.options.forceRedraw||this.options.noTTYOutput&&!this.terminal.isTTY()||this.lastDrawnString!=i)&&(this.emit("redraw-pre"),this.terminal.cursorTo(0,null),this.terminal.write(i),this.terminal.clearRight(),this.lastDrawnString=i,this.lastRedraw=Date.now(),this.emit("redraw-post"))}start(t,r,i){this.value=r||0,this.total=typeof t<"u"&&t>=0?t:100,this.startValue=r||0,this.payload=i||{},this.startTime=Date.now(),this.stopTime=null,this.lastDrawnString="",this.eta=new Dh(this.options.etaBufferLength,this.startTime,this.value),this.isActive=!0,this.emit("start",t,r)}stop(){this.isActive=!1,this.stopTime=Date.now(),this.emit("stop",this.total,this.value)}update(t,r={}){typeof t=="number"&&(this.value=t,this.eta.update(Date.now(),t,this.total));let i=(typeof t=="object"?t:r)||{};this.emit("update",this.total,this.value);for(let n in i)this.payload[n]=i[n];this.value>=this.getTotal()&&this.options.stopOnComplete&&this.stop()}getProgress(){let t=this.value/this.total;return this.options.progressCalculationRelative&&(t=(this.value-this.startValue)/(this.total-this.startValue)),isNaN(t)&&(t=this.options&&this.options.emptyOnZero?0:1),t=Math.min(Math.max(t,0),1),t}increment(t=1,r={}){typeof t=="object"?this.update(this.value+1,t):this.update(this.value+t,r)}getTotal(){return this.total}setTotal(t){typeof t<"u"&&t>=0&&(this.total=t)}updateETA(){this.eta.update(Date.now(),this.value,this.total)}}});var Ah=E((iP,Sh)=>{y();var rE=aa(),iE=Wn();Sh.exports=class extends rE{constructor(t,r){super(iE.parse(t,r)),this.timer=null,this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.options.synchronousUpdate=!1),this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.sigintCallback=null}render(){this.timer&&(clearTimeout(this.timer),this.timer=null),super.render(),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&this.terminal.newline(),this.timer=setTimeout(this.render.bind(this),this.schedulingRate)}update(t,r){this.timer&&(super.update(t,r),this.options.synchronousUpdate&&this.lastRedraw+this.options.throttleTime*2<Date.now()&&this.render())}start(t,r,i){this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.terminal.cursorSave(),this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),super.start(t,r,i),this.render())}stop(){this.timer&&(this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.render(),super.stop(),clearTimeout(this.timer),this.timer=null,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRestore(),this.options.clearOnComplete?(this.terminal.cursorTo(0,null),this.terminal.clearLine()):this.terminal.newline())}}});var Fh=E((oP,_h)=>{y();var nE=ra(),sE=aa(),oE=Wn(),aE=F("events");_h.exports=class extends aE{constructor(t,r){super(),this.bars=[],this.options=oE.parse(t,r),this.options.synchronousUpdate=!1,this.terminal=this.options.terminal?this.options.terminal:new nE(this.options.stream),this.timer=null,this.isActive=!1,this.schedulingRate=this.terminal.isTTY()?this.options.throttleTime:this.options.notTTYSchedule,this.loggingBuffer=[],this.sigintCallback=null}create(t,r,i,n={}){let o=new sE(Object.assign({},this.options,{terminal:this.terminal},n));return this.bars.push(o),this.options.noTTYOutput===!1&&this.terminal.isTTY()===!1||(this.sigintCallback===null&&this.options.gracefulExit&&(this.sigintCallback=this.stop.bind(this),process.once("SIGINT",this.sigintCallback),process.once("SIGTERM",this.sigintCallback)),this.isActive||(this.options.hideCursor===!0&&this.terminal.cursor(!1),this.options.linewrap===!1&&this.terminal.lineWrapping(!1),this.timer=setTimeout(this.update.bind(this),this.schedulingRate)),this.isActive=!0,o.start(t,r,i),this.emit("start")),o}remove(t){let r=this.bars.indexOf(t);return r<0?!1:(this.bars.splice(r,1),this.update(),this.terminal.newline(),this.terminal.clearBottom(),!0)}update(){if(this.timer&&(clearTimeout(this.timer),this.timer=null),this.emit("update-pre"),this.terminal.cursorRelativeReset(),this.emit("redraw-pre"),this.loggingBuffer.length>0)for(this.terminal.clearLine();this.loggingBuffer.length>0;)this.terminal.write(this.loggingBuffer.shift(),!0);for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render();this.emit("redraw-post"),this.options.noTTYOutput&&this.terminal.isTTY()===!1&&(this.terminal.newline(),this.terminal.newline()),this.timer=setTimeout(this.update.bind(this),this.schedulingRate),this.emit("update-post"),this.options.stopOnComplete&&!this.bars.find(t=>t.isActive)&&this.stop()}stop(){if(clearTimeout(this.timer),this.timer=null,this.sigintCallback&&(process.removeListener("SIGINT",this.sigintCallback),process.removeListener("SIGTERM",this.sigintCallback),this.sigintCallback=null),this.isActive=!1,this.options.hideCursor===!0&&this.terminal.cursor(!0),this.options.linewrap===!1&&this.terminal.lineWrapping(!0),this.terminal.cursorRelativeReset(),this.emit("stop-pre-clear"),this.options.clearOnComplete)this.terminal.clearBottom();else{for(let t=0;t<this.bars.length;t++)t>0&&this.terminal.newline(),this.bars[t].render(),this.bars[t].stop();this.terminal.newline()}this.emit("stop")}log(t){this.loggingBuffer.push(t)}}});var Th=E((uP,kh)=>{y();kh.exports={format:"progress [{bar}] {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"=",barIncompleteChar:"-"}});var Ph=E((lP,Oh)=>{y();Oh.exports={format:" {bar} {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var Nh=E((fP,Ih)=>{y();Ih.exports={format:" \x1B[90m{bar}\x1B[0m {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u2588",barIncompleteChar:"\u2591"}});var jh=E((pP,Mh)=>{y();Mh.exports={format:" {bar}\u25A0 {percentage}% | ETA: {eta}s | {value}/{total}",barCompleteChar:"\u25A0",barIncompleteChar:" "}});var Rh=E((gP,Bh)=>{y();var uE=Th(),cE=Ph(),lE=Nh(),hE=jh();Bh.exports={legacy:uE,shades_classic:cE,shades_grey:lE,rect:hE}});var qh=E((vP,$h)=>{y();var Lh=Ah(),fE=Fh(),dE=Rh(),pE=oa(),mE=ia(),gE=na(),yE=sa();$h.exports={Bar:Lh,SingleBar:Lh,MultiBar:fE,Presets:dE,Format:{Formatter:pE,BarFormat:gE,ValueFormat:mE,TimeFormat:yE}}});var Uh=E(ua=>{"use strict";y();Object.defineProperty(ua,"__esModule",{value:!0});var vE=qh();function xE(e={}){return new vE.SingleBar({noTTYOutput:process.env.TERM==="dumb"||!process.stdin.isTTY,...e})}ua.default=xE});var nr=E((bP,ir)=>{"use strict";y();function Hh(e){return typeof e>"u"||e===null}function wE(e){return typeof e=="object"&&e!==null}function EE(e){return Array.isArray(e)?e:Hh(e)?[]:[e]}function bE(e,t){var r,i,n,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)n=o[r],e[n]=t[n];return e}function DE(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}function CE(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}ir.exports.isNothing=Hh;ir.exports.isObject=wE;ir.exports.toArray=EE;ir.exports.repeat=DE;ir.exports.isNegativeZero=CE;ir.exports.extend=bE});var qr=E((CP,zh)=>{"use strict";y();function ki(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ki.prototype=Object.create(Error.prototype);ki.prototype.constructor=ki;ki.prototype.toString=function(t){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!t&&this.mark&&(r+=" "+this.mark.toString()),r};zh.exports=ki});var Gh=E((AP,Wh)=>{"use strict";y();var Jh=nr();function ca(e,t,r,i,n){this.name=e,this.buffer=t,this.position=r,this.line=i,this.column=n}ca.prototype.getSnippet=function(t,r){var i,n,o,s,c;if(!this.buffer)return null;for(t=t||4,r=r||75,i="",n=this.position;n>0&&`\0\r
83
83
  \x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>r/2-1){i=" ... ",n+=5;break}for(o="",s=this.position;s<this.buffer.length&&`\0\r
84
84
  \x85\u2028\u2029`.indexOf(this.buffer.charAt(s))===-1;)if(s+=1,s-this.position>r/2-1){o=" ... ",s-=5;break}return c=this.buffer.slice(n,s),Jh.repeat(" ",t)+i+c+o+`
85
85
  `+Jh.repeat(" ",t+this.position-n+i.length)+"^"};ca.prototype.toString=function(t){var r,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),t||(r=this.getSnippet(),r&&(i+=`:
@@ -108,7 +108,7 @@ ${i.message}`)}return jn}fe.loadHelpClass=Zx});var Bn=E(Le=>{"use strict";y();va
108
108
  `+e.slice(n,o),n=o+1),s=c;return h+=`
109
109
  `,e.length-n>t&&s>n?h+=e.slice(n,s)+`
110
110
  `+e.slice(s+1):h+=e.slice(n),h.slice(1)}function UD(e){for(var t="",r,i,n,o=0;o<e.length;o++){if(r=e.charCodeAt(o),r>=55296&&r<=56319&&(i=e.charCodeAt(o+1),i>=56320&&i<=57343)){t+=ud((r-55296)*1024+i-56320+65536),o++;continue}n=xe[r],t+=!n&&Gr(r)?e[o]:n||ud(r)}return t}function HD(e,t,r){var i="",n=e.tag,o,s;for(o=0,s=r.length;o<s;o+=1)cr(e,t,r[o],!1,!1)&&(o!==0&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}function zD(e,t,r,i){var n="",o=e.tag,s,c;for(s=0,c=r.length;s<c;s+=1)cr(e,t+1,r[s],!0,!0)&&((!i||s!==0)&&(n+=ya(e,t)),e.dump&&Pi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=o,e.dump=n||"[]"}function JD(e,t,r){var i="",n=e.tag,o=Object.keys(r),s,c,h,m,d;for(s=0,c=o.length;s<c;s+=1)d="",s!==0&&(d+=", "),e.condenseFlow&&(d+='"'),h=o[s],m=r[h],cr(e,t,h,!1,!1)&&(e.dump.length>1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),cr(e,t,m,!1,!1)&&(d+=e.dump,i+=d));e.tag=n,e.dump="{"+i+"}"}function WD(e,t,r,i){var n="",o=e.tag,s=Object.keys(r),c,h,m,d,f,p;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Ni("sortKeys must be a boolean or a function");for(c=0,h=s.length;c<h;c+=1)p="",(!i||c!==0)&&(p+=ya(e,t)),m=s[c],d=r[m],cr(e,t+1,m,!0,!0,!0)&&(f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,f&&(e.dump&&Pi===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,f&&(p+=ya(e,t)),cr(e,t+1,d,!0,f)&&(e.dump&&Pi===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,n+=p));e.tag=o,e.dump=n||"{}"}function pd(e,t,r){var i,n,o,s,c,h;for(n=r?e.explicitTypes:e.implicitTypes,o=0,s=n.length;o<s;o+=1)if(c=n[o],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof t=="object"&&t instanceof c.instanceOf)&&(!c.predicate||c.predicate(t))){if(e.tag=r?c.tag:"?",c.represent){if(h=e.styleMap[c.tag]||c.defaultStyle,md.call(c.represent)==="[object Function]")i=c.represent(t,h);else if(gd.call(c.represent,h))i=c.represent[h](t,h);else throw new Ni("!<"+c.tag+'> tag resolver accepts not "'+h+'" style');e.dump=i}return!0}return!1}function cr(e,t,r,i,n,o){e.tag=null,e.dump=r,pd(e,r,!1)||pd(e,r,!0);var s=md.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var c=s==="[object Object]"||s==="[object Array]",h,m;if(c&&(h=e.duplicates.indexOf(r),m=h!==-1),(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0)&&(n=!1),m&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(c&&m&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),s==="[object Object]")i&&Object.keys(e.dump).length!==0?(WD(e,t,e.dump,n),m&&(e.dump="&ref_"+h+e.dump)):(JD(e,t,e.dump),m&&(e.dump="&ref_"+h+" "+e.dump));else if(s==="[object Array]"){var d=e.noArrayIndent&&t>0?t-1:t;i&&e.dump.length!==0?(zD(e,d,e.dump,n),m&&(e.dump="&ref_"+h+e.dump)):(HD(e,d,e.dump),m&&(e.dump="&ref_"+h+" "+e.dump))}else if(s==="[object String]")e.tag!=="?"&&$D(e,e.dump,t,o);else{if(e.skipInvalid)return!1;throw new Ni("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function GD(e,t){var r=[],i=[],n,o;for(va(e,r,i),n=0,o=i.length;n<o;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(o)}function va(e,t,r){var i,n,o;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,o=e.length;n<o;n+=1)va(e[n],t,r);else for(i=Object.keys(e),n=0,o=i.length;n<o;n+=1)va(e[i[n]],t,r)}function kd(e,t){t=t||{};var r=new MD(t);return r.noRefs||GD(e,r),cr(r,0,e,!0,!0)?r.dump+`
111
- `:""}function XD(e,t){return kd(e,Ii.extend({schema:gD},t))}wa.exports.dump=kd;wa.exports.safeDump=XD});var Pd=E((A2,K)=>{"use strict";y();var ts=ad(),Od=Td();function rs(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}K.exports.Type=ce();K.exports.Schema=sr();K.exports.FAILSAFE_SCHEMA=Xn();K.exports.JSON_SCHEMA=ha();K.exports.CORE_SCHEMA=fa();K.exports.DEFAULT_SAFE_SCHEMA=Hr();K.exports.DEFAULT_FULL_SCHEMA=Ti();K.exports.load=ts.load;K.exports.loadAll=ts.loadAll;K.exports.safeLoad=ts.safeLoad;K.exports.safeLoadAll=ts.safeLoadAll;K.exports.dump=Od.dump;K.exports.safeDump=Od.safeDump;K.exports.YAMLException=qr();K.exports.MINIMAL_SCHEMA=Xn();K.exports.SAFE_SCHEMA=Hr();K.exports.DEFAULT_SCHEMA=Ti();K.exports.scan=rs("scan");K.exports.parse=rs("parse");K.exports.compose=rs("compose");K.exports.addConstructor=rs("addConstructor")});var Nd=E((F2,Id)=>{"use strict";y();var VD=Pd();Id.exports=VD});var Ud=E(is=>{"use strict";y();Object.defineProperty(is,"__esModule",{value:!0});var Rd=function(t,r){return t<r?-1:t>r?1:0},YD=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,Ld=/^\s+|\s+$/g,KD=/\s+/g,QD=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,ZD=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,eC=/^0+[1-9]{1}[0-9]*$/,tC=/[^\x00-\x80]/,rC=function(t,r){var i=t.localeCompare(r);return i?i/Math.abs(i):0},Md=function(t,r){return t<r?-1:t>r?1:0},iC=function(t,r){for(var i=t.length,n=r.length,o=Math.min(i,n),s=0;s<o;s++){var c=t[s],h=r[s];if(c.normalizedString!==h.normalizedString){if(c.normalizedString===""!=(h.normalizedString===""))return c.normalizedString===""?-1:1;if(c.parsedNumber!==void 0&&h.parsedNumber!==void 0){var m=Rd(c.parsedNumber,h.parsedNumber);return m===0?Md(c.normalizedString,h.normalizedString):m}else return c.parsedNumber!==void 0||h.parsedNumber!==void 0?c.parsedNumber!==void 0?-1:1:tC.test(c.normalizedString+h.normalizedString)&&c.normalizedString.localeCompare?rC(c.normalizedString,h.normalizedString):Md(c.normalizedString,h.normalizedString)}}return i>o||n>o?i<=o?-1:1:0},nC=function(t,r){return(t.chunks?!r.chunks:r.chunks)?t.chunks?-1:1:(t.isNaN?!r.isNaN:r.isNaN)?t.isNaN?-1:1:(t.isSymbol?!r.isSymbol:r.isSymbol)?t.isSymbol?-1:1:(t.isObject?!r.isObject:r.isObject)?t.isObject?-1:1:(t.isArray?!r.isArray:r.isArray)?t.isArray?-1:1:(t.isFunction?!r.isFunction:r.isFunction)?t.isFunction?-1:1:(t.isNull?!r.isNull:r.isNull)?t.isNull?-1:1:0},$d=function(t,r){return t.value===r.value?0:t.parsedNumber!==void 0&&r.parsedNumber!==void 0?Rd(t.parsedNumber,r.parsedNumber):t.chunks&&r.chunks?iC(t.chunks,r.chunks):nC(t,r)},sC=function(t,r,i){for(var n=t.index,o=t.values,s=r.index,c=r.values,h=o.length,m=i.length,d=0;d<h;d++){var f=d<m?i[d]:null;if(f&&typeof f=="function"){var p=f(o[d].value,c[d].value);if(p)return p}else{var a=$d(o[d],c[d]);if(a)return a*(f==="desc"?-1:1)}}return n-s},oC=function(t){return typeof t=="function"?t:function(r){if(Array.isArray(r)){var i=Number(t);if(Number.isInteger(i))return r[i]}else if(r&&typeof r=="object"&&typeof t!="function")return r[t];return r}},aC=function(t){return typeof t=="boolean"||t instanceof Boolean?Number(t).toString():typeof t=="number"||t instanceof Number?t.toString():t instanceof Date?t.getTime().toString():typeof t=="string"||t instanceof String?t.toLowerCase().replace(Ld,""):""},qd=function(t){if(t.length!==0){var r=Number(t);if(!Number.isNaN(r))return r}},uC=function(t){if(ZD.test(t)){var r=Date.parse(t);if(!Number.isNaN(r))return r}},cC=function(t){var r=qd(t);return r!==void 0?r:uC(t)},lC=function(t){return t.replace(YD,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")},hC=function(t){return t.replace(KD," ").replace(Ld,"")},fC=function(t,r,i){if(QD.test(t)&&(!eC.test(t)||r===0||i[r-1]!=="."))return qd(t)||0},dC=function(t,r,i){return{parsedNumber:fC(t,r,i),normalizedString:hC(t)}},pC=function(t){var r=lC(t).map(dC);return r},mC=function(t){return typeof t=="function"},jd=function(t){return Number.isNaN(t)||t instanceof Number&&Number.isNaN(t.valueOf())},gC=function(t){return t===null},yC=function(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Number)&&!(t instanceof String)&&!(t instanceof Boolean)&&!(t instanceof Date)},vC=function(t){return typeof t=="symbol"},xC=function(t){return t===void 0},Ea=function(t){if(typeof t=="string"||t instanceof String||(typeof t=="number"||t instanceof Number)&&!jd(t)||typeof t=="boolean"||t instanceof Boolean||t instanceof Date){var r=aC(t),i=cC(r),n=pC(i?""+i:r);return{parsedNumber:i,chunks:n,value:t}}return{isArray:Array.isArray(t),isFunction:mC(t),isNaN:jd(t),isNull:gC(t),isObject:yC(t),isSymbol:vC(t),isUndefined:xC(t),value:t}},wC=function(t,r){return r(t)},EC=function(t,r){return t[r]},bC=function(t,r,i){var n=r.length?r.map(oC):[function(s){return s}],o=t.map(function(s,c){var h=n.map(function(m){return wC(s,m)}).map(Ea);return{index:c,values:h}});return o.sort(function(s,c){return sC(s,c,i)}),o.map(function(s){return EC(t,s.index)})},DC=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return typeof i!="string"&&typeof i!="number"&&typeof i!="function"})?[]:r},CC=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return i!=="asc"&&i!=="desc"&&typeof i!="function"})?[]:r};function SC(e,t,r){if(!e||!Array.isArray(e))return[];var i=DC(t),n=CC(r);return bC(e,i,n)}var AC=function(t){return function(r,i){var n=Ea(r),o=Ea(i),s=$d(n,o);return s*(t.order==="desc"?-1:1)}},Bd=function(t){return typeof t=="string"&&(t==="asc"||t==="desc")},_C=function(t){var r="asc";return typeof t=="string"&&Bd(t)?r=t:t&&typeof t=="object"&&t.order&&Bd(t.order)&&(r=t.order),{order:r}};function FC(e){var t=_C(e);return AC(t)}is.orderBy=SC;is.compare=FC});var Jd=E((P2,zd)=>{"use strict";y();var Hd="[\uD800-\uDBFF][\uDC00-\uDFFF]",kC=e=>e&&e.exact?new RegExp(`^${Hd}$`):new RegExp(Hd,"g");zd.exports=kC});var Yd=E((N2,Vd)=>{"use strict";y();var TC=ry(),OC=Jd(),Wd=vc(),Xd=["\x1B","\x9B"],ns=e=>`${Xd[0]}[${e}m`,Gd=(e,t,r)=>{let i=[];e=[...e];for(let n of e){let o=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let s=Wd.codes.get(Number.parseInt(n,10));if(s){let c=e.indexOf(s.toString());c===-1?i.push(ns(t?s:o)):e.splice(c,1)}else if(t){i.push(ns(0));break}else i.push(ns(o))}if(t&&(i=i.filter((n,o)=>i.indexOf(n)===o),r!==void 0)){let n=ns(Wd.codes.get(Number.parseInt(r,10)));i=i.reduce((o,s)=>s===n?[s,...o]:[...o,s],[])}return i.join("")};Vd.exports=(e,t,r)=>{let i=[...e],n=[],o=typeof r=="number"?r:i.length,s=!1,c,h=0,m="";for(let[d,f]of i.entries()){let p=!1;if(Xd.includes(f)){let a=/\d[^m]*/.exec(e.slice(d,d+18));c=a&&a.length>0?a[0]:void 0,h<o&&(s=!0,c!==void 0&&n.push(c))}else s&&f==="m"&&(s=!1,p=!0);if(!s&&!p&&h++,!OC({exact:!0}).test(f)&&TC(f.codePointAt())&&(h++,typeof r!="number"&&o++),h>t&&h<=o)m+=f;else if(h===t&&!s&&c!==void 0)m=Gd(n);else if(h>=o){m+=Gd(n,!0,c);break}}return m}});var os=E(Q=>{"use strict";y();Object.defineProperty(Q,"__esModule",{value:!0});Q.option=Q.help=Q.version=Q.string=Q.url=Q.file=Q.directory=Q.integer=Q.boolean=Q.custom=void 0;var PC=F("node:url"),ss=$e(),IC=Ai(),Kd=yt();function Xr(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e?.multiple??!1:t.multiple),type:"option"})}Q.custom=Xr;function ba(e={}){return{parse:async(t,r)=>t,...e,allowNo:!!e.allowNo,type:"boolean"}}Q.boolean=ba;Q.integer=Xr({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new ss.CLIError(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new ss.CLIError(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new ss.CLIError(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});Q.directory=Xr({async parse(e,t,r){return r.exists?(0,Kd.dirExists)(e):e}});Q.file=Xr({async parse(e,t,r){return r.exists?(0,Kd.fileExists)(e):e}});Q.url=Xr({async parse(e){try{return new PC.URL(e)}catch{throw new ss.CLIError(`Expected a valid url but received: ${e}`)}}});Q.string=Xr();var NC=(e={})=>ba({description:"Show CLI version.",...e,async parse(t,r){r.log(r.config.userAgent),r.exit(0)}});Q.version=NC;var MC=(e={})=>ba({description:"Show CLI help.",...e,async parse(t,r){let i=await(0,IC.loadHelpClass)(r.config);await new i(r.config,r.config.pjson.oclif.helpOptions??r.config.pjson.helpOptions).showHelp(r.id?[r.id,...r.argv]:r.argv),r.exit(0)}});Q.help=MC;function jC(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e.multiple:t.multiple),type:"option"})}Q.option=jC});var Zd=E(Ne=>{"use strict";y();var BC=Ne&&Ne.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),RC=Ne&&Ne.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),LC=Ne&&Ne.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&BC(t,e,r);return RC(t,e),t},as=Ne&&Ne.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.table=void 0;var Qd=as(Be()),$C=Nd(),qC=Ud(),UC=F("node:util"),HC=as(Yd()),lr=as(lo()),Rt=LC(os()),zC=Yt(),Da=oe(),JC=as(Ot()),Ca=class{data;columns;options;constructor(t,r,i={}){this.data=t,this.columns=Object.keys(r).map(p=>{let a=r[p],u=a.extended??!1,l=a.get??(x=>x[p]??""),g=typeof a.header=="string"?a.header:(0,Da.capitalize)(p.replaceAll("_"," ")),v=Math.max(a.minWidth??0,(0,lr.default)(g)+1);return{extended:u,get:l,header:g,key:p,minWidth:v}});let{columns:n,csv:o,extended:s,filter:c,output:h,printLine:m,sort:d,title:f}=i;this.options={columns:n,extended:s,filter:c,"no-header":i["no-header"]??!1,"no-truncate":i["no-truncate"]??!1,output:o?"csv":h,printLine:m??(p=>JC.default.stdout(p+`
111
+ `:""}function XD(e,t){return kd(e,Ii.extend({schema:gD},t))}wa.exports.dump=kd;wa.exports.safeDump=XD});var Pd=E((A2,K)=>{"use strict";y();var ts=ad(),Od=Td();function rs(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}K.exports.Type=ce();K.exports.Schema=sr();K.exports.FAILSAFE_SCHEMA=Xn();K.exports.JSON_SCHEMA=ha();K.exports.CORE_SCHEMA=fa();K.exports.DEFAULT_SAFE_SCHEMA=Hr();K.exports.DEFAULT_FULL_SCHEMA=Ti();K.exports.load=ts.load;K.exports.loadAll=ts.loadAll;K.exports.safeLoad=ts.safeLoad;K.exports.safeLoadAll=ts.safeLoadAll;K.exports.dump=Od.dump;K.exports.safeDump=Od.safeDump;K.exports.YAMLException=qr();K.exports.MINIMAL_SCHEMA=Xn();K.exports.SAFE_SCHEMA=Hr();K.exports.DEFAULT_SCHEMA=Ti();K.exports.scan=rs("scan");K.exports.parse=rs("parse");K.exports.compose=rs("compose");K.exports.addConstructor=rs("addConstructor")});var Nd=E((F2,Id)=>{"use strict";y();var VD=Pd();Id.exports=VD});var Ud=E(is=>{"use strict";y();Object.defineProperty(is,"__esModule",{value:!0});var Rd=function(t,r){return t<r?-1:t>r?1:0},YD=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,Ld=/^\s+|\s+$/g,KD=/\s+/g,QD=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,ZD=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,eC=/^0+[1-9]{1}[0-9]*$/,tC=/[^\x00-\x80]/,rC=function(t,r){var i=t.localeCompare(r);return i?i/Math.abs(i):0},Md=function(t,r){return t<r?-1:t>r?1:0},iC=function(t,r){for(var i=t.length,n=r.length,o=Math.min(i,n),s=0;s<o;s++){var c=t[s],h=r[s];if(c.normalizedString!==h.normalizedString){if(c.normalizedString===""!=(h.normalizedString===""))return c.normalizedString===""?-1:1;if(c.parsedNumber!==void 0&&h.parsedNumber!==void 0){var m=Rd(c.parsedNumber,h.parsedNumber);return m===0?Md(c.normalizedString,h.normalizedString):m}else return c.parsedNumber!==void 0||h.parsedNumber!==void 0?c.parsedNumber!==void 0?-1:1:tC.test(c.normalizedString+h.normalizedString)&&c.normalizedString.localeCompare?rC(c.normalizedString,h.normalizedString):Md(c.normalizedString,h.normalizedString)}}return i>o||n>o?i<=o?-1:1:0},nC=function(t,r){return(t.chunks?!r.chunks:r.chunks)?t.chunks?-1:1:(t.isNaN?!r.isNaN:r.isNaN)?t.isNaN?-1:1:(t.isSymbol?!r.isSymbol:r.isSymbol)?t.isSymbol?-1:1:(t.isObject?!r.isObject:r.isObject)?t.isObject?-1:1:(t.isArray?!r.isArray:r.isArray)?t.isArray?-1:1:(t.isFunction?!r.isFunction:r.isFunction)?t.isFunction?-1:1:(t.isNull?!r.isNull:r.isNull)?t.isNull?-1:1:0},$d=function(t,r){return t.value===r.value?0:t.parsedNumber!==void 0&&r.parsedNumber!==void 0?Rd(t.parsedNumber,r.parsedNumber):t.chunks&&r.chunks?iC(t.chunks,r.chunks):nC(t,r)},sC=function(t,r,i){for(var n=t.index,o=t.values,s=r.index,c=r.values,h=o.length,m=i.length,d=0;d<h;d++){var f=d<m?i[d]:null;if(f&&typeof f=="function"){var p=f(o[d].value,c[d].value);if(p)return p}else{var a=$d(o[d],c[d]);if(a)return a*(f==="desc"?-1:1)}}return n-s},oC=function(t){return typeof t=="function"?t:function(r){if(Array.isArray(r)){var i=Number(t);if(Number.isInteger(i))return r[i]}else if(r&&typeof r=="object"&&typeof t!="function")return r[t];return r}},aC=function(t){return typeof t=="boolean"||t instanceof Boolean?Number(t).toString():typeof t=="number"||t instanceof Number?t.toString():t instanceof Date?t.getTime().toString():typeof t=="string"||t instanceof String?t.toLowerCase().replace(Ld,""):""},qd=function(t){if(t.length!==0){var r=Number(t);if(!Number.isNaN(r))return r}},uC=function(t){if(ZD.test(t)){var r=Date.parse(t);if(!Number.isNaN(r))return r}},cC=function(t){var r=qd(t);return r!==void 0?r:uC(t)},lC=function(t){return t.replace(YD,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")},hC=function(t){return t.replace(KD," ").replace(Ld,"")},fC=function(t,r,i){if(QD.test(t)&&(!eC.test(t)||r===0||i[r-1]!=="."))return qd(t)||0},dC=function(t,r,i){return{parsedNumber:fC(t,r,i),normalizedString:hC(t)}},pC=function(t){var r=lC(t).map(dC);return r},mC=function(t){return typeof t=="function"},jd=function(t){return Number.isNaN(t)||t instanceof Number&&Number.isNaN(t.valueOf())},gC=function(t){return t===null},yC=function(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Number)&&!(t instanceof String)&&!(t instanceof Boolean)&&!(t instanceof Date)},vC=function(t){return typeof t=="symbol"},xC=function(t){return t===void 0},Ea=function(t){if(typeof t=="string"||t instanceof String||(typeof t=="number"||t instanceof Number)&&!jd(t)||typeof t=="boolean"||t instanceof Boolean||t instanceof Date){var r=aC(t),i=cC(r),n=pC(i?""+i:r);return{parsedNumber:i,chunks:n,value:t}}return{isArray:Array.isArray(t),isFunction:mC(t),isNaN:jd(t),isNull:gC(t),isObject:yC(t),isSymbol:vC(t),isUndefined:xC(t),value:t}},wC=function(t,r){return r(t)},EC=function(t,r){return t[r]},bC=function(t,r,i){var n=r.length?r.map(oC):[function(s){return s}],o=t.map(function(s,c){var h=n.map(function(m){return wC(s,m)}).map(Ea);return{index:c,values:h}});return o.sort(function(s,c){return sC(s,c,i)}),o.map(function(s){return EC(t,s.index)})},DC=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return typeof i!="string"&&typeof i!="number"&&typeof i!="function"})?[]:r},CC=function(t){if(!t)return[];var r=Array.isArray(t)?[].concat(t):[t];return r.some(function(i){return i!=="asc"&&i!=="desc"&&typeof i!="function"})?[]:r};function SC(e,t,r){if(!e||!Array.isArray(e))return[];var i=DC(t),n=CC(r);return bC(e,i,n)}var AC=function(t){return function(r,i){var n=Ea(r),o=Ea(i),s=$d(n,o);return s*(t.order==="desc"?-1:1)}},Bd=function(t){return typeof t=="string"&&(t==="asc"||t==="desc")},_C=function(t){var r="asc";return typeof t=="string"&&Bd(t)?r=t:t&&typeof t=="object"&&t.order&&Bd(t.order)&&(r=t.order),{order:r}};function FC(e){var t=_C(e);return AC(t)}is.orderBy=SC;is.compare=FC});var Jd=E((P2,zd)=>{"use strict";y();var Hd="[\uD800-\uDBFF][\uDC00-\uDFFF]",kC=e=>e&&e.exact?new RegExp(`^${Hd}$`):new RegExp(Hd,"g");zd.exports=kC});var Yd=E((N2,Vd)=>{"use strict";y();var TC=ey(),OC=Jd(),Wd=lc(),Xd=["\x1B","\x9B"],ns=e=>`${Xd[0]}[${e}m`,Gd=(e,t,r)=>{let i=[];e=[...e];for(let n of e){let o=n;n.includes(";")&&(n=n.split(";")[0][0]+"0");let s=Wd.codes.get(Number.parseInt(n,10));if(s){let c=e.indexOf(s.toString());c===-1?i.push(ns(t?s:o)):e.splice(c,1)}else if(t){i.push(ns(0));break}else i.push(ns(o))}if(t&&(i=i.filter((n,o)=>i.indexOf(n)===o),r!==void 0)){let n=ns(Wd.codes.get(Number.parseInt(r,10)));i=i.reduce((o,s)=>s===n?[s,...o]:[...o,s],[])}return i.join("")};Vd.exports=(e,t,r)=>{let i=[...e],n=[],o=typeof r=="number"?r:i.length,s=!1,c,h=0,m="";for(let[d,f]of i.entries()){let p=!1;if(Xd.includes(f)){let a=/\d[^m]*/.exec(e.slice(d,d+18));c=a&&a.length>0?a[0]:void 0,h<o&&(s=!0,c!==void 0&&n.push(c))}else s&&f==="m"&&(s=!1,p=!0);if(!s&&!p&&h++,!OC({exact:!0}).test(f)&&TC(f.codePointAt())&&(h++,typeof r!="number"&&o++),h>t&&h<=o)m+=f;else if(h===t&&!s&&c!==void 0)m=Gd(n);else if(h>=o){m+=Gd(n,!0,c);break}}return m}});var os=E(Q=>{"use strict";y();Object.defineProperty(Q,"__esModule",{value:!0});Q.option=Q.help=Q.version=Q.string=Q.url=Q.file=Q.directory=Q.integer=Q.boolean=Q.custom=void 0;var PC=F("node:url"),ss=$e(),IC=Ai(),Kd=yt();function Xr(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e?.multiple??!1:t.multiple),type:"option"})}Q.custom=Xr;function ba(e={}){return{parse:async(t,r)=>t,...e,allowNo:!!e.allowNo,type:"boolean"}}Q.boolean=ba;Q.integer=Xr({async parse(e,t,r){if(!/^-?\d+$/.test(e))throw new ss.CLIError(`Expected an integer but received: ${e}`);let i=Number.parseInt(e,10);if(r.min!==void 0&&i<r.min)throw new ss.CLIError(`Expected an integer greater than or equal to ${r.min} but received: ${e}`);if(r.max!==void 0&&i>r.max)throw new ss.CLIError(`Expected an integer less than or equal to ${r.max} but received: ${e}`);return i}});Q.directory=Xr({async parse(e,t,r){return r.exists?(0,Kd.dirExists)(e):e}});Q.file=Xr({async parse(e,t,r){return r.exists?(0,Kd.fileExists)(e):e}});Q.url=Xr({async parse(e){try{return new PC.URL(e)}catch{throw new ss.CLIError(`Expected a valid url but received: ${e}`)}}});Q.string=Xr();var NC=(e={})=>ba({description:"Show CLI version.",...e,async parse(t,r){r.log(r.config.userAgent),r.exit(0)}});Q.version=NC;var MC=(e={})=>ba({description:"Show CLI help.",...e,async parse(t,r){let i=await(0,IC.loadHelpClass)(r.config);await new i(r.config,r.config.pjson.oclif.helpOptions??r.config.pjson.helpOptions).showHelp(r.id?[r.id,...r.argv]:r.argv),r.exit(0)}});Q.help=MC;function jC(e){return(t={})=>({parse:async(r,i,n)=>r,...e,...t,input:[],multiple:!!(t.multiple===void 0?e.multiple:t.multiple),type:"option"})}Q.option=jC});var Zd=E(Ne=>{"use strict";y();var BC=Ne&&Ne.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),RC=Ne&&Ne.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),LC=Ne&&Ne.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&BC(t,e,r);return RC(t,e),t},as=Ne&&Ne.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.table=void 0;var Qd=as(Be()),$C=Nd(),qC=Ud(),UC=F("node:util"),HC=as(Yd()),lr=as(co()),Rt=LC(os()),zC=Yt(),Da=oe(),JC=as(Ot()),Ca=class{data;columns;options;constructor(t,r,i={}){this.data=t,this.columns=Object.keys(r).map(p=>{let a=r[p],u=a.extended??!1,l=a.get??(x=>x[p]??""),g=typeof a.header=="string"?a.header:(0,Da.capitalize)(p.replaceAll("_"," ")),v=Math.max(a.minWidth??0,(0,lr.default)(g)+1);return{extended:u,get:l,header:g,key:p,minWidth:v}});let{columns:n,csv:o,extended:s,filter:c,output:h,printLine:m,sort:d,title:f}=i;this.options={columns:n,extended:s,filter:c,"no-header":i["no-header"]??!1,"no-truncate":i["no-truncate"]??!1,output:o?"csv":h,printLine:m??(p=>JC.default.stdout(p+`
112
112
  `)),rowStart:" ",sort:d,title:f}}display(){let t=this.data.map(r=>{let i={};for(let n of this.columns){let o=n.get(r);typeof o!="string"&&(o=(0,UC.inspect)(o,{breakLength:Number.POSITIVE_INFINITY})),i[n.key]=o}return i});if(this.options.filter){let[r,i]=this.options.filter.split("="),n=r[0]==="-";n&&(r=r.slice(1));let o=this.findColumnFromHeader(r);if(!o||!i)throw new Error("Filter flag has an invalid value");t=t.filter(s=>{let c=new RegExp(i),m=s[o.key].match(c);return n?!m:m})}if(this.options.sort){let r=this.options.sort.split(","),i=r.map(s=>s[0]==="-"?s.slice(1):s),n=this.filterColumnsFromHeaders(i).map(s=>c=>c[s.key]),o=r.map(s=>s[0]==="-"?"desc":"asc");t=(0,qC.orderBy)(t,n,o)}if(this.options.columns){let r=this.options.columns.split(",");this.columns=this.filterColumnsFromHeaders(r)}else this.options.extended||(this.columns=this.columns.filter(r=>!r.extended));switch(this.data=t,this.options.output){case"csv":{this.outputCSV();break}case"json":{this.outputJSON();break}case"yaml":{this.outputYAML();break}default:this.outputTable()}}filterColumnsFromHeaders(t){t=[...new Set(t)];let r=[];for(let i of t){let n=this.columns.find(o=>o.header.toLowerCase()===i.toLowerCase());n&&r.push(n)}return r}findColumnFromHeader(t){return this.columns.find(r=>r.header.toLowerCase()===t.toLowerCase())}getCSVRow(t){let r=this.columns.map(n=>t[n.key]||""),i=r.find(n=>n.includes('"')||n.includes(`
113
113
  `)||n.includes(`\r
114
114
  `)||n.includes("\r")||n.includes(","));return r.map(n=>i?`"${n.replaceAll('"','""')}"`:n)}outputCSV(){let{columns:t,data:r,options:i}=this;i["no-header"]||i.printLine(t.map(n=>n.header).join(","));for(let n of r){let o=this.getCSVRow(n);i.printLine(o.join(","))}}outputJSON(){this.options.printLine(JSON.stringify(this.resolveColumnsToObjectArray(),void 0,2))}outputTable(){let{data:t,options:r}=this,i=this.columns.map(s=>{let c=Math.max((0,lr.default)(".".padEnd(s.minWidth-1)),(0,lr.default)(s.header),WC(t,s.key))+1;return{...s,maxWidth:c,width:c}}),n=zC.stdtermwidth-2;if((()=>{if(r["no-truncate"]||!process.stdout.isTTY&&!process.env.CLI_UX_SKIP_TTY_CHECK||(0,Da.sumBy)(i,f=>f.width)-n<=0)return;for(let f of i)f.width=f.minWidth;let h=(0,Da.sumBy)(i,f=>f.minWidth);if(h>=n)return;let m=n-h,d=i.map(f=>({key:f.key,needs:f.maxWidth-f.width})).sort((f,p)=>f.needs-p.needs);for(let{key:f,needs:p}of d){if(!p)continue;let a=i.find(u=>f===u.key);a&&(m>p?(a.width=a.width+p,m-=p):m&&(a.width=a.width+m,m=0))}})(),r.title&&(r.printLine(r.title),r.printLine("".padEnd(i.reduce((s,c)=>s+c.width,1),"=")),r.rowStart="| "),!r["no-header"]){let s=r.rowStart;for(let h of i){let m=h.header;s+=m.padEnd(h.width)}r.printLine(Qd.default.bold(s));let c=r.rowStart;for(let h of i){let m="".padEnd(h.width-1,"\u2500")+" ";c+=m.padEnd(h.width)}r.printLine(Qd.default.bold(c))}for(let s of t){let c=1;for(let m of i){let f=s[m.key].split(`
@@ -132,11 +132,11 @@ Should be of format "before:after"`);return x.length===1||x[1].length===0?x.inde
132
132
  `)}static log(t,...r){this.info(t||"",...r)}static logToStderr(t,...r){Dp.default.stderr((0,ds.format)(t,...r)+`
133
133
  `)}static get progress(){return ps.progress}static get prompt(){return Ma.prompt}static styledHeader(t){this.info(Ia.default.dim("=== ")+Ia.default.bold(t)+`
134
134
  `)}static styledJSON(t){let r=JSON.stringify(t,null,2);if(!Ia.default.level){this.info(r);return}let i=xp(),n=Ep();this.info(i.highlight(r,{json:!0,theme:n}))}static styledObject(t,r){this.info(ps.styledObject(t,r))}static get table(){return ps.Table.table}static trace(t,...r){this.config.outputLevel==="trace"&&this.info((0,ds.format)(t,...r)+`
135
- `)}static get tree(){return ps.tree}static url(t,r,i={}){Pc().stdout?this.log(xS(t,r,i)):this.log(r)}static get wait(){return vS.default}};_.ux=Ri;var{action:wS,annotation:ES,anykey:bS,confirm:DS,debug:CS,done:SS,flush:AS,info:_S,log:FS,logToStderr:kS,progress:TS,prompt:OS,styledHeader:PS,styledJSON:IS,styledObject:NS,table:MS,trace:jS,tree:BS,url:RS,wait:LS}=Ri;_.action=wS;_.annotation=ES;_.anykey=bS;_.confirm=DS;_.debug=CS;_.done=SS;_.flush=AS;_.info=_S;_.log=FS;_.logToStderr=kS;_.progress=TS;_.prompt=OS;_.styledHeader=PS;_.styledJSON=IS;_.styledObject=NS;_.table=MS;_.trace=jS;_.tree=BS;_.url=RS;_.wait=LS;var{error:$S,exit:qS,warn:US}=gS;_.error=$S;_.exit=qS;_.warn=US;var Cp=async()=>{try{await Ri.done()}catch(e){console.error(e),process.exitCode=1}},HS=process.listeners("exit").find(e=>e.name===Cp.name);HS||process.once("exit",Cp);var zS=Ln();Object.defineProperty(_,"ActionBase",{enumerable:!0,get:function(){return zS.ActionBase}});var Sp=Un();Object.defineProperty(_,"Config",{enumerable:!0,get:function(){return Sp.Config}});Object.defineProperty(_,"config",{enumerable:!0,get:function(){return Sp.config}});var JS=bp();Object.defineProperty(_,"ExitError",{enumerable:!0,get:function(){return JS.ExitError}});var WS=_a();Object.defineProperty(_,"Table",{enumerable:!0,get:function(){return WS.Table}});var GS=er();Object.defineProperty(_,"colorize",{enumerable:!0,get:function(){return GS.colorize}});var XS=Ot();Object.defineProperty(_,"write",{enumerable:!0,get:function(){return ms(XS).default}})});var Ap=E(Vr=>{"use strict";y();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.stderr=Vr.stdout=void 0;var gs=class{channel;constructor(t){this.channel=t}get isTTY(){return process[this.channel].isTTY}emit(t,...r){return process[this.channel].emit(t,...r)}getWindowSize(){return process[this.channel].getWindowSize()}on(t,r){return process[this.channel].on(t,r),this}once(t,r){return process[this.channel].once(t,r),this}read(){return process[this.channel].read()}write(t){return process[this.channel].write(t)}};Vr.stdout=new gs("stdout");Vr.stderr=new gs("stderr")});var Yr=E(Ee=>{"use strict";y();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.Performance=Ee.OCLIF_MARKER_OWNER=void 0;var $i=F("node:perf_hooks"),VS=Pt();Ee.OCLIF_MARKER_OWNER="@oclif/core";var Ba=class{owner;name;details;method;module;scope;stopped=!1;startMarker;stopMarker;constructor(t,r,i={}){this.owner=t,this.name=r,this.details=i,this.startMarker=`${this.name}-start`,this.stopMarker=`${this.name}-stop`;let[n,o]=r.split("#"),[s,c]=n.split(".");this.module=s,this.method=c,this.scope=o,$i.performance.mark(this.startMarker)}addDetails(t){this.details={...this.details,...t}}measure(){$i.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,$i.performance.mark(this.stopMarker)}},Ra=class e{static _oclifPerf;static _results=new Map;static markers=new Map;static async collect(){if(!e.enabled||e._results.size>0)return;let t=[...e.markers.values()];if(t.length!==0){for(let r of t.filter(i=>!i.stopped))r.stop();return new Promise(r=>{new $i.PerformanceObserver(n=>{for(let f of n.getEntries()){let p=e.markers.get(f.name);if(p){let a={details:p.details,duration:f.duration,method:p.method,module:p.module,name:f.name,scope:p.scope},u=e._results.get(p.owner)??[];e._results.set(p.owner,[...u,a])}}let o=e._results.get(Ee.OCLIF_MARKER_OWNER)??[],s=o.find(f=>f.name.startsWith("config.runCommand")),c=s?e.getResult(Ee.OCLIF_MARKER_OWNER,`plugin.findCommand#${s.details.plugin}.${s.details.command}`)?.duration??0:0,h=Object.fromEntries(o.filter(({name:f})=>f.startsWith("plugin.load#")).sort((f,p)=>p.duration-f.duration).map(({details:f,duration:p,scope:a})=>[a,{details:f,duration:p}])),m=o.filter(({name:f})=>f.startsWith("config.runHook#")).reduce((f,p)=>{let a=p.details.event;if(a)f[a]||(f[a]={}),f[a][p.scope]=p.duration;else{let u=p.scope;f[u]||(f[u]={}),f[u].total=p.duration}return f},{}),d=Object.fromEntries(o.filter(({name:f})=>f.startsWith("config.loadPlugins#")).sort((f,p)=>p.duration-f.duration).map(({duration:f,scope:p})=>[p,f]));e._oclifPerf={hookRunTimes:m,"oclif.commandLoadMs":c,"oclif.commandRunMs":o.find(({name:f})=>f.startsWith("config.runCommand#"))?.duration??0,"oclif.configLoadMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"config.load")?.duration??0,"oclif.corePluginsLoadMs":d.core??0,"oclif.initHookMs":m.init?.total??0,"oclif.initMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"main.run#init")?.duration??0,"oclif.linkedPluginsLoadMs":d.link??0,"oclif.postrunHookMs":m.postrun?.total??0,"oclif.prerunHookMs":m.prerun?.total??0,"oclif.runMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"main.run")?.duration??0,"oclif.userPluginsLoadMs":d.user??0,pluginLoadTimes:h},r()}).observe({buffered:!0,entryTypes:["measure"]});for(let n of t)try{n.measure()}catch{}$i.performance.clearMarks()})}}static debug(){if(!e.enabled)return;let t=et()("oclif-perf"),r=(process.uptime()*1e3).toFixed(4);t("Process Uptime: %sms",r),t("Oclif Time: %sms",e.oclifPerf["oclif.runMs"].toFixed(4)),t("Init Time: %sms",e.oclifPerf["oclif.initMs"].toFixed(4)),t("Config Load Time: %sms",e.oclifPerf["oclif.configLoadMs"].toFixed(4)),t(" \u2022 Root Plugin Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"plugin.load#root")?.duration.toFixed(4)??0),t(" \u2022 Plugins Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"config.loadAllPlugins")?.duration.toFixed(4)??0),t(" \u2022 Commands Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"config.loadAllCommands")?.duration.toFixed(4)??0),t("Core Plugin Load Time: %sms",e.oclifPerf["oclif.corePluginsLoadMs"].toFixed(4)),t("User Plugin Load Time: %sms",e.oclifPerf["oclif.userPluginsLoadMs"].toFixed(4)),t("Linked Plugin Load Time: %sms",e.oclifPerf["oclif.linkedPluginsLoadMs"].toFixed(4)),t("Plugin Load Times:");for(let[o,s]of Object.entries(e.oclifPerf.pluginLoadTimes))s.details.hasManifest?t(` ${o}: ${s.duration.toFixed(4)}ms`):t(` ${o}: ${s.duration.toFixed(4)}ms (no manifest!)`);t("Hook Run Times:");for(let[o,s]of Object.entries(e.oclifPerf.hookRunTimes)){t(` ${o}:`);for(let[c,h]of Object.entries(s))t(` ${c}: ${h.toFixed(4)}ms`)}t("Command Load Time: %sms",e.oclifPerf["oclif.commandLoadMs"].toFixed(4)),t("Command Run Time: %sms",e.oclifPerf["oclif.commandRunMs"].toFixed(4)),e.oclifPerf["oclif.configLoadMs"]>e.oclifPerf["oclif.runMs"]&&t("! Config load time is greater than total oclif time. This might mean that Config was instantiated before oclif was run.");let i=et()("non-oclif-perf"),n=e.results;if(n.size>0){i("Non-Core Performance Measurements:");for(let[o,s]of n){i(` ${o}:`);for(let c of s)i(` ${c.name}: ${c.duration.toFixed(4)}ms`)}}}static get enabled(){return VS.settings.performanceEnabled??!1}static getResult(t,r){return e._results.get(t)?.find(i=>i.name===r)}static mark(t,r,i={}){if(!e.enabled)return;let n=new Ba(t,r,i);return e.markers.set(n.name,n),n}static get oclifPerf(){if(!e.enabled)return{};if(e._oclifPerf)return e._oclifPerf;throw new Error("Perf results not available. Did you forget to call await Performance.collect()?")}static get results(){return e.enabled?new Map([...e._results.entries()].filter(([t])=>t!==Ee.OCLIF_MARKER_OWNER)):new Map}};Ee.Performance=Ra});var Fp=E(Kr=>{"use strict";y();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.getPlatform=Kr.getHomeDir=void 0;var _p=F("node:os");function YS(){return(0,_p.homedir)()}Kr.getHomeDir=YS;function KS(){return(0,_p.platform)()}Kr.getPlatform=KS});var kp=E(ys=>{"use strict";y();Object.defineProperty(ys,"__esModule",{value:!0});ys.assertValidPattern=void 0;var QS=1024*64,ZS=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>QS)throw new TypeError("pattern is too long")};ys.assertValidPattern=ZS});var Op=E(vs=>{"use strict";y();Object.defineProperty(vs,"__esModule",{value:!0});vs.parseClass=void 0;var eA={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},qi=e=>e.replace(/[[\]\\-]/g,"\\$&"),tA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Tp=e=>e.join(""),rA=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],o=r+1,s=!1,c=!1,h=!1,m=!1,d=r,f="";e:for(;o<e.length;){let l=e.charAt(o);if((l==="!"||l==="^")&&o===r+1){m=!0,o++;continue}if(l==="]"&&s&&!h){d=o+1;break}if(s=!0,l==="\\"&&!h){h=!0,o++;continue}if(l==="["&&!h){for(let[g,[v,x,w]]of Object.entries(eA))if(e.startsWith(g,o)){if(f)return["$.",!1,e.length-r,!0];o+=g.length,w?n.push(v):i.push(v),c=c||x;continue e}}if(h=!1,f){l>f?i.push(qi(f)+"-"+qi(l)):l===f&&i.push(qi(l)),f="",o++;continue}if(e.startsWith("-]",o+1)){i.push(qi(l+"-")),o+=2;continue}if(e.startsWith("-",o+1)){f=l,o+=2;continue}i.push(qi(l)),o++}if(d<o)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!m){let l=i[0].length===2?i[0].slice(-1):i[0];return[tA(l),!1,d-r,!1]}let p="["+(m?"^":"")+Tp(i)+"]",a="["+(m?"":"^")+Tp(n)+"]";return[i.length&&n.length?"("+p+"|"+a+")":i.length?p:a,c,d-r,!0]};vs.parseClass=rA});var ws=E(xs=>{"use strict";y();Object.defineProperty(xs,"__esModule",{value:!0});xs.unescape=void 0;var iA=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");xs.unescape=iA});var qa=E(Cs=>{"use strict";y();var _e;Object.defineProperty(Cs,"__esModule",{value:!0});Cs.AST=void 0;var nA=Op(),Es=ws(),sA=new Set(["!","?","+","*","@"]),La=e=>sA.has(e),Pp=e=>La(e.type),oA=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),aA=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),uA=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Ip=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),cA="(?!(?:^|/)\\.\\.?(?:$|/))",bs="(?!\\.)",lA=new Set(["[","."]),hA=new Set(["..","."]),fA=new Set("().*{}+?[]^$\\!"),dA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),$a="[^/]",Np=$a+"*?",Mp=$a+"+?",Ds=class{type;#r;#i;#n=!1;#e=[];#t;#a;#c;#u=!1;#s;#o;#l=!1;constructor(t,r,i={}){this.type=t,t&&(this.#i=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?i:this.#r.#s,this.#c=this.#r===this?[]:this.#r.#c,t==="!"&&!this.#r.#u&&this.#c.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#o=this.#e.map(t=>String(t)).join("")}#y(){if(this!==this.#r)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let r=t,i=r.#t;for(;i;){for(let n=r.#a+1;!i.type&&n<i.#e.length;n++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(i.#e[n])}r=i,i=r.#t}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof _e&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let t=this.#t;for(let r=0;r<this.#a;r++){let i=t.#e[r];if(!(i instanceof _e&&i.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new _e(this.type,t);for(let i of this.#e)r.copyIn(i);return r}static#h(t,r,i,n,o){let s=n.maxExtglobRecursion??2,c=!1,h=!1,m=-1,d=!1;if(r.type===null){let l=i,g="";for(;l<t.length;){let v=t.charAt(l++);if(c||v==="\\"){c=!c,g+=v;continue}if(h){l===m+1?(v==="^"||v==="!")&&(d=!0):v==="]"&&!(l===m+2&&d)&&(h=!1),g+=v;continue}else if(v==="["){h=!0,m=l,d=!1,g+=v;continue}if(!n.noext&&La(v)&&t.charAt(l)==="("&&o<=s){r.push(g),g="";let w=new _e(v,r);l=_e.#h(t,w,l,n,o+1),r.push(w);continue}g+=v}return r.push(g),l}let f=i+1,p=new _e(null,r),a=[],u="";for(;f<t.length;){let l=t.charAt(f++);if(c||l==="\\"){c=!c,u+=l;continue}if(h){f===m+1?(l==="^"||l==="!")&&(d=!0):l==="]"&&!(f===m+2&&d)&&(h=!1),u+=l;continue}else if(l==="["){h=!0,m=f,d=!1,u+=l;continue}if(La(l)&&t.charAt(f)==="("&&(o<=s||r&&r.#f(l))){let v=r&&r.#f(l)?0:1;p.push(u),u="";let x=new _e(l,p);p.push(x),f=_e.#h(t,x,f,n,o+v);continue}if(l==="|"){p.push(u),u="",a.push(p),p=new _e(null,r);continue}if(l===")")return u===""&&r.#e.length===0&&(r.#l=!0),p.push(u),u="",r.push(...a,p),f;u+=l}return r.type=null,r.#i=void 0,r.#e=[t.substring(i-1)],f}#v(t){return this.#p(t,aA)}#p(t,r=oA){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let i=t.#e[0];return!i||typeof i!="object"||i.type===null?!1:this.#f(i.type,r)}#f(t,r=uA){return!!r.get(this.type)?.includes(t)}#x(t,r){let i=t.#e[0],n=new _e(null,i,this.options);n.#e.push(""),i.push(n),this.#m(t,r)}#m(t,r){let i=t.#e[0];this.#e.splice(r,1,...i.#e);for(let n of i.#e)typeof n=="object"&&(n.#t=this);this.#o=void 0}#w(t){return!!Ip.get(this.type)?.has(t)}#E(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#w(r.type)}#b(t){let r=Ip.get(this.type),i=t.#e[0],n=r?.get(i.type);if(!n)return!1;this.#e=i.#e;for(let o of this.#e)typeof o=="object"&&(o.#t=this);this.type=n,this.#o=void 0,this.#l=!1}#d(){if(Pp(this)){let t=0,r=!1;do{r=!0;for(let i=0;i<this.#e.length;i++){let n=this.#e[i];typeof n=="object"&&(n.#d(),this.#p(n)?(r=!1,this.#m(n,i)):this.#v(n)?(r=!1,this.#x(n,i)):this.#E(n)&&(r=!1,this.#b(n)))}}while(!r&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#d();this.#o=void 0}static fromGlob(t,r={}){let i=new _e(null,void 0,r);return _e.#h(t,i,0,r,0),i}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let t=this.toString(),[r,i,n,o]=this.toRegExpSource();if(!(n||this.#i||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let c=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,c),{_src:r,_glob:t})}get options(){return this.#s}toRegExpSource(t){let r=t??!!this.#s.dot;if(this.#r===this&&(this.#d(),this.#y()),!Pp(this)){let h=this.isStart()&&this.isEnd(),m=this.#e.map(a=>{let[u,l,g,v]=typeof a=="string"?_e.#D(a,this.#i,h):a.toRegExpSource(t);return this.#i=this.#i||g,this.#n=this.#n||v,u}).join(""),d="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&hA.has(this.#e[0]))){let u=lA,l=r&&u.has(m.charAt(0))||m.startsWith("\\.")&&u.has(m.charAt(2))||m.startsWith("\\.\\.")&&u.has(m.charAt(4)),g=!r&&!t&&u.has(m.charAt(0));d=l?cA:g?bs:""}let f="";return this.isEnd()&&this.#r.#u&&this.#t?.type==="!"&&(f="(?:$|\\/)"),[d+m+f,(0,Es.unescape)(m),this.#i=!!this.#i,this.#n]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#g(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let h=this.toString(),m=this;return m.#e=[h],m.type=null,m.#i=void 0,[h,(0,Es.unescape)(this.toString()),!1,!1]}let s=!i||t||r||!bs?"":this.#g(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!r?bs:"")+Mp;else{let h=this.type==="!"?"))"+(this.isStart()&&!r&&!t?bs:"")+Np+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;c=n+o+h}return[c,(0,Es.unescape)(o),this.#i=!!this.#i,this.#n]}#g(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,o,s]=r.toRegExpSource(t);return this.#n=this.#n||s,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#D(t,r,i=!1){let n=!1,o="",s=!1,c=!1;for(let h=0;h<t.length;h++){let m=t.charAt(h);if(n){n=!1,o+=(fA.has(m)?"\\":"")+m,c=!1;continue}if(m==="\\"){h===t.length-1?o+="\\\\":n=!0;continue}if(m==="["){let[d,f,p,a]=(0,nA.parseClass)(t,h);if(p){o+=d,s=s||f,h+=p-1,r=r||a,c=!1;continue}}if(m==="*"){if(c)continue;c=!0,o+=i&&/^[*]+$/.test(t)?Mp:Np,r=!0;continue}else c=!1;if(m==="?"){o+=$a,r=!0;continue}o+=dA(m)}return[o,(0,Es.unescape)(t),!!r,s]}};Cs.AST=Ds;_e=Ds});var Ua=E(Ss=>{"use strict";y();Object.defineProperty(Ss,"__esModule",{value:!0});Ss.escape=void 0;var pA=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");Ss.escape=pA});var Up=E(k=>{"use strict";y();var mA=k&&k.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(k,"__esModule",{value:!0});k.unescape=k.escape=k.AST=k.Minimatch=k.match=k.makeRe=k.braceExpand=k.defaults=k.filter=k.GLOBSTAR=k.sep=k.minimatch=void 0;var gA=mA(Q0()),As=kp(),Rp=qa(),yA=Ua(),vA=ws(),xA=(e,t,r={})=>((0,As.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new fr(t,r).match(e));k.minimatch=xA;var wA=/^\*+([^+@!?\*\[\(]*)$/,EA=e=>t=>!t.startsWith(".")&&t.endsWith(e),bA=e=>t=>t.endsWith(e),DA=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),CA=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),SA=/^\*+\.\*+$/,AA=e=>!e.startsWith(".")&&e.includes("."),_A=e=>e!=="."&&e!==".."&&e.includes("."),FA=/^\.\*+$/,kA=e=>e!=="."&&e!==".."&&e.startsWith("."),TA=/^\*+$/,OA=e=>e.length!==0&&!e.startsWith("."),PA=e=>e.length!==0&&e!=="."&&e!=="..",IA=/^\?+([^+@!?\*\[\(]*)?$/,NA=([e,t=""])=>{let r=Lp([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},MA=([e,t=""])=>{let r=$p([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},jA=([e,t=""])=>{let r=$p([e]);return t?i=>r(i)&&i.endsWith(t):r},BA=([e,t=""])=>{let r=Lp([e]);return t?i=>r(i)&&i.endsWith(t):r},Lp=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},$p=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},qp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",jp={win32:{sep:"\\"},posix:{sep:"/"}};k.sep=qp==="win32"?jp.win32.sep:jp.posix.sep;k.minimatch.sep=k.sep;k.GLOBSTAR=Symbol("globstar **");k.minimatch.GLOBSTAR=k.GLOBSTAR;var RA="[^/]",LA=RA+"*?",$A="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",qA="(?:(?!(?:\\/|^)\\.).)*?",UA=(e,t={})=>r=>(0,k.minimatch)(r,e,t);k.filter=UA;k.minimatch.filter=k.filter;var qe=(e,t={})=>Object.assign({},e,t),HA=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return k.minimatch;let t=k.minimatch;return Object.assign((i,n,o={})=>t(i,n,qe(e,o)),{Minimatch:class extends t.Minimatch{constructor(n,o={}){super(n,qe(e,o))}static defaults(n){return t.defaults(qe(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,o,s={}){super(n,o,qe(e,s))}static fromGlob(n,o={}){return t.AST.fromGlob(n,qe(e,o))}},unescape:(i,n={})=>t.unescape(i,qe(e,n)),escape:(i,n={})=>t.escape(i,qe(e,n)),filter:(i,n={})=>t.filter(i,qe(e,n)),defaults:i=>t.defaults(qe(e,i)),makeRe:(i,n={})=>t.makeRe(i,qe(e,n)),braceExpand:(i,n={})=>t.braceExpand(i,qe(e,n)),match:(i,n,o={})=>t.match(i,n,qe(e,o)),sep:t.sep,GLOBSTAR:k.GLOBSTAR})};k.defaults=HA;k.minimatch.defaults=k.defaults;var zA=(e,t={})=>((0,As.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,gA.default)(e));k.braceExpand=zA;k.minimatch.braceExpand=k.braceExpand;var JA=(e,t={})=>new fr(e,t).makeRe();k.makeRe=JA;k.minimatch.makeRe=k.makeRe;var WA=(e,t,r={})=>{let i=new fr(t,r);return e=e.filter(n=>i.match(n)),i.options.nonull&&!e.length&&e.push(t),e};k.match=WA;k.minimatch.match=k.match;var Bp=/[?*]|[+@!]\(.*?\)|\[|\]/,GA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fr=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,r={}){(0,As.assertValidPattern)(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||qp,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((o,s,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let h=o[0]===""&&o[1]===""&&(o[2]==="?"||!Bp.test(o[2]))&&!Bp.test(o[3]),m=/^[a-z]:/i.test(o[0]);if(h)return[...o.slice(0,4),...o.slice(4).map(d=>this.parse(d))];if(m)return[o[0],...o.slice(1).map(d=>this.parse(d))]}return o.map(h=>this.parse(h))});if(this.debug(this.pattern,n),this.set=n.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++)t[i][n]==="**"&&(t[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,n)=>{let o=i[i.length-1];return n==="**"&&o==="**"?i:n===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let o=t[n];n===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let n=t[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s>n&&i.splice(n+1,s-n);let c=i[n+1],h=i[n+2],m=i[n+3];if(c!==".."||!h||h==="."||h===".."||!m||m==="."||m==="..")continue;r=!0,i.splice(n,1);let d=i.slice(0);d[n]="**",t.push(d),n--}if(!this.preserveMultipleSlashes){for(let s=1;s<i.length-1;s++){let c=i[s];s===1&&c===""&&i[0]===""||(c==="."||c==="")&&(r=!0,i.splice(s,1),s--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let o=0;for(;(o=i.indexOf("..",o+1))!==-1;){let s=i[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){r=!0;let h=o===1&&i[o+1]==="**"?["."]:[];i.splice(o-1,2,...h),i.length===0&&i.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){let n=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(n){t[r]=[],t[i]=n;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let n=0,o=0,s=[],c="";for(;n<t.length&&o<r.length;)if(t[n]===r[o])s.push(c==="b"?r[o]:t[n]),n++,o++;else if(i&&t[n]==="**"&&r[o]===t[n+1])s.push(t[n]),n++;else if(i&&r[o]==="**"&&t[n]===r[o+1])s.push(r[o]),o++;else if(t[n]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(c==="b")return!1;c="a",s.push(t[n]),n++,o++}else if(r[o]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="a")return!1;c="b",s.push(r[o]),n++,o++}else return!1;return t.length===r.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,i=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){let n=0,o=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),h=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),m=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=!m&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=h?3:c?0:void 0,p=d?3:m?0:void 0;if(typeof f=="number"&&typeof p=="number"){let[a,u]=[t[f],r[p]];a.toLowerCase()===u.toLowerCase()&&(r[p]=a,o=p,n=f)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(k.GLOBSTAR)?this.#r(t,r,i,n,o):this.#n(t,r,i,n,o)}#r(t,r,i,n,o){let s=r.indexOf(k.GLOBSTAR,o),c=r.lastIndexOf(k.GLOBSTAR),[h,m,d]=i?[r.slice(o,s),r.slice(s+1),[]]:[r.slice(o,s),r.slice(s+1,c),r.slice(c+1)];if(h.length){let x=t.slice(n,n+h.length);if(!this.#n(x,h,i,0,0))return!1;n+=h.length}let f=0;if(d.length){if(d.length+n>t.length)return!1;let x=t.length-d.length;if(this.#n(t,d,i,x,0))f=d.length;else{if(t[t.length-1]!==""||n+d.length===t.length||(x--,!this.#n(t,d,i,x,0)))return!1;f=d.length+1}}if(!m.length){let x=!!f;for(let w=n;w<t.length-f;w++){let C=String(t[w]);if(x=!0,C==="."||C===".."||!this.options.dot&&C.startsWith("."))return!1}return i||x}let p=[[[],0]],a=p[0],u=0,l=[0];for(let x of m)x===k.GLOBSTAR?(l.push(u),a=[[],0],p.push(a)):(a[0].push(x),u++);let g=p.length-1,v=t.length-f;for(let x of p)x[1]=v-(l[g--]+x[0].length);return!!this.#i(t,p,n,0,i,0,!!f)}#i(t,r,i,n,o,s,c){let h=r[n];if(!h){for(let f=i;f<t.length;f++){c=!0;let p=t[f];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return c}let[m,d]=h;for(;i<=d;){if(this.#n(t.slice(0,i+m.length),m,o,i,0)&&s<this.maxGlobstarRecursion){let a=this.#i(t,r,i+m.length,n+1,o,s+1,c);if(a!==!1)return a}let p=t[i];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;i++}return o||null}#n(t,r,i,n,o){let s,c,h,m;for(s=n,c=o,m=t.length,h=r.length;s<m&&c<h;s++,c++){this.debug("matchOne loop");let d=r[c],f=t[s];if(this.debug(r,d,f),d===!1||d===k.GLOBSTAR)return!1;let p;if(typeof d=="string"?(p=f===d,this.debug("string match",d,f,p)):(p=d.test(f),this.debug("pattern match",d,f,p)),!p)return!1}if(s===m&&c===h)return!0;if(s===m)return i;if(c===h)return s===m-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,k.braceExpand)(this.pattern,this.options)}parse(t){(0,As.assertValidPattern)(t);let r=this.options;if(t==="**")return k.GLOBSTAR;if(t==="")return"";let i,n=null;(i=t.match(TA))?n=r.dot?PA:OA:(i=t.match(wA))?n=(r.nocase?r.dot?CA:DA:r.dot?bA:EA)(i[1]):(i=t.match(IA))?n=(r.nocase?r.dot?MA:NA:r.dot?jA:BA)(i):(i=t.match(SA))?n=r.dot?_A:AA:(i=t.match(FA))&&(n=kA);let o=Rp.AST.fromGlob(t,this.options).toMMPattern();return n&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:n}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?LA:r.dot?$A:qA,n=new Set(r.nocase?["i"]:[]),o=t.map(h=>{let m=h.map(d=>{if(d instanceof RegExp)for(let f of d.flags.split(""))n.add(f);return typeof d=="string"?GA(d):d===k.GLOBSTAR?k.GLOBSTAR:d._src});return m.forEach((d,f)=>{let p=m[f+1],a=m[f-1];d!==k.GLOBSTAR||a===k.GLOBSTAR||(a===void 0?p!==void 0&&p!==k.GLOBSTAR?m[f+1]="(?:\\/|"+i+"\\/)?"+p:m[f]=i:p===void 0?m[f-1]=a+"(?:\\/|"+i+")?":p!==k.GLOBSTAR&&(m[f-1]=a+"(?:\\/|\\/"+i+"\\/)"+p,m[f+1]=k.GLOBSTAR))}),m.filter(d=>d!==k.GLOBSTAR).join("/")}).join("|"),[s,c]=t.length>1?["(?:",")"]:["",""];o="^"+s+o+c+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let o=this.set;this.debug(this.pattern,"set",o);let s=n[n.length-1];if(!s)for(let c=n.length-2;!s&&c>=0;c--)s=n[c];for(let c=0;c<o.length;c++){let h=o[c],m=n;if(i.matchBase&&h.length===1&&(m=[s]),this.matchOne(m,h,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return k.minimatch.defaults(t).Minimatch}};k.Minimatch=fr;var XA=qa();Object.defineProperty(k,"AST",{enumerable:!0,get:function(){return XA.AST}});var VA=Ua();Object.defineProperty(k,"escape",{enumerable:!0,get:function(){return VA.escape}});var YA=ws();Object.defineProperty(k,"unescape",{enumerable:!0,get:function(){return YA.unescape}});k.minimatch.AST=Rp.AST;k.minimatch.Minimatch=fr;k.minimatch.escape=yA.escape;k.minimatch.unescape=vA.unescape});var zp=E((RI,Hp)=>{"use strict";y();Hp.exports=(...e)=>[...new Set([].concat(...e))]});var Wp=E(dr=>{"use strict";y();var{promisify:KA}=F("util"),Jp=F("fs");async function Ha(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await KA(Jp[e])(r))[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}function za(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return Jp[e](r)[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}dr.isFile=Ha.bind(null,"stat","isFile");dr.isDirectory=Ha.bind(null,"stat","isDirectory");dr.isSymlink=Ha.bind(null,"lstat","isSymbolicLink");dr.isFileSync=za.bind(null,"statSync","isFile");dr.isDirectorySync=za.bind(null,"statSync","isDirectory");dr.isSymlinkSync=za.bind(null,"lstatSync","isSymbolicLink")});var Kp=E((UI,Ja)=>{"use strict";y();var pr=F("path"),Gp=Wp(),Xp=e=>e.length>1?`{${e.join(",")}}`:e[0],Vp=(e,t)=>{let r=e[0]==="!"?e.slice(1):e;return pr.isAbsolute(r)?r:pr.join(t,r)},QA=(e,t)=>pr.extname(e)?`**/${e}`:`**/${e}.${Xp(t)}`,Yp=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>pr.posix.join(e,QA(r,t.extensions))):t.files?t.files.map(r=>pr.posix.join(e,`**/${r}`)):t.extensions?[pr.posix.join(e,`**/*.${Xp(t.extensions)}`)]:[pr.posix.join(e,"**")]};Ja.exports=async(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=await Promise.all([].concat(e).map(async i=>await Gp.isDirectory(Vp(i,t.cwd))?Yp(i,t):i));return[].concat.apply([],r)};Ja.exports.sync=(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=[].concat(e).map(i=>Gp.isDirectorySync(Vp(i,t.cwd))?Yp(i,t):i);return[].concat.apply([],r)}});var om=E((zI,sm)=>{y();function Qp(e){return Array.isArray(e)?e:[e]}var Xa="",Zp=" ",Wa="\\",ZA=/^\s+$/,e1=/(?:[^\\]|^)\\$/,t1=/^\\!/,r1=/^\\#/,i1=/\r?\n/g,n1=/^\.*\/|^\.+$/,Ga="/",rm="node-ignore";typeof Symbol<"u"&&(rm=Symbol.for("node-ignore"));var em=rm,s1=(e,t,r)=>Object.defineProperty(e,t,{value:r}),o1=/([0-z])-([0-z])/g,im=()=>!1,a1=e=>e.replace(o1,(t,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?t:Xa),u1=e=>{let{length:t}=e;return e.slice(0,t-t%2)},c1=[[/^\uFEFF/,()=>Xa],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?Zp:Xa)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+Zp}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let i=r.replace(/\\\*/g,"[^\\/]*");return t+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Wa],[/\\\\/g,()=>Wa],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,i,n)=>t===Wa?`\\[${r}${u1(i)}${n}`:n==="]"&&i.length%2===0?`[${a1(r)}${i}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],tm=Object.create(null),l1=(e,t)=>{let r=tm[e];return r||(r=c1.reduce((i,[n,o])=>i.replace(n,o.bind(e)),e),tm[e]=r),t?new RegExp(r,"i"):new RegExp(r)},Ka=e=>typeof e=="string",h1=e=>e&&Ka(e)&&!ZA.test(e)&&!e1.test(e)&&e.indexOf("#")!==0,f1=e=>e.split(i1),Va=class{constructor(t,r,i,n){this.origin=t,this.pattern=r,this.negative=i,this.regex=n}},d1=(e,t)=>{let r=e,i=!1;e.indexOf("!")===0&&(i=!0,e=e.substr(1)),e=e.replace(t1,"!").replace(r1,"#");let n=l1(e,t);return new Va(r,e,i,n)},p1=(e,t)=>{throw new t(e)},Et=(e,t,r)=>Ka(e)?e?Et.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),nm=e=>n1.test(e);Et.isNotRelative=nm;Et.convert=e=>e;var Ya=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:i=!1}={}){s1(this,em,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[em]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(h1(t)){let r=d1(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,Qp(Ka(t)?f1(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let i=!1,n=!1;return this._rules.forEach(o=>{let{negative:s}=o;if(n===s&&i!==n||s&&!i&&!n&&!r)return;o.regex.test(t)&&(i=!s,n=s)}),{ignored:i,unignored:n}}_test(t,r,i,n){let o=t&&Et.convert(t);return Et(o,t,this._allowRelativePaths?im:p1),this._t(o,r,i,n)}_t(t,r,i,n){if(t in r)return r[t];if(n||(n=t.split(Ga)),n.pop(),!n.length)return r[t]=this._testOne(t,i);let o=this._t(n.join(Ga)+Ga,r,i,n);return r[t]=o.ignored?o:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return Qp(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},_s=e=>new Ya(e),m1=e=>Et(e&&Et.convert(e),e,im);_s.isPathValid=m1;_s.default=_s;sm.exports=_s;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Et.convert=e;let t=/^[a-z]:\//i;Et.isNotRelative=r=>t.test(r)||nm(r)}});var um=E((WI,am)=>{"use strict";y();am.exports=e=>{let t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}});var mm=E((XI,Qa)=>{"use strict";y();var{promisify:g1}=F("util"),cm=F("fs"),bt=F("path"),lm=dc(),y1=om(),Ui=um(),hm=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],v1=g1(cm.readFile),x1=e=>t=>t.startsWith("!")?"!"+bt.posix.join(e,t.slice(1)):bt.posix.join(e,t),w1=(e,t)=>{let r=Ui(bt.relative(t.cwd,bt.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(i=>!i.startsWith("#")).map(x1(r))},fm=e=>{let t=y1();for(let r of e)t.add(w1(r.content,{cwd:r.cwd,fileName:r.filePath}));return t},E1=(e,t)=>{if(e=Ui(e),bt.isAbsolute(t)){if(Ui(t).startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return bt.join(e,t)},dm=(e,t)=>r=>e.ignores(Ui(bt.relative(t,E1(t,r.path||r)))),b1=async(e,t)=>{let r=bt.join(t,e),i=await v1(r,"utf8");return{cwd:t,filePath:r,content:i}},D1=(e,t)=>{let r=bt.join(t,e),i=cm.readFileSync(r,"utf8");return{cwd:t,filePath:r,content:i}},pm=({ignore:e=[],cwd:t=Ui(process.cwd())}={})=>({ignore:e,cwd:t});Qa.exports=async e=>{e=pm(e);let t=await lm("**/.gitignore",{ignore:hm.concat(e.ignore),cwd:e.cwd}),r=await Promise.all(t.map(n=>b1(n,e.cwd))),i=fm(r);return dm(i,e.cwd)};Qa.exports.sync=e=>{e=pm(e);let r=lm.sync("**/.gitignore",{ignore:hm.concat(e.ignore),cwd:e.cwd}).map(n=>D1(n,e.cwd)),i=fm(r);return dm(i,e.cwd)}});var ym=E((YI,gm)=>{"use strict";y();var{Transform:C1}=F("stream"),Fs=class extends C1{constructor(){super({objectMode:!0})}},Za=class extends Fs{constructor(t){super(),this._filter=t}_transform(t,r,i){this._filter(t)&&this.push(t),i()}},eu=class extends Fs{constructor(){super(),this._pushed=new Set}_transform(t,r,i){this._pushed.has(t)||(this.push(t),this._pushed.add(t)),i()}};gm.exports={FilterStream:Za,UniqueStream:eu}});var bm=E((QI,mr)=>{"use strict";y();var xm=F("fs"),ks=zp(),S1=Z0(),Ts=dc(),Os=Kp(),tu=mm(),{FilterStream:A1,UniqueStream:_1}=ym(),wm=()=>!1,vm=e=>e[0]==="!",F1=e=>{if(!e.every(t=>typeof t=="string"))throw new TypeError("Patterns must be a string or an array of strings")},k1=(e={})=>{if(!e.cwd)return;let t;try{t=xm.statSync(e.cwd)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},T1=e=>e.stats instanceof xm.Stats?e.path:e,Ps=(e,t)=>{e=ks([].concat(e)),F1(e),k1(t);let r=[];t={ignore:[],expandDirectories:!0,...t};for(let[i,n]of e.entries()){if(vm(n))continue;let o=e.slice(i).filter(c=>vm(c)).map(c=>c.slice(1)),s={...t,ignore:t.ignore.concat(o)};r.push({pattern:n,options:s})}return r},O1=(e,t)=>{let r={};return e.options.cwd&&(r.cwd=e.options.cwd),Array.isArray(e.options.expandDirectories)?r={...r,files:e.options.expandDirectories}:typeof e.options.expandDirectories=="object"&&(r={...r,...e.options.expandDirectories}),t(e.pattern,r)},ru=(e,t)=>e.options.expandDirectories?O1(e,t):[e.pattern],Em=e=>e&&e.gitignore?tu.sync({cwd:e.cwd,ignore:e.ignore}):wm,iu=e=>t=>{let{options:r}=e;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=Os.sync(r.ignore)),{pattern:t,options:r}};mr.exports=async(e,t)=>{let r=Ps(e,t),i=async()=>t&&t.gitignore?tu({cwd:t.cwd,ignore:t.ignore}):wm,n=async()=>{let h=await Promise.all(r.map(async m=>{let d=await ru(m,Os);return Promise.all(d.map(iu(m)))}));return ks(...h)},[o,s]=await Promise.all([i(),n()]),c=await Promise.all(s.map(h=>Ts(h.pattern,h.options)));return ks(...c).filter(h=>!o(T1(h)))};mr.exports.sync=(e,t)=>{let r=Ps(e,t),i=[];for(let s of r){let c=ru(s,Os.sync).map(iu(s));i.push(...c)}let n=Em(t),o=[];for(let s of i)o=ks(o,Ts.sync(s.pattern,s.options));return o.filter(s=>!n(s))};mr.exports.stream=(e,t)=>{let r=Ps(e,t),i=[];for(let c of r){let h=ru(c,Os.sync).map(iu(c));i.push(...h)}let n=Em(t),o=new A1(c=>!n(c)),s=new _1;return S1(i.map(c=>Ts.stream(c.pattern,c.options))).pipe(o).pipe(s)};mr.exports.generateGlobTasks=Ps;mr.exports.hasMagic=(e,t)=>[].concat(e).some(r=>Ts.isDynamicPattern(r,t));mr.exports.gitignore=tu});var nu=E(Is=>{"use strict";y();Object.defineProperty(Is,"__esModule",{value:!0});Is.aggregateFlags=void 0;var P1=os(),I1=(0,P1.boolean)({description:"Format output as json.",helpGroup:"GLOBAL"});function N1(e,t,r){let i={...t,...e};return r?{json:I1,...i}:i}Is.aggregateFlags=N1});var Sm=E(Ns=>{"use strict";y();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.cacheCommand=void 0;var M1=nu(),Dm=jo(),j1=On(),B1=oe();function Cm(e,t){let r=Object.getPrototypeOf(t),i=(0,B1.pickBy)(r,n=>n!==void 0);return Object.keys(r).length>0?Cm({...i,...e},r):e}async function R1(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{aliases:n.aliases,char:n.char,charAliases:n.charAliases,dependsOn:n.dependsOn,deprecateAliases:n.deprecateAliases,deprecated:n.deprecated,description:n.description,env:n.env,exclusive:n.exclusive,helpGroup:n.helpGroup,helpLabel:n.helpLabel,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,relationships:n.relationships,required:n.required,summary:n.summary,...n.type==="boolean"?{allowNo:n.allowNo,type:n.type}:{default:await(0,Dm.cacheDefaultValue)(n,t),delimiter:n.delimiter,hasDynamicHelp:typeof n.defaultHelp=="function",helpValue:n.helpValue,multiple:n.multiple,options:n.options,type:n.type}}]);return Object.fromEntries(await Promise.all(r))}async function L1(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{default:await(0,Dm.cacheDefaultValue)(n,t),description:n.description,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,options:n.options,required:n.required}]);return Object.fromEntries(await Promise.all(r))}async function $1(e,t,r=!1){let i=Cm(e,e),n=i.flags??i._flags,o=i.baseFlags??i._baseFlags,[s,c]=await Promise.all([await R1((0,M1.aggregateFlags)(n,o,i.enableJsonFlag),r),await L1((0,j1.ensureArgObject)(i.args),r)]),h={aliases:i.aliases??[],args:c,deprecateAliases:i.deprecateAliases,deprecationOptions:i.deprecationOptions,description:i.description,examples:i.examples??i.example,flags:s,hasDynamicHelp:Object.values(s).some(a=>a.hasDynamicHelp),hidden:i.hidden,hiddenAliases:i.hiddenAliases??[],id:i.id,pluginAlias:t&&t.alias,pluginName:t&&t.name,pluginType:t&&t.type,state:i.state,strict:i.strict,summary:i.summary,usage:i.usage},m=["plugin","_flags","_enableJsonFlag","_globalFlags","_baseFlags","baseFlags","_--","_base"],d=new Set([...Object.keys(h),...m]),f=Object.keys(i).filter(a=>!d.has(a)),p=Object.fromEntries(f.map(a=>[a,i[a]]));return{...h,...p}}Ns.cacheCommand=$1});var _m=E(Qr=>{"use strict";y();var q1=Qr&&Qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.findRoot=void 0;var U1=q1(et()),Fe=F("node:path"),Ms=yt(),Me=(0,U1.default)("find-root");function*su(e){for(;(0,Fe.dirname)(e)!==e;)yield e,e=(0,Fe.dirname)(e);yield e}async function Am(e,t){if(Me.extend(t??"root-plugin")(`Finding root starting at ${e}`),t){for(let r of su(e))if(r.endsWith((0,Fe.basename)(t)))return Me.extend(t)("Found root based on plugin name!"),r}for(let r of su(e))if(!((0,Fe.basename)((0,Fe.dirname)(r))==="bin"&&["dev","dev.cmd","dev.js","run","run.cmd","run.js"].includes((0,Fe.basename)(r))))try{let i=(0,Fe.join)(r,"package.json");if(Me.extend(t??"root-plugin")(`Checking ${i}`),await(0,Ms.safeReadJson)(i))return Me.extend(t??"root-plugin")("Found root by traversing up from starting point!"),(0,Fe.dirname)(i)}catch{}}async function H1(e,t){Me.extend(e??"root-plugin")("Finding root using legacy method");for(let r of su(t)){let i;if(e){if(i=(0,Fe.join)(r,"node_modules",e,"package.json"),await(0,Ms.safeReadJson)(i))return(0,Fe.dirname)(i);if((await(0,Ms.safeReadJson)((0,Fe.join)(r,"package.json")))?.name===e)return r}else if(i=(0,Fe.join)(r,"package.json"),await(0,Ms.safeReadJson)(i))return(0,Fe.dirname)(i)}}var Lt;function z1(e){if(Lt)return Lt;try{return Lt=F(F.resolve("pnpapi",{paths:[e]})),Lt}catch{}}var ou=e=>JSON.stringify(e),J1=(e,t,r)=>ou(e?.packageDependencies.get(r))===ou(t?.packageDependencies.get(r));function W1(e,t){if(z1(t),!Lt)return;Me.extend(e)("Finding root for using pnp method");let r=new Set,i=(n,o)=>{let s=ou(n);if(r.has(s))return;let c=Lt.getPackageInformation(n);if(n.name===e)return c.packageLocation;r.add(s);for(let[h,m]of c.packageDependencies){if(m===null||o!==null&&J1(c,o,h))continue;let d=Lt.getLocator(h,m),f=i(d,c);if(f)return f}r.delete(s)};for(let n of Lt.getDependencyTreeRoots()){let o=i(n);if(o)return o}}async function G1(e,t){if(e){Me.extend(e)(`Finding root using ${t}`);let i;try{i=F.resolve(e,{paths:[t]}),Me.extend(e)("Found starting point with require.resolve")}catch{Me.extend(e)("require.resolve could not find plugin starting point")}if(i){let o=await Am((0,Fe.dirname)(i),e);if(o)return Me.extend(e)(`Found root at ${o}`),o}let n=process.versions.pnp?W1(e,t):await H1(e,t);return Me.extend(e)(n?`Found root at ${n}`:"No root found!"),n}Me.extend("root-plugin")(`Finding root plugin using ${t}`);let r=await Am(t);return Me.extend("root-plugin")(r?`Found root at ${r}`:"No root found!"),r}Qr.findRoot=G1});var lu=E(ti=>{"use strict";y();var Nm=ti&&ti.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ti,"__esModule",{value:!0});ti.Plugin=void 0;var X1=Nm(bm()),ei=F("node:path"),Fm=F("node:util"),V1=Nm(Ve()),Hi=$e(),js=Ei(),Zr=Yr(),Mm=Fn(),Y1=Sm(),K1=_m(),km=yt(),Tm=oe(),au=Pr(),Bs=Or(),Om=V1.default.getInstance().get("@oclif/core");function uu(e,t){return e?(t=t?`${t}:`:"",Array.isArray(e)?[...e,e.flatMap(r=>uu(r.subtopics,`${t}${r.name}`))]:Object.keys(e).flatMap(r=>(e[r].name=r,[{...e[r],name:`${t}${r}`},...uu(e[r].subtopics,`${t}${e[r].name}`)]))):[]}var Q1=(e,t)=>!!(e?.commands[t]&&"isESM"in e.commands[t]&&"relativePath"in e.commands[t]),Pm=e=>typeof e.run=="function"?e:e.default&&e.default.run?e.default:Object.values(e).find(t=>typeof t.run=="function"),Im=e=>{if(e&&typeof e.run=="function")return e},jm=["**/*.+(js|cjs|mjs|ts|tsx|mts|cts)","!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)"];function Z1(e){return e.map(t=>{let r=(0,ei.parse)(t),i=r.dir.split("/"),n=r.name!=="index"&&r.name,o=[...i,n].filter(Boolean).join(":");return o===""?Mm.SINGLE_COMMAND_CLI_SYMBOL:o})}function e_(e,t){if(e){if(typeof e=="string"&&t)return{strategy:"single",target:e};if(typeof e=="string")return{globPatterns:jm,strategy:"pattern",target:e};if(!e.target)throw new Hi.CLIError("`oclif.commandDiscovery.target` is required.");if(!e.strategy)throw new Hi.CLIError("`oclif.commandDiscovery.strategy` is required.");return e.strategy==="explicit"&&!e.identifier&&(e.identifier="default"),e}}function t_(e){return typeof e=="string"?{identifier:"default",target:e}:e.identifier?e:{...e,identifier:"default"}}var cu=class{options;alias;alreadyLoaded=!1;children=[];commandIDs=[];commands;commandsDir;hasManifest=!1;hooks;isRoot=!1;manifest;moduleType;name;parent;pjson;root;tag;type;valid=!1;version;_base=`${Om.name}@${Om.version}`;_debug=(0,Bs.Debug)();commandCache;commandDiscoveryOpts;flexibleTaxonomy;constructor(t){this.options=t}get topics(){return uu(this.pjson.oclif.topics||{})}async findCommand(t,r={}){let i=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.findCommand#${this.name}.${t}`,{id:t,plugin:this.name}),o=await(async()=>{if(this.commandDiscoveryOpts?.strategy==="pattern"){let s=await this.getCommandsDir();if(!s)return;let c,h,m;try{({filePath:m,isESM:h,module:c}=Q1(this.manifest,t)?await(0,js.loadWithDataFromManifest)(this.manifest.commands[t],this.root):await(0,js.loadWithData)(this,(0,ei.join)(s??this.pjson.oclif.commands,...t.split(":")))),this._debug(h?"(import)":"(require)",m)}catch(f){if(!r.must&&f.code==="MODULE_NOT_FOUND")return;throw f}let d=Pm(c);return d?(d.id=t,d.plugin=this,d.isESM=h,d.relativePath=(0,ei.relative)(this.root,m||"").split(ei.sep),d):void 0}if(this.commandDiscoveryOpts?.strategy==="single"||this.commandDiscoveryOpts?.strategy==="explicit"){let s=await this.loadCommandsFromTarget(),c=Im(s?.[t]);return c?(c.id=t,c.plugin=this,c):void 0}})();return!o&&r.must&&(0,Hi.error)(`command ${t} not found`),i?.stop(),o}async load(){this.type=this.options.type??"core",this.tag=this.options.tag,this.isRoot=this.options.isRoot??!1,this.options.parent&&(this.parent=this.options.parent);let t=this.options.pjson&&this.options.isRoot?this.options.root:this.type==="link"&&!this.parent?this.options.root:await(0,K1.findRoot)(this.options.name,this.options.root);if(!t)throw new Hi.CLIError(`could not find package.json with ${(0,Fm.inspect)(this.options)}`);if(this.root=t,this._debug(`loading ${this.type} plugin from ${t}`),this.pjson=this.options.pjson??await(0,km.readJson)((0,ei.join)(t,"package.json")),this.flexibleTaxonomy=this.options?.flexibleTaxonomy||this.pjson.oclif?.flexibleTaxonomy||!1,this.moduleType=this.pjson.type==="module"?"module":"commonjs",this.name=this.pjson.name,this.alias=this.options.name??this.pjson.name,!this.name)throw new Hi.CLIError(`no name in package.json (${t})`);this._debug=(0,Bs.Debug)(this.name),this.version=this.pjson.version,this.pjson.oclif?this.valid=!0:this.pjson.oclif=this.pjson["cli-engine"]||{},this.hooks=Object.fromEntries(Object.entries(this.pjson.oclif.hooks??{}).map(([r,i])=>[r,(0,Tm.castArray)(i).map(n=>t_(n))])),this.commandDiscoveryOpts=e_(this.pjson.oclif?.commands,this.pjson.oclif?.default),this._debug("command discovery options",this.commandDiscoveryOpts),this.manifest=await this._manifest(),this.commands=Object.entries(this.manifest.commands).map(([r,i])=>({...i,load:async()=>this.findCommand(r,{must:!0}),pluginAlias:this.alias,pluginType:i.pluginType==="jit"?"jit":this.type})).sort((r,i)=>r.id.localeCompare(i.id))}async _manifest(){let t=!!this.options.ignoreManifest,r=!!this.options.errorOnManifestCreate,i=!!this.options.respectNoCacheDefault,n=async(c=!1)=>{try{let h=(0,ei.join)(this.root,`${c?".":""}oclif.manifest.json`),m=await(0,km.readJson)(h);if(!process.env.OCLIF_NEXT_VERSION&&m.version.split("-")[0]!==this.version.split("-")[0])process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${m.version}
135
+ `)}static get tree(){return ps.tree}static url(t,r,i={}){Pc().stdout?this.log(xS(t,r,i)):this.log(r)}static get wait(){return vS.default}};_.ux=Ri;var{action:wS,annotation:ES,anykey:bS,confirm:DS,debug:CS,done:SS,flush:AS,info:_S,log:FS,logToStderr:kS,progress:TS,prompt:OS,styledHeader:PS,styledJSON:IS,styledObject:NS,table:MS,trace:jS,tree:BS,url:RS,wait:LS}=Ri;_.action=wS;_.annotation=ES;_.anykey=bS;_.confirm=DS;_.debug=CS;_.done=SS;_.flush=AS;_.info=_S;_.log=FS;_.logToStderr=kS;_.progress=TS;_.prompt=OS;_.styledHeader=PS;_.styledJSON=IS;_.styledObject=NS;_.table=MS;_.trace=jS;_.tree=BS;_.url=RS;_.wait=LS;var{error:$S,exit:qS,warn:US}=gS;_.error=$S;_.exit=qS;_.warn=US;var Cp=async()=>{try{await Ri.done()}catch(e){console.error(e),process.exitCode=1}},HS=process.listeners("exit").find(e=>e.name===Cp.name);HS||process.once("exit",Cp);var zS=Ln();Object.defineProperty(_,"ActionBase",{enumerable:!0,get:function(){return zS.ActionBase}});var Sp=Un();Object.defineProperty(_,"Config",{enumerable:!0,get:function(){return Sp.Config}});Object.defineProperty(_,"config",{enumerable:!0,get:function(){return Sp.config}});var JS=bp();Object.defineProperty(_,"ExitError",{enumerable:!0,get:function(){return JS.ExitError}});var WS=_a();Object.defineProperty(_,"Table",{enumerable:!0,get:function(){return WS.Table}});var GS=er();Object.defineProperty(_,"colorize",{enumerable:!0,get:function(){return GS.colorize}});var XS=Ot();Object.defineProperty(_,"write",{enumerable:!0,get:function(){return ms(XS).default}})});var Ap=E(Vr=>{"use strict";y();Object.defineProperty(Vr,"__esModule",{value:!0});Vr.stderr=Vr.stdout=void 0;var gs=class{channel;constructor(t){this.channel=t}get isTTY(){return process[this.channel].isTTY}emit(t,...r){return process[this.channel].emit(t,...r)}getWindowSize(){return process[this.channel].getWindowSize()}on(t,r){return process[this.channel].on(t,r),this}once(t,r){return process[this.channel].once(t,r),this}read(){return process[this.channel].read()}write(t){return process[this.channel].write(t)}};Vr.stdout=new gs("stdout");Vr.stderr=new gs("stderr")});var Yr=E(Ee=>{"use strict";y();Object.defineProperty(Ee,"__esModule",{value:!0});Ee.Performance=Ee.OCLIF_MARKER_OWNER=void 0;var $i=F("node:perf_hooks"),VS=Pt();Ee.OCLIF_MARKER_OWNER="@oclif/core";var Ba=class{owner;name;details;method;module;scope;stopped=!1;startMarker;stopMarker;constructor(t,r,i={}){this.owner=t,this.name=r,this.details=i,this.startMarker=`${this.name}-start`,this.stopMarker=`${this.name}-stop`;let[n,o]=r.split("#"),[s,c]=n.split(".");this.module=s,this.method=c,this.scope=o,$i.performance.mark(this.startMarker)}addDetails(t){this.details={...this.details,...t}}measure(){$i.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,$i.performance.mark(this.stopMarker)}},Ra=class e{static _oclifPerf;static _results=new Map;static markers=new Map;static async collect(){if(!e.enabled||e._results.size>0)return;let t=[...e.markers.values()];if(t.length!==0){for(let r of t.filter(i=>!i.stopped))r.stop();return new Promise(r=>{new $i.PerformanceObserver(n=>{for(let f of n.getEntries()){let p=e.markers.get(f.name);if(p){let a={details:p.details,duration:f.duration,method:p.method,module:p.module,name:f.name,scope:p.scope},u=e._results.get(p.owner)??[];e._results.set(p.owner,[...u,a])}}let o=e._results.get(Ee.OCLIF_MARKER_OWNER)??[],s=o.find(f=>f.name.startsWith("config.runCommand")),c=s?e.getResult(Ee.OCLIF_MARKER_OWNER,`plugin.findCommand#${s.details.plugin}.${s.details.command}`)?.duration??0:0,h=Object.fromEntries(o.filter(({name:f})=>f.startsWith("plugin.load#")).sort((f,p)=>p.duration-f.duration).map(({details:f,duration:p,scope:a})=>[a,{details:f,duration:p}])),m=o.filter(({name:f})=>f.startsWith("config.runHook#")).reduce((f,p)=>{let a=p.details.event;if(a)f[a]||(f[a]={}),f[a][p.scope]=p.duration;else{let u=p.scope;f[u]||(f[u]={}),f[u].total=p.duration}return f},{}),d=Object.fromEntries(o.filter(({name:f})=>f.startsWith("config.loadPlugins#")).sort((f,p)=>p.duration-f.duration).map(({duration:f,scope:p})=>[p,f]));e._oclifPerf={hookRunTimes:m,"oclif.commandLoadMs":c,"oclif.commandRunMs":o.find(({name:f})=>f.startsWith("config.runCommand#"))?.duration??0,"oclif.configLoadMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"config.load")?.duration??0,"oclif.corePluginsLoadMs":d.core??0,"oclif.initHookMs":m.init?.total??0,"oclif.initMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"main.run#init")?.duration??0,"oclif.linkedPluginsLoadMs":d.link??0,"oclif.postrunHookMs":m.postrun?.total??0,"oclif.prerunHookMs":m.prerun?.total??0,"oclif.runMs":e.getResult(Ee.OCLIF_MARKER_OWNER,"main.run")?.duration??0,"oclif.userPluginsLoadMs":d.user??0,pluginLoadTimes:h},r()}).observe({buffered:!0,entryTypes:["measure"]});for(let n of t)try{n.measure()}catch{}$i.performance.clearMarks()})}}static debug(){if(!e.enabled)return;let t=et()("oclif-perf"),r=(process.uptime()*1e3).toFixed(4);t("Process Uptime: %sms",r),t("Oclif Time: %sms",e.oclifPerf["oclif.runMs"].toFixed(4)),t("Init Time: %sms",e.oclifPerf["oclif.initMs"].toFixed(4)),t("Config Load Time: %sms",e.oclifPerf["oclif.configLoadMs"].toFixed(4)),t(" \u2022 Root Plugin Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"plugin.load#root")?.duration.toFixed(4)??0),t(" \u2022 Plugins Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"config.loadAllPlugins")?.duration.toFixed(4)??0),t(" \u2022 Commands Load Time: %sms",e.getResult(Ee.OCLIF_MARKER_OWNER,"config.loadAllCommands")?.duration.toFixed(4)??0),t("Core Plugin Load Time: %sms",e.oclifPerf["oclif.corePluginsLoadMs"].toFixed(4)),t("User Plugin Load Time: %sms",e.oclifPerf["oclif.userPluginsLoadMs"].toFixed(4)),t("Linked Plugin Load Time: %sms",e.oclifPerf["oclif.linkedPluginsLoadMs"].toFixed(4)),t("Plugin Load Times:");for(let[o,s]of Object.entries(e.oclifPerf.pluginLoadTimes))s.details.hasManifest?t(` ${o}: ${s.duration.toFixed(4)}ms`):t(` ${o}: ${s.duration.toFixed(4)}ms (no manifest!)`);t("Hook Run Times:");for(let[o,s]of Object.entries(e.oclifPerf.hookRunTimes)){t(` ${o}:`);for(let[c,h]of Object.entries(s))t(` ${c}: ${h.toFixed(4)}ms`)}t("Command Load Time: %sms",e.oclifPerf["oclif.commandLoadMs"].toFixed(4)),t("Command Run Time: %sms",e.oclifPerf["oclif.commandRunMs"].toFixed(4)),e.oclifPerf["oclif.configLoadMs"]>e.oclifPerf["oclif.runMs"]&&t("! Config load time is greater than total oclif time. This might mean that Config was instantiated before oclif was run.");let i=et()("non-oclif-perf"),n=e.results;if(n.size>0){i("Non-Core Performance Measurements:");for(let[o,s]of n){i(` ${o}:`);for(let c of s)i(` ${c.name}: ${c.duration.toFixed(4)}ms`)}}}static get enabled(){return VS.settings.performanceEnabled??!1}static getResult(t,r){return e._results.get(t)?.find(i=>i.name===r)}static mark(t,r,i={}){if(!e.enabled)return;let n=new Ba(t,r,i);return e.markers.set(n.name,n),n}static get oclifPerf(){if(!e.enabled)return{};if(e._oclifPerf)return e._oclifPerf;throw new Error("Perf results not available. Did you forget to call await Performance.collect()?")}static get results(){return e.enabled?new Map([...e._results.entries()].filter(([t])=>t!==Ee.OCLIF_MARKER_OWNER)):new Map}};Ee.Performance=Ra});var Fp=E(Kr=>{"use strict";y();Object.defineProperty(Kr,"__esModule",{value:!0});Kr.getPlatform=Kr.getHomeDir=void 0;var _p=F("node:os");function YS(){return(0,_p.homedir)()}Kr.getHomeDir=YS;function KS(){return(0,_p.platform)()}Kr.getPlatform=KS});var kp=E(ys=>{"use strict";y();Object.defineProperty(ys,"__esModule",{value:!0});ys.assertValidPattern=void 0;var QS=1024*64,ZS=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>QS)throw new TypeError("pattern is too long")};ys.assertValidPattern=ZS});var Op=E(vs=>{"use strict";y();Object.defineProperty(vs,"__esModule",{value:!0});vs.parseClass=void 0;var eA={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},qi=e=>e.replace(/[[\]\\-]/g,"\\$&"),tA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Tp=e=>e.join(""),rA=(e,t)=>{let r=t;if(e.charAt(r)!=="[")throw new Error("not in a brace expression");let i=[],n=[],o=r+1,s=!1,c=!1,h=!1,m=!1,d=r,f="";e:for(;o<e.length;){let l=e.charAt(o);if((l==="!"||l==="^")&&o===r+1){m=!0,o++;continue}if(l==="]"&&s&&!h){d=o+1;break}if(s=!0,l==="\\"&&!h){h=!0,o++;continue}if(l==="["&&!h){for(let[g,[v,x,w]]of Object.entries(eA))if(e.startsWith(g,o)){if(f)return["$.",!1,e.length-r,!0];o+=g.length,w?n.push(v):i.push(v),c=c||x;continue e}}if(h=!1,f){l>f?i.push(qi(f)+"-"+qi(l)):l===f&&i.push(qi(l)),f="",o++;continue}if(e.startsWith("-]",o+1)){i.push(qi(l+"-")),o+=2;continue}if(e.startsWith("-",o+1)){f=l,o+=2;continue}i.push(qi(l)),o++}if(d<o)return["",!1,0,!1];if(!i.length&&!n.length)return["$.",!1,e.length-r,!0];if(n.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!m){let l=i[0].length===2?i[0].slice(-1):i[0];return[tA(l),!1,d-r,!1]}let p="["+(m?"^":"")+Tp(i)+"]",a="["+(m?"":"^")+Tp(n)+"]";return[i.length&&n.length?"("+p+"|"+a+")":i.length?p:a,c,d-r,!0]};vs.parseClass=rA});var ws=E(xs=>{"use strict";y();Object.defineProperty(xs,"__esModule",{value:!0});xs.unescape=void 0;var iA=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");xs.unescape=iA});var qa=E(Cs=>{"use strict";y();var _e;Object.defineProperty(Cs,"__esModule",{value:!0});Cs.AST=void 0;var nA=Op(),Es=ws(),sA=new Set(["!","?","+","*","@"]),La=e=>sA.has(e),Pp=e=>La(e.type),oA=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),aA=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),uA=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Ip=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),cA="(?!(?:^|/)\\.\\.?(?:$|/))",bs="(?!\\.)",lA=new Set(["[","."]),hA=new Set(["..","."]),fA=new Set("().*{}+?[]^$\\!"),dA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),$a="[^/]",Np=$a+"*?",Mp=$a+"+?",Ds=class{type;#r;#i;#n=!1;#e=[];#t;#a;#c;#u=!1;#s;#o;#l=!1;constructor(t,r,i={}){this.type=t,t&&(this.#i=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?i:this.#r.#s,this.#c=this.#r===this?[]:this.#r.#c,t==="!"&&!this.#r.#u&&this.#c.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#o=this.#e.map(t=>String(t)).join("")}#y(){if(this!==this.#r)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let r=t,i=r.#t;for(;i;){for(let n=r.#a+1;!i.type&&n<i.#e.length;n++)for(let o of t.#e){if(typeof o=="string")throw new Error("string part in extglob AST??");o.copyIn(i.#e[n])}r=i,i=r.#t}}return this}push(...t){for(let r of t)if(r!==""){if(typeof r!="string"&&!(r instanceof _e&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let t=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let t=this.#t;for(let r=0;r<this.#a;r++){let i=t.#e[r];if(!(i instanceof _e&&i.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let r=new _e(this.type,t);for(let i of this.#e)r.copyIn(i);return r}static#h(t,r,i,n,o){let s=n.maxExtglobRecursion??2,c=!1,h=!1,m=-1,d=!1;if(r.type===null){let l=i,g="";for(;l<t.length;){let v=t.charAt(l++);if(c||v==="\\"){c=!c,g+=v;continue}if(h){l===m+1?(v==="^"||v==="!")&&(d=!0):v==="]"&&!(l===m+2&&d)&&(h=!1),g+=v;continue}else if(v==="["){h=!0,m=l,d=!1,g+=v;continue}if(!n.noext&&La(v)&&t.charAt(l)==="("&&o<=s){r.push(g),g="";let w=new _e(v,r);l=_e.#h(t,w,l,n,o+1),r.push(w);continue}g+=v}return r.push(g),l}let f=i+1,p=new _e(null,r),a=[],u="";for(;f<t.length;){let l=t.charAt(f++);if(c||l==="\\"){c=!c,u+=l;continue}if(h){f===m+1?(l==="^"||l==="!")&&(d=!0):l==="]"&&!(f===m+2&&d)&&(h=!1),u+=l;continue}else if(l==="["){h=!0,m=f,d=!1,u+=l;continue}if(La(l)&&t.charAt(f)==="("&&(o<=s||r&&r.#f(l))){let v=r&&r.#f(l)?0:1;p.push(u),u="";let x=new _e(l,p);p.push(x),f=_e.#h(t,x,f,n,o+v);continue}if(l==="|"){p.push(u),u="",a.push(p),p=new _e(null,r);continue}if(l===")")return u===""&&r.#e.length===0&&(r.#l=!0),p.push(u),u="",r.push(...a,p),f;u+=l}return r.type=null,r.#i=void 0,r.#e=[t.substring(i-1)],f}#v(t){return this.#p(t,aA)}#p(t,r=oA){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let i=t.#e[0];return!i||typeof i!="object"||i.type===null?!1:this.#f(i.type,r)}#f(t,r=uA){return!!r.get(this.type)?.includes(t)}#x(t,r){let i=t.#e[0],n=new _e(null,i,this.options);n.#e.push(""),i.push(n),this.#m(t,r)}#m(t,r){let i=t.#e[0];this.#e.splice(r,1,...i.#e);for(let n of i.#e)typeof n=="object"&&(n.#t=this);this.#o=void 0}#w(t){return!!Ip.get(this.type)?.has(t)}#E(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#w(r.type)}#b(t){let r=Ip.get(this.type),i=t.#e[0],n=r?.get(i.type);if(!n)return!1;this.#e=i.#e;for(let o of this.#e)typeof o=="object"&&(o.#t=this);this.type=n,this.#o=void 0,this.#l=!1}#d(){if(Pp(this)){let t=0,r=!1;do{r=!0;for(let i=0;i<this.#e.length;i++){let n=this.#e[i];typeof n=="object"&&(n.#d(),this.#p(n)?(r=!1,this.#m(n,i)):this.#v(n)?(r=!1,this.#x(n,i)):this.#E(n)&&(r=!1,this.#b(n)))}}while(!r&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#d();this.#o=void 0}static fromGlob(t,r={}){let i=new _e(null,void 0,r);return _e.#h(t,i,0,r,0),i}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let t=this.toString(),[r,i,n,o]=this.toRegExpSource();if(!(n||this.#i||this.#s.nocase&&!this.#s.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;let c=(this.#s.nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${r}$`,c),{_src:r,_glob:t})}get options(){return this.#s}toRegExpSource(t){let r=t??!!this.#s.dot;if(this.#r===this&&(this.#d(),this.#y()),!Pp(this)){let h=this.isStart()&&this.isEnd(),m=this.#e.map(a=>{let[u,l,g,v]=typeof a=="string"?_e.#D(a,this.#i,h):a.toRegExpSource(t);return this.#i=this.#i||g,this.#n=this.#n||v,u}).join(""),d="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&hA.has(this.#e[0]))){let u=lA,l=r&&u.has(m.charAt(0))||m.startsWith("\\.")&&u.has(m.charAt(2))||m.startsWith("\\.\\.")&&u.has(m.charAt(4)),g=!r&&!t&&u.has(m.charAt(0));d=l?cA:g?bs:""}let f="";return this.isEnd()&&this.#r.#u&&this.#t?.type==="!"&&(f="(?:$|\\/)"),[d+m+f,(0,Es.unescape)(m),this.#i=!!this.#i,this.#n]}let i=this.type==="*"||this.type==="+",n=this.type==="!"?"(?:(?!(?:":"(?:",o=this.#g(r);if(this.isStart()&&this.isEnd()&&!o&&this.type!=="!"){let h=this.toString(),m=this;return m.#e=[h],m.type=null,m.#i=void 0,[h,(0,Es.unescape)(this.toString()),!1,!1]}let s=!i||t||r||!bs?"":this.#g(!0);s===o&&(s=""),s&&(o=`(?:${o})(?:${s})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!r?bs:"")+Mp;else{let h=this.type==="!"?"))"+(this.isStart()&&!r&&!t?bs:"")+Np+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;c=n+o+h}return[c,(0,Es.unescape)(o),this.#i=!!this.#i,this.#n]}#g(t){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[i,n,o,s]=r.toRegExpSource(t);return this.#n=this.#n||s,i}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#D(t,r,i=!1){let n=!1,o="",s=!1,c=!1;for(let h=0;h<t.length;h++){let m=t.charAt(h);if(n){n=!1,o+=(fA.has(m)?"\\":"")+m,c=!1;continue}if(m==="\\"){h===t.length-1?o+="\\\\":n=!0;continue}if(m==="["){let[d,f,p,a]=(0,nA.parseClass)(t,h);if(p){o+=d,s=s||f,h+=p-1,r=r||a,c=!1;continue}}if(m==="*"){if(c)continue;c=!0,o+=i&&/^[*]+$/.test(t)?Mp:Np,r=!0;continue}else c=!1;if(m==="?"){o+=$a,r=!0;continue}o+=dA(m)}return[o,(0,Es.unescape)(t),!!r,s]}};Cs.AST=Ds;_e=Ds});var Ua=E(Ss=>{"use strict";y();Object.defineProperty(Ss,"__esModule",{value:!0});Ss.escape=void 0;var pA=(e,{windowsPathsNoEscape:t=!1}={})=>t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");Ss.escape=pA});var Up=E(k=>{"use strict";y();var mA=k&&k.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(k,"__esModule",{value:!0});k.unescape=k.escape=k.AST=k.Minimatch=k.match=k.makeRe=k.braceExpand=k.defaults=k.filter=k.GLOBSTAR=k.sep=k.minimatch=void 0;var gA=mA(uy()),As=kp(),Rp=qa(),yA=Ua(),vA=ws(),xA=(e,t,r={})=>((0,As.assertValidPattern)(t),!r.nocomment&&t.charAt(0)==="#"?!1:new fr(t,r).match(e));k.minimatch=xA;var wA=/^\*+([^+@!?\*\[\(]*)$/,EA=e=>t=>!t.startsWith(".")&&t.endsWith(e),bA=e=>t=>t.endsWith(e),DA=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),CA=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),SA=/^\*+\.\*+$/,AA=e=>!e.startsWith(".")&&e.includes("."),_A=e=>e!=="."&&e!==".."&&e.includes("."),FA=/^\.\*+$/,kA=e=>e!=="."&&e!==".."&&e.startsWith("."),TA=/^\*+$/,OA=e=>e.length!==0&&!e.startsWith("."),PA=e=>e.length!==0&&e!=="."&&e!=="..",IA=/^\?+([^+@!?\*\[\(]*)?$/,NA=([e,t=""])=>{let r=Lp([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},MA=([e,t=""])=>{let r=$p([e]);return t?(t=t.toLowerCase(),i=>r(i)&&i.toLowerCase().endsWith(t)):r},jA=([e,t=""])=>{let r=$p([e]);return t?i=>r(i)&&i.endsWith(t):r},BA=([e,t=""])=>{let r=Lp([e]);return t?i=>r(i)&&i.endsWith(t):r},Lp=([e])=>{let t=e.length;return r=>r.length===t&&!r.startsWith(".")},$p=([e])=>{let t=e.length;return r=>r.length===t&&r!=="."&&r!==".."},qp=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",jp={win32:{sep:"\\"},posix:{sep:"/"}};k.sep=qp==="win32"?jp.win32.sep:jp.posix.sep;k.minimatch.sep=k.sep;k.GLOBSTAR=Symbol("globstar **");k.minimatch.GLOBSTAR=k.GLOBSTAR;var RA="[^/]",LA=RA+"*?",$A="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",qA="(?:(?!(?:\\/|^)\\.).)*?",UA=(e,t={})=>r=>(0,k.minimatch)(r,e,t);k.filter=UA;k.minimatch.filter=k.filter;var qe=(e,t={})=>Object.assign({},e,t),HA=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return k.minimatch;let t=k.minimatch;return Object.assign((i,n,o={})=>t(i,n,qe(e,o)),{Minimatch:class extends t.Minimatch{constructor(n,o={}){super(n,qe(e,o))}static defaults(n){return t.defaults(qe(e,n)).Minimatch}},AST:class extends t.AST{constructor(n,o,s={}){super(n,o,qe(e,s))}static fromGlob(n,o={}){return t.AST.fromGlob(n,qe(e,o))}},unescape:(i,n={})=>t.unescape(i,qe(e,n)),escape:(i,n={})=>t.escape(i,qe(e,n)),filter:(i,n={})=>t.filter(i,qe(e,n)),defaults:i=>t.defaults(qe(e,i)),makeRe:(i,n={})=>t.makeRe(i,qe(e,n)),braceExpand:(i,n={})=>t.braceExpand(i,qe(e,n)),match:(i,n,o={})=>t.match(i,n,qe(e,o)),sep:t.sep,GLOBSTAR:k.GLOBSTAR})};k.defaults=HA;k.minimatch.defaults=k.defaults;var zA=(e,t={})=>((0,As.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,gA.default)(e));k.braceExpand=zA;k.minimatch.braceExpand=k.braceExpand;var JA=(e,t={})=>new fr(e,t).makeRe();k.makeRe=JA;k.minimatch.makeRe=k.makeRe;var WA=(e,t,r={})=>{let i=new fr(t,r);return e=e.filter(n=>i.match(n)),i.options.nonull&&!e.length&&e.push(t),e};k.match=WA;k.minimatch.match=k.match;var Bp=/[?*]|[+@!]\(.*?\)|\[|\]/,GA=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fr=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,r={}){(0,As.assertValidPattern)(t),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=t,this.platform=r.platform||qp,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let r of t)if(typeof r!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,r=this.options;if(!r.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...o)=>console.error(...o)),this.debug(this.pattern,this.globSet);let i=this.globSet.map(o=>this.slashSplit(o));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let n=this.globParts.map((o,s,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let h=o[0]===""&&o[1]===""&&(o[2]==="?"||!Bp.test(o[2]))&&!Bp.test(o[3]),m=/^[a-z]:/i.test(o[0]);if(h)return[...o.slice(0,4),...o.slice(4).map(d=>this.parse(d))];if(m)return[o[0],...o.slice(1).map(d=>this.parse(d))]}return o.map(h=>this.parse(h))});if(this.debug(this.pattern,n),this.set=n.filter(o=>o.indexOf(!1)===-1),this.isWindows)for(let o=0;o<this.set.length;o++){let s=this.set[o];s[0]===""&&s[1]===""&&this.globParts[o][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let i=0;i<t.length;i++)for(let n=0;n<t[i].length;n++)t[i][n]==="**"&&(t[i][n]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):r>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(r=>{let i=-1;for(;(i=r.indexOf("**",i+1))!==-1;){let n=i;for(;r[n+1]==="**";)n++;n!==i&&r.splice(i,n-i)}return r})}levelOneOptimize(t){return t.map(r=>(r=r.reduce((i,n)=>{let o=i[i.length-1];return n==="**"&&o==="**"?i:n===".."&&o&&o!==".."&&o!=="."&&o!=="**"?(i.pop(),i):(i.push(n),i)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){let o=t[n];n===1&&o===""&&t[0]===""||(o==="."||o==="")&&(r=!0,t.splice(n,1),n--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(r=!0,t.pop())}let i=0;for(;(i=t.indexOf("..",i+1))!==-1;){let n=t[i-1];n&&n!=="."&&n!==".."&&n!=="**"&&(r=!0,t.splice(i-1,2),i-=2)}}while(r);return t.length===0?[""]:t}firstPhasePreProcess(t){let r=!1;do{r=!1;for(let i of t){let n=-1;for(;(n=i.indexOf("**",n+1))!==-1;){let s=n;for(;i[s+1]==="**";)s++;s>n&&i.splice(n+1,s-n);let c=i[n+1],h=i[n+2],m=i[n+3];if(c!==".."||!h||h==="."||h===".."||!m||m==="."||m==="..")continue;r=!0,i.splice(n,1);let d=i.slice(0);d[n]="**",t.push(d),n--}if(!this.preserveMultipleSlashes){for(let s=1;s<i.length-1;s++){let c=i[s];s===1&&c===""&&i[0]===""||(c==="."||c==="")&&(r=!0,i.splice(s,1),s--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(r=!0,i.pop())}let o=0;for(;(o=i.indexOf("..",o+1))!==-1;){let s=i[o-1];if(s&&s!=="."&&s!==".."&&s!=="**"){r=!0;let h=o===1&&i[o+1]==="**"?["."]:[];i.splice(o-1,2,...h),i.length===0&&i.push(""),o-=2}}}}while(r);return t}secondPhasePreProcess(t){for(let r=0;r<t.length-1;r++)for(let i=r+1;i<t.length;i++){let n=this.partsMatch(t[r],t[i],!this.preserveMultipleSlashes);if(n){t[r]=[],t[i]=n;break}}return t.filter(r=>r.length)}partsMatch(t,r,i=!1){let n=0,o=0,s=[],c="";for(;n<t.length&&o<r.length;)if(t[n]===r[o])s.push(c==="b"?r[o]:t[n]),n++,o++;else if(i&&t[n]==="**"&&r[o]===t[n+1])s.push(t[n]),n++;else if(i&&r[o]==="**"&&t[n]===r[o+1])s.push(r[o]),o++;else if(t[n]==="*"&&r[o]&&(this.options.dot||!r[o].startsWith("."))&&r[o]!=="**"){if(c==="b")return!1;c="a",s.push(t[n]),n++,o++}else if(r[o]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="a")return!1;c="b",s.push(r[o]),n++,o++}else return!1;return t.length===r.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,r=!1,i=0;for(let n=0;n<t.length&&t.charAt(n)==="!";n++)r=!r,i++;i&&(this.pattern=t.slice(i)),this.negate=r}matchOne(t,r,i=!1){let n=0,o=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),h=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),m=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),d=!m&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=h?3:c?0:void 0,p=d?3:m?0:void 0;if(typeof f=="number"&&typeof p=="number"){let[a,u]=[t[f],r[p]];a.toLowerCase()===u.toLowerCase()&&(r[p]=a,o=p,n=f)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),r.includes(k.GLOBSTAR)?this.#r(t,r,i,n,o):this.#n(t,r,i,n,o)}#r(t,r,i,n,o){let s=r.indexOf(k.GLOBSTAR,o),c=r.lastIndexOf(k.GLOBSTAR),[h,m,d]=i?[r.slice(o,s),r.slice(s+1),[]]:[r.slice(o,s),r.slice(s+1,c),r.slice(c+1)];if(h.length){let x=t.slice(n,n+h.length);if(!this.#n(x,h,i,0,0))return!1;n+=h.length}let f=0;if(d.length){if(d.length+n>t.length)return!1;let x=t.length-d.length;if(this.#n(t,d,i,x,0))f=d.length;else{if(t[t.length-1]!==""||n+d.length===t.length||(x--,!this.#n(t,d,i,x,0)))return!1;f=d.length+1}}if(!m.length){let x=!!f;for(let w=n;w<t.length-f;w++){let C=String(t[w]);if(x=!0,C==="."||C===".."||!this.options.dot&&C.startsWith("."))return!1}return i||x}let p=[[[],0]],a=p[0],u=0,l=[0];for(let x of m)x===k.GLOBSTAR?(l.push(u),a=[[],0],p.push(a)):(a[0].push(x),u++);let g=p.length-1,v=t.length-f;for(let x of p)x[1]=v-(l[g--]+x[0].length);return!!this.#i(t,p,n,0,i,0,!!f)}#i(t,r,i,n,o,s,c){let h=r[n];if(!h){for(let f=i;f<t.length;f++){c=!0;let p=t[f];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return c}let[m,d]=h;for(;i<=d;){if(this.#n(t.slice(0,i+m.length),m,o,i,0)&&s<this.maxGlobstarRecursion){let a=this.#i(t,r,i+m.length,n+1,o,s+1,c);if(a!==!1)return a}let p=t[i];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;i++}return o||null}#n(t,r,i,n,o){let s,c,h,m;for(s=n,c=o,m=t.length,h=r.length;s<m&&c<h;s++,c++){this.debug("matchOne loop");let d=r[c],f=t[s];if(this.debug(r,d,f),d===!1||d===k.GLOBSTAR)return!1;let p;if(typeof d=="string"?(p=f===d,this.debug("string match",d,f,p)):(p=d.test(f),this.debug("pattern match",d,f,p)),!p)return!1}if(s===m&&c===h)return!0;if(s===m)return i;if(c===h)return s===m-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,k.braceExpand)(this.pattern,this.options)}parse(t){(0,As.assertValidPattern)(t);let r=this.options;if(t==="**")return k.GLOBSTAR;if(t==="")return"";let i,n=null;(i=t.match(TA))?n=r.dot?PA:OA:(i=t.match(wA))?n=(r.nocase?r.dot?CA:DA:r.dot?bA:EA)(i[1]):(i=t.match(IA))?n=(r.nocase?r.dot?MA:NA:r.dot?jA:BA)(i):(i=t.match(SA))?n=r.dot?_A:AA:(i=t.match(FA))&&(n=kA);let o=Rp.AST.fromGlob(t,this.options).toMMPattern();return n&&typeof o=="object"&&Reflect.defineProperty(o,"test",{value:n}),o}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let r=this.options,i=r.noglobstar?LA:r.dot?$A:qA,n=new Set(r.nocase?["i"]:[]),o=t.map(h=>{let m=h.map(d=>{if(d instanceof RegExp)for(let f of d.flags.split(""))n.add(f);return typeof d=="string"?GA(d):d===k.GLOBSTAR?k.GLOBSTAR:d._src});return m.forEach((d,f)=>{let p=m[f+1],a=m[f-1];d!==k.GLOBSTAR||a===k.GLOBSTAR||(a===void 0?p!==void 0&&p!==k.GLOBSTAR?m[f+1]="(?:\\/|"+i+"\\/)?"+p:m[f]=i:p===void 0?m[f-1]=a+"(?:\\/|"+i+")?":p!==k.GLOBSTAR&&(m[f-1]=a+"(?:\\/|\\/"+i+"\\/)"+p,m[f+1]=k.GLOBSTAR))}),m.filter(d=>d!==k.GLOBSTAR).join("/")}).join("|"),[s,c]=t.length>1?["(?:",")"]:["",""];o="^"+s+o+c+"$",this.negate&&(o="^(?!"+o+").+$");try{this.regexp=new RegExp(o,[...n].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,r=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&r)return!0;let i=this.options;this.isWindows&&(t=t.split("\\").join("/"));let n=this.slashSplit(t);this.debug(this.pattern,"split",n);let o=this.set;this.debug(this.pattern,"set",o);let s=n[n.length-1];if(!s)for(let c=n.length-2;!s&&c>=0;c--)s=n[c];for(let c=0;c<o.length;c++){let h=o[c],m=n;if(i.matchBase&&h.length===1&&(m=[s]),this.matchOne(m,h,r))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(t){return k.minimatch.defaults(t).Minimatch}};k.Minimatch=fr;var XA=qa();Object.defineProperty(k,"AST",{enumerable:!0,get:function(){return XA.AST}});var VA=Ua();Object.defineProperty(k,"escape",{enumerable:!0,get:function(){return VA.escape}});var YA=ws();Object.defineProperty(k,"unescape",{enumerable:!0,get:function(){return YA.unescape}});k.minimatch.AST=Rp.AST;k.minimatch.Minimatch=fr;k.minimatch.escape=yA.escape;k.minimatch.unescape=vA.unescape});var zp=E((RI,Hp)=>{"use strict";y();Hp.exports=(...e)=>[...new Set([].concat(...e))]});var Wp=E(dr=>{"use strict";y();var{promisify:KA}=F("util"),Jp=F("fs");async function Ha(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return(await KA(Jp[e])(r))[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}function za(e,t,r){if(typeof r!="string")throw new TypeError(`Expected a string, got ${typeof r}`);try{return Jp[e](r)[t]()}catch(i){if(i.code==="ENOENT")return!1;throw i}}dr.isFile=Ha.bind(null,"stat","isFile");dr.isDirectory=Ha.bind(null,"stat","isDirectory");dr.isSymlink=Ha.bind(null,"lstat","isSymbolicLink");dr.isFileSync=za.bind(null,"statSync","isFile");dr.isDirectorySync=za.bind(null,"statSync","isDirectory");dr.isSymlinkSync=za.bind(null,"lstatSync","isSymbolicLink")});var Kp=E((UI,Ja)=>{"use strict";y();var pr=F("path"),Gp=Wp(),Xp=e=>e.length>1?`{${e.join(",")}}`:e[0],Vp=(e,t)=>{let r=e[0]==="!"?e.slice(1):e;return pr.isAbsolute(r)?r:pr.join(t,r)},QA=(e,t)=>pr.extname(e)?`**/${e}`:`**/${e}.${Xp(t)}`,Yp=(e,t)=>{if(t.files&&!Array.isArray(t.files))throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof t.files}\``);if(t.extensions&&!Array.isArray(t.extensions))throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof t.extensions}\``);return t.files&&t.extensions?t.files.map(r=>pr.posix.join(e,QA(r,t.extensions))):t.files?t.files.map(r=>pr.posix.join(e,`**/${r}`)):t.extensions?[pr.posix.join(e,`**/*.${Xp(t.extensions)}`)]:[pr.posix.join(e,"**")]};Ja.exports=async(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=await Promise.all([].concat(e).map(async i=>await Gp.isDirectory(Vp(i,t.cwd))?Yp(i,t):i));return[].concat.apply([],r)};Ja.exports.sync=(e,t)=>{if(t={cwd:process.cwd(),...t},typeof t.cwd!="string")throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof t.cwd}\``);let r=[].concat(e).map(i=>Gp.isDirectorySync(Vp(i,t.cwd))?Yp(i,t):i);return[].concat.apply([],r)}});var om=E((zI,sm)=>{y();function Qp(e){return Array.isArray(e)?e:[e]}var Xa="",Zp=" ",Wa="\\",ZA=/^\s+$/,e1=/(?:[^\\]|^)\\$/,t1=/^\\!/,r1=/^\\#/,i1=/\r?\n/g,n1=/^\.*\/|^\.+$/,Ga="/",rm="node-ignore";typeof Symbol<"u"&&(rm=Symbol.for("node-ignore"));var em=rm,s1=(e,t,r)=>Object.defineProperty(e,t,{value:r}),o1=/([0-z])-([0-z])/g,im=()=>!1,a1=e=>e.replace(o1,(t,r,i)=>r.charCodeAt(0)<=i.charCodeAt(0)?t:Xa),u1=e=>{let{length:t}=e;return e.slice(0,t-t%2)},c1=[[/^\uFEFF/,()=>Xa],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,r)=>t+(r.indexOf("\\")===0?Zp:Xa)],[/(\\+?)\s/g,(e,t)=>{let{length:r}=t;return t.slice(0,r-r%2)+Zp}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,r)=>t+6<r.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,r)=>{let i=r.replace(/\\\*/g,"[^\\/]*");return t+i}],[/\\\\\\(?=[$.|*+(){^])/g,()=>Wa],[/\\\\/g,()=>Wa],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,r,i,n)=>t===Wa?`\\[${r}${u1(i)}${n}`:n==="]"&&i.length%2===0?`[${a1(r)}${i}]`:"[]"],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:"[^/]*"}(?=$|\\/$)`]],tm=Object.create(null),l1=(e,t)=>{let r=tm[e];return r||(r=c1.reduce((i,[n,o])=>i.replace(n,o.bind(e)),e),tm[e]=r),t?new RegExp(r,"i"):new RegExp(r)},Ka=e=>typeof e=="string",h1=e=>e&&Ka(e)&&!ZA.test(e)&&!e1.test(e)&&e.indexOf("#")!==0,f1=e=>e.split(i1),Va=class{constructor(t,r,i,n){this.origin=t,this.pattern=r,this.negative=i,this.regex=n}},d1=(e,t)=>{let r=e,i=!1;e.indexOf("!")===0&&(i=!0,e=e.substr(1)),e=e.replace(t1,"!").replace(r1,"#");let n=l1(e,t);return new Va(r,e,i,n)},p1=(e,t)=>{throw new t(e)},Et=(e,t,r)=>Ka(e)?e?Et.isNotRelative(e)?r(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):!0:r("path must not be empty",TypeError):r(`path must be a string, but got \`${t}\``,TypeError),nm=e=>n1.test(e);Et.isNotRelative=nm;Et.convert=e=>e;var Ya=class{constructor({ignorecase:t=!0,ignoreCase:r=t,allowRelativePaths:i=!1}={}){s1(this,em,!0),this._rules=[],this._ignoreCase=r,this._allowRelativePaths=i,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[em]){this._rules=this._rules.concat(t._rules),this._added=!0;return}if(h1(t)){let r=d1(t,this._ignoreCase);this._added=!0,this._rules.push(r)}}add(t){return this._added=!1,Qp(Ka(t)?f1(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,r){let i=!1,n=!1;return this._rules.forEach(o=>{let{negative:s}=o;if(n===s&&i!==n||s&&!i&&!n&&!r)return;o.regex.test(t)&&(i=!s,n=s)}),{ignored:i,unignored:n}}_test(t,r,i,n){let o=t&&Et.convert(t);return Et(o,t,this._allowRelativePaths?im:p1),this._t(o,r,i,n)}_t(t,r,i,n){if(t in r)return r[t];if(n||(n=t.split(Ga)),n.pop(),!n.length)return r[t]=this._testOne(t,i);let o=this._t(n.join(Ga)+Ga,r,i,n);return r[t]=o.ignored?o:this._testOne(t,i)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return Qp(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}},_s=e=>new Ya(e),m1=e=>Et(e&&Et.convert(e),e,im);_s.isPathValid=m1;_s.default=_s;sm.exports=_s;if(typeof process<"u"&&(process.env&&process.env.IGNORE_TEST_WIN32||process.platform==="win32")){let e=r=>/^\\\\\?\\/.test(r)||/["<>|\u0000-\u001F]+/u.test(r)?r:r.replace(/\\/g,"/");Et.convert=e;let t=/^[a-z]:\//i;Et.isNotRelative=r=>t.test(r)||nm(r)}});var um=E((WI,am)=>{"use strict";y();am.exports=e=>{let t=/^\\\\\?\\/.test(e),r=/[^\u0000-\u0080]+/.test(e);return t||r?e:e.replace(/\\/g,"/")}});var mm=E((XI,Qa)=>{"use strict";y();var{promisify:g1}=F("util"),cm=F("fs"),bt=F("path"),lm=gc(),y1=om(),Ui=um(),hm=["**/node_modules/**","**/flow-typed/**","**/coverage/**","**/.git"],v1=g1(cm.readFile),x1=e=>t=>t.startsWith("!")?"!"+bt.posix.join(e,t.slice(1)):bt.posix.join(e,t),w1=(e,t)=>{let r=Ui(bt.relative(t.cwd,bt.dirname(t.fileName)));return e.split(/\r?\n/).filter(Boolean).filter(i=>!i.startsWith("#")).map(x1(r))},fm=e=>{let t=y1();for(let r of e)t.add(w1(r.content,{cwd:r.cwd,fileName:r.filePath}));return t},E1=(e,t)=>{if(e=Ui(e),bt.isAbsolute(t)){if(Ui(t).startsWith(e))return t;throw new Error(`Path ${t} is not in cwd ${e}`)}return bt.join(e,t)},dm=(e,t)=>r=>e.ignores(Ui(bt.relative(t,E1(t,r.path||r)))),b1=async(e,t)=>{let r=bt.join(t,e),i=await v1(r,"utf8");return{cwd:t,filePath:r,content:i}},D1=(e,t)=>{let r=bt.join(t,e),i=cm.readFileSync(r,"utf8");return{cwd:t,filePath:r,content:i}},pm=({ignore:e=[],cwd:t=Ui(process.cwd())}={})=>({ignore:e,cwd:t});Qa.exports=async e=>{e=pm(e);let t=await lm("**/.gitignore",{ignore:hm.concat(e.ignore),cwd:e.cwd}),r=await Promise.all(t.map(n=>b1(n,e.cwd))),i=fm(r);return dm(i,e.cwd)};Qa.exports.sync=e=>{e=pm(e);let r=lm.sync("**/.gitignore",{ignore:hm.concat(e.ignore),cwd:e.cwd}).map(n=>D1(n,e.cwd)),i=fm(r);return dm(i,e.cwd)}});var ym=E((YI,gm)=>{"use strict";y();var{Transform:C1}=F("stream"),Fs=class extends C1{constructor(){super({objectMode:!0})}},Za=class extends Fs{constructor(t){super(),this._filter=t}_transform(t,r,i){this._filter(t)&&this.push(t),i()}},eu=class extends Fs{constructor(){super(),this._pushed=new Set}_transform(t,r,i){this._pushed.has(t)||(this.push(t),this._pushed.add(t)),i()}};gm.exports={FilterStream:Za,UniqueStream:eu}});var bm=E((QI,mr)=>{"use strict";y();var xm=F("fs"),ks=zp(),S1=cy(),Ts=gc(),Os=Kp(),tu=mm(),{FilterStream:A1,UniqueStream:_1}=ym(),wm=()=>!1,vm=e=>e[0]==="!",F1=e=>{if(!e.every(t=>typeof t=="string"))throw new TypeError("Patterns must be a string or an array of strings")},k1=(e={})=>{if(!e.cwd)return;let t;try{t=xm.statSync(e.cwd)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},T1=e=>e.stats instanceof xm.Stats?e.path:e,Ps=(e,t)=>{e=ks([].concat(e)),F1(e),k1(t);let r=[];t={ignore:[],expandDirectories:!0,...t};for(let[i,n]of e.entries()){if(vm(n))continue;let o=e.slice(i).filter(c=>vm(c)).map(c=>c.slice(1)),s={...t,ignore:t.ignore.concat(o)};r.push({pattern:n,options:s})}return r},O1=(e,t)=>{let r={};return e.options.cwd&&(r.cwd=e.options.cwd),Array.isArray(e.options.expandDirectories)?r={...r,files:e.options.expandDirectories}:typeof e.options.expandDirectories=="object"&&(r={...r,...e.options.expandDirectories}),t(e.pattern,r)},ru=(e,t)=>e.options.expandDirectories?O1(e,t):[e.pattern],Em=e=>e&&e.gitignore?tu.sync({cwd:e.cwd,ignore:e.ignore}):wm,iu=e=>t=>{let{options:r}=e;return r.ignore&&Array.isArray(r.ignore)&&r.expandDirectories&&(r.ignore=Os.sync(r.ignore)),{pattern:t,options:r}};mr.exports=async(e,t)=>{let r=Ps(e,t),i=async()=>t&&t.gitignore?tu({cwd:t.cwd,ignore:t.ignore}):wm,n=async()=>{let h=await Promise.all(r.map(async m=>{let d=await ru(m,Os);return Promise.all(d.map(iu(m)))}));return ks(...h)},[o,s]=await Promise.all([i(),n()]),c=await Promise.all(s.map(h=>Ts(h.pattern,h.options)));return ks(...c).filter(h=>!o(T1(h)))};mr.exports.sync=(e,t)=>{let r=Ps(e,t),i=[];for(let s of r){let c=ru(s,Os.sync).map(iu(s));i.push(...c)}let n=Em(t),o=[];for(let s of i)o=ks(o,Ts.sync(s.pattern,s.options));return o.filter(s=>!n(s))};mr.exports.stream=(e,t)=>{let r=Ps(e,t),i=[];for(let c of r){let h=ru(c,Os.sync).map(iu(c));i.push(...h)}let n=Em(t),o=new A1(c=>!n(c)),s=new _1;return S1(i.map(c=>Ts.stream(c.pattern,c.options))).pipe(o).pipe(s)};mr.exports.generateGlobTasks=Ps;mr.exports.hasMagic=(e,t)=>[].concat(e).some(r=>Ts.isDynamicPattern(r,t));mr.exports.gitignore=tu});var nu=E(Is=>{"use strict";y();Object.defineProperty(Is,"__esModule",{value:!0});Is.aggregateFlags=void 0;var P1=os(),I1=(0,P1.boolean)({description:"Format output as json.",helpGroup:"GLOBAL"});function N1(e,t,r){let i={...t,...e};return r?{json:I1,...i}:i}Is.aggregateFlags=N1});var Sm=E(Ns=>{"use strict";y();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.cacheCommand=void 0;var M1=nu(),Dm=jo(),j1=On(),B1=oe();function Cm(e,t){let r=Object.getPrototypeOf(t),i=(0,B1.pickBy)(r,n=>n!==void 0);return Object.keys(r).length>0?Cm({...i,...e},r):e}async function R1(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{aliases:n.aliases,char:n.char,charAliases:n.charAliases,dependsOn:n.dependsOn,deprecateAliases:n.deprecateAliases,deprecated:n.deprecated,description:n.description,env:n.env,exclusive:n.exclusive,helpGroup:n.helpGroup,helpLabel:n.helpLabel,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,relationships:n.relationships,required:n.required,summary:n.summary,...n.type==="boolean"?{allowNo:n.allowNo,type:n.type}:{default:await(0,Dm.cacheDefaultValue)(n,t),delimiter:n.delimiter,hasDynamicHelp:typeof n.defaultHelp=="function",helpValue:n.helpValue,multiple:n.multiple,options:n.options,type:n.type}}]);return Object.fromEntries(await Promise.all(r))}async function L1(e,t){let r=Object.entries(e).map(async([i,n])=>[i,{default:await(0,Dm.cacheDefaultValue)(n,t),description:n.description,hidden:n.hidden,name:i,noCacheDefault:n.noCacheDefault,options:n.options,required:n.required}]);return Object.fromEntries(await Promise.all(r))}async function $1(e,t,r=!1){let i=Cm(e,e),n=i.flags??i._flags,o=i.baseFlags??i._baseFlags,[s,c]=await Promise.all([await R1((0,M1.aggregateFlags)(n,o,i.enableJsonFlag),r),await L1((0,j1.ensureArgObject)(i.args),r)]),h={aliases:i.aliases??[],args:c,deprecateAliases:i.deprecateAliases,deprecationOptions:i.deprecationOptions,description:i.description,examples:i.examples??i.example,flags:s,hasDynamicHelp:Object.values(s).some(a=>a.hasDynamicHelp),hidden:i.hidden,hiddenAliases:i.hiddenAliases??[],id:i.id,pluginAlias:t&&t.alias,pluginName:t&&t.name,pluginType:t&&t.type,state:i.state,strict:i.strict,summary:i.summary,usage:i.usage},m=["plugin","_flags","_enableJsonFlag","_globalFlags","_baseFlags","baseFlags","_--","_base"],d=new Set([...Object.keys(h),...m]),f=Object.keys(i).filter(a=>!d.has(a)),p=Object.fromEntries(f.map(a=>[a,i[a]]));return{...h,...p}}Ns.cacheCommand=$1});var _m=E(Qr=>{"use strict";y();var q1=Qr&&Qr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qr,"__esModule",{value:!0});Qr.findRoot=void 0;var U1=q1(et()),Fe=F("node:path"),Ms=yt(),Me=(0,U1.default)("find-root");function*su(e){for(;(0,Fe.dirname)(e)!==e;)yield e,e=(0,Fe.dirname)(e);yield e}async function Am(e,t){if(Me.extend(t??"root-plugin")(`Finding root starting at ${e}`),t){for(let r of su(e))if(r.endsWith((0,Fe.basename)(t)))return Me.extend(t)("Found root based on plugin name!"),r}for(let r of su(e))if(!((0,Fe.basename)((0,Fe.dirname)(r))==="bin"&&["dev","dev.cmd","dev.js","run","run.cmd","run.js"].includes((0,Fe.basename)(r))))try{let i=(0,Fe.join)(r,"package.json");if(Me.extend(t??"root-plugin")(`Checking ${i}`),await(0,Ms.safeReadJson)(i))return Me.extend(t??"root-plugin")("Found root by traversing up from starting point!"),(0,Fe.dirname)(i)}catch{}}async function H1(e,t){Me.extend(e??"root-plugin")("Finding root using legacy method");for(let r of su(t)){let i;if(e){if(i=(0,Fe.join)(r,"node_modules",e,"package.json"),await(0,Ms.safeReadJson)(i))return(0,Fe.dirname)(i);if((await(0,Ms.safeReadJson)((0,Fe.join)(r,"package.json")))?.name===e)return r}else if(i=(0,Fe.join)(r,"package.json"),await(0,Ms.safeReadJson)(i))return(0,Fe.dirname)(i)}}var Lt;function z1(e){if(Lt)return Lt;try{return Lt=F(F.resolve("pnpapi",{paths:[e]})),Lt}catch{}}var ou=e=>JSON.stringify(e),J1=(e,t,r)=>ou(e?.packageDependencies.get(r))===ou(t?.packageDependencies.get(r));function W1(e,t){if(z1(t),!Lt)return;Me.extend(e)("Finding root for using pnp method");let r=new Set,i=(n,o)=>{let s=ou(n);if(r.has(s))return;let c=Lt.getPackageInformation(n);if(n.name===e)return c.packageLocation;r.add(s);for(let[h,m]of c.packageDependencies){if(m===null||o!==null&&J1(c,o,h))continue;let d=Lt.getLocator(h,m),f=i(d,c);if(f)return f}r.delete(s)};for(let n of Lt.getDependencyTreeRoots()){let o=i(n);if(o)return o}}async function G1(e,t){if(e){Me.extend(e)(`Finding root using ${t}`);let i;try{i=F.resolve(e,{paths:[t]}),Me.extend(e)("Found starting point with require.resolve")}catch{Me.extend(e)("require.resolve could not find plugin starting point")}if(i){let o=await Am((0,Fe.dirname)(i),e);if(o)return Me.extend(e)(`Found root at ${o}`),o}let n=process.versions.pnp?W1(e,t):await H1(e,t);return Me.extend(e)(n?`Found root at ${n}`:"No root found!"),n}Me.extend("root-plugin")(`Finding root plugin using ${t}`);let r=await Am(t);return Me.extend("root-plugin")(r?`Found root at ${r}`:"No root found!"),r}Qr.findRoot=G1});var lu=E(ti=>{"use strict";y();var Nm=ti&&ti.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ti,"__esModule",{value:!0});ti.Plugin=void 0;var X1=Nm(bm()),ei=F("node:path"),Fm=F("node:util"),V1=Nm(Ve()),Hi=$e(),js=Ei(),Zr=Yr(),Mm=Fn(),Y1=Sm(),K1=_m(),km=yt(),Tm=oe(),au=Pr(),Bs=Or(),Om=V1.default.getInstance().get("@oclif/core");function uu(e,t){return e?(t=t?`${t}:`:"",Array.isArray(e)?[...e,e.flatMap(r=>uu(r.subtopics,`${t}${r.name}`))]:Object.keys(e).flatMap(r=>(e[r].name=r,[{...e[r],name:`${t}${r}`},...uu(e[r].subtopics,`${t}${e[r].name}`)]))):[]}var Q1=(e,t)=>!!(e?.commands[t]&&"isESM"in e.commands[t]&&"relativePath"in e.commands[t]),Pm=e=>typeof e.run=="function"?e:e.default&&e.default.run?e.default:Object.values(e).find(t=>typeof t.run=="function"),Im=e=>{if(e&&typeof e.run=="function")return e},jm=["**/*.+(js|cjs|mjs|ts|tsx|mts|cts)","!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js|d.mts|d.cts)?(x)"];function Z1(e){return e.map(t=>{let r=(0,ei.parse)(t),i=r.dir.split("/"),n=r.name!=="index"&&r.name,o=[...i,n].filter(Boolean).join(":");return o===""?Mm.SINGLE_COMMAND_CLI_SYMBOL:o})}function e_(e,t){if(e){if(typeof e=="string"&&t)return{strategy:"single",target:e};if(typeof e=="string")return{globPatterns:jm,strategy:"pattern",target:e};if(!e.target)throw new Hi.CLIError("`oclif.commandDiscovery.target` is required.");if(!e.strategy)throw new Hi.CLIError("`oclif.commandDiscovery.strategy` is required.");return e.strategy==="explicit"&&!e.identifier&&(e.identifier="default"),e}}function t_(e){return typeof e=="string"?{identifier:"default",target:e}:e.identifier?e:{...e,identifier:"default"}}var cu=class{options;alias;alreadyLoaded=!1;children=[];commandIDs=[];commands;commandsDir;hasManifest=!1;hooks;isRoot=!1;manifest;moduleType;name;parent;pjson;root;tag;type;valid=!1;version;_base=`${Om.name}@${Om.version}`;_debug=(0,Bs.Debug)();commandCache;commandDiscoveryOpts;flexibleTaxonomy;constructor(t){this.options=t}get topics(){return uu(this.pjson.oclif.topics||{})}async findCommand(t,r={}){let i=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.findCommand#${this.name}.${t}`,{id:t,plugin:this.name}),o=await(async()=>{if(this.commandDiscoveryOpts?.strategy==="pattern"){let s=await this.getCommandsDir();if(!s)return;let c,h,m;try{({filePath:m,isESM:h,module:c}=Q1(this.manifest,t)?await(0,js.loadWithDataFromManifest)(this.manifest.commands[t],this.root):await(0,js.loadWithData)(this,(0,ei.join)(s??this.pjson.oclif.commands,...t.split(":")))),this._debug(h?"(import)":"(require)",m)}catch(f){if(!r.must&&f.code==="MODULE_NOT_FOUND")return;throw f}let d=Pm(c);return d?(d.id=t,d.plugin=this,d.isESM=h,d.relativePath=(0,ei.relative)(this.root,m||"").split(ei.sep),d):void 0}if(this.commandDiscoveryOpts?.strategy==="single"||this.commandDiscoveryOpts?.strategy==="explicit"){let s=await this.loadCommandsFromTarget(),c=Im(s?.[t]);return c?(c.id=t,c.plugin=this,c):void 0}})();return!o&&r.must&&(0,Hi.error)(`command ${t} not found`),i?.stop(),o}async load(){this.type=this.options.type??"core",this.tag=this.options.tag,this.isRoot=this.options.isRoot??!1,this.options.parent&&(this.parent=this.options.parent);let t=this.options.pjson&&this.options.isRoot?this.options.root:this.type==="link"&&!this.parent?this.options.root:await(0,K1.findRoot)(this.options.name,this.options.root);if(!t)throw new Hi.CLIError(`could not find package.json with ${(0,Fm.inspect)(this.options)}`);if(this.root=t,this._debug(`loading ${this.type} plugin from ${t}`),this.pjson=this.options.pjson??await(0,km.readJson)((0,ei.join)(t,"package.json")),this.flexibleTaxonomy=this.options?.flexibleTaxonomy||this.pjson.oclif?.flexibleTaxonomy||!1,this.moduleType=this.pjson.type==="module"?"module":"commonjs",this.name=this.pjson.name,this.alias=this.options.name??this.pjson.name,!this.name)throw new Hi.CLIError(`no name in package.json (${t})`);this._debug=(0,Bs.Debug)(this.name),this.version=this.pjson.version,this.pjson.oclif?this.valid=!0:this.pjson.oclif=this.pjson["cli-engine"]||{},this.hooks=Object.fromEntries(Object.entries(this.pjson.oclif.hooks??{}).map(([r,i])=>[r,(0,Tm.castArray)(i).map(n=>t_(n))])),this.commandDiscoveryOpts=e_(this.pjson.oclif?.commands,this.pjson.oclif?.default),this._debug("command discovery options",this.commandDiscoveryOpts),this.manifest=await this._manifest(),this.commands=Object.entries(this.manifest.commands).map(([r,i])=>({...i,load:async()=>this.findCommand(r,{must:!0}),pluginAlias:this.alias,pluginType:i.pluginType==="jit"?"jit":this.type})).sort((r,i)=>r.id.localeCompare(i.id))}async _manifest(){let t=!!this.options.ignoreManifest,r=!!this.options.errorOnManifestCreate,i=!!this.options.respectNoCacheDefault,n=async(c=!1)=>{try{let h=(0,ei.join)(this.root,`${c?".":""}oclif.manifest.json`),m=await(0,km.readJson)(h);if(!process.env.OCLIF_NEXT_VERSION&&m.version.split("-")[0]!==this.version.split("-")[0])process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${m.version}
136
136
  This usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.`);else return this._debug("using manifest from",h),this.hasManifest=!0,m}catch(h){if(h.code==="ENOENT"){if(!c)return n(!0)}else this.warn(h,"readManifest")}},o=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.manifest#${this.name}`,{plugin:this.name});if(!t){let c=await n();if(c)return o?.addDetails({commandCount:Object.keys(c.commands).length,fromCache:!0}),o?.stop(),this.commandIDs=Object.keys(c.commands),c}this.commandIDs=await this.getCommandIDs();let s={commands:(await Promise.all(this.commandIDs.map(async c=>{try{let h=await this.findCommand(c,{must:!0}),m=await(0,Y1.cacheCommand)(h,this,i);if(m.id=c,this.flexibleTaxonomy){let d=(0,Bs.getCommandIdPermutations)(c),f=m.aliases.flatMap(p=>(0,Bs.getCommandIdPermutations)(p));return[c,{...m,aliasPermutations:f,permutations:d}]}return[c,m]}catch(h){let m=`findCommand (${c})`;if(!r)this.warn(h,m);else throw this.addErrorScope(h,m)}}))).filter(c=>!!c).reduce((c,[h,m])=>(c[h]=m,c),{}),version:this.version};return o?.addDetails({commandCount:Object.keys(s.commands).length,fromCache:!1}),o?.stop(),s}addErrorScope(t,r){return t.name=t.name??(0,Fm.inspect)(t).trim(),t.detail=(0,Tm.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,...t.code?[`code: ${t.code}`]:[],...t.message?[`message: ${t.message}`]:[],"See more details with DEBUG=*"]).join(`
137
- `),t}async getCommandIDs(){let t=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.getCommandIDs#${this.name}`,{plugin:this.name}),r;switch(this.commandDiscoveryOpts?.strategy){case"explicit":{r=await this.getCommandIdsFromTarget()??[];break}case"pattern":{r=await this.getCommandIdsFromPattern();break}case"single":{r=await this.getCommandIdsFromTarget()??[];break}default:r=[]}return this._debug("found commands",r),t?.addDetails({count:r.length}),t?.stop(),r}async getCommandIdsFromPattern(){let t=await this.getCommandsDir();if(!t)return[];this._debug(`loading IDs from ${t}`);let r=await(0,X1.default)(this.commandDiscoveryOpts?.globPatterns??jm,{cwd:t});return Z1(r)}async getCommandIdsFromTarget(){if(await this.loadCommandsFromTarget())return Object.entries(await this.loadCommandsFromTarget()??[]).filter(([,r])=>Im(r)).map(([r])=>r)}async getCommandsDir(){return this.commandsDir?this.commandsDir:(this.commandsDir=await(0,au.tsPath)(this.root,this.commandDiscoveryOpts?.target,this),this.commandsDir)}async loadCommandsFromTarget(){if(this.commandCache)return this.commandCache;if(this.commandDiscoveryOpts?.strategy==="explicit"&&this.commandDiscoveryOpts.target){let t=await(0,au.tsPath)(this.root,this.commandDiscoveryOpts.target,this),r=await(0,js.load)(this,t);return this.commandCache=r[this.commandDiscoveryOpts?.identifier??"default"]??{},this.commandCache}if(this.commandDiscoveryOpts?.strategy==="single"&&this.commandDiscoveryOpts.target){let t=await(0,au.tsPath)(this.root,this.commandDiscoveryOpts?.target??this.root,this),r=await(0,js.load)(this,t);return this.commandCache={[Mm.SINGLE_COMMAND_CLI_SYMBOL]:Pm(r)},this.commandCache}}warn(t,r){typeof t=="string"&&(t=new Error(t));let i=this.addErrorScope(t,r);process.emitWarning(i.name,i)}};ti.Plugin=cu});var Lm=E(Dt=>{"use strict";y();var r_=Dt&&Dt.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),i_=Dt&&Dt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),n_=Dt&&Dt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&r_(t,e,r);return i_(t,e),t};Object.defineProperty(Dt,"__esModule",{value:!0});var s_=Up(),hu=F("node:path"),ri=Yr(),fu=yt(),o_=oe(),Bm=n_(lu()),a_=Or(),Rm=(0,a_.Debug)();function gr(e,t){return Object.keys(e).filter(r=>t.some(i=>(0,s_.minimatch)(r,i)))}var du=class{options;errors=[];plugins=new Map;pluginsProvided=!1;constructor(t){this.options=t,t.plugins&&(this.pluginsProvided=!0,this.plugins=Array.isArray(t.plugins)?new Map(t.plugins.map(r=>[r.name,r])):t.plugins)}async loadChildren(t){return(!this.pluginsProvided||t.force)&&(await this.loadUserPlugins(t),await this.loadDevPlugins(t),await this.loadCorePlugins(t)),{errors:this.errors,plugins:this.plugins}}async loadRoot({pjson:t}){let r;if(this.pluginsProvided){let i=[...this.plugins.values()];r=i.find(n=>n.root===this.options.root)??i[0]}else{let i=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,"plugin.load#root");r=new Bm.Plugin({isRoot:!0,pjson:t,root:this.options.root}),await r.load(),i?.addDetails({commandCount:r.commands.length,hasManifest:r.hasManifest??!1,name:r.name,topicCount:r.topics.length,type:r.type,usesMain:!!r.pjson.main}),i?.stop()}return this.plugins.set(r.name,r),r}async loadCorePlugins(t){let{plugins:r}=t.rootPlugin.pjson.oclif;if(r){let o=gr(t.rootPlugin.pjson.dependencies??{},r);await this.loadPlugins(t.rootPlugin.root,"core",o)}let{core:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,fu.readJson)((0,hu.join)(n,"package.json")),s=gr(o.dependencies??{},i);await this.loadPlugins(n,"core",s)}else{let o=gr(t.rootPlugin.pjson.dependencies??{},i);await this.loadPlugins(t.rootPlugin.root,"core",o)}}async loadDevPlugins(t){if(t.devPlugins!==!1){if((0,o_.isProd)())return;try{let{devPlugins:r}=t.rootPlugin.pjson.oclif;if(r){let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=gr(o??{},r);await this.loadPlugins(t.rootPlugin.root,"dev",s)}let{dev:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,fu.readJson)((0,hu.join)(n,"package.json")),s={...o.dependencies,...o.devDependencies},c=gr(s??{},i);await this.loadPlugins(n,"dev",c)}else{let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=gr(o??{},i);await this.loadPlugins(t.rootPlugin.root,"dev",s)}}catch(r){process.emitWarning(r)}}}async loadPlugins(t,r,i,n){if(!i||i.length===0)return;let o=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,`config.loadPlugins#${r}`);Rm("loading plugins",i),await Promise.all((i||[]).map(async s=>{try{let c=typeof s=="string"?s:s.name,h={name:c,root:t,type:r};if(typeof s!="string"&&(h.tag=s.tag||h.tag,h.root=s.root||h.root,h.url=s.url),n&&(h.parent=n),this.plugins.has(c))return;let m=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,`plugin.load#${c}`),d=new Bm.Plugin(h);if(await d.load(),m?.addDetails({commandCount:d.commands.length,hasManifest:d.hasManifest,name:d.name,topicCount:d.topics.length,type:d.type,usesMain:!!d.pjson.main}),m?.stop(),this.plugins.set(d.name,d),n&&(d.parent=n,n.children||(n.children=[]),n.children.push(d)),d.pjson.oclif.plugins){let f=r==="dev"?{...d.pjson.dependencies,...d.pjson.devDependencies}:d.pjson.dependencies,p=gr(f??{},d.pjson.oclif.plugins);await this.loadPlugins(d.root,r,p,d)}}catch(c){this.errors.push(c)}})),o?.addDetails({pluginCount:i.length}),o?.stop()}async loadUserPlugins(t){if(t.userPlugins!==!1)try{let r=(0,hu.join)(t.dataDir,"package.json");Rm("reading user plugins pjson %s",r);let i=await(0,fu.readJson)(r);i.oclif||(i.oclif={schema:1}),i.oclif.plugins||(i.oclif.plugins=[]),await this.loadPlugins(r,"user",i.oclif.plugins.filter(n=>n.type==="user")),await this.loadPlugins(r,"link",i.oclif.plugins.filter(n=>n.type==="link"))}catch(r){r.code!=="ENOENT"&&process.emitWarning(r)}}};Dt.default=du});var Wm=E((Ue,Jm)=>{"use strict";y();var u_=Ue&&Ue.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),c_=Ue&&Ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),l_=Ue&&Ue.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&u_(t,e,r);return c_(t,e),t},yu=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.Config=void 0;var h_=l_(gc()),f_=yu(ey()),ii=F("node:os"),Ct=F("node:path"),$m=F("node:url"),zm=yu(Ve()),d_=Li(),p_=er(),ni=$e(),m_=Mr(),g_=Ei(),we=Yr(),pu=Pt(),qm=yt(),Um=Fp(),Rs=oe(),y_=yu(Lm()),v_=Pr(),Ji=Or(),zi=(0,Ji.Debug)(),Hm=zm.default.getInstance().get("@oclif/core"),mu=`${Hm.name}@${Hm.version}`,x_=new Set(["preparse"]);function w_(e){let t=e.match(/[^-]+(?:-([^.]+))?/);return t&&t[1]||"stable"}function E_(e){return e&&!!e._base}var Ls=class extends Map{validPermutations=new Map;add(t,r){this.validPermutations.set(t,r);for(let i of(0,Ji.collectUsableIds)([t]))this.has(i)?this.set(i,this.get(i).add(r)):this.set(i,new Set([r]))}get(t){return super.get(t)??new Set}getAllValid(){return[...this.validPermutations.keys()]}getValid(t){return this.validPermutations.get(t)}hasValid(t){return this.validPermutations.has(t)}},gu=class e{options;arch;bin;binAliases;binPath;cacheDir;channel;configDir;dataDir;debug=0;dirname;errlog;flexibleTaxonomy;home;isSingleCommandCLI=!1;name;npmRegistry;nsisCustomization;pjson;platform;plugins=new Map;root;shell;theme;topicSeparator=":";userAgent;userPJSON;valid;version;warned=!1;windows;_base=mu;_commandIDs;_commands=new Map;_topics=new Map;commandPermutations=new Ls;pluginLoader;rootPlugin;topicPermutations=new Ls;constructor(t){this.options=t}static async load(t=Jm.filename||__dirname){if(typeof t=="string"&&t.startsWith("file://")&&(t=(0,$m.fileURLToPath)(t)),typeof t=="string"&&(t={root:t}),E_(t)){if(mu!==t._base){zi(`reloading config from ${t._base} to ${mu}`);let i=new e({...t.options,plugins:t.plugins});return await i.load(),i}return t}let r=new e(t);return await r.load(),r}static get rootPlugin(){return this.rootPlugin}get commandIDs(){return this._commandIDs?this._commandIDs:(this._commandIDs=this.commands.map(t=>t.id),this._commandIDs)}get commands(){return[...this._commands.values()]}get isProd(){return(0,Rs.isProd)()}get topics(){return[...this._topics.values()]}get versionDetails(){let[t,r,i]=this.userAgent.split(" ");return{architecture:r,cliVersion:t,nodeVersion:i,osVersion:`${(0,ii.type)()} ${(0,ii.release)()}`,pluginVersions:Object.fromEntries([...this.plugins.values()].map(n=>[n.name,{root:n.root,type:n.type,version:n.version}])),rootPath:this.root,shell:this.shell}}dir(t){let r=process.env[`XDG_${t.toUpperCase()}_HOME`]||this.windows&&process.env.LOCALAPPDATA||(0,Ct.join)(this.home,t==="data"?".local/share":"."+t);return(0,Ct.join)(r,this.dirname)}findCommand(t,r={}){let i=this.getCmdLookupId(t),n=this._commands.get(i);return r.must&&!n&&(0,ni.error)(`command ${i} not found`),n}findMatches(t,r){let i=r.filter(s=>!(0,m_.getHelpFlagAdditions)(this).includes(s)&&s.startsWith("-")).map(s=>s.replaceAll("-",""));return[...this.commandPermutations.get(t)].map(s=>this._commands.get(s)).filter(s=>{let c=Object.entries(s.flags).flatMap(([h,m])=>m.char?[m.char,h]:[h]);return i.every(h=>c.includes(h))})}findTopic(t,r={}){let i=this.getTopicLookupId(t),n=this._topics.get(i);if(n)return n;if(r.must)throw new Error(`topic ${t} not found`)}getAllCommandIDs(){return this.getAllCommands().map(t=>t.id)}getAllCommands(){let t=[...this._commands.values()],r=[...this.commandPermutations.getAllValid()];for(let i of r)if(!this._commands.has(i)){let n=this._commands.get(this.getCmdLookupId(i));t.push({...n,id:i})}return t}getPluginsList(){return[...this.plugins.values()]}async load(){pu.settings.performanceEnabled=(pu.settings.performanceEnabled===void 0?this.options.enablePerf:pu.settings.performanceEnabled)??!1;let t=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.load");this.pluginLoader=new y_.default({plugins:this.options.plugins,root:this.options.root}),this.rootPlugin=await this.pluginLoader.loadRoot({pjson:this.options.pjson});let r=zm.default.getInstance();if(r.set("rootPlugin",this.rootPlugin),r.set("exitCodes",this.rootPlugin.pjson.oclif.exitCodes??{}),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.plugins.set(this.rootPlugin.name,this.rootPlugin),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.name=this.pjson.name,this.version=this.options.version||this.pjson.version||"0.0.0",this.channel=this.options.channel||w_(this.version),this.valid=this.rootPlugin.valid,this.arch=(0,ii.arch)()==="ia32"?"x86":(0,ii.arch)(),this.platform=f_.default?"wsl":(0,Um.getPlatform)(),this.windows=this.platform==="win32",this.bin=this.pjson.oclif.bin||this.name,this.binAliases=this.pjson.oclif.binAliases,this.nsisCustomization=this.pjson.oclif.nsisCustomization,this.dirname=this.pjson.oclif.dirname||this.name,this.flexibleTaxonomy=this.pjson.oclif.flexibleTaxonomy||!1,this.pjson.oclif.topicSeparator&&[" ",":"].includes(this.pjson.oclif.topicSeparator)&&(this.topicSeparator=this.pjson.oclif.topicSeparator),this.platform==="win32"&&(this.dirname=this.dirname.replace("/","\\")),this.userAgent=`${this.name}/${this.version} ${this.platform}-${this.arch} node-${process.version}`,this.shell=this._shell(),this.debug=this._debug(),this.home=process.env.HOME||this.windows&&this.windowsHome()||(0,Um.getHomeDir)()||(0,ii.tmpdir)(),this.cacheDir=this.scopedEnvVar("CACHE_DIR")||this.macosCacheDir()||this.dir("cache"),this.configDir=this.scopedEnvVar("CONFIG_DIR")||this.dir("config"),this.dataDir=this.scopedEnvVar("DATA_DIR")||this.dir("data"),this.errlog=(0,Ct.join)(this.cacheDir,"error.log"),this.binPath=this.scopedEnvVar("BINPATH"),this.npmRegistry=this.scopedEnvVar("NPM_REGISTRY")||this.pjson.oclif.npmRegistry,!this.scopedEnvVarTrue("DISABLE_THEME")){let{theme:n}=await this.loadThemes();this.theme=n}this.pjson.oclif.update=this.pjson.oclif.update||{},this.pjson.oclif.update.node=this.pjson.oclif.update.node||{};let i=this.pjson.oclif.update.s3||{};this.pjson.oclif.update.s3=i,i.bucket=this.scopedEnvVar("S3_BUCKET")||i.bucket,i.bucket&&!i.host&&(i.host=`https://${i.bucket}.s3.amazonaws.com`),i.templates={...i.templates,target:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>",...i.templates&&i.templates.target},vanilla:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>",...i.templates&&i.templates.vanilla}},this.isSingleCommandCLI=!!(this.pjson.oclif.default||typeof this.pjson.oclif.commands!="string"&&this.pjson.oclif.commands?.strategy==="single"&&this.pjson.oclif.commands?.target),await this.loadPluginsAndCommands(),zi("config done"),t?.addDetails({commandPermutations:this.commands.length,commands:[...this.plugins.values()].reduce((n,o)=>n+o.commands.length,0),plugins:this.plugins.size,topics:this.topics.length}),t?.stop()}async loadPluginsAndCommands(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.loadAllPlugins"),{errors:i,plugins:n}=await this.pluginLoader.loadChildren({dataDir:this.dataDir,devPlugins:this.options.devPlugins,force:t?.force??!1,pluginAdditions:this.options.pluginAdditions,rootPlugin:this.rootPlugin,userPlugins:this.options.userPlugins});this.plugins=n,r?.stop();let o=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.loadAllCommands");for(let s of this.plugins.values())this.loadCommands(s),this.loadTopics(s);o?.stop();for(let s of i)this.warn(s)}async loadThemes(){let t=this.pjson.oclif.theme?(0,Ct.resolve)(this.root,this.pjson.oclif.theme):this.pjson.oclif.theme,r=(0,Ct.resolve)(this.configDir,"theme.json"),[i,n]=await Promise.all([t?await(0,qm.safeReadJson)(t):void 0,await(0,qm.safeReadJson)(r)]),o={...i,...n};return{file:n?r:t,theme:Object.keys(o).length>0?(0,p_.parseTheme)(o):void 0}}macosCacheDir(){return this.platform==="darwin"&&(0,Ct.join)(this.home,"Library","Caches",this.dirname)||void 0}async runCommand(t,r=[],i=null){let n=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runCommand#${t}`);zi("runCommand %s %o",t,r);let o=i??this.findCommand(t);if(!o){let h=this.flexibleTaxonomy?this.findMatches(t,r):[],m=this.flexibleTaxonomy&&h.length>0?await this.runHook("command_incomplete",{argv:r,id:t,matches:h}):await this.runHook("command_not_found",{argv:r,id:t});if(m.successes[0])return m.successes[0].result;throw m.failures[0]?m.failures[0].error:new ni.CLIError(`command ${t} not found`)}if(this.isJitPluginCommand(o)){let h=o.pluginName,m=this.pjson.oclif.jitPlugins[h],d=await this.runHook("jit_plugin_not_installed",{argv:r,command:o,id:t,pluginName:h,pluginVersion:m});if(d.failures[0])throw d.failures[0].error;if(d.successes[0])await this.loadPluginsAndCommands({force:!0}),o=this.findCommand(t)??o;else{let f=await this.runHook("command_not_found",{argv:r,id:t});if(f.successes[0])return f.successes[0].result;throw f.failures[0]?f.failures[0].error:new ni.CLIError(`command ${t} not found`)}}let s=await o.load();await this.runHook("prerun",{Command:s,argv:r});let c=await s.run(r,this);if(o.id==="plugins:uninstall")for(let h of r)this.plugins.delete(h);return await this.runHook("postrun",{Command:s,argv:r,result:c}),n?.addDetails({command:t,plugin:o.pluginName}),n?.stop(),c}async runHook(t,r,i,n){let o=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runHook#${t}`);zi("start %s hook",t);let s=f=>typeof f=="function"?f:f.default&&typeof f.default=="function"?f.default:Object.values(f).find(p=>typeof p=="function"),c=async(f,p)=>{let a,u=new Promise((l,g)=>{a=setTimeout(()=>{g(new Error(`Timed out after ${f} ms.`))},f).unref()});return Promise.race([p,u]).then(l=>(clearTimeout(a),l))},h={failures:[],successes:[]},d=(x_.has(t)?[this.rootPlugin]:[...this.plugins.values()]).map(async f=>{let p=et()([this.bin,f.name,"hooks",t].join(":")),a={config:this,debug:p,error(l,g={}){(0,ni.error)(l,g)},exit(l=0){(0,ni.exit)(l)},log(l,...g){d_.ux.info(l,...g)},warn(l){(0,ni.warn)(l)}},u=f.hooks[t]||[];for(let l of u){let g=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runHook#${f.name}(${l.target})`);try{let{filePath:v,isESM:x,module:w}=await(0,g_.loadWithData)(f,await(0,v_.tsPath)(f.root,l.target,f));p("start",x?"(import)":"(require)",v);let C=w[l.identifier]??(l.identifier==="default"?s(w):void 0);if(!C){p("No hook found for hook definition:",l);continue}let S=i?await c(i,C.call(a,{...r,config:this,context:a})):await C.call(a,{...r,config:this,context:a});h.successes.push({plugin:f,result:S}),f.name==="@oclif/plugin-legacy"&&t==="init"&&this.insertLegacyPlugins(S),p("done")}catch(v){if(h.failures.push({error:v,plugin:f}),p(v),!n&&v.oclif?.exit!==void 0&&v.oclif?.exit!==0&&v.code!=="MODULE_NOT_FOUND")throw v}g?.addDetails({event:t,hook:l.target,plugin:f.name}),g?.stop()}});return await Promise.all(d),zi("%s hook done",t),o?.stop(),h}s3Key(t,r,i={}){typeof r=="object"?i=r:r&&(i.ext=r);let n=this.pjson.oclif.update.s3.templates[i.platform?"target":"vanilla"][t]??"";return h_.render(n,{...this,...i})}s3Url(t){let{host:r}=this.pjson.oclif.update.s3;if(!r)throw new Error("no s3 host is set");let i=new $m.URL(r);return i.pathname=(0,Ct.join)(i.pathname,t),i.toString()}scopedEnvVar(t){return process.env[this.scopedEnvVarKeys(t).find(r=>process.env[r])]}scopedEnvVarKey(t){return[this.bin,t].map(r=>r.replaceAll("@","").replaceAll(/[/-]/g,"_")).join("_").toUpperCase()}scopedEnvVarKeys(t){return[this.bin,...this.binAliases??[]].filter(Boolean).map(r=>[r.replaceAll("@","").replaceAll(/[/-]/g,"_"),t].join("_").toUpperCase())}scopedEnvVarTrue(t){let r=this.scopedEnvVar(t);return r==="1"||r==="true"}warn(t,r){if(!this.warned){if(typeof t=="string"){process.emitWarning(t);return}if(t instanceof Error){let i=t;i.name=`${t.name} Plugin: ${this.name}`,i.detail=(0,Rs.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
137
+ `),t}async getCommandIDs(){let t=Zr.Performance.mark(Zr.OCLIF_MARKER_OWNER,`plugin.getCommandIDs#${this.name}`,{plugin:this.name}),r;switch(this.commandDiscoveryOpts?.strategy){case"explicit":{r=await this.getCommandIdsFromTarget()??[];break}case"pattern":{r=await this.getCommandIdsFromPattern();break}case"single":{r=await this.getCommandIdsFromTarget()??[];break}default:r=[]}return this._debug("found commands",r),t?.addDetails({count:r.length}),t?.stop(),r}async getCommandIdsFromPattern(){let t=await this.getCommandsDir();if(!t)return[];this._debug(`loading IDs from ${t}`);let r=await(0,X1.default)(this.commandDiscoveryOpts?.globPatterns??jm,{cwd:t});return Z1(r)}async getCommandIdsFromTarget(){if(await this.loadCommandsFromTarget())return Object.entries(await this.loadCommandsFromTarget()??[]).filter(([,r])=>Im(r)).map(([r])=>r)}async getCommandsDir(){return this.commandsDir?this.commandsDir:(this.commandsDir=await(0,au.tsPath)(this.root,this.commandDiscoveryOpts?.target,this),this.commandsDir)}async loadCommandsFromTarget(){if(this.commandCache)return this.commandCache;if(this.commandDiscoveryOpts?.strategy==="explicit"&&this.commandDiscoveryOpts.target){let t=await(0,au.tsPath)(this.root,this.commandDiscoveryOpts.target,this),r=await(0,js.load)(this,t);return this.commandCache=r[this.commandDiscoveryOpts?.identifier??"default"]??{},this.commandCache}if(this.commandDiscoveryOpts?.strategy==="single"&&this.commandDiscoveryOpts.target){let t=await(0,au.tsPath)(this.root,this.commandDiscoveryOpts?.target??this.root,this),r=await(0,js.load)(this,t);return this.commandCache={[Mm.SINGLE_COMMAND_CLI_SYMBOL]:Pm(r)},this.commandCache}}warn(t,r){typeof t=="string"&&(t=new Error(t));let i=this.addErrorScope(t,r);process.emitWarning(i.name,i)}};ti.Plugin=cu});var Lm=E(Dt=>{"use strict";y();var r_=Dt&&Dt.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),i_=Dt&&Dt.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),n_=Dt&&Dt.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&r_(t,e,r);return i_(t,e),t};Object.defineProperty(Dt,"__esModule",{value:!0});var s_=Up(),hu=F("node:path"),ri=Yr(),fu=yt(),o_=oe(),Bm=n_(lu()),a_=Or(),Rm=(0,a_.Debug)();function gr(e,t){return Object.keys(e).filter(r=>t.some(i=>(0,s_.minimatch)(r,i)))}var du=class{options;errors=[];plugins=new Map;pluginsProvided=!1;constructor(t){this.options=t,t.plugins&&(this.pluginsProvided=!0,this.plugins=Array.isArray(t.plugins)?new Map(t.plugins.map(r=>[r.name,r])):t.plugins)}async loadChildren(t){return(!this.pluginsProvided||t.force)&&(await this.loadUserPlugins(t),await this.loadDevPlugins(t),await this.loadCorePlugins(t)),{errors:this.errors,plugins:this.plugins}}async loadRoot({pjson:t}){let r;if(this.pluginsProvided){let i=[...this.plugins.values()];r=i.find(n=>n.root===this.options.root)??i[0]}else{let i=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,"plugin.load#root");r=new Bm.Plugin({isRoot:!0,pjson:t,root:this.options.root}),await r.load(),i?.addDetails({commandCount:r.commands.length,hasManifest:r.hasManifest??!1,name:r.name,topicCount:r.topics.length,type:r.type,usesMain:!!r.pjson.main}),i?.stop()}return this.plugins.set(r.name,r),r}async loadCorePlugins(t){let{plugins:r}=t.rootPlugin.pjson.oclif;if(r){let o=gr(t.rootPlugin.pjson.dependencies??{},r);await this.loadPlugins(t.rootPlugin.root,"core",o)}let{core:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,fu.readJson)((0,hu.join)(n,"package.json")),s=gr(o.dependencies??{},i);await this.loadPlugins(n,"core",s)}else{let o=gr(t.rootPlugin.pjson.dependencies??{},i);await this.loadPlugins(t.rootPlugin.root,"core",o)}}async loadDevPlugins(t){if(t.devPlugins!==!1){if((0,o_.isProd)())return;try{let{devPlugins:r}=t.rootPlugin.pjson.oclif;if(r){let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=gr(o??{},r);await this.loadPlugins(t.rootPlugin.root,"dev",s)}let{dev:i,path:n}=t.pluginAdditions??{core:[]};if(i)if(n){let o=await(0,fu.readJson)((0,hu.join)(n,"package.json")),s={...o.dependencies,...o.devDependencies},c=gr(s??{},i);await this.loadPlugins(n,"dev",c)}else{let o={...t.rootPlugin.pjson.dependencies,...t.rootPlugin.pjson.devDependencies},s=gr(o??{},i);await this.loadPlugins(t.rootPlugin.root,"dev",s)}}catch(r){process.emitWarning(r)}}}async loadPlugins(t,r,i,n){if(!i||i.length===0)return;let o=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,`config.loadPlugins#${r}`);Rm("loading plugins",i),await Promise.all((i||[]).map(async s=>{try{let c=typeof s=="string"?s:s.name,h={name:c,root:t,type:r};if(typeof s!="string"&&(h.tag=s.tag||h.tag,h.root=s.root||h.root,h.url=s.url),n&&(h.parent=n),this.plugins.has(c))return;let m=ri.Performance.mark(ri.OCLIF_MARKER_OWNER,`plugin.load#${c}`),d=new Bm.Plugin(h);if(await d.load(),m?.addDetails({commandCount:d.commands.length,hasManifest:d.hasManifest,name:d.name,topicCount:d.topics.length,type:d.type,usesMain:!!d.pjson.main}),m?.stop(),this.plugins.set(d.name,d),n&&(d.parent=n,n.children||(n.children=[]),n.children.push(d)),d.pjson.oclif.plugins){let f=r==="dev"?{...d.pjson.dependencies,...d.pjson.devDependencies}:d.pjson.dependencies,p=gr(f??{},d.pjson.oclif.plugins);await this.loadPlugins(d.root,r,p,d)}}catch(c){this.errors.push(c)}})),o?.addDetails({pluginCount:i.length}),o?.stop()}async loadUserPlugins(t){if(t.userPlugins!==!1)try{let r=(0,hu.join)(t.dataDir,"package.json");Rm("reading user plugins pjson %s",r);let i=await(0,fu.readJson)(r);i.oclif||(i.oclif={schema:1}),i.oclif.plugins||(i.oclif.plugins=[]),await this.loadPlugins(r,"user",i.oclif.plugins.filter(n=>n.type==="user")),await this.loadPlugins(r,"link",i.oclif.plugins.filter(n=>n.type==="link"))}catch(r){r.code!=="ENOENT"&&process.emitWarning(r)}}};Dt.default=du});var Wm=E((Ue,Jm)=>{"use strict";y();var u_=Ue&&Ue.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),c_=Ue&&Ue.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),l_=Ue&&Ue.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&u_(t,e,r);return c_(t,e),t},yu=Ue&&Ue.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.Config=void 0;var h_=l_(uc()),f_=yu(Q0()),ii=F("node:os"),Ct=F("node:path"),$m=F("node:url"),zm=yu(Ve()),d_=Li(),p_=er(),ni=$e(),m_=Mr(),g_=Ei(),we=Yr(),pu=Pt(),qm=yt(),Um=Fp(),Rs=oe(),y_=yu(Lm()),v_=Pr(),Ji=Or(),zi=(0,Ji.Debug)(),Hm=zm.default.getInstance().get("@oclif/core"),mu=`${Hm.name}@${Hm.version}`,x_=new Set(["preparse"]);function w_(e){let t=e.match(/[^-]+(?:-([^.]+))?/);return t&&t[1]||"stable"}function E_(e){return e&&!!e._base}var Ls=class extends Map{validPermutations=new Map;add(t,r){this.validPermutations.set(t,r);for(let i of(0,Ji.collectUsableIds)([t]))this.has(i)?this.set(i,this.get(i).add(r)):this.set(i,new Set([r]))}get(t){return super.get(t)??new Set}getAllValid(){return[...this.validPermutations.keys()]}getValid(t){return this.validPermutations.get(t)}hasValid(t){return this.validPermutations.has(t)}},gu=class e{options;arch;bin;binAliases;binPath;cacheDir;channel;configDir;dataDir;debug=0;dirname;errlog;flexibleTaxonomy;home;isSingleCommandCLI=!1;name;npmRegistry;nsisCustomization;pjson;platform;plugins=new Map;root;shell;theme;topicSeparator=":";userAgent;userPJSON;valid;version;warned=!1;windows;_base=mu;_commandIDs;_commands=new Map;_topics=new Map;commandPermutations=new Ls;pluginLoader;rootPlugin;topicPermutations=new Ls;constructor(t){this.options=t}static async load(t=Jm.filename||__dirname){if(typeof t=="string"&&t.startsWith("file://")&&(t=(0,$m.fileURLToPath)(t)),typeof t=="string"&&(t={root:t}),E_(t)){if(mu!==t._base){zi(`reloading config from ${t._base} to ${mu}`);let i=new e({...t.options,plugins:t.plugins});return await i.load(),i}return t}let r=new e(t);return await r.load(),r}static get rootPlugin(){return this.rootPlugin}get commandIDs(){return this._commandIDs?this._commandIDs:(this._commandIDs=this.commands.map(t=>t.id),this._commandIDs)}get commands(){return[...this._commands.values()]}get isProd(){return(0,Rs.isProd)()}get topics(){return[...this._topics.values()]}get versionDetails(){let[t,r,i]=this.userAgent.split(" ");return{architecture:r,cliVersion:t,nodeVersion:i,osVersion:`${(0,ii.type)()} ${(0,ii.release)()}`,pluginVersions:Object.fromEntries([...this.plugins.values()].map(n=>[n.name,{root:n.root,type:n.type,version:n.version}])),rootPath:this.root,shell:this.shell}}dir(t){let r=process.env[`XDG_${t.toUpperCase()}_HOME`]||this.windows&&process.env.LOCALAPPDATA||(0,Ct.join)(this.home,t==="data"?".local/share":"."+t);return(0,Ct.join)(r,this.dirname)}findCommand(t,r={}){let i=this.getCmdLookupId(t),n=this._commands.get(i);return r.must&&!n&&(0,ni.error)(`command ${i} not found`),n}findMatches(t,r){let i=r.filter(s=>!(0,m_.getHelpFlagAdditions)(this).includes(s)&&s.startsWith("-")).map(s=>s.replaceAll("-",""));return[...this.commandPermutations.get(t)].map(s=>this._commands.get(s)).filter(s=>{let c=Object.entries(s.flags).flatMap(([h,m])=>m.char?[m.char,h]:[h]);return i.every(h=>c.includes(h))})}findTopic(t,r={}){let i=this.getTopicLookupId(t),n=this._topics.get(i);if(n)return n;if(r.must)throw new Error(`topic ${t} not found`)}getAllCommandIDs(){return this.getAllCommands().map(t=>t.id)}getAllCommands(){let t=[...this._commands.values()],r=[...this.commandPermutations.getAllValid()];for(let i of r)if(!this._commands.has(i)){let n=this._commands.get(this.getCmdLookupId(i));t.push({...n,id:i})}return t}getPluginsList(){return[...this.plugins.values()]}async load(){pu.settings.performanceEnabled=(pu.settings.performanceEnabled===void 0?this.options.enablePerf:pu.settings.performanceEnabled)??!1;let t=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.load");this.pluginLoader=new y_.default({plugins:this.options.plugins,root:this.options.root}),this.rootPlugin=await this.pluginLoader.loadRoot({pjson:this.options.pjson});let r=zm.default.getInstance();if(r.set("rootPlugin",this.rootPlugin),r.set("exitCodes",this.rootPlugin.pjson.oclif.exitCodes??{}),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.plugins.set(this.rootPlugin.name,this.rootPlugin),this.root=this.rootPlugin.root,this.pjson=this.rootPlugin.pjson,this.name=this.pjson.name,this.version=this.options.version||this.pjson.version||"0.0.0",this.channel=this.options.channel||w_(this.version),this.valid=this.rootPlugin.valid,this.arch=(0,ii.arch)()==="ia32"?"x86":(0,ii.arch)(),this.platform=f_.default?"wsl":(0,Um.getPlatform)(),this.windows=this.platform==="win32",this.bin=this.pjson.oclif.bin||this.name,this.binAliases=this.pjson.oclif.binAliases,this.nsisCustomization=this.pjson.oclif.nsisCustomization,this.dirname=this.pjson.oclif.dirname||this.name,this.flexibleTaxonomy=this.pjson.oclif.flexibleTaxonomy||!1,this.pjson.oclif.topicSeparator&&[" ",":"].includes(this.pjson.oclif.topicSeparator)&&(this.topicSeparator=this.pjson.oclif.topicSeparator),this.platform==="win32"&&(this.dirname=this.dirname.replace("/","\\")),this.userAgent=`${this.name}/${this.version} ${this.platform}-${this.arch} node-${process.version}`,this.shell=this._shell(),this.debug=this._debug(),this.home=process.env.HOME||this.windows&&this.windowsHome()||(0,Um.getHomeDir)()||(0,ii.tmpdir)(),this.cacheDir=this.scopedEnvVar("CACHE_DIR")||this.macosCacheDir()||this.dir("cache"),this.configDir=this.scopedEnvVar("CONFIG_DIR")||this.dir("config"),this.dataDir=this.scopedEnvVar("DATA_DIR")||this.dir("data"),this.errlog=(0,Ct.join)(this.cacheDir,"error.log"),this.binPath=this.scopedEnvVar("BINPATH"),this.npmRegistry=this.scopedEnvVar("NPM_REGISTRY")||this.pjson.oclif.npmRegistry,!this.scopedEnvVarTrue("DISABLE_THEME")){let{theme:n}=await this.loadThemes();this.theme=n}this.pjson.oclif.update=this.pjson.oclif.update||{},this.pjson.oclif.update.node=this.pjson.oclif.update.node||{};let i=this.pjson.oclif.update.s3||{};this.pjson.oclif.update.s3=i,i.bucket=this.scopedEnvVar("S3_BUCKET")||i.bucket,i.bucket&&!i.host&&(i.host=`https://${i.bucket}.s3.amazonaws.com`),i.templates={...i.templates,target:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- platform %>-<%- arch %>",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-<%- platform %>-<%- arch %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %>-<%- platform %>-<%- arch %><%- ext %>",...i.templates&&i.templates.target},vanilla:{baseDir:"<%- bin %>",manifest:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %>version",unversioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %><%- ext %>",versioned:"<%- channel === 'stable' ? '' : 'channels/' + channel + '/' %><%- bin %>-v<%- version %>/<%- bin %>-v<%- version %><%- ext %>",...i.templates&&i.templates.vanilla}},this.isSingleCommandCLI=!!(this.pjson.oclif.default||typeof this.pjson.oclif.commands!="string"&&this.pjson.oclif.commands?.strategy==="single"&&this.pjson.oclif.commands?.target),await this.loadPluginsAndCommands(),zi("config done"),t?.addDetails({commandPermutations:this.commands.length,commands:[...this.plugins.values()].reduce((n,o)=>n+o.commands.length,0),plugins:this.plugins.size,topics:this.topics.length}),t?.stop()}async loadPluginsAndCommands(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.loadAllPlugins"),{errors:i,plugins:n}=await this.pluginLoader.loadChildren({dataDir:this.dataDir,devPlugins:this.options.devPlugins,force:t?.force??!1,pluginAdditions:this.options.pluginAdditions,rootPlugin:this.rootPlugin,userPlugins:this.options.userPlugins});this.plugins=n,r?.stop();let o=we.Performance.mark(we.OCLIF_MARKER_OWNER,"config.loadAllCommands");for(let s of this.plugins.values())this.loadCommands(s),this.loadTopics(s);o?.stop();for(let s of i)this.warn(s)}async loadThemes(){let t=this.pjson.oclif.theme?(0,Ct.resolve)(this.root,this.pjson.oclif.theme):this.pjson.oclif.theme,r=(0,Ct.resolve)(this.configDir,"theme.json"),[i,n]=await Promise.all([t?await(0,qm.safeReadJson)(t):void 0,await(0,qm.safeReadJson)(r)]),o={...i,...n};return{file:n?r:t,theme:Object.keys(o).length>0?(0,p_.parseTheme)(o):void 0}}macosCacheDir(){return this.platform==="darwin"&&(0,Ct.join)(this.home,"Library","Caches",this.dirname)||void 0}async runCommand(t,r=[],i=null){let n=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runCommand#${t}`);zi("runCommand %s %o",t,r);let o=i??this.findCommand(t);if(!o){let h=this.flexibleTaxonomy?this.findMatches(t,r):[],m=this.flexibleTaxonomy&&h.length>0?await this.runHook("command_incomplete",{argv:r,id:t,matches:h}):await this.runHook("command_not_found",{argv:r,id:t});if(m.successes[0])return m.successes[0].result;throw m.failures[0]?m.failures[0].error:new ni.CLIError(`command ${t} not found`)}if(this.isJitPluginCommand(o)){let h=o.pluginName,m=this.pjson.oclif.jitPlugins[h],d=await this.runHook("jit_plugin_not_installed",{argv:r,command:o,id:t,pluginName:h,pluginVersion:m});if(d.failures[0])throw d.failures[0].error;if(d.successes[0])await this.loadPluginsAndCommands({force:!0}),o=this.findCommand(t)??o;else{let f=await this.runHook("command_not_found",{argv:r,id:t});if(f.successes[0])return f.successes[0].result;throw f.failures[0]?f.failures[0].error:new ni.CLIError(`command ${t} not found`)}}let s=await o.load();await this.runHook("prerun",{Command:s,argv:r});let c=await s.run(r,this);if(o.id==="plugins:uninstall")for(let h of r)this.plugins.delete(h);return await this.runHook("postrun",{Command:s,argv:r,result:c}),n?.addDetails({command:t,plugin:o.pluginName}),n?.stop(),c}async runHook(t,r,i,n){let o=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runHook#${t}`);zi("start %s hook",t);let s=f=>typeof f=="function"?f:f.default&&typeof f.default=="function"?f.default:Object.values(f).find(p=>typeof p=="function"),c=async(f,p)=>{let a,u=new Promise((l,g)=>{a=setTimeout(()=>{g(new Error(`Timed out after ${f} ms.`))},f).unref()});return Promise.race([p,u]).then(l=>(clearTimeout(a),l))},h={failures:[],successes:[]},d=(x_.has(t)?[this.rootPlugin]:[...this.plugins.values()]).map(async f=>{let p=et()([this.bin,f.name,"hooks",t].join(":")),a={config:this,debug:p,error(l,g={}){(0,ni.error)(l,g)},exit(l=0){(0,ni.exit)(l)},log(l,...g){d_.ux.info(l,...g)},warn(l){(0,ni.warn)(l)}},u=f.hooks[t]||[];for(let l of u){let g=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.runHook#${f.name}(${l.target})`);try{let{filePath:v,isESM:x,module:w}=await(0,g_.loadWithData)(f,await(0,v_.tsPath)(f.root,l.target,f));p("start",x?"(import)":"(require)",v);let C=w[l.identifier]??(l.identifier==="default"?s(w):void 0);if(!C){p("No hook found for hook definition:",l);continue}let S=i?await c(i,C.call(a,{...r,config:this,context:a})):await C.call(a,{...r,config:this,context:a});h.successes.push({plugin:f,result:S}),f.name==="@oclif/plugin-legacy"&&t==="init"&&this.insertLegacyPlugins(S),p("done")}catch(v){if(h.failures.push({error:v,plugin:f}),p(v),!n&&v.oclif?.exit!==void 0&&v.oclif?.exit!==0&&v.code!=="MODULE_NOT_FOUND")throw v}g?.addDetails({event:t,hook:l.target,plugin:f.name}),g?.stop()}});return await Promise.all(d),zi("%s hook done",t),o?.stop(),h}s3Key(t,r,i={}){typeof r=="object"?i=r:r&&(i.ext=r);let n=this.pjson.oclif.update.s3.templates[i.platform?"target":"vanilla"][t]??"";return h_.render(n,{...this,...i})}s3Url(t){let{host:r}=this.pjson.oclif.update.s3;if(!r)throw new Error("no s3 host is set");let i=new $m.URL(r);return i.pathname=(0,Ct.join)(i.pathname,t),i.toString()}scopedEnvVar(t){return process.env[this.scopedEnvVarKeys(t).find(r=>process.env[r])]}scopedEnvVarKey(t){return[this.bin,t].map(r=>r.replaceAll("@","").replaceAll(/[/-]/g,"_")).join("_").toUpperCase()}scopedEnvVarKeys(t){return[this.bin,...this.binAliases??[]].filter(Boolean).map(r=>[r.replaceAll("@","").replaceAll(/[/-]/g,"_"),t].join("_").toUpperCase())}scopedEnvVarTrue(t){let r=this.scopedEnvVar(t);return r==="1"||r==="true"}warn(t,r){if(!this.warned){if(typeof t=="string"){process.emitWarning(t);return}if(t instanceof Error){let i=t;i.name=`${t.name} Plugin: ${this.name}`,i.detail=(0,Rs.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
138
138
  `),process.emitWarning(t);return}process.emitWarning("Config.warn expected either a string or Error, but instead received an object"),t.name=`${t.name} Plugin: ${this.name}`,t.detail=(0,Rs.compact)([t.detail,`module: ${this._base}`,r&&`task: ${r}`,`plugin: ${this.name}`,`root: ${this.root}`,"See more details with DEBUG=*"]).join(`
139
- `),process.emitWarning(JSON.stringify(t))}}windowsHome(){return this.windowsHomedriveHome()||this.windowsUserprofileHome()}windowsHomedriveHome(){return process.env.HOMEDRIVE&&process.env.HOMEPATH&&(0,Ct.join)(process.env.HOMEDRIVE,process.env.HOMEPATH)}windowsUserprofileHome(){return process.env.USERPROFILE}_debug(){if(this.scopedEnvVarTrue("DEBUG"))return 1;try{let{enabled:t}=et()(this.bin);if(t)return 1}catch{}return 0}_shell(){let t,{COMSPEC:r}=process.env,i=process.env.SHELL??(0,ii.userInfo)().shell?.split(Ct.sep)?.pop();return i?t=i.split("/"):this.windows&&r?t=r.split(/\\|\//):t=["unknown"],t.at(-1)??"unknown"}determinePriority(t){let r=this.pjson.oclif?.plugins??[];return t.sort((n,o)=>{let s=n.pluginAlias??"A-Cannot-Find-This",c=o.pluginAlias??"B-Cannot-Find-This",h=r.indexOf(s),m=r.indexOf(c);return n.pluginType==="core"&&o.pluginType==="core"?h-m:o.pluginType==="core"&&n.pluginType!=="core"?1:n.pluginType==="core"&&o.pluginType!=="core"?-1:n.pluginType==="jit"&&o.pluginType!=="jit"?1:o.pluginType==="jit"&&n.pluginType!=="jit"?-1:0})[0]}getCmdLookupId(t){return this._commands.has(t)?t:this.commandPermutations.hasValid(t)?this.commandPermutations.getValid(t):t}getTopicLookupId(t){return this._topics.has(t)?t:this.topicPermutations.hasValid(t)?this.topicPermutations.getValid(t):t}insertLegacyPlugins(t){for(let r of t){this.plugins.set(r.name,r);for(let i of r.commands??[]){this._commands.delete(i.id);for(let n of[...i.aliases??[],...i.hiddenAliases??[]])this._commands.delete(n)}this.loadCommands(r)}}isJitPluginCommand(t){return Object.keys(this.pjson.oclif.jitPlugins??{}).includes(t.pluginName??"")&&!!(t?.pluginName&&!this.plugins.has(t.pluginName))}loadCommands(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.loadCommands#${t.name}`,{plugin:t.name});for(let i of t.commands){if(this._commands.has(i.id)){let s=this.determinePriority([this._commands.get(i.id),i]);this._commands.set(s.id,s)}else this._commands.set(i.id,i);let n=this.flexibleTaxonomy&&i.permutations===void 0?(0,Ji.getCommandIdPermutations)(i.id):i.permutations??[i.id];for(let s of n)this.commandPermutations.add(s,i.id);let o=(s,c=!1)=>{if(this._commands.has(s)){let m=this.determinePriority([this._commands.get(s),i]);this._commands.set(s,{...m,id:s})}else this._commands.set(s,{...i,hidden:c,id:s});let h=this.flexibleTaxonomy&&i.aliasPermutations===void 0?(0,Ji.getCommandIdPermutations)(s):i.permutations??[s];for(let m of h)this.commandPermutations.add(m,i.id)};for(let s of i.aliases??[])o(s);for(let s of i.hiddenAliases??[])o(s,!0)}r?.addDetails({commandCount:t.commands.length}),r?.stop()}loadTopics(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.loadTopics#${t.name}`,{plugin:t.name});for(let i of(0,Rs.compact)(t.topics)){let n=this._topics.get(i.name);n?(n.description=i.description||n.description,n.hidden=n.hidden||i.hidden):this._topics.set(i.name,i);let o=this.flexibleTaxonomy?(0,Ji.getCommandIdPermutations)(i.name):[i.name];for(let s of o)this.topicPermutations.add(s,i.name)}for(let i of t.commands.filter(n=>!n.hidden)){let n=i.id.split(":");for(;n.length>0;){let o=n.join(":");o&&!this._topics.has(o)&&this._topics.set(o,{description:i.summary||i.description,name:o}),n.pop()}}r?.stop()}};Ue.Config=gu});var $s=E($t=>{"use strict";y();Object.defineProperty($t,"__esModule",{value:!0});$t.tsPath=$t.Plugin=$t.Config=void 0;var b_=Wm();Object.defineProperty($t,"Config",{enumerable:!0,get:function(){return b_.Config}});var D_=lu();Object.defineProperty($t,"Plugin",{enumerable:!0,get:function(){return D_.Plugin}});var C_=Pr();Object.defineProperty($t,"tsPath",{enumerable:!0,get:function(){return C_.tsPath}})});var Gm=E(qs=>{"use strict";y();Object.defineProperty(qs,"__esModule",{value:!0});qs.renderList=void 0;var S_=Yt(),A_=oe(),__=cy();function F_(e,t){return __(e,S_.stdtermwidth,{skipScheme:"ansi-color"})(t).trim()}function k_(e){if(e.length===0)return"";let t=(0,A_.maxBy)(e,i=>i[0].length)?.[0].length??0;return e.map(i=>{let n=i[0],o=i[1];return o?(n=n.padEnd(t),o=F_(t+2,o),`${n} ${o}`):n}).join(`
139
+ `),process.emitWarning(JSON.stringify(t))}}windowsHome(){return this.windowsHomedriveHome()||this.windowsUserprofileHome()}windowsHomedriveHome(){return process.env.HOMEDRIVE&&process.env.HOMEPATH&&(0,Ct.join)(process.env.HOMEDRIVE,process.env.HOMEPATH)}windowsUserprofileHome(){return process.env.USERPROFILE}_debug(){if(this.scopedEnvVarTrue("DEBUG"))return 1;try{let{enabled:t}=et()(this.bin);if(t)return 1}catch{}return 0}_shell(){let t,{COMSPEC:r}=process.env,i=process.env.SHELL??(0,ii.userInfo)().shell?.split(Ct.sep)?.pop();return i?t=i.split("/"):this.windows&&r?t=r.split(/\\|\//):t=["unknown"],t.at(-1)??"unknown"}determinePriority(t){let r=this.pjson.oclif?.plugins??[];return t.sort((n,o)=>{let s=n.pluginAlias??"A-Cannot-Find-This",c=o.pluginAlias??"B-Cannot-Find-This",h=r.indexOf(s),m=r.indexOf(c);return n.pluginType==="core"&&o.pluginType==="core"?h-m:o.pluginType==="core"&&n.pluginType!=="core"?1:n.pluginType==="core"&&o.pluginType!=="core"?-1:n.pluginType==="jit"&&o.pluginType!=="jit"?1:o.pluginType==="jit"&&n.pluginType!=="jit"?-1:0})[0]}getCmdLookupId(t){return this._commands.has(t)?t:this.commandPermutations.hasValid(t)?this.commandPermutations.getValid(t):t}getTopicLookupId(t){return this._topics.has(t)?t:this.topicPermutations.hasValid(t)?this.topicPermutations.getValid(t):t}insertLegacyPlugins(t){for(let r of t){this.plugins.set(r.name,r);for(let i of r.commands??[]){this._commands.delete(i.id);for(let n of[...i.aliases??[],...i.hiddenAliases??[]])this._commands.delete(n)}this.loadCommands(r)}}isJitPluginCommand(t){return Object.keys(this.pjson.oclif.jitPlugins??{}).includes(t.pluginName??"")&&!!(t?.pluginName&&!this.plugins.has(t.pluginName))}loadCommands(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.loadCommands#${t.name}`,{plugin:t.name});for(let i of t.commands){if(this._commands.has(i.id)){let s=this.determinePriority([this._commands.get(i.id),i]);this._commands.set(s.id,s)}else this._commands.set(i.id,i);let n=this.flexibleTaxonomy&&i.permutations===void 0?(0,Ji.getCommandIdPermutations)(i.id):i.permutations??[i.id];for(let s of n)this.commandPermutations.add(s,i.id);let o=(s,c=!1)=>{if(this._commands.has(s)){let m=this.determinePriority([this._commands.get(s),i]);this._commands.set(s,{...m,id:s})}else this._commands.set(s,{...i,hidden:c,id:s});let h=this.flexibleTaxonomy&&i.aliasPermutations===void 0?(0,Ji.getCommandIdPermutations)(s):i.permutations??[s];for(let m of h)this.commandPermutations.add(m,i.id)};for(let s of i.aliases??[])o(s);for(let s of i.hiddenAliases??[])o(s,!0)}r?.addDetails({commandCount:t.commands.length}),r?.stop()}loadTopics(t){let r=we.Performance.mark(we.OCLIF_MARKER_OWNER,`config.loadTopics#${t.name}`,{plugin:t.name});for(let i of(0,Rs.compact)(t.topics)){let n=this._topics.get(i.name);n?(n.description=i.description||n.description,n.hidden=n.hidden||i.hidden):this._topics.set(i.name,i);let o=this.flexibleTaxonomy?(0,Ji.getCommandIdPermutations)(i.name):[i.name];for(let s of o)this.topicPermutations.add(s,i.name)}for(let i of t.commands.filter(n=>!n.hidden)){let n=i.id.split(":");for(;n.length>0;){let o=n.join(":");o&&!this._topics.has(o)&&this._topics.set(o,{description:i.summary||i.description,name:o}),n.pop()}}r?.stop()}};Ue.Config=gu});var $s=E($t=>{"use strict";y();Object.defineProperty($t,"__esModule",{value:!0});$t.tsPath=$t.Plugin=$t.Config=void 0;var b_=Wm();Object.defineProperty($t,"Config",{enumerable:!0,get:function(){return b_.Config}});var D_=lu();Object.defineProperty($t,"Plugin",{enumerable:!0,get:function(){return D_.Plugin}});var C_=Pr();Object.defineProperty($t,"tsPath",{enumerable:!0,get:function(){return C_.tsPath}})});var Gm=E(qs=>{"use strict";y();Object.defineProperty(qs,"__esModule",{value:!0});qs.renderList=void 0;var S_=Yt(),A_=oe(),__=ay();function F_(e,t){return __(e,S_.stdtermwidth,{skipScheme:"ansi-color"})(t).trim()}function k_(e){if(e.length===0)return"";let t=(0,A_.maxBy)(e,i=>i[0].length)?.[0].length??0;return e.map(i=>{let n=i[0],o=i[1];return o?(n=n.padEnd(t),o=F_(t+2,o),`${n} ${o}`):n}).join(`
140
140
  `)}qs.renderList=k_});var Su=E(Z=>{"use strict";y();var Xm=Z&&Z.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Z,"__esModule",{value:!0});Z.FailedFlagValidationError=Z.ArgInvalidOptionError=Z.FlagInvalidOptionError=Z.NonExistentFlagsError=Z.UnexpectedArgsError=Z.RequiredArgsError=Z.InvalidArgsSpecError=Z.CLIParseError=Z.CLIError=void 0;var T_=Xm(Be()),Wi=Xm(Ve()),Vm=Gm(),O_=$e(),P_=oe(),I_=$e();Object.defineProperty(Z,"CLIError",{enumerable:!0,get:function(){return I_.CLIError}});var lt=class extends O_.CLIError{parse;showHelp=!1;constructor(t){t.message+=`
141
141
  See more help with --help`,super(t.message,{exit:t.exit}),this.parse=t.parse}};Z.CLIParseError=lt;var vu=class extends lt{args;constructor({args:t,exit:r,parse:i}){let n="Invalid argument spec",o=Object.values(t).filter(s=>s.name);if(o.length>0){let s=(0,Vm.renderList)(o.map(c=>[`${c.name} (${c.required?"required":"optional"})`,c.description]));n+=`:
142
142
  ${s}`}super({exit:Wi.default.getInstance().get("exitCodes")?.invalidArgsSpec??r,message:n,parse:i}),this.args=t}};Z.InvalidArgsSpecError=vu;var xu=class extends lt{args;constructor({args:t,exit:r,flagsWithMultiple:i,parse:n}){let o=`Missing ${t.length} required arg${t.length===1?"":"s"}`,s=t.filter(c=>c.name);if(s.length>0){let c=(0,Vm.renderList)(s.map(h=>{let m=h.options?`(${h.options.join("|")}) ${h.description}`:h.description;return[h.name,m]}));o+=`:
@@ -148,14 +148,14 @@ Alternatively, you can use "--" to signify the end of the flags and the beginnin
148
148
  `))}`;super({exit:Wi.default.getInstance().get("exitCodes")?.failedFlagValidation??t,message:c,parse:i})}};Z.FailedFlagValidationError=Cu});var Km=E(ht=>{"use strict";y();var N_=ht&&ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ht,"__esModule",{value:!0});ht.Parser=ht.readStdin=void 0;var M_=F("node:readline"),Ym=N_(Ve()),qt=oe(),yr=Su(),Ke;try{Ke=process.env.CLI_FLAGS_DEBUG==="1"?et()("../parser"):()=>{}}catch{Ke=()=>{}}var j_=async()=>{let{stdin:e,stdout:t}=process;return e.isTTY?null:global.oclif?.stdinCache?(Ke("resolved stdin from global cache",global.oclif.stdinCache),global.oclif.stdinCache):new Promise(r=>{let i="",n=new AbortController,{signal:o}=n,s=setTimeout(()=>n.abort(),10),c=(0,M_.createInterface)({input:e,output:t,terminal:!1});c.on("line",h=>{i+=h}),c.once("close",()=>{clearTimeout(s),Ke("resolved from stdin",i),global.oclif={...global.oclif,stdinCache:i},r(i)}),o.addEventListener("abort",()=>{Ke("stdin aborted"),clearTimeout(s),c.close(),r(null)},{once:!0})})};ht.readStdin=j_;function B_(e){return/^-\d/g.test(e)}var Us=(e,t)=>{if(e.options&&!e.options.includes(t))throw new yr.FlagInvalidOptionError(e,t);return t},Au=class{input;argv;booleanFlags;context;currentFlag;flagAliases;raw=[];constructor(t){this.input=t,this.context=t.context??{},this.argv=[...t.argv],this._setNames(),this.booleanFlags=(0,qt.pickBy)(t.flags,r=>r.type==="boolean"),this.flagAliases=Object.fromEntries(Object.values(t.flags).flatMap(r=>[...r.aliases??[],...r.charAliases??[]].map(i=>[i,r])))}async parse(){this._debugInput();let t=async f=>{let{isLong:p,name:a}=this.findFlag(f);if(!a){let l=f.indexOf("=");if(l!==-1){let g=f.slice(l+1);this.argv.unshift(g);let v=await t(f.slice(0,l));return v||this.argv.shift(),v}return!1}let u=this.input.flags[a];if(u.type==="option"){if(!u.multiple&&this.raw.some(g=>g.type==="flag"&&g.flag===a))throw new yr.CLIError(`Flag --${a} can only be specified once`);this.currentFlag=u;let l=p||f.length<3?this.argv.shift():f.slice(f[2]==="="?3:2);if(u.allowStdin==="only"&&l!=="-"&&l!==void 0&&!this.findFlag(l).name)throw new yr.CLIError(`Flag --${a} can only be read from stdin. The value must be "-" or not provided at all.`);if(u.allowStdin&&l==="-"||u.allowStdin==="only"){let g=await(0,ht.readStdin)();g&&(l=g.trim())}if(typeof l!="string"||this.findFlag(l).name)throw u.options?new yr.CLIError(`Flag --${a} expects one of these values: ${u.options.join(", ")}`):new yr.CLIError(`Flag --${a} expects a value`);this.raw.push({flag:u.name,input:l,type:"flag"})}else this.raw.push({flag:u.name,input:f,type:"flag"}),!p&&f.length>2&&this.argv.unshift(`-${f.slice(2)}`);return!0},r=!0,i=[],n=!1,o=[...this.argv];for(;this.argv.length>0;){let f=this.argv.shift();if(r&&f.startsWith("-")&&f!=="-"){if(this.input["--"]!==!1&&f==="--"){r=!1;continue}if(await t(f))continue;if(f==="--"){n=!0;continue}if(this.input["--"]!==!1&&!B_(f)){i.push(f);continue}}if(r&&this.currentFlag&&this.currentFlag.multiple&&!this.currentFlag.multipleNonGreedy){this.raw.push({flag:this.currentFlag.name,input:f,type:"flag"});continue}let p=Object.keys(this.input.args)[this._argTokens.length];this.raw.push({arg:p,input:f,type:"arg"})}let[{args:s,argv:c},{flags:h,metadata:m}]=await Promise.all([this._args(),this._flags()]);this._debugOutput(c,s,h);let d=n?[...c,...i,"--"]:[...c,...i];return{args:s,argv:d.sort((f,p)=>o.indexOf(f)-o.indexOf(p)),flags:h,metadata:m,nonExistentFlags:i,raw:this.raw}}async _args(){let t=[],r={},i=this._argTokens,n=!1,o=this.context;for(let[s,c]of Object.entries(this.input.args)){let h=i.find(m=>m.arg===s);if(o.token=h,h){if(c.options&&!c.options.includes(h.input))throw new yr.ArgInvalidOptionError(c,h.input);let m=await c.parse(h.input,o,c);t.push(m),r[h.arg]=m}else if(!c.ignoreStdin&&!n){let m=await(0,ht.readStdin)();if(m){m=m.trim();let d=await c.parse(m,o,c);t.push(d),r[s]=d}n=!0}if(!r[s]&&(c.default||c.default===!1))if(typeof c.default=="function"){let m=await c.default();t.push(m),r[s]=m}else t.push(c.default),r[s]=c.default}for(let s of i)r[s.arg]===void 0&&t.push(s.input);return{args:r,argv:t}}get _argTokens(){return this.raw.filter(t=>t.type==="arg")}_debugInput(){Ke("input: %s",this.argv.join(" "));let t=Object.keys(this.input.args);t.length>0&&Ke("available args: %s",t.join(" ")),Object.keys(this.input.flags).length!==0&&Ke("available flags: %s",Object.keys(this.input.flags).map(r=>`--${r}`).join(" "))}_debugOutput(t,r,i){i.length>0&&Ke("argv: %o",i),Object.keys(t).length>0&&Ke("args: %o",t),Object.keys(r).length>0&&Ke("flags: %o",r)}async _flags(){let t=async(f,p,a,u)=>{if(!p.parse)return f;let l={...a,error:a?.error,exit:a?.exit,log:a?.log,logToStderr:a?.logToStderr,token:u,warn:a?.warn};try{return p.type==="boolean"?await p.parse(f,l,p):await p.parse(f,l,p)}catch(g){throw g.message=`Parsing --${p.name}
149
149
  ${g.message}
150
150
  See more help with --help`,Ym.default.getInstance().get("exitCodes")?.failedFlagParsing&&(g.oclif={exit:Ym.default.getInstance().get("exitCodes")?.failedFlagParsing}),g}},r=f=>{if(f.tokens?.length){if(f.inputFlag.flag.type==="boolean"&&(0,qt.last)(f.tokens)?.input)return{...f,valueFunction:async a=>t((0,qt.last)(a.tokens)?.input!==`--no-${a.inputFlag.name}`,a.inputFlag.flag,this.context,(0,qt.last)(a.tokens))};if(f.inputFlag.flag.type==="option"&&f.inputFlag.flag.delimiter&&f.inputFlag.flag.multiple)return{...f,valueFunction:async a=>(await Promise.all((a.tokens??[]).flatMap(u=>u.input.split(a.inputFlag.flag.delimiter??",")).map(u=>u.trim().replace(/^"(.*)"$/,"$1").replace(/^'(.*)'$/,"$1")).map(async u=>t(u,a.inputFlag.flag,this.context,{...(0,qt.last)(a.tokens),input:u})))).map(u=>Us(a.inputFlag.flag,u))};if(f.inputFlag.flag.type==="option"&&f.inputFlag.flag.multiple)return{...f,valueFunction:async a=>Promise.all((f.tokens??[]).map(u=>t(Us(a.inputFlag.flag,u.input),a.inputFlag.flag,this.context,u)))};if(f.inputFlag.flag.type==="option")return{...f,valueFunction:async a=>t(Us(a.inputFlag.flag,(0,qt.last)(f.tokens)?.input),a.inputFlag.flag,this.context,(0,qt.last)(f.tokens))}}if(f.inputFlag.flag.env&&process.env[f.inputFlag.flag.env]){let a=process.env[f.inputFlag.flag.env];if(f.inputFlag.flag.type==="option"&&a)return{...f,valueFunction:async u=>t(Us(u.inputFlag.flag,a),u.inputFlag.flag,this.context)};if(f.inputFlag.flag.type==="boolean")return{...f,valueFunction:async u=>(0,qt.isTruthy)(process.env[u.inputFlag.flag.env]??"false")}}return typeof f.inputFlag.flag.default!==void 0?{...f,metadata:{setFromDefault:!0},valueFunction:typeof f.inputFlag.flag.default=="function"?(a,u={})=>f.inputFlag.flag.default({flags:u,options:a.inputFlag.flag}):async()=>f.inputFlag.flag.default}:f},i=f=>f.inputFlag.flag.type==="option"&&f.inputFlag.flag.defaultHelp?{...f,helpFunction:typeof f.inputFlag.flag.defaultHelp=="function"?(p,a,...u)=>p.inputFlag.flag.defaultHelp({flags:a,options:p.inputFlag},...u):p=>p.inputFlag.flag.defaultHelp}:f,n=async f=>{let p=o(m.filter(a=>!a.metadata?.setFromDefault));return Promise.all(f.map(async a=>{try{if(a.helpFunction)return{...a,metadata:{...a.metadata,defaultHelp:await a.helpFunction?.(a,p,this.context)}}}catch{}return a}))},o=f=>Object.fromEntries(f.filter(p=>p.value!==void 0).map(p=>[p.inputFlag.name,p.value])),s=this.mapAndValidateFlags(),c=await Promise.all(Object.entries(this.input.flags).filter(([f,p])=>p.type==="boolean"||p.env||p.default!==void 0||"defaultHelp"in p||s.has(f)).map(([f,p])=>({inputFlag:{flag:p,name:f},tokens:s.get(f)})).map(f=>r(f)).filter(f=>f.valueFunction!==void 0).map(f=>i(f)).map(async f=>f.metadata?.setFromDefault?f:{...f,value:await f.valueFunction?.(f)})),h=o(c.filter(f=>!f.metadata?.setFromDefault)),m=await Promise.all(c.map(async f=>f.metadata?.setFromDefault?{...f,value:await f.valueFunction?.(f,h)}:f)),d=m.some(f=>typeof f.helpFunction=="function")?await n(m):m;return{flags:o(d),metadata:{flags:Object.fromEntries(d.filter(f=>f.metadata).map(f=>[f.inputFlag.name,f.metadata]))}}}_setNames(){for(let t of Object.keys(this.input.flags))this.input.flags[t].name=t;for(let t of Object.keys(this.input.args))this.input.args[t].name=t}findFlag(t){let r=t.startsWith("--"),i=r?!1:t.startsWith("-"),n=r?this.findLongFlag(t):i?this.findShortFlag(t):void 0;return{isLong:r,name:n}}findLongFlag(t){let r=t.slice(2);if(this.input.flags[r])return r;if(this.flagAliases[r])return this.flagAliases[r].name;if(t.startsWith("--no-")){let i=this.booleanFlags[t.slice(5)];if(i&&i.allowNo)return i.name}}findShortFlag([t,r]){return this.flagAliases[r]?this.flagAliases[r].name:Object.keys(this.input.flags).find(i=>this.input.flags[i].char===r&&r!==void 0&&this.input.flags[i].char!==void 0)}mapAndValidateFlags(){let t=new Map;for(let r of this.raw.filter(i=>i.type==="flag")){if(!(r.flag in this.input.flags))throw new yr.CLIError(`Unexpected flag ${r.flag}`);let i=t.get(r.flag)??[];t.set(r.flag,[...i,r])}return t}};ht.Parser=Au});var Qm=E(Hs=>{"use strict";y();Object.defineProperty(Hs,"__esModule",{value:!0});Hs.validate=void 0;var R_=oe(),Gi=Su();async function L_(e){let t;function r(){if(e.output.nonExistentFlags?.length>0)throw new Gi.NonExistentFlagsError({flags:e.output.nonExistentFlags,parse:e});let p=Object.keys(e.input.args).length;if(e.input.strict&&e.output.argv.length>p){let l=e.output.argv.slice(p);throw new Gi.UnexpectedArgsError({args:l,parse:e})}let a=[],u=!1;for(let[l,g]of Object.entries(e.input.args)){if(!g.required)u=!0;else if(u)throw new Gi.InvalidArgsSpecError({args:e.input.args,parse:e});g.required&&e.output.args[l]===void 0&&a.push(g)}if(a.length>0){let l=Object.entries(e.input.flags).filter(([g,v])=>v.type==="option"&&!!v.multiple).map(([g])=>g);throw new Gi.RequiredArgsError({args:a,flagsWithMultiple:l,parse:e})}}async function i(){let p=Object.entries(e.input.flags).flatMap(([l,g])=>e.output.flags[l]!==void 0?[...g.relationships?f(l,g):[],...g.dependsOn?[m(l,g.dependsOn)]:[],...g.exclusive?[c(l,g.exclusive)]:[],...g.exactlyOne?[h(l,g.exactlyOne)]:[]]:g.required?[{name:l,reason:`Missing required flag ${l}`,status:"failed",validationFn:"required"}]:g.exactlyOne&&g.exactlyOne.length>0?[s(g)]:[]),u=(await Promise.all(p)).filter(l=>l.status==="failed");if(u.length>0)throw new Gi.FailedFlagValidationError({failed:u,parse:e})}async function n(p){if(t)return t;let a=p.map(async l=>typeof l=="string"?[l,e.output.flags[l]]:await l.when(e.output.flags)?[l.name,e.output.flags[l.name]]:null),u=await Promise.all(a);return t=Object.fromEntries(u.filter(l=>l!==null)),t}let o=p=>Object.keys(p).filter(a=>a!==void 0);function s(p){let a={name:p.name,validationFn:"validateAcrossFlags"};if(Object.entries(e.input.flags).map(l=>l[0]).filter(l=>e.output.flags[l]!==void 0).filter(l=>p.exactlyOne&&p.exactlyOne.includes(l)).length===0){let g=`Exactly one of the following must be provided: ${(0,R_.uniq)(p.exactlyOne?.map(v=>`--${v}`)??[]).join(", ")}`;return{...a,reason:g,status:"failed"}}return{...a,status:"success"}}async function c(p,a){let u={name:p,validationFn:"validateExclusive"},l=await n(a),g=o(l);for(let v of g)if(!(e.output.metadata.flags&&e.output.metadata.flags[v]?.setFromDefault)&&!(e.output.metadata.flags&&e.output.metadata.flags[p]?.setFromDefault)&&e.output.flags[v]!==void 0){let x=e.output.metadata.flags?.[v]?.defaultHelp??e.output.flags[v];return{...u,reason:`--${v}=${x} cannot also be provided when using --${p}`,status:"failed"}}return{...u,status:"success"}}async function h(p,a){let u={name:p,validationFn:"validateExactlyOne"},l=await n(a),g=o(l);for(let v of g)if(v!==p&&e.output.flags[v]!==void 0)return{...u,reason:`--${v} cannot also be provided when using --${p}`,status:"failed"};return{...u,status:"success"}}async function m(p,a){let u={name:p,validationFn:"validateDependsOn"},l=await n(a);if(!Object.values(l).every(v=>v!==void 0)){let v=Object.keys(l).map(x=>`--${x}`).join(", ");return{...u,reason:`All of the following must be provided when using --${p}: ${v}`,status:"failed"}}return{...u,status:"success"}}async function d(p,a){let u={name:p,validationFn:"validateSome"},l=await n(a);if(!Object.values(l).some(Boolean)){let v=Object.keys(l).map(x=>`--${x}`).join(", ");return{...u,reason:`One of the following must be provided when using --${p}: ${v}`,status:"failed"}}return{...u,status:"success"}}function f(p,a){return(a.relationships??[]).map(u=>{switch(u.type){case"all":return m(p,u.flags);case"some":return d(p,u.flags);case"none":return c(p,u.flags);default:throw new Error(`Unknown relationship type: ${u.type}`)}})}return r(),i()}Hs.validate=L_});var eg=E(Ut=>{"use strict";y();var $_=Ut&&Ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ut,"__esModule",{value:!0});Ut.flagUsages=Ut.flagUsage=void 0;var q_=$_(Be()),U_=oe();function Zm(e,t={}){let r=[];e.helpLabel?r.push(e.helpLabel):(e.char&&r.push(`-${e.char}`),e.name&&r.push(` --${e.name}`));let i=e.type==="option"?` ${e.name.toUpperCase()}`:"",n=e.summary||e.description||"";return t.displayRequired&&e.required&&(n=`(required) ${n}`),n=n?q_.default.dim(n):void 0,[` ${r.join(",").trim()}${i}`,n]}Ut.flagUsage=Zm;function H_(e,t={}){return e.length===0?[]:(0,U_.sortBy)(e,r=>[r.char?-1:1,r.char,r.name]).map(r=>Zm(r,t))}Ut.flagUsages=H_});var _u=E(si=>{"use strict";y();Object.defineProperty(si,"__esModule",{value:!0});si.parse=si.flagUsages=void 0;var z_=Km(),J_=Qm(),W_=eg();Object.defineProperty(si,"flagUsages",{enumerable:!0,get:function(){return W_.flagUsages}});async function G_(e,t){let r={"--":t["--"],args:t.args??{},argv:e,context:t.context,flags:t.flags??{},strict:t.strict!==!1},n=await new z_.Parser(r).parse();return await(0,J_.validate)({input:r,output:n}),n}si.parse=G_});var ag=E(He=>{"use strict";y();var X_=He&&He.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),V_=He&&He.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ng=He&&He.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&X_(t,e,r);return V_(t,e),t},sg=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(He,"__esModule",{value:!0});He.Command=void 0;var Y_=sg(Be()),K_=F("node:url"),tg=F("node:util"),og=sg(Ve()),zs=Li(),Q_=$s(),oi=ng($e()),Xi=Mr(),Z_=ng(_u()),rg=nu(),Fu=Nr(),eF=oe(),ig=og.default.getInstance().get("@oclif/core");process.stdout.on("error",e=>{if(!(e&&e.code==="EPIPE"))throw e});var ku=class{argv;config;static aliases=[];static args={};static baseFlags;static deprecateAliases;static deprecationOptions;static description;static enableJsonFlag=!1;static examples;static flags;static hasDynamicHelp=!1;static help;static hidden;static hiddenAliases=[];static id;static plugin;static pluginAlias;static pluginName;static pluginType;static state;static strict=!0;static summary;static usage;debug;id;static _base=`${ig.name}@${ig.version}`;constructor(t,r){this.argv=t,this.config=r,this.id=this.ctor.id;try{this.debug=et()(this.id?`${this.config.bin}:${this.id}`:this.config.bin)}catch{this.debug=()=>{}}}static async run(t,r){t||(t=process.argv.slice(2)),typeof r=="string"&&r.startsWith("file://")&&(r=(0,K_.fileURLToPath)(r));let i=await Q_.Config.load(r||F.main?.filename||__dirname),n=new this(t,i);if(!n.id){let o=n.constructor.name.toLowerCase();n.id=o,n.ctor.id=o}return n._run()}get ctor(){return this.constructor}async catch(t){if(process.exitCode=process.exitCode??t.exitCode??1,this.jsonEnabled())this.logJson(this.toErrorJson(t));else{if(!t.message)throw t;try{zs.ux.action.stop(Y_.default.bold.red("!"))}catch{}throw t}}error(t,r={}){return oi.error(t,r)}exit(t=0){oi.exit(t)}async finally(t){try{let{config:r}=oi;r.errorLogger&&await r.errorLogger.flush()}catch(r){console.error(r)}}async init(){this.debug("init version: %s argv: %o",this.ctor._base,this.argv),this.config.debug&&(oi.config.debug=!0),this.config.errlog&&(oi.config.errlog=this.config.errlog);let t=global;t["http-call"]=t["http-call"]||{},t["http-call"].userAgent=this.config.userAgent,this.warnIfCommandDeprecated()}jsonEnabled(){if(!this.ctor.enableJsonFlag)return!1;if(this.config.scopedEnvVar?.("CONTENT_TYPE")?.toLowerCase()==="json")return!0;let t=this.argv.indexOf("--"),r=this.argv.indexOf("--json");return t===-1?r>-1:r>-1&&r<t}log(t="",...r){this.jsonEnabled()||(t=typeof t=="string"?t:(0,tg.inspect)(t),zs.ux.info(t,...r))}logJson(t){zs.ux.styledJSON(t)}logToStderr(t="",...r){this.jsonEnabled()||(t=typeof t=="string"?t:(0,tg.inspect)(t),zs.ux.logToStderr(t,...r))}async parse(t,r=this.argv){t||(t=this.ctor);let i={context:this,...t,flags:(0,rg.aggregateFlags)(t.flags,t.baseFlags,t.enableJsonFlag)},n=await this.config.runHook("preparse",{argv:[...r],options:i}),o=n.successes?.length?n.successes.find(c=>c.plugin.root===og.default.getInstance().get("rootPlugin")?.root)?.result??r:r;this.argv=[...o];let s=await Z_.parse(o,i);return this.warnIfFlagDeprecated(s.flags??{}),s}toErrorJson(t){return{error:t}}toSuccessJson(t){return t}warn(t){return this.jsonEnabled()||oi.warn(t),t}warnIfCommandDeprecated(){let[t]=(0,Xi.normalizeArgv)(this.config);if(this.ctor.deprecateAliases&&this.ctor.aliases.includes(t)){let r=(0,Fu.toConfiguredId)(this.ctor.id,this.config),i=(0,Fu.toConfiguredId)(t,this.config);this.warn((0,Xi.formatCommandDeprecationWarning)(i,{to:r}))}if(this.ctor.state==="deprecated"){let r=(0,Fu.toConfiguredId)(this.ctor.id,this.config);this.warn((0,Xi.formatCommandDeprecationWarning)(r,this.ctor.deprecationOptions))}}warnIfFlagDeprecated(t){let r=(0,rg.aggregateFlags)(this.ctor.flags,this.ctor.baseFlags,this.ctor.enableJsonFlag);for(let i of Object.keys(t)){let n=r[i],o=n?.deprecated;if(o&&this.warn((0,Xi.formatFlagDeprecationWarning)(i,o)),n?.deprecateAliases){let c=(0,eF.uniq)([...n?.aliases??[],...n?.charAliases??[]]).map(m=>m.length===1?`-${m}`:`--${m}`);if(c.length===0)return;let h=c.filter(m=>this.argv.some(d=>d.startsWith(m)));for(let m of h){let d=`--${n?.name}`;n?.char&&(d+=` | -${n?.char}`),this.warn((0,Xi.formatFlagDeprecationWarning)(m,{to:d}))}}}}async _run(){let t,r;try{this.removeEnvVar("REDIRECTED"),await this.init(),r=await this.run()}catch(i){t=i,await this.catch(i)}finally{await this.finally(t)}return r&&this.jsonEnabled()&&this.logJson(this.toSuccessJson(r)),r}removeEnvVar(t){let r=[];try{r.push(...this.config.scopedEnvVarKeys(t))}catch{r.push(this.config.scopedEnvVarKey(t))}r.map(i=>delete process.env[i])}};He.Command=ku});var Pu=E(ze=>{"use strict";y();var tF=ze&&ze.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ze,"__esModule",{value:!0});ze.run=ze.versionAddition=ze.helpAddition=void 0;var ug=F("node:url"),rF=tF(Ve()),iF=Li(),nF=$s(),Ou=Ai(),ai=Yr(),sF=Fn(),Tu=et()("oclif:main"),oF=(e,t)=>{if(e.length===0&&!t.isSingleCommandCLI)return!0;let r=(0,Ou.getHelpFlagAdditions)(t);for(let i of e){if(r.includes(i))return!0;if(i==="--")return!1}return!1};ze.helpAddition=oF;var aF=(e,t)=>{let r=t?.pjson.oclif.additionalVersionFlags??[];return!![...new Set(["--version",...r]).values()].includes(e[0])};ze.versionAddition=aF;async function uF(e,t){let r=ai.Performance.mark(ai.OCLIF_MARKER_OWNER,"main.run"),i=ai.Performance.mark(ai.OCLIF_MARKER_OWNER,"main.run#init"),n=async()=>{r?.stop(),i?.stopped||i?.stop(),await ai.Performance.collect(),ai.Performance.debug()},o=async d=>{let f=await(0,Ou.loadHelpClass)(s);await new f(s,s.pjson.oclif.helpOptions??s.pjson.helpOptions).showHelp(d)};Tu(`process.execPath: ${process.execPath}`),Tu(`process.execArgv: ${process.execArgv}`),Tu("process.argv: %O",process.argv),e=e??process.argv.slice(2),t&&(typeof t=="string"&&t.startsWith("file://")||t instanceof ug.URL)&&(t=(0,ug.fileURLToPath)(t));let s=await nF.Config.load(t??F.main?.filename??__dirname);rF.default.getInstance().set("config",s),s.isSingleCommandCLI&&(e=[sF.SINGLE_COMMAND_CLI_SYMBOL,...e]);let[c,...h]=(0,Ou.normalizeArgv)(s,e);if(await s.runHook("init",{argv:h,id:c}),(0,ze.versionAddition)(e,s)){iF.ux.log(s.userAgent),await n();return}if((0,ze.helpAddition)(e,s)){await o(e),await n();return}let m=s.findCommand(c);if(!m&&(s.flexibleTaxonomy?null:s.findTopic(c))){await o([c]),await n();return}i?.stop();try{return await s.runCommand(c,h,m)}finally{await n()}}ze.run=uF});var cg=E(Js=>{"use strict";y();Object.defineProperty(Js,"__esModule",{value:!0});Js.execute=void 0;var cF=zn(),lF=$e(),hF=Bn(),fF=Pu(),dF=Pt();async function pF(e){if(!e.dir&&!e.loadOptions)throw new lF.CLIError("dir or loadOptions is required.");return e.development&&(process.env.NODE_ENV="development",dF.settings.debug=!0),(0,fF.run)(e.args??process.argv.slice(2),e.loadOptions??e.dir).then(async t=>((0,cF.flush)(),t)).catch(async t=>(0,hF.handle)(t))}Js.execute=pF});var hg=E(lg=>{"use strict";y();Object.defineProperty(lg,"__esModule",{value:!0})});var Gs=E(O=>{"use strict";y();var mF=O&&O.__createBinding||(Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]})),gF=O&&O.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),vr=O&&O.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&mF(t,e,r);return gF(t,e),t},yF=O&&O.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(O,"__esModule",{value:!0});O.toStandardizedId=O.toConfiguredId=O.settings=O.Performance=O.Parser=O.ModuleLoader=O.run=O.Interfaces=O.loadHelpClass=O.HelpBase=O.Help=O.CommandHelp=O.Flags=O.execute=O.handle=O.Errors=O.Plugin=O.Config=O.Command=O.stdout=O.stderr=O.flush=O.ux=O.Args=void 0;var vF=yF(Ot());function xF(){try{process.cwd()}catch(e){e.code==="ENOENT"&&vF.default.stderr(`WARNING: current directory does not exist
151
- `)}}xF();O.Args=vr(Gc());O.ux=vr(Li());var wF=zn();Object.defineProperty(O,"flush",{enumerable:!0,get:function(){return wF.flush}});var fg=Ap();Object.defineProperty(O,"stderr",{enumerable:!0,get:function(){return fg.stderr}});Object.defineProperty(O,"stdout",{enumerable:!0,get:function(){return fg.stdout}});var EF=ag();Object.defineProperty(O,"Command",{enumerable:!0,get:function(){return EF.Command}});var dg=$s();Object.defineProperty(O,"Config",{enumerable:!0,get:function(){return dg.Config}});Object.defineProperty(O,"Plugin",{enumerable:!0,get:function(){return dg.Plugin}});O.Errors=vr($e());var bF=Bn();Object.defineProperty(O,"handle",{enumerable:!0,get:function(){return bF.handle}});var DF=cg();Object.defineProperty(O,"execute",{enumerable:!0,get:function(){return DF.execute}});O.Flags=vr(os());var Ws=Ai();Object.defineProperty(O,"CommandHelp",{enumerable:!0,get:function(){return Ws.CommandHelp}});Object.defineProperty(O,"Help",{enumerable:!0,get:function(){return Ws.Help}});Object.defineProperty(O,"HelpBase",{enumerable:!0,get:function(){return Ws.HelpBase}});Object.defineProperty(O,"loadHelpClass",{enumerable:!0,get:function(){return Ws.loadHelpClass}});O.Interfaces=vr(hg());var CF=Pu();Object.defineProperty(O,"run",{enumerable:!0,get:function(){return CF.run}});O.ModuleLoader=vr(Ei());O.Parser=vr(_u());var SF=Yr();Object.defineProperty(O,"Performance",{enumerable:!0,get:function(){return SF.Performance}});var AF=Pt();Object.defineProperty(O,"settings",{enumerable:!0,get:function(){return AF.settings}});var pg=Nr();Object.defineProperty(O,"toConfiguredId",{enumerable:!0,get:function(){return pg.toConfiguredId}});Object.defineProperty(O,"toStandardizedId",{enumerable:!0,get:function(){return pg.toStandardizedId}})});y();import{createRequire as fy}from"node:module";import{pathToFileURL as qc}from"node:url";var Uc=fy(import.meta.url);async function Hc(e){let t;try{t=Uc.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]})}catch(o){throw o instanceof Error&&o.code==="MODULE_NOT_FOUND"?new I("Could not find the 'vite' package in your project.","Hydrogen uses Vite to run this command.",["Run this command from the root directory of your Hydrogen app.","Install your project dependencies (for example, by running `npm install`) and try again."]):o}let r=await kc(t),i=r.content.exports?.["."];typeof i!="string"&&(i=i?.import),typeof i!="string"&&(i=i.default);let n=N(le(r.path),i);return import(qc(n).href)}function dy(e,t){let r=Uc.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import(qc(r).href)}y();var io=nn(Gs(),1);y();var ee=nn(Gs(),1);y();y();y();import{fileURLToPath as mg}from"node:url";import{existsSync as kF}from"node:fs";y();import{exec as _F}from"node:child_process";import{promisify as FF}from"node:util";var Qe=FF(_F);function $N(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var Nu=new URL("../../..",import.meta.url).pathname,Vi=(()=>{try{let e=N(le(Nu),"templates","skeleton");return kF(e)}catch{return!1}})(),VN=Vi?Nu:void 0,TF="assets/hydrogen",OF="starter",Ht="routes",Iu;async function PF(){if(Iu??=await mc("package.json",{cwd:mg(import.meta.url),type:"file"}),!Iu)throw new I("Could not find assets directory","Please report this error.");return Iu}async function Ze(e,...t){return N(le(await PF()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${TF}`,e??"",...t)}async function Yi(e,t){t??=await Mu();let r=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return r.protocol==="file:"?mg(r):r.toString()}function Mu(e=!!process.env.SHOPIFY_UNIT_TEST){return e?Xs():Ze(OF)}function Xs(){if(!Vi)throw new I("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return N(le(Nu),"templates","skeleton")}function IF(){return N(Xs(),"node_modules")}async function gg(){if(Vi)return IF();let{stdout:e}=await Qe("npm root");return e.trim()}var ju=["tailwind","vanilla-extract","css-modules","postcss"];async function yg(e,t,r,i=(n,o)=>n){let n=await Ze(e);return Promise.all(Object.entries(t).map(async([o,s])=>{let c=await X(N(n,o));await V(N(r,s),i(c,o))}))}async function vg(e,t,r){let i=Object.values(e).map(o=>U(N(t,o)).then(s=>s?o:null)),n=(await Promise.all(i)).filter(Boolean);return!(n.length>0&&!r&&!await rt({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}y();y();import{readdir as NF}from"node:fs/promises";y();hy();import*as xg from"fs/promises";import*as wg from"path";var Bu={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function ft(e=process.cwd()){let t=(await xg.lstat(e)).isFile()?e:wg.resolve(e,"prettier.file");try{return await Rc(t)||Bu}catch{return Bu}}async function zt(e,t=Bu,r=""){let i=sn(r);return Lc(e,{parser:i===".tsx"||i===".ts"?"typescript":"babel",...t})}async function ui(e,t,r){let i=await r(await X(e));if(typeof i=="string")return t&&(i=await zt(i,t,e)),V(e,i)}var MF=["tsx","ts","jsx","js","mjs","cjs"];async function be(e,t,r=MF){let i=await NF(e);if(i.includes(t)){let n=J(e,t);if(!await un(n))return{filepath:n};for(let o of["ts","js"]){let s=J(e,`${t}/index.${o}`);if(await U(J(e,s)))return{filepath:s,extension:o,astType:o}}}else for(let n of r){let o=`${t}.${n}`;if(i.includes(o)){let s=n==="mjs"||n==="cjs"?"js":n;return{filepath:J(e,o),extension:n,astType:s}}}return{}}var Eg=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function Vs(e,t,r){let i=await po(N(t,"package.json")),n=await po(N(e,"package.json")),o=new Set(["comment",...r?.ignoredKeys??[]]),s=Object.keys(n).filter(h=>!Eg.includes(h));for(let h of s){if(o.has(h))continue;let m=n[h],d=i[h],f=Array.isArray(m)&&Array.isArray(d)?[...d,...m]:typeof m=="object"&&typeof d=="object"?{...d,...m}:m;i[h]=f}let c=Object.entries(i.dependencies||{}).find(([h])=>h.startsWith("@remix-run/"))?.[1];for(let h of Eg)o.has(h)||n[h]&&(i[h]=[...new Set([...Object.keys(i[h]??{}),...Object.keys(n[h]??{})])].sort().reduce((m,d)=>{let f=n[h]?.[d]??i[h]?.[d];return d.startsWith("@remix-run/")&&c&&(f=c),m[d]=f,m},{}));await Tc(t,r?.onResult?.(i)??i)}y();y();async function Ki(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function bg(e,t,r){let{filepath:i,astType:n}=await be(e,"root");if(!i||!n)throw new I(`Could not find root file in ${e}`);await ui(i,t,async o=>{let s=`import ${r.isDefault?r.name:`{${r.name}}`} from '${(r.isAbsolute?"":"./")+r.path}';`;if(o.includes(s.split("from")[0]))return;let h=(await Ki(n)).parse(o).root(),m=h.findAll({rule:{kind:"import_statement"}}).reverse(),d=m.find(l=>l.text().includes(".css"))||m.shift(),f=h.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!d||!f)throw new I('Could not find a "links" export in root file. Please add one and try again.');let p=d.text(),a=f.text(),u=r.isConditional?`{${r.name} && <link rel="stylesheet" href={${r.name}}></link>}`:`<link rel="stylesheet" href={${r.name}}></link>`;return o.replace(p,p+`
151
+ `)}}xF();O.Args=vr(Gc());O.ux=vr(Li());var wF=zn();Object.defineProperty(O,"flush",{enumerable:!0,get:function(){return wF.flush}});var fg=Ap();Object.defineProperty(O,"stderr",{enumerable:!0,get:function(){return fg.stderr}});Object.defineProperty(O,"stdout",{enumerable:!0,get:function(){return fg.stdout}});var EF=ag();Object.defineProperty(O,"Command",{enumerable:!0,get:function(){return EF.Command}});var dg=$s();Object.defineProperty(O,"Config",{enumerable:!0,get:function(){return dg.Config}});Object.defineProperty(O,"Plugin",{enumerable:!0,get:function(){return dg.Plugin}});O.Errors=vr($e());var bF=Bn();Object.defineProperty(O,"handle",{enumerable:!0,get:function(){return bF.handle}});var DF=cg();Object.defineProperty(O,"execute",{enumerable:!0,get:function(){return DF.execute}});O.Flags=vr(os());var Ws=Ai();Object.defineProperty(O,"CommandHelp",{enumerable:!0,get:function(){return Ws.CommandHelp}});Object.defineProperty(O,"Help",{enumerable:!0,get:function(){return Ws.Help}});Object.defineProperty(O,"HelpBase",{enumerable:!0,get:function(){return Ws.HelpBase}});Object.defineProperty(O,"loadHelpClass",{enumerable:!0,get:function(){return Ws.loadHelpClass}});O.Interfaces=vr(hg());var CF=Pu();Object.defineProperty(O,"run",{enumerable:!0,get:function(){return CF.run}});O.ModuleLoader=vr(Ei());O.Parser=vr(_u());var SF=Yr();Object.defineProperty(O,"Performance",{enumerable:!0,get:function(){return SF.Performance}});var AF=Pt();Object.defineProperty(O,"settings",{enumerable:!0,get:function(){return AF.settings}});var pg=Nr();Object.defineProperty(O,"toConfiguredId",{enumerable:!0,get:function(){return pg.toConfiguredId}});Object.defineProperty(O,"toStandardizedId",{enumerable:!0,get:function(){return pg.toStandardizedId}})});y();import{createRequire as fy}from"node:module";import{pathToFileURL as qc}from"node:url";var Uc=fy(import.meta.url);async function Hc(e){let t;try{t=Uc.resolve("vite",process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[e]})}catch(o){throw o instanceof Error&&o.code==="MODULE_NOT_FOUND"?new I("Could not find the 'vite' package in your project.","Hydrogen uses Vite to run this command.",["Run this command from the root directory of your Hydrogen app.","Install your project dependencies (for example, by running `npm install`) and try again."]):o}let r=await kc(t),i=r.content.exports?.["."];typeof i!="string"&&(i=i?.import),typeof i!="string"&&(i=i.default);let n=N(le(r.path),i);return import(qc(n).href)}function dy(e,t){let r=Uc.resolve(e,process.env.SHOPIFY_UNIT_TEST?void 0:{paths:[t]});return import(qc(r).href)}y();var io=nn(Gs(),1);y();var ee=nn(Gs(),1);y();y();y();import{fileURLToPath as mg}from"node:url";import{existsSync as kF}from"node:fs";y();import{exec as _F}from"node:child_process";import{promisify as FF}from"node:util";var Qe=FF(_F);function $N(){let e=process.listeners("warning")[0];e&&(process.removeAllListeners("warning"),process.prependListener("warning",t=>{t.name!="ExperimentalWarning"&&e(t)}))}var Nu=new URL("../../..",import.meta.url).pathname,Vi=(()=>{try{let e=N(le(Nu),"templates","skeleton");return kF(e)}catch{return!1}})(),VN=Vi?Nu:void 0,TF="assets/hydrogen",OF="starter",Ht="routes",Iu;async function PF(){if(Iu??=await vc("package.json",{cwd:mg(import.meta.url),type:"file"}),!Iu)throw new I("Could not find assets directory","Please report this error.");return Iu}async function Ze(e,...t){return N(le(await PF()),process.env.SHOPIFY_UNIT_TEST?"assets":`dist/${TF}`,e??"",...t)}async function Yi(e,t){t??=await Mu();let r=new URL(`${t}/app${e?`/${e}`:""}`,import.meta.url);return r.protocol==="file:"?mg(r):r.toString()}function Mu(e=!!process.env.SHOPIFY_UNIT_TEST){return e?Xs():Ze(OF)}function Xs(){if(!Vi)throw new I("Trying to use skeleton source dir outside of Hydrogen monorepo.","Please report this error.");return N(le(Nu),"templates","skeleton")}function IF(){return N(Xs(),"node_modules")}async function gg(){if(Vi)return IF();let{stdout:e}=await Qe("npm root");return e.trim()}var ju=["tailwind","vanilla-extract","css-modules","postcss"];async function yg(e,t,r,i=(n,o)=>n){let n=await Ze(e);return Promise.all(Object.entries(t).map(async([o,s])=>{let c=await X(N(n,o));await V(N(r,s),i(c,o))}))}async function vg(e,t,r){let i=Object.values(e).map(o=>U(N(t,o)).then(s=>s?o:null)),n=(await Promise.all(i)).filter(Boolean);return!(n.length>0&&!r&&!await rt({message:`Some files already exist (${n.join(", ")}). Overwrite?`,defaultValue:!1}))}y();y();import{readdir as NF}from"node:fs/promises";y();hy();import*as xg from"fs/promises";import*as wg from"path";var Bu={arrowParens:"always",singleQuote:!0,bracketSpacing:!1,trailingComma:"all"};async function ft(e=process.cwd()){let t=(await xg.lstat(e)).isFile()?e:wg.resolve(e,"prettier.file");try{return await Rc(t)||Bu}catch{return Bu}}async function zt(e,t=Bu,r=""){let i=sn(r);return Lc(e,{parser:i===".tsx"||i===".ts"?"typescript":"babel",...t})}async function ui(e,t,r){let i=await r(await X(e));if(typeof i=="string")return t&&(i=await zt(i,t,e)),V(e,i)}var MF=["tsx","ts","jsx","js","mjs","cjs"];async function be(e,t,r=MF){let i=await NF(e);if(i.includes(t)){let n=J(e,t);if(!await un(n))return{filepath:n};for(let o of["ts","js"]){let s=J(e,`${t}/index.${o}`);if(await U(J(e,s)))return{filepath:s,extension:o,astType:o}}}else for(let n of r){let o=`${t}.${n}`;if(i.includes(o)){let s=n==="mjs"||n==="cjs"?"js":n;return{filepath:J(e,o),extension:n,astType:s}}}return{}}var Eg=Object.freeze(["dependencies","devDependencies","peerDependencies"]);async function Vs(e,t,r){let i=await po(N(t,"package.json")),n=await po(N(e,"package.json")),o=new Set(["comment",...r?.ignoredKeys??[]]),s=Object.keys(n).filter(h=>!Eg.includes(h));for(let h of s){if(o.has(h))continue;let m=n[h],d=i[h],f=Array.isArray(m)&&Array.isArray(d)?[...d,...m]:typeof m=="object"&&typeof d=="object"?{...d,...m}:m;i[h]=f}let c=Object.entries(i.dependencies||{}).find(([h])=>h.startsWith("@remix-run/"))?.[1];for(let h of Eg)o.has(h)||n[h]&&(i[h]=[...new Set([...Object.keys(i[h]??{}),...Object.keys(n[h]??{})])].sort().reduce((m,d)=>{let f=n[h]?.[d]??i[h]?.[d];return d.startsWith("@remix-run/")&&c&&(f=c),m[d]=f,m},{}));await Tc(t,r?.onResult?.(i)??i)}y();y();async function Ki(e){let t=await import("@ast-grep/napi");if(!(e in t))throw new Error(`Wrong language for AST: ${e}`);return t[e]}async function bg(e,t,r){let{filepath:i,astType:n}=await be(e,"root");if(!i||!n)throw new I(`Could not find root file in ${e}`);await ui(i,t,async o=>{let s=`import ${r.isDefault?r.name:`{${r.name}}`} from '${(r.isAbsolute?"":"./")+r.path}';`;if(o.includes(s.split("from")[0]))return;let h=(await Ki(n)).parse(o).root(),m=h.findAll({rule:{kind:"import_statement"}}).reverse(),d=m.find(l=>l.text().includes(".css"))||m.shift(),f=h.find({rule:{kind:"jsx_element",regex:"resetStyles",has:{kind:"jsx_opening_element",has:{kind:"identifier",pattern:"link"}}}});if(!d||!f)throw new I('Could not find a "links" export in root file. Please add one and try again.');let p=d.text(),a=f.text(),u=r.isConditional?`{${r.name} && <link rel="stylesheet" href={${r.name}}></link>}`:`<link rel="stylesheet" href={${r.name}}></link>`;return o.replace(p,p+`
152
152
  `+s).replace(a,u+`
153
153
  `+a)})}async function Ys(e,t,r,i){let{filepath:n,astType:o}=await be(e,"vite.config");if(!n||!o)throw new I(`Could not find vite.config file in ${e}`);await ui(n,t,async s=>{let c=`import ${r.isDefault?r.name:`{${r.name}}`} from '${r.path}';`;if(new RegExp(`['"]${r.path.replace("/","\\/")}['"]`).test(s))return;let m=(await Ki(o)).parse(s).root(),d=m.findAll({rule:{kind:"import_statement"}}).pop(),f=m.find(jF);if(!d||!f)throw new I('Could not find a "plugins" key in Vite config file. Please add one and try again.');let p=d.text(),a=f.text(),u=`${r.name}(${i?JSON.stringify(i):""})`;return s.replace(p,p+`
154
- `+c).replace(a,a.replace("[",`[${u},`))})}var jF={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var Dg="styles/tailwind.css";async function Cg({rootDirectory:e,appDirectory:t},r=!1){let i=kt(e,t),n={"tailwind.css":N(i,Dg)};if(!await vg(n,t,r)){it("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([Vs(await Ze("tailwind"),e),yg("tailwind",n,e),ft(e).then(s=>Promise.all([bg(t,s,{name:"tailwindCss",path:`${Dg}?url`,isDefault:!0}),Ys(e,s,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}y();async function Sg({rootDirectory:e}){return{workPromise:Promise.all([Vs(await Ze("vanilla-extract"),e),ft(e).then(r=>Ys(e,r,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var Ru=[...ju,"none"],Lu={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},qM={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Ag(e,t,r){switch(e){case"tailwind":return Cg(t,r);case"vanilla-extract":return Sg(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function _g(e){let t=Object.entries({...Lu,...e?.extraChoices});return tt({message:"Select a styling library",...e,choices:t.map(([r,i])=>({value:r,label:i})),defaultValue:"tailwind"})}y();y();y();y();async function Jt(e,t,r=!0){let{transpileTs:i}=await import("./morph-BMYYMQNX.js");return i(e,t,r)}y();var Fg={checkJs:!1,target:"ES2022",module:"ES2022",moduleResolution:"bundler",baseUrl:".",paths:{"~/*":["app/*"]}},BF=new Set(["noLib","target","module","moduleResolution","checkJs","experimentalDecorators","allowSyntheticDefaultImports","baseUrl","paths",...Object.keys(Fg)]);function RF(e,t=!1){let r={compilerOptions:{...Fg}};if(e.include&&(r.include=e.include.filter(i=>t||!i.endsWith(".d.ts")).map(i=>i.replace(/(?<!\.d)\.ts(x?)$/,".js$1"))),e.compilerOptions)for(let i of BF)e.compilerOptions[i]!==void 0&&(r.compilerOptions[i]=e.compilerOptions[i]);return r}async function $u(e,t=!0){let r=N(e,"app/routes.ts");if(await U(r)){let s=(await X(r)).replace("./layout.tsx","./layout.jsx");await V(r,s)}let i=await pc("**/*.+(ts|tsx)",{absolute:!0,cwd:e,dot:!0,ignore:["**/node_modules/**"]}),n=await ft();for(let o of i){if(o.endsWith(".d.ts")){t||await an(o);continue}let s=await X(o),c=await zt(await Jt(s,o,t),n);await an(o),await V(o.replace(/\.ts(x?)$/,".js$1"),c)}try{let o=N(e,"remix.config.js"),s=await X(o);s=s.replace(/\/server\.ts/gim,"/server.js"),await V(o,s)}catch(o){me(`Could not change TS extensions in remix.config.js:
154
+ `+c).replace(a,a.replace("[",`[${u},`))})}var jF={rule:{pattern:"[$$$]",inside:{kind:"pair",stopBy:"neighbor",has:{field:"key",regex:"^plugins$",stopBy:"neighbor"},inside:{kind:"object",stopBy:"neighbor",all:[{inside:{kind:"export_statement",regex:"export default",stopBy:"end"}},{not:{inside:{kind:"object",stopBy:"end"}}}]}}}};var Dg="styles/tailwind.css";async function Cg({rootDirectory:e,appDirectory:t},r=!1){let i=kt(e,t),n={"tailwind.css":N(i,Dg)};if(!await vg(n,t,r)){it("Skipping CSS setup as some files already exist. You may use `--force` or `-f` to override it.");return}return{workPromise:Promise.all([Vs(await Ze("tailwind"),e),yg("tailwind",n,e),ft(e).then(s=>Promise.all([bg(t,s,{name:"tailwindCss",path:`${Dg}?url`,isDefault:!0}),Ys(e,s,{name:"tailwindcss",path:"@tailwindcss/vite",isDefault:!0})]))]),generatedAssets:Object.values(n),needsInstallDeps:!0}}y();async function Sg({rootDirectory:e}){return{workPromise:Promise.all([Vs(await Ze("vanilla-extract"),e),ft(e).then(r=>Ys(e,r,{path:"@vanilla-extract/vite-plugin",name:"vanillaExtractPlugin",isDefault:!1}))]),generatedAssets:[],needsInstallDeps:!0}}var Ru=[...ju,"none"],Lu={tailwind:"Tailwind v4","vanilla-extract":"Vanilla Extract","css-modules":"CSS Modules",postcss:"PostCSS"},qM={postcss:"https://vitejs.dev/guide/features.html#postcss","css-modules":"https://vitejs.dev/guide/features.html#css-modules","vanilla-extract":"https://vanilla-extract.style/documentation/styling/",tailwind:"https://tailwindcss.com/docs/configuration"};function Ag(e,t,r){switch(e){case"tailwind":return Cg(t,r);case"vanilla-extract":return Sg(t);case"postcss":case"css-modules":return{workPromise:Promise.resolve(),generatedAssets:[],needsInstallDeps:!1};default:throw new Error("Unknown strategy")}}async function _g(e){let t=Object.entries({...Lu,...e?.extraChoices});return tt({message:"Select a styling library",...e,choices:t.map(([r,i])=>({value:r,label:i})),defaultValue:"tailwind"})}y();y();y();y();async function Jt(e,t,r=!0){let{transpileTs:i}=await import("./morph-42EXMN3K.js");return i(e,t,r)}y();var Fg={checkJs:!1,target:"ES2022",module:"ES2022",moduleResolution:"bundler",baseUrl:".",paths:{"~/*":["app/*"]}},BF=new Set(["noLib","target","module","moduleResolution","checkJs","experimentalDecorators","allowSyntheticDefaultImports","baseUrl","paths",...Object.keys(Fg)]);function RF(e,t=!1){let r={compilerOptions:{...Fg}};if(e.include&&(r.include=e.include.filter(i=>t||!i.endsWith(".d.ts")).map(i=>i.replace(/(?<!\.d)\.ts(x?)$/,".js$1"))),e.compilerOptions)for(let i of BF)e.compilerOptions[i]!==void 0&&(r.compilerOptions[i]=e.compilerOptions[i]);return r}async function $u(e,t=!0){let r=N(e,"app/routes.ts");if(await U(r)){let s=(await X(r)).replace("./layout.tsx","./layout.jsx");await V(r,s)}let i=await yc("**/*.+(ts|tsx)",{absolute:!0,cwd:e,dot:!0,ignore:["**/node_modules/**"]}),n=await ft();for(let o of i){if(o.endsWith(".d.ts")){t||await an(o);continue}let s=await X(o),c=await zt(await Jt(s,o,t),n);await an(o),await V(o.replace(/\.ts(x?)$/,".js$1"),c)}try{let o=N(e,"remix.config.js"),s=await X(o);s=s.replace(/\/server\.ts/gim,"/server.js"),await V(o,s)}catch(o){me(`Could not change TS extensions in remix.config.js:
155
155
  `+o.stack)}try{let o=N(e,"tsconfig.json"),s=await X(o),c=RF(JSON.parse(s.replace(/^\s*\/\/.*$/gm,"")),t);await an(o),await V(N(e,"jsconfig.json"),JSON.stringify(c,null,2))}catch(o){me(`Could not transpile tsconfig.json:
156
156
  `+o.stack)}try{let o=JSON.parse(await X(N(e,"package.json")));delete o.scripts.typecheck;let s=/react-router typegen\s*&&\s*/g;for(let[c,h]of Object.entries(o.scripts||{}))typeof h=="string"&&h.includes("react-router typegen")&&(o.scripts[c]=h.replace(s,""));if(!t){delete o.devDependencies.typescript,delete o.devDependencies["@shopify/oxygen-workers-types"];for(let h of Object.keys(o.devDependencies))h.startsWith("@types/")&&delete o.devDependencies[h];let c=/\s*--codegen/;o.scripts?.dev&&(o.scripts.dev=o.scripts.dev.replace(c,"")),o.scripts?.build&&(o.scripts.build=o.scripts.build.replace(c,""))}await V(N(e,"package.json"),JSON.stringify(o,null,2))}catch(o){me(`Could not remove TS dependencies from package.json:
157
157
  `+o.stack)}try{let{filepath:o=N(e,".eslintrc.cjs")}=await be(e,".eslintrc",["cjs","js"]),s=await X(o);t||(s=s.replace(/\/\*\*[\s*]+@type.+\s+\*\/\s?/gim,"")),s=s.replace(/\s*,?\s*['"`]plugin:hydrogen\/typescript['"`]/gim,"").replace(/\s+['"`]@typescript-eslint\/.+,/gim,""),await V(o,await zt(s,n))}catch(o){me(`Could not remove TS rules from .eslintrc:
158
- `+o.stack)}}async function kg({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")},r,i){let n="createAppLoadContext",{filepath:o,astType:s}=await $F({rootDirectory:e,contextCreate:t}),c=await X(i),h=await LF({rootDirectory:e,contextCreate:t},r,i);await ui(o,r,async m=>{let f=(await Ki(s)).parse(m).root(),a=f.find({rule:{kind:"identifier",inside:{kind:"formal_parameters",stopBy:"end",inside:{kind:"function_declaration",stopBy:"end",has:{kind:"identifier",regex:`^${n}$`}}}}})?.text()??"request",u=c.match(/^(export )?function (\w+)/m)?.[2];if(!u)throw new Error("Could not find the i18n function name");let l=`${u}(${a})`,g="@shopify/hydrogen",v="createHydrogenContext",x=f.find({rule:{kind:"import_specifier",inside:{kind:"import_statement",stopBy:"end",has:{kind:"string_fragment",stopBy:"end",regex:`^${g}$`}},has:{kind:"identifier",regex:`^${v}`}}}),[w,C]=x?.text().split(/\s+as\s+/)||[];if(w=C??w,!w)throw new I(`Could not find a Hydrogen import in ${t}`,`Please import "${v}" from "${g}"`);let S=f.find({rule:{kind:"object",inside:{kind:"arguments",inside:{kind:"call_expression",has:{kind:"identifier",regex:w}}}}});if(!S)throw new I(`Could not find a Hydrogen client instantiation with an inline object as argument in ${t}`,`Please add a call to ${w}({...})`);let P=S.find({rule:{kind:"property_identifier",regex:"^i18n$"}})?.next()?.next();if(P){if(P.text().includes(u))throw new I("An i18n strategy is already set up.",`Remove the existing i18n property in the ${w}({...}) call to set up a new one.`);let{start:G,end:pe}=P.range();m=m.slice(0,G.index)+l+m.slice(pe.index)}else{let{end:G}=S.range(),pe=m.slice(0,G.index-1);m=pe+((/,\s*$/.test(pe)?"":",")+`i18n: ${l}`)+m.slice(G.index-1)}let L=f.findAll({rule:{kind:"import_statement"}}).pop()?.range()??{end:{index:0}},z=N("~",kt(N(e,"app"),h.slice(0,-sn(h).length)));return m=m.slice(0,L.end.index)+`import {getLocaleFromRequest} from "${z}";`+m.slice(L.end.index),m})}async function LF({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")},r,i){let n=t?.endsWith(".js")||!1,o=N(e,le(t),n?"i18n.js":"i18n.ts");if(await U(o))throw new I(`${o} already exist. Renamed or remove the existing file before continue.`);return await br(i,o),await ui(o,r,async s=>(s=s.replace(/\.\/mock-i18n-types\.js/,"@shopify/hydrogen"),n&&(s=await Jt(s,i)),s)),o}async function $F({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")}){let r=t.match(/\.([jt]sx?)$/)?.[1],{filepath:i,astType:n}=r?{filepath:J(e,t),astType:r}:await be(e,N(t));if(!i||!n)throw new I(`Could not find a context create file at ${J(e,t)}`);return{filepath:i,astType:n}}var qF=["subfolders","domains","subdomains"],qu={subfolders:"Subfolders (example.com/fr-ca/...)",subdomains:"Subdomains (de.example.com/...)",domains:"Top-level domains (example.jp/...)"},Uu=[...qF,"none"];async function Tg(e,t){let r=await Ze("i18n",`${e}.ts`);if(!await U(r))throw new Error("Unknown strategy");let i=await ft(t.rootDirectory);await kg(t,i,r)}async function Og(e){let t=Object.entries({...qu,...e?.extraChoices});return tt({message:"Select a URL structure to support multiple markets",...e,choices:t.map(([r,i])=>({value:r,label:i}))})}var UF=3e3,HF=9229,ci={path:{path:ee.Flags.string({description:"The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.",env:"SHOPIFY_HYDROGEN_FLAG_PATH"})},port:{port:ee.Flags.integer({description:`The port to run the server on. Defaults to ${UF}.`,env:"SHOPIFY_HYDROGEN_FLAG_PORT"})},force:{force:ee.Flags.boolean({description:"Overwrites the destination directory and files if they already exist.",env:"SHOPIFY_HYDROGEN_FLAG_FORCE",char:"f"})},shop:{shop:ee.Flags.string({char:"s",description:"Shop URL. It can be the shop prefix (janes-apparel) or the full myshopify.com URL (janes-apparel.myshopify.com, https://janes-apparel.myshopify.com).",env:"SHOPIFY_SHOP",parse:async e=>cn(e)})},installDeps:{"install-deps":ee.Flags.boolean({description:"Auto installs dependencies using the active package manager.",env:"SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS",allowNo:!0})},env:{env:ee.Flags.string({description:"Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.",exclusive:["env-branch"]})},envBranch:{"env-branch":ee.Flags.string({description:"Specifies the environment to perform the operation using its Git branch name.",env:"SHOPIFY_HYDROGEN_ENVIRONMENT_BRANCH",deprecated:{to:"env",message:"--env-branch is deprecated. Use --env instead."}})},envFile:{"env-file":ee.Flags.string({description:"Path to an environment file to override existing environment variables. Defaults to the '.env' located in your project path `--path`.",required:!1,default:".env"})},sourcemap:{sourcemap:ee.Flags.boolean({description:"Controls whether server sourcemaps are generated. Default to `true`. Deactivate `--no-sourcemaps`.",env:"SHOPIFY_HYDROGEN_FLAG_SOURCEMAP",default:!0,allowNo:!0})},codegen:{codegen:ee.Flags.boolean({description:"Automatically generates GraphQL types for your project\u2019s Storefront API queries.",required:!1}),"codegen-config-path":ee.Flags.string({description:"Specifies a path to a codegen configuration file. Defaults to `<root>/codegen.ts` if this file exists.",required:!1,dependsOn:["codegen"]})},styling:{styling:ee.Flags.string({description:`Sets the styling strategy to use. One of ${Ru.map(e=>`\`${e}\``).join(", ")}.`,choices:Ru,env:"SHOPIFY_HYDROGEN_FLAG_STYLING"})},markets:{markets:ee.Flags.string({description:`Sets the URL structure to support multiple markets. Must be one of: ${Uu.map(e=>`\`${e}\``).join(", ")}. Example: \`--markets subfolders\`.`,choices:Uu,env:"SHOPIFY_HYDROGEN_FLAG_I18N"})},shortcut:{shortcut:ee.Flags.boolean({description:"Creates a global h2 shortcut for Shopify CLI using shell aliases. Deactivate with `--no-shortcut`.",env:"SHOPIFY_HYDROGEN_FLAG_SHORTCUT",allowNo:!0})},debug:{debug:ee.Flags.boolean({description:"Enables inspector connections to the server with a debugger such as Visual Studio Code or Chrome DevTools.",env:"SHOPIFY_HYDROGEN_FLAG_DEBUG"})},inspectorPort:{"inspector-port":ee.Flags.integer({description:`The port where the inspector is available. Defaults to ${HF}.`,env:"SHOPIFY_HYDROGEN_FLAG_INSPECTOR_PORT"})},entry:{entry:ee.Flags.string({description:"Entry file for the worker. Defaults to `./server`.",env:"SHOPIFY_HYDROGEN_FLAG_ENTRY"})},lockfileCheck:{"lockfile-check":ee.Flags.boolean({allowNo:!0,default:!0,description:"Checks that there is exactly one valid lockfile in the project. Defaults to `true`. Deactivate with `--no-lockfile-check`.",env:"SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK"})},disableRouteWarning:{"disable-route-warning":ee.Flags.boolean({description:"Disables any warnings about missing standard routes.",env:"SHOPIFY_HYDROGEN_FLAG_DISABLE_ROUTE_WARNING"})},customerAccountPush:{"customer-account-push":ee.Flags.boolean({description:"Use tunneling for local development and push the tunneling domain to admin. Required to use Customer Account API's OAuth flow",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_CUSTOMER_ACCOUNT_PUSH"})},verbose:{verbose:ee.Flags.boolean({description:"Outputs more information about the command's execution.",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_VERBOSE"})}};function Qi(e){return Object.entries(e).reduce((t,[r,i])=>(t[hc(r)]=i,t),{})}function Aj(e,t={}){let[,,...r]=e,i={};for(let n=0;n<r.length;n++){let o=r[n],s=r[n+1];if(o?.startsWith("-")){let c=o.replace(/^\-{1,2}/,""),h=!s||s.startsWith("-")?!0:s;h===!0&&c.startsWith("no-")&&(h=!1,c=c.replace("no-","")),i[t[c]||c]=h}}return Qi(i)}function _j(e,t){return Object.entries(t).reduce((r,[i,n])=>(r[i]={...e[i],...n},r),{...e})}y();y();var zF=[{pattern:"app is not installed",abort:["Hydrogen sales channel isn't installed","Install the Hydrogen sales channel on your store to start creating and linking Hydrogen storefronts: https://apps.shopify.com/hydrogen"]},{pattern:"Access denied for hydrogenStorefrontCreate field",abort:["Couldn't connect storefront to Shopify",["Common reasons for this error include:",{list:{items:["The Hydrogen sales channel isn't installed on the store.","You don't have the required account permission to manage apps or channels.","You're trying to connect to an ineligible store type (Trial, Development store)"]}}]]},{pattern:"Access denied for hydrogenStorefronts field",abort:["Couldn't access Hydrogen storefronts",["Common reasons for this error include:",{list:{items:["You don't have full access to apps or access to the Hydrogen channel.","The Hydrogen sales channel isn't installed on the store."]}}]]}];async function Je(e,t,r){let i="Admin",n=`https://${t.storeFqdn}/admin/api/unstable/graphql.json`;try{return await Dc({query:e,api:i,url:n,token:t.token,variables:r})}catch(o){let s=o.errors;for(let{pattern:c,abort:h}of zF)if(s?.some?.(m=>m.message.includes(c)))throw new I(...h);throw o}}y();var JF=/gid:\/\/shopify\/\w*\/(\d+)/;function Pg(e){let t=JF.exec(e);if(t&&t[1]!==void 0)return t[1];throw new I(`Invalid Global ID: ${e}`)}var WF=`#graphql
158
+ `+o.stack)}}async function kg({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")},r,i){let n="createAppLoadContext",{filepath:o,astType:s}=await $F({rootDirectory:e,contextCreate:t}),c=await X(i),h=await LF({rootDirectory:e,contextCreate:t},r,i);await ui(o,r,async m=>{let f=(await Ki(s)).parse(m).root(),a=f.find({rule:{kind:"identifier",inside:{kind:"formal_parameters",stopBy:"end",inside:{kind:"function_declaration",stopBy:"end",has:{kind:"identifier",regex:`^${n}$`}}}}})?.text()??"request",u=c.match(/^(export )?function (\w+)/m)?.[2];if(!u)throw new Error("Could not find the i18n function name");let l=`${u}(${a})`,g="@shopify/hydrogen",v="createHydrogenContext",x=f.find({rule:{kind:"import_specifier",inside:{kind:"import_statement",stopBy:"end",has:{kind:"string_fragment",stopBy:"end",regex:`^${g}$`}},has:{kind:"identifier",regex:`^${v}`}}}),[w,C]=x?.text().split(/\s+as\s+/)||[];if(w=C??w,!w)throw new I(`Could not find a Hydrogen import in ${t}`,`Please import "${v}" from "${g}"`);let S=f.find({rule:{kind:"object",inside:{kind:"arguments",inside:{kind:"call_expression",has:{kind:"identifier",regex:w}}}}});if(!S)throw new I(`Could not find a Hydrogen client instantiation with an inline object as argument in ${t}`,`Please add a call to ${w}({...})`);let P=S.find({rule:{kind:"property_identifier",regex:"^i18n$"}})?.next()?.next();if(P){if(P.text().includes(u))throw new I("An i18n strategy is already set up.",`Remove the existing i18n property in the ${w}({...}) call to set up a new one.`);let{start:G,end:pe}=P.range();m=m.slice(0,G.index)+l+m.slice(pe.index)}else{let{end:G}=S.range(),pe=m.slice(0,G.index-1);m=pe+((/,\s*$/.test(pe)?"":",")+`i18n: ${l}`)+m.slice(G.index-1)}let L=f.findAll({rule:{kind:"import_statement"}}).pop()?.range()??{end:{index:0}},z=N("~",kt(N(e,"app"),h.slice(0,-sn(h).length)));return m=m.slice(0,L.end.index)+`import {getLocaleFromRequest} from "${z}";`+m.slice(L.end.index),m})}async function LF({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")},r,i){let n=t?.endsWith(".js")||!1,o=N(e,le(t),n?"i18n.js":"i18n.ts");if(await U(o))throw new I(`${o} already exist. Renamed or remove the existing file before continue.`);return await Dr(i,o),await ui(o,r,async s=>(s=s.replace(/\.\/mock-i18n-types\.js/,"@shopify/hydrogen"),n&&(s=await Jt(s,i)),s)),o}async function $F({rootDirectory:e,contextCreate:t=N("app","lib","context.ts")}){let r=t.match(/\.([jt]sx?)$/)?.[1],{filepath:i,astType:n}=r?{filepath:J(e,t),astType:r}:await be(e,N(t));if(!i||!n)throw new I(`Could not find a context create file at ${J(e,t)}`);return{filepath:i,astType:n}}var qF=["subfolders","domains","subdomains"],qu={subfolders:"Subfolders (example.com/fr-ca/...)",subdomains:"Subdomains (de.example.com/...)",domains:"Top-level domains (example.jp/...)"},Uu=[...qF,"none"];async function Tg(e,t){let r=await Ze("i18n",`${e}.ts`);if(!await U(r))throw new Error("Unknown strategy");let i=await ft(t.rootDirectory);await kg(t,i,r)}async function Og(e){let t=Object.entries({...qu,...e?.extraChoices});return tt({message:"Select a URL structure to support multiple markets",...e,choices:t.map(([r,i])=>({value:r,label:i}))})}var UF=3e3,HF=9229,ci={path:{path:ee.Flags.string({description:"The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.",env:"SHOPIFY_HYDROGEN_FLAG_PATH"})},port:{port:ee.Flags.integer({description:`The port to run the server on. Defaults to ${UF}.`,env:"SHOPIFY_HYDROGEN_FLAG_PORT"})},force:{force:ee.Flags.boolean({description:"Overwrites the destination directory and files if they already exist.",env:"SHOPIFY_HYDROGEN_FLAG_FORCE",char:"f"})},shop:{shop:ee.Flags.string({char:"s",description:"Shop URL. It can be the shop prefix (janes-apparel) or the full myshopify.com URL (janes-apparel.myshopify.com, https://janes-apparel.myshopify.com).",env:"SHOPIFY_SHOP",parse:async e=>cn(e)})},installDeps:{"install-deps":ee.Flags.boolean({description:"Auto installs dependencies using the active package manager.",env:"SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS",allowNo:!0})},env:{env:ee.Flags.string({description:"Specifies the environment to perform the operation using its handle. Fetch the handle using the `env list` command.",exclusive:["env-branch"]})},envBranch:{"env-branch":ee.Flags.string({description:"Specifies the environment to perform the operation using its Git branch name.",env:"SHOPIFY_HYDROGEN_ENVIRONMENT_BRANCH",deprecated:{to:"env",message:"--env-branch is deprecated. Use --env instead."}})},envFile:{"env-file":ee.Flags.string({description:"Path to an environment file to override existing environment variables. Defaults to the '.env' located in your project path `--path`.",required:!1,default:".env"})},sourcemap:{sourcemap:ee.Flags.boolean({description:"Controls whether server sourcemaps are generated. Default to `true`. Deactivate `--no-sourcemaps`.",env:"SHOPIFY_HYDROGEN_FLAG_SOURCEMAP",default:!0,allowNo:!0})},codegen:{codegen:ee.Flags.boolean({description:"Automatically generates GraphQL types for your project\u2019s Storefront API queries.",required:!1}),"codegen-config-path":ee.Flags.string({description:"Specifies a path to a codegen configuration file. Defaults to `<root>/codegen.ts` if this file exists.",required:!1,dependsOn:["codegen"]})},styling:{styling:ee.Flags.string({description:`Sets the styling strategy to use. One of ${Ru.map(e=>`\`${e}\``).join(", ")}.`,choices:Ru,env:"SHOPIFY_HYDROGEN_FLAG_STYLING"})},markets:{markets:ee.Flags.string({description:`Sets the URL structure to support multiple markets. Must be one of: ${Uu.map(e=>`\`${e}\``).join(", ")}. Example: \`--markets subfolders\`.`,choices:Uu,env:"SHOPIFY_HYDROGEN_FLAG_I18N"})},shortcut:{shortcut:ee.Flags.boolean({description:"Creates a global h2 shortcut for Shopify CLI using shell aliases. Deactivate with `--no-shortcut`.",env:"SHOPIFY_HYDROGEN_FLAG_SHORTCUT",allowNo:!0})},debug:{debug:ee.Flags.boolean({description:"Enables inspector connections to the server with a debugger such as Visual Studio Code or Chrome DevTools.",env:"SHOPIFY_HYDROGEN_FLAG_DEBUG"})},inspectorPort:{"inspector-port":ee.Flags.integer({description:`The port where the inspector is available. Defaults to ${HF}.`,env:"SHOPIFY_HYDROGEN_FLAG_INSPECTOR_PORT"})},entry:{entry:ee.Flags.string({description:"Entry file for the worker. Defaults to `./server`.",env:"SHOPIFY_HYDROGEN_FLAG_ENTRY"})},lockfileCheck:{"lockfile-check":ee.Flags.boolean({allowNo:!0,default:!0,description:"Checks that there is exactly one valid lockfile in the project. Defaults to `true`. Deactivate with `--no-lockfile-check`.",env:"SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK"})},disableRouteWarning:{"disable-route-warning":ee.Flags.boolean({description:"Disables any warnings about missing standard routes.",env:"SHOPIFY_HYDROGEN_FLAG_DISABLE_ROUTE_WARNING"})},customerAccountPush:{"customer-account-push":ee.Flags.boolean({description:"Use tunneling for local development and push the tunneling domain to admin. Required to use Customer Account API's OAuth flow",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_CUSTOMER_ACCOUNT_PUSH"})},verbose:{verbose:ee.Flags.boolean({description:"Outputs more information about the command's execution.",required:!1,env:"SHOPIFY_HYDROGEN_FLAG_VERBOSE"})}};function Qi(e){return Object.entries(e).reduce((t,[r,i])=>(t[pc(r)]=i,t),{})}function Aj(e,t={}){let[,,...r]=e,i={};for(let n=0;n<r.length;n++){let o=r[n],s=r[n+1];if(o?.startsWith("-")){let c=o.replace(/^\-{1,2}/,""),h=!s||s.startsWith("-")?!0:s;h===!0&&c.startsWith("no-")&&(h=!1,c=c.replace("no-","")),i[t[c]||c]=h}}return Qi(i)}function _j(e,t){return Object.entries(t).reduce((r,[i,n])=>(r[i]={...e[i],...n},r),{...e})}y();y();var zF=[{pattern:"app is not installed",abort:["Hydrogen sales channel isn't installed","Install the Hydrogen sales channel on your store to start creating and linking Hydrogen storefronts: https://apps.shopify.com/hydrogen"]},{pattern:"Access denied for hydrogenStorefrontCreate field",abort:["Couldn't connect storefront to Shopify",["Common reasons for this error include:",{list:{items:["The Hydrogen sales channel isn't installed on the store.","You don't have the required account permission to manage apps or channels.","You're trying to connect to an ineligible store type (Trial, Development store)"]}}]]},{pattern:"Access denied for hydrogenStorefronts field",abort:["Couldn't access Hydrogen storefronts",["Common reasons for this error include:",{list:{items:["You don't have full access to apps or access to the Hydrogen channel.","The Hydrogen sales channel isn't installed on the store."]}}]]}];async function Je(e,t,r){let i="Admin",n=`https://${t.storeFqdn}/admin/api/unstable/graphql.json`;try{return await Dc({query:e,api:i,url:n,token:t.token,variables:r})}catch(o){let s=o.errors;for(let{pattern:c,abort:h}of zF)if(s?.some?.(m=>m.message.includes(c)))throw new I(...h);throw o}}y();var JF=/gid:\/\/shopify\/\w*\/(\d+)/;function Pg(e){let t=JF.exec(e);if(t&&t[1]!==void 0)return t[1];throw new I(`Invalid Global ID: ${e}`)}var WF=`#graphql
159
159
  query LinkStorefront {
160
160
  hydrogenStorefronts {
161
161
  id
@@ -276,7 +276,7 @@ if (!$profileContent -or $profileContent -NotLike '*Invoke-Local-H2*') {
276
276
  `).trim()||void 0);let T=new hn(h+W.bold(m.join(`
277
277
  `).replace(" - Request",`
278
278
  Request`)),l);T.cause=v,T.stack=g,ln(T);return}let a;if(f){a=[];for(let l of d.matchAll(/https?:\/\/[^\s]+/g))a.push(l[0])}(o==="warn"?Xe:mt)({body:h+W.bold(m.join(`
279
- `)),reference:a,nextSteps:p?[d]:void 0})}])}function SB(){!process.env.DEBUG||process.env.DEBUG==="*"?process.env.DEBUG="h2:*,o2:*":process.env.DEBUG+=",h2:*,o2:*"}function AB(){return!!(process.env.DEBUG==="*"||process.env.DEBUG?.includes("h2:*"))}async function jB(e){await bc(),await Ig(e)}async function At(e,t){to(!1);let r=t===!0,i=e?await hi(e):{},{email:n,shopName:o}=i;if(typeof t!="string"&&(t=i.shop),t&&(t=await cn(t)),!t||!o||!n||r||t!==i.shop){let h=await Ec().catch(()=>{throw new I("Unable to authenticate with Shopify. Please report this issue.")}),m=await Wg(h),f=!r&&t&&m.activeShops.find(({fqdn:p})=>t===p)||await tt({message:"Select a shop to log in to",choices:m.activeShops.map(({name:p,fqdn:a})=>({label:`${p} (${a})`,value:{name:p,fqdn:a}}))});t=f.fqdn,o=f.name,n=m.email}let s=await wc(t).catch(()=>{throw new I("Unable to authenticate with Shopify",void 0,[`Ensure the shop that you specified is correct (you are trying to use: ${t})`])}),c=e?await Ng(e,{shop:t,shopName:o,email:n}):{shop:t,shopName:o,email:n};return{session:s,config:c}}function Kg(e){Cr({headline:"Shopify authentication complete",body:["You are logged in to",{userInput:e.shopName??e.shop??"your store"},...e.email?["as",{userInput:e.email}]:[]]})}y();import{symlink as Sk,readdir as Ak}from"node:fs/promises";y();import{readdir as n0}from"node:fs/promises";y();import{createRequire as ak}from"module";function Qg(e){return e.replace(/(^|\.)_index$/,"$1index").replace(/\.(?!\w+\])/g,"/")}function $B(){try{return ak(import.meta.url).resolve("@remix-run/v1-route-convention/package.json"),!0}catch{return!1}}y();import{createRequire as pk}from"node:module";import ro from"node:path";y();y();var Zg="Classic Remix Compiler projects are no longer supported, please upgrade to Vite by running 'npx shopify hydrogen setup vite'";async function uk(e){return!!(await be(e,"vite.config")).filepath}async function Vu(e){let t=await uk(e);return t&&await Xu(e)&&Xe({headline:"Both Vite and Remix config files found.",body:"The remix.config.js file is not used in Vite projects. Please remove it to avoid conflicts."}),t}async function e0(e,t){let r=await Hc(e),i="build",n=process.env.NODE_ENV||"production",o=await r.loadConfigFromFile({command:i,mode:n,isSsrBuild:!0},void 0,e);if(!o||!o.path)throw new Error("No Vite config found");let s=await r.resolveConfig({root:e,build:{ssr:!0}},i,n,n),{appDirectory:c,clientOutDir:h,serverBuildFile:m,serverOutDir:d,routes:f}=lk(s),p=s.build.rollupOptions.output,{entryFileNames:a}=(Array.isArray(p)?p[0]:p)??{},u=N(d,typeof a=="string"?a:m??"index.js"),l=t??s.build.ssr,g=J(s.root,typeof l=="string"?l:"server");return{clientOutDir:h,serverOutDir:d,serverOutFile:u,resolvedViteConfig:s,userViteConfig:o.config,remixConfig:{routes:f??{},appDirectory:c??N(s.root,"app"),rootDirectory:s.root,serverEntryPoint:(await be(le(g),Tt(g))).filepath||g}}}function ck({routingBuildDirectory:e,serverEnvironmentOutDir:t,clientEnvironmentOutDir:r,buildOutDir:i}){if(e)return{clientOutDir:N(e,"client"),serverOutDir:N(e,"server")};let n=t??i;return{clientOutDir:r&&r!==n?r:n.replace(/server$/,"client"),serverOutDir:n}}function lk(e){let t=hk(e)??fk(e),{clientOutDir:r,serverOutDir:i}=ck({routingBuildDirectory:t?.buildDirectory,serverEnvironmentOutDir:e.environments?.ssr?.build.outDir,clientEnvironmentOutDir:e.environments?.client?.build.outDir,buildOutDir:e.build.outDir});return{...t,clientOutDir:r,serverOutDir:i}}function hk(e){if(!e.__reactRouterPluginContext)return;let{appDirectory:t,buildDirectory:r,serverBuildFile:i,routes:n}=e.__reactRouterPluginContext.reactRouterConfig;return{appDirectory:t,buildDirectory:r,serverBuildFile:i,routes:n}}function fk(e){let{remixConfig:t}=dk(e)?.api?.getPluginOptions()??{};if(t)return{appDirectory:t.appDirectory,serverBuildFile:t.serverBuildFile,routes:t.routes}}function t0(e,t){return e.plugins.find(r=>r.name===t)}function dk(e){return t0(e,"hydrogen:main")}function KB(e){return t0(e,"oxygen:main")}async function Xu(e){return!!(await be(e,"remix.config")).filepath}async function uR(e){return await Vu(e)?!1:Xu(e)}var mk="dist",gk="client",yk="worker";function cR(e){let t=e??process.cwd(),r=ro.join(t,"public"),i=ro.join(t,mk),n=ro.join(i,gk),o=ro.join(i,yk,"index.js");return{root:t,buildPath:i,buildPathClient:n,buildPathWorkerFile:o,publicPath:r}}function lR(e){return be(e,"remix.config").then(({filepath:t})=>{if(!t)throw new I("No remix.config.js file found.");return pk(import.meta.url)(t)})}async function r0(e,t=process.env.NODE_ENV){if(!await Vu(e))throw new I(Zg);return(await e0(e)).remixConfig}var vk=[/robots\.txt/],Ku={home:["_index","$"],page:"pages*",cart:["cart","cart.$lines","discount.$code"],products:"products*",collections:"collections*",policies:"policies*",blogs:"blogs*",account:"account*",search:["search","api.predictive-search"],robots:"[robots.txt]",sitemap:["[sitemap.xml]","sitemap.$type.$page[.xml]"]},Yu=[];async function i0(e=Object.keys(Ku)){Yu.length===0&&(Yu=(await n0(await Yi(Ht))).map(i=>i.replace(/\.tsx?$/,"")));let t={},r=[];for(let i of e){t[i]=[];let n=Ku[i];if(!n)throw new I(`No route found for ${i}. Try one of ${xk.join()}.`);let o=Array.isArray(n)?n:[n];for(let s of o){let c=s.replace("*","");t[i].push(...Yu.filter(h=>h.startsWith(c)))}r.push(...t[i])}return{routeGroups:t,resolvedRouteFiles:r}}var xk=[...Object.keys(Ku),"all"];async function s0(e,t){let{routeGroups:r,resolvedRouteFiles:i}=e.routeName==="all"?await i0():await i0([e.routeName]),{rootDirectory:n,appDirectory:o}=t||await r0(e.directory),s=i.flatMap(p=>Ht+"/"+p),c=await ft(n),h=N(o,Ht),m=await wk(h,e),d=!!(e.typescript??await U(N(n,"tsconfig.json"))),f=[];for(let p of s)f.push(await Qu(p,{...e,typescript:d,localePrefix:m,rootDirectory:n,appDirectory:o,formatOptions:c}));return m&&await Dk({typescript:d,localePrefix:m,routesDirectory:h,formatOptions:c,adapter:e.adapter}),{routes:f,routeGroups:r,isTypescript:d,formatOptions:c}}async function wk(e,{localePrefix:t,routeName:r,v1RouteConvention:i}){if(t)return t;if(t!==void 0||r==="all")return;let n=await n0(e).catch(()=>[]),o=i?/^\(\$(\w+)\)$/:/^\(\$(\w+)\)\.(_index|\$|cart).[jt]sx?$/,s=n.find(c=>o.test(c));if(s)return s.match(o)?.[1]}async function Qu(e,{rootDirectory:t,appDirectory:r,typescript:i,force:n,adapter:o,templatesRoot:s,formatOptions:c,localePrefix:h,v1RouteConvention:m=!1,signal:d,overwriteFileDeps:f=!0}){s??=await Mu();let p=(e.match(/(\.[jt]sx?)$/)??[])[1]??".tsx";e=e.replace(p,"");let a=N(r,Ek(e,h,{v1RouteConvention:m})+(i?p:p.replace(".ts",".js"))),u={operation:"created",sourceRoute:e,destinationRoute:uc(a,t)};if(!n&&await U(a)){if(!await rt({message:`The file ${u.destinationRoute} already exists. Do you want to replace it?`,defaultValue:!1,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:d}))return{...u,operation:"skipped"};u.operation="replaced"}let l=await Yi(e+p,s),g=await bk(l,await Yi("",s));for(let v of g){let w=v.startsWith(Ht+"/")?a:N(r,v.replace(/\.ts(x?)$/,`.${i?"ts$1":"js$1"}`));if(!f&&await U(w))continue;await U(le(w))||await on(le(w));let C=await Yi(v,s);if(!/\.[jt]sx?$/.test(v)){await br(C,w);continue}let S=await X(C);i||(S=await Jt(S,C)),o&&(S=o0(S,o)),S=await zt(S,c,w),await V(w,S)}return u}function o0(e,t){return e.replace(/(from\s+['"])react-router(['"])/g,`$1${t}$2`)}function Ek(e,t,r){let i=e.replace(Ht+"/",""),n=t&&!vk.some(o=>o.test(i))?`($${t})`+(r.v1RouteConvention?"/":"."):"";return Ht+"/"+n+(r.v1RouteConvention?Qg(i):i)}async function bk(e,t){let r=new Set([e]),i=new Set([kt(t,e)]);for(let n of r){let o=(await X(n,{encoding:"utf8"})).matchAll(/^(import|export)\s+.*?\s+from\s+['"](.*?)['"];?$/gims);for(let[,,s]of o){if(!s||!/^(\.|~)/.test(s)||(s=s.replace(/\?[a-z.]+$/,""),s=s.replace("~",kt(le(n),t)||"."),s.includes("/+types/")))continue;let c=J(le(n),s),h=(await be(le(c),Tt(c))).filepath||c;h.includes(`/${Ht}/`)||(i.add(kt(t,h)),/\.[jt]sx?$/.test(h)&&r.add(h))}}return[...i]}function Dk({typescript:e,localePrefix:t,...r}){return Ck({...r,typescript:e,templateName:"locale-check.ts",routeName:`($${t})${e?".tsx":".jsx"}`})}async function Ck({templateName:e,routeName:t,routesDirectory:r,formatOptions:i,typescript:n,adapter:o}){let s=N(r,t);if(await U(s))return;let c=await Ze("routes",e);if(!await U(c))throw new Error("Unknown strategy");let h=await X(c);o&&(h=o0(h,o)),n||(h=await Jt(h,c)),h=await zt(h,i,s),await V(s,h)}var _k={js:"JavaScript",ts:"TypeScript"};async function XR(e,t,r){let i=r??await Og({abortSignal:e.signal,extraChoices:{none:"Set up later "+W.dim(`(run \`${t} setup markets\`)`)}}),n=i==="none"?void 0:i;return{i18nStrategy:n,setupI18n:async o=>{n&&await Tg(n,o)}}}function VR(e){return{setupRoutes:async(t,r,i)=>(await s0({routeName:"all",directory:t,force:!0,typescript:r==="ts",localePrefix:i?.i18nStrategy==="subfolders"?"locale":!1,signal:e.signal,...i},{rootDirectory:t,appDirectory:N(t,"app")})).routeGroups}}function YR(e){return Promise.all(["routes.ts","root","entry.server","entry.client","../server.ts"].map(t=>Qu(t,e)))}async function KR(e,t,r){return t===ke?{}:r??await rt({confirmationMessage:"Yes",cancellationMessage:"No",message:["Create a global",{command:ke},"alias to run commands instead of",{command:t},"?"],abortSignal:e.signal})?{createShortcut:async()=>{try{return(await Jg()).length>0}catch(n){return me("Failed to create shortcut."+(n?.stack??n?.message??n)),!1}},showShortcutBanner:()=>mt({body:`You'll need to restart your terminal session to make \`${ke}\` alias available.`})}:{}}async function QR(e){to(!0);let{session:t,config:r}=await At();Kg(r);let i=await Ks(t),n=await Zu(i),o;return n?o=n.title:o=await Sr({message:"New storefront name",defaultValue:Zs(r.shopName),abortSignal:e.signal}),{...r,id:n?.id,title:o,session:t}}async function Zu(e){let t=[{label:"Create a new storefront",value:null},...e.map(({id:i,title:n,productionUrl:o})=>({label:`${n} (${o})`,value:i}))];if(t.length===1)return;let r=await tt({message:"Select a Hydrogen storefront to link",choices:t});return r?e.find(({id:i})=>i===r):void 0}async function ZR({storefrontInfo:e,controller:t,force:r,path:i}){let n=e&&fc(e.title),o=i??n??await Sr({message:"Where would you like to create your storefront?",defaultValue:"hydrogen-storefront",abortSignal:t.signal}),s=J(process.cwd(),o);if(await a0(s)){if(!r&&n&&(o=await Sr({message:`There's already a folder called \`${n}\`. Where do you want to create the app?`,defaultValue:n,abortSignal:t.signal}),s=J(process.cwd(),o),await a0(s)||(r=!0)),!r&&!await rt({message:`The directory ${W.cyan(o)} is not empty. Do you want to delete the existing files and continue?`,defaultValue:!1,abortSignal:t.signal})){mt({body:`Destination path ${W.cyan(o)} already exists and is not an empty directory. You may use \`--force\` or \`-f\` to override it.`});return}await uo(s,{force:!0})}return{name:Tt(o),location:o,directory:s,storefrontTitle:e?.title}}async function eL(e,t,r){let i=r??await tt({message:"Select a language",choices:[{label:"JavaScript",value:"js"},{label:"TypeScript",value:"ts"}],defaultValue:"js",abortSignal:t.signal});return{language:i,async transpileProject(){i!=="ts"&&await $u(e)}}}async function tL(e,t,r){let i=r??await _g({abortSignal:t.signal,extraChoices:{none:"Skip and set up later"}}),n=i==="none"?void 0:i;return{cssStrategy:n,async setupCss(){if(n){if(n==="postcss"||n==="css-modules")return;let o=await Ag(n,{rootDirectory:e,appDirectory:N(e,"app")},!0);o&&await o.workPromise}}}}async function rL(e,t,r,i){let n=r??Ac(),o="npm";if(i!==!1)if(n==="unknown"){let s=await tt({message:"Select package manager to install dependencies",choices:[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn v1",value:"yarn"},{label:"Skip and install later",value:"no"}],defaultValue:"npm",abortSignal:t.signal});s==="no"?i=!1:(o=s,i=!0)}else i===void 0?(o=n,i=await rt({message:`Install dependencies with ${n}?`,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:t.signal})):o=n;return Vi&&(await br(N(Xs(),".npmrc"),N(e,".npmrc")).catch(()=>{}),i||await Sk(await gg(),N(e,"node_modules")).catch(()=>{})),{packageManager:o,shouldInstallDeps:i,installDeps:i?async()=>{await Fc({directory:e,packageManager:o,args:[],signal:t.signal})}:()=>{}}}var Fk=`
279
+ `)),reference:a,nextSteps:p?[d]:void 0})}])}function SB(){!process.env.DEBUG||process.env.DEBUG==="*"?process.env.DEBUG="h2:*,o2:*":process.env.DEBUG+=",h2:*,o2:*"}function AB(){return!!(process.env.DEBUG==="*"||process.env.DEBUG?.includes("h2:*"))}async function jB(e){await bc(),await Ig(e)}async function At(e,t){to(!1);let r=t===!0,i=e?await hi(e):{},{email:n,shopName:o}=i;if(typeof t!="string"&&(t=i.shop),t&&(t=await cn(t)),!t||!o||!n||r||t!==i.shop){let h=await Ec().catch(()=>{throw new I("Unable to authenticate with Shopify. Please report this issue.")}),m=await Wg(h),f=!r&&t&&m.activeShops.find(({fqdn:p})=>t===p)||await tt({message:"Select a shop to log in to",choices:m.activeShops.map(({name:p,fqdn:a})=>({label:`${p} (${a})`,value:{name:p,fqdn:a}}))});t=f.fqdn,o=f.name,n=m.email}let s=await wc(t).catch(()=>{throw new I("Unable to authenticate with Shopify",void 0,[`Ensure the shop that you specified is correct (you are trying to use: ${t})`])}),c=e?await Ng(e,{shop:t,shopName:o,email:n}):{shop:t,shopName:o,email:n};return{session:s,config:c}}function Kg(e){Cr({headline:"Shopify authentication complete",body:["You are logged in to",{userInput:e.shopName??e.shop??"your store"},...e.email?["as",{userInput:e.email}]:[]]})}y();import{symlink as Sk,readdir as Ak}from"node:fs/promises";y();import{readdir as n0}from"node:fs/promises";y();import{createRequire as ak}from"module";function Qg(e){return e.replace(/(^|\.)_index$/,"$1index").replace(/\.(?!\w+\])/g,"/")}function $B(){try{return ak(import.meta.url).resolve("@remix-run/v1-route-convention/package.json"),!0}catch{return!1}}y();import{createRequire as pk}from"node:module";import ro from"node:path";y();y();var Zg="Classic Remix Compiler projects are no longer supported, please upgrade to Vite by running 'npx shopify hydrogen setup vite'";async function uk(e){return!!(await be(e,"vite.config")).filepath}async function Vu(e){let t=await uk(e);return t&&await Xu(e)&&Xe({headline:"Both Vite and Remix config files found.",body:"The remix.config.js file is not used in Vite projects. Please remove it to avoid conflicts."}),t}async function e0(e,t){let r=await Hc(e),i="build",n=process.env.NODE_ENV||"production",o=await r.loadConfigFromFile({command:i,mode:n,isSsrBuild:!0},void 0,e);if(!o||!o.path)throw new Error("No Vite config found");let s=await r.resolveConfig({root:e,build:{ssr:!0}},i,n,n),{appDirectory:c,clientOutDir:h,serverBuildFile:m,serverOutDir:d,routes:f}=lk(s),p=s.build.rollupOptions.output,{entryFileNames:a}=(Array.isArray(p)?p[0]:p)??{},u=N(d,typeof a=="string"?a:m??"index.js"),l=t??s.build.ssr,g=J(s.root,typeof l=="string"?l:"server");return{clientOutDir:h,serverOutDir:d,serverOutFile:u,resolvedViteConfig:s,userViteConfig:o.config,remixConfig:{routes:f??{},appDirectory:c??N(s.root,"app"),rootDirectory:s.root,serverEntryPoint:(await be(le(g),Tt(g))).filepath||g}}}function ck({routingBuildDirectory:e,serverEnvironmentOutDir:t,clientEnvironmentOutDir:r,buildOutDir:i}){if(e)return{clientOutDir:N(e,"client"),serverOutDir:N(e,"server")};let n=t??i;return{clientOutDir:r&&r!==n?r:n.replace(/server$/,"client"),serverOutDir:n}}function lk(e){let t=hk(e)??fk(e),{clientOutDir:r,serverOutDir:i}=ck({routingBuildDirectory:t?.buildDirectory,serverEnvironmentOutDir:e.environments?.ssr?.build.outDir,clientEnvironmentOutDir:e.environments?.client?.build.outDir,buildOutDir:e.build.outDir});return{...t,clientOutDir:r,serverOutDir:i}}function hk(e){if(!e.__reactRouterPluginContext)return;let{appDirectory:t,buildDirectory:r,serverBuildFile:i,routes:n}=e.__reactRouterPluginContext.reactRouterConfig;return{appDirectory:t,buildDirectory:r,serverBuildFile:i,routes:n}}function fk(e){let{remixConfig:t}=dk(e)?.api?.getPluginOptions()??{};if(t)return{appDirectory:t.appDirectory,serverBuildFile:t.serverBuildFile,routes:t.routes}}function t0(e,t){return e.plugins.find(r=>r.name===t)}function dk(e){return t0(e,"hydrogen:main")}function KB(e){return t0(e,"oxygen:main")}async function Xu(e){return!!(await be(e,"remix.config")).filepath}async function uR(e){return await Vu(e)?!1:Xu(e)}var mk="dist",gk="client",yk="worker";function cR(e){let t=e??process.cwd(),r=ro.join(t,"public"),i=ro.join(t,mk),n=ro.join(i,gk),o=ro.join(i,yk,"index.js");return{root:t,buildPath:i,buildPathClient:n,buildPathWorkerFile:o,publicPath:r}}function lR(e){return be(e,"remix.config").then(({filepath:t})=>{if(!t)throw new I("No remix.config.js file found.");return pk(import.meta.url)(t)})}async function r0(e,t=process.env.NODE_ENV){if(!await Vu(e))throw new I(Zg);return(await e0(e)).remixConfig}var vk=[/robots\.txt/],Ku={home:["_index","$"],page:"pages*",cart:["cart","cart.$lines","discount.$code"],products:"products*",collections:"collections*",policies:"policies*",blogs:"blogs*",account:"account*",search:["search","api.predictive-search"],robots:"[robots.txt]",sitemap:["[sitemap.xml]","sitemap.$type.$page[.xml]"]},Yu=[];async function i0(e=Object.keys(Ku)){Yu.length===0&&(Yu=(await n0(await Yi(Ht))).map(i=>i.replace(/\.tsx?$/,"")));let t={},r=[];for(let i of e){t[i]=[];let n=Ku[i];if(!n)throw new I(`No route found for ${i}. Try one of ${xk.join()}.`);let o=Array.isArray(n)?n:[n];for(let s of o){let c=s.replace("*","");t[i].push(...Yu.filter(h=>h.startsWith(c)))}r.push(...t[i])}return{routeGroups:t,resolvedRouteFiles:r}}var xk=[...Object.keys(Ku),"all"];async function s0(e,t){let{routeGroups:r,resolvedRouteFiles:i}=e.routeName==="all"?await i0():await i0([e.routeName]),{rootDirectory:n,appDirectory:o}=t||await r0(e.directory),s=i.flatMap(p=>Ht+"/"+p),c=await ft(n),h=N(o,Ht),m=await wk(h,e),d=!!(e.typescript??await U(N(n,"tsconfig.json"))),f=[];for(let p of s)f.push(await Qu(p,{...e,typescript:d,localePrefix:m,rootDirectory:n,appDirectory:o,formatOptions:c}));return m&&await Dk({typescript:d,localePrefix:m,routesDirectory:h,formatOptions:c,adapter:e.adapter}),{routes:f,routeGroups:r,isTypescript:d,formatOptions:c}}async function wk(e,{localePrefix:t,routeName:r,v1RouteConvention:i}){if(t)return t;if(t!==void 0||r==="all")return;let n=await n0(e).catch(()=>[]),o=i?/^\(\$(\w+)\)$/:/^\(\$(\w+)\)\.(_index|\$|cart).[jt]sx?$/,s=n.find(c=>o.test(c));if(s)return s.match(o)?.[1]}async function Qu(e,{rootDirectory:t,appDirectory:r,typescript:i,force:n,adapter:o,templatesRoot:s,formatOptions:c,localePrefix:h,v1RouteConvention:m=!1,signal:d,overwriteFileDeps:f=!0}){s??=await Mu();let p=(e.match(/(\.[jt]sx?)$/)??[])[1]??".tsx";e=e.replace(p,"");let a=N(r,Ek(e,h,{v1RouteConvention:m})+(i?p:p.replace(".ts",".js"))),u={operation:"created",sourceRoute:e,destinationRoute:hc(a,t)};if(!n&&await U(a)){if(!await rt({message:`The file ${u.destinationRoute} already exists. Do you want to replace it?`,defaultValue:!1,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:d}))return{...u,operation:"skipped"};u.operation="replaced"}let l=await Yi(e+p,s),g=await bk(l,await Yi("",s));for(let v of g){let w=v.startsWith(Ht+"/")?a:N(r,v.replace(/\.ts(x?)$/,`.${i?"ts$1":"js$1"}`));if(!f&&await U(w))continue;await U(le(w))||await on(le(w));let C=await Yi(v,s);if(!/\.[jt]sx?$/.test(v)){await Dr(C,w);continue}let S=await X(C);i||(S=await Jt(S,C)),o&&(S=o0(S,o)),S=await zt(S,c,w),await V(w,S)}return u}function o0(e,t){return e.replace(/(from\s+['"])react-router(['"])/g,`$1${t}$2`)}function Ek(e,t,r){let i=e.replace(Ht+"/",""),n=t&&!vk.some(o=>o.test(i))?`($${t})`+(r.v1RouteConvention?"/":"."):"";return Ht+"/"+n+(r.v1RouteConvention?Qg(i):i)}async function bk(e,t){let r=new Set([e]),i=new Set([kt(t,e)]);for(let n of r){let o=(await X(n,{encoding:"utf8"})).matchAll(/^(import|export)\s+.*?\s+from\s+['"](.*?)['"];?$/gims);for(let[,,s]of o){if(!s||!/^(\.|~)/.test(s)||(s=s.replace(/\?[a-z.]+$/,""),s=s.replace("~",kt(le(n),t)||"."),s.includes("/+types/")))continue;let c=J(le(n),s),h=(await be(le(c),Tt(c))).filepath||c;h.includes(`/${Ht}/`)||(i.add(kt(t,h)),/\.[jt]sx?$/.test(h)&&r.add(h))}}return[...i]}function Dk({typescript:e,localePrefix:t,...r}){return Ck({...r,typescript:e,templateName:"locale-check.ts",routeName:`($${t})${e?".tsx":".jsx"}`})}async function Ck({templateName:e,routeName:t,routesDirectory:r,formatOptions:i,typescript:n,adapter:o}){let s=N(r,t);if(await U(s))return;let c=await Ze("routes",e);if(!await U(c))throw new Error("Unknown strategy");let h=await X(c);o&&(h=o0(h,o)),n||(h=await Jt(h,c)),h=await zt(h,i,s),await V(s,h)}var _k={js:"JavaScript",ts:"TypeScript"};async function XR(e,t,r){let i=r??await Og({abortSignal:e.signal,extraChoices:{none:"Set up later "+W.dim(`(run \`${t} setup markets\`)`)}}),n=i==="none"?void 0:i;return{i18nStrategy:n,setupI18n:async o=>{n&&await Tg(n,o)}}}function VR(e){return{setupRoutes:async(t,r,i)=>(await s0({routeName:"all",directory:t,force:!0,typescript:r==="ts",localePrefix:i?.i18nStrategy==="subfolders"?"locale":!1,signal:e.signal,...i},{rootDirectory:t,appDirectory:N(t,"app")})).routeGroups}}function YR(e){return Promise.all(["routes.ts","root","entry.server","entry.client","../server.ts"].map(t=>Qu(t,e)))}async function KR(e,t,r){return t===ke?{}:r??await rt({confirmationMessage:"Yes",cancellationMessage:"No",message:["Create a global",{command:ke},"alias to run commands instead of",{command:t},"?"],abortSignal:e.signal})?{createShortcut:async()=>{try{return(await Jg()).length>0}catch(n){return me("Failed to create shortcut."+(n?.stack??n?.message??n)),!1}},showShortcutBanner:()=>mt({body:`You'll need to restart your terminal session to make \`${ke}\` alias available.`})}:{}}async function QR(e){to(!0);let{session:t,config:r}=await At();Kg(r);let i=await Ks(t),n=await Zu(i),o;return n?o=n.title:o=await Sr({message:"New storefront name",defaultValue:Zs(r.shopName),abortSignal:e.signal}),{...r,id:n?.id,title:o,session:t}}async function Zu(e){let t=[{label:"Create a new storefront",value:null},...e.map(({id:i,title:n,productionUrl:o})=>({label:`${n} (${o})`,value:i}))];if(t.length===1)return;let r=await tt({message:"Select a Hydrogen storefront to link",choices:t});return r?e.find(({id:i})=>i===r):void 0}async function ZR({storefrontInfo:e,controller:t,force:r,path:i}){let n=e&&mc(e.title),o=i??n??await Sr({message:"Where would you like to create your storefront?",defaultValue:"hydrogen-storefront",abortSignal:t.signal}),s=J(process.cwd(),o);if(await a0(s)){if(!r&&n&&(o=await Sr({message:`There's already a folder called \`${n}\`. Where do you want to create the app?`,defaultValue:n,abortSignal:t.signal}),s=J(process.cwd(),o),await a0(s)||(r=!0)),!r&&!await rt({message:`The directory ${W.cyan(o)} is not empty. Do you want to delete the existing files and continue?`,defaultValue:!1,abortSignal:t.signal})){mt({body:`Destination path ${W.cyan(o)} already exists and is not an empty directory. You may use \`--force\` or \`-f\` to override it.`});return}await fo(s,{force:!0})}return{name:Tt(o),location:o,directory:s,storefrontTitle:e?.title}}async function eL(e,t,r){let i=r??await tt({message:"Select a language",choices:[{label:"JavaScript",value:"js"},{label:"TypeScript",value:"ts"}],defaultValue:"js",abortSignal:t.signal});return{language:i,async transpileProject(){i!=="ts"&&await $u(e)}}}async function tL(e,t,r){let i=r??await _g({abortSignal:t.signal,extraChoices:{none:"Skip and set up later"}}),n=i==="none"?void 0:i;return{cssStrategy:n,async setupCss(){if(n){if(n==="postcss"||n==="css-modules")return;let o=await Ag(n,{rootDirectory:e,appDirectory:N(e,"app")},!0);o&&await o.workPromise}}}}async function rL(e,t,r,i){let n=r??Ac(),o="npm";if(i!==!1)if(n==="unknown"){let s=await tt({message:"Select package manager to install dependencies",choices:[{label:"NPM",value:"npm"},{label:"PNPM",value:"pnpm"},{label:"Yarn v1",value:"yarn"},{label:"Skip and install later",value:"no"}],defaultValue:"npm",abortSignal:t.signal});s==="no"?i=!1:(o=s,i=!0)}else i===void 0?(o=n,i=await rt({message:`Install dependencies with ${n}?`,confirmationMessage:"Yes",cancellationMessage:"No",abortSignal:t.signal})):o=n;return Vi&&(await Dr(N(Xs(),".npmrc"),N(e,".npmrc")).catch(()=>{}),i||await Sk(await gg(),N(e,"node_modules")).catch(()=>{})),{packageManager:o,shouldInstallDeps:i,installDeps:i?async()=>{await Fc({directory:e,packageManager:o,args:[],signal:t.signal})}:()=>{}}}var Fk=`
280
280
  node_modules
281
281
  /.cache
282
282
  /build
@@ -289,10 +289,10 @@ node_modules
289
289
  `.slice(1);async function iL(e){try{return await Mc(e),await V(N(e,".gitignore"),Fk),process.env.NODE_ENV==="test"&&process.env.CI&&(await Qe('git config --global user.name "hydrogen"'),await Qe('git config --global user.email "hydrogen@shopify.com"')),kk(e,"Scaffold Storefront")}catch(t){me(`Failed to initialize Git.
290
290
  `+(t?.stack??t?.message??t))}}async function kk(e,t){try{await jc(e),await Bc(t,{directory:e})}catch(r){me(`Failed to commit code.
291
291
  `+(r?.stack??r?.message??r))}}async function nL(e,{language:t,packageManager:r,depsInstalled:i,cssStrategy:n,cliCommand:o,routes:s,i18n:c,depsError:h,i18nError:m,routesError:d}){let f=!!(h||m||d),p=[];e.storefrontTitle&&p.push(["Shopify",e.storefrontTitle]),t&&p.push(["Language",_k[t]]),n&&p.push(["Styling",Lu[n]]),!m&&c&&p.push(["Markets",qu[c].split(" (")[0]]);let a="";if(!d&&s&&Object.keys(s).length){p.push(["Routes",""]);for(let[g,v]of Object.entries(s)){v=Array.isArray(v)?v:[v];let x=[...new Set(v.map(w=>"/"+Tk(w)))].sort();x.length>2&&(x=[...new Set(x.map(C=>C.split("/")[1]??""))].map(C=>"/"+C+"/*")),a+=`
292
- \u2022 ${cc(g)} ${W.dim("("+x.join(" & ")+")")}`}}let u=1+p.reduce((g,[v])=>Math.max(g,v.length),0);(f?Xe:Cr)({headline:"Storefront setup complete"+(f?" with errors (see warnings below).":"!"),body:p.map(([g,v])=>` ${(g+":").padEnd(u," ")} ${W.dim(v)}`).join(`
292
+ \u2022 ${fc(g)} ${W.dim("("+x.join(" & ")+")")}`}}let u=1+p.reduce((g,[v])=>Math.max(g,v.length),0);(f?Xe:Cr)({headline:"Storefront setup complete"+(f?" with errors (see warnings below).":"!"),body:p.map(([g,v])=>` ${(g+":").padEnd(u," ")} ${W.dim(v)}`).join(`
293
293
  `)+a,customSections:[f&&{title:`Warnings
294
294
  `,body:[{list:{items:[h&&["Failed to install dependencies:",{subdued:h.message}],m&&["Failed to scaffold Markets:",{subdued:m.message}],d&&["Failed to scaffold routes:",{subdued:d.message}]].filter(g=>!!g)}}]},{title:`Next steps
295
- `,body:[{list:{items:[["Run",{command:[e.directory===process.cwd()?void 0:`cd ${e.location.replace(/^\.\//,"")}`,i?void 0:`${r} install`,Sc()?"npm run dev":Nc(r,"dev")].filter(Boolean).join(" && ")}]].filter(g=>!!g)}}]}].filter(g=>!!g)})}function sL(e,t){return async function(i){if(e.abort(),await Promise.resolve(),t?.directory&&await uo(t.directory,{force:!0}).catch(()=>{}),ln(new I("Failed to initialize project: "+(i?.message??""),i?.tryMessage??i?.stack)),process.env.SHOPIFY_UNIT_TEST&&process.exit.name!=="spy")throw console.error("Error during test before process.exit:",i),i;process.exit(1)}}async function a0(e){return await U(e)&&await un(e)&&(await Ak(e)).length>0}function Tk(e){return e.replace(/(^|\.)_index$/,"").replace(/((^|\.)[^\.]+)_\./g,"$1.").replace(/\.(?!\w+\])/g,"/").replace(/\$$/g,":catchAll").replace(/\$/g,":").replace(/[\[\]]/g,"").replace(/:\w*Handle/i,":handle")}function u0(){function e(i){return i[Math.floor(Math.random()*i.length)]}let t=e(["Bay","Bend","Cape","Cliff","Cove","Creek","Dale","Dune","Fjord","Glade","Gulf","Hill","Isle","Knoll","Lake","Loch","Mesa","Peak","Pond","Quay","Reef","Ridge","Rise","River","Road","Shore","Strait","Stream","Vale","Valley","View","Vista"]);return`${e(["Crimson","Azure","Coral","Fuchsia","Indigo","Ivory","Lavender","Lime","Magenta","Maroon","Orchid","Peach","Plum","Quartz","Salmon","Teal","Turquoise","Violet","Yellow","Ebony","Jade","Lilac","Mint","Onyx","Pearl","Ruby","Sapphire","Topaz"])} ${t}`}var c0=class e extends fn{static descriptionWithMarkdown=`Links your local development environment to a remote Hydrogen storefront. You can link an unlimited number of development environments to a single Hydrogen storefront.
295
+ `,body:[{list:{items:[["Run",{command:[e.directory===process.cwd()?void 0:`cd ${e.location.replace(/^\.\//,"")}`,i?void 0:`${r} install`,Sc()?"npm run dev":Nc(r,"dev")].filter(Boolean).join(" && ")}]].filter(g=>!!g)}}]}].filter(g=>!!g)})}function sL(e,t){return async function(i){if(e.abort(),await Promise.resolve(),t?.directory&&await fo(t.directory,{force:!0}).catch(()=>{}),ln(new I("Failed to initialize project: "+(i?.message??""),i?.tryMessage??i?.stack)),process.env.SHOPIFY_UNIT_TEST&&process.exit.name!=="spy")throw console.error("Error during test before process.exit:",i),i;process.exit(1)}}async function a0(e){return await U(e)&&await un(e)&&(await Ak(e)).length>0}function Tk(e){return e.replace(/(^|\.)_index$/,"").replace(/((^|\.)[^\.]+)_\./g,"$1.").replace(/\.(?!\w+\])/g,"/").replace(/\$$/g,":catchAll").replace(/\$/g,":").replace(/[\[\]]/g,"").replace(/:\w*Handle/i,":handle")}function u0(){function e(i){return i[Math.floor(Math.random()*i.length)]}let t=e(["Bay","Bend","Cape","Cliff","Cove","Creek","Dale","Dune","Fjord","Glade","Gulf","Hill","Isle","Knoll","Lake","Loch","Mesa","Peak","Pond","Quay","Reef","Ridge","Rise","River","Road","Shore","Strait","Stream","Vale","Valley","View","Vista"]);return`${e(["Crimson","Azure","Coral","Fuchsia","Indigo","Ivory","Lavender","Lime","Magenta","Maroon","Orchid","Peach","Plum","Quartz","Salmon","Teal","Turquoise","Violet","Yellow","Ebony","Jade","Lilac","Mint","Onyx","Pearl","Ruby","Sapphire","Topaz"])} ${t}`}var c0=class e extends fn{static descriptionWithMarkdown=`Links your local development environment to a remote Hydrogen storefront. You can link an unlimited number of development environments to a single Hydrogen storefront.
296
296
 
297
297
  Linking to a Hydrogen storefront enables you to run [dev](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-dev) and automatically inject your linked Hydrogen storefront's environment variables directly into the server runtime.
298
298
 
@@ -313,7 +313,7 @@ node_modules
313
313
  `;async function tc(e,t,r){let{hydrogenStorefrontCustomerApplicationUrlsReplace:{success:i,userErrors:n}}=await Je(Pk,e,{storefrontId:t,urlsReplaceInput:r});return{success:i,userErrors:n}}var h0=class e extends fn{static description="Push project configuration to admin";static flags={...ci.path,"storefront-id":di.Flags.string({description:"The id of the storefront the configuration should be pushed to. Must start with 'gid://shopify/HydrogenStorefront/'"}),"dev-origin":di.Flags.string({description:"The development domain of your application.",required:!0}),"javascript-origin":di.Flags.string({description:"The origin to register as the allowed JavaScript origin for the Customer Account API OAuth flow. Defaults to --dev-origin. Must not include a port (Shopify rejects origins with ports); use this to register a portless origin while keeping a portful --dev-origin."}),"relative-redirect-uri":di.Flags.string({description:"The relative url of allowed callback url for Customer Account API OAuth flow. Default is '/account/authorize'"}),"relative-logout-uri":di.Flags.string({description:"The relative url of allowed url that will be redirected to post-logout for Customer Account API OAuth flow. Default to nothing."})};async run(){let{flags:t}=await this.parse(e);await rc({...Qi(t)})}};async function rc({path:e=process.cwd(),storefrontId:t,devOrigin:r,javascriptOrigin:i,redirectUriRelativeUrl:n="/account/authorize",logoutUriRelativeUrl:o}){let s=await ic(e,t);try{if(!s)throw new Error("No storefrontId was found in --storefront-id flag or .shopify/project.json");let c=n?new URL(n,r).toString():r,h=i??r,m=o?new URL(o,r).toString():r;if(!c&&!h&&!m)return;let{session:d,config:f}=await At(e),p=f?.storefront?.customerAccountConfig,{success:a,userErrors:u}=await tc(d,s,{redirectUri:{add:c?[c]:void 0,removeRegex:p?.redirectUri},javascriptOrigin:{add:h?[h]:void 0,removeRegex:p?.javascriptOrigin},logoutUris:{add:m?[m]:void 0,removeRegex:p?.logoutUri}});if(!a||u.length){let l=new Error("Customer Account Application setup update fail.");throw l.userErrors=u,l}return await jg(e,{redirectUri:c,javascriptOrigin:h,logoutUri:m}),()=>Ik(d,s,{redirectUri:c,javascriptOrigin:h,logoutUri:m})}catch(c){let h=!1,m=c?.userErrors?.length?c.userErrors.map(f=>(/Javascript origin is not allowed for this application type/i.test(f.message)&&(h=!0),`${f.field}: ${f.message}`)):c.message?[c.message]:[],d=[{link:{label:"Manually update application setup",url:"https://shopify.dev/docs/custom-storefronts/building-with-the-customer-account-api/hydrogen#update-the-application-setup"}}];throw h&&d.unshift({link:{label:"Enable Public access for Hydrogen",url:"https://shopify.dev/docs/custom-storefronts/building-with-the-customer-account-api/getting-started#step-1-enable-customer-account-api-access"}}),new I("Customer Account Application setup update fail.",m.length?[{list:{title:"The following error occurs during update:",items:m.map((f,p)=>`${p!=0?`
314
314
 
315
315
  `:""}${f}`)}}]:void 0,d)}}async function Ik(e,t,r={}){Object.values(r).some(Boolean)&&(me(`Cleaning up Customer Application url "${r.redirectUri}"`),await tc(e,t,{redirectUri:{removeRegex:r?.redirectUri},javascriptOrigin:{removeRegex:r?.javascriptOrigin},logoutUris:{removeRegex:r?.logoutUri}}).catch(i=>{me(`Failed to clean up Customer Application url "${r.redirectUri}":
316
- ${i?.message}`)}))}async function ic(e,t){if(t)return t;let{session:r,config:i}=await At(e);if(i.storefront?.id)return i.storefront.id;let n=await eo();return await ec(e,r,i,{cliCommand:n})?(await hi(e)).storefront?.id:void 0}y();import nc from"node:path";import{EventEmitter as Nk}from"node:events";import{ReadableStream as Mk}from"node:stream/web";var f0=nn(sy(),1),qL="H2O_LOG_EVENT",d0;function UL(e){d0=e.Response}var oc=new Set(["/graphiql","/graphiql/customer-account.schema.json","/subrequest-profiler","/debug-network-server"]),jk={request:"Request",subrequest:"Sub request"};async function Bk(e){let t=await e.json();return{...t,requestId:t.requestId??"",eventType:t.eventType||"unknown",endTime:t.endTime||Date.now(),purpose:t.purpose==="prefetch"?"(prefetch)":"",cacheStatus:t.cacheStatus??"",graphql:t.graphql?JSON.parse(t.graphql):null}}var sc=new Nk,tn=[];function no(e="ok",t){return new d0(e,t)}function Rk(e){return tn.length=0,no()}function HL(e){return async function(r){let i=new URL(r.url);if(oc.has(i.pathname))return no();let{url:n,displayName:o,eventType:s,purpose:c,graphql:h,stackInfo:m,...d}=await Bk(r),f="",p=r.url,a=o;s==="subrequest"&&(a=a||h?.query.match(/(query|mutation)\s+(\w+)/)?.[0]?.replace(/\s+/," "),p=n||r.url,h&&(f=fi({graphql:h})));let u=null,l=null;if(m?.file){e?.transformLocation&&(m.file=e.transformLocation(m.file));let{source:v,line:x,column:w}=(0,f0.mapSourcePosition)({source:m.file,line:m.line??0,column:m.column??0});u=`${v}:${x}:${w+1}`,l=`vscode://${nc.join("file",u)}`,u=u.split(nc.sep+"app"+nc.sep)[1]??u,m.func&&(u=`${m.func.replace(/\d+$/,"")} (${u})`)}let g={event:jk[s]||s,data:JSON.stringify({...d,displayName:a,url:`${c} ${p}`.trim(),graphiqlLink:f,stackLine:u,stackLink:l})};return tn.push(g),tn.length>100&&tn.shift(),sc.emit("request",g),no()}}function Lk(e){let t=new Mk({start(r){let i=new TextEncoder,n=({event:c="message",data:h})=>{r.enqueue(i.encode(`event: ${c}
316
+ ${i?.message}`)}))}async function ic(e,t){if(t)return t;let{session:r,config:i}=await At(e);if(i.storefront?.id)return i.storefront.id;let n=await eo();return await ec(e,r,i,{cliCommand:n})?(await hi(e)).storefront?.id:void 0}y();import nc from"node:path";import{EventEmitter as Nk}from"node:events";import{ReadableStream as Mk}from"node:stream/web";var f0=nn(iy(),1),qL="H2O_LOG_EVENT",d0;function UL(e){d0=e.Response}var oc=new Set(["/graphiql","/graphiql/customer-account.schema.json","/subrequest-profiler","/debug-network-server"]),jk={request:"Request",subrequest:"Sub request"};async function Bk(e){let t=await e.json();return{...t,requestId:t.requestId??"",eventType:t.eventType||"unknown",endTime:t.endTime||Date.now(),purpose:t.purpose==="prefetch"?"(prefetch)":"",cacheStatus:t.cacheStatus??"",graphql:t.graphql?JSON.parse(t.graphql):null}}var sc=new Nk,tn=[];function no(e="ok",t){return new d0(e,t)}function Rk(e){return tn.length=0,no()}function HL(e){return async function(r){let i=new URL(r.url);if(oc.has(i.pathname))return no();let{url:n,displayName:o,eventType:s,purpose:c,graphql:h,stackInfo:m,...d}=await Bk(r),f="",p=r.url,a=o;s==="subrequest"&&(a=a||h?.query.match(/(query|mutation)\s+(\w+)/)?.[0]?.replace(/\s+/," "),p=n||r.url,h&&(f=fi({graphql:h})));let u=null,l=null;if(m?.file){e?.transformLocation&&(m.file=e.transformLocation(m.file));let{source:v,line:x,column:w}=(0,f0.mapSourcePosition)({source:m.file,line:m.line??0,column:m.column??0});u=`${v}:${x}:${w+1}`,l=`vscode://${nc.join("file",u)}`,u=u.split(nc.sep+"app"+nc.sep)[1]??u,m.func&&(u=`${m.func.replace(/\d+$/,"")} (${u})`)}let g={event:jk[s]||s,data:JSON.stringify({...d,displayName:a,url:`${c} ${p}`.trim(),graphiqlLink:f,stackLine:u,stackLink:l})};return tn.push(g),tn.length>100&&tn.shift(),sc.emit("request",g),no()}}function Lk(e){let t=new Mk({start(r){let i=new TextEncoder,n=({event:c="message",data:h})=>{r.enqueue(i.encode(`event: ${c}
317
317
  `)),r.enqueue(i.encode(`data: ${h}
318
318
 
319
319
  `))};tn.forEach(n),sc.addListener("request",n);let o=!1;function s(){o||(o=!0,e.signal.removeEventListener("abort",s),sc.removeListener("request",n),r.close())}if(e.signal.addEventListener("abort",s),e.signal.aborted)return s()}});return no(t,{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-store",Connection:"keep-alive"}})}function zL(e){return e.method==="DELETE"?Rk():Lk(e)}y();var KL="/debug-network-server";function QL(){throw new I("Could not load MiniOxygen.","Please make sure you have `@shopify/mini-oxygen` installed.")}function ZL({request:e,response:t,meta:r}){try{let i=new URL(e.url);if(!r.durationMs&&r.startTimeMs&&r.endTimeMs&&(r.durationMs=r.endTimeMs-r.startTimeMs),oc.has(i.pathname)||i.pathname==="/favicon.ico")return;let n=i.searchParams.has("_data"),o=e.url.replace(i.origin,""),s="",c="render";if(n){c=e.method==="GET"?"loader":"action";let m=i.searchParams.get("_data")?.replace("routes/","");o=i.pathname,s=`[${m}]`}let h=t.status<300?gt.green:t.status<400?gt.cyan:gt.errorText;it(Ar`${e.method.padStart(6)} ${h(String(t.status))} ${gt.italic(c.padEnd(7," "))} ${o} ${r.durationMs&&r.durationMs>0?W.dim(` ${r.durationMs}ms`):""}${s?" "+W.dim(s):""}${e.headers.purpose==="prefetch"?W.italic(W.dim(" prefetch")):""}`)}catch{e&&t?.status&&it(`${e.method} ${t.status} ${e.url}`)}}y();y();y();var $k=`#graphql
@@ -349,7 +349,7 @@ ${i?.message}`)}))}async function ic(e,t){if(t)return t;let{session:r,config:i}=
349
349
 
350
350
  `)}),v0())):v0(),o?{variables:o}:ac(e,i)]),m=Object.keys(c),d=Object.keys(s),f=Object.keys(h);function p(){(f.length>0||d.length+m.length>0)&&(it(`
351
351
  Environment variables injected into MiniOxygen:
352
- `),it(lc([...d.filter(a=>!f.includes(a)).map(a=>[a,"from Oxygen"]),...f.map(a=>[a,`from local ${i}`]),...m.filter(a=>!f.includes(a)).map(a=>[W.dim(a),W.dim("from Oxygen (Marked as secret)")])])))}return{logInjectedVariables:p,remoteVariables:s,remoteSecrets:c,localVariables:h,allVariables:{...c,...s,...h}}}async function Uk(e,t,r){let{session:i,config:n}=await At(e);if(r){let h=(await m0(i,n.storefront.id))?.environments||[];t=g0(h,r).handle}let o=(await p0(i,n.storefront.id,t))?.environmentVariables||[],s={},c={};for(let{key:h,value:m,isSecret:d}of o)d?c[h]=m:s[h]=m;return{remoteVariables:s,remoteSecrets:c}}async function ac(e,t){let r=J(e,t);return await U(r).then(i=>i?$c(r):{variables:{}})}y();async function x0(e,t,r){let i=await xc(e,"tunnel_start",{port:t,provider:r}),o=Object.values(i).filter(s=>!s?.isErr()||s.error.type!=="invalid-provider")[0];if(!o)throw new hn(`We couldn't find the ${r} tunnel plugin`);if(o.isErr())throw new I(`${r} failed to start the tunnel.
352
+ `),it(dc([...d.filter(a=>!f.includes(a)).map(a=>[a,"from Oxygen"]),...f.map(a=>[a,`from local ${i}`]),...m.filter(a=>!f.includes(a)).map(a=>[W.dim(a),W.dim("from Oxygen (Marked as secret)")])])))}return{logInjectedVariables:p,remoteVariables:s,remoteSecrets:c,localVariables:h,allVariables:{...c,...s,...h}}}async function Uk(e,t,r){let{session:i,config:n}=await At(e);if(r){let h=(await m0(i,n.storefront.id))?.environments||[];t=g0(h,r).handle}let o=(await p0(i,n.storefront.id,t))?.environmentVariables||[],s={},c={};for(let{key:h,value:m,isSecret:d}of o)d?c[h]=m:s[h]=m;return{remoteVariables:s,remoteSecrets:c}}async function ac(e,t){let r=J(e,t);return await U(r).then(i=>i?$c(r):{variables:{}})}y();async function x0(e,t,r){let i=await xc(e,"tunnel_start",{port:t,provider:r}),o=Object.values(i).filter(s=>!s?.isErr()||s.error.type!=="invalid-provider")[0];if(!o)throw new hn(`We couldn't find the ${r} tunnel plugin`);if(o.isErr())throw new I(`${r} failed to start the tunnel.
353
353
  ${o.error.message}`);return o.value}async function w0(e){return new Promise((t,r)=>{let i=0,n=async()=>{let s=e.getTunnelStatus();if(me(`Polling tunnel status for ${e.provider} (attempt ${i}): ${s.status}`),s.status==="error")return r(new I(s.message,s.tryMessage));s.status==="connected"?t(s.url):(i+=1,o())},o=()=>{setTimeout(n,500)};n()})}function Hk(e){return e.PUBLIC_STORE_DOMAIN==="mock.shop"||e.PUBLIC_STORE_DOMAIN===""}function H3(e){mt({headline:"Using mock.shop with `--customer-account-push` flag is not supported",body:"The functionalities of this flag are disabled.",nextSteps:["You may continue knowing Customer Account API (/account) interactions will fail.",["Or run",{command:`${e} env pull`},"to link to your store credentials."]]})}function z3(e,t,r){return ac(e,r).then(async({variables:i})=>{let n=t&&!Hk(i);n&&await ic(e);let{shop:o,storefront:s}=await hi(e),c=s?.id;return{storefrontId:c,customerAccountPush:n,fetchRemote:!!o&&!!c,localVariables:i,storefrontTitle:s?.title}})}var E0=Object.freeze({ORIGINAL:".trycloudflare.com",REBRANDED:".tryhydrogen.dev"});async function J3(e,t,r,i){it(`
354
354
  Starting tunnel...
355
355
  `);let n=await x0(t,r,"cloudflare"),o=await w0(n).then(c=>c.replace(E0.ORIGINAL,E0.REBRANDED)),s=await rc({path:e,devOrigin:o,storefrontId:i}).catch(c=>{c instanceof I&&mt({headline:"Customer Account Application setup update fail.",body:c.tryMessage||void 0,nextSteps:c.nextSteps})});return{host:o,cleanup:s}}function W3(e){let t=process.env.TERM_PROGRAM==="vscode",r="https://h2o.fyi/debugging/server-code"+(t?"#visual-studio-code":"#step-2-attach-a-debugger");return Ar`Debugging enabled on port ${String(e)}.\nAttach a ${gt.link(W.yellow(t?"VSCode debugger":"debugger"),r)} or open DevTools in http://127.0.0.1:${String(e)}.`.value}function G3(e){return e=e.endsWith("/")?e.slice(0,-1):e,[`View GraphiQL API browser: