@shopify/cli 4.7.1 → 4.8.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 (324) hide show
  1. package/dist/analytics-3IIUBZ3B.js +1 -0
  2. package/dist/analytics-OOT5AB52.js +1 -0
  3. package/dist/assets/hydrogen/starter/AGENTS.md +5 -0
  4. package/dist/assets/hydrogen/starter/CHANGELOG.md +9 -0
  5. package/dist/assets/hydrogen/starter/CLAUDE.md +1 -0
  6. package/dist/assets/hydrogen/starter/package.json +3 -3
  7. package/dist/bootstrap.js +1 -1
  8. package/dist/{chunk-U3F6GPCE.js → chunk-2AK44UYM.js} +1 -1
  9. package/dist/{chunk-N7425436.js → chunk-2CIZE537.js} +1 -1
  10. package/dist/{chunk-7JIYJMRN.js → chunk-2EAFYCCS.js} +1 -1
  11. package/dist/{chunk-LBREJXT6.js → chunk-2KGPH7YG.js} +1 -1
  12. package/dist/{chunk-VPY47DBW.js → chunk-2O224ZPO.js} +1 -1
  13. package/dist/{chunk-3WV7DQMM.js → chunk-2XDUJQQN.js} +3 -3
  14. package/dist/{chunk-K3VLFPPI.js → chunk-36ROOKQB.js} +1 -1
  15. package/dist/{chunk-SGIMJQEM.js → chunk-3DCN3N23.js} +1 -1
  16. package/dist/{chunk-PK73ZSND.js → chunk-3JXPOOFV.js} +39 -39
  17. package/dist/{chunk-IENBHP2S.js → chunk-4QBJ5JBX.js} +15 -16
  18. package/dist/chunk-4ZNV5YSL.js +1 -0
  19. package/dist/chunk-5L63PRJL.js +2 -0
  20. package/dist/{chunk-HRHNJFAA.js → chunk-5N6HNQQ5.js} +1 -1
  21. package/dist/{chunk-K63FW7Q7.js → chunk-5SEEDOQ5.js} +1 -1
  22. package/dist/chunk-67Z34HN5.js +5 -0
  23. package/dist/chunk-6BDAJ6UD.js +5 -0
  24. package/dist/chunk-6CXG3XLP.js +1 -0
  25. package/dist/{chunk-OJSJWGP2.js → chunk-6MWWJZFN.js} +1 -1
  26. package/dist/{chunk-N4KDWHT2.js → chunk-6RQOEPEC.js} +1 -1
  27. package/dist/{chunk-CRP4PQU2.js → chunk-72ZY3KTF.js} +1 -1
  28. package/dist/{chunk-VXYABRFY.js → chunk-742XXXGL.js} +1 -1
  29. package/dist/{chunk-VXX4EZ7G.js → chunk-7HFHL5SO.js} +1 -1
  30. package/dist/{chunk-PV6T52KB.js → chunk-7ISJRIPT.js} +1 -1
  31. package/dist/{chunk-KBBITJSF.js → chunk-7LWUHQIF.js} +1 -1
  32. package/dist/{chunk-7EUIO4ZO.js → chunk-7T6M7FAC.js} +1 -1
  33. package/dist/{chunk-3HCWJRL6.js → chunk-A6BMJISP.js} +1 -1
  34. package/dist/{chunk-HOVIGRE4.js → chunk-AWUX36VG.js} +1 -1
  35. package/dist/chunk-BWJIZYAG.js +1 -0
  36. package/dist/{chunk-6R62DGJG.js → chunk-BZ73NV3L.js} +1 -1
  37. package/dist/chunk-C3RUVXG2.js +6 -0
  38. package/dist/{chunk-IA3XNJ56.js → chunk-C4YLE3NS.js} +1 -1
  39. package/dist/chunk-CEYIZC3M.js +2 -0
  40. package/dist/{chunk-J2VRPZFC.js → chunk-CIWKN4HF.js} +1 -1
  41. package/dist/{chunk-JJSV7HNM.js → chunk-CULTZLC4.js} +1 -1
  42. package/dist/{chunk-HCQABTQL.js → chunk-CX75OKZK.js} +1 -1
  43. package/dist/{chunk-22NROZ5X.js → chunk-DASVZTAX.js} +46 -46
  44. package/dist/{chunk-EULSSTWY.js → chunk-DX3JLOUA.js} +1 -1
  45. package/dist/{chunk-IQT6LOA2.js → chunk-E55KS3GZ.js} +1 -1
  46. package/dist/{chunk-CNMJ6QXM.js → chunk-E5FXOLQO.js} +1 -1
  47. package/dist/{chunk-46BKAF3F.js → chunk-E6N4PZZR.js} +1 -1
  48. package/dist/{chunk-27UEK3FU.js → chunk-EB574SY6.js} +1 -1
  49. package/dist/chunk-EX5GVHGE.js +1 -0
  50. package/dist/chunk-F3NYCSXT.js +273 -0
  51. package/dist/{chunk-KNVHXIEB.js → chunk-F6X6OXXB.js} +1 -1
  52. package/dist/{chunk-Y6UZW73M.js → chunk-FDBHQLFK.js} +1 -1
  53. package/dist/{chunk-Z66ZSXKB.js → chunk-FDYW3UQC.js} +1 -1
  54. package/dist/{chunk-GJ4A4QKE.js → chunk-FEDVVYK2.js} +1 -1
  55. package/dist/{chunk-SCXL5UQ4.js → chunk-FJ6F4XRV.js} +1 -1
  56. package/dist/{chunk-JNIPCLAF.js → chunk-FOREMLFZ.js} +1 -1
  57. package/dist/{chunk-R5EGWWZH.js → chunk-FUYDGK33.js} +1 -1
  58. package/dist/{chunk-UAJBQEGE.js → chunk-FX3L344E.js} +1 -1
  59. package/dist/{chunk-YCU7ZCIG.js → chunk-G5XIGN5D.js} +1 -1
  60. package/dist/{chunk-LKZQSER3.js → chunk-GAYKYEIM.js} +1 -1
  61. package/dist/{chunk-KT5MDCII.js → chunk-GCY7LPEF.js} +1 -1
  62. package/dist/{chunk-3KM2GKXH.js → chunk-GNBRCK7L.js} +1 -1
  63. package/dist/{chunk-WEWLPJK2.js → chunk-GRPKF5ZB.js} +1 -1
  64. package/dist/{chunk-UK4WXL4G.js → chunk-GRSF7456.js} +1 -1
  65. package/dist/chunk-H2TQ4ODI.js +1 -0
  66. package/dist/{chunk-O53YIDJL.js → chunk-H6XEESUN.js} +1 -1
  67. package/dist/{chunk-I6XH7XDX.js → chunk-HB347DXT.js} +1 -1
  68. package/dist/chunk-HFSCXTJQ.js +97 -0
  69. package/dist/chunk-HHN6KZXX.js +1 -0
  70. package/dist/{chunk-6QJIGFQJ.js → chunk-HP64ZTEJ.js} +1 -1
  71. package/dist/{chunk-YXDIHVPY.js → chunk-IARCMH7G.js} +1 -1
  72. package/dist/{chunk-X5JQU6T7.js → chunk-IBI5UCJO.js} +1 -1
  73. package/dist/{chunk-RXUOQZ32.js → chunk-IKUSLRGD.js} +1 -1
  74. package/dist/{chunk-DLSUDLXD.js → chunk-IT4HYLTY.js} +1 -1
  75. package/dist/{chunk-RY4MPX5A.js → chunk-J4T73EAS.js} +1 -1
  76. package/dist/chunk-JG4HH54Q.js +1 -0
  77. package/dist/{chunk-S2WUVD7V.js → chunk-JIYSCWCG.js} +1 -1
  78. package/dist/chunk-JWRK5KLD.js +560 -0
  79. package/dist/{chunk-OF6CV5R4.js → chunk-JX7FYWPO.js} +1 -1
  80. package/dist/{chunk-6ELAWKMY.js → chunk-K42WBNJQ.js} +1 -1
  81. package/dist/{chunk-NSZHEXZK.js → chunk-KDU7VW3L.js} +1 -1
  82. package/dist/{chunk-6G5TDB45.js → chunk-KWVOJWO7.js} +1 -1
  83. package/dist/{chunk-O4G6TE26.js → chunk-LANUJ7LX.js} +1 -1
  84. package/dist/{chunk-DMFEYI4G.js → chunk-LUKQ5HLC.js} +1 -1
  85. package/dist/{chunk-PS2UVFHP.js → chunk-M2XHIN57.js} +1 -1
  86. package/dist/{chunk-YFKEESYB.js → chunk-MNOQAXJW.js} +1 -1
  87. package/dist/chunk-MYQUYU4U.js +2 -0
  88. package/dist/{chunk-PU3NATV4.js → chunk-N65F7ET2.js} +1 -1
  89. package/dist/{chunk-DEMZRLX5.js → chunk-N6RBRPGW.js} +1 -1
  90. package/dist/chunk-N75VOJHO.js +15 -0
  91. package/dist/{chunk-ELSDVDT7.js → chunk-NBFMP5XQ.js} +1 -1
  92. package/dist/{chunk-SYF6LGQB.js → chunk-NE3ZFSMS.js} +1 -1
  93. package/dist/{chunk-IF6EYTHG.js → chunk-NGLMZYS7.js} +2 -2
  94. package/dist/{chunk-6K3AJTNO.js → chunk-NHAUJWEG.js} +1 -1
  95. package/dist/chunk-NILETICC.js +11 -0
  96. package/dist/{chunk-5MD7GNEY.js → chunk-NNZXKFOS.js} +1 -1
  97. package/dist/{chunk-EWS2RNM6.js → chunk-NQK2VCDA.js} +1 -1
  98. package/dist/{chunk-HU4GFVEN.js → chunk-NROVZETL.js} +1 -1
  99. package/dist/{chunk-2S3GOPRL.js → chunk-NW6NUGN7.js} +1 -1
  100. package/dist/{chunk-I2LNQKIJ.js → chunk-O7DZXO3O.js} +2 -2
  101. package/dist/{chunk-77AC3OJQ.js → chunk-OBYQSIYU.js} +1 -1
  102. package/dist/{chunk-RY4YUBG3.js → chunk-OEG3N5PG.js} +1 -1
  103. package/dist/{chunk-7S73765P.js → chunk-OGBZTY2G.js} +1 -1
  104. package/dist/chunk-OMHR423H.js +1 -0
  105. package/dist/{chunk-22NWEE5U.js → chunk-OV6SRRXR.js} +1 -1
  106. package/dist/{chunk-FELV7GWY.js → chunk-OVV5YGKN.js} +1 -1
  107. package/dist/{chunk-U46RPVQA.js → chunk-OZL5FTT7.js} +1 -1
  108. package/dist/{chunk-MTTBBZSR.js → chunk-OZMQ2EJB.js} +1 -1
  109. package/dist/{chunk-USBP7H7J.js → chunk-P57P7UAN.js} +1 -1
  110. package/dist/{chunk-WOIAYH5U.js → chunk-PATTG7YZ.js} +1 -1
  111. package/dist/{chunk-XMJFT4WP.js → chunk-PG5YNPJB.js} +1 -1
  112. package/dist/chunk-PP4L2JJ6.js +3 -0
  113. package/dist/{chunk-PEHLR7XP.js → chunk-Q5JX23QU.js} +1 -1
  114. package/dist/{chunk-4FI2YBRF.js → chunk-Q5KVMLBK.js} +1 -1
  115. package/dist/{chunk-LKQ3EJ6Z.js → chunk-Q5LIJGT7.js} +1 -1
  116. package/dist/{chunk-QASOHYDS.js → chunk-Q6ADIMJM.js} +1 -1
  117. package/dist/{chunk-4FCS6PJY.js → chunk-QERQARMC.js} +1 -1
  118. package/dist/{chunk-RM3B7AFT.js → chunk-QOV43E26.js} +1 -1
  119. package/dist/{chunk-SJGPJDGH.js → chunk-QTFUYKMF.js} +1 -1
  120. package/dist/{chunk-4WGJUVXS.js → chunk-QTJCCOAG.js} +3 -3
  121. package/dist/{chunk-4VJ6YK7U.js → chunk-R6ICQT2D.js} +1 -1
  122. package/dist/{chunk-KDBKEVCF.js → chunk-R7T3LYJL.js} +1 -1
  123. package/dist/{chunk-AIA7JVSJ.js → chunk-RXQJCJDV.js} +1 -1
  124. package/dist/{chunk-WXSDPMIZ.js → chunk-S2TLBBSS.js} +1 -1
  125. package/dist/{chunk-PQG7XSQP.js → chunk-S5FOQY35.js} +1 -1
  126. package/dist/{chunk-WR6LRE4I.js → chunk-SYLHT42O.js} +1 -1
  127. package/dist/{chunk-ULR25PTO.js → chunk-T4AA6TSF.js} +1 -1
  128. package/dist/{chunk-5WGT45CO.js → chunk-T4QWK5GG.js} +1 -1
  129. package/dist/{chunk-XMQFQUUK.js → chunk-T7PJDT5O.js} +1 -1
  130. package/dist/{chunk-UZVON6GP.js → chunk-TEY4LRY7.js} +1 -1
  131. package/dist/{chunk-ZBSC2KZ7.js → chunk-TFBRVLDN.js} +1 -1
  132. package/dist/{chunk-QHLY2IID.js → chunk-TUVDJ3PG.js} +1 -1
  133. package/dist/{chunk-JNVCCE6M.js → chunk-U2DWBZK2.js} +1 -1
  134. package/dist/chunk-U53OLUOE.js +3 -0
  135. package/dist/{chunk-AWHS336T.js → chunk-UAETNFN4.js} +1 -1
  136. package/dist/{chunk-XTXYS7LB.js → chunk-UAFEFKAQ.js} +1 -1
  137. package/dist/{chunk-3MN3WLA2.js → chunk-ULRJDKWQ.js} +1 -1
  138. package/dist/chunk-UZARYOLN.js +1 -0
  139. package/dist/chunk-VASGXHYA.js +1 -0
  140. package/dist/chunk-VD4XJ6BX.js +1 -0
  141. package/dist/{chunk-HQUWYKSJ.js → chunk-VFM2KQRM.js} +4 -4
  142. package/dist/{chunk-KRLEEYLL.js → chunk-VSDRNYA5.js} +1 -1
  143. package/dist/{chunk-PE4TV5IJ.js → chunk-VVZSYHDG.js} +1 -1
  144. package/dist/chunk-VXEYO3ZP.js +1 -0
  145. package/dist/{chunk-2F2DXTRI.js → chunk-VYDSOAV4.js} +1 -1
  146. package/dist/{chunk-ZULQKYJ6.js → chunk-WBYAGS6B.js} +1 -1
  147. package/dist/chunk-WGAFCKGD.js +1 -0
  148. package/dist/{chunk-CUUCRIGC.js → chunk-WYBTC356.js} +1 -1
  149. package/dist/{chunk-WMZS3Y4Z.js → chunk-XF2KTEID.js} +1 -1
  150. package/dist/{chunk-O4RHWBBM.js → chunk-XH5YGJQR.js} +1 -1
  151. package/dist/chunk-XHKWITLA.js +1705 -0
  152. package/dist/chunk-XOCB4KNX.js +2 -0
  153. package/dist/{chunk-R2RULBBV.js → chunk-XUUAKGEX.js} +1 -1
  154. package/dist/{chunk-JQUEW7CB.js → chunk-XUYVJEZG.js} +1 -1
  155. package/dist/chunk-Y47C3LSX.js +3 -0
  156. package/dist/{chunk-GW4JHUIA.js → chunk-Y5PRPHLQ.js} +1 -1
  157. package/dist/{chunk-WTES5ZXR.js → chunk-YD2VQEN5.js} +1 -1
  158. package/dist/{chunk-RA3WWB2S.js → chunk-YESGYUEL.js} +1 -1
  159. package/dist/{chunk-IX4IGE5H.js → chunk-YEVGLC5X.js} +1 -1
  160. package/dist/{chunk-WSCSFFLH.js → chunk-YFINLODF.js} +2 -2
  161. package/dist/{chunk-5JW4JQWZ.js → chunk-YKL3BLWC.js} +1 -1
  162. package/dist/{chunk-ZDDLEFVO.js → chunk-YLXPYXQP.js} +1 -1
  163. package/dist/{chunk-EMETQFFJ.js → chunk-YNDIZCD2.js} +1 -1
  164. package/dist/{chunk-53IU36CL.js → chunk-YPWHD3NL.js} +1 -1
  165. package/dist/{chunk-UZV5H2JI.js → chunk-YSAFHVV6.js} +1 -1
  166. package/dist/{chunk-AFT6ABDE.js → chunk-YZMY2CTU.js} +1 -1
  167. package/dist/{chunk-VRH3HWYA.js → chunk-Z4AFEO36.js} +1 -1
  168. package/dist/{chunk-P5OQUFH6.js → chunk-Z5WPP6ME.js} +1 -1
  169. package/dist/chunk-Z65E4UAP.js +1 -0
  170. package/dist/{chunk-MK7MOLLI.js → chunk-ZDRIQC7O.js} +1 -1
  171. package/dist/{chunk-26DH5P7S.js → chunk-ZH44BDUR.js} +1 -1
  172. package/dist/{chunk-QT367CYF.js → chunk-ZL5LU4U2.js} +1 -1
  173. package/dist/{chunk-P5WLH64A.js → chunk-ZYX7UHCQ.js} +1 -1
  174. package/dist/{chunk-GFWXVO72.js → chunk-ZZRFG6ME.js} +114 -114
  175. package/dist/cli/commands/app/app-logs/sources.js +1 -1
  176. package/dist/cli/commands/app/build.js +1 -1
  177. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  178. package/dist/cli/commands/app/bulk/execute.js +1 -1
  179. package/dist/cli/commands/app/bulk/status.js +1 -1
  180. package/dist/cli/commands/app/config/link.js +1 -1
  181. package/dist/cli/commands/app/config/pull.js +1 -1
  182. package/dist/cli/commands/app/config/use.js +1 -1
  183. package/dist/cli/commands/app/config/validate.js +1 -1
  184. package/dist/cli/commands/app/demo/watcher.js +1 -1
  185. package/dist/cli/commands/app/deploy.js +1 -1
  186. package/dist/cli/commands/app/dev/clean.js +1 -1
  187. package/dist/cli/commands/app/dev.js +1 -1
  188. package/dist/cli/commands/app/doctor/instructions.js +1 -0
  189. package/dist/cli/commands/app/doctor.js +1 -0
  190. package/dist/cli/commands/app/env/pull.js +1 -1
  191. package/dist/cli/commands/app/env/show.js +1 -1
  192. package/dist/cli/commands/app/execute.js +1 -1
  193. package/dist/cli/commands/app/function/build.js +1 -1
  194. package/dist/cli/commands/app/function/info.js +1 -1
  195. package/dist/cli/commands/app/function/replay.js +1 -1
  196. package/dist/cli/commands/app/function/run.js +1 -1
  197. package/dist/cli/commands/app/function/schema.js +1 -1
  198. package/dist/cli/commands/app/function/typegen.js +1 -1
  199. package/dist/cli/commands/app/generate/extension.js +1 -1
  200. package/dist/cli/commands/app/graphiql.js +1 -1
  201. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  202. package/dist/cli/commands/app/import-extensions.js +1 -1
  203. package/dist/cli/commands/app/info.js +1 -1
  204. package/dist/cli/commands/app/init.js +1 -1
  205. package/dist/cli/commands/app/logs.js +1 -1
  206. package/dist/cli/commands/app/release.js +1 -1
  207. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -0
  208. package/dist/cli/commands/app/subscription-migrations/list.js +1 -0
  209. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -0
  210. package/dist/cli/commands/app/subscription-migrations/status.js +1 -0
  211. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -0
  212. package/dist/cli/commands/app/versions/list.js +1 -1
  213. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  214. package/dist/cli/commands/auth/login.js +1 -1
  215. package/dist/cli/commands/auth/logout.js +1 -1
  216. package/dist/cli/commands/cache/clear.js +1 -1
  217. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  218. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  219. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  220. package/dist/cli/commands/debug/command-flags.js +1 -1
  221. package/dist/cli/commands/doc/fetch.js +1 -1
  222. package/dist/cli/commands/doc/search.js +1 -1
  223. package/dist/cli/commands/docs/generate.js +1 -1
  224. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  225. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  226. package/dist/cli/commands/help.js +1 -1
  227. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  228. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  229. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  230. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  231. package/dist/cli/commands/notifications/generate.js +1 -1
  232. package/dist/cli/commands/notifications/list.js +1 -1
  233. package/dist/cli/commands/organization/list.js +1 -1
  234. package/dist/cli/commands/search.js +1 -1
  235. package/dist/cli/commands/send-analytics.js +1 -1
  236. package/dist/cli/commands/theme/check.js +1 -1
  237. package/dist/cli/commands/theme/console.js +1 -1
  238. package/dist/cli/commands/theme/delete.js +1 -1
  239. package/dist/cli/commands/theme/dev.js +1 -1
  240. package/dist/cli/commands/theme/duplicate.js +1 -1
  241. package/dist/cli/commands/theme/info.js +1 -1
  242. package/dist/cli/commands/theme/init.js +1 -1
  243. package/dist/cli/commands/theme/language-server.js +1 -1
  244. package/dist/cli/commands/theme/list.js +1 -1
  245. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  246. package/dist/cli/commands/theme/open.js +1 -1
  247. package/dist/cli/commands/theme/package.js +1 -1
  248. package/dist/cli/commands/theme/preview.js +1 -1
  249. package/dist/cli/commands/theme/profile.js +1 -1
  250. package/dist/cli/commands/theme/publish.js +1 -1
  251. package/dist/cli/commands/theme/pull.js +1 -1
  252. package/dist/cli/commands/theme/push.js +1 -1
  253. package/dist/cli/commands/theme/rename.js +1 -1
  254. package/dist/cli/commands/theme/share.js +1 -1
  255. package/dist/cli/commands/upgrade.js +1 -1
  256. package/dist/cli/commands/version.js +1 -1
  257. package/dist/command-registry.js +1 -1
  258. package/dist/{conf-store-QQ4DOFI3.js → conf-store-ASDCTDQ4.js} +1 -1
  259. package/dist/configs/all.yml +60 -0
  260. package/dist/configs/recommended.yml +60 -0
  261. package/dist/data/filters.json +31 -2
  262. package/dist/data/setting.json +129 -4
  263. package/dist/data/shopify_system_translations.json +154 -13
  264. package/dist/{deprecations-43ZQ5RCE.js → deprecations-VBQV7Q4O.js} +1 -1
  265. package/dist/dist-FZLOAKU7.js +1 -0
  266. package/dist/dist-HTY6UHG5.js +1 -0
  267. package/dist/environments-HSTNEQRG.js +1 -0
  268. package/dist/{error-26WTDNKZ.js → error-2LZYKRMA.js} +1 -1
  269. package/dist/error-handler-PIGEJ7BT.js +1 -0
  270. package/dist/{fs-Y7I3Y5IR.js → fs-BJHNJDDK.js} +1 -1
  271. package/dist/hooks/did-you-mean.js +1 -1
  272. package/dist/hooks/hydrogen-init.js +1 -1
  273. package/dist/hooks/postrun.js +1 -1
  274. package/dist/hooks/prerun.js +1 -1
  275. package/dist/hooks/public-metadata.js +1 -1
  276. package/dist/hooks/sensitive-metadata.js +1 -1
  277. package/dist/hooks/tunnel-provider.js +1 -1
  278. package/dist/hooks/tunnel-start.js +1 -1
  279. package/dist/index.js +14 -16
  280. package/dist/{is-global-WBIBPIVZ.js → is-global-6SCOAJVG.js} +1 -1
  281. package/dist/{local-HF4T3FFE.js → local-PZWPRFU7.js} +1 -1
  282. package/dist/{metadata-CSQPNQP2.js → metadata-VVBHB3HL.js} +1 -1
  283. package/dist/{node-package-manager-CVEU22N7.js → node-package-manager-ETYQN7OM.js} +1 -1
  284. package/dist/notifications-system-652OG5KL.js +1 -0
  285. package/dist/os-7D6NT4O3.js +1 -0
  286. package/dist/{output-E6OGPGXL.js → output-74VDGYJD.js} +1 -1
  287. package/dist/{prettier-RVUAAWC7.js → prettier-EGVCP5CY.js} +1 -1
  288. package/dist/{system-ZETSJRKS.js → system-P5QIJALL.js} +1 -1
  289. package/dist/tsconfig.tsbuildinfo +1 -1
  290. package/dist/{ui-7TVGGEWJ.js → ui-H5I5YVKV.js} +1 -1
  291. package/dist/upgrade-34HSYBXI.js +1 -0
  292. package/dist/version-EKXEAF6Q.js +1 -0
  293. package/dist/{version-DL4Y6DRX.js → version-J2PYO6M5.js} +1 -1
  294. package/dist/{workerd-EHI5ZCEV.js → workerd-X4TGHEG3.js} +1 -1
  295. package/oclif.manifest.json +903 -133
  296. package/package.json +9 -8
  297. package/dist/analytics-5SII3GTA.js +0 -1
  298. package/dist/analytics-F56E2NGH.js +0 -1
  299. package/dist/chunk-4I7TUB3K.js +0 -1
  300. package/dist/chunk-4NXLDIW5.js +0 -1
  301. package/dist/chunk-5QZHJCZM.js +0 -1
  302. package/dist/chunk-6AV6GX5W.js +0 -2
  303. package/dist/chunk-6SM4RY3I.js +0 -5
  304. package/dist/chunk-76NEIDP5.js +0 -1
  305. package/dist/chunk-BI7LE6CZ.js +0 -1
  306. package/dist/chunk-ESPT6CGE.js +0 -1
  307. package/dist/chunk-FAXNGDWI.js +0 -11
  308. package/dist/chunk-FQQXU5IN.js +0 -2
  309. package/dist/chunk-GXOFJIKQ.js +0 -559
  310. package/dist/chunk-M5Q74UZM.js +0 -3
  311. package/dist/chunk-OQWMCJLY.js +0 -3
  312. package/dist/chunk-SPE2D366.js +0 -16
  313. package/dist/chunk-TP4Z5OZT.js +0 -1382
  314. package/dist/chunk-VI5FF6SW.js +0 -1
  315. package/dist/dist-E7EGYE4D.js +0 -1
  316. package/dist/dist-WRUROUNV.js +0 -1
  317. package/dist/environments-RG64VB5R.js +0 -1
  318. package/dist/error-handler-XFH47Y75.js +0 -1
  319. package/dist/notifications-system-L3FMN6EX.js +0 -1
  320. package/dist/os-VLZLRAHR.js +0 -1
  321. package/dist/upgrade-F77O4ZDT.js +0 -1
  322. package/dist/version-3L3ANUTL.js +0 -1
  323. /package/dist/{chunk-NJPL5BTN.js → chunk-YLQ3LNNY.js} +0 -0
  324. /package/dist/{morph-77RHJICZ.js → morph-BMYYMQNX.js} +0 -0
@@ -1,23 +1,23 @@
1
- import{a as Mc,e as jc,f as Bc}from"./chunk-M5Q74UZM.js";import{a as $c}from"./chunk-3HCWJRL6.js";import{c as Rc,i as Lc,o as hy}from"./chunk-NJPL5BTN.js";import{b as fn}from"./chunk-3WV7DQMM.js";import{C as cn,R as wc,T as Ec,U as bc,ja as Dc,na as Cc,s as xc}from"./chunk-PK73ZSND.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as po}from"./chunk-GW4JHUIA.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-WSCSFFLH.js";import{a as ly}from"./chunk-XTXYS7LB.js";import{h as I,k as hn}from"./chunk-BI7LE6CZ.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-HQUWYKSJ.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-Y47C3LSX.js";import{a as $c}from"./chunk-A6BMJISP.js";import{c as Rc,i as Lc,o as hy}from"./chunk-YLQ3LNNY.js";import{b as fn}from"./chunk-2XDUJQQN.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-3JXPOOFV.js";import{B as kc,D as Tc,l as Ac,m as _c,p as Fc,x as po}from"./chunk-Y5PRPHLQ.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-YFINLODF.js";import{a as ly}from"./chunk-UAFEFKAQ.js";import{h as I,k as hn}from"./chunk-BWJIZYAG.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-VFM2KQRM.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(`
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 pi=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!!pi.settings.debug},set debug(e){pi.settings.debug=e,e&&Yy()},get errlog(){return pi.settings.errlog},set errlog(e){e?(this.errorLogger=new Vy.Logger(e),pi.settings.errlog=e):(delete this.errorLogger,delete pi.settings.errlog)},errorLogger:void 0}});var Qt=E(vt=>{"use strict";y();var gi=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=gi(Be()),Ky=gi(yc()),Do=gi(co()),Qy=gi(ho()),Zy=gi(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 mi=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=mi;(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})(mi||(vt.CLIError=mi={}))});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(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(`
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 yi=iy(),vi=cl(),ll=Object.hasOwnProperty,hl=Object.create(null);for(En in yi)ll.call(yi,En)&&(hl[yi[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(yi,c[1])?(s=yi[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=vi(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=vi(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=vi(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=vi(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=vi(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()),xi=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,xi.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,xi.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,xi.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,xi.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,xi.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 wi=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()),Ei=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,Ei.default)(m)),h+=this.wrap(m.trim(),r.indentation)),d&&(r.stripAnsi&&(d=(0,Ei.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=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+=`
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(`
14
14
  `)),o="",s=r.spacer||`
15
- `,c="";for(let[h,m]of t){let d=m;if(c&&(o+=s,o+=c),c=h||"",r.stripAnsi&&(c=(0,Ei.default)(c)),!d){c=c.trim();continue}r.stripAnsi&&(d=(0,Ei.default)(d)),d=this.wrap(d.trim(),r.indentation+n+2);let[f,...p]=d.split(`
15
+ `,c="";for(let[h,m]of t){let d=m;if(c&&(o+=s,o+=c),c=h||"",r.stripAnsi&&(c=(0,bi.default)(c)),!d){c=c.trim();continue}r.stripAnsi&&(d=(0,bi.default)(d)),d=this.wrap(d.trim(),r.indentation+n+2);let[f,...p]=d.split(`
16
16
  `).map(a=>a.trim());if(c+=" ".repeat(n-(0,Fx.default)(c)+2),c+=f,p.length!==0){if(p.length>4)return i();r.spacer||(s=`
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,Ei.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(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(`
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,34 +40,34 @@ ${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(bi=>{"use strict";y();var Lx=bi&&bi.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bi,"__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(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(`
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)))}};bi.default=$o});var Si=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=wi(),Vl=Fn(),Wx=jo(),Yl=Nr(),Di=oe(),Gx=Lo(),Xx=In(),Vx=qo(Jl()),Ci=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,Ci.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,Di.sortBy)(t,r=>r.id),t=(0,Di.uniqBy)(t,r=>r.id),t}get sortedTopics(){let t=this._topics;return t=t.filter(r=>this.opts.all||!r.hidden),t=(0,Di.sortBy)(t,r=>r.name),t=(0,Di.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(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(`
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(`
52
52
  `)[0];r=r.split(`
53
53
  `).slice(1).join(`
54
- `);let n=`${t.name}:COMMAND`;this.config.topicSeparator!==":"&&(n=n.replaceAll(":",this.config.topicSeparator));let o=(0,Di.compact)([(0,ot.colorize)(this.config?.theme?.commandSummary,i),this.section(this.opts.usageHeader||"USAGE",`${(0,ot.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,ot.colorize)(this.config?.theme?.bin,this.config.bin)} ${n}`),r&&this.section("DESCRIPTION",this.wrap((0,ot.colorize)(this.config?.theme?.sectionDescription,r)))]).join(`
54
+ `);let n=`${t.name}:COMMAND`;this.config.topicSeparator!==":"&&(n=n.replaceAll(":",this.config.topicSeparator));let o=(0,Ci.compact)([(0,ot.colorize)(this.config?.theme?.commandSummary,i),this.section(this.opts.usageHeader||"USAGE",`${(0,ot.colorize)(this.config?.theme?.dollarSign,"$")} ${(0,ot.colorize)(this.config?.theme?.bin,this.config.bin)} ${n}`),r&&this.section("DESCRIPTION",this.wrap((0,ot.colorize)(this.config?.theme?.sectionDescription,r)))]).join(`
55
55
 
56
56
  `);return this.opts.stripAnsi&&(o=(0,Gl.default)(o)),o+`
57
57
  `}formatTopics(t){if(t.length===0)return"";let r=this.renderList(t.map(i=>(this.config.topicSeparator!==":"&&(i.name=i.name.replaceAll(":",this.config.topicSeparator)),[(0,ot.colorize)(this.config?.theme?.topic,i.name),i.description&&this.render((0,ot.colorize)(this.config?.theme?.sectionDescription,i.description.split(`
58
58
  `)[0]))])),{indentation:2,spacer:`
59
59
  `,stripAnsi:this.opts.stripAnsi});return this.section("TOPICS",r)}getCommandHelpClass(t){return new this.CommandHelpClass(t,this.config,this.opts)}log(...t){this.opts.sendToStderr?Xl.default.stderr(Wl.format.apply(this,t)+`
60
60
  `):Xl.default.stdout(Wl.format.apply(this,t)+`
61
- `)}async showCommandHelp(t){let r=t.id,i=r.split(":").length,n=this.sortedTopics.filter(m=>m.name.startsWith(r+":")&&m.name.split(":").length===i+1),o=this.sortedCommands.filter(m=>m.id.startsWith(r+":")&&m.id.split(":").length===i+1),s=this.config.plugins.get(t.pluginName),c=this.config.pjson?.oclif?.state||s?.pjson?.oclif?.state||t.state;if(c&&this.log(c==="deprecated"?`${(0,Ci.formatCommandDeprecationWarning)((0,Yl.toConfiguredId)(r,this.config),t.deprecationOptions)}
61
+ `)}async showCommandHelp(t){let r=t.id,i=r.split(":").length,n=this.sortedTopics.filter(m=>m.name.startsWith(r+":")&&m.name.split(":").length===i+1),o=this.sortedCommands.filter(m=>m.id.startsWith(r+":")&&m.id.split(":").length===i+1),s=this.config.plugins.get(t.pluginName),c=this.config.pjson?.oclif?.state||s?.pjson?.oclif?.state||t.state;if(c&&this.log(c==="deprecated"?`${(0,Si.formatCommandDeprecationWarning)((0,Yl.toConfiguredId)(r,this.config),t.deprecationOptions)}
62
62
  `:`This command is in ${c}.
63
- `),t.deprecateAliases&&t.aliases.includes(r)){let m=this.config.commands.find(f=>f.aliases.includes(r)),d={...t.deprecationOptions,...m?{to:m.id}:{}};this.log(`${(0,Ci.formatCommandDeprecationWarning)((0,Yl.toConfiguredId)(r,this.config),d)}
63
+ `),t.deprecateAliases&&t.aliases.includes(r)){let m=this.config.commands.find(f=>f.aliases.includes(r)),d={...t.deprecationOptions,...m?{to:m.id}:{}};this.log(`${(0,Si.formatCommandDeprecationWarning)((0,Yl.toConfiguredId)(r,this.config),d)}
64
64
  `)}let h=this.summary(t);if(h&&this.log(h+`
65
- `),this.log(this.formatCommand(t)),this.log(""),n.length>0&&(this.log(this.formatTopics(n)),this.log("")),o.length>0){let m=[],d=o.filter(f=>(m.push(...f.aliases),!m.includes(f.id)));this.log(this.formatCommands(d)),this.log("")}}async showHelp(t){let r=t.slice(1);t=t.filter(s=>!(0,Ci.getHelpFlagAdditions)(this.config).includes(s)),this.config.topicSeparator!==":"&&(t=(0,Ci.standardizeIDFromArgv)(t,this.config));let i=Kx(t,this.config);if(!i){if(this.config.isSingleCommandCLI){let s=this.config.findCommand(Vl.SINGLE_COMMAND_CLI_SYMBOL);if(s){await this.showCommandHelp(s);return}}await this.showRootHelp();return}let n=this.config.findCommand(i);if(n){if(n.id===Vl.SINGLE_COMMAND_CLI_SYMBOL&&(n.id=""),n.hasDynamicHelp&&n.pluginType!=="jit"){let s=await n.load();for(let[c,h]of Object.entries(s.flags??{}))h.type!=="boolean"&&(n.flags[c].default=await(0,Wx.cacheDefaultValue)(h,!1));await this.showCommandHelp(n)}else await this.showCommandHelp(n);return}let o=this.config.findTopic(i);if(o){await this.showTopicHelp(o);return}if(this.config.flexibleTaxonomy){let s=this.config.findMatches(i,r);if(s.length>0&&(await this.config.runHook("command_incomplete",{argv:r.filter(h=>!i.split(":").includes(h)),id:i,matches:s})).successes.length>0)return}(0,zx.error)(`Command ${i} not found.`)}async showRootHelp(){let t=this.sortedTopics,r=this.sortedCommands,i=this.config.pjson?.oclif?.state;i&&this.log(i==="deprecated"?`${this.config.bin} is deprecated`:`${this.config.bin} is in ${i}.
65
+ `),this.log(this.formatCommand(t)),this.log(""),n.length>0&&(this.log(this.formatTopics(n)),this.log("")),o.length>0){let m=[],d=o.filter(f=>(m.push(...f.aliases),!m.includes(f.id)));this.log(this.formatCommands(d)),this.log("")}}async showHelp(t){let r=t.slice(1);t=t.filter(s=>!(0,Si.getHelpFlagAdditions)(this.config).includes(s)),this.config.topicSeparator!==":"&&(t=(0,Si.standardizeIDFromArgv)(t,this.config));let i=Kx(t,this.config);if(!i){if(this.config.isSingleCommandCLI){let s=this.config.findCommand(Vl.SINGLE_COMMAND_CLI_SYMBOL);if(s){await this.showCommandHelp(s);return}}await this.showRootHelp();return}let n=this.config.findCommand(i);if(n){if(n.id===Vl.SINGLE_COMMAND_CLI_SYMBOL&&(n.id=""),n.hasDynamicHelp&&n.pluginType!=="jit"){let s=await n.load();for(let[c,h]of Object.entries(s.flags??{}))h.type!=="boolean"&&(n.flags[c].default=await(0,Wx.cacheDefaultValue)(h,!1));await this.showCommandHelp(n)}else await this.showCommandHelp(n);return}let o=this.config.findTopic(i);if(o){await this.showTopicHelp(o);return}if(this.config.flexibleTaxonomy){let s=this.config.findMatches(i,r);if(s.length>0&&(await this.config.runHook("command_incomplete",{argv:r.filter(h=>!i.split(":").includes(h)),id:i,matches:s})).successes.length>0)return}(0,zx.error)(`Command ${i} not found.`)}async showRootHelp(){let t=this.sortedTopics,r=this.sortedCommands,i=this.config.pjson?.oclif?.state;i&&this.log(i==="deprecated"?`${this.config.bin} is deprecated`:`${this.config.bin} is in ${i}.
66
66
  `),this.log(this.formatRoot()),this.log(""),this.opts.all||(t=t.filter(n=>!n.name.includes(":")),r=r.filter(n=>!n.id.includes(":"))),t.length>0&&(this.log(this.formatTopics(t)),this.log("")),r.length>0&&(r=r.filter(n=>n.id),this.log(this.formatCommands(r)),this.log(""))}async showTopicHelp(t){let{name:r}=t,i=r.split(":").length,n=this.sortedTopics.filter(c=>c.name.startsWith(r+":")&&c.name.split(":").length===i+1),o=this.sortedCommands.filter(c=>c.id.startsWith(r+":")&&c.id.split(":").length===i+1),s=this.config.pjson?.oclif?.state;s&&this.log(`This topic is in ${s}.
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=Si(),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(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)!==`
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
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(`
@@ -76,15 +76,15 @@ ${i.message}`)}return jn}fe.loadHelpClass=Zx});var Bn=E(Le=>{"use strict";y();va
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 Ai=$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+" "+Ai.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),Ai.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()},Ai.default.cyan("?"))}ve.confirm=Hw;async function zw(e){let t=!!process.stdin.setRawMode;e||(e=t?`Press any key to continue or ${Ai.default.yellow("q")} to exit`:`Press enter to continue or ${Ai.default.yellow("q")} to exit`);let r=await hh(e,{required:!1,type:"single"});return t&&process.stderr.write(`
80
- `),r==="q"&&ah.error("quit"),r===""&&ah.error("ctrl-c"),r}ve.anykey=zw});var ph=E(_i=>{"use strict";y();var Jw=_i&&_i.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_i,"__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
- `)}_i.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 Fi(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||""}Fi.prototype=Object.create(Error.prototype);Fi.prototype.constructor=Fi;Fi.prototype.toString=function(t){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!t&&this.mark&&(r+=" "+this.mark.toString()),r};zh.exports=Fi});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
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(`
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
+ `)}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
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+=`:
86
86
  `+r)),i};Wh.exports=ca});var ce=E((FP,Vh)=>{"use strict";y();var Xh=qr(),SE=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],AE=["scalar","sequence","mapping"];function _E(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function FE(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(SE.indexOf(r)===-1)throw new Xh('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=_E(t.styleAliases||null),AE.indexOf(this.kind)===-1)throw new Xh('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}Vh.exports=FE});var sr=E((TP,Kh)=>{"use strict";y();var Yh=nr(),Gn=qr(),kE=ce();function la(e,t,r){var i=[];return e.include.forEach(function(n){r=la(n,t,r)}),e[t].forEach(function(n){r.forEach(function(o,s){o.tag===n.tag&&o.kind===n.kind&&i.push(s)}),r.push(n)}),r.filter(function(n,o){return i.indexOf(o)===-1})}function TE(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},t,r;function i(n){e[n.kind][n.tag]=e.fallback[n.tag]=n}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}function Ur(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&t.loadKind!=="scalar")throw new Gn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=la(this,"implicit",[]),this.compiledExplicit=la(this,"explicit",[]),this.compiledTypeMap=TE(this.compiledImplicit,this.compiledExplicit)}Ur.DEFAULT=null;Ur.create=function(){var t,r;switch(arguments.length){case 1:t=Ur.DEFAULT,r=arguments[0];break;case 2:t=arguments[0],r=arguments[1];break;default:throw new Gn("Wrong number of arguments for Schema.create function")}if(t=Yh.toArray(t),r=Yh.toArray(r),!t.every(function(i){return i instanceof Ur}))throw new Gn("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(i){return i instanceof kE}))throw new Gn("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Ur({include:t,explicit:r})};Kh.exports=Ur});var Zh=E((PP,Qh)=>{"use strict";y();var OE=ce();Qh.exports=new OE("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var tf=E((NP,ef)=>{"use strict";y();var PE=ce();ef.exports=new PE("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var nf=E((jP,rf)=>{"use strict";y();var IE=ce();rf.exports=new IE("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Xn=E((RP,sf)=>{"use strict";y();var NE=sr();sf.exports=new NE({explicit:[Zh(),tf(),nf()]})});var af=E(($P,of)=>{"use strict";y();var ME=ce();function jE(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function BE(){return null}function RE(e){return e===null}of.exports=new ME("tag:yaml.org,2002:null",{kind:"scalar",resolve:jE,construct:BE,predicate:RE,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var cf=E((UP,uf)=>{"use strict";y();var LE=ce();function $E(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function qE(e){return e==="true"||e==="True"||e==="TRUE"}function UE(e){return Object.prototype.toString.call(e)==="[object Boolean]"}uf.exports=new LE("tag:yaml.org,2002:bool",{kind:"scalar",resolve:$E,construct:qE,predicate:UE,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var hf=E((zP,lf)=>{"use strict";y();var HE=nr(),zE=ce();function JE(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function WE(e){return 48<=e&&e<=55}function GE(e){return 48<=e&&e<=57}function XE(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!JE(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}for(;r<t;r++)if(n=e[r],n!=="_"){if(!WE(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(n===":")break;if(!GE(e.charCodeAt(r)))return!1;i=!0}return!i||n==="_"?!1:n!==":"?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(r))}function VE(e){var t=e,r=1,i,n,o=[];return t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0"?0:i==="0"?t[1]==="b"?r*parseInt(t.slice(2),2):t[1]==="x"?r*parseInt(t,16):r*parseInt(t,8):t.indexOf(":")!==-1?(t.split(":").forEach(function(s){o.unshift(parseInt(s,10))}),t=0,n=1,o.forEach(function(s){t+=s*n,n*=60}),r*t):r*parseInt(t,10)}function YE(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!HE.isNegativeZero(e)}lf.exports=new zE("tag:yaml.org,2002:int",{kind:"scalar",resolve:XE,construct:VE,predicate:YE,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var pf=E((WP,df)=>{"use strict";y();var ff=nr(),KE=ce(),QE=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ZE(e){return!(e===null||!QE.test(e)||e[e.length-1]==="_")}function eb(e){var t,r,i,n;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,n=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(o){n.unshift(parseFloat(o,10))}),t=0,i=1,n.forEach(function(o){t+=o*i,i*=60}),r*t):r*parseFloat(t,10)}var tb=/^[-+]?[0-9]+e/;function rb(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ff.isNegativeZero(e))return"-0.0";return r=e.toString(10),tb.test(r)?r.replace("e",".e"):r}function ib(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||ff.isNegativeZero(e))}df.exports=new KE("tag:yaml.org,2002:float",{kind:"scalar",resolve:ZE,construct:eb,predicate:ib,represent:rb,defaultStyle:"lowercase"})});var ha=E((XP,mf)=>{"use strict";y();var nb=sr();mf.exports=new nb({include:[Xn()],implicit:[af(),cf(),hf(),pf()]})});var fa=E((YP,gf)=>{"use strict";y();var sb=sr();gf.exports=new sb({include:[ha()]})});var wf=E((QP,xf)=>{"use strict";y();var ob=ce(),yf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),vf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function ab(e){return e===null?!1:yf.exec(e)!==null||vf.exec(e)!==null}function ub(e){var t,r,i,n,o,s,c,h=0,m=null,d,f,p;if(t=yf.exec(e),t===null&&(t=vf.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(o=+t[4],s=+t[5],c=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(d=+t[10],f=+(t[11]||0),m=(d*60+f)*6e4,t[9]==="-"&&(m=-m)),p=new Date(Date.UTC(r,i,n,o,s,c,h)),m&&p.setTime(p.getTime()-m),p}function cb(e){return e.toISOString()}xf.exports=new ob("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:ab,construct:ub,instanceOf:Date,represent:cb})});var bf=E((e2,Ef)=>{"use strict";y();var lb=ce();function hb(e){return e==="<<"||e===null}Ef.exports=new lb("tag:yaml.org,2002:merge",{kind:"scalar",resolve:hb})});var Sf=E((r2,Cf)=>{"use strict";y();var or;try{Df=F,or=Df("buffer").Buffer}catch{}var Df,fb=ce(),da=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
87
- \r`;function db(e){if(e===null)return!1;var t,r,i=0,n=e.length,o=da;for(r=0;r<n;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}function pb(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,o=da,s=0,c=[];for(t=0;t<n;t++)t%4===0&&t&&(c.push(s>>16&255),c.push(s>>8&255),c.push(s&255)),s=s<<6|o.indexOf(i.charAt(t));return r=n%4*6,r===0?(c.push(s>>16&255),c.push(s>>8&255),c.push(s&255)):r===18?(c.push(s>>10&255),c.push(s>>2&255)):r===12&&c.push(s>>4&255),or?or.from?or.from(c):new or(c):c}function mb(e){var t="",r=0,i,n,o=e.length,s=da;for(i=0;i<o;i++)i%3===0&&i&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=o%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function gb(e){return or&&or.isBuffer(e)}Cf.exports=new fb("tag:yaml.org,2002:binary",{kind:"scalar",resolve:db,construct:pb,predicate:gb,represent:mb})});var _f=E((s2,Af)=>{"use strict";y();var yb=ce(),vb=Object.prototype.hasOwnProperty,xb=Object.prototype.toString;function wb(e){if(e===null)return!0;var t=[],r,i,n,o,s,c=e;for(r=0,i=c.length;r<i;r+=1){if(n=c[r],s=!1,xb.call(n)!=="[object Object]")return!1;for(o in n)if(vb.call(n,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function Eb(e){return e!==null?e:[]}Af.exports=new yb("tag:yaml.org,2002:omap",{kind:"sequence",resolve:wb,construct:Eb})});var kf=E((a2,Ff)=>{"use strict";y();var bb=ce(),Db=Object.prototype.toString;function Cb(e){if(e===null)return!0;var t,r,i,n,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],Db.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;o[t]=[n[0],i[n[0]]]}return!0}function Sb(e){if(e===null)return[];var t,r,i,n,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],n=Object.keys(i),o[t]=[n[0],i[n[0]]];return o}Ff.exports=new bb("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Cb,construct:Sb})});var Of=E((c2,Tf)=>{"use strict";y();var Ab=ce(),_b=Object.prototype.hasOwnProperty;function Fb(e){if(e===null)return!0;var t,r=e;for(t in r)if(_b.call(r,t)&&r[t]!==null)return!1;return!0}function kb(e){return e!==null?e:{}}Tf.exports=new Ab("tag:yaml.org,2002:set",{kind:"mapping",resolve:Fb,construct:kb})});var Hr=E((h2,Pf)=>{"use strict";y();var Tb=sr();Pf.exports=new Tb({include:[fa()],implicit:[wf(),bf()],explicit:[Sf(),_f(),kf(),Of()]})});var Nf=E((d2,If)=>{"use strict";y();var Ob=ce();function Pb(){return!0}function Ib(){}function Nb(){return""}function Mb(e){return typeof e>"u"}If.exports=new Ob("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Pb,construct:Ib,predicate:Mb,represent:Nb})});var jf=E((m2,Mf)=>{"use strict";y();var jb=ce();function Bb(e){if(e===null||e.length===0)return!1;var t=e,r=/\/([gim]*)$/.exec(e),i="";return!(t[0]==="/"&&(r&&(i=r[1]),i.length>3||t[t.length-i.length-1]!=="/"))}function Rb(e){var t=e,r=/\/([gim]*)$/.exec(e),i="";return t[0]==="/"&&(r&&(i=r[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)}function Lb(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function $b(e){return Object.prototype.toString.call(e)==="[object RegExp]"}Mf.exports=new jb("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Bb,construct:Rb,predicate:$b,represent:Lb})});var Lf=E((y2,Rf)=>{"use strict";y();var Vn;try{Bf=F,Vn=Bf("esprima")}catch{typeof window<"u"&&(Vn=window.esprima)}var Bf,qb=ce();function Ub(e){if(e===null)return!1;try{var t="("+e+")",r=Vn.parse(t,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function Hb(e){var t="("+e+")",r=Vn.parse(t,{range:!0}),i=[],n;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(o){i.push(o.name)}),n=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(i,t.slice(n[0]+1,n[1]-1)):new Function(i,"return "+t.slice(n[0],n[1]))}function zb(e){return e.toString()}function Jb(e){return Object.prototype.toString.call(e)==="[object Function]"}Rf.exports=new qb("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:Ub,construct:Hb,predicate:Jb,represent:zb})});var ki=E((w2,qf)=>{"use strict";y();var $f=sr();qf.exports=$f.DEFAULT=new $f({include:[Hr()],explicit:[Nf(),jf(),Lf()]})});var ad=E((b2,Ti)=>{"use strict";y();var wt=nr(),Xf=qr(),Wb=Gh(),Vf=Hr(),Gb=ki(),Bt=Object.prototype.hasOwnProperty,Yn=1,Yf=2,Kf=3,Kn=4,pa=1,Xb=2,Uf=3,Vb=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Yb=/[\x85\u2028\u2029]/,Kb=/[,\[\]\{\}]/,Qf=/^(?:!|!!|![a-z\-]+!)$/i,Zf=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Hf(e){return Object.prototype.toString.call(e)}function ct(e){return e===10||e===13}function ur(e){return e===9||e===32}function Ae(e){return e===9||e===32||e===10||e===13}function zr(e){return e===44||e===91||e===93||e===123||e===125}function Qb(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function Zb(e){return e===120?2:e===117?4:e===85?8:0}function eD(e){return 48<=e&&e<=57?e-48:-1}function zf(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
87
+ \r`;function db(e){if(e===null)return!1;var t,r,i=0,n=e.length,o=da;for(r=0;r<n;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}function pb(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,o=da,s=0,c=[];for(t=0;t<n;t++)t%4===0&&t&&(c.push(s>>16&255),c.push(s>>8&255),c.push(s&255)),s=s<<6|o.indexOf(i.charAt(t));return r=n%4*6,r===0?(c.push(s>>16&255),c.push(s>>8&255),c.push(s&255)):r===18?(c.push(s>>10&255),c.push(s>>2&255)):r===12&&c.push(s>>4&255),or?or.from?or.from(c):new or(c):c}function mb(e){var t="",r=0,i,n,o=e.length,s=da;for(i=0;i<o;i++)i%3===0&&i&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=o%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function gb(e){return or&&or.isBuffer(e)}Cf.exports=new fb("tag:yaml.org,2002:binary",{kind:"scalar",resolve:db,construct:pb,predicate:gb,represent:mb})});var _f=E((s2,Af)=>{"use strict";y();var yb=ce(),vb=Object.prototype.hasOwnProperty,xb=Object.prototype.toString;function wb(e){if(e===null)return!0;var t=[],r,i,n,o,s,c=e;for(r=0,i=c.length;r<i;r+=1){if(n=c[r],s=!1,xb.call(n)!=="[object Object]")return!1;for(o in n)if(vb.call(n,o))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}function Eb(e){return e!==null?e:[]}Af.exports=new yb("tag:yaml.org,2002:omap",{kind:"sequence",resolve:wb,construct:Eb})});var kf=E((a2,Ff)=>{"use strict";y();var bb=ce(),Db=Object.prototype.toString;function Cb(e){if(e===null)return!0;var t,r,i,n,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],Db.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;o[t]=[n[0],i[n[0]]]}return!0}function Sb(e){if(e===null)return[];var t,r,i,n,o,s=e;for(o=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],n=Object.keys(i),o[t]=[n[0],i[n[0]]];return o}Ff.exports=new bb("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Cb,construct:Sb})});var Of=E((c2,Tf)=>{"use strict";y();var Ab=ce(),_b=Object.prototype.hasOwnProperty;function Fb(e){if(e===null)return!0;var t,r=e;for(t in r)if(_b.call(r,t)&&r[t]!==null)return!1;return!0}function kb(e){return e!==null?e:{}}Tf.exports=new Ab("tag:yaml.org,2002:set",{kind:"mapping",resolve:Fb,construct:kb})});var Hr=E((h2,Pf)=>{"use strict";y();var Tb=sr();Pf.exports=new Tb({include:[fa()],implicit:[wf(),bf()],explicit:[Sf(),_f(),kf(),Of()]})});var Nf=E((d2,If)=>{"use strict";y();var Ob=ce();function Pb(){return!0}function Ib(){}function Nb(){return""}function Mb(e){return typeof e>"u"}If.exports=new Ob("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Pb,construct:Ib,predicate:Mb,represent:Nb})});var jf=E((m2,Mf)=>{"use strict";y();var jb=ce();function Bb(e){if(e===null||e.length===0)return!1;var t=e,r=/\/([gim]*)$/.exec(e),i="";return!(t[0]==="/"&&(r&&(i=r[1]),i.length>3||t[t.length-i.length-1]!=="/"))}function Rb(e){var t=e,r=/\/([gim]*)$/.exec(e),i="";return t[0]==="/"&&(r&&(i=r[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)}function Lb(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function $b(e){return Object.prototype.toString.call(e)==="[object RegExp]"}Mf.exports=new jb("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Bb,construct:Rb,predicate:$b,represent:Lb})});var Lf=E((y2,Rf)=>{"use strict";y();var Vn;try{Bf=F,Vn=Bf("esprima")}catch{typeof window<"u"&&(Vn=window.esprima)}var Bf,qb=ce();function Ub(e){if(e===null)return!1;try{var t="("+e+")",r=Vn.parse(t,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function Hb(e){var t="("+e+")",r=Vn.parse(t,{range:!0}),i=[],n;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(o){i.push(o.name)}),n=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(i,t.slice(n[0]+1,n[1]-1)):new Function(i,"return "+t.slice(n[0],n[1]))}function zb(e){return e.toString()}function Jb(e){return Object.prototype.toString.call(e)==="[object Function]"}Rf.exports=new qb("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:Ub,construct:Hb,predicate:Jb,represent:zb})});var Ti=E((w2,qf)=>{"use strict";y();var $f=sr();qf.exports=$f.DEFAULT=new $f({include:[Hr()],explicit:[Nf(),jf(),Lf()]})});var ad=E((b2,Oi)=>{"use strict";y();var wt=nr(),Xf=qr(),Wb=Gh(),Vf=Hr(),Gb=Ti(),Bt=Object.prototype.hasOwnProperty,Yn=1,Yf=2,Kf=3,Kn=4,pa=1,Xb=2,Uf=3,Vb=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Yb=/[\x85\u2028\u2029]/,Kb=/[,\[\]\{\}]/,Qf=/^(?:!|!!|![a-z\-]+!)$/i,Zf=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Hf(e){return Object.prototype.toString.call(e)}function ct(e){return e===10||e===13}function ur(e){return e===9||e===32}function Ae(e){return e===9||e===32||e===10||e===13}function zr(e){return e===44||e===91||e===93||e===123||e===125}function Qb(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function Zb(e){return e===120?2:e===117?4:e===85?8:0}function eD(e){return 48<=e&&e<=57?e-48:-1}function zf(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
88
88
  `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function tD(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function ed(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var td=new Array(256),rd=new Array(256);for(ar=0;ar<256;ar++)td[ar]=zf(ar)?1:0,rd[ar]=zf(ar);var ar;function rD(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Gb,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.maxTotalMergeKeys=typeof t.maxTotalMergeKeys=="number"?t.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.totalMergeKeys=0,this.documents=[]}function id(e,t){return new Xf(t,new Wb(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function M(e,t){throw id(e,t)}function Qn(e,t){e.onWarning&&e.onWarning.call(null,id(e,t))}var Jf={YAML:function(t,r,i){var n,o,s;t.version!==null&&M(t,"duplication of %YAML directive"),i.length!==1&&M(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&M(t,"ill-formed argument of the YAML directive"),o=parseInt(n[1],10),s=parseInt(n[2],10),o!==1&&M(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Qn(t,"unsupported YAML version of the document")},TAG:function(t,r,i){var n,o;i.length!==2&&M(t,"TAG directive accepts exactly two arguments"),n=i[0],o=i[1],Qf.test(n)||M(t,"ill-formed tag handle (first argument) of the TAG directive"),Bt.call(t.tagMap,n)&&M(t,'there is a previously declared suffix for "'+n+'" tag handle'),Zf.test(o)||M(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[n]=o}};function jt(e,t,r,i){var n,o,s,c;if(t<r){if(c=e.input.slice(t,r),i)for(n=0,o=c.length;n<o;n+=1)s=c.charCodeAt(n),s===9||32<=s&&s<=1114111||M(e,"expected valid JSON character");else Vb.test(c)&&M(e,"the stream contains non-printable characters");e.result+=c}}function Wf(e,t,r,i){var n,o,s,c;for(wt.isObject(r)||M(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),s=0,c=n.length;s<c;s+=1)o=n[s],e.maxTotalMergeKeys!==-1&&++e.totalMergeKeys>e.maxTotalMergeKeys&&M(e,"merge keys exceeded maxTotalMergeKeys ("+e.maxTotalMergeKeys+")"),Bt.call(t,o)||(ed(t,o,r[o]),i[o]=!0)}function Jr(e,t,r,i,n,o,s,c){var h,m;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),h=0,m=n.length;h<m;h+=1)Array.isArray(n[h])&&M(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Hf(n[h])==="[object Object]"&&(n[h]="[object Object]");if(typeof n=="object"&&Hf(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(h=0,m=o.length;h<m;h+=1)Wf(e,t,o[h],r);else Wf(e,t,o,r);else!e.json&&!Bt.call(r,n)&&Bt.call(t,n)&&(e.line=s||e.line,e.position=c||e.position,M(e,"duplicated mapping key")),ed(t,n,o),delete r[n];return t}function ma(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):M(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function se(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;ur(n);)n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(ct(n))for(ma(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Qn(e,"deficient indentation"),i}function Zn(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Ae(r)))}function ga(e,t){t===1?e.result+=" ":t>1&&(e.result+=wt.repeat(`
89
89
  `,t-1))}function iD(e,t,r){var i,n,o,s,c,h,m,d,f=e.kind,p=e.result,a;if(a=e.input.charCodeAt(e.position),Ae(a)||zr(a)||a===35||a===38||a===42||a===33||a===124||a===62||a===39||a===34||a===37||a===64||a===96||(a===63||a===45)&&(n=e.input.charCodeAt(e.position+1),Ae(n)||r&&zr(n)))return!1;for(e.kind="scalar",e.result="",o=s=e.position,c=!1;a!==0;){if(a===58){if(n=e.input.charCodeAt(e.position+1),Ae(n)||r&&zr(n))break}else if(a===35){if(i=e.input.charCodeAt(e.position-1),Ae(i))break}else{if(e.position===e.lineStart&&Zn(e)||r&&zr(a))break;if(ct(a))if(h=e.line,m=e.lineStart,d=e.lineIndent,se(e,!1,-1),e.lineIndent>=t){c=!0,a=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=h,e.lineStart=m,e.lineIndent=d;break}}c&&(jt(e,o,s,!1),ga(e,e.line-h),o=s=e.position,c=!1),ur(a)||(s=e.position+1),a=e.input.charCodeAt(++e.position)}return jt(e,o,s,!1),e.result?!0:(e.kind=f,e.result=p,!1)}function nD(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(jt(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else ct(r)?(jt(e,i,n,!0),ga(e,se(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Zn(e)?M(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);M(e,"unexpected end of the stream within a single quoted scalar")}function sD(e,t){var r,i,n,o,s,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return jt(e,r,e.position,!0),e.position++,!0;if(c===92){if(jt(e,r,e.position,!0),c=e.input.charCodeAt(++e.position),ct(c))se(e,!1,t);else if(c<256&&td[c])e.result+=rd[c],e.position++;else if((s=Zb(c))>0){for(n=s,o=0;n>0;n--)c=e.input.charCodeAt(++e.position),(s=Qb(c))>=0?o=(o<<4)+s:M(e,"expected hexadecimal character");e.result+=tD(o),e.position++}else M(e,"unknown escape sequence");r=i=e.position}else ct(c)?(jt(e,r,i,!0),ga(e,se(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Zn(e)?M(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}M(e,"unexpected end of the stream within a double quoted scalar")}function oD(e,t){var r=!0,i,n=e.tag,o,s=e.anchor,c,h,m,d,f,p={},a,u,l,g;if(g=e.input.charCodeAt(e.position),g===91)h=93,f=!1,o=[];else if(g===123)h=125,f=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),g=e.input.charCodeAt(++e.position);g!==0;){if(se(e,!0,t),g=e.input.charCodeAt(e.position),g===h)return e.position++,e.tag=n,e.anchor=s,e.kind=f?"mapping":"sequence",e.result=o,!0;r||M(e,"missed comma between flow collection entries"),u=a=l=null,m=d=!1,g===63&&(c=e.input.charCodeAt(e.position+1),Ae(c)&&(m=d=!0,e.position++,se(e,!0,t))),i=e.line,Wr(e,t,Yn,!1,!0),u=e.tag,a=e.result,se(e,!0,t),g=e.input.charCodeAt(e.position),(d||e.line===i)&&g===58&&(m=!0,g=e.input.charCodeAt(++e.position),se(e,!0,t),Wr(e,t,Yn,!1,!0),l=e.result),f?Jr(e,o,p,u,a,l):m?o.push(Jr(e,null,p,u,a,l)):o.push(a),se(e,!0,t),g=e.input.charCodeAt(e.position),g===44?(r=!0,g=e.input.charCodeAt(++e.position)):r=!1}M(e,"unexpected end of the stream within a flow collection")}function aD(e,t){var r,i,n=pa,o=!1,s=!1,c=t,h=0,m=!1,d,f;if(f=e.input.charCodeAt(e.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)pa===n?n=f===43?Uf:Xb:M(e,"repeat of a chomping mode identifier");else if((d=eD(f))>=0)d===0?M(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?M(e,"repeat of an indentation width identifier"):(c=t+d-1,s=!0);else break;if(ur(f)){do f=e.input.charCodeAt(++e.position);while(ur(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!ct(f)&&f!==0)}for(;f!==0;){for(ma(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!s||e.lineIndent<c)&&f===32;)e.lineIndent++,f=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>c&&(c=e.lineIndent),ct(f)){h++;continue}if(e.lineIndent<c){n===Uf?e.result+=wt.repeat(`
90
90
  `,o?1+h:h):n===pa&&o&&(e.result+=`
@@ -93,10 +93,10 @@ ${i.message}`)}return jn}fe.loadHelpClass=Zx});var Bn=E(Le=>{"use strict";y();va
93
93
  `,h+1)):h===0?o&&(e.result+=" "):e.result+=wt.repeat(`
94
94
  `,h):e.result+=wt.repeat(`
95
95
  `,o?1+h:h),o=!0,s=!0,h=0,r=e.position;!ct(f)&&f!==0;)f=e.input.charCodeAt(++e.position);jt(e,r,e.position,!1)}return!0}function Gf(e,t){var r,i=e.tag,n=e.anchor,o=[],s,c=!1,h;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),h=e.input.charCodeAt(e.position);h!==0&&!(h!==45||(s=e.input.charCodeAt(e.position+1),!Ae(s)));){if(c=!0,e.position++,se(e,!0,-1)&&e.lineIndent<=t){o.push(null),h=e.input.charCodeAt(e.position);continue}if(r=e.line,Wr(e,t,Kf,!1,!0),o.push(e.result),se(e,!0,-1),h=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&h!==0)M(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return c?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=o,!0):!1}function uD(e,t,r){var i,n,o,s,c=e.tag,h=e.anchor,m={},d={},f=null,p=null,a=null,u=!1,l=!1,g;for(e.anchor!==null&&(e.anchorMap[e.anchor]=m),g=e.input.charCodeAt(e.position);g!==0;){if(i=e.input.charCodeAt(e.position+1),o=e.line,s=e.position,(g===63||g===58)&&Ae(i))g===63?(u&&(Jr(e,m,d,f,p,null),f=p=a=null),l=!0,u=!0,n=!0):u?(u=!1,n=!0):M(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,g=i;else if(Wr(e,r,Yf,!1,!0))if(e.line===o){for(g=e.input.charCodeAt(e.position);ur(g);)g=e.input.charCodeAt(++e.position);if(g===58)g=e.input.charCodeAt(++e.position),Ae(g)||M(e,"a whitespace character is expected after the key-value separator within a block mapping"),u&&(Jr(e,m,d,f,p,null),f=p=a=null),l=!0,u=!1,n=!1,f=e.tag,p=e.result;else if(l)M(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(l)M(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0;else break;if((e.line===o||e.lineIndent>t)&&(Wr(e,t,Kn,!0,n)&&(u?p=e.result:a=e.result),u||(Jr(e,m,d,f,p,a,o,s),f=p=a=null),se(e,!0,-1),g=e.input.charCodeAt(e.position)),e.lineIndent>t&&g!==0)M(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return u&&Jr(e,m,d,f,p,null),l&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=m),l}function cD(e){var t,r=!1,i=!1,n,o,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&M(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(i=!0,n="!!",s=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(o=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):M(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Ae(s);)s===33&&(i?M(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),Qf.test(n)||M(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),Kb.test(o)&&M(e,"tag suffix cannot contain flow indicator characters")}return o&&!Zf.test(o)&&M(e,"tag name cannot contain such characters: "+o),r?e.tag=o:Bt.call(e.tagMap,n)?e.tag=e.tagMap[n]+o:n==="!"?e.tag="!"+o:n==="!!"?e.tag="tag:yaml.org,2002:"+o:M(e,'undeclared tag handle "'+n+'"'),!0}function lD(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&M(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Ae(r)&&!zr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&M(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function hD(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Ae(i)&&!zr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&M(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Bt.call(e.anchorMap,r)||M(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],se(e,!0,-1),!0}function Wr(e,t,r,i,n){var o,s,c,h=1,m=!1,d=!1,f,p,a,u,l;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=s=c=Kn===r||Kf===r,i&&se(e,!0,-1)&&(m=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),h===1)for(;cD(e)||lD(e);)se(e,!0,-1)?(m=!0,c=o,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):c=!1;if(c&&(c=m||n),(h===1||Kn===r)&&(Yn===r||Yf===r?u=t:u=t+1,l=e.position-e.lineStart,h===1?c&&(Gf(e,l)||uD(e,l,u))||oD(e,u)?d=!0:(s&&aD(e,u)||nD(e,u)||sD(e,u)?d=!0:hD(e)?(d=!0,(e.tag!==null||e.anchor!==null)&&M(e,"alias node should not have any properties")):iD(e,u,Yn===r)&&(d=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):h===0&&(d=c&&Gf(e,l))),e.tag!==null&&e.tag!=="!")if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&M(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),f=0,p=e.implicitTypes.length;f<p;f+=1)if(a=e.implicitTypes[f],a.resolve(e.result)){e.result=a.construct(e.result),e.tag=a.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else Bt.call(e.typeMap[e.kind||"fallback"],e.tag)?(a=e.typeMap[e.kind||"fallback"][e.tag],e.result!==null&&a.kind!==e.kind&&M(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+a.kind+'", not "'+e.kind+'"'),a.resolve(e.result)?(e.result=a.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):M(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):M(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||d}function fD(e){var t=e.position,r,i,n,o=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(s=e.input.charCodeAt(e.position))!==0&&(se(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(o=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!Ae(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&M(e,"directive name must not be less than one character in length");s!==0;){for(;ur(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!ct(s));break}if(ct(s))break;for(r=e.position;s!==0&&!Ae(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&ma(e),Bt.call(Jf,i)?Jf[i](e,i,n):Qn(e,'unknown document directive "'+i+'"')}if(se(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,se(e,!0,-1)):o&&M(e,"directives end mark is expected"),Wr(e,e.lineIndent-1,Kn,!1,!0),se(e,!0,-1),e.checkLineBreaks&&Yb.test(e.input.slice(t,e.position))&&Qn(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Zn(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,se(e,!0,-1));return}if(e.position<e.length-1)M(e,"end of the stream or a document separator is expected");else return}function nd(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
96
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new rD(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,M(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)fD(r);return r.documents}function sd(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=nd(e,r);if(typeof t!="function")return i;for(var n=0,o=i.length;n<o;n+=1)t(i[n])}function od(e,t){var r=nd(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Xf("expected a single document in the stream, but found more")}}function dD(e,t,r){return typeof t=="object"&&t!==null&&typeof r>"u"&&(r=t,t=null),sd(e,t,wt.extend({schema:Vf},r))}function pD(e,t){return od(e,wt.extend({schema:Vf},t))}Ti.exports.loadAll=sd;Ti.exports.load=od;Ti.exports.safeLoadAll=dD;Ti.exports.safeLoad=pD});var Td=E((C2,wa)=>{"use strict";y();var Pi=nr(),Ii=qr(),mD=ki(),gD=Hr(),md=Object.prototype.toString,gd=Object.prototype.hasOwnProperty,yD=9,Oi=10,vD=13,xD=32,wD=33,ED=34,yd=35,bD=37,DD=38,CD=39,SD=42,vd=44,AD=45,xd=58,_D=61,FD=62,kD=63,TD=64,wd=91,Ed=93,OD=96,bd=123,PD=124,Dd=125,xe={};xe[0]="\\0";xe[7]="\\a";xe[8]="\\b";xe[9]="\\t";xe[10]="\\n";xe[11]="\\v";xe[12]="\\f";xe[13]="\\r";xe[27]="\\e";xe[34]='\\"';xe[92]="\\\\";xe[133]="\\N";xe[160]="\\_";xe[8232]="\\L";xe[8233]="\\P";var ID=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function ND(e,t){var r,i,n,o,s,c,h;if(t===null)return{};for(r={},i=Object.keys(t),n=0,o=i.length;n<o;n+=1)s=i[n],c=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),h=e.compiledTypeMap.fallback[s],h&&gd.call(h.styleAliases,c)&&(c=h.styleAliases[c]),r[s]=c;return r}function ud(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Ii("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Pi.repeat("0",i-t.length)+t}function MD(e){this.schema=e.schema||mD,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Pi.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=ND(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function cd(e,t){for(var r=Pi.repeat(" ",t),i=0,n=-1,o="",s,c=e.length;i<c;)n=e.indexOf(`
96
+ `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new rD(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,M(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)fD(r);return r.documents}function sd(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=nd(e,r);if(typeof t!="function")return i;for(var n=0,o=i.length;n<o;n+=1)t(i[n])}function od(e,t){var r=nd(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Xf("expected a single document in the stream, but found more")}}function dD(e,t,r){return typeof t=="object"&&t!==null&&typeof r>"u"&&(r=t,t=null),sd(e,t,wt.extend({schema:Vf},r))}function pD(e,t){return od(e,wt.extend({schema:Vf},t))}Oi.exports.loadAll=sd;Oi.exports.load=od;Oi.exports.safeLoadAll=dD;Oi.exports.safeLoad=pD});var Td=E((C2,wa)=>{"use strict";y();var Ii=nr(),Ni=qr(),mD=Ti(),gD=Hr(),md=Object.prototype.toString,gd=Object.prototype.hasOwnProperty,yD=9,Pi=10,vD=13,xD=32,wD=33,ED=34,yd=35,bD=37,DD=38,CD=39,SD=42,vd=44,AD=45,xd=58,_D=61,FD=62,kD=63,TD=64,wd=91,Ed=93,OD=96,bd=123,PD=124,Dd=125,xe={};xe[0]="\\0";xe[7]="\\a";xe[8]="\\b";xe[9]="\\t";xe[10]="\\n";xe[11]="\\v";xe[12]="\\f";xe[13]="\\r";xe[27]="\\e";xe[34]='\\"';xe[92]="\\\\";xe[133]="\\N";xe[160]="\\_";xe[8232]="\\L";xe[8233]="\\P";var ID=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function ND(e,t){var r,i,n,o,s,c,h;if(t===null)return{};for(r={},i=Object.keys(t),n=0,o=i.length;n<o;n+=1)s=i[n],c=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),h=e.compiledTypeMap.fallback[s],h&&gd.call(h.styleAliases,c)&&(c=h.styleAliases[c]),r[s]=c;return r}function ud(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Ni("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Ii.repeat("0",i-t.length)+t}function MD(e){this.schema=e.schema||mD,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ii.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=ND(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function cd(e,t){for(var r=Ii.repeat(" ",t),i=0,n=-1,o="",s,c=e.length;i<c;)n=e.indexOf(`
97
97
  `,i),n===-1?(s=e.slice(i),i=c):(s=e.slice(i,n+1),i=n+1),s.length&&s!==`
98
98
  `&&(o+=r),o+=s;return o}function ya(e,t){return`
99
- `+Pi.repeat(" ",e.indent*t)}function jD(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}function xa(e){return e===xD||e===yD}function Gr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function BD(e){return Gr(e)&&!xa(e)&&e!==65279&&e!==vD&&e!==Oi}function ld(e,t){return Gr(e)&&e!==65279&&e!==vd&&e!==wd&&e!==Ed&&e!==bd&&e!==Dd&&e!==xd&&(e!==yd||t&&BD(t))}function RD(e){return Gr(e)&&e!==65279&&!xa(e)&&e!==AD&&e!==kD&&e!==xd&&e!==vd&&e!==wd&&e!==Ed&&e!==bd&&e!==Dd&&e!==yd&&e!==DD&&e!==SD&&e!==wD&&e!==PD&&e!==_D&&e!==FD&&e!==CD&&e!==ED&&e!==bD&&e!==TD&&e!==OD}function Cd(e){var t=/^\n* /;return t.test(e)}var Sd=1,Ad=2,_d=3,Fd=4,es=5;function LD(e,t,r,i,n){var o,s,c,h=!1,m=!1,d=i!==-1,f=-1,p=RD(e.charCodeAt(0))&&!xa(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),!Gr(s))return es;c=o>0?e.charCodeAt(o-1):null,p=p&&ld(s,c)}else{for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),s===Oi)h=!0,d&&(m=m||o-f-1>i&&e[f+1]!==" ",f=o);else if(!Gr(s))return es;c=o>0?e.charCodeAt(o-1):null,p=p&&ld(s,c)}m=m||d&&o-f-1>i&&e[f+1]!==" "}return!h&&!m?p&&!n(e)?Sd:Ad:r>9&&Cd(e)?es:m?Fd:_d}function $D(e,t,r,i){e.dump=(function(){if(t.length===0)return"''";if(!e.noCompatMode&&ID.indexOf(t)!==-1)return"'"+t+"'";var n=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n),s=i||e.flowLevel>-1&&r>=e.flowLevel;function c(h){return jD(e,h)}switch(LD(t,s,e.indent,o,c)){case Sd:return t;case Ad:return"'"+t.replace(/'/g,"''")+"'";case _d:return"|"+hd(t,e.indent)+fd(cd(t,n));case Fd:return">"+hd(t,e.indent)+fd(cd(qD(t,o),n));case es:return'"'+UD(t,o)+'"';default:throw new Ii("impossible error: invalid scalar style")}})()}function hd(e,t){var r=Cd(e)?String(t):"",i=e[e.length-1]===`
99
+ `+Ii.repeat(" ",e.indent*t)}function jD(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}function xa(e){return e===xD||e===yD}function Gr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==65279||65536<=e&&e<=1114111}function BD(e){return Gr(e)&&!xa(e)&&e!==65279&&e!==vD&&e!==Pi}function ld(e,t){return Gr(e)&&e!==65279&&e!==vd&&e!==wd&&e!==Ed&&e!==bd&&e!==Dd&&e!==xd&&(e!==yd||t&&BD(t))}function RD(e){return Gr(e)&&e!==65279&&!xa(e)&&e!==AD&&e!==kD&&e!==xd&&e!==vd&&e!==wd&&e!==Ed&&e!==bd&&e!==Dd&&e!==yd&&e!==DD&&e!==SD&&e!==wD&&e!==PD&&e!==_D&&e!==FD&&e!==CD&&e!==ED&&e!==bD&&e!==TD&&e!==OD}function Cd(e){var t=/^\n* /;return t.test(e)}var Sd=1,Ad=2,_d=3,Fd=4,es=5;function LD(e,t,r,i,n){var o,s,c,h=!1,m=!1,d=i!==-1,f=-1,p=RD(e.charCodeAt(0))&&!xa(e.charCodeAt(e.length-1));if(t)for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),!Gr(s))return es;c=o>0?e.charCodeAt(o-1):null,p=p&&ld(s,c)}else{for(o=0;o<e.length;o++){if(s=e.charCodeAt(o),s===Pi)h=!0,d&&(m=m||o-f-1>i&&e[f+1]!==" ",f=o);else if(!Gr(s))return es;c=o>0?e.charCodeAt(o-1):null,p=p&&ld(s,c)}m=m||d&&o-f-1>i&&e[f+1]!==" "}return!h&&!m?p&&!n(e)?Sd:Ad:r>9&&Cd(e)?es:m?Fd:_d}function $D(e,t,r,i){e.dump=(function(){if(t.length===0)return"''";if(!e.noCompatMode&&ID.indexOf(t)!==-1)return"'"+t+"'";var n=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n),s=i||e.flowLevel>-1&&r>=e.flowLevel;function c(h){return jD(e,h)}switch(LD(t,s,e.indent,o,c)){case Sd:return t;case Ad:return"'"+t.replace(/'/g,"''")+"'";case _d:return"|"+hd(t,e.indent)+fd(cd(t,n));case Fd:return">"+hd(t,e.indent)+fd(cd(qD(t,o),n));case es:return'"'+UD(t,o)+'"';default:throw new Ni("impossible error: invalid scalar style")}})()}function hd(e,t){var r=Cd(e)?String(t):"",i=e[e.length-1]===`
100
100
  `,n=i&&(e[e.length-2]===`
101
101
  `||e===`
102
102
  `),o=n?"+":i?"":"-";return r+o+`
@@ -107,16 +107,16 @@ ${i.message}`)}return jn}fe.loadHelpClass=Zx});var Bn=E(Le=>{"use strict";y();va
107
107
  `:"")+dd(h,t),n=o}return i}function dd(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,o,s=0,c=0,h="";i=r.exec(e);)c=i.index,c-n>t&&(o=s>n?s:c,h+=`
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
- `+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&&Oi===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 Ii("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&&Oi===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,f&&(p+=ya(e,t)),cr(e,t+1,d,!0,f)&&(e.dump&&Oi===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 Ii("!<"+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 Ii("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,Pi.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=ki();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=ki();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=Si(),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+`
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+`
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(`
115
115
  `).length;f>c&&(c=f)}let h=[...new Array(c).keys()];for(let m of h){let d=r.rowStart;for(let f of i){let p=f.width,a=s[f.key];a=a.split(`
116
116
  `)[m]||"";let u=(0,lr.default)(a),l=a.length-u,g=a.padEnd(p+l);(g.length-l>p||u===p)&&(g=(0,HC.default)(g,0,p-2)+"\u2026 ",g+=" ".repeat(p-(0,lr.default)(g))),d+=g}r.printLine(d)}}}outputYAML(){this.options.printLine((0,$C.safeDump)(this.resolveColumnsToObjectArray()))}resolveColumnsToObjectArray(){let{columns:t,data:r}=this;return r.map(i=>Object.fromEntries(t.map(n=>[n.key,i[n.key]??""])))}};function Sa(e,t,r={}){new Ca(e,t,r).display()}Ne.table=Sa;(function(e){e.Flags={columns:Rt.string({description:"only show provided columns (comma-separated)",exclusive:["extended"]}),csv:Rt.boolean({description:"output is csv format [alias: --output=csv]",exclusive:["no-truncate"]}),extended:Rt.boolean({char:"x",description:"show extra columns",exclusive:["columns"]}),filter:Rt.string({description:"filter property by partial string matching, ex: name=foo"}),"no-header":Rt.boolean({description:"hide table header from output",exclusive:["csv"]}),"no-truncate":Rt.boolean({description:"do not truncate output to fit screen",exclusive:["csv"]}),output:Rt.string({description:"output in a more machine friendly format",exclusive:["no-truncate","csv"],options:["csv","json","yaml"]}),sort:Rt.string({description:"property to sort by (prepend '-' for descending)"})};function t(r){if(r){let i={},n=(r.only&&typeof r.only=="string"?[r.only]:r.only)||Object.keys(e.Flags),o=(r.except&&typeof r.except=="string"?[r.except]:r.except)||[];for(let s of n)o.includes(s)||(i[s]=e.Flags[s]);return i}return e.Flags}e.flags=t})(Sa||(Ne.table=Sa={}));var WC=(e,t)=>e.reduce((r,i)=>{let n=i[t],o=n.split(`
117
117
  `);return Math.max(r,o.length>1?Math.max(...o.map(s=>(0,lr.default)(s))):(0,lr.default)(n))},0)});var tp=E(($2,ep)=>{"use strict";y();var hr=console.assert,GC=e=>{let t={joined:!0,spacerNoNeighbour:" ",spacerNeighbour:"\u2502 ",keyNoNeighbour:"\u2514\u2500 ",keyNeighbour:"\u251C\u2500 ",sortFn:null,...e};return hr(Object.keys(t).length===6,"Unexpected Option(s) provided"),hr(typeof t.joined=="boolean",'Option "joined" has invalid format'),hr(typeof t.spacerNoNeighbour=="string",'Option "spacerNoNeighbour" has invalid format'),hr(typeof t.spacerNeighbour=="string",'Option "spacerNeighbour" has invalid format'),hr(typeof t.keyNoNeighbour=="string",'Option "keyNoNeighbour" has invalid format'),hr(typeof t.keyNeighbour=="string",'Option "keyNeighbour" has invalid format'),hr(typeof t.sortFn=="function"||t.sortFn===null,'Option "sortFn" has invalid format'),t};ep.exports=(e,t={})=>{let r=GC(t),i=[],n=h=>r.sortFn===null?h.reverse():h.sort((m,d)=>r.sortFn(d,m)),o=[],s=n(Object.keys(e)).map(h=>[h]),c=[e];for(;s.length!==0;){let h=s.pop(),m=c[h.length-1][h[h.length-1]];o[h.length-1]=s.length!==0&&s[s.length-1].length===h.length,i.push([o.slice(0,h.length-1).map(d=>d?r.spacerNeighbour:r.spacerNoNeighbour).join(""),o[h.length-1]?r.keyNeighbour:r.keyNoNeighbour,h[h.length-1],["boolean","string","number"].includes(typeof m)?`: ${m}`:""].join("")),m instanceof Object&&!Array.isArray(m)&&(s.push(...n(Object.keys(m)).map(d=>h.concat(d))),c[h.length]=m)}return r.joined===!0?i.join(`
118
- `):i}});var rp=E(Ni=>{"use strict";y();Object.defineProperty(Ni,"__esModule",{value:!0});Ni.Tree=void 0;var XC=tp(),us=class e{nodes={};display(t=console.log){let r=function(n){let o={};for(let s of Object.keys(n))o[s]=r(n[s].nodes);return o},i=r(this.nodes);t(XC(i))}insert(t,r=new e){return this.nodes[t]=r,this}search(t){for(let r of Object.keys(this.nodes)){if(r===t)return this.nodes[r];let i=this.nodes[r].search(t);if(i)return i}}};Ni.Tree=us;function VC(){return new us}Ni.default=VC});var _a=E(de=>{"use strict";y();var YC=de&&de.__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]})),KC=de&&de.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),QC=de&&de.__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)&&YC(t,e,r);return KC(t,e),t},Aa=de&&de.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(de,"__esModule",{value:!0});de.tree=de.Table=de.progress=de.styledObject=void 0;var ZC=ph();Object.defineProperty(de,"styledObject",{enumerable:!0,get:function(){return Aa(ZC).default}});var eS=Uh();Object.defineProperty(de,"progress",{enumerable:!0,get:function(){return Aa(eS).default}});de.Table=QC(Zd());var tS=rp();Object.defineProperty(de,"tree",{enumerable:!0,get:function(){return Aa(tS).default}})});var ip=E(Fa=>{"use strict";y();Object.defineProperty(Fa,"__esModule",{value:!0});Fa.default=(e=1e3)=>new Promise(t=>{setTimeout(t,e)})});var sp=E((X2,np)=>{"use strict";y();np.exports=(e,t,r)=>(r=r||{},["\x1B]","8",";",Object.keys(r).map(i=>i+"="+r[i]).join(":"),";",t,"\x07",e,"\x1B]","8",";",";","\x07"].join(""))});var op=E((Mi,ka)=>{y();(function(t,r){typeof Mi=="object"&&typeof ka=="object"?ka.exports=r():typeof define=="function"&&define.amd?define([],r):typeof Mi=="object"?Mi.esprima=r():t.esprima=r()})(Mi,function(){return(function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}return r.m=e,r.c=t,r.p="",r(0)})([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(1),n=r(3),o=r(8),s=r(15);function c(p,a,u){var l=null,g=function(B,L){u&&u(B,L),l&&l.visit(B,L)},v=typeof u=="function"?g:null,x=!1;if(a){x=typeof a.comment=="boolean"&&a.comment;var w=typeof a.attachComment=="boolean"&&a.attachComment;(x||w)&&(l=new i.CommentHandler,l.attach=w,a.comment=!0,v=g)}var C=!1;a&&typeof a.sourceType=="string"&&(C=a.sourceType==="module");var S;a&&typeof a.jsx=="boolean"&&a.jsx?S=new n.JSXParser(p,a,v):S=new o.Parser(p,a,v);var T=C?S.parseModule():S.parseScript(),P=T;return x&&l&&(P.comments=l.comments),S.config.tokens&&(P.tokens=S.tokens),S.config.tolerant&&(P.errors=S.errorHandler.errors),P}t.parse=c;function h(p,a,u){var l=a||{};return l.sourceType="module",c(p,l,u)}t.parseModule=h;function m(p,a,u){var l=a||{};return l.sourceType="script",c(p,l,u)}t.parseScript=m;function d(p,a,u){var l=new s.Tokenizer(p,a),g;g=[];try{for(;;){var v=l.getNextToken();if(!v)break;u&&(v=u(v)),g.push(v)}}catch(x){l.errorHandler.tolerate(x)}return l.errorHandler.tolerant&&(g.errors=l.errors()),g}t.tokenize=d;var f=r(2);t.Syntax=f.Syntax,t.version="4.0.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),n=(function(){function o(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return o.prototype.insertInnerComments=function(s,c){if(s.type===i.Syntax.BlockStatement&&s.body.length===0){for(var h=[],m=this.leading.length-1;m>=0;--m){var d=this.leading[m];c.end.offset>=d.start&&(h.unshift(d.comment),this.leading.splice(m,1),this.trailing.splice(m,1))}h.length&&(s.innerComments=h)}},o.prototype.findTrailingComments=function(s){var c=[];if(this.trailing.length>0){for(var h=this.trailing.length-1;h>=0;--h){var m=this.trailing[h];m.start>=s.end.offset&&c.unshift(m.comment)}return this.trailing.length=0,c}var d=this.stack[this.stack.length-1];if(d&&d.node.trailingComments){var f=d.node.trailingComments[0];f&&f.range[0]>=s.end.offset&&(c=d.node.trailingComments,delete d.node.trailingComments)}return c},o.prototype.findLeadingComments=function(s){for(var c=[],h;this.stack.length>0;){var m=this.stack[this.stack.length-1];if(m&&m.start>=s.start.offset)h=m.node,this.stack.pop();else break}if(h){for(var d=h.leadingComments?h.leadingComments.length:0,f=d-1;f>=0;--f){var p=h.leadingComments[f];p.range[1]<=s.start.offset&&(c.unshift(p),h.leadingComments.splice(f,1))}return h.leadingComments&&h.leadingComments.length===0&&delete h.leadingComments,c}for(var f=this.leading.length-1;f>=0;--f){var m=this.leading[f];m.start<=s.start.offset&&(c.unshift(m.comment),this.leading.splice(f,1))}return c},o.prototype.visitNode=function(s,c){if(!(s.type===i.Syntax.Program&&s.body.length>0)){this.insertInnerComments(s,c);var h=this.findTrailingComments(c),m=this.findLeadingComments(c);m.length>0&&(s.leadingComments=m),h.length>0&&(s.trailingComments=h),this.stack.push({node:s,start:c.start.offset})}},o.prototype.visitComment=function(s,c){var h=s.type[0]==="L"?"Line":"Block",m={type:h,value:s.value};if(s.range&&(m.range=s.range),s.loc&&(m.loc=s.loc),this.comments.push(m),this.attach){var d={comment:{type:h,value:s.value,range:[c.start.offset,c.end.offset]},start:c.start.offset};s.loc&&(d.comment.loc=s.loc),s.type=h,this.leading.push(d),this.trailing.push(d)}},o.prototype.visit=function(s,c){s.type==="LineComment"?this.visitComment(s,c):s.type==="BlockComment"?this.visitComment(s,c):this.attach&&this.visitNode(s,c)},o})();t.CommentHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=this&&this.__extends||(function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var g in l)l.hasOwnProperty(g)&&(u[g]=l[g])};return function(u,l){a(u,l);function g(){this.constructor=u}u.prototype=l===null?Object.create(l):(g.prototype=l.prototype,new g)}})();Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=r(5),s=r(6),c=r(7),h=r(8),m=r(13),d=r(14);m.TokenName[100]="JSXIdentifier",m.TokenName[101]="JSXText";function f(a){var u;switch(a.type){case s.JSXSyntax.JSXIdentifier:var l=a;u=l.name;break;case s.JSXSyntax.JSXNamespacedName:var g=a;u=f(g.namespace)+":"+f(g.name);break;case s.JSXSyntax.JSXMemberExpression:var v=a;u=f(v.object)+"."+f(v.property);break;default:break}return u}var p=(function(a){i(u,a);function u(l,g,v){return a.call(this,l,g,v)||this}return u.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():a.prototype.parsePrimaryExpression.call(this)},u.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},u.prototype.finishJSX=function(){this.nextToken()},u.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},u.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},u.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},u.prototype.scanXHTMLEntity=function(l){for(var g="&",v=!0,x=!1,w=!1,C=!1;!this.scanner.eof()&&v&&!x;){var S=this.scanner.source[this.scanner.index];if(S===l)break;if(x=S===";",g+=S,++this.scanner.index,!x)switch(g.length){case 2:w=S==="#";break;case 3:w&&(C=S==="x",v=C||n.Character.isDecimalDigit(S.charCodeAt(0)),w=w&&!C);break;default:v=v&&!(w&&!n.Character.isDecimalDigit(S.charCodeAt(0))),v=v&&!(C&&!n.Character.isHexDigit(S.charCodeAt(0)));break}}if(v&&x&&g.length>2){var T=g.substr(1,g.length-2);w&&T.length>1?g=String.fromCharCode(parseInt(T.substr(1),10)):C&&T.length>2?g=String.fromCharCode(parseInt("0"+T.substr(1),16)):!w&&!C&&d.XHTMLEntities[T]&&(g=d.XHTMLEntities[T])}return g},u.prototype.lexJSX=function(){var l=this.scanner.source.charCodeAt(this.scanner.index);if(l===60||l===62||l===47||l===58||l===61||l===123||l===125){var g=this.scanner.source[this.scanner.index++];return{type:7,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(l===34||l===39){for(var v=this.scanner.index,x=this.scanner.source[this.scanner.index++],w="";!this.scanner.eof();){var C=this.scanner.source[this.scanner.index++];if(C===x)break;C==="&"?w+=this.scanXHTMLEntity(x):w+=C}return{type:8,value:w,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:v,end:this.scanner.index}}if(l===46){var S=this.scanner.source.charCodeAt(this.scanner.index+1),T=this.scanner.source.charCodeAt(this.scanner.index+2),g=S===46&&T===46?"...":".",v=this.scanner.index;return this.scanner.index+=g.length,{type:7,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:v,end:this.scanner.index}}if(l===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(n.Character.isIdentifierStart(l)&&l!==92){var v=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var C=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(C)&&C!==92)++this.scanner.index;else if(C===45)++this.scanner.index;else break}var P=this.scanner.source.slice(v,this.scanner.index);return{type:100,value:P,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:v,end:this.scanner.index}}return this.scanner.lex()},u.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var l=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(l)),l},u.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var l=this.scanner.index,g="";!this.scanner.eof();){var v=this.scanner.source[this.scanner.index];if(v==="{"||v==="<")break;++this.scanner.index,g+=v,n.Character.isLineTerminator(v.charCodeAt(0))&&(++this.scanner.lineNumber,v==="\r"&&this.scanner.source[this.scanner.index]===`
119
- `&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var x={type:101,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:l,end:this.scanner.index};return g.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(x)),x},u.prototype.peekJSXToken=function(){var l=this.scanner.saveState();this.scanner.scanComments();var g=this.lexJSX();return this.scanner.restoreState(l),g},u.prototype.expectJSX=function(l){var g=this.nextJSXToken();(g.type!==7||g.value!==l)&&this.throwUnexpectedToken(g)},u.prototype.matchJSX=function(l){var g=this.peekJSXToken();return g.type===7&&g.value===l},u.prototype.parseJSXIdentifier=function(){var l=this.createJSXNode(),g=this.nextJSXToken();return g.type!==100&&this.throwUnexpectedToken(g),this.finalize(l,new o.JSXIdentifier(g.value))},u.prototype.parseJSXElementName=function(){var l=this.createJSXNode(),g=this.parseJSXIdentifier();if(this.matchJSX(":")){var v=g;this.expectJSX(":");var x=this.parseJSXIdentifier();g=this.finalize(l,new o.JSXNamespacedName(v,x))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var w=g;this.expectJSX(".");var C=this.parseJSXIdentifier();g=this.finalize(l,new o.JSXMemberExpression(w,C))}return g},u.prototype.parseJSXAttributeName=function(){var l=this.createJSXNode(),g,v=this.parseJSXIdentifier();if(this.matchJSX(":")){var x=v;this.expectJSX(":");var w=this.parseJSXIdentifier();g=this.finalize(l,new o.JSXNamespacedName(x,w))}else g=v;return g},u.prototype.parseJSXStringLiteralAttribute=function(){var l=this.createJSXNode(),g=this.nextJSXToken();g.type!==8&&this.throwUnexpectedToken(g);var v=this.getTokenRaw(g);return this.finalize(l,new c.Literal(g.value,v))},u.prototype.parseJSXExpressionAttribute=function(){var l=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var g=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(l,new o.JSXExpressionContainer(g))},u.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},u.prototype.parseJSXNameValueAttribute=function(){var l=this.createJSXNode(),g=this.parseJSXAttributeName(),v=null;return this.matchJSX("=")&&(this.expectJSX("="),v=this.parseJSXAttributeValue()),this.finalize(l,new o.JSXAttribute(g,v))},u.prototype.parseJSXSpreadAttribute=function(){var l=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var g=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(l,new o.JSXSpreadAttribute(g))},u.prototype.parseJSXAttributes=function(){for(var l=[];!this.matchJSX("/")&&!this.matchJSX(">");){var g=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();l.push(g)}return l},u.prototype.parseJSXOpeningElement=function(){var l=this.createJSXNode();this.expectJSX("<");var g=this.parseJSXElementName(),v=this.parseJSXAttributes(),x=this.matchJSX("/");return x&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(l,new o.JSXOpeningElement(g,x,v))},u.prototype.parseJSXBoundaryElement=function(){var l=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var g=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(l,new o.JSXClosingElement(g))}var v=this.parseJSXElementName(),x=this.parseJSXAttributes(),w=this.matchJSX("/");return w&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(l,new o.JSXOpeningElement(v,w,x))},u.prototype.parseJSXEmptyExpression=function(){var l=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(l,new o.JSXEmptyExpression)},u.prototype.parseJSXExpressionContainer=function(){var l=this.createJSXNode();this.expectJSX("{");var g;return this.matchJSX("}")?(g=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),g=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(l,new o.JSXExpressionContainer(g))},u.prototype.parseJSXChildren=function(){for(var l=[];!this.scanner.eof();){var g=this.createJSXChildNode(),v=this.nextJSXText();if(v.start<v.end){var x=this.getTokenRaw(v),w=this.finalize(g,new o.JSXText(v.value,x));l.push(w)}if(this.scanner.source[this.scanner.index]==="{"){var C=this.parseJSXExpressionContainer();l.push(C)}else break}return l},u.prototype.parseComplexJSXElement=function(l){for(var g=[];!this.scanner.eof();){l.children=l.children.concat(this.parseJSXChildren());var v=this.createJSXChildNode(),x=this.parseJSXBoundaryElement();if(x.type===s.JSXSyntax.JSXOpeningElement){var w=x;if(w.selfClosing){var C=this.finalize(v,new o.JSXElement(w,[],null));l.children.push(C)}else g.push(l),l={node:v,opening:w,closing:null,children:[]}}if(x.type===s.JSXSyntax.JSXClosingElement){l.closing=x;var S=f(l.opening.name),T=f(l.closing.name);if(S!==T&&this.tolerateError("Expected corresponding JSX closing tag for %0",S),g.length>0){var C=this.finalize(l.node,new o.JSXElement(l.opening,l.children,l.closing));l=g[g.length-1],l.children.push(C),g.pop()}else break}}return l},u.prototype.parseJSXElement=function(){var l=this.createJSXNode(),g=this.parseJSXOpeningElement(),v=[],x=null;if(!g.selfClosing){var w=this.parseComplexJSXElement({node:l,opening:g,closing:x,children:v});v=w.children,x=w.closing}return this.finalize(l,new o.JSXElement(g,v,x))},u.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var l=this.parseJSXElement();return this.finishJSX(),l},u.prototype.isStartOfExpression=function(){return a.prototype.isStartOfExpression.call(this)||this.match("<")},u})(h.Parser);t.JSXParser=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(i){return i<65536?String.fromCharCode(i):String.fromCharCode(55296+(i-65536>>10))+String.fromCharCode(56320+(i-65536&1023))},isWhiteSpace:function(i){return i===32||i===9||i===11||i===12||i===160||i>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(i)>=0},isLineTerminator:function(i){return i===10||i===13||i===8232||i===8233},isIdentifierStart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i===92||i>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(i))},isIdentifierPart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i===92||i>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(i))},isDecimalDigit:function(i){return i>=48&&i<=57},isHexDigit:function(i){return i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102},isOctalDigit:function(i){return i>=48&&i<=55}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(6),n=(function(){function l(g){this.type=i.JSXSyntax.JSXClosingElement,this.name=g}return l})();t.JSXClosingElement=n;var o=(function(){function l(g,v,x){this.type=i.JSXSyntax.JSXElement,this.openingElement=g,this.children=v,this.closingElement=x}return l})();t.JSXElement=o;var s=(function(){function l(){this.type=i.JSXSyntax.JSXEmptyExpression}return l})();t.JSXEmptyExpression=s;var c=(function(){function l(g){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=g}return l})();t.JSXExpressionContainer=c;var h=(function(){function l(g){this.type=i.JSXSyntax.JSXIdentifier,this.name=g}return l})();t.JSXIdentifier=h;var m=(function(){function l(g,v){this.type=i.JSXSyntax.JSXMemberExpression,this.object=g,this.property=v}return l})();t.JSXMemberExpression=m;var d=(function(){function l(g,v){this.type=i.JSXSyntax.JSXAttribute,this.name=g,this.value=v}return l})();t.JSXAttribute=d;var f=(function(){function l(g,v){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=g,this.name=v}return l})();t.JSXNamespacedName=f;var p=(function(){function l(g,v,x){this.type=i.JSXSyntax.JSXOpeningElement,this.name=g,this.selfClosing=v,this.attributes=x}return l})();t.JSXOpeningElement=p;var a=(function(){function l(g){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=g}return l})();t.JSXSpreadAttribute=a;var u=(function(){function l(g,v){this.type=i.JSXSyntax.JSXText,this.value=g,this.raw=v}return l})();t.JSXText=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),n=(function(){function b(D){this.type=i.Syntax.ArrayExpression,this.elements=D}return b})();t.ArrayExpression=n;var o=(function(){function b(D){this.type=i.Syntax.ArrayPattern,this.elements=D}return b})();t.ArrayPattern=o;var s=(function(){function b(D,A,R){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=D,this.body=A,this.generator=!1,this.expression=R,this.async=!1}return b})();t.ArrowFunctionExpression=s;var c=(function(){function b(D,A,R){this.type=i.Syntax.AssignmentExpression,this.operator=D,this.left=A,this.right=R}return b})();t.AssignmentExpression=c;var h=(function(){function b(D,A){this.type=i.Syntax.AssignmentPattern,this.left=D,this.right=A}return b})();t.AssignmentPattern=h;var m=(function(){function b(D,A,R){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=D,this.body=A,this.generator=!1,this.expression=R,this.async=!0}return b})();t.AsyncArrowFunctionExpression=m;var d=(function(){function b(D,A,R){this.type=i.Syntax.FunctionDeclaration,this.id=D,this.params=A,this.body=R,this.generator=!1,this.expression=!1,this.async=!0}return b})();t.AsyncFunctionDeclaration=d;var f=(function(){function b(D,A,R){this.type=i.Syntax.FunctionExpression,this.id=D,this.params=A,this.body=R,this.generator=!1,this.expression=!1,this.async=!0}return b})();t.AsyncFunctionExpression=f;var p=(function(){function b(D){this.type=i.Syntax.AwaitExpression,this.argument=D}return b})();t.AwaitExpression=p;var a=(function(){function b(D,A,R){var Te=D==="||"||D==="&&";this.type=Te?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=D,this.left=A,this.right=R}return b})();t.BinaryExpression=a;var u=(function(){function b(D){this.type=i.Syntax.BlockStatement,this.body=D}return b})();t.BlockStatement=u;var l=(function(){function b(D){this.type=i.Syntax.BreakStatement,this.label=D}return b})();t.BreakStatement=l;var g=(function(){function b(D,A){this.type=i.Syntax.CallExpression,this.callee=D,this.arguments=A}return b})();t.CallExpression=g;var v=(function(){function b(D,A){this.type=i.Syntax.CatchClause,this.param=D,this.body=A}return b})();t.CatchClause=v;var x=(function(){function b(D){this.type=i.Syntax.ClassBody,this.body=D}return b})();t.ClassBody=x;var w=(function(){function b(D,A,R){this.type=i.Syntax.ClassDeclaration,this.id=D,this.superClass=A,this.body=R}return b})();t.ClassDeclaration=w;var C=(function(){function b(D,A,R){this.type=i.Syntax.ClassExpression,this.id=D,this.superClass=A,this.body=R}return b})();t.ClassExpression=C;var S=(function(){function b(D,A){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=D,this.property=A}return b})();t.ComputedMemberExpression=S;var T=(function(){function b(D,A,R){this.type=i.Syntax.ConditionalExpression,this.test=D,this.consequent=A,this.alternate=R}return b})();t.ConditionalExpression=T;var P=(function(){function b(D){this.type=i.Syntax.ContinueStatement,this.label=D}return b})();t.ContinueStatement=P;var B=(function(){function b(){this.type=i.Syntax.DebuggerStatement}return b})();t.DebuggerStatement=B;var L=(function(){function b(D,A){this.type=i.Syntax.ExpressionStatement,this.expression=D,this.directive=A}return b})();t.Directive=L;var z=(function(){function b(D,A){this.type=i.Syntax.DoWhileStatement,this.body=D,this.test=A}return b})();t.DoWhileStatement=z;var G=(function(){function b(){this.type=i.Syntax.EmptyStatement}return b})();t.EmptyStatement=G;var pe=(function(){function b(D){this.type=i.Syntax.ExportAllDeclaration,this.source=D}return b})();t.ExportAllDeclaration=pe;var _t=(function(){function b(D){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=D}return b})();t.ExportDefaultDeclaration=_t;var wr=(function(){function b(D,A,R){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=D,this.specifiers=A,this.source=R}return b})();t.ExportNamedDeclaration=wr;var Wt=(function(){function b(D,A){this.type=i.Syntax.ExportSpecifier,this.exported=A,this.local=D}return b})();t.ExportSpecifier=Wt;var so=(function(){function b(D){this.type=i.Syntax.ExpressionStatement,this.expression=D}return b})();t.ExpressionStatement=so;var oo=(function(){function b(D,A,R){this.type=i.Syntax.ForInStatement,this.left=D,this.right=A,this.body=R,this.each=!1}return b})();t.ForInStatement=oo;var di=(function(){function b(D,A,R){this.type=i.Syntax.ForOfStatement,this.left=D,this.right=A,this.body=R}return b})();t.ForOfStatement=di;var Gt=(function(){function b(D,A,R,Te){this.type=i.Syntax.ForStatement,this.init=D,this.test=A,this.update=R,this.body=Te}return b})();t.ForStatement=Gt;var dt=(function(){function b(D,A,R,Te){this.type=i.Syntax.FunctionDeclaration,this.id=D,this.params=A,this.body=R,this.generator=Te,this.expression=!1,this.async=!1}return b})();t.FunctionDeclaration=dt;var pt=(function(){function b(D,A,R,Te){this.type=i.Syntax.FunctionExpression,this.id=D,this.params=A,this.body=R,this.generator=Te,this.expression=!1,this.async=!1}return b})();t.FunctionExpression=pt;var rn=(function(){function b(D){this.type=i.Syntax.Identifier,this.name=D}return b})();t.Identifier=rn;var Er=(function(){function b(D,A,R){this.type=i.Syntax.IfStatement,this.test=D,this.consequent=A,this.alternate=R}return b})();t.IfStatement=Er;var Xt=(function(){function b(D,A){this.type=i.Syntax.ImportDeclaration,this.specifiers=D,this.source=A}return b})();t.ImportDeclaration=Xt;var re=(function(){function b(D){this.type=i.Syntax.ImportDefaultSpecifier,this.local=D}return b})();t.ImportDefaultSpecifier=re;var De=(function(){function b(D){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=D}return b})();t.ImportNamespaceSpecifier=De;var We=(function(){function b(D,A){this.type=i.Syntax.ImportSpecifier,this.local=D,this.imported=A}return b})();t.ImportSpecifier=We;var je=(function(){function b(D,A){this.type=i.Syntax.LabeledStatement,this.label=D,this.body=A}return b})();t.LabeledStatement=je;var Ge=(function(){function b(D,A){this.type=i.Syntax.Literal,this.value=D,this.raw=A}return b})();t.Literal=Ge;var Ft=(function(){function b(D,A){this.type=i.Syntax.MetaProperty,this.meta=D,this.property=A}return b})();t.MetaProperty=Ft;var b0=(function(){function b(D,A,R,Te,ao){this.type=i.Syntax.MethodDefinition,this.key=D,this.computed=A,this.value=R,this.kind=Te,this.static=ao}return b})();t.MethodDefinition=b0;var D0=(function(){function b(D){this.type=i.Syntax.Program,this.body=D,this.sourceType="module"}return b})();t.Module=D0;var C0=(function(){function b(D,A){this.type=i.Syntax.NewExpression,this.callee=D,this.arguments=A}return b})();t.NewExpression=C0;var S0=(function(){function b(D){this.type=i.Syntax.ObjectExpression,this.properties=D}return b})();t.ObjectExpression=S0;var A0=(function(){function b(D){this.type=i.Syntax.ObjectPattern,this.properties=D}return b})();t.ObjectPattern=A0;var _0=(function(){function b(D,A,R,Te,ao,K0){this.type=i.Syntax.Property,this.key=A,this.computed=R,this.value=Te,this.kind=D,this.method=ao,this.shorthand=K0}return b})();t.Property=_0;var F0=(function(){function b(D,A,R,Te){this.type=i.Syntax.Literal,this.value=D,this.raw=A,this.regex={pattern:R,flags:Te}}return b})();t.RegexLiteral=F0;var k0=(function(){function b(D){this.type=i.Syntax.RestElement,this.argument=D}return b})();t.RestElement=k0;var T0=(function(){function b(D){this.type=i.Syntax.ReturnStatement,this.argument=D}return b})();t.ReturnStatement=T0;var O0=(function(){function b(D){this.type=i.Syntax.Program,this.body=D,this.sourceType="script"}return b})();t.Script=O0;var P0=(function(){function b(D){this.type=i.Syntax.SequenceExpression,this.expressions=D}return b})();t.SequenceExpression=P0;var I0=(function(){function b(D){this.type=i.Syntax.SpreadElement,this.argument=D}return b})();t.SpreadElement=I0;var N0=(function(){function b(D,A){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=D,this.property=A}return b})();t.StaticMemberExpression=N0;var M0=(function(){function b(){this.type=i.Syntax.Super}return b})();t.Super=M0;var j0=(function(){function b(D,A){this.type=i.Syntax.SwitchCase,this.test=D,this.consequent=A}return b})();t.SwitchCase=j0;var B0=(function(){function b(D,A){this.type=i.Syntax.SwitchStatement,this.discriminant=D,this.cases=A}return b})();t.SwitchStatement=B0;var R0=(function(){function b(D,A){this.type=i.Syntax.TaggedTemplateExpression,this.tag=D,this.quasi=A}return b})();t.TaggedTemplateExpression=R0;var L0=(function(){function b(D,A){this.type=i.Syntax.TemplateElement,this.value=D,this.tail=A}return b})();t.TemplateElement=L0;var $0=(function(){function b(D,A){this.type=i.Syntax.TemplateLiteral,this.quasis=D,this.expressions=A}return b})();t.TemplateLiteral=$0;var q0=(function(){function b(){this.type=i.Syntax.ThisExpression}return b})();t.ThisExpression=q0;var U0=(function(){function b(D){this.type=i.Syntax.ThrowStatement,this.argument=D}return b})();t.ThrowStatement=U0;var H0=(function(){function b(D,A,R){this.type=i.Syntax.TryStatement,this.block=D,this.handler=A,this.finalizer=R}return b})();t.TryStatement=H0;var z0=(function(){function b(D,A){this.type=i.Syntax.UnaryExpression,this.operator=D,this.argument=A,this.prefix=!0}return b})();t.UnaryExpression=z0;var J0=(function(){function b(D,A,R){this.type=i.Syntax.UpdateExpression,this.operator=D,this.argument=A,this.prefix=R}return b})();t.UpdateExpression=J0;var W0=(function(){function b(D,A){this.type=i.Syntax.VariableDeclaration,this.declarations=D,this.kind=A}return b})();t.VariableDeclaration=W0;var G0=(function(){function b(D,A){this.type=i.Syntax.VariableDeclarator,this.id=D,this.init=A}return b})();t.VariableDeclarator=G0;var X0=(function(){function b(D,A){this.type=i.Syntax.WhileStatement,this.test=D,this.body=A}return b})();t.WhileStatement=X0;var V0=(function(){function b(D,A){this.type=i.Syntax.WithStatement,this.object=D,this.body=A}return b})();t.WithStatement=V0;var Y0=(function(){function b(D,A){this.type=i.Syntax.YieldExpression,this.argument=D,this.delegate=A}return b})();t.YieldExpression=Y0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(9),n=r(10),o=r(11),s=r(7),c=r(12),h=r(2),m=r(13),d="ArrowParameterPlaceHolder",f=(function(){function p(a,u,l){u===void 0&&(u={}),this.config={range:typeof u.range=="boolean"&&u.range,loc:typeof u.loc=="boolean"&&u.loc,source:null,tokens:typeof u.tokens=="boolean"&&u.tokens,comment:typeof u.comment=="boolean"&&u.comment,tolerant:typeof u.tolerant=="boolean"&&u.tolerant},this.config.loc&&u.source&&u.source!==null&&(this.config.source=String(u.source)),this.delegate=l,this.errorHandler=new n.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new c.Scanner(a,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return p.prototype.throwError=function(a){for(var u=[],l=1;l<arguments.length;l++)u[l-1]=arguments[l];var g=Array.prototype.slice.call(arguments,1),v=a.replace(/%(\d)/g,function(S,T){return i.assert(T<g.length,"Message reference must be in range"),g[T]}),x=this.lastMarker.index,w=this.lastMarker.line,C=this.lastMarker.column+1;throw this.errorHandler.createError(x,w,C,v)},p.prototype.tolerateError=function(a){for(var u=[],l=1;l<arguments.length;l++)u[l-1]=arguments[l];var g=Array.prototype.slice.call(arguments,1),v=a.replace(/%(\d)/g,function(S,T){return i.assert(T<g.length,"Message reference must be in range"),g[T]}),x=this.lastMarker.index,w=this.scanner.lineNumber,C=this.lastMarker.column+1;this.errorHandler.tolerateError(x,w,C,v)},p.prototype.unexpectedTokenError=function(a,u){var l=u||o.Messages.UnexpectedToken,g;if(a?(u||(l=a.type===2?o.Messages.UnexpectedEOS:a.type===3?o.Messages.UnexpectedIdentifier:a.type===6?o.Messages.UnexpectedNumber:a.type===8?o.Messages.UnexpectedString:a.type===10?o.Messages.UnexpectedTemplate:o.Messages.UnexpectedToken,a.type===4&&(this.scanner.isFutureReservedWord(a.value)?l=o.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(a.value)&&(l=o.Messages.StrictReservedWord))),g=a.value):g="ILLEGAL",l=l.replace("%0",g),a&&typeof a.lineNumber=="number"){var v=a.start,x=a.lineNumber,w=this.lastMarker.index-this.lastMarker.column,C=a.start-w+1;return this.errorHandler.createError(v,x,C,l)}else{var v=this.lastMarker.index,x=this.lastMarker.line,C=this.lastMarker.column+1;return this.errorHandler.createError(v,x,C,l)}},p.prototype.throwUnexpectedToken=function(a,u){throw this.unexpectedTokenError(a,u)},p.prototype.tolerateUnexpectedToken=function(a,u){this.errorHandler.tolerate(this.unexpectedTokenError(a,u))},p.prototype.collectComments=function(){if(!this.config.comment)this.scanner.scanComments();else{var a=this.scanner.scanComments();if(a.length>0&&this.delegate)for(var u=0;u<a.length;++u){var l=a[u],g=void 0;g={type:l.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(l.slice[0],l.slice[1])},this.config.range&&(g.range=l.range),this.config.loc&&(g.loc=l.loc);var v={start:{line:l.loc.start.line,column:l.loc.start.column,offset:l.range[0]},end:{line:l.loc.end.line,column:l.loc.end.column,offset:l.range[1]}};this.delegate(g,v)}}},p.prototype.getTokenRaw=function(a){return this.scanner.source.slice(a.start,a.end)},p.prototype.convertToken=function(a){var u={type:m.TokenName[a.type],value:this.getTokenRaw(a)};if(this.config.range&&(u.range=[a.start,a.end]),this.config.loc&&(u.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),a.type===9){var l=a.pattern,g=a.flags;u.regex={pattern:l,flags:g}}return u},p.prototype.nextToken=function(){var a=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var u=this.scanner.lex();return this.hasLineTerminator=a.lineNumber!==u.lineNumber,u&&this.context.strict&&u.type===3&&this.scanner.isStrictModeReservedWord(u.value)&&(u.type=4),this.lookahead=u,this.config.tokens&&u.type!==2&&this.tokens.push(this.convertToken(u)),a},p.prototype.nextRegexToken=function(){this.collectComments();var a=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(a))),this.lookahead=a,this.nextToken(),a},p.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},p.prototype.startNode=function(a,u){u===void 0&&(u=0);var l=a.start-a.lineStart,g=a.lineNumber;return l<0&&(l+=u,g--),{index:a.start,line:g,column:l}},p.prototype.finalize=function(a,u){if(this.config.range&&(u.range=[a.index,this.lastMarker.index]),this.config.loc&&(u.loc={start:{line:a.line,column:a.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(u.loc.source=this.config.source)),this.delegate){var l={start:{line:a.line,column:a.column,offset:a.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(u,l)}return u},p.prototype.expect=function(a){var u=this.nextToken();(u.type!==7||u.value!==a)&&this.throwUnexpectedToken(u)},p.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var a=this.lookahead;a.type===7&&a.value===","?this.nextToken():a.type===7&&a.value===";"?(this.nextToken(),this.tolerateUnexpectedToken(a)):this.tolerateUnexpectedToken(a,o.Messages.UnexpectedToken)}else this.expect(",")},p.prototype.expectKeyword=function(a){var u=this.nextToken();(u.type!==4||u.value!==a)&&this.throwUnexpectedToken(u)},p.prototype.match=function(a){return this.lookahead.type===7&&this.lookahead.value===a},p.prototype.matchKeyword=function(a){return this.lookahead.type===4&&this.lookahead.value===a},p.prototype.matchContextualKeyword=function(a){return this.lookahead.type===3&&this.lookahead.value===a},p.prototype.matchAssign=function(){if(this.lookahead.type!==7)return!1;var a=this.lookahead.value;return a==="="||a==="*="||a==="**="||a==="/="||a==="%="||a==="+="||a==="-="||a==="<<="||a===">>="||a===">>>="||a==="&="||a==="^="||a==="|="},p.prototype.isolateCoverGrammar=function(a){var u=this.context.isBindingElement,l=this.context.isAssignmentTarget,g=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var v=a.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=u,this.context.isAssignmentTarget=l,this.context.firstCoverInitializedNameError=g,v},p.prototype.inheritCoverGrammar=function(a){var u=this.context.isBindingElement,l=this.context.isAssignmentTarget,g=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var v=a.call(this);return this.context.isBindingElement=this.context.isBindingElement&&u,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&l,this.context.firstCoverInitializedNameError=g||this.context.firstCoverInitializedNameError,v},p.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},p.prototype.parsePrimaryExpression=function(){var a=this.createNode(),u,l,g;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),u=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(a,new s.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,l=this.nextToken(),g=this.getTokenRaw(l),u=this.finalize(a,new s.Literal(l.value,g));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,l=this.nextToken(),g=this.getTokenRaw(l),u=this.finalize(a,new s.Literal(l.value==="true",g));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,l=this.nextToken(),g=this.getTokenRaw(l),u=this.finalize(a,new s.Literal(null,g));break;case 10:u=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,u=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":u=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":u=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,l=this.nextRegexToken(),g=this.getTokenRaw(l),u=this.finalize(a,new s.RegexLiteral(l.regex,g,l.pattern,l.flags));break;default:u=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?u=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?u=this.finalize(a,new s.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?u=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),u=this.finalize(a,new s.ThisExpression)):this.matchKeyword("class")?u=this.parseClassExpression():u=this.throwUnexpectedToken(this.nextToken()));break;default:u=this.throwUnexpectedToken(this.nextToken())}return u},p.prototype.parseSpreadElement=function(){var a=this.createNode();this.expect("...");var u=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(a,new s.SpreadElement(u))},p.prototype.parseArrayInitializer=function(){var a=this.createNode(),u=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),u.push(null);else if(this.match("...")){var l=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),u.push(l)}else u.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(a,new s.ArrayExpression(u))},p.prototype.parsePropertyMethod=function(a){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var u=this.context.strict,l=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var g=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&a.firstRestricted&&this.tolerateUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),this.context.strict=u,this.context.allowStrictDirective=l,g},p.prototype.parsePropertyMethodFunction=function(){var a=!1,u=this.createNode(),l=this.context.allowYield;this.context.allowYield=!0;var g=this.parseFormalParameters(),v=this.parsePropertyMethod(g);return this.context.allowYield=l,this.finalize(u,new s.FunctionExpression(null,g.params,v,a))},p.prototype.parsePropertyMethodAsyncFunction=function(){var a=this.createNode(),u=this.context.allowYield,l=this.context.await;this.context.allowYield=!1,this.context.await=!0;var g=this.parseFormalParameters(),v=this.parsePropertyMethod(g);return this.context.allowYield=u,this.context.await=l,this.finalize(a,new s.AsyncFunctionExpression(null,g.params,v))},p.prototype.parseObjectPropertyKey=function(){var a=this.createNode(),u=this.nextToken(),l;switch(u.type){case 8:case 6:this.context.strict&&u.octal&&this.tolerateUnexpectedToken(u,o.Messages.StrictOctalLiteral);var g=this.getTokenRaw(u);l=this.finalize(a,new s.Literal(u.value,g));break;case 3:case 1:case 5:case 4:l=this.finalize(a,new s.Identifier(u.value));break;case 7:u.value==="["?(l=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):l=this.throwUnexpectedToken(u);break;default:l=this.throwUnexpectedToken(u)}return l},p.prototype.isPropertyKey=function(a,u){return a.type===h.Syntax.Identifier&&a.name===u||a.type===h.Syntax.Literal&&a.value===u},p.prototype.parseObjectProperty=function(a){var u=this.createNode(),l=this.lookahead,g,v=null,x=null,w=!1,C=!1,S=!1,T=!1;if(l.type===3){var P=l.value;this.nextToken(),w=this.match("["),T=!this.hasLineTerminator&&P==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),v=T?this.parseObjectPropertyKey():this.finalize(u,new s.Identifier(P))}else this.match("*")?this.nextToken():(w=this.match("["),v=this.parseObjectPropertyKey());var B=this.qualifiedPropertyName(this.lookahead);if(l.type===3&&!T&&l.value==="get"&&B)g="get",w=this.match("["),v=this.parseObjectPropertyKey(),this.context.allowYield=!1,x=this.parseGetterMethod();else if(l.type===3&&!T&&l.value==="set"&&B)g="set",w=this.match("["),v=this.parseObjectPropertyKey(),x=this.parseSetterMethod();else if(l.type===7&&l.value==="*"&&B)g="init",w=this.match("["),v=this.parseObjectPropertyKey(),x=this.parseGeneratorMethod(),C=!0;else if(v||this.throwUnexpectedToken(this.lookahead),g="init",this.match(":")&&!T)!w&&this.isPropertyKey(v,"__proto__")&&(a.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),a.value=!0),this.nextToken(),x=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))x=T?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),C=!0;else if(l.type===3){var P=this.finalize(u,new s.Identifier(l.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),S=!0;var L=this.isolateCoverGrammar(this.parseAssignmentExpression);x=this.finalize(u,new s.AssignmentPattern(P,L))}else S=!0,x=P}else this.throwUnexpectedToken(this.nextToken());return this.finalize(u,new s.Property(g,v,w,x,C,S))},p.prototype.parseObjectInitializer=function(){var a=this.createNode();this.expect("{");for(var u=[],l={value:!1};!this.match("}");)u.push(this.parseObjectProperty(l)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(a,new s.ObjectExpression(u))},p.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var a=this.createNode(),u=this.nextToken(),l=u.value,g=u.cooked;return this.finalize(a,new s.TemplateElement({raw:l,cooked:g},u.tail))},p.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var a=this.createNode(),u=this.nextToken(),l=u.value,g=u.cooked;return this.finalize(a,new s.TemplateElement({raw:l,cooked:g},u.tail))},p.prototype.parseTemplateLiteral=function(){var a=this.createNode(),u=[],l=[],g=this.parseTemplateHead();for(l.push(g);!g.tail;)u.push(this.parseExpression()),g=this.parseTemplateElement(),l.push(g);return this.finalize(a,new s.TemplateLiteral(l,u))},p.prototype.reinterpretExpressionAsPattern=function(a){switch(a.type){case h.Syntax.Identifier:case h.Syntax.MemberExpression:case h.Syntax.RestElement:case h.Syntax.AssignmentPattern:break;case h.Syntax.SpreadElement:a.type=h.Syntax.RestElement,this.reinterpretExpressionAsPattern(a.argument);break;case h.Syntax.ArrayExpression:a.type=h.Syntax.ArrayPattern;for(var u=0;u<a.elements.length;u++)a.elements[u]!==null&&this.reinterpretExpressionAsPattern(a.elements[u]);break;case h.Syntax.ObjectExpression:a.type=h.Syntax.ObjectPattern;for(var u=0;u<a.properties.length;u++)this.reinterpretExpressionAsPattern(a.properties[u].value);break;case h.Syntax.AssignmentExpression:a.type=h.Syntax.AssignmentPattern,delete a.operator,this.reinterpretExpressionAsPattern(a.left);break;default:break}},p.prototype.parseGroupExpression=function(){var a;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),a={type:d,params:[],async:!1};else{var u=this.lookahead,l=[];if(this.match("..."))a=this.parseRestElement(l),this.expect(")"),this.match("=>")||this.expect("=>"),a={type:d,params:[a],async:!1};else{var g=!1;if(this.context.isBindingElement=!0,a=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var v=[];for(this.context.isAssignmentTarget=!1,v.push(a);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var x=0;x<v.length;x++)this.reinterpretExpressionAsPattern(v[x]);g=!0,a={type:d,params:v,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),v.push(this.parseRestElement(l)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var x=0;x<v.length;x++)this.reinterpretExpressionAsPattern(v[x]);g=!0,a={type:d,params:v,async:!1}}else v.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(g)break}g||(a=this.finalize(this.startNode(u),new s.SequenceExpression(v)))}if(!g){if(this.expect(")"),this.match("=>")&&(a.type===h.Syntax.Identifier&&a.name==="yield"&&(g=!0,a={type:d,params:[a],async:!1}),!g)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),a.type===h.Syntax.SequenceExpression)for(var x=0;x<a.expressions.length;x++)this.reinterpretExpressionAsPattern(a.expressions[x]);else this.reinterpretExpressionAsPattern(a);var w=a.type===h.Syntax.SequenceExpression?a.expressions:[a];a={type:d,params:w,async:!1}}this.context.isBindingElement=!1}}}return a},p.prototype.parseArguments=function(){this.expect("(");var a=[];if(!this.match(")"))for(;;){var u=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(a.push(u),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),a},p.prototype.isIdentifierName=function(a){return a.type===3||a.type===4||a.type===1||a.type===5},p.prototype.parseIdentifierName=function(){var a=this.createNode(),u=this.nextToken();return this.isIdentifierName(u)||this.throwUnexpectedToken(u),this.finalize(a,new s.Identifier(u.value))},p.prototype.parseNewExpression=function(){var a=this.createNode(),u=this.parseIdentifierName();i.assert(u.name==="new","New expression must start with `new`");var l;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){var g=this.parseIdentifierName();l=new s.MetaProperty(u,g)}else this.throwUnexpectedToken(this.lookahead);else{var v=this.isolateCoverGrammar(this.parseLeftHandSideExpression),x=this.match("(")?this.parseArguments():[];l=new s.NewExpression(v,x),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(a,l)},p.prototype.parseAsyncArgument=function(){var a=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,a},p.prototype.parseAsyncArguments=function(){this.expect("(");var a=[];if(!this.match(")"))for(;;){var u=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(a.push(u),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),a},p.prototype.parseLeftHandSideExpressionAllowCall=function(){var a=this.lookahead,u=this.matchContextualKeyword("async"),l=this.context.allowIn;this.context.allowIn=!0;var g;for(this.matchKeyword("super")&&this.context.inFunctionBody?(g=this.createNode(),this.nextToken(),g=this.finalize(g,new s.Super),!this.match("(")&&!this.match(".")&&!this.match("[")&&this.throwUnexpectedToken(this.lookahead)):g=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var v=this.parseIdentifierName();g=this.finalize(this.startNode(a),new s.StaticMemberExpression(g,v))}else if(this.match("(")){var x=u&&a.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var w=x?this.parseAsyncArguments():this.parseArguments();if(g=this.finalize(this.startNode(a),new s.CallExpression(g,w)),x&&this.match("=>")){for(var C=0;C<w.length;++C)this.reinterpretExpressionAsPattern(w[C]);g={type:d,params:w,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var v=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),g=this.finalize(this.startNode(a),new s.ComputedMemberExpression(g,v))}else if(this.lookahead.type===10&&this.lookahead.head){var S=this.parseTemplateLiteral();g=this.finalize(this.startNode(a),new s.TaggedTemplateExpression(g,S))}else break;return this.context.allowIn=l,g},p.prototype.parseSuper=function(){var a=this.createNode();return this.expectKeyword("super"),!this.match("[")&&!this.match(".")&&this.throwUnexpectedToken(this.lookahead),this.finalize(a,new s.Super)},p.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var a=this.startNode(this.lookahead),u=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var l=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),u=this.finalize(a,new s.ComputedMemberExpression(u,l))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var l=this.parseIdentifierName();u=this.finalize(a,new s.StaticMemberExpression(u,l))}else if(this.lookahead.type===10&&this.lookahead.head){var g=this.parseTemplateLiteral();u=this.finalize(a,new s.TaggedTemplateExpression(u,g))}else break;return u},p.prototype.parseUpdateExpression=function(){var a,u=this.lookahead;if(this.match("++")||this.match("--")){var l=this.startNode(u),g=this.nextToken();a=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&a.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(o.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment);var v=!0;a=this.finalize(l,new s.UpdateExpression(g.value,a,v)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(a=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===7&&(this.match("++")||this.match("--"))){this.context.strict&&a.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(o.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var x=this.nextToken().value,v=!1;a=this.finalize(this.startNode(u),new s.UpdateExpression(x,a,v))}return a},p.prototype.parseAwaitExpression=function(){var a=this.createNode();this.nextToken();var u=this.parseUnaryExpression();return this.finalize(a,new s.AwaitExpression(u))},p.prototype.parseUnaryExpression=function(){var a;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var u=this.startNode(this.lookahead),l=this.nextToken();a=this.inheritCoverGrammar(this.parseUnaryExpression),a=this.finalize(u,new s.UnaryExpression(l.value,a)),this.context.strict&&a.operator==="delete"&&a.argument.type===h.Syntax.Identifier&&this.tolerateError(o.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else this.context.await&&this.matchContextualKeyword("await")?a=this.parseAwaitExpression():a=this.parseUpdateExpression();return a},p.prototype.parseExponentiationExpression=function(){var a=this.lookahead,u=this.inheritCoverGrammar(this.parseUnaryExpression);if(u.type!==h.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var l=u,g=this.isolateCoverGrammar(this.parseExponentiationExpression);u=this.finalize(this.startNode(a),new s.BinaryExpression("**",l,g))}return u},p.prototype.binaryPrecedence=function(a){var u=a.value,l;return a.type===7?l=this.operatorPrecedence[u]||0:a.type===4?l=u==="instanceof"||this.context.allowIn&&u==="in"?7:0:l=0,l},p.prototype.parseBinaryExpression=function(){var a=this.lookahead,u=this.inheritCoverGrammar(this.parseExponentiationExpression),l=this.lookahead,g=this.binaryPrecedence(l);if(g>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var v=[a,this.lookahead],x=u,w=this.isolateCoverGrammar(this.parseExponentiationExpression),C=[x,l.value,w],S=[g];g=this.binaryPrecedence(this.lookahead),!(g<=0);){for(;C.length>2&&g<=S[S.length-1];){w=C.pop();var T=C.pop();S.pop(),x=C.pop(),v.pop();var P=this.startNode(v[v.length-1]);C.push(this.finalize(P,new s.BinaryExpression(T,x,w)))}C.push(this.nextToken().value),S.push(g),v.push(this.lookahead),C.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var B=C.length-1;u=C[B];for(var L=v.pop();B>1;){var z=v.pop(),G=L&&L.lineStart,P=this.startNode(z,G),T=C[B-1];u=this.finalize(P,new s.BinaryExpression(T,C[B-2],u)),B-=2,L=z}}return u},p.prototype.parseConditionalExpression=function(){var a=this.lookahead,u=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var l=this.context.allowIn;this.context.allowIn=!0;var g=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=l,this.expect(":");var v=this.isolateCoverGrammar(this.parseAssignmentExpression);u=this.finalize(this.startNode(a),new s.ConditionalExpression(u,g,v)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return u},p.prototype.checkPatternParam=function(a,u){switch(u.type){case h.Syntax.Identifier:this.validateParam(a,u,u.name);break;case h.Syntax.RestElement:this.checkPatternParam(a,u.argument);break;case h.Syntax.AssignmentPattern:this.checkPatternParam(a,u.left);break;case h.Syntax.ArrayPattern:for(var l=0;l<u.elements.length;l++)u.elements[l]!==null&&this.checkPatternParam(a,u.elements[l]);break;case h.Syntax.ObjectPattern:for(var l=0;l<u.properties.length;l++)this.checkPatternParam(a,u.properties[l].value);break;default:break}a.simple=a.simple&&u instanceof s.Identifier},p.prototype.reinterpretAsCoverFormalsList=function(a){var u=[a],l,g=!1;switch(a.type){case h.Syntax.Identifier:break;case d:u=a.params,g=a.async;break;default:return null}l={simple:!0,paramSet:{}};for(var v=0;v<u.length;++v){var x=u[v];x.type===h.Syntax.AssignmentPattern?x.right.type===h.Syntax.YieldExpression&&(x.right.argument&&this.throwUnexpectedToken(this.lookahead),x.right.type=h.Syntax.Identifier,x.right.name="yield",delete x.right.argument,delete x.right.delegate):g&&x.type===h.Syntax.Identifier&&x.name==="await"&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(l,x),u[v]=x}if(this.context.strict||!this.context.allowYield)for(var v=0;v<u.length;++v){var x=u[v];x.type===h.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(l.message===o.Messages.StrictParamDupe){var w=this.context.strict?l.stricted:l.firstRestricted;this.throwUnexpectedToken(w,l.message)}return{simple:l.simple,params:u,stricted:l.stricted,firstRestricted:l.firstRestricted,message:l.message}},p.prototype.parseAssignmentExpression=function(){var a;if(!this.context.allowYield&&this.matchKeyword("yield"))a=this.parseYieldExpression();else{var u=this.lookahead,l=u;if(a=this.parseConditionalExpression(),l.type===3&&l.lineNumber===this.lookahead.lineNumber&&l.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){var g=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(g),a={type:d,params:[g],async:!0}}if(a.type===d||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var v=a.async,x=this.reinterpretAsCoverFormalsList(a);if(x){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var w=this.context.strict,C=this.context.allowStrictDirective;this.context.allowStrictDirective=x.simple;var S=this.context.allowYield,T=this.context.await;this.context.allowYield=!0,this.context.await=v;var P=this.startNode(u);this.expect("=>");var B=void 0;if(this.match("{")){var L=this.context.allowIn;this.context.allowIn=!0,B=this.parseFunctionSourceElements(),this.context.allowIn=L}else B=this.isolateCoverGrammar(this.parseAssignmentExpression);var z=B.type!==h.Syntax.BlockStatement;this.context.strict&&x.firstRestricted&&this.throwUnexpectedToken(x.firstRestricted,x.message),this.context.strict&&x.stricted&&this.tolerateUnexpectedToken(x.stricted,x.message),a=v?this.finalize(P,new s.AsyncArrowFunctionExpression(x.params,B,z)):this.finalize(P,new s.ArrowFunctionExpression(x.params,B,z)),this.context.strict=w,this.context.allowStrictDirective=C,this.context.allowYield=S,this.context.await=T}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&a.type===h.Syntax.Identifier){var G=a;this.scanner.isRestrictedWord(G.name)&&this.tolerateUnexpectedToken(l,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(G.name)&&this.tolerateUnexpectedToken(l,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(a):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),l=this.nextToken();var pe=l.value,_t=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(this.startNode(u),new s.AssignmentExpression(pe,a,_t)),this.context.firstCoverInitializedNameError=null}}return a},p.prototype.parseExpression=function(){var a=this.lookahead,u=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var l=[];for(l.push(u);this.lookahead.type!==2&&this.match(",");)this.nextToken(),l.push(this.isolateCoverGrammar(this.parseAssignmentExpression));u=this.finalize(this.startNode(a),new s.SequenceExpression(l))}return u},p.prototype.parseStatementListItem=function(){var a;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),a=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),a=this.parseImportDeclaration();break;case"const":a=this.parseLexicalDeclaration({inFor:!1});break;case"function":a=this.parseFunctionDeclaration();break;case"class":a=this.parseClassDeclaration();break;case"let":a=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:a=this.parseStatement();break}else a=this.parseStatement();return a},p.prototype.parseBlock=function(){var a=this.createNode();this.expect("{");for(var u=[];!this.match("}");)u.push(this.parseStatementListItem());return this.expect("}"),this.finalize(a,new s.BlockStatement(u))},p.prototype.parseLexicalBinding=function(a,u){var l=this.createNode(),g=[],v=this.parsePattern(g,a);this.context.strict&&v.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(v.name)&&this.tolerateError(o.Messages.StrictVarName);var x=null;return a==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),x=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!u.inFor&&v.type!==h.Syntax.Identifier||this.match("="))&&(this.expect("="),x=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(l,new s.VariableDeclarator(v,x))},p.prototype.parseBindingList=function(a,u){for(var l=[this.parseLexicalBinding(a,u)];this.match(",");)this.nextToken(),l.push(this.parseLexicalBinding(a,u));return l},p.prototype.isLexicalDeclaration=function(){var a=this.scanner.saveState();this.scanner.scanComments();var u=this.scanner.lex();return this.scanner.restoreState(a),u.type===3||u.type===7&&u.value==="["||u.type===7&&u.value==="{"||u.type===4&&u.value==="let"||u.type===4&&u.value==="yield"},p.prototype.parseLexicalDeclaration=function(a){var u=this.createNode(),l=this.nextToken().value;i.assert(l==="let"||l==="const","Lexical declaration must be either let or const");var g=this.parseBindingList(l,a);return this.consumeSemicolon(),this.finalize(u,new s.VariableDeclaration(g,l))},p.prototype.parseBindingRestElement=function(a,u){var l=this.createNode();this.expect("...");var g=this.parsePattern(a,u);return this.finalize(l,new s.RestElement(g))},p.prototype.parseArrayPattern=function(a,u){var l=this.createNode();this.expect("[");for(var g=[];!this.match("]");)if(this.match(","))this.nextToken(),g.push(null);else{if(this.match("...")){g.push(this.parseBindingRestElement(a,u));break}else g.push(this.parsePatternWithDefault(a,u));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(l,new s.ArrayPattern(g))},p.prototype.parsePropertyPattern=function(a,u){var l=this.createNode(),g=!1,v=!1,x=!1,w,C;if(this.lookahead.type===3){var S=this.lookahead;w=this.parseVariableIdentifier();var T=this.finalize(l,new s.Identifier(S.value));if(this.match("=")){a.push(S),v=!0,this.nextToken();var P=this.parseAssignmentExpression();C=this.finalize(this.startNode(S),new s.AssignmentPattern(T,P))}else this.match(":")?(this.expect(":"),C=this.parsePatternWithDefault(a,u)):(a.push(S),v=!0,C=T)}else g=this.match("["),w=this.parseObjectPropertyKey(),this.expect(":"),C=this.parsePatternWithDefault(a,u);return this.finalize(l,new s.Property("init",w,g,C,x,v))},p.prototype.parseObjectPattern=function(a,u){var l=this.createNode(),g=[];for(this.expect("{");!this.match("}");)g.push(this.parsePropertyPattern(a,u)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(l,new s.ObjectPattern(g))},p.prototype.parsePattern=function(a,u){var l;return this.match("[")?l=this.parseArrayPattern(a,u):this.match("{")?l=this.parseObjectPattern(a,u):(this.matchKeyword("let")&&(u==="const"||u==="let")&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),a.push(this.lookahead),l=this.parseVariableIdentifier(u)),l},p.prototype.parsePatternWithDefault=function(a,u){var l=this.lookahead,g=this.parsePattern(a,u);if(this.match("=")){this.nextToken();var v=this.context.allowYield;this.context.allowYield=!0;var x=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=v,g=this.finalize(this.startNode(l),new s.AssignmentPattern(g,x))}return g},p.prototype.parseVariableIdentifier=function(a){var u=this.createNode(),l=this.nextToken();return l.type===4&&l.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(l,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(l):l.type!==3?this.context.strict&&l.type===4&&this.scanner.isStrictModeReservedWord(l.value)?this.tolerateUnexpectedToken(l,o.Messages.StrictReservedWord):(this.context.strict||l.value!=="let"||a!=="var")&&this.throwUnexpectedToken(l):(this.context.isModule||this.context.await)&&l.type===3&&l.value==="await"&&this.tolerateUnexpectedToken(l),this.finalize(u,new s.Identifier(l.value))},p.prototype.parseVariableDeclaration=function(a){var u=this.createNode(),l=[],g=this.parsePattern(l,"var");this.context.strict&&g.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(g.name)&&this.tolerateError(o.Messages.StrictVarName);var v=null;return this.match("=")?(this.nextToken(),v=this.isolateCoverGrammar(this.parseAssignmentExpression)):g.type!==h.Syntax.Identifier&&!a.inFor&&this.expect("="),this.finalize(u,new s.VariableDeclarator(g,v))},p.prototype.parseVariableDeclarationList=function(a){var u={inFor:a.inFor},l=[];for(l.push(this.parseVariableDeclaration(u));this.match(",");)this.nextToken(),l.push(this.parseVariableDeclaration(u));return l},p.prototype.parseVariableStatement=function(){var a=this.createNode();this.expectKeyword("var");var u=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(a,new s.VariableDeclaration(u,"var"))},p.prototype.parseEmptyStatement=function(){var a=this.createNode();return this.expect(";"),this.finalize(a,new s.EmptyStatement)},p.prototype.parseExpressionStatement=function(){var a=this.createNode(),u=this.parseExpression();return this.consumeSemicolon(),this.finalize(a,new s.ExpressionStatement(u))},p.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},p.prototype.parseIfStatement=function(){var a=this.createNode(),u,l=null;this.expectKeyword("if"),this.expect("(");var g=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),u=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),u=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),l=this.parseIfClause())),this.finalize(a,new s.IfStatement(g,u,l))},p.prototype.parseDoWhileStatement=function(){var a=this.createNode();this.expectKeyword("do");var u=this.context.inIteration;this.context.inIteration=!0;var l=this.parseStatement();this.context.inIteration=u,this.expectKeyword("while"),this.expect("(");var g=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(a,new s.DoWhileStatement(l,g))},p.prototype.parseWhileStatement=function(){var a=this.createNode(),u;this.expectKeyword("while"),this.expect("(");var l=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),u=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var g=this.context.inIteration;this.context.inIteration=!0,u=this.parseStatement(),this.context.inIteration=g}return this.finalize(a,new s.WhileStatement(l,u))},p.prototype.parseForStatement=function(){var a=null,u=null,l=null,g=!0,v,x,w=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){a=this.createNode(),this.nextToken();var C=this.context.allowIn;this.context.allowIn=!1;var S=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=C,S.length===1&&this.matchKeyword("in")){var T=S[0];T.init&&(T.id.type===h.Syntax.ArrayPattern||T.id.type===h.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),a=this.finalize(a,new s.VariableDeclaration(S,"var")),this.nextToken(),v=a,x=this.parseExpression(),a=null}else S.length===1&&S[0].init===null&&this.matchContextualKeyword("of")?(a=this.finalize(a,new s.VariableDeclaration(S,"var")),this.nextToken(),v=a,x=this.parseAssignmentExpression(),a=null,g=!1):(a=this.finalize(a,new s.VariableDeclaration(S,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){a=this.createNode();var P=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")a=this.finalize(a,new s.Identifier(P)),this.nextToken(),v=a,x=this.parseExpression(),a=null;else{var C=this.context.allowIn;this.context.allowIn=!1;var S=this.parseBindingList(P,{inFor:!0});this.context.allowIn=C,S.length===1&&S[0].init===null&&this.matchKeyword("in")?(a=this.finalize(a,new s.VariableDeclaration(S,P)),this.nextToken(),v=a,x=this.parseExpression(),a=null):S.length===1&&S[0].init===null&&this.matchContextualKeyword("of")?(a=this.finalize(a,new s.VariableDeclaration(S,P)),this.nextToken(),v=a,x=this.parseAssignmentExpression(),a=null,g=!1):(this.consumeSemicolon(),a=this.finalize(a,new s.VariableDeclaration(S,P)))}}else{var B=this.lookahead,C=this.context.allowIn;if(this.context.allowIn=!1,a=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=C,this.matchKeyword("in"))(!this.context.isAssignmentTarget||a.type===h.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(a),v=a,x=this.parseExpression(),a=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||a.type===h.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(a),v=a,x=this.parseAssignmentExpression(),a=null,g=!1;else{if(this.match(",")){for(var L=[a];this.match(",");)this.nextToken(),L.push(this.isolateCoverGrammar(this.parseAssignmentExpression));a=this.finalize(this.startNode(B),new s.SequenceExpression(L))}this.expect(";")}}typeof v>"u"&&(this.match(";")||(u=this.parseExpression()),this.expect(";"),this.match(")")||(l=this.parseExpression()));var z;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),z=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var G=this.context.inIteration;this.context.inIteration=!0,z=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=G}return typeof v>"u"?this.finalize(w,new s.ForStatement(a,u,l,z)):g?this.finalize(w,new s.ForInStatement(v,x,z)):this.finalize(w,new s.ForOfStatement(v,x,z))},p.prototype.parseContinueStatement=function(){var a=this.createNode();this.expectKeyword("continue");var u=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var l=this.parseVariableIdentifier();u=l;var g="$"+l.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,g)||this.throwError(o.Messages.UnknownLabel,l.name)}return this.consumeSemicolon(),u===null&&!this.context.inIteration&&this.throwError(o.Messages.IllegalContinue),this.finalize(a,new s.ContinueStatement(u))},p.prototype.parseBreakStatement=function(){var a=this.createNode();this.expectKeyword("break");var u=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var l=this.parseVariableIdentifier(),g="$"+l.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,g)||this.throwError(o.Messages.UnknownLabel,l.name),u=l}return this.consumeSemicolon(),u===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(o.Messages.IllegalBreak),this.finalize(a,new s.BreakStatement(u))},p.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var a=this.createNode();this.expectKeyword("return");var u=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,l=u?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(a,new s.ReturnStatement(l))},p.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var a=this.createNode(),u;this.expectKeyword("with"),this.expect("(");var l=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),u=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),u=this.parseStatement()),this.finalize(a,new s.WithStatement(l,u))},p.prototype.parseSwitchCase=function(){var a=this.createNode(),u;this.matchKeyword("default")?(this.nextToken(),u=null):(this.expectKeyword("case"),u=this.parseExpression()),this.expect(":");for(var l=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)l.push(this.parseStatementListItem());return this.finalize(a,new s.SwitchCase(u,l))},p.prototype.parseSwitchStatement=function(){var a=this.createNode();this.expectKeyword("switch"),this.expect("(");var u=this.parseExpression();this.expect(")");var l=this.context.inSwitch;this.context.inSwitch=!0;var g=[],v=!1;for(this.expect("{");!this.match("}");){var x=this.parseSwitchCase();x.test===null&&(v&&this.throwError(o.Messages.MultipleDefaultsInSwitch),v=!0),g.push(x)}return this.expect("}"),this.context.inSwitch=l,this.finalize(a,new s.SwitchStatement(u,g))},p.prototype.parseLabelledStatement=function(){var a=this.createNode(),u=this.parseExpression(),l;if(u.type===h.Syntax.Identifier&&this.match(":")){this.nextToken();var g=u,v="$"+g.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,v)&&this.throwError(o.Messages.Redeclaration,"Label",g.name),this.context.labelSet[v]=!0;var x=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),x=this.parseClassDeclaration();else if(this.matchKeyword("function")){var w=this.lookahead,C=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(w,o.Messages.StrictFunction):C.generator&&this.tolerateUnexpectedToken(w,o.Messages.GeneratorInLegacyContext),x=C}else x=this.parseStatement();delete this.context.labelSet[v],l=new s.LabeledStatement(g,x)}else this.consumeSemicolon(),l=new s.ExpressionStatement(u);return this.finalize(a,l)},p.prototype.parseThrowStatement=function(){var a=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var u=this.parseExpression();return this.consumeSemicolon(),this.finalize(a,new s.ThrowStatement(u))},p.prototype.parseCatchClause=function(){var a=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var u=[],l=this.parsePattern(u),g={},v=0;v<u.length;v++){var x="$"+u[v].value;Object.prototype.hasOwnProperty.call(g,x)&&this.tolerateError(o.Messages.DuplicateBinding,u[v].value),g[x]=!0}this.context.strict&&l.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(l.name)&&this.tolerateError(o.Messages.StrictCatchVariable),this.expect(")");var w=this.parseBlock();return this.finalize(a,new s.CatchClause(l,w))},p.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},p.prototype.parseTryStatement=function(){var a=this.createNode();this.expectKeyword("try");var u=this.parseBlock(),l=this.matchKeyword("catch")?this.parseCatchClause():null,g=this.matchKeyword("finally")?this.parseFinallyClause():null;return!l&&!g&&this.throwError(o.Messages.NoCatchOrFinally),this.finalize(a,new s.TryStatement(u,l,g))},p.prototype.parseDebuggerStatement=function(){var a=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(a,new s.DebuggerStatement)},p.prototype.parseStatement=function(){var a;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:a=this.parseExpressionStatement();break;case 7:var u=this.lookahead.value;u==="{"?a=this.parseBlock():u==="("?a=this.parseExpressionStatement():u===";"?a=this.parseEmptyStatement():a=this.parseExpressionStatement();break;case 3:a=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":a=this.parseBreakStatement();break;case"continue":a=this.parseContinueStatement();break;case"debugger":a=this.parseDebuggerStatement();break;case"do":a=this.parseDoWhileStatement();break;case"for":a=this.parseForStatement();break;case"function":a=this.parseFunctionDeclaration();break;case"if":a=this.parseIfStatement();break;case"return":a=this.parseReturnStatement();break;case"switch":a=this.parseSwitchStatement();break;case"throw":a=this.parseThrowStatement();break;case"try":a=this.parseTryStatement();break;case"var":a=this.parseVariableStatement();break;case"while":a=this.parseWhileStatement();break;case"with":a=this.parseWithStatement();break;default:a=this.parseExpressionStatement();break}break;default:a=this.throwUnexpectedToken(this.lookahead)}return a},p.prototype.parseFunctionSourceElements=function(){var a=this.createNode();this.expect("{");var u=this.parseDirectivePrologues(),l=this.context.labelSet,g=this.context.inIteration,v=this.context.inSwitch,x=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.lookahead.type!==2&&!this.match("}");)u.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=l,this.context.inIteration=g,this.context.inSwitch=v,this.context.inFunctionBody=x,this.finalize(a,new s.BlockStatement(u))},p.prototype.validateParam=function(a,u,l){var g="$"+l;this.context.strict?(this.scanner.isRestrictedWord(l)&&(a.stricted=u,a.message=o.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(a.paramSet,g)&&(a.stricted=u,a.message=o.Messages.StrictParamDupe)):a.firstRestricted||(this.scanner.isRestrictedWord(l)?(a.firstRestricted=u,a.message=o.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(l)?(a.firstRestricted=u,a.message=o.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(a.paramSet,g)&&(a.stricted=u,a.message=o.Messages.StrictParamDupe)),typeof Object.defineProperty=="function"?Object.defineProperty(a.paramSet,g,{value:!0,enumerable:!0,writable:!0,configurable:!0}):a.paramSet[g]=!0},p.prototype.parseRestElement=function(a){var u=this.createNode();this.expect("...");var l=this.parsePattern(a);return this.match("=")&&this.throwError(o.Messages.DefaultRestParameter),this.match(")")||this.throwError(o.Messages.ParameterAfterRestParameter),this.finalize(u,new s.RestElement(l))},p.prototype.parseFormalParameter=function(a){for(var u=[],l=this.match("...")?this.parseRestElement(u):this.parsePatternWithDefault(u),g=0;g<u.length;g++)this.validateParam(a,u[g],u[g].value);a.simple=a.simple&&l instanceof s.Identifier,a.params.push(l)},p.prototype.parseFormalParameters=function(a){var u;if(u={simple:!0,params:[],firstRestricted:a},this.expect("("),!this.match(")"))for(u.paramSet={};this.lookahead.type!==2&&(this.parseFormalParameter(u),!(this.match(")")||(this.expect(","),this.match(")")))););return this.expect(")"),{simple:u.simple,params:u.params,stricted:u.stricted,firstRestricted:u.firstRestricted,message:u.message}},p.prototype.matchAsyncFunction=function(){var a=this.matchContextualKeyword("async");if(a){var u=this.scanner.saveState();this.scanner.scanComments();var l=this.scanner.lex();this.scanner.restoreState(u),a=u.lineNumber===l.lineNumber&&l.type===4&&l.value==="function"}return a},p.prototype.parseFunctionDeclaration=function(a){var u=this.createNode(),l=this.matchContextualKeyword("async");l&&this.nextToken(),this.expectKeyword("function");var g=l?!1:this.match("*");g&&this.nextToken();var v,x=null,w=null;if(!a||!this.match("(")){var C=this.lookahead;x=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(C.value)&&this.tolerateUnexpectedToken(C,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(C.value)?(w=C,v=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(C.value)&&(w=C,v=o.Messages.StrictReservedWord)}var S=this.context.await,T=this.context.allowYield;this.context.await=l,this.context.allowYield=!g;var P=this.parseFormalParameters(w),B=P.params,L=P.stricted;w=P.firstRestricted,P.message&&(v=P.message);var z=this.context.strict,G=this.context.allowStrictDirective;this.context.allowStrictDirective=P.simple;var pe=this.parseFunctionSourceElements();return this.context.strict&&w&&this.throwUnexpectedToken(w,v),this.context.strict&&L&&this.tolerateUnexpectedToken(L,v),this.context.strict=z,this.context.allowStrictDirective=G,this.context.await=S,this.context.allowYield=T,l?this.finalize(u,new s.AsyncFunctionDeclaration(x,B,pe)):this.finalize(u,new s.FunctionDeclaration(x,B,pe,g))},p.prototype.parseFunctionExpression=function(){var a=this.createNode(),u=this.matchContextualKeyword("async");u&&this.nextToken(),this.expectKeyword("function");var l=u?!1:this.match("*");l&&this.nextToken();var g,v=null,x,w=this.context.await,C=this.context.allowYield;if(this.context.await=u,this.context.allowYield=!l,!this.match("(")){var S=this.lookahead;v=!this.context.strict&&!l&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(S.value)&&this.tolerateUnexpectedToken(S,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(S.value)?(x=S,g=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(S.value)&&(x=S,g=o.Messages.StrictReservedWord)}var T=this.parseFormalParameters(x),P=T.params,B=T.stricted;x=T.firstRestricted,T.message&&(g=T.message);var L=this.context.strict,z=this.context.allowStrictDirective;this.context.allowStrictDirective=T.simple;var G=this.parseFunctionSourceElements();return this.context.strict&&x&&this.throwUnexpectedToken(x,g),this.context.strict&&B&&this.tolerateUnexpectedToken(B,g),this.context.strict=L,this.context.allowStrictDirective=z,this.context.await=w,this.context.allowYield=C,u?this.finalize(a,new s.AsyncFunctionExpression(v,P,G)):this.finalize(a,new s.FunctionExpression(v,P,G,l))},p.prototype.parseDirective=function(){var a=this.lookahead,u=this.createNode(),l=this.parseExpression(),g=l.type===h.Syntax.Literal?this.getTokenRaw(a).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(u,g?new s.Directive(l,g):new s.ExpressionStatement(l))},p.prototype.parseDirectivePrologues=function(){for(var a=null,u=[];;){var l=this.lookahead;if(l.type!==8)break;var g=this.parseDirective();u.push(g);var v=g.directive;if(typeof v!="string")break;v==="use strict"?(this.context.strict=!0,a&&this.tolerateUnexpectedToken(a,o.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(l,o.Messages.IllegalLanguageModeDirective)):!a&&l.octal&&(a=l)}return u},p.prototype.qualifiedPropertyName=function(a){switch(a.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return a.value==="[";default:break}return!1},p.prototype.parseGetterMethod=function(){var a=this.createNode(),u=!1,l=this.context.allowYield;this.context.allowYield=!u;var g=this.parseFormalParameters();g.params.length>0&&this.tolerateError(o.Messages.BadGetterArity);var v=this.parsePropertyMethod(g);return this.context.allowYield=l,this.finalize(a,new s.FunctionExpression(null,g.params,v,u))},p.prototype.parseSetterMethod=function(){var a=this.createNode(),u=!1,l=this.context.allowYield;this.context.allowYield=!u;var g=this.parseFormalParameters();g.params.length!==1?this.tolerateError(o.Messages.BadSetterArity):g.params[0]instanceof s.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var v=this.parsePropertyMethod(g);return this.context.allowYield=l,this.finalize(a,new s.FunctionExpression(null,g.params,v,u))},p.prototype.parseGeneratorMethod=function(){var a=this.createNode(),u=!0,l=this.context.allowYield;this.context.allowYield=!0;var g=this.parseFormalParameters();this.context.allowYield=!1;var v=this.parsePropertyMethod(g);return this.context.allowYield=l,this.finalize(a,new s.FunctionExpression(null,g.params,v,u))},p.prototype.isStartOfExpression=function(){var a=!0,u=this.lookahead.value;switch(this.lookahead.type){case 7:a=u==="["||u==="("||u==="{"||u==="+"||u==="-"||u==="!"||u==="~"||u==="++"||u==="--"||u==="/"||u==="/=";break;case 4:a=u==="class"||u==="delete"||u==="function"||u==="let"||u==="new"||u==="super"||u==="this"||u==="typeof"||u==="void"||u==="yield";break;default:break}return a},p.prototype.parseYieldExpression=function(){var a=this.createNode();this.expectKeyword("yield");var u=null,l=!1;if(!this.hasLineTerminator){var g=this.context.allowYield;this.context.allowYield=!1,l=this.match("*"),l?(this.nextToken(),u=this.parseAssignmentExpression()):this.isStartOfExpression()&&(u=this.parseAssignmentExpression()),this.context.allowYield=g}return this.finalize(a,new s.YieldExpression(u,l))},p.prototype.parseClassElement=function(a){var u=this.lookahead,l=this.createNode(),g="",v=null,x=null,w=!1,C=!1,S=!1,T=!1;if(this.match("*"))this.nextToken();else{w=this.match("["),v=this.parseObjectPropertyKey();var P=v;if(P.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(u=this.lookahead,S=!0,w=this.match("["),this.match("*")?this.nextToken():v=this.parseObjectPropertyKey()),u.type===3&&!this.hasLineTerminator&&u.value==="async"){var B=this.lookahead.value;B!==":"&&B!=="("&&B!=="*"&&(T=!0,u=this.lookahead,v=this.parseObjectPropertyKey(),u.type===3&&u.value==="constructor"&&this.tolerateUnexpectedToken(u,o.Messages.ConstructorIsAsync))}}var L=this.qualifiedPropertyName(this.lookahead);return u.type===3?u.value==="get"&&L?(g="get",w=this.match("["),v=this.parseObjectPropertyKey(),this.context.allowYield=!1,x=this.parseGetterMethod()):u.value==="set"&&L&&(g="set",w=this.match("["),v=this.parseObjectPropertyKey(),x=this.parseSetterMethod()):u.type===7&&u.value==="*"&&L&&(g="init",w=this.match("["),v=this.parseObjectPropertyKey(),x=this.parseGeneratorMethod(),C=!0),!g&&v&&this.match("(")&&(g="init",x=T?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),C=!0),g||this.throwUnexpectedToken(this.lookahead),g==="init"&&(g="method"),w||(S&&this.isPropertyKey(v,"prototype")&&this.throwUnexpectedToken(u,o.Messages.StaticPrototype),!S&&this.isPropertyKey(v,"constructor")&&((g!=="method"||!C||x&&x.generator)&&this.throwUnexpectedToken(u,o.Messages.ConstructorSpecialMethod),a.value?this.throwUnexpectedToken(u,o.Messages.DuplicateConstructor):a.value=!0,g="constructor")),this.finalize(l,new s.MethodDefinition(v,w,x,g,S))},p.prototype.parseClassElementList=function(){var a=[],u={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():a.push(this.parseClassElement(u));return this.expect("}"),a},p.prototype.parseClassBody=function(){var a=this.createNode(),u=this.parseClassElementList();return this.finalize(a,new s.ClassBody(u))},p.prototype.parseClassDeclaration=function(a){var u=this.createNode(),l=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var g=a&&this.lookahead.type!==3?null:this.parseVariableIdentifier(),v=null;this.matchKeyword("extends")&&(this.nextToken(),v=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var x=this.parseClassBody();return this.context.strict=l,this.finalize(u,new s.ClassDeclaration(g,v,x))},p.prototype.parseClassExpression=function(){var a=this.createNode(),u=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var l=this.lookahead.type===3?this.parseVariableIdentifier():null,g=null;this.matchKeyword("extends")&&(this.nextToken(),g=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var v=this.parseClassBody();return this.context.strict=u,this.finalize(a,new s.ClassExpression(l,g,v))},p.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var a=this.createNode(),u=this.parseDirectivePrologues();this.lookahead.type!==2;)u.push(this.parseStatementListItem());return this.finalize(a,new s.Module(u))},p.prototype.parseScript=function(){for(var a=this.createNode(),u=this.parseDirectivePrologues();this.lookahead.type!==2;)u.push(this.parseStatementListItem());return this.finalize(a,new s.Script(u))},p.prototype.parseModuleSpecifier=function(){var a=this.createNode();this.lookahead.type!==8&&this.throwError(o.Messages.InvalidModuleSpecifier);var u=this.nextToken(),l=this.getTokenRaw(u);return this.finalize(a,new s.Literal(u.value,l))},p.prototype.parseImportSpecifier=function(){var a=this.createNode(),u,l;return this.lookahead.type===3?(u=this.parseVariableIdentifier(),l=u,this.matchContextualKeyword("as")&&(this.nextToken(),l=this.parseVariableIdentifier())):(u=this.parseIdentifierName(),l=u,this.matchContextualKeyword("as")?(this.nextToken(),l=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(a,new s.ImportSpecifier(l,u))},p.prototype.parseNamedImports=function(){this.expect("{");for(var a=[];!this.match("}");)a.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),a},p.prototype.parseImportDefaultSpecifier=function(){var a=this.createNode(),u=this.parseIdentifierName();return this.finalize(a,new s.ImportDefaultSpecifier(u))},p.prototype.parseImportNamespaceSpecifier=function(){var a=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var u=this.parseIdentifierName();return this.finalize(a,new s.ImportNamespaceSpecifier(u))},p.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var a=this.createNode();this.expectKeyword("import");var u,l=[];if(this.lookahead.type===8)u=this.parseModuleSpecifier();else{if(this.match("{")?l=l.concat(this.parseNamedImports()):this.match("*")?l.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(l.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?l.push(this.parseImportNamespaceSpecifier()):this.match("{")?l=l.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}this.nextToken(),u=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(a,new s.ImportDeclaration(l,u))},p.prototype.parseExportSpecifier=function(){var a=this.createNode(),u=this.parseIdentifierName(),l=u;return this.matchContextualKeyword("as")&&(this.nextToken(),l=this.parseIdentifierName()),this.finalize(a,new s.ExportSpecifier(u,l))},p.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var a=this.createNode();this.expectKeyword("export");var u;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var l=this.parseFunctionDeclaration(!0);u=this.finalize(a,new s.ExportDefaultDeclaration(l))}else if(this.matchKeyword("class")){var l=this.parseClassDeclaration(!0);u=this.finalize(a,new s.ExportDefaultDeclaration(l))}else if(this.matchContextualKeyword("async")){var l=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();u=this.finalize(a,new s.ExportDefaultDeclaration(l))}else{this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value);var l=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),u=this.finalize(a,new s.ExportDefaultDeclaration(l))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}this.nextToken();var v=this.parseModuleSpecifier();this.consumeSemicolon(),u=this.finalize(a,new s.ExportAllDeclaration(v))}else if(this.lookahead.type===4){var l=void 0;switch(this.lookahead.value){case"let":case"const":l=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":l=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}u=this.finalize(a,new s.ExportNamedDeclaration(l,[],null))}else if(this.matchAsyncFunction()){var l=this.parseFunctionDeclaration();u=this.finalize(a,new s.ExportNamedDeclaration(l,[],null))}else{var x=[],w=null,C=!1;for(this.expect("{");!this.match("}");)C=C||this.matchKeyword("default"),x.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),w=this.parseModuleSpecifier(),this.consumeSemicolon();else if(C){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}else this.consumeSemicolon();u=this.finalize(a,new s.ExportNamedDeclaration(null,x,w))}return u},p})();t.Parser=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(i,n){if(!i)throw new Error("ASSERT: "+n)}t.assert=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(function(){function i(){this.errors=[],this.tolerant=!1}return i.prototype.recordError=function(n){this.errors.push(n)},i.prototype.tolerate=function(n){if(this.tolerant)this.recordError(n);else throw n},i.prototype.constructError=function(n,o){var s=new Error(n);try{throw s}catch(c){Object.create&&Object.defineProperty&&(s=Object.create(c),Object.defineProperty(s,"column",{value:o}))}return s},i.prototype.createError=function(n,o,s,c){var h="Line "+o+": "+c,m=this.constructError(h,s);return m.index=n,m.lineNumber=o,m.description=c,m},i.prototype.throwError=function(n,o,s,c){throw this.createError(n,o,s,c)},i.prototype.tolerateError=function(n,o,s,c){var h=this.createError(n,o,s,c);if(this.tolerant)this.recordError(h);else throw h},i})();t.ErrorHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(9),n=r(4),o=r(11);function s(m){return"0123456789abcdef".indexOf(m.toLowerCase())}function c(m){return"01234567".indexOf(m)}var h=(function(){function m(d,f){this.source=d,this.errorHandler=f,this.trackComment=!1,this.isModule=!1,this.length=d.length,this.index=0,this.lineNumber=d.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return m.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},m.prototype.restoreState=function(d){this.index=d.index,this.lineNumber=d.lineNumber,this.lineStart=d.lineStart},m.prototype.eof=function(){return this.index>=this.length},m.prototype.throwUnexpectedToken=function(d){return d===void 0&&(d=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,d)},m.prototype.tolerateUnexpectedToken=function(d){d===void 0&&(d=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,d)},m.prototype.skipSingleLineComment=function(d){var f=[],p,a;for(this.trackComment&&(f=[],p=this.index-d,a={start:{line:this.lineNumber,column:this.index-this.lineStart-d},end:{}});!this.eof();){var u=this.source.charCodeAt(this.index);if(++this.index,n.Character.isLineTerminator(u)){if(this.trackComment){a.end={line:this.lineNumber,column:this.index-this.lineStart-1};var l={multiLine:!1,slice:[p+d,this.index-1],range:[p,this.index-1],loc:a};f.push(l)}return u===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,f}}if(this.trackComment){a.end={line:this.lineNumber,column:this.index-this.lineStart};var l={multiLine:!1,slice:[p+d,this.index],range:[p,this.index],loc:a};f.push(l)}return f},m.prototype.skipMultiLineComment=function(){var d=[],f,p;for(this.trackComment&&(d=[],f=this.index-2,p={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var a=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(a))a===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(a===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){p.end={line:this.lineNumber,column:this.index-this.lineStart};var u={multiLine:!0,slice:[f+2,this.index-2],range:[f,this.index],loc:p};d.push(u)}return d}++this.index}else++this.index}if(this.trackComment){p.end={line:this.lineNumber,column:this.index-this.lineStart};var u={multiLine:!0,slice:[f+2,this.index],range:[f,this.index],loc:p};d.push(u)}return this.tolerateUnexpectedToken(),d},m.prototype.scanComments=function(){var d;this.trackComment&&(d=[]);for(var f=this.index===0;!this.eof();){var p=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(p))++this.index;else if(n.Character.isLineTerminator(p))++this.index,p===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,f=!0;else if(p===47)if(p=this.source.charCodeAt(this.index+1),p===47){this.index+=2;var a=this.skipSingleLineComment(2);this.trackComment&&(d=d.concat(a)),f=!0}else if(p===42){this.index+=2;var a=this.skipMultiLineComment();this.trackComment&&(d=d.concat(a))}else break;else if(f&&p===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var a=this.skipSingleLineComment(3);this.trackComment&&(d=d.concat(a))}else break;else if(p===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var a=this.skipSingleLineComment(4);this.trackComment&&(d=d.concat(a))}else break;else break}return d},m.prototype.isFutureReservedWord=function(d){switch(d){case"enum":case"export":case"import":case"super":return!0;default:return!1}},m.prototype.isStrictModeReservedWord=function(d){switch(d){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},m.prototype.isRestrictedWord=function(d){return d==="eval"||d==="arguments"},m.prototype.isKeyword=function(d){switch(d.length){case 2:return d==="if"||d==="in"||d==="do";case 3:return d==="var"||d==="for"||d==="new"||d==="try"||d==="let";case 4:return d==="this"||d==="else"||d==="case"||d==="void"||d==="with"||d==="enum";case 5:return d==="while"||d==="break"||d==="catch"||d==="throw"||d==="const"||d==="yield"||d==="class"||d==="super";case 6:return d==="return"||d==="typeof"||d==="delete"||d==="switch"||d==="export"||d==="import";case 7:return d==="default"||d==="finally"||d==="extends";case 8:return d==="function"||d==="continue"||d==="debugger";case 10:return d==="instanceof";default:return!1}},m.prototype.codePointAt=function(d){var f=this.source.charCodeAt(d);if(f>=55296&&f<=56319){var p=this.source.charCodeAt(d+1);if(p>=56320&&p<=57343){var a=f;f=(a-55296)*1024+p-56320+65536}}return f},m.prototype.scanHexEscape=function(d){for(var f=d==="u"?4:2,p=0,a=0;a<f;++a)if(!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index)))p=p*16+s(this.source[this.index++]);else return null;return String.fromCharCode(p)},m.prototype.scanUnicodeCodePointEscape=function(){var d=this.source[this.index],f=0;for(d==="}"&&this.throwUnexpectedToken();!this.eof()&&(d=this.source[this.index++],!!n.Character.isHexDigit(d.charCodeAt(0)));)f=f*16+s(d);return(f>1114111||d!=="}")&&this.throwUnexpectedToken(),n.Character.fromCodePoint(f)},m.prototype.getIdentifier=function(){for(var d=this.index++;!this.eof();){var f=this.source.charCodeAt(this.index);if(f===92)return this.index=d,this.getComplexIdentifier();if(f>=55296&&f<57343)return this.index=d,this.getComplexIdentifier();if(n.Character.isIdentifierPart(f))++this.index;else break}return this.source.slice(d,this.index)},m.prototype.getComplexIdentifier=function(){var d=this.codePointAt(this.index),f=n.Character.fromCodePoint(d);this.index+=f.length;var p;for(d===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,p=this.scanUnicodeCodePointEscape()):(p=this.scanHexEscape("u"),(p===null||p==="\\"||!n.Character.isIdentifierStart(p.charCodeAt(0)))&&this.throwUnexpectedToken()),f=p);!this.eof()&&(d=this.codePointAt(this.index),!!n.Character.isIdentifierPart(d));)p=n.Character.fromCodePoint(d),f+=p,this.index+=p.length,d===92&&(f=f.substr(0,f.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,p=this.scanUnicodeCodePointEscape()):(p=this.scanHexEscape("u"),(p===null||p==="\\"||!n.Character.isIdentifierPart(p.charCodeAt(0)))&&this.throwUnexpectedToken()),f+=p);return f},m.prototype.octalToDecimal=function(d){var f=d!=="0",p=c(d);return!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(f=!0,p=p*8+c(this.source[this.index++]),"0123".indexOf(d)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(p=p*8+c(this.source[this.index++]))),{code:p,octal:f}},m.prototype.scanIdentifier=function(){var d,f=this.index,p=this.source.charCodeAt(f)===92?this.getComplexIdentifier():this.getIdentifier();if(p.length===1?d=3:this.isKeyword(p)?d=4:p==="null"?d=5:p==="true"||p==="false"?d=1:d=3,d!==3&&f+p.length!==this.index){var a=this.index;this.index=f,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=a}return{type:d,value:p,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},m.prototype.scanPunctuator=function(){var d=this.index,f=this.source[this.index];switch(f){case"(":case"{":f==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,f="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:f=this.source.substr(this.index,4),f===">>>="?this.index+=4:(f=f.substr(0,3),f==="==="||f==="!=="||f===">>>"||f==="<<="||f===">>="||f==="**="?this.index+=3:(f=f.substr(0,2),f==="&&"||f==="||"||f==="=="||f==="!="||f==="+="||f==="-="||f==="*="||f==="/="||f==="++"||f==="--"||f==="<<"||f===">>"||f==="&="||f==="|="||f==="^="||f==="%="||f==="<="||f===">="||f==="=>"||f==="**"?this.index+=2:(f=this.source[this.index],"<>=!+-*%&|^/".indexOf(f)>=0&&++this.index)))}return this.index===d&&this.throwUnexpectedToken(),{type:7,value:f,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.scanHexLiteral=function(d){for(var f="";!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index));)f+=this.source[this.index++];return f.length===0&&this.throwUnexpectedToken(),n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+f,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.scanBinaryLiteral=function(d){for(var f="",p;!this.eof()&&(p=this.source[this.index],!(p!=="0"&&p!=="1"));)f+=this.source[this.index++];return f.length===0&&this.throwUnexpectedToken(),this.eof()||(p=this.source.charCodeAt(this.index),(n.Character.isIdentifierStart(p)||n.Character.isDecimalDigit(p))&&this.throwUnexpectedToken()),{type:6,value:parseInt(f,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.scanOctalLiteral=function(d,f){var p="",a=!1;for(n.Character.isOctalDigit(d.charCodeAt(0))?(a=!0,p="0"+this.source[this.index++]):++this.index;!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];return!a&&p.length===0&&this.throwUnexpectedToken(),(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(p,8),octal:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},m.prototype.isImplicitOctalLiteral=function(){for(var d=this.index+1;d<this.length;++d){var f=this.source[d];if(f==="8"||f==="9")return!1;if(!n.Character.isOctalDigit(f.charCodeAt(0)))return!0}return!0},m.prototype.scanNumericLiteral=function(){var d=this.index,f=this.source[d];i.assert(n.Character.isDecimalDigit(f.charCodeAt(0))||f===".","Numeric literal must start with a decimal digit or a decimal point");var p="";if(f!=="."){if(p=this.source[this.index++],f=this.source[this.index],p==="0"){if(f==="x"||f==="X")return++this.index,this.scanHexLiteral(d);if(f==="b"||f==="B")return++this.index,this.scanBinaryLiteral(d);if(f==="o"||f==="O")return this.scanOctalLiteral(f,d);if(f&&n.Character.isOctalDigit(f.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(f,d)}for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];f=this.source[this.index]}if(f==="."){for(p+=this.source[this.index++];n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];f=this.source[this.index]}if(f==="e"||f==="E")if(p+=this.source[this.index++],f=this.source[this.index],(f==="+"||f==="-")&&(p+=this.source[this.index++]),n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];else this.throwUnexpectedToken();return n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(p),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.scanStringLiteral=function(){var d=this.index,f=this.source[d];i.assert(f==="'"||f==='"',"String literal must starts with a quote"),++this.index;for(var p=!1,a="";!this.eof();){var u=this.source[this.index++];if(u===f){f="";break}else if(u==="\\")if(u=this.source[this.index++],!u||!n.Character.isLineTerminator(u.charCodeAt(0)))switch(u){case"u":if(this.source[this.index]==="{")++this.index,a+=this.scanUnicodeCodePointEscape();else{var l=this.scanHexEscape(u);l===null&&this.throwUnexpectedToken(),a+=l}break;case"x":var g=this.scanHexEscape(u);g===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),a+=g;break;case"n":a+=`
118
+ `):i}});var rp=E(Mi=>{"use strict";y();Object.defineProperty(Mi,"__esModule",{value:!0});Mi.Tree=void 0;var XC=tp(),us=class e{nodes={};display(t=console.log){let r=function(n){let o={};for(let s of Object.keys(n))o[s]=r(n[s].nodes);return o},i=r(this.nodes);t(XC(i))}insert(t,r=new e){return this.nodes[t]=r,this}search(t){for(let r of Object.keys(this.nodes)){if(r===t)return this.nodes[r];let i=this.nodes[r].search(t);if(i)return i}}};Mi.Tree=us;function VC(){return new us}Mi.default=VC});var _a=E(de=>{"use strict";y();var YC=de&&de.__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]})),KC=de&&de.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),QC=de&&de.__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)&&YC(t,e,r);return KC(t,e),t},Aa=de&&de.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(de,"__esModule",{value:!0});de.tree=de.Table=de.progress=de.styledObject=void 0;var ZC=ph();Object.defineProperty(de,"styledObject",{enumerable:!0,get:function(){return Aa(ZC).default}});var eS=Uh();Object.defineProperty(de,"progress",{enumerable:!0,get:function(){return Aa(eS).default}});de.Table=QC(Zd());var tS=rp();Object.defineProperty(de,"tree",{enumerable:!0,get:function(){return Aa(tS).default}})});var ip=E(Fa=>{"use strict";y();Object.defineProperty(Fa,"__esModule",{value:!0});Fa.default=(e=1e3)=>new Promise(t=>{setTimeout(t,e)})});var sp=E((X2,np)=>{"use strict";y();np.exports=(e,t,r)=>(r=r||{},["\x1B]","8",";",Object.keys(r).map(i=>i+"="+r[i]).join(":"),";",t,"\x07",e,"\x1B]","8",";",";","\x07"].join(""))});var op=E((ji,ka)=>{y();(function(t,r){typeof ji=="object"&&typeof ka=="object"?ka.exports=r():typeof define=="function"&&define.amd?define([],r):typeof ji=="object"?ji.esprima=r():t.esprima=r()})(ji,function(){return(function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,r),n.loaded=!0,n.exports}return r.m=e,r.c=t,r.p="",r(0)})([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(1),n=r(3),o=r(8),s=r(15);function c(p,a,u){var l=null,g=function(B,L){u&&u(B,L),l&&l.visit(B,L)},v=typeof u=="function"?g:null,x=!1;if(a){x=typeof a.comment=="boolean"&&a.comment;var w=typeof a.attachComment=="boolean"&&a.attachComment;(x||w)&&(l=new i.CommentHandler,l.attach=w,a.comment=!0,v=g)}var C=!1;a&&typeof a.sourceType=="string"&&(C=a.sourceType==="module");var S;a&&typeof a.jsx=="boolean"&&a.jsx?S=new n.JSXParser(p,a,v):S=new o.Parser(p,a,v);var T=C?S.parseModule():S.parseScript(),P=T;return x&&l&&(P.comments=l.comments),S.config.tokens&&(P.tokens=S.tokens),S.config.tolerant&&(P.errors=S.errorHandler.errors),P}t.parse=c;function h(p,a,u){var l=a||{};return l.sourceType="module",c(p,l,u)}t.parseModule=h;function m(p,a,u){var l=a||{};return l.sourceType="script",c(p,l,u)}t.parseScript=m;function d(p,a,u){var l=new s.Tokenizer(p,a),g;g=[];try{for(;;){var v=l.getNextToken();if(!v)break;u&&(v=u(v)),g.push(v)}}catch(x){l.errorHandler.tolerate(x)}return l.errorHandler.tolerant&&(g.errors=l.errors()),g}t.tokenize=d;var f=r(2);t.Syntax=f.Syntax,t.version="4.0.1"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),n=(function(){function o(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return o.prototype.insertInnerComments=function(s,c){if(s.type===i.Syntax.BlockStatement&&s.body.length===0){for(var h=[],m=this.leading.length-1;m>=0;--m){var d=this.leading[m];c.end.offset>=d.start&&(h.unshift(d.comment),this.leading.splice(m,1),this.trailing.splice(m,1))}h.length&&(s.innerComments=h)}},o.prototype.findTrailingComments=function(s){var c=[];if(this.trailing.length>0){for(var h=this.trailing.length-1;h>=0;--h){var m=this.trailing[h];m.start>=s.end.offset&&c.unshift(m.comment)}return this.trailing.length=0,c}var d=this.stack[this.stack.length-1];if(d&&d.node.trailingComments){var f=d.node.trailingComments[0];f&&f.range[0]>=s.end.offset&&(c=d.node.trailingComments,delete d.node.trailingComments)}return c},o.prototype.findLeadingComments=function(s){for(var c=[],h;this.stack.length>0;){var m=this.stack[this.stack.length-1];if(m&&m.start>=s.start.offset)h=m.node,this.stack.pop();else break}if(h){for(var d=h.leadingComments?h.leadingComments.length:0,f=d-1;f>=0;--f){var p=h.leadingComments[f];p.range[1]<=s.start.offset&&(c.unshift(p),h.leadingComments.splice(f,1))}return h.leadingComments&&h.leadingComments.length===0&&delete h.leadingComments,c}for(var f=this.leading.length-1;f>=0;--f){var m=this.leading[f];m.start<=s.start.offset&&(c.unshift(m.comment),this.leading.splice(f,1))}return c},o.prototype.visitNode=function(s,c){if(!(s.type===i.Syntax.Program&&s.body.length>0)){this.insertInnerComments(s,c);var h=this.findTrailingComments(c),m=this.findLeadingComments(c);m.length>0&&(s.leadingComments=m),h.length>0&&(s.trailingComments=h),this.stack.push({node:s,start:c.start.offset})}},o.prototype.visitComment=function(s,c){var h=s.type[0]==="L"?"Line":"Block",m={type:h,value:s.value};if(s.range&&(m.range=s.range),s.loc&&(m.loc=s.loc),this.comments.push(m),this.attach){var d={comment:{type:h,value:s.value,range:[c.start.offset,c.end.offset]},start:c.start.offset};s.loc&&(d.comment.loc=s.loc),s.type=h,this.leading.push(d),this.trailing.push(d)}},o.prototype.visit=function(s,c){s.type==="LineComment"?this.visitComment(s,c):s.type==="BlockComment"?this.visitComment(s,c):this.attach&&this.visitNode(s,c)},o})();t.CommentHandler=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=this&&this.__extends||(function(){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var g in l)l.hasOwnProperty(g)&&(u[g]=l[g])};return function(u,l){a(u,l);function g(){this.constructor=u}u.prototype=l===null?Object.create(l):(g.prototype=l.prototype,new g)}})();Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),o=r(5),s=r(6),c=r(7),h=r(8),m=r(13),d=r(14);m.TokenName[100]="JSXIdentifier",m.TokenName[101]="JSXText";function f(a){var u;switch(a.type){case s.JSXSyntax.JSXIdentifier:var l=a;u=l.name;break;case s.JSXSyntax.JSXNamespacedName:var g=a;u=f(g.namespace)+":"+f(g.name);break;case s.JSXSyntax.JSXMemberExpression:var v=a;u=f(v.object)+"."+f(v.property);break;default:break}return u}var p=(function(a){i(u,a);function u(l,g,v){return a.call(this,l,g,v)||this}return u.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():a.prototype.parsePrimaryExpression.call(this)},u.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},u.prototype.finishJSX=function(){this.nextToken()},u.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},u.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},u.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},u.prototype.scanXHTMLEntity=function(l){for(var g="&",v=!0,x=!1,w=!1,C=!1;!this.scanner.eof()&&v&&!x;){var S=this.scanner.source[this.scanner.index];if(S===l)break;if(x=S===";",g+=S,++this.scanner.index,!x)switch(g.length){case 2:w=S==="#";break;case 3:w&&(C=S==="x",v=C||n.Character.isDecimalDigit(S.charCodeAt(0)),w=w&&!C);break;default:v=v&&!(w&&!n.Character.isDecimalDigit(S.charCodeAt(0))),v=v&&!(C&&!n.Character.isHexDigit(S.charCodeAt(0)));break}}if(v&&x&&g.length>2){var T=g.substr(1,g.length-2);w&&T.length>1?g=String.fromCharCode(parseInt(T.substr(1),10)):C&&T.length>2?g=String.fromCharCode(parseInt("0"+T.substr(1),16)):!w&&!C&&d.XHTMLEntities[T]&&(g=d.XHTMLEntities[T])}return g},u.prototype.lexJSX=function(){var l=this.scanner.source.charCodeAt(this.scanner.index);if(l===60||l===62||l===47||l===58||l===61||l===123||l===125){var g=this.scanner.source[this.scanner.index++];return{type:7,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(l===34||l===39){for(var v=this.scanner.index,x=this.scanner.source[this.scanner.index++],w="";!this.scanner.eof();){var C=this.scanner.source[this.scanner.index++];if(C===x)break;C==="&"?w+=this.scanXHTMLEntity(x):w+=C}return{type:8,value:w,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:v,end:this.scanner.index}}if(l===46){var S=this.scanner.source.charCodeAt(this.scanner.index+1),T=this.scanner.source.charCodeAt(this.scanner.index+2),g=S===46&&T===46?"...":".",v=this.scanner.index;return this.scanner.index+=g.length,{type:7,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:v,end:this.scanner.index}}if(l===96)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(n.Character.isIdentifierStart(l)&&l!==92){var v=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var C=this.scanner.source.charCodeAt(this.scanner.index);if(n.Character.isIdentifierPart(C)&&C!==92)++this.scanner.index;else if(C===45)++this.scanner.index;else break}var P=this.scanner.source.slice(v,this.scanner.index);return{type:100,value:P,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:v,end:this.scanner.index}}return this.scanner.lex()},u.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var l=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(l)),l},u.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var l=this.scanner.index,g="";!this.scanner.eof();){var v=this.scanner.source[this.scanner.index];if(v==="{"||v==="<")break;++this.scanner.index,g+=v,n.Character.isLineTerminator(v.charCodeAt(0))&&(++this.scanner.lineNumber,v==="\r"&&this.scanner.source[this.scanner.index]===`
119
+ `&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var x={type:101,value:g,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:l,end:this.scanner.index};return g.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(x)),x},u.prototype.peekJSXToken=function(){var l=this.scanner.saveState();this.scanner.scanComments();var g=this.lexJSX();return this.scanner.restoreState(l),g},u.prototype.expectJSX=function(l){var g=this.nextJSXToken();(g.type!==7||g.value!==l)&&this.throwUnexpectedToken(g)},u.prototype.matchJSX=function(l){var g=this.peekJSXToken();return g.type===7&&g.value===l},u.prototype.parseJSXIdentifier=function(){var l=this.createJSXNode(),g=this.nextJSXToken();return g.type!==100&&this.throwUnexpectedToken(g),this.finalize(l,new o.JSXIdentifier(g.value))},u.prototype.parseJSXElementName=function(){var l=this.createJSXNode(),g=this.parseJSXIdentifier();if(this.matchJSX(":")){var v=g;this.expectJSX(":");var x=this.parseJSXIdentifier();g=this.finalize(l,new o.JSXNamespacedName(v,x))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var w=g;this.expectJSX(".");var C=this.parseJSXIdentifier();g=this.finalize(l,new o.JSXMemberExpression(w,C))}return g},u.prototype.parseJSXAttributeName=function(){var l=this.createJSXNode(),g,v=this.parseJSXIdentifier();if(this.matchJSX(":")){var x=v;this.expectJSX(":");var w=this.parseJSXIdentifier();g=this.finalize(l,new o.JSXNamespacedName(x,w))}else g=v;return g},u.prototype.parseJSXStringLiteralAttribute=function(){var l=this.createJSXNode(),g=this.nextJSXToken();g.type!==8&&this.throwUnexpectedToken(g);var v=this.getTokenRaw(g);return this.finalize(l,new c.Literal(g.value,v))},u.prototype.parseJSXExpressionAttribute=function(){var l=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var g=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(l,new o.JSXExpressionContainer(g))},u.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},u.prototype.parseJSXNameValueAttribute=function(){var l=this.createJSXNode(),g=this.parseJSXAttributeName(),v=null;return this.matchJSX("=")&&(this.expectJSX("="),v=this.parseJSXAttributeValue()),this.finalize(l,new o.JSXAttribute(g,v))},u.prototype.parseJSXSpreadAttribute=function(){var l=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var g=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(l,new o.JSXSpreadAttribute(g))},u.prototype.parseJSXAttributes=function(){for(var l=[];!this.matchJSX("/")&&!this.matchJSX(">");){var g=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();l.push(g)}return l},u.prototype.parseJSXOpeningElement=function(){var l=this.createJSXNode();this.expectJSX("<");var g=this.parseJSXElementName(),v=this.parseJSXAttributes(),x=this.matchJSX("/");return x&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(l,new o.JSXOpeningElement(g,x,v))},u.prototype.parseJSXBoundaryElement=function(){var l=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var g=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(l,new o.JSXClosingElement(g))}var v=this.parseJSXElementName(),x=this.parseJSXAttributes(),w=this.matchJSX("/");return w&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(l,new o.JSXOpeningElement(v,w,x))},u.prototype.parseJSXEmptyExpression=function(){var l=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(l,new o.JSXEmptyExpression)},u.prototype.parseJSXExpressionContainer=function(){var l=this.createJSXNode();this.expectJSX("{");var g;return this.matchJSX("}")?(g=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),g=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(l,new o.JSXExpressionContainer(g))},u.prototype.parseJSXChildren=function(){for(var l=[];!this.scanner.eof();){var g=this.createJSXChildNode(),v=this.nextJSXText();if(v.start<v.end){var x=this.getTokenRaw(v),w=this.finalize(g,new o.JSXText(v.value,x));l.push(w)}if(this.scanner.source[this.scanner.index]==="{"){var C=this.parseJSXExpressionContainer();l.push(C)}else break}return l},u.prototype.parseComplexJSXElement=function(l){for(var g=[];!this.scanner.eof();){l.children=l.children.concat(this.parseJSXChildren());var v=this.createJSXChildNode(),x=this.parseJSXBoundaryElement();if(x.type===s.JSXSyntax.JSXOpeningElement){var w=x;if(w.selfClosing){var C=this.finalize(v,new o.JSXElement(w,[],null));l.children.push(C)}else g.push(l),l={node:v,opening:w,closing:null,children:[]}}if(x.type===s.JSXSyntax.JSXClosingElement){l.closing=x;var S=f(l.opening.name),T=f(l.closing.name);if(S!==T&&this.tolerateError("Expected corresponding JSX closing tag for %0",S),g.length>0){var C=this.finalize(l.node,new o.JSXElement(l.opening,l.children,l.closing));l=g[g.length-1],l.children.push(C),g.pop()}else break}}return l},u.prototype.parseJSXElement=function(){var l=this.createJSXNode(),g=this.parseJSXOpeningElement(),v=[],x=null;if(!g.selfClosing){var w=this.parseComplexJSXElement({node:l,opening:g,closing:x,children:v});v=w.children,x=w.closing}return this.finalize(l,new o.JSXElement(g,v,x))},u.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var l=this.parseJSXElement();return this.finishJSX(),l},u.prototype.isStartOfExpression=function(){return a.prototype.isStartOfExpression.call(this)||this.match("<")},u})(h.Parser);t.JSXParser=p},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(i){return i<65536?String.fromCharCode(i):String.fromCharCode(55296+(i-65536>>10))+String.fromCharCode(56320+(i-65536&1023))},isWhiteSpace:function(i){return i===32||i===9||i===11||i===12||i===160||i>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(i)>=0},isLineTerminator:function(i){return i===10||i===13||i===8232||i===8233},isIdentifierStart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i===92||i>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(i))},isIdentifierPart:function(i){return i===36||i===95||i>=65&&i<=90||i>=97&&i<=122||i>=48&&i<=57||i===92||i>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(i))},isDecimalDigit:function(i){return i>=48&&i<=57},isHexDigit:function(i){return i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102},isOctalDigit:function(i){return i>=48&&i<=55}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(6),n=(function(){function l(g){this.type=i.JSXSyntax.JSXClosingElement,this.name=g}return l})();t.JSXClosingElement=n;var o=(function(){function l(g,v,x){this.type=i.JSXSyntax.JSXElement,this.openingElement=g,this.children=v,this.closingElement=x}return l})();t.JSXElement=o;var s=(function(){function l(){this.type=i.JSXSyntax.JSXEmptyExpression}return l})();t.JSXEmptyExpression=s;var c=(function(){function l(g){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=g}return l})();t.JSXExpressionContainer=c;var h=(function(){function l(g){this.type=i.JSXSyntax.JSXIdentifier,this.name=g}return l})();t.JSXIdentifier=h;var m=(function(){function l(g,v){this.type=i.JSXSyntax.JSXMemberExpression,this.object=g,this.property=v}return l})();t.JSXMemberExpression=m;var d=(function(){function l(g,v){this.type=i.JSXSyntax.JSXAttribute,this.name=g,this.value=v}return l})();t.JSXAttribute=d;var f=(function(){function l(g,v){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=g,this.name=v}return l})();t.JSXNamespacedName=f;var p=(function(){function l(g,v,x){this.type=i.JSXSyntax.JSXOpeningElement,this.name=g,this.selfClosing=v,this.attributes=x}return l})();t.JSXOpeningElement=p;var a=(function(){function l(g){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=g}return l})();t.JSXSpreadAttribute=a;var u=(function(){function l(g,v){this.type=i.JSXSyntax.JSXText,this.value=g,this.raw=v}return l})();t.JSXText=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(2),n=(function(){function b(D){this.type=i.Syntax.ArrayExpression,this.elements=D}return b})();t.ArrayExpression=n;var o=(function(){function b(D){this.type=i.Syntax.ArrayPattern,this.elements=D}return b})();t.ArrayPattern=o;var s=(function(){function b(D,A,R){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=D,this.body=A,this.generator=!1,this.expression=R,this.async=!1}return b})();t.ArrowFunctionExpression=s;var c=(function(){function b(D,A,R){this.type=i.Syntax.AssignmentExpression,this.operator=D,this.left=A,this.right=R}return b})();t.AssignmentExpression=c;var h=(function(){function b(D,A){this.type=i.Syntax.AssignmentPattern,this.left=D,this.right=A}return b})();t.AssignmentPattern=h;var m=(function(){function b(D,A,R){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=D,this.body=A,this.generator=!1,this.expression=R,this.async=!0}return b})();t.AsyncArrowFunctionExpression=m;var d=(function(){function b(D,A,R){this.type=i.Syntax.FunctionDeclaration,this.id=D,this.params=A,this.body=R,this.generator=!1,this.expression=!1,this.async=!0}return b})();t.AsyncFunctionDeclaration=d;var f=(function(){function b(D,A,R){this.type=i.Syntax.FunctionExpression,this.id=D,this.params=A,this.body=R,this.generator=!1,this.expression=!1,this.async=!0}return b})();t.AsyncFunctionExpression=f;var p=(function(){function b(D){this.type=i.Syntax.AwaitExpression,this.argument=D}return b})();t.AwaitExpression=p;var a=(function(){function b(D,A,R){var Te=D==="||"||D==="&&";this.type=Te?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=D,this.left=A,this.right=R}return b})();t.BinaryExpression=a;var u=(function(){function b(D){this.type=i.Syntax.BlockStatement,this.body=D}return b})();t.BlockStatement=u;var l=(function(){function b(D){this.type=i.Syntax.BreakStatement,this.label=D}return b})();t.BreakStatement=l;var g=(function(){function b(D,A){this.type=i.Syntax.CallExpression,this.callee=D,this.arguments=A}return b})();t.CallExpression=g;var v=(function(){function b(D,A){this.type=i.Syntax.CatchClause,this.param=D,this.body=A}return b})();t.CatchClause=v;var x=(function(){function b(D){this.type=i.Syntax.ClassBody,this.body=D}return b})();t.ClassBody=x;var w=(function(){function b(D,A,R){this.type=i.Syntax.ClassDeclaration,this.id=D,this.superClass=A,this.body=R}return b})();t.ClassDeclaration=w;var C=(function(){function b(D,A,R){this.type=i.Syntax.ClassExpression,this.id=D,this.superClass=A,this.body=R}return b})();t.ClassExpression=C;var S=(function(){function b(D,A){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=D,this.property=A}return b})();t.ComputedMemberExpression=S;var T=(function(){function b(D,A,R){this.type=i.Syntax.ConditionalExpression,this.test=D,this.consequent=A,this.alternate=R}return b})();t.ConditionalExpression=T;var P=(function(){function b(D){this.type=i.Syntax.ContinueStatement,this.label=D}return b})();t.ContinueStatement=P;var B=(function(){function b(){this.type=i.Syntax.DebuggerStatement}return b})();t.DebuggerStatement=B;var L=(function(){function b(D,A){this.type=i.Syntax.ExpressionStatement,this.expression=D,this.directive=A}return b})();t.Directive=L;var z=(function(){function b(D,A){this.type=i.Syntax.DoWhileStatement,this.body=D,this.test=A}return b})();t.DoWhileStatement=z;var G=(function(){function b(){this.type=i.Syntax.EmptyStatement}return b})();t.EmptyStatement=G;var pe=(function(){function b(D){this.type=i.Syntax.ExportAllDeclaration,this.source=D}return b})();t.ExportAllDeclaration=pe;var _t=(function(){function b(D){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=D}return b})();t.ExportDefaultDeclaration=_t;var wr=(function(){function b(D,A,R){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=D,this.specifiers=A,this.source=R}return b})();t.ExportNamedDeclaration=wr;var Wt=(function(){function b(D,A){this.type=i.Syntax.ExportSpecifier,this.exported=A,this.local=D}return b})();t.ExportSpecifier=Wt;var so=(function(){function b(D){this.type=i.Syntax.ExpressionStatement,this.expression=D}return b})();t.ExpressionStatement=so;var oo=(function(){function b(D,A,R){this.type=i.Syntax.ForInStatement,this.left=D,this.right=A,this.body=R,this.each=!1}return b})();t.ForInStatement=oo;var pi=(function(){function b(D,A,R){this.type=i.Syntax.ForOfStatement,this.left=D,this.right=A,this.body=R}return b})();t.ForOfStatement=pi;var Gt=(function(){function b(D,A,R,Te){this.type=i.Syntax.ForStatement,this.init=D,this.test=A,this.update=R,this.body=Te}return b})();t.ForStatement=Gt;var dt=(function(){function b(D,A,R,Te){this.type=i.Syntax.FunctionDeclaration,this.id=D,this.params=A,this.body=R,this.generator=Te,this.expression=!1,this.async=!1}return b})();t.FunctionDeclaration=dt;var pt=(function(){function b(D,A,R,Te){this.type=i.Syntax.FunctionExpression,this.id=D,this.params=A,this.body=R,this.generator=Te,this.expression=!1,this.async=!1}return b})();t.FunctionExpression=pt;var rn=(function(){function b(D){this.type=i.Syntax.Identifier,this.name=D}return b})();t.Identifier=rn;var Er=(function(){function b(D,A,R){this.type=i.Syntax.IfStatement,this.test=D,this.consequent=A,this.alternate=R}return b})();t.IfStatement=Er;var Xt=(function(){function b(D,A){this.type=i.Syntax.ImportDeclaration,this.specifiers=D,this.source=A}return b})();t.ImportDeclaration=Xt;var re=(function(){function b(D){this.type=i.Syntax.ImportDefaultSpecifier,this.local=D}return b})();t.ImportDefaultSpecifier=re;var De=(function(){function b(D){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=D}return b})();t.ImportNamespaceSpecifier=De;var We=(function(){function b(D,A){this.type=i.Syntax.ImportSpecifier,this.local=D,this.imported=A}return b})();t.ImportSpecifier=We;var je=(function(){function b(D,A){this.type=i.Syntax.LabeledStatement,this.label=D,this.body=A}return b})();t.LabeledStatement=je;var Ge=(function(){function b(D,A){this.type=i.Syntax.Literal,this.value=D,this.raw=A}return b})();t.Literal=Ge;var Ft=(function(){function b(D,A){this.type=i.Syntax.MetaProperty,this.meta=D,this.property=A}return b})();t.MetaProperty=Ft;var b0=(function(){function b(D,A,R,Te,ao){this.type=i.Syntax.MethodDefinition,this.key=D,this.computed=A,this.value=R,this.kind=Te,this.static=ao}return b})();t.MethodDefinition=b0;var D0=(function(){function b(D){this.type=i.Syntax.Program,this.body=D,this.sourceType="module"}return b})();t.Module=D0;var C0=(function(){function b(D,A){this.type=i.Syntax.NewExpression,this.callee=D,this.arguments=A}return b})();t.NewExpression=C0;var S0=(function(){function b(D){this.type=i.Syntax.ObjectExpression,this.properties=D}return b})();t.ObjectExpression=S0;var A0=(function(){function b(D){this.type=i.Syntax.ObjectPattern,this.properties=D}return b})();t.ObjectPattern=A0;var _0=(function(){function b(D,A,R,Te,ao,K0){this.type=i.Syntax.Property,this.key=A,this.computed=R,this.value=Te,this.kind=D,this.method=ao,this.shorthand=K0}return b})();t.Property=_0;var F0=(function(){function b(D,A,R,Te){this.type=i.Syntax.Literal,this.value=D,this.raw=A,this.regex={pattern:R,flags:Te}}return b})();t.RegexLiteral=F0;var k0=(function(){function b(D){this.type=i.Syntax.RestElement,this.argument=D}return b})();t.RestElement=k0;var T0=(function(){function b(D){this.type=i.Syntax.ReturnStatement,this.argument=D}return b})();t.ReturnStatement=T0;var O0=(function(){function b(D){this.type=i.Syntax.Program,this.body=D,this.sourceType="script"}return b})();t.Script=O0;var P0=(function(){function b(D){this.type=i.Syntax.SequenceExpression,this.expressions=D}return b})();t.SequenceExpression=P0;var I0=(function(){function b(D){this.type=i.Syntax.SpreadElement,this.argument=D}return b})();t.SpreadElement=I0;var N0=(function(){function b(D,A){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=D,this.property=A}return b})();t.StaticMemberExpression=N0;var M0=(function(){function b(){this.type=i.Syntax.Super}return b})();t.Super=M0;var j0=(function(){function b(D,A){this.type=i.Syntax.SwitchCase,this.test=D,this.consequent=A}return b})();t.SwitchCase=j0;var B0=(function(){function b(D,A){this.type=i.Syntax.SwitchStatement,this.discriminant=D,this.cases=A}return b})();t.SwitchStatement=B0;var R0=(function(){function b(D,A){this.type=i.Syntax.TaggedTemplateExpression,this.tag=D,this.quasi=A}return b})();t.TaggedTemplateExpression=R0;var L0=(function(){function b(D,A){this.type=i.Syntax.TemplateElement,this.value=D,this.tail=A}return b})();t.TemplateElement=L0;var $0=(function(){function b(D,A){this.type=i.Syntax.TemplateLiteral,this.quasis=D,this.expressions=A}return b})();t.TemplateLiteral=$0;var q0=(function(){function b(){this.type=i.Syntax.ThisExpression}return b})();t.ThisExpression=q0;var U0=(function(){function b(D){this.type=i.Syntax.ThrowStatement,this.argument=D}return b})();t.ThrowStatement=U0;var H0=(function(){function b(D,A,R){this.type=i.Syntax.TryStatement,this.block=D,this.handler=A,this.finalizer=R}return b})();t.TryStatement=H0;var z0=(function(){function b(D,A){this.type=i.Syntax.UnaryExpression,this.operator=D,this.argument=A,this.prefix=!0}return b})();t.UnaryExpression=z0;var J0=(function(){function b(D,A,R){this.type=i.Syntax.UpdateExpression,this.operator=D,this.argument=A,this.prefix=R}return b})();t.UpdateExpression=J0;var W0=(function(){function b(D,A){this.type=i.Syntax.VariableDeclaration,this.declarations=D,this.kind=A}return b})();t.VariableDeclaration=W0;var G0=(function(){function b(D,A){this.type=i.Syntax.VariableDeclarator,this.id=D,this.init=A}return b})();t.VariableDeclarator=G0;var X0=(function(){function b(D,A){this.type=i.Syntax.WhileStatement,this.test=D,this.body=A}return b})();t.WhileStatement=X0;var V0=(function(){function b(D,A){this.type=i.Syntax.WithStatement,this.object=D,this.body=A}return b})();t.WithStatement=V0;var Y0=(function(){function b(D,A){this.type=i.Syntax.YieldExpression,this.argument=D,this.delegate=A}return b})();t.YieldExpression=Y0},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(9),n=r(10),o=r(11),s=r(7),c=r(12),h=r(2),m=r(13),d="ArrowParameterPlaceHolder",f=(function(){function p(a,u,l){u===void 0&&(u={}),this.config={range:typeof u.range=="boolean"&&u.range,loc:typeof u.loc=="boolean"&&u.loc,source:null,tokens:typeof u.tokens=="boolean"&&u.tokens,comment:typeof u.comment=="boolean"&&u.comment,tolerant:typeof u.tolerant=="boolean"&&u.tolerant},this.config.loc&&u.source&&u.source!==null&&(this.config.source=String(u.source)),this.delegate=l,this.errorHandler=new n.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new c.Scanner(a,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return p.prototype.throwError=function(a){for(var u=[],l=1;l<arguments.length;l++)u[l-1]=arguments[l];var g=Array.prototype.slice.call(arguments,1),v=a.replace(/%(\d)/g,function(S,T){return i.assert(T<g.length,"Message reference must be in range"),g[T]}),x=this.lastMarker.index,w=this.lastMarker.line,C=this.lastMarker.column+1;throw this.errorHandler.createError(x,w,C,v)},p.prototype.tolerateError=function(a){for(var u=[],l=1;l<arguments.length;l++)u[l-1]=arguments[l];var g=Array.prototype.slice.call(arguments,1),v=a.replace(/%(\d)/g,function(S,T){return i.assert(T<g.length,"Message reference must be in range"),g[T]}),x=this.lastMarker.index,w=this.scanner.lineNumber,C=this.lastMarker.column+1;this.errorHandler.tolerateError(x,w,C,v)},p.prototype.unexpectedTokenError=function(a,u){var l=u||o.Messages.UnexpectedToken,g;if(a?(u||(l=a.type===2?o.Messages.UnexpectedEOS:a.type===3?o.Messages.UnexpectedIdentifier:a.type===6?o.Messages.UnexpectedNumber:a.type===8?o.Messages.UnexpectedString:a.type===10?o.Messages.UnexpectedTemplate:o.Messages.UnexpectedToken,a.type===4&&(this.scanner.isFutureReservedWord(a.value)?l=o.Messages.UnexpectedReserved:this.context.strict&&this.scanner.isStrictModeReservedWord(a.value)&&(l=o.Messages.StrictReservedWord))),g=a.value):g="ILLEGAL",l=l.replace("%0",g),a&&typeof a.lineNumber=="number"){var v=a.start,x=a.lineNumber,w=this.lastMarker.index-this.lastMarker.column,C=a.start-w+1;return this.errorHandler.createError(v,x,C,l)}else{var v=this.lastMarker.index,x=this.lastMarker.line,C=this.lastMarker.column+1;return this.errorHandler.createError(v,x,C,l)}},p.prototype.throwUnexpectedToken=function(a,u){throw this.unexpectedTokenError(a,u)},p.prototype.tolerateUnexpectedToken=function(a,u){this.errorHandler.tolerate(this.unexpectedTokenError(a,u))},p.prototype.collectComments=function(){if(!this.config.comment)this.scanner.scanComments();else{var a=this.scanner.scanComments();if(a.length>0&&this.delegate)for(var u=0;u<a.length;++u){var l=a[u],g=void 0;g={type:l.multiLine?"BlockComment":"LineComment",value:this.scanner.source.slice(l.slice[0],l.slice[1])},this.config.range&&(g.range=l.range),this.config.loc&&(g.loc=l.loc);var v={start:{line:l.loc.start.line,column:l.loc.start.column,offset:l.range[0]},end:{line:l.loc.end.line,column:l.loc.end.column,offset:l.range[1]}};this.delegate(g,v)}}},p.prototype.getTokenRaw=function(a){return this.scanner.source.slice(a.start,a.end)},p.prototype.convertToken=function(a){var u={type:m.TokenName[a.type],value:this.getTokenRaw(a)};if(this.config.range&&(u.range=[a.start,a.end]),this.config.loc&&(u.loc={start:{line:this.startMarker.line,column:this.startMarker.column},end:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}),a.type===9){var l=a.pattern,g=a.flags;u.regex={pattern:l,flags:g}}return u},p.prototype.nextToken=function(){var a=this.lookahead;this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.collectComments(),this.scanner.index!==this.startMarker.index&&(this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart);var u=this.scanner.lex();return this.hasLineTerminator=a.lineNumber!==u.lineNumber,u&&this.context.strict&&u.type===3&&this.scanner.isStrictModeReservedWord(u.value)&&(u.type=4),this.lookahead=u,this.config.tokens&&u.type!==2&&this.tokens.push(this.convertToken(u)),a},p.prototype.nextRegexToken=function(){this.collectComments();var a=this.scanner.scanRegExp();return this.config.tokens&&(this.tokens.pop(),this.tokens.push(this.convertToken(a))),this.lookahead=a,this.nextToken(),a},p.prototype.createNode=function(){return{index:this.startMarker.index,line:this.startMarker.line,column:this.startMarker.column}},p.prototype.startNode=function(a,u){u===void 0&&(u=0);var l=a.start-a.lineStart,g=a.lineNumber;return l<0&&(l+=u,g--),{index:a.start,line:g,column:l}},p.prototype.finalize=function(a,u){if(this.config.range&&(u.range=[a.index,this.lastMarker.index]),this.config.loc&&(u.loc={start:{line:a.line,column:a.column},end:{line:this.lastMarker.line,column:this.lastMarker.column}},this.config.source&&(u.loc.source=this.config.source)),this.delegate){var l={start:{line:a.line,column:a.column,offset:a.index},end:{line:this.lastMarker.line,column:this.lastMarker.column,offset:this.lastMarker.index}};this.delegate(u,l)}return u},p.prototype.expect=function(a){var u=this.nextToken();(u.type!==7||u.value!==a)&&this.throwUnexpectedToken(u)},p.prototype.expectCommaSeparator=function(){if(this.config.tolerant){var a=this.lookahead;a.type===7&&a.value===","?this.nextToken():a.type===7&&a.value===";"?(this.nextToken(),this.tolerateUnexpectedToken(a)):this.tolerateUnexpectedToken(a,o.Messages.UnexpectedToken)}else this.expect(",")},p.prototype.expectKeyword=function(a){var u=this.nextToken();(u.type!==4||u.value!==a)&&this.throwUnexpectedToken(u)},p.prototype.match=function(a){return this.lookahead.type===7&&this.lookahead.value===a},p.prototype.matchKeyword=function(a){return this.lookahead.type===4&&this.lookahead.value===a},p.prototype.matchContextualKeyword=function(a){return this.lookahead.type===3&&this.lookahead.value===a},p.prototype.matchAssign=function(){if(this.lookahead.type!==7)return!1;var a=this.lookahead.value;return a==="="||a==="*="||a==="**="||a==="/="||a==="%="||a==="+="||a==="-="||a==="<<="||a===">>="||a===">>>="||a==="&="||a==="^="||a==="|="},p.prototype.isolateCoverGrammar=function(a){var u=this.context.isBindingElement,l=this.context.isAssignmentTarget,g=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var v=a.call(this);return this.context.firstCoverInitializedNameError!==null&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=u,this.context.isAssignmentTarget=l,this.context.firstCoverInitializedNameError=g,v},p.prototype.inheritCoverGrammar=function(a){var u=this.context.isBindingElement,l=this.context.isAssignmentTarget,g=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var v=a.call(this);return this.context.isBindingElement=this.context.isBindingElement&&u,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&l,this.context.firstCoverInitializedNameError=g||this.context.firstCoverInitializedNameError,v},p.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type!==2&&!this.match("}")&&this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},p.prototype.parsePrimaryExpression=function(){var a=this.createNode(),u,l,g;switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&this.lookahead.value==="await"&&this.tolerateUnexpectedToken(this.lookahead),u=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(a,new s.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,l=this.nextToken(),g=this.getTokenRaw(l),u=this.finalize(a,new s.Literal(l.value,g));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,l=this.nextToken(),g=this.getTokenRaw(l),u=this.finalize(a,new s.Literal(l.value==="true",g));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,l=this.nextToken(),g=this.getTokenRaw(l),u=this.finalize(a,new s.Literal(null,g));break;case 10:u=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,u=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":u=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":u=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,l=this.nextRegexToken(),g=this.getTokenRaw(l),u=this.finalize(a,new s.RegexLiteral(l.regex,g,l.pattern,l.flags));break;default:u=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?u=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?u=this.finalize(a,new s.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?u=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),u=this.finalize(a,new s.ThisExpression)):this.matchKeyword("class")?u=this.parseClassExpression():u=this.throwUnexpectedToken(this.nextToken()));break;default:u=this.throwUnexpectedToken(this.nextToken())}return u},p.prototype.parseSpreadElement=function(){var a=this.createNode();this.expect("...");var u=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(a,new s.SpreadElement(u))},p.prototype.parseArrayInitializer=function(){var a=this.createNode(),u=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),u.push(null);else if(this.match("...")){var l=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),u.push(l)}else u.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(a,new s.ArrayExpression(u))},p.prototype.parsePropertyMethod=function(a){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var u=this.context.strict,l=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var g=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&a.firstRestricted&&this.tolerateUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),this.context.strict=u,this.context.allowStrictDirective=l,g},p.prototype.parsePropertyMethodFunction=function(){var a=!1,u=this.createNode(),l=this.context.allowYield;this.context.allowYield=!0;var g=this.parseFormalParameters(),v=this.parsePropertyMethod(g);return this.context.allowYield=l,this.finalize(u,new s.FunctionExpression(null,g.params,v,a))},p.prototype.parsePropertyMethodAsyncFunction=function(){var a=this.createNode(),u=this.context.allowYield,l=this.context.await;this.context.allowYield=!1,this.context.await=!0;var g=this.parseFormalParameters(),v=this.parsePropertyMethod(g);return this.context.allowYield=u,this.context.await=l,this.finalize(a,new s.AsyncFunctionExpression(null,g.params,v))},p.prototype.parseObjectPropertyKey=function(){var a=this.createNode(),u=this.nextToken(),l;switch(u.type){case 8:case 6:this.context.strict&&u.octal&&this.tolerateUnexpectedToken(u,o.Messages.StrictOctalLiteral);var g=this.getTokenRaw(u);l=this.finalize(a,new s.Literal(u.value,g));break;case 3:case 1:case 5:case 4:l=this.finalize(a,new s.Identifier(u.value));break;case 7:u.value==="["?(l=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):l=this.throwUnexpectedToken(u);break;default:l=this.throwUnexpectedToken(u)}return l},p.prototype.isPropertyKey=function(a,u){return a.type===h.Syntax.Identifier&&a.name===u||a.type===h.Syntax.Literal&&a.value===u},p.prototype.parseObjectProperty=function(a){var u=this.createNode(),l=this.lookahead,g,v=null,x=null,w=!1,C=!1,S=!1,T=!1;if(l.type===3){var P=l.value;this.nextToken(),w=this.match("["),T=!this.hasLineTerminator&&P==="async"&&!this.match(":")&&!this.match("(")&&!this.match("*")&&!this.match(","),v=T?this.parseObjectPropertyKey():this.finalize(u,new s.Identifier(P))}else this.match("*")?this.nextToken():(w=this.match("["),v=this.parseObjectPropertyKey());var B=this.qualifiedPropertyName(this.lookahead);if(l.type===3&&!T&&l.value==="get"&&B)g="get",w=this.match("["),v=this.parseObjectPropertyKey(),this.context.allowYield=!1,x=this.parseGetterMethod();else if(l.type===3&&!T&&l.value==="set"&&B)g="set",w=this.match("["),v=this.parseObjectPropertyKey(),x=this.parseSetterMethod();else if(l.type===7&&l.value==="*"&&B)g="init",w=this.match("["),v=this.parseObjectPropertyKey(),x=this.parseGeneratorMethod(),C=!0;else if(v||this.throwUnexpectedToken(this.lookahead),g="init",this.match(":")&&!T)!w&&this.isPropertyKey(v,"__proto__")&&(a.value&&this.tolerateError(o.Messages.DuplicateProtoProperty),a.value=!0),this.nextToken(),x=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))x=T?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),C=!0;else if(l.type===3){var P=this.finalize(u,new s.Identifier(l.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),S=!0;var L=this.isolateCoverGrammar(this.parseAssignmentExpression);x=this.finalize(u,new s.AssignmentPattern(P,L))}else S=!0,x=P}else this.throwUnexpectedToken(this.nextToken());return this.finalize(u,new s.Property(g,v,w,x,C,S))},p.prototype.parseObjectInitializer=function(){var a=this.createNode();this.expect("{");for(var u=[],l={value:!1};!this.match("}");)u.push(this.parseObjectProperty(l)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(a,new s.ObjectExpression(u))},p.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var a=this.createNode(),u=this.nextToken(),l=u.value,g=u.cooked;return this.finalize(a,new s.TemplateElement({raw:l,cooked:g},u.tail))},p.prototype.parseTemplateElement=function(){this.lookahead.type!==10&&this.throwUnexpectedToken();var a=this.createNode(),u=this.nextToken(),l=u.value,g=u.cooked;return this.finalize(a,new s.TemplateElement({raw:l,cooked:g},u.tail))},p.prototype.parseTemplateLiteral=function(){var a=this.createNode(),u=[],l=[],g=this.parseTemplateHead();for(l.push(g);!g.tail;)u.push(this.parseExpression()),g=this.parseTemplateElement(),l.push(g);return this.finalize(a,new s.TemplateLiteral(l,u))},p.prototype.reinterpretExpressionAsPattern=function(a){switch(a.type){case h.Syntax.Identifier:case h.Syntax.MemberExpression:case h.Syntax.RestElement:case h.Syntax.AssignmentPattern:break;case h.Syntax.SpreadElement:a.type=h.Syntax.RestElement,this.reinterpretExpressionAsPattern(a.argument);break;case h.Syntax.ArrayExpression:a.type=h.Syntax.ArrayPattern;for(var u=0;u<a.elements.length;u++)a.elements[u]!==null&&this.reinterpretExpressionAsPattern(a.elements[u]);break;case h.Syntax.ObjectExpression:a.type=h.Syntax.ObjectPattern;for(var u=0;u<a.properties.length;u++)this.reinterpretExpressionAsPattern(a.properties[u].value);break;case h.Syntax.AssignmentExpression:a.type=h.Syntax.AssignmentPattern,delete a.operator,this.reinterpretExpressionAsPattern(a.left);break;default:break}},p.prototype.parseGroupExpression=function(){var a;if(this.expect("("),this.match(")"))this.nextToken(),this.match("=>")||this.expect("=>"),a={type:d,params:[],async:!1};else{var u=this.lookahead,l=[];if(this.match("..."))a=this.parseRestElement(l),this.expect(")"),this.match("=>")||this.expect("=>"),a={type:d,params:[a],async:!1};else{var g=!1;if(this.context.isBindingElement=!0,a=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var v=[];for(this.context.isAssignmentTarget=!1,v.push(a);this.lookahead.type!==2&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var x=0;x<v.length;x++)this.reinterpretExpressionAsPattern(v[x]);g=!0,a={type:d,params:v,async:!1}}else if(this.match("...")){this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),v.push(this.parseRestElement(l)),this.expect(")"),this.match("=>")||this.expect("=>"),this.context.isBindingElement=!1;for(var x=0;x<v.length;x++)this.reinterpretExpressionAsPattern(v[x]);g=!0,a={type:d,params:v,async:!1}}else v.push(this.inheritCoverGrammar(this.parseAssignmentExpression));if(g)break}g||(a=this.finalize(this.startNode(u),new s.SequenceExpression(v)))}if(!g){if(this.expect(")"),this.match("=>")&&(a.type===h.Syntax.Identifier&&a.name==="yield"&&(g=!0,a={type:d,params:[a],async:!1}),!g)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),a.type===h.Syntax.SequenceExpression)for(var x=0;x<a.expressions.length;x++)this.reinterpretExpressionAsPattern(a.expressions[x]);else this.reinterpretExpressionAsPattern(a);var w=a.type===h.Syntax.SequenceExpression?a.expressions:[a];a={type:d,params:w,async:!1}}this.context.isBindingElement=!1}}}return a},p.prototype.parseArguments=function(){this.expect("(");var a=[];if(!this.match(")"))for(;;){var u=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAssignmentExpression);if(a.push(u),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),a},p.prototype.isIdentifierName=function(a){return a.type===3||a.type===4||a.type===1||a.type===5},p.prototype.parseIdentifierName=function(){var a=this.createNode(),u=this.nextToken();return this.isIdentifierName(u)||this.throwUnexpectedToken(u),this.finalize(a,new s.Identifier(u.value))},p.prototype.parseNewExpression=function(){var a=this.createNode(),u=this.parseIdentifierName();i.assert(u.name==="new","New expression must start with `new`");var l;if(this.match("."))if(this.nextToken(),this.lookahead.type===3&&this.context.inFunctionBody&&this.lookahead.value==="target"){var g=this.parseIdentifierName();l=new s.MetaProperty(u,g)}else this.throwUnexpectedToken(this.lookahead);else{var v=this.isolateCoverGrammar(this.parseLeftHandSideExpression),x=this.match("(")?this.parseArguments():[];l=new s.NewExpression(v,x),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return this.finalize(a,l)},p.prototype.parseAsyncArgument=function(){var a=this.parseAssignmentExpression();return this.context.firstCoverInitializedNameError=null,a},p.prototype.parseAsyncArguments=function(){this.expect("(");var a=[];if(!this.match(")"))for(;;){var u=this.match("...")?this.parseSpreadElement():this.isolateCoverGrammar(this.parseAsyncArgument);if(a.push(u),this.match(")")||(this.expectCommaSeparator(),this.match(")")))break}return this.expect(")"),a},p.prototype.parseLeftHandSideExpressionAllowCall=function(){var a=this.lookahead,u=this.matchContextualKeyword("async"),l=this.context.allowIn;this.context.allowIn=!0;var g;for(this.matchKeyword("super")&&this.context.inFunctionBody?(g=this.createNode(),this.nextToken(),g=this.finalize(g,new s.Super),!this.match("(")&&!this.match(".")&&!this.match("[")&&this.throwUnexpectedToken(this.lookahead)):g=this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var v=this.parseIdentifierName();g=this.finalize(this.startNode(a),new s.StaticMemberExpression(g,v))}else if(this.match("(")){var x=u&&a.lineNumber===this.lookahead.lineNumber;this.context.isBindingElement=!1,this.context.isAssignmentTarget=!1;var w=x?this.parseAsyncArguments():this.parseArguments();if(g=this.finalize(this.startNode(a),new s.CallExpression(g,w)),x&&this.match("=>")){for(var C=0;C<w.length;++C)this.reinterpretExpressionAsPattern(w[C]);g={type:d,params:w,async:!0}}}else if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var v=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),g=this.finalize(this.startNode(a),new s.ComputedMemberExpression(g,v))}else if(this.lookahead.type===10&&this.lookahead.head){var S=this.parseTemplateLiteral();g=this.finalize(this.startNode(a),new s.TaggedTemplateExpression(g,S))}else break;return this.context.allowIn=l,g},p.prototype.parseSuper=function(){var a=this.createNode();return this.expectKeyword("super"),!this.match("[")&&!this.match(".")&&this.throwUnexpectedToken(this.lookahead),this.finalize(a,new s.Super)},p.prototype.parseLeftHandSideExpression=function(){i.assert(this.context.allowIn,"callee of new expression always allow in keyword.");for(var a=this.startNode(this.lookahead),u=this.matchKeyword("super")&&this.context.inFunctionBody?this.parseSuper():this.inheritCoverGrammar(this.matchKeyword("new")?this.parseNewExpression:this.parsePrimaryExpression);;)if(this.match("[")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect("[");var l=this.isolateCoverGrammar(this.parseExpression);this.expect("]"),u=this.finalize(a,new s.ComputedMemberExpression(u,l))}else if(this.match(".")){this.context.isBindingElement=!1,this.context.isAssignmentTarget=!0,this.expect(".");var l=this.parseIdentifierName();u=this.finalize(a,new s.StaticMemberExpression(u,l))}else if(this.lookahead.type===10&&this.lookahead.head){var g=this.parseTemplateLiteral();u=this.finalize(a,new s.TaggedTemplateExpression(u,g))}else break;return u},p.prototype.parseUpdateExpression=function(){var a,u=this.lookahead;if(this.match("++")||this.match("--")){var l=this.startNode(u),g=this.nextToken();a=this.inheritCoverGrammar(this.parseUnaryExpression),this.context.strict&&a.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(o.Messages.StrictLHSPrefix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment);var v=!0;a=this.finalize(l,new s.UpdateExpression(g.value,a,v)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else if(a=this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall),!this.hasLineTerminator&&this.lookahead.type===7&&(this.match("++")||this.match("--"))){this.context.strict&&a.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(a.name)&&this.tolerateError(o.Messages.StrictLHSPostfix),this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var x=this.nextToken().value,v=!1;a=this.finalize(this.startNode(u),new s.UpdateExpression(x,a,v))}return a},p.prototype.parseAwaitExpression=function(){var a=this.createNode();this.nextToken();var u=this.parseUnaryExpression();return this.finalize(a,new s.AwaitExpression(u))},p.prototype.parseUnaryExpression=function(){var a;if(this.match("+")||this.match("-")||this.match("~")||this.match("!")||this.matchKeyword("delete")||this.matchKeyword("void")||this.matchKeyword("typeof")){var u=this.startNode(this.lookahead),l=this.nextToken();a=this.inheritCoverGrammar(this.parseUnaryExpression),a=this.finalize(u,new s.UnaryExpression(l.value,a)),this.context.strict&&a.operator==="delete"&&a.argument.type===h.Syntax.Identifier&&this.tolerateError(o.Messages.StrictDelete),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}else this.context.await&&this.matchContextualKeyword("await")?a=this.parseAwaitExpression():a=this.parseUpdateExpression();return a},p.prototype.parseExponentiationExpression=function(){var a=this.lookahead,u=this.inheritCoverGrammar(this.parseUnaryExpression);if(u.type!==h.Syntax.UnaryExpression&&this.match("**")){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var l=u,g=this.isolateCoverGrammar(this.parseExponentiationExpression);u=this.finalize(this.startNode(a),new s.BinaryExpression("**",l,g))}return u},p.prototype.binaryPrecedence=function(a){var u=a.value,l;return a.type===7?l=this.operatorPrecedence[u]||0:a.type===4?l=u==="instanceof"||this.context.allowIn&&u==="in"?7:0:l=0,l},p.prototype.parseBinaryExpression=function(){var a=this.lookahead,u=this.inheritCoverGrammar(this.parseExponentiationExpression),l=this.lookahead,g=this.binaryPrecedence(l);if(g>0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var v=[a,this.lookahead],x=u,w=this.isolateCoverGrammar(this.parseExponentiationExpression),C=[x,l.value,w],S=[g];g=this.binaryPrecedence(this.lookahead),!(g<=0);){for(;C.length>2&&g<=S[S.length-1];){w=C.pop();var T=C.pop();S.pop(),x=C.pop(),v.pop();var P=this.startNode(v[v.length-1]);C.push(this.finalize(P,new s.BinaryExpression(T,x,w)))}C.push(this.nextToken().value),S.push(g),v.push(this.lookahead),C.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var B=C.length-1;u=C[B];for(var L=v.pop();B>1;){var z=v.pop(),G=L&&L.lineStart,P=this.startNode(z,G),T=C[B-1];u=this.finalize(P,new s.BinaryExpression(T,C[B-2],u)),B-=2,L=z}}return u},p.prototype.parseConditionalExpression=function(){var a=this.lookahead,u=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var l=this.context.allowIn;this.context.allowIn=!0;var g=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=l,this.expect(":");var v=this.isolateCoverGrammar(this.parseAssignmentExpression);u=this.finalize(this.startNode(a),new s.ConditionalExpression(u,g,v)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return u},p.prototype.checkPatternParam=function(a,u){switch(u.type){case h.Syntax.Identifier:this.validateParam(a,u,u.name);break;case h.Syntax.RestElement:this.checkPatternParam(a,u.argument);break;case h.Syntax.AssignmentPattern:this.checkPatternParam(a,u.left);break;case h.Syntax.ArrayPattern:for(var l=0;l<u.elements.length;l++)u.elements[l]!==null&&this.checkPatternParam(a,u.elements[l]);break;case h.Syntax.ObjectPattern:for(var l=0;l<u.properties.length;l++)this.checkPatternParam(a,u.properties[l].value);break;default:break}a.simple=a.simple&&u instanceof s.Identifier},p.prototype.reinterpretAsCoverFormalsList=function(a){var u=[a],l,g=!1;switch(a.type){case h.Syntax.Identifier:break;case d:u=a.params,g=a.async;break;default:return null}l={simple:!0,paramSet:{}};for(var v=0;v<u.length;++v){var x=u[v];x.type===h.Syntax.AssignmentPattern?x.right.type===h.Syntax.YieldExpression&&(x.right.argument&&this.throwUnexpectedToken(this.lookahead),x.right.type=h.Syntax.Identifier,x.right.name="yield",delete x.right.argument,delete x.right.delegate):g&&x.type===h.Syntax.Identifier&&x.name==="await"&&this.throwUnexpectedToken(this.lookahead),this.checkPatternParam(l,x),u[v]=x}if(this.context.strict||!this.context.allowYield)for(var v=0;v<u.length;++v){var x=u[v];x.type===h.Syntax.YieldExpression&&this.throwUnexpectedToken(this.lookahead)}if(l.message===o.Messages.StrictParamDupe){var w=this.context.strict?l.stricted:l.firstRestricted;this.throwUnexpectedToken(w,l.message)}return{simple:l.simple,params:u,stricted:l.stricted,firstRestricted:l.firstRestricted,message:l.message}},p.prototype.parseAssignmentExpression=function(){var a;if(!this.context.allowYield&&this.matchKeyword("yield"))a=this.parseYieldExpression();else{var u=this.lookahead,l=u;if(a=this.parseConditionalExpression(),l.type===3&&l.lineNumber===this.lookahead.lineNumber&&l.value==="async"&&(this.lookahead.type===3||this.matchKeyword("yield"))){var g=this.parsePrimaryExpression();this.reinterpretExpressionAsPattern(g),a={type:d,params:[g],async:!0}}if(a.type===d||this.match("=>")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var v=a.async,x=this.reinterpretAsCoverFormalsList(a);if(x){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var w=this.context.strict,C=this.context.allowStrictDirective;this.context.allowStrictDirective=x.simple;var S=this.context.allowYield,T=this.context.await;this.context.allowYield=!0,this.context.await=v;var P=this.startNode(u);this.expect("=>");var B=void 0;if(this.match("{")){var L=this.context.allowIn;this.context.allowIn=!0,B=this.parseFunctionSourceElements(),this.context.allowIn=L}else B=this.isolateCoverGrammar(this.parseAssignmentExpression);var z=B.type!==h.Syntax.BlockStatement;this.context.strict&&x.firstRestricted&&this.throwUnexpectedToken(x.firstRestricted,x.message),this.context.strict&&x.stricted&&this.tolerateUnexpectedToken(x.stricted,x.message),a=v?this.finalize(P,new s.AsyncArrowFunctionExpression(x.params,B,z)):this.finalize(P,new s.ArrowFunctionExpression(x.params,B,z)),this.context.strict=w,this.context.allowStrictDirective=C,this.context.allowYield=S,this.context.await=T}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(o.Messages.InvalidLHSInAssignment),this.context.strict&&a.type===h.Syntax.Identifier){var G=a;this.scanner.isRestrictedWord(G.name)&&this.tolerateUnexpectedToken(l,o.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(G.name)&&this.tolerateUnexpectedToken(l,o.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(a):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),l=this.nextToken();var pe=l.value,_t=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(this.startNode(u),new s.AssignmentExpression(pe,a,_t)),this.context.firstCoverInitializedNameError=null}}return a},p.prototype.parseExpression=function(){var a=this.lookahead,u=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var l=[];for(l.push(u);this.lookahead.type!==2&&this.match(",");)this.nextToken(),l.push(this.isolateCoverGrammar(this.parseAssignmentExpression));u=this.finalize(this.startNode(a),new s.SequenceExpression(l))}return u},p.prototype.parseStatementListItem=function(){var a;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,this.lookahead.type===4)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalExportDeclaration),a=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,o.Messages.IllegalImportDeclaration),a=this.parseImportDeclaration();break;case"const":a=this.parseLexicalDeclaration({inFor:!1});break;case"function":a=this.parseFunctionDeclaration();break;case"class":a=this.parseClassDeclaration();break;case"let":a=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:a=this.parseStatement();break}else a=this.parseStatement();return a},p.prototype.parseBlock=function(){var a=this.createNode();this.expect("{");for(var u=[];!this.match("}");)u.push(this.parseStatementListItem());return this.expect("}"),this.finalize(a,new s.BlockStatement(u))},p.prototype.parseLexicalBinding=function(a,u){var l=this.createNode(),g=[],v=this.parsePattern(g,a);this.context.strict&&v.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(v.name)&&this.tolerateError(o.Messages.StrictVarName);var x=null;return a==="const"?!this.matchKeyword("in")&&!this.matchContextualKeyword("of")&&(this.match("=")?(this.nextToken(),x=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(o.Messages.DeclarationMissingInitializer,"const")):(!u.inFor&&v.type!==h.Syntax.Identifier||this.match("="))&&(this.expect("="),x=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(l,new s.VariableDeclarator(v,x))},p.prototype.parseBindingList=function(a,u){for(var l=[this.parseLexicalBinding(a,u)];this.match(",");)this.nextToken(),l.push(this.parseLexicalBinding(a,u));return l},p.prototype.isLexicalDeclaration=function(){var a=this.scanner.saveState();this.scanner.scanComments();var u=this.scanner.lex();return this.scanner.restoreState(a),u.type===3||u.type===7&&u.value==="["||u.type===7&&u.value==="{"||u.type===4&&u.value==="let"||u.type===4&&u.value==="yield"},p.prototype.parseLexicalDeclaration=function(a){var u=this.createNode(),l=this.nextToken().value;i.assert(l==="let"||l==="const","Lexical declaration must be either let or const");var g=this.parseBindingList(l,a);return this.consumeSemicolon(),this.finalize(u,new s.VariableDeclaration(g,l))},p.prototype.parseBindingRestElement=function(a,u){var l=this.createNode();this.expect("...");var g=this.parsePattern(a,u);return this.finalize(l,new s.RestElement(g))},p.prototype.parseArrayPattern=function(a,u){var l=this.createNode();this.expect("[");for(var g=[];!this.match("]");)if(this.match(","))this.nextToken(),g.push(null);else{if(this.match("...")){g.push(this.parseBindingRestElement(a,u));break}else g.push(this.parsePatternWithDefault(a,u));this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(l,new s.ArrayPattern(g))},p.prototype.parsePropertyPattern=function(a,u){var l=this.createNode(),g=!1,v=!1,x=!1,w,C;if(this.lookahead.type===3){var S=this.lookahead;w=this.parseVariableIdentifier();var T=this.finalize(l,new s.Identifier(S.value));if(this.match("=")){a.push(S),v=!0,this.nextToken();var P=this.parseAssignmentExpression();C=this.finalize(this.startNode(S),new s.AssignmentPattern(T,P))}else this.match(":")?(this.expect(":"),C=this.parsePatternWithDefault(a,u)):(a.push(S),v=!0,C=T)}else g=this.match("["),w=this.parseObjectPropertyKey(),this.expect(":"),C=this.parsePatternWithDefault(a,u);return this.finalize(l,new s.Property("init",w,g,C,x,v))},p.prototype.parseObjectPattern=function(a,u){var l=this.createNode(),g=[];for(this.expect("{");!this.match("}");)g.push(this.parsePropertyPattern(a,u)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(l,new s.ObjectPattern(g))},p.prototype.parsePattern=function(a,u){var l;return this.match("[")?l=this.parseArrayPattern(a,u):this.match("{")?l=this.parseObjectPattern(a,u):(this.matchKeyword("let")&&(u==="const"||u==="let")&&this.tolerateUnexpectedToken(this.lookahead,o.Messages.LetInLexicalBinding),a.push(this.lookahead),l=this.parseVariableIdentifier(u)),l},p.prototype.parsePatternWithDefault=function(a,u){var l=this.lookahead,g=this.parsePattern(a,u);if(this.match("=")){this.nextToken();var v=this.context.allowYield;this.context.allowYield=!0;var x=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=v,g=this.finalize(this.startNode(l),new s.AssignmentPattern(g,x))}return g},p.prototype.parseVariableIdentifier=function(a){var u=this.createNode(),l=this.nextToken();return l.type===4&&l.value==="yield"?this.context.strict?this.tolerateUnexpectedToken(l,o.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(l):l.type!==3?this.context.strict&&l.type===4&&this.scanner.isStrictModeReservedWord(l.value)?this.tolerateUnexpectedToken(l,o.Messages.StrictReservedWord):(this.context.strict||l.value!=="let"||a!=="var")&&this.throwUnexpectedToken(l):(this.context.isModule||this.context.await)&&l.type===3&&l.value==="await"&&this.tolerateUnexpectedToken(l),this.finalize(u,new s.Identifier(l.value))},p.prototype.parseVariableDeclaration=function(a){var u=this.createNode(),l=[],g=this.parsePattern(l,"var");this.context.strict&&g.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(g.name)&&this.tolerateError(o.Messages.StrictVarName);var v=null;return this.match("=")?(this.nextToken(),v=this.isolateCoverGrammar(this.parseAssignmentExpression)):g.type!==h.Syntax.Identifier&&!a.inFor&&this.expect("="),this.finalize(u,new s.VariableDeclarator(g,v))},p.prototype.parseVariableDeclarationList=function(a){var u={inFor:a.inFor},l=[];for(l.push(this.parseVariableDeclaration(u));this.match(",");)this.nextToken(),l.push(this.parseVariableDeclaration(u));return l},p.prototype.parseVariableStatement=function(){var a=this.createNode();this.expectKeyword("var");var u=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(a,new s.VariableDeclaration(u,"var"))},p.prototype.parseEmptyStatement=function(){var a=this.createNode();return this.expect(";"),this.finalize(a,new s.EmptyStatement)},p.prototype.parseExpressionStatement=function(){var a=this.createNode(),u=this.parseExpression();return this.consumeSemicolon(),this.finalize(a,new s.ExpressionStatement(u))},p.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(o.Messages.StrictFunction),this.parseStatement()},p.prototype.parseIfStatement=function(){var a=this.createNode(),u,l=null;this.expectKeyword("if"),this.expect("(");var g=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),u=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),u=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),l=this.parseIfClause())),this.finalize(a,new s.IfStatement(g,u,l))},p.prototype.parseDoWhileStatement=function(){var a=this.createNode();this.expectKeyword("do");var u=this.context.inIteration;this.context.inIteration=!0;var l=this.parseStatement();this.context.inIteration=u,this.expectKeyword("while"),this.expect("(");var g=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(a,new s.DoWhileStatement(l,g))},p.prototype.parseWhileStatement=function(){var a=this.createNode(),u;this.expectKeyword("while"),this.expect("(");var l=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),u=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var g=this.context.inIteration;this.context.inIteration=!0,u=this.parseStatement(),this.context.inIteration=g}return this.finalize(a,new s.WhileStatement(l,u))},p.prototype.parseForStatement=function(){var a=null,u=null,l=null,g=!0,v,x,w=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){a=this.createNode(),this.nextToken();var C=this.context.allowIn;this.context.allowIn=!1;var S=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=C,S.length===1&&this.matchKeyword("in")){var T=S[0];T.init&&(T.id.type===h.Syntax.ArrayPattern||T.id.type===h.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(o.Messages.ForInOfLoopInitializer,"for-in"),a=this.finalize(a,new s.VariableDeclaration(S,"var")),this.nextToken(),v=a,x=this.parseExpression(),a=null}else S.length===1&&S[0].init===null&&this.matchContextualKeyword("of")?(a=this.finalize(a,new s.VariableDeclaration(S,"var")),this.nextToken(),v=a,x=this.parseAssignmentExpression(),a=null,g=!1):(a=this.finalize(a,new s.VariableDeclaration(S,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){a=this.createNode();var P=this.nextToken().value;if(!this.context.strict&&this.lookahead.value==="in")a=this.finalize(a,new s.Identifier(P)),this.nextToken(),v=a,x=this.parseExpression(),a=null;else{var C=this.context.allowIn;this.context.allowIn=!1;var S=this.parseBindingList(P,{inFor:!0});this.context.allowIn=C,S.length===1&&S[0].init===null&&this.matchKeyword("in")?(a=this.finalize(a,new s.VariableDeclaration(S,P)),this.nextToken(),v=a,x=this.parseExpression(),a=null):S.length===1&&S[0].init===null&&this.matchContextualKeyword("of")?(a=this.finalize(a,new s.VariableDeclaration(S,P)),this.nextToken(),v=a,x=this.parseAssignmentExpression(),a=null,g=!1):(this.consumeSemicolon(),a=this.finalize(a,new s.VariableDeclaration(S,P)))}}else{var B=this.lookahead,C=this.context.allowIn;if(this.context.allowIn=!1,a=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=C,this.matchKeyword("in"))(!this.context.isAssignmentTarget||a.type===h.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(a),v=a,x=this.parseExpression(),a=null;else if(this.matchContextualKeyword("of"))(!this.context.isAssignmentTarget||a.type===h.Syntax.AssignmentExpression)&&this.tolerateError(o.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(a),v=a,x=this.parseAssignmentExpression(),a=null,g=!1;else{if(this.match(",")){for(var L=[a];this.match(",");)this.nextToken(),L.push(this.isolateCoverGrammar(this.parseAssignmentExpression));a=this.finalize(this.startNode(B),new s.SequenceExpression(L))}this.expect(";")}}typeof v>"u"&&(this.match(";")||(u=this.parseExpression()),this.expect(";"),this.match(")")||(l=this.parseExpression()));var z;if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),z=this.finalize(this.createNode(),new s.EmptyStatement);else{this.expect(")");var G=this.context.inIteration;this.context.inIteration=!0,z=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=G}return typeof v>"u"?this.finalize(w,new s.ForStatement(a,u,l,z)):g?this.finalize(w,new s.ForInStatement(v,x,z)):this.finalize(w,new s.ForOfStatement(v,x,z))},p.prototype.parseContinueStatement=function(){var a=this.createNode();this.expectKeyword("continue");var u=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var l=this.parseVariableIdentifier();u=l;var g="$"+l.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,g)||this.throwError(o.Messages.UnknownLabel,l.name)}return this.consumeSemicolon(),u===null&&!this.context.inIteration&&this.throwError(o.Messages.IllegalContinue),this.finalize(a,new s.ContinueStatement(u))},p.prototype.parseBreakStatement=function(){var a=this.createNode();this.expectKeyword("break");var u=null;if(this.lookahead.type===3&&!this.hasLineTerminator){var l=this.parseVariableIdentifier(),g="$"+l.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,g)||this.throwError(o.Messages.UnknownLabel,l.name),u=l}return this.consumeSemicolon(),u===null&&!this.context.inIteration&&!this.context.inSwitch&&this.throwError(o.Messages.IllegalBreak),this.finalize(a,new s.BreakStatement(u))},p.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(o.Messages.IllegalReturn);var a=this.createNode();this.expectKeyword("return");var u=!this.match(";")&&!this.match("}")&&!this.hasLineTerminator&&this.lookahead.type!==2||this.lookahead.type===8||this.lookahead.type===10,l=u?this.parseExpression():null;return this.consumeSemicolon(),this.finalize(a,new s.ReturnStatement(l))},p.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(o.Messages.StrictModeWith);var a=this.createNode(),u;this.expectKeyword("with"),this.expect("(");var l=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),u=this.finalize(this.createNode(),new s.EmptyStatement)):(this.expect(")"),u=this.parseStatement()),this.finalize(a,new s.WithStatement(l,u))},p.prototype.parseSwitchCase=function(){var a=this.createNode(),u;this.matchKeyword("default")?(this.nextToken(),u=null):(this.expectKeyword("case"),u=this.parseExpression()),this.expect(":");for(var l=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)l.push(this.parseStatementListItem());return this.finalize(a,new s.SwitchCase(u,l))},p.prototype.parseSwitchStatement=function(){var a=this.createNode();this.expectKeyword("switch"),this.expect("(");var u=this.parseExpression();this.expect(")");var l=this.context.inSwitch;this.context.inSwitch=!0;var g=[],v=!1;for(this.expect("{");!this.match("}");){var x=this.parseSwitchCase();x.test===null&&(v&&this.throwError(o.Messages.MultipleDefaultsInSwitch),v=!0),g.push(x)}return this.expect("}"),this.context.inSwitch=l,this.finalize(a,new s.SwitchStatement(u,g))},p.prototype.parseLabelledStatement=function(){var a=this.createNode(),u=this.parseExpression(),l;if(u.type===h.Syntax.Identifier&&this.match(":")){this.nextToken();var g=u,v="$"+g.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,v)&&this.throwError(o.Messages.Redeclaration,"Label",g.name),this.context.labelSet[v]=!0;var x=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),x=this.parseClassDeclaration();else if(this.matchKeyword("function")){var w=this.lookahead,C=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(w,o.Messages.StrictFunction):C.generator&&this.tolerateUnexpectedToken(w,o.Messages.GeneratorInLegacyContext),x=C}else x=this.parseStatement();delete this.context.labelSet[v],l=new s.LabeledStatement(g,x)}else this.consumeSemicolon(),l=new s.ExpressionStatement(u);return this.finalize(a,l)},p.prototype.parseThrowStatement=function(){var a=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(o.Messages.NewlineAfterThrow);var u=this.parseExpression();return this.consumeSemicolon(),this.finalize(a,new s.ThrowStatement(u))},p.prototype.parseCatchClause=function(){var a=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var u=[],l=this.parsePattern(u),g={},v=0;v<u.length;v++){var x="$"+u[v].value;Object.prototype.hasOwnProperty.call(g,x)&&this.tolerateError(o.Messages.DuplicateBinding,u[v].value),g[x]=!0}this.context.strict&&l.type===h.Syntax.Identifier&&this.scanner.isRestrictedWord(l.name)&&this.tolerateError(o.Messages.StrictCatchVariable),this.expect(")");var w=this.parseBlock();return this.finalize(a,new s.CatchClause(l,w))},p.prototype.parseFinallyClause=function(){return this.expectKeyword("finally"),this.parseBlock()},p.prototype.parseTryStatement=function(){var a=this.createNode();this.expectKeyword("try");var u=this.parseBlock(),l=this.matchKeyword("catch")?this.parseCatchClause():null,g=this.matchKeyword("finally")?this.parseFinallyClause():null;return!l&&!g&&this.throwError(o.Messages.NoCatchOrFinally),this.finalize(a,new s.TryStatement(u,l,g))},p.prototype.parseDebuggerStatement=function(){var a=this.createNode();return this.expectKeyword("debugger"),this.consumeSemicolon(),this.finalize(a,new s.DebuggerStatement)},p.prototype.parseStatement=function(){var a;switch(this.lookahead.type){case 1:case 5:case 6:case 8:case 10:case 9:a=this.parseExpressionStatement();break;case 7:var u=this.lookahead.value;u==="{"?a=this.parseBlock():u==="("?a=this.parseExpressionStatement():u===";"?a=this.parseEmptyStatement():a=this.parseExpressionStatement();break;case 3:a=this.matchAsyncFunction()?this.parseFunctionDeclaration():this.parseLabelledStatement();break;case 4:switch(this.lookahead.value){case"break":a=this.parseBreakStatement();break;case"continue":a=this.parseContinueStatement();break;case"debugger":a=this.parseDebuggerStatement();break;case"do":a=this.parseDoWhileStatement();break;case"for":a=this.parseForStatement();break;case"function":a=this.parseFunctionDeclaration();break;case"if":a=this.parseIfStatement();break;case"return":a=this.parseReturnStatement();break;case"switch":a=this.parseSwitchStatement();break;case"throw":a=this.parseThrowStatement();break;case"try":a=this.parseTryStatement();break;case"var":a=this.parseVariableStatement();break;case"while":a=this.parseWhileStatement();break;case"with":a=this.parseWithStatement();break;default:a=this.parseExpressionStatement();break}break;default:a=this.throwUnexpectedToken(this.lookahead)}return a},p.prototype.parseFunctionSourceElements=function(){var a=this.createNode();this.expect("{");var u=this.parseDirectivePrologues(),l=this.context.labelSet,g=this.context.inIteration,v=this.context.inSwitch,x=this.context.inFunctionBody;for(this.context.labelSet={},this.context.inIteration=!1,this.context.inSwitch=!1,this.context.inFunctionBody=!0;this.lookahead.type!==2&&!this.match("}");)u.push(this.parseStatementListItem());return this.expect("}"),this.context.labelSet=l,this.context.inIteration=g,this.context.inSwitch=v,this.context.inFunctionBody=x,this.finalize(a,new s.BlockStatement(u))},p.prototype.validateParam=function(a,u,l){var g="$"+l;this.context.strict?(this.scanner.isRestrictedWord(l)&&(a.stricted=u,a.message=o.Messages.StrictParamName),Object.prototype.hasOwnProperty.call(a.paramSet,g)&&(a.stricted=u,a.message=o.Messages.StrictParamDupe)):a.firstRestricted||(this.scanner.isRestrictedWord(l)?(a.firstRestricted=u,a.message=o.Messages.StrictParamName):this.scanner.isStrictModeReservedWord(l)?(a.firstRestricted=u,a.message=o.Messages.StrictReservedWord):Object.prototype.hasOwnProperty.call(a.paramSet,g)&&(a.stricted=u,a.message=o.Messages.StrictParamDupe)),typeof Object.defineProperty=="function"?Object.defineProperty(a.paramSet,g,{value:!0,enumerable:!0,writable:!0,configurable:!0}):a.paramSet[g]=!0},p.prototype.parseRestElement=function(a){var u=this.createNode();this.expect("...");var l=this.parsePattern(a);return this.match("=")&&this.throwError(o.Messages.DefaultRestParameter),this.match(")")||this.throwError(o.Messages.ParameterAfterRestParameter),this.finalize(u,new s.RestElement(l))},p.prototype.parseFormalParameter=function(a){for(var u=[],l=this.match("...")?this.parseRestElement(u):this.parsePatternWithDefault(u),g=0;g<u.length;g++)this.validateParam(a,u[g],u[g].value);a.simple=a.simple&&l instanceof s.Identifier,a.params.push(l)},p.prototype.parseFormalParameters=function(a){var u;if(u={simple:!0,params:[],firstRestricted:a},this.expect("("),!this.match(")"))for(u.paramSet={};this.lookahead.type!==2&&(this.parseFormalParameter(u),!(this.match(")")||(this.expect(","),this.match(")")))););return this.expect(")"),{simple:u.simple,params:u.params,stricted:u.stricted,firstRestricted:u.firstRestricted,message:u.message}},p.prototype.matchAsyncFunction=function(){var a=this.matchContextualKeyword("async");if(a){var u=this.scanner.saveState();this.scanner.scanComments();var l=this.scanner.lex();this.scanner.restoreState(u),a=u.lineNumber===l.lineNumber&&l.type===4&&l.value==="function"}return a},p.prototype.parseFunctionDeclaration=function(a){var u=this.createNode(),l=this.matchContextualKeyword("async");l&&this.nextToken(),this.expectKeyword("function");var g=l?!1:this.match("*");g&&this.nextToken();var v,x=null,w=null;if(!a||!this.match("(")){var C=this.lookahead;x=this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(C.value)&&this.tolerateUnexpectedToken(C,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(C.value)?(w=C,v=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(C.value)&&(w=C,v=o.Messages.StrictReservedWord)}var S=this.context.await,T=this.context.allowYield;this.context.await=l,this.context.allowYield=!g;var P=this.parseFormalParameters(w),B=P.params,L=P.stricted;w=P.firstRestricted,P.message&&(v=P.message);var z=this.context.strict,G=this.context.allowStrictDirective;this.context.allowStrictDirective=P.simple;var pe=this.parseFunctionSourceElements();return this.context.strict&&w&&this.throwUnexpectedToken(w,v),this.context.strict&&L&&this.tolerateUnexpectedToken(L,v),this.context.strict=z,this.context.allowStrictDirective=G,this.context.await=S,this.context.allowYield=T,l?this.finalize(u,new s.AsyncFunctionDeclaration(x,B,pe)):this.finalize(u,new s.FunctionDeclaration(x,B,pe,g))},p.prototype.parseFunctionExpression=function(){var a=this.createNode(),u=this.matchContextualKeyword("async");u&&this.nextToken(),this.expectKeyword("function");var l=u?!1:this.match("*");l&&this.nextToken();var g,v=null,x,w=this.context.await,C=this.context.allowYield;if(this.context.await=u,this.context.allowYield=!l,!this.match("(")){var S=this.lookahead;v=!this.context.strict&&!l&&this.matchKeyword("yield")?this.parseIdentifierName():this.parseVariableIdentifier(),this.context.strict?this.scanner.isRestrictedWord(S.value)&&this.tolerateUnexpectedToken(S,o.Messages.StrictFunctionName):this.scanner.isRestrictedWord(S.value)?(x=S,g=o.Messages.StrictFunctionName):this.scanner.isStrictModeReservedWord(S.value)&&(x=S,g=o.Messages.StrictReservedWord)}var T=this.parseFormalParameters(x),P=T.params,B=T.stricted;x=T.firstRestricted,T.message&&(g=T.message);var L=this.context.strict,z=this.context.allowStrictDirective;this.context.allowStrictDirective=T.simple;var G=this.parseFunctionSourceElements();return this.context.strict&&x&&this.throwUnexpectedToken(x,g),this.context.strict&&B&&this.tolerateUnexpectedToken(B,g),this.context.strict=L,this.context.allowStrictDirective=z,this.context.await=w,this.context.allowYield=C,u?this.finalize(a,new s.AsyncFunctionExpression(v,P,G)):this.finalize(a,new s.FunctionExpression(v,P,G,l))},p.prototype.parseDirective=function(){var a=this.lookahead,u=this.createNode(),l=this.parseExpression(),g=l.type===h.Syntax.Literal?this.getTokenRaw(a).slice(1,-1):null;return this.consumeSemicolon(),this.finalize(u,g?new s.Directive(l,g):new s.ExpressionStatement(l))},p.prototype.parseDirectivePrologues=function(){for(var a=null,u=[];;){var l=this.lookahead;if(l.type!==8)break;var g=this.parseDirective();u.push(g);var v=g.directive;if(typeof v!="string")break;v==="use strict"?(this.context.strict=!0,a&&this.tolerateUnexpectedToken(a,o.Messages.StrictOctalLiteral),this.context.allowStrictDirective||this.tolerateUnexpectedToken(l,o.Messages.IllegalLanguageModeDirective)):!a&&l.octal&&(a=l)}return u},p.prototype.qualifiedPropertyName=function(a){switch(a.type){case 3:case 8:case 1:case 5:case 6:case 4:return!0;case 7:return a.value==="[";default:break}return!1},p.prototype.parseGetterMethod=function(){var a=this.createNode(),u=!1,l=this.context.allowYield;this.context.allowYield=!u;var g=this.parseFormalParameters();g.params.length>0&&this.tolerateError(o.Messages.BadGetterArity);var v=this.parsePropertyMethod(g);return this.context.allowYield=l,this.finalize(a,new s.FunctionExpression(null,g.params,v,u))},p.prototype.parseSetterMethod=function(){var a=this.createNode(),u=!1,l=this.context.allowYield;this.context.allowYield=!u;var g=this.parseFormalParameters();g.params.length!==1?this.tolerateError(o.Messages.BadSetterArity):g.params[0]instanceof s.RestElement&&this.tolerateError(o.Messages.BadSetterRestParameter);var v=this.parsePropertyMethod(g);return this.context.allowYield=l,this.finalize(a,new s.FunctionExpression(null,g.params,v,u))},p.prototype.parseGeneratorMethod=function(){var a=this.createNode(),u=!0,l=this.context.allowYield;this.context.allowYield=!0;var g=this.parseFormalParameters();this.context.allowYield=!1;var v=this.parsePropertyMethod(g);return this.context.allowYield=l,this.finalize(a,new s.FunctionExpression(null,g.params,v,u))},p.prototype.isStartOfExpression=function(){var a=!0,u=this.lookahead.value;switch(this.lookahead.type){case 7:a=u==="["||u==="("||u==="{"||u==="+"||u==="-"||u==="!"||u==="~"||u==="++"||u==="--"||u==="/"||u==="/=";break;case 4:a=u==="class"||u==="delete"||u==="function"||u==="let"||u==="new"||u==="super"||u==="this"||u==="typeof"||u==="void"||u==="yield";break;default:break}return a},p.prototype.parseYieldExpression=function(){var a=this.createNode();this.expectKeyword("yield");var u=null,l=!1;if(!this.hasLineTerminator){var g=this.context.allowYield;this.context.allowYield=!1,l=this.match("*"),l?(this.nextToken(),u=this.parseAssignmentExpression()):this.isStartOfExpression()&&(u=this.parseAssignmentExpression()),this.context.allowYield=g}return this.finalize(a,new s.YieldExpression(u,l))},p.prototype.parseClassElement=function(a){var u=this.lookahead,l=this.createNode(),g="",v=null,x=null,w=!1,C=!1,S=!1,T=!1;if(this.match("*"))this.nextToken();else{w=this.match("["),v=this.parseObjectPropertyKey();var P=v;if(P.name==="static"&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(u=this.lookahead,S=!0,w=this.match("["),this.match("*")?this.nextToken():v=this.parseObjectPropertyKey()),u.type===3&&!this.hasLineTerminator&&u.value==="async"){var B=this.lookahead.value;B!==":"&&B!=="("&&B!=="*"&&(T=!0,u=this.lookahead,v=this.parseObjectPropertyKey(),u.type===3&&u.value==="constructor"&&this.tolerateUnexpectedToken(u,o.Messages.ConstructorIsAsync))}}var L=this.qualifiedPropertyName(this.lookahead);return u.type===3?u.value==="get"&&L?(g="get",w=this.match("["),v=this.parseObjectPropertyKey(),this.context.allowYield=!1,x=this.parseGetterMethod()):u.value==="set"&&L&&(g="set",w=this.match("["),v=this.parseObjectPropertyKey(),x=this.parseSetterMethod()):u.type===7&&u.value==="*"&&L&&(g="init",w=this.match("["),v=this.parseObjectPropertyKey(),x=this.parseGeneratorMethod(),C=!0),!g&&v&&this.match("(")&&(g="init",x=T?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),C=!0),g||this.throwUnexpectedToken(this.lookahead),g==="init"&&(g="method"),w||(S&&this.isPropertyKey(v,"prototype")&&this.throwUnexpectedToken(u,o.Messages.StaticPrototype),!S&&this.isPropertyKey(v,"constructor")&&((g!=="method"||!C||x&&x.generator)&&this.throwUnexpectedToken(u,o.Messages.ConstructorSpecialMethod),a.value?this.throwUnexpectedToken(u,o.Messages.DuplicateConstructor):a.value=!0,g="constructor")),this.finalize(l,new s.MethodDefinition(v,w,x,g,S))},p.prototype.parseClassElementList=function(){var a=[],u={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():a.push(this.parseClassElement(u));return this.expect("}"),a},p.prototype.parseClassBody=function(){var a=this.createNode(),u=this.parseClassElementList();return this.finalize(a,new s.ClassBody(u))},p.prototype.parseClassDeclaration=function(a){var u=this.createNode(),l=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var g=a&&this.lookahead.type!==3?null:this.parseVariableIdentifier(),v=null;this.matchKeyword("extends")&&(this.nextToken(),v=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var x=this.parseClassBody();return this.context.strict=l,this.finalize(u,new s.ClassDeclaration(g,v,x))},p.prototype.parseClassExpression=function(){var a=this.createNode(),u=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var l=this.lookahead.type===3?this.parseVariableIdentifier():null,g=null;this.matchKeyword("extends")&&(this.nextToken(),g=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var v=this.parseClassBody();return this.context.strict=u,this.finalize(a,new s.ClassExpression(l,g,v))},p.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var a=this.createNode(),u=this.parseDirectivePrologues();this.lookahead.type!==2;)u.push(this.parseStatementListItem());return this.finalize(a,new s.Module(u))},p.prototype.parseScript=function(){for(var a=this.createNode(),u=this.parseDirectivePrologues();this.lookahead.type!==2;)u.push(this.parseStatementListItem());return this.finalize(a,new s.Script(u))},p.prototype.parseModuleSpecifier=function(){var a=this.createNode();this.lookahead.type!==8&&this.throwError(o.Messages.InvalidModuleSpecifier);var u=this.nextToken(),l=this.getTokenRaw(u);return this.finalize(a,new s.Literal(u.value,l))},p.prototype.parseImportSpecifier=function(){var a=this.createNode(),u,l;return this.lookahead.type===3?(u=this.parseVariableIdentifier(),l=u,this.matchContextualKeyword("as")&&(this.nextToken(),l=this.parseVariableIdentifier())):(u=this.parseIdentifierName(),l=u,this.matchContextualKeyword("as")?(this.nextToken(),l=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(a,new s.ImportSpecifier(l,u))},p.prototype.parseNamedImports=function(){this.expect("{");for(var a=[];!this.match("}");)a.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),a},p.prototype.parseImportDefaultSpecifier=function(){var a=this.createNode(),u=this.parseIdentifierName();return this.finalize(a,new s.ImportDefaultSpecifier(u))},p.prototype.parseImportNamespaceSpecifier=function(){var a=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(o.Messages.NoAsAfterImportNamespace),this.nextToken();var u=this.parseIdentifierName();return this.finalize(a,new s.ImportNamespaceSpecifier(u))},p.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalImportDeclaration);var a=this.createNode();this.expectKeyword("import");var u,l=[];if(this.lookahead.type===8)u=this.parseModuleSpecifier();else{if(this.match("{")?l=l.concat(this.parseNamedImports()):this.match("*")?l.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(l.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?l.push(this.parseImportNamespaceSpecifier()):this.match("{")?l=l.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}this.nextToken(),u=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(a,new s.ImportDeclaration(l,u))},p.prototype.parseExportSpecifier=function(){var a=this.createNode(),u=this.parseIdentifierName(),l=u;return this.matchContextualKeyword("as")&&(this.nextToken(),l=this.parseIdentifierName()),this.finalize(a,new s.ExportSpecifier(u,l))},p.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(o.Messages.IllegalExportDeclaration);var a=this.createNode();this.expectKeyword("export");var u;if(this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var l=this.parseFunctionDeclaration(!0);u=this.finalize(a,new s.ExportDefaultDeclaration(l))}else if(this.matchKeyword("class")){var l=this.parseClassDeclaration(!0);u=this.finalize(a,new s.ExportDefaultDeclaration(l))}else if(this.matchContextualKeyword("async")){var l=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression();u=this.finalize(a,new s.ExportDefaultDeclaration(l))}else{this.matchContextualKeyword("from")&&this.throwError(o.Messages.UnexpectedToken,this.lookahead.value);var l=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression();this.consumeSemicolon(),u=this.finalize(a,new s.ExportDefaultDeclaration(l))}else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}this.nextToken();var v=this.parseModuleSpecifier();this.consumeSemicolon(),u=this.finalize(a,new s.ExportAllDeclaration(v))}else if(this.lookahead.type===4){var l=void 0;switch(this.lookahead.value){case"let":case"const":l=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":l=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}u=this.finalize(a,new s.ExportNamedDeclaration(l,[],null))}else if(this.matchAsyncFunction()){var l=this.parseFunctionDeclaration();u=this.finalize(a,new s.ExportNamedDeclaration(l,[],null))}else{var x=[],w=null,C=!1;for(this.expect("{");!this.match("}");)C=C||this.matchKeyword("default"),x.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");if(this.expect("}"),this.matchContextualKeyword("from"))this.nextToken(),w=this.parseModuleSpecifier(),this.consumeSemicolon();else if(C){var g=this.lookahead.value?o.Messages.UnexpectedToken:o.Messages.MissingFromClause;this.throwError(g,this.lookahead.value)}else this.consumeSemicolon();u=this.finalize(a,new s.ExportNamedDeclaration(null,x,w))}return u},p})();t.Parser=f},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(i,n){if(!i)throw new Error("ASSERT: "+n)}t.assert=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(function(){function i(){this.errors=[],this.tolerant=!1}return i.prototype.recordError=function(n){this.errors.push(n)},i.prototype.tolerate=function(n){if(this.tolerant)this.recordError(n);else throw n},i.prototype.constructError=function(n,o){var s=new Error(n);try{throw s}catch(c){Object.create&&Object.defineProperty&&(s=Object.create(c),Object.defineProperty(s,"column",{value:o}))}return s},i.prototype.createError=function(n,o,s,c){var h="Line "+o+": "+c,m=this.constructError(h,s);return m.index=n,m.lineNumber=o,m.description=c,m},i.prototype.throwError=function(n,o,s,c){throw this.createError(n,o,s,c)},i.prototype.tolerateError=function(n,o,s,c){var h=this.createError(n,o,s,c);if(this.tolerant)this.recordError(h);else throw h},i})();t.ErrorHandler=r},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(9),n=r(4),o=r(11);function s(m){return"0123456789abcdef".indexOf(m.toLowerCase())}function c(m){return"01234567".indexOf(m)}var h=(function(){function m(d,f){this.source=d,this.errorHandler=f,this.trackComment=!1,this.isModule=!1,this.length=d.length,this.index=0,this.lineNumber=d.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return m.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},m.prototype.restoreState=function(d){this.index=d.index,this.lineNumber=d.lineNumber,this.lineStart=d.lineStart},m.prototype.eof=function(){return this.index>=this.length},m.prototype.throwUnexpectedToken=function(d){return d===void 0&&(d=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,d)},m.prototype.tolerateUnexpectedToken=function(d){d===void 0&&(d=o.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,d)},m.prototype.skipSingleLineComment=function(d){var f=[],p,a;for(this.trackComment&&(f=[],p=this.index-d,a={start:{line:this.lineNumber,column:this.index-this.lineStart-d},end:{}});!this.eof();){var u=this.source.charCodeAt(this.index);if(++this.index,n.Character.isLineTerminator(u)){if(this.trackComment){a.end={line:this.lineNumber,column:this.index-this.lineStart-1};var l={multiLine:!1,slice:[p+d,this.index-1],range:[p,this.index-1],loc:a};f.push(l)}return u===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,f}}if(this.trackComment){a.end={line:this.lineNumber,column:this.index-this.lineStart};var l={multiLine:!1,slice:[p+d,this.index],range:[p,this.index],loc:a};f.push(l)}return f},m.prototype.skipMultiLineComment=function(){var d=[],f,p;for(this.trackComment&&(d=[],f=this.index-2,p={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var a=this.source.charCodeAt(this.index);if(n.Character.isLineTerminator(a))a===13&&this.source.charCodeAt(this.index+1)===10&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(a===42){if(this.source.charCodeAt(this.index+1)===47){if(this.index+=2,this.trackComment){p.end={line:this.lineNumber,column:this.index-this.lineStart};var u={multiLine:!0,slice:[f+2,this.index-2],range:[f,this.index],loc:p};d.push(u)}return d}++this.index}else++this.index}if(this.trackComment){p.end={line:this.lineNumber,column:this.index-this.lineStart};var u={multiLine:!0,slice:[f+2,this.index],range:[f,this.index],loc:p};d.push(u)}return this.tolerateUnexpectedToken(),d},m.prototype.scanComments=function(){var d;this.trackComment&&(d=[]);for(var f=this.index===0;!this.eof();){var p=this.source.charCodeAt(this.index);if(n.Character.isWhiteSpace(p))++this.index;else if(n.Character.isLineTerminator(p))++this.index,p===13&&this.source.charCodeAt(this.index)===10&&++this.index,++this.lineNumber,this.lineStart=this.index,f=!0;else if(p===47)if(p=this.source.charCodeAt(this.index+1),p===47){this.index+=2;var a=this.skipSingleLineComment(2);this.trackComment&&(d=d.concat(a)),f=!0}else if(p===42){this.index+=2;var a=this.skipMultiLineComment();this.trackComment&&(d=d.concat(a))}else break;else if(f&&p===45)if(this.source.charCodeAt(this.index+1)===45&&this.source.charCodeAt(this.index+2)===62){this.index+=3;var a=this.skipSingleLineComment(3);this.trackComment&&(d=d.concat(a))}else break;else if(p===60&&!this.isModule)if(this.source.slice(this.index+1,this.index+4)==="!--"){this.index+=4;var a=this.skipSingleLineComment(4);this.trackComment&&(d=d.concat(a))}else break;else break}return d},m.prototype.isFutureReservedWord=function(d){switch(d){case"enum":case"export":case"import":case"super":return!0;default:return!1}},m.prototype.isStrictModeReservedWord=function(d){switch(d){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},m.prototype.isRestrictedWord=function(d){return d==="eval"||d==="arguments"},m.prototype.isKeyword=function(d){switch(d.length){case 2:return d==="if"||d==="in"||d==="do";case 3:return d==="var"||d==="for"||d==="new"||d==="try"||d==="let";case 4:return d==="this"||d==="else"||d==="case"||d==="void"||d==="with"||d==="enum";case 5:return d==="while"||d==="break"||d==="catch"||d==="throw"||d==="const"||d==="yield"||d==="class"||d==="super";case 6:return d==="return"||d==="typeof"||d==="delete"||d==="switch"||d==="export"||d==="import";case 7:return d==="default"||d==="finally"||d==="extends";case 8:return d==="function"||d==="continue"||d==="debugger";case 10:return d==="instanceof";default:return!1}},m.prototype.codePointAt=function(d){var f=this.source.charCodeAt(d);if(f>=55296&&f<=56319){var p=this.source.charCodeAt(d+1);if(p>=56320&&p<=57343){var a=f;f=(a-55296)*1024+p-56320+65536}}return f},m.prototype.scanHexEscape=function(d){for(var f=d==="u"?4:2,p=0,a=0;a<f;++a)if(!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index)))p=p*16+s(this.source[this.index++]);else return null;return String.fromCharCode(p)},m.prototype.scanUnicodeCodePointEscape=function(){var d=this.source[this.index],f=0;for(d==="}"&&this.throwUnexpectedToken();!this.eof()&&(d=this.source[this.index++],!!n.Character.isHexDigit(d.charCodeAt(0)));)f=f*16+s(d);return(f>1114111||d!=="}")&&this.throwUnexpectedToken(),n.Character.fromCodePoint(f)},m.prototype.getIdentifier=function(){for(var d=this.index++;!this.eof();){var f=this.source.charCodeAt(this.index);if(f===92)return this.index=d,this.getComplexIdentifier();if(f>=55296&&f<57343)return this.index=d,this.getComplexIdentifier();if(n.Character.isIdentifierPart(f))++this.index;else break}return this.source.slice(d,this.index)},m.prototype.getComplexIdentifier=function(){var d=this.codePointAt(this.index),f=n.Character.fromCodePoint(d);this.index+=f.length;var p;for(d===92&&(this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,p=this.scanUnicodeCodePointEscape()):(p=this.scanHexEscape("u"),(p===null||p==="\\"||!n.Character.isIdentifierStart(p.charCodeAt(0)))&&this.throwUnexpectedToken()),f=p);!this.eof()&&(d=this.codePointAt(this.index),!!n.Character.isIdentifierPart(d));)p=n.Character.fromCodePoint(d),f+=p,this.index+=p.length,d===92&&(f=f.substr(0,f.length-1),this.source.charCodeAt(this.index)!==117&&this.throwUnexpectedToken(),++this.index,this.source[this.index]==="{"?(++this.index,p=this.scanUnicodeCodePointEscape()):(p=this.scanHexEscape("u"),(p===null||p==="\\"||!n.Character.isIdentifierPart(p.charCodeAt(0)))&&this.throwUnexpectedToken()),f+=p);return f},m.prototype.octalToDecimal=function(d){var f=d!=="0",p=c(d);return!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(f=!0,p=p*8+c(this.source[this.index++]),"0123".indexOf(d)>=0&&!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(p=p*8+c(this.source[this.index++]))),{code:p,octal:f}},m.prototype.scanIdentifier=function(){var d,f=this.index,p=this.source.charCodeAt(f)===92?this.getComplexIdentifier():this.getIdentifier();if(p.length===1?d=3:this.isKeyword(p)?d=4:p==="null"?d=5:p==="true"||p==="false"?d=1:d=3,d!==3&&f+p.length!==this.index){var a=this.index;this.index=f,this.tolerateUnexpectedToken(o.Messages.InvalidEscapedReservedWord),this.index=a}return{type:d,value:p,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},m.prototype.scanPunctuator=function(){var d=this.index,f=this.source[this.index];switch(f){case"(":case"{":f==="{"&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,this.source[this.index]==="."&&this.source[this.index+1]==="."&&(this.index+=2,f="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:f=this.source.substr(this.index,4),f===">>>="?this.index+=4:(f=f.substr(0,3),f==="==="||f==="!=="||f===">>>"||f==="<<="||f===">>="||f==="**="?this.index+=3:(f=f.substr(0,2),f==="&&"||f==="||"||f==="=="||f==="!="||f==="+="||f==="-="||f==="*="||f==="/="||f==="++"||f==="--"||f==="<<"||f===">>"||f==="&="||f==="|="||f==="^="||f==="%="||f==="<="||f===">="||f==="=>"||f==="**"?this.index+=2:(f=this.source[this.index],"<>=!+-*%&|^/".indexOf(f)>=0&&++this.index)))}return this.index===d&&this.throwUnexpectedToken(),{type:7,value:f,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.scanHexLiteral=function(d){for(var f="";!this.eof()&&n.Character.isHexDigit(this.source.charCodeAt(this.index));)f+=this.source[this.index++];return f.length===0&&this.throwUnexpectedToken(),n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+f,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.scanBinaryLiteral=function(d){for(var f="",p;!this.eof()&&(p=this.source[this.index],!(p!=="0"&&p!=="1"));)f+=this.source[this.index++];return f.length===0&&this.throwUnexpectedToken(),this.eof()||(p=this.source.charCodeAt(this.index),(n.Character.isIdentifierStart(p)||n.Character.isDecimalDigit(p))&&this.throwUnexpectedToken()),{type:6,value:parseInt(f,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.scanOctalLiteral=function(d,f){var p="",a=!1;for(n.Character.isOctalDigit(d.charCodeAt(0))?(a=!0,p="0"+this.source[this.index++]):++this.index;!this.eof()&&n.Character.isOctalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];return!a&&p.length===0&&this.throwUnexpectedToken(),(n.Character.isIdentifierStart(this.source.charCodeAt(this.index))||n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(p,8),octal:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:f,end:this.index}},m.prototype.isImplicitOctalLiteral=function(){for(var d=this.index+1;d<this.length;++d){var f=this.source[d];if(f==="8"||f==="9")return!1;if(!n.Character.isOctalDigit(f.charCodeAt(0)))return!0}return!0},m.prototype.scanNumericLiteral=function(){var d=this.index,f=this.source[d];i.assert(n.Character.isDecimalDigit(f.charCodeAt(0))||f===".","Numeric literal must start with a decimal digit or a decimal point");var p="";if(f!=="."){if(p=this.source[this.index++],f=this.source[this.index],p==="0"){if(f==="x"||f==="X")return++this.index,this.scanHexLiteral(d);if(f==="b"||f==="B")return++this.index,this.scanBinaryLiteral(d);if(f==="o"||f==="O")return this.scanOctalLiteral(f,d);if(f&&n.Character.isOctalDigit(f.charCodeAt(0))&&this.isImplicitOctalLiteral())return this.scanOctalLiteral(f,d)}for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];f=this.source[this.index]}if(f==="."){for(p+=this.source[this.index++];n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];f=this.source[this.index]}if(f==="e"||f==="E")if(p+=this.source[this.index++],f=this.source[this.index],(f==="+"||f==="-")&&(p+=this.source[this.index++]),n.Character.isDecimalDigit(this.source.charCodeAt(this.index)))for(;n.Character.isDecimalDigit(this.source.charCodeAt(this.index));)p+=this.source[this.index++];else this.throwUnexpectedToken();return n.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseFloat(p),lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.scanStringLiteral=function(){var d=this.index,f=this.source[d];i.assert(f==="'"||f==='"',"String literal must starts with a quote"),++this.index;for(var p=!1,a="";!this.eof();){var u=this.source[this.index++];if(u===f){f="";break}else if(u==="\\")if(u=this.source[this.index++],!u||!n.Character.isLineTerminator(u.charCodeAt(0)))switch(u){case"u":if(this.source[this.index]==="{")++this.index,a+=this.scanUnicodeCodePointEscape();else{var l=this.scanHexEscape(u);l===null&&this.throwUnexpectedToken(),a+=l}break;case"x":var g=this.scanHexEscape(u);g===null&&this.throwUnexpectedToken(o.Messages.InvalidHexEscapeSequence),a+=g;break;case"n":a+=`
120
120
  `;break;case"r":a+="\r";break;case"t":a+=" ";break;case"b":a+="\b";break;case"f":a+="\f";break;case"v":a+="\v";break;case"8":case"9":a+=u,this.tolerateUnexpectedToken();break;default:if(u&&n.Character.isOctalDigit(u.charCodeAt(0))){var v=this.octalToDecimal(u);p=v.octal||p,a+=String.fromCharCode(v.code)}else a+=u;break}else++this.lineNumber,u==="\r"&&this.source[this.index]===`
121
121
  `&&++this.index,this.lineStart=this.index;else{if(n.Character.isLineTerminator(u.charCodeAt(0)))break;a+=u}}return f!==""&&(this.index=d,this.throwUnexpectedToken()),{type:8,value:a,octal:p,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.scanTemplate=function(){var d="",f=!1,p=this.index,a=this.source[p]==="`",u=!1,l=2;for(++this.index;!this.eof();){var g=this.source[this.index++];if(g==="`"){l=1,u=!0,f=!0;break}else if(g==="$"){if(this.source[this.index]==="{"){this.curlyStack.push("${"),++this.index,f=!0;break}d+=g}else if(g==="\\")if(g=this.source[this.index++],n.Character.isLineTerminator(g.charCodeAt(0)))++this.lineNumber,g==="\r"&&this.source[this.index]===`
122
122
  `&&++this.index,this.lineStart=this.index;else switch(g){case"n":d+=`
@@ -125,37 +125,37 @@ ${i.message}`)}return jn}fe.loadHelpClass=Zx});var Bn=E(Le=>{"use strict";y();va
125
125
  `):d+=g}return f||this.throwUnexpectedToken(),a||this.curlyStack.pop(),{type:10,value:this.source.slice(p+1,this.index-l),cooked:d,head:a,tail:u,lineNumber:this.lineNumber,lineStart:this.lineStart,start:p,end:this.index}},m.prototype.testRegExp=function(d,f){var p="\uFFFF",a=d,u=this;f.indexOf("u")>=0&&(a=a.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(l,g,v){var x=parseInt(g||v,16);return x>1114111&&u.throwUnexpectedToken(o.Messages.InvalidRegExp),x<=65535?String.fromCharCode(x):p}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,p));try{RegExp(a)}catch{this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(d,f)}catch{return null}},m.prototype.scanRegExpBody=function(){var d=this.source[this.index];i.assert(d==="/","Regular expression literal must start with a slash");for(var f=this.source[this.index++],p=!1,a=!1;!this.eof();)if(d=this.source[this.index++],f+=d,d==="\\")d=this.source[this.index++],n.Character.isLineTerminator(d.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),f+=d;else if(n.Character.isLineTerminator(d.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(p)d==="]"&&(p=!1);else if(d==="/"){a=!0;break}else d==="["&&(p=!0);return a||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),f.substr(1,f.length-2)},m.prototype.scanRegExpFlags=function(){for(var d="",f="";!this.eof();){var p=this.source[this.index];if(!n.Character.isIdentifierPart(p.charCodeAt(0)))break;if(++this.index,p==="\\"&&!this.eof())if(p=this.source[this.index],p==="u"){++this.index;var a=this.index,u=this.scanHexEscape("u");if(u!==null)for(f+=u,d+="\\u";a<this.index;++a)d+=this.source[a];else this.index=a,f+="u",d+="\\u";this.tolerateUnexpectedToken()}else d+="\\",this.tolerateUnexpectedToken();else f+=p,d+=p}return f},m.prototype.scanRegExp=function(){var d=this.index,f=this.scanRegExpBody(),p=this.scanRegExpFlags(),a=this.testRegExp(f,p);return{type:9,value:"",pattern:f,flags:p,regex:a,lineNumber:this.lineNumber,lineStart:this.lineStart,start:d,end:this.index}},m.prototype.lex=function(){if(this.eof())return{type:2,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index};var d=this.source.charCodeAt(this.index);return n.Character.isIdentifierStart(d)?this.scanIdentifier():d===40||d===41||d===59?this.scanPunctuator():d===39||d===34?this.scanStringLiteral():d===46?n.Character.isDecimalDigit(this.source.charCodeAt(this.index+1))?this.scanNumericLiteral():this.scanPunctuator():n.Character.isDecimalDigit(d)?this.scanNumericLiteral():d===96||d===125&&this.curlyStack[this.curlyStack.length-1]==="${"?this.scanTemplate():d>=55296&&d<57343&&n.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},m})();t.Scanner=h},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="<end>",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27E8",rang:"\u27E9"}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=r(10),n=r(12),o=r(13),s=(function(){function h(){this.values=[],this.curly=this.paren=-1}return h.prototype.beforeFunctionExpression=function(m){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(m)>=0},h.prototype.isRegexStart=function(){var m=this.values[this.values.length-1],d=m!==null;switch(m){case"this":case"]":d=!1;break;case")":var f=this.values[this.paren-1];d=f==="if"||f==="while"||f==="for"||f==="with";break;case"}":if(d=!1,this.values[this.curly-3]==="function"){var p=this.values[this.curly-4];d=p?!this.beforeFunctionExpression(p):!1}else if(this.values[this.curly-4]==="function"){var p=this.values[this.curly-5];d=p?!this.beforeFunctionExpression(p):!0}break;default:break}return d},h.prototype.push=function(m){m.type===7||m.type===4?(m.value==="{"?this.curly=this.values.length:m.value==="("&&(this.paren=this.values.length),this.values.push(m.value)):this.values.push(null)},h})(),c=(function(){function h(m,d){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=d?typeof d.tolerant=="boolean"&&d.tolerant:!1,this.scanner=new n.Scanner(m,this.errorHandler),this.scanner.trackComment=d?typeof d.comment=="boolean"&&d.comment:!1,this.trackRange=d?typeof d.range=="boolean"&&d.range:!1,this.trackLoc=d?typeof d.loc=="boolean"&&d.loc:!1,this.buffer=[],this.reader=new s}return h.prototype.errors=function(){return this.errorHandler.errors},h.prototype.getNextToken=function(){if(this.buffer.length===0){var m=this.scanner.scanComments();if(this.scanner.trackComment)for(var d=0;d<m.length;++d){var f=m[d],p=this.scanner.source.slice(f.slice[0],f.slice[1]),a={type:f.multiLine?"BlockComment":"LineComment",value:p};this.trackRange&&(a.range=f.range),this.trackLoc&&(a.loc=f.loc),this.buffer.push(a)}if(!this.scanner.eof()){var u=void 0;this.trackLoc&&(u={start:{line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},end:{}});var l=this.scanner.source[this.scanner.index]==="/"&&this.reader.isRegexStart(),g=l?this.scanner.scanRegExp():this.scanner.lex();this.reader.push(g);var v={type:o.TokenName[g.type],value:this.scanner.source.slice(g.start,g.end)};if(this.trackRange&&(v.range=[g.start,g.end]),this.trackLoc&&(u.end={line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart},v.loc=u),g.type===9){var x=g.pattern,w=g.flags;v.regex={pattern:x,flags:w}}this.buffer.push(v)}}return this.buffer.shift()},h})();t.Tokenizer=c}])})});var ap=E((K2,cs)=>{y();(function(){"use strict";var e,t,r=Object.prototype.toString;typeof cs=="object"&&typeof cs.exports=="object"&&typeof F=="function"?(e=op(),t=function(n){cs.exports=n},i(e,t)):typeof define=="function"&&define.amd?define(["esprima"],function(n){return i(n)}):typeof window=="object"&&(window.redeyed=i(window.esprima));function i(n,o){function s(v){return r.call(v)==="[object Function]"}function c(v){return r.call(v)==="[object String]"}function h(v){return r.call(v)==="[object Object]"}function m(v,x){return function(w){return v+w+x}}function d(v){return v!=="_parent"}function f(v){var x=v.split(":");if(x.length===0||x.length>2)throw new Error("illegal string config: "+v+`
126
126
  Should be of format "before:after"`);return x.length===1||x[1].length===0?x.indexOf(":")<0?{_before:x[0]}:{_after:x[0]}:{_before:x[0],_after:x[1]}}function p(v){function x(C,S){if(C._parent){if(C._parent._default&&C._parent._default[S])return C._parent._default[S];var T=C._parent._parent;if(T)return T._default?T._default[S]:void 0}}function w(C){var S=v[C];if(S&&!s(S)){if(c(S)&&(v[C]=S=f(S)),S._parent=v,h(S)){if(!S._before&&!S._after)return p(S);S._before=S._before||x(S,"_before"),S._after=S._after||x(S,"_after");return}throw new Error("nodes need to be either {String}, {Object} or {Function}."+S+" is neither.")}}v._default&&w("_default"),Object.keys(v).filter(function(C){return d(C)&&v.hasOwnProperty(C)&&C!=="_before"&&C!=="_after"&&C!=="_default"}).forEach(w)}function a(v){Object.keys(v).filter(function(x){return d(x)&&v.hasOwnProperty(x)}).forEach(function(x){var w=v[x];if(!s(w)&&h(w)){if(!w._before&&!w._after)return a(w);var C=w._before||"",S=w._after||"";return v[x]=m(C,S),v[x]}})}function u(v){p(v),a(v)}function l(v,x){var w={};function C(S){w[S.range[0]]=S}return v.forEach(C),x.forEach(C),Object.keys(w).map(function(S){return w[S]})}function g(v,x,w){w=w||{};var C=w.parser||n,S=!!w.jsx,T=S||!!w.buildAst,P="",B,L,z,G=0,pe=[],_t,wr,Wt;v[0]==="#"&&v[1]==="!"&&(P=v.substr(0,v.indexOf(`
127
127
  `)+1),v=Array.apply(0,Array(P.length)).join(" ")+`
128
- `+v.substr(P.length)),T?(B=C.parse(v,{tokens:!0,comment:!0,range:!0,loc:!0,tolerant:!0,jsx:!0}),L=B.tokens,z=B.comments):(L=[],z=[],C.tokenize(v,{range:!0,loc:!0,comment:!0},function(re){re.type==="LineComment"?(re.type="Line",z.push(re)):re.type==="BlockComment"?(re.type="Block",z.push(re)):(re.type==="Identifier"&&re.value==="static"&&(re.type="Keyword"),L.push(re))})),u(x);function so(re,De,We){var je,Ge=De.range[0];for(je=We;je<re.length;je++)if(re[je].range[0]===Ge)return je;throw new Error("Token %s not found at or after index: %d",De,We)}function oo(re){var De,We,je,Ge=0,Ft;return De=re(v.slice(Er,Xt),Wt),h(De)?(pe.push(De.replacement),We=Wt.tokenIndex,je=so(Wt.tokens,De.skipPastToken,We),Ge=je-We,Ft=Ge>0?L[je-1].range[1]:Xt):(pe.push(De),Ft=Xt),{skip:Ge,splitEnd:Ft}}function di(re,De,We,je){var Ge,Ft=0;if(!(re>=De))return We?(Ge=oo(We),Ft=Ge.skip,G=Ge.splitEnd):(pe.push(v.slice(re,De)),G=De),Ft}wr=l(L,z);for(var Gt=0;Gt<wr.length;Gt++){var dt=wr[Gt],pt=x[dt.type],rn,Er,Xt;pt&&(rn=pt&&pt.hasOwnProperty(dt.value)&&pt[dt.value]&&s(pt[dt.value])?pt[dt.value]:pt._default,Er=dt.range[0],Xt=dt.range[1],di(G,Er),Wt={tokenIndex:Gt,tokens:wr,ast:B,code:v},Gt+=di(Er,Xt,rn,Wt))}return G<v.length&&di(G,v.length),w.nojoin||(_t=pe.join(""),P.length>0&&(_t=P+_t.substr(P.length))),{ast:B,tokens:L,comments:z,splits:pe,code:_t}}return o?o(g):g}})()});var ls=E((eI,lp)=>{"use strict";y();var up={white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97},cp={bgBlack:40,bgRed:41,bgGreen:42,bgYellow:43,bgBlue:44,bgMagenta:45,bgCyan:46,bgWhite:47,bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107},Ta={},Oa={},ji={};Object.keys(up).forEach(function(e){var t=Ta[e]="\x1B["+up[e]+"m",r=Oa[e]="\x1B[39m";ji[e]=function(i){return t+i+r}});Object.keys(cp).forEach(function(e){var t=Ta[e]="\x1B["+cp[e]+"m",r=Oa[e]="\x1B[49m";ji[e]=function(i){return t+i+r}});lp.exports=ji;ji.open=Ta;ji.close=Oa});var fp=E((rI,hp)=>{y();var j=ls();hp.exports={Boolean:{true:void 0,false:void 0,_default:j.brightRed},Identifier:{undefined:j.brightBlack,self:j.brightRed,console:j.blue,log:j.blue,warn:j.red,error:j.brightRed,_default:j.white},Null:{_default:j.brightBlack},Numeric:{_default:j.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?j.green(e):j.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:j.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:j.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:j.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:j.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:j.red,static:void 0,super:void 0,switch:void 0,this:j.brightRed,throw:void 0,try:j.cyan,typeof:void 0,var:j.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:j.brightBlue},Punctuator:{";":j.brightBlack,".":j.green,",":j.green,"{":j.yellow,"}":j.yellow,"(":j.brightBlack,")":j.brightBlack,"[":j.yellow,"]":j.yellow,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:j.brightYellow},Line:{_default:j.brightBlack},Block:{_default:j.brightBlack},JSXAttribute:{_default:j.magenta},JSXClosingElement:{_default:j.magenta},JSXElement:{_default:j.magenta},JSXEmptyExpression:{_default:j.magenta},JSXExpressionContainer:{_default:j.magenta},JSXIdentifier:{className:j.blue,_default:j.magenta},JSXMemberExpression:{_default:j.magenta},JSXNamespacedName:{_default:j.magenta},JSXOpeningElement:{_default:j.magenta},JSXSpreadAttribute:{_default:j.magenta},JSXText:{_default:j.brightGreen},_default:void 0}});var hs=E((nI,dp)=>{"use strict";y();var rS=ap(),iS=fp(),nS=ls(),sS=nS.brightBlack,oS="\x1B[39m";function aS(e){for(var t=e.pop();!t||!t.length;)t=e.pop();t&&e.push(t)}function uS(e,t){var r=e.split(`
128
+ `+v.substr(P.length)),T?(B=C.parse(v,{tokens:!0,comment:!0,range:!0,loc:!0,tolerant:!0,jsx:!0}),L=B.tokens,z=B.comments):(L=[],z=[],C.tokenize(v,{range:!0,loc:!0,comment:!0},function(re){re.type==="LineComment"?(re.type="Line",z.push(re)):re.type==="BlockComment"?(re.type="Block",z.push(re)):(re.type==="Identifier"&&re.value==="static"&&(re.type="Keyword"),L.push(re))})),u(x);function so(re,De,We){var je,Ge=De.range[0];for(je=We;je<re.length;je++)if(re[je].range[0]===Ge)return je;throw new Error("Token %s not found at or after index: %d",De,We)}function oo(re){var De,We,je,Ge=0,Ft;return De=re(v.slice(Er,Xt),Wt),h(De)?(pe.push(De.replacement),We=Wt.tokenIndex,je=so(Wt.tokens,De.skipPastToken,We),Ge=je-We,Ft=Ge>0?L[je-1].range[1]:Xt):(pe.push(De),Ft=Xt),{skip:Ge,splitEnd:Ft}}function pi(re,De,We,je){var Ge,Ft=0;if(!(re>=De))return We?(Ge=oo(We),Ft=Ge.skip,G=Ge.splitEnd):(pe.push(v.slice(re,De)),G=De),Ft}wr=l(L,z);for(var Gt=0;Gt<wr.length;Gt++){var dt=wr[Gt],pt=x[dt.type],rn,Er,Xt;pt&&(rn=pt&&pt.hasOwnProperty(dt.value)&&pt[dt.value]&&s(pt[dt.value])?pt[dt.value]:pt._default,Er=dt.range[0],Xt=dt.range[1],pi(G,Er),Wt={tokenIndex:Gt,tokens:wr,ast:B,code:v},Gt+=pi(Er,Xt,rn,Wt))}return G<v.length&&pi(G,v.length),w.nojoin||(_t=pe.join(""),P.length>0&&(_t=P+_t.substr(P.length))),{ast:B,tokens:L,comments:z,splits:pe,code:_t}}return o?o(g):g}})()});var ls=E((eI,lp)=>{"use strict";y();var up={white:37,black:30,blue:34,cyan:36,green:32,magenta:35,red:31,yellow:33,brightBlack:90,brightRed:91,brightGreen:92,brightYellow:93,brightBlue:94,brightMagenta:95,brightCyan:96,brightWhite:97},cp={bgBlack:40,bgRed:41,bgGreen:42,bgYellow:43,bgBlue:44,bgMagenta:45,bgCyan:46,bgWhite:47,bgBrightBlack:100,bgBrightRed:101,bgBrightGreen:102,bgBrightYellow:103,bgBrightBlue:104,bgBrightMagenta:105,bgBrightCyan:106,bgBrightWhite:107},Ta={},Oa={},Bi={};Object.keys(up).forEach(function(e){var t=Ta[e]="\x1B["+up[e]+"m",r=Oa[e]="\x1B[39m";Bi[e]=function(i){return t+i+r}});Object.keys(cp).forEach(function(e){var t=Ta[e]="\x1B["+cp[e]+"m",r=Oa[e]="\x1B[49m";Bi[e]=function(i){return t+i+r}});lp.exports=Bi;Bi.open=Ta;Bi.close=Oa});var fp=E((rI,hp)=>{y();var j=ls();hp.exports={Boolean:{true:void 0,false:void 0,_default:j.brightRed},Identifier:{undefined:j.brightBlack,self:j.brightRed,console:j.blue,log:j.blue,warn:j.red,error:j.brightRed,_default:j.white},Null:{_default:j.brightBlack},Numeric:{_default:j.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?j.green(e):j.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:j.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:j.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:j.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:j.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:j.red,static:void 0,super:void 0,switch:void 0,this:j.brightRed,throw:void 0,try:j.cyan,typeof:void 0,var:j.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:j.brightBlue},Punctuator:{";":j.brightBlack,".":j.green,",":j.green,"{":j.yellow,"}":j.yellow,"(":j.brightBlack,")":j.brightBlack,"[":j.yellow,"]":j.yellow,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:j.brightYellow},Line:{_default:j.brightBlack},Block:{_default:j.brightBlack},JSXAttribute:{_default:j.magenta},JSXClosingElement:{_default:j.magenta},JSXElement:{_default:j.magenta},JSXEmptyExpression:{_default:j.magenta},JSXExpressionContainer:{_default:j.magenta},JSXIdentifier:{className:j.blue,_default:j.magenta},JSXMemberExpression:{_default:j.magenta},JSXNamespacedName:{_default:j.magenta},JSXOpeningElement:{_default:j.magenta},JSXSpreadAttribute:{_default:j.magenta},JSXText:{_default:j.brightGreen},_default:void 0}});var hs=E((nI,dp)=>{"use strict";y();var rS=ap(),iS=fp(),nS=ls(),sS=nS.brightBlack,oS="\x1B[39m";function aS(e){for(var t=e.pop();!t||!t.length;)t=e.pop();t&&e.push(t)}function uS(e,t){var r=e.split(`
129
129
  `);aS(r);var i=r.length,n=[],o,s;function c(d){return d<10?1:d<100?2:d<1e3?3:d<1e4?4:5}function h(d,f){var p=f-c(d);switch(p){case 0:return""+d;case 1:return" "+d;case 2:return" "+d;case 3:return" "+d;case 4:return" "+d;case 5:return" "+d}}o=c(i+t-1);for(var m=0;m<i;m++)s=sS(h(m+t,o)+": ").replace(oS,""),n.push(s+r[m]);return n.join(`
130
- `)}dp.exports=function(t,r){r=r||{};try{var i=rS(t,r.theme||iS,{jsx:!!r.jsx}),n=r.firstline&&!isNaN(r.firstline)?r.firstline:1;return r.linenos?uS(i.code,n):i.code}catch(o){throw o.message="Unable to perform highlight. The code contained syntax errors: "+o.message,o}}});var mp=E((oI,pp)=>{"use strict";y();var cS=F("fs"),lS=hs();function hS(e){return toString.call(e)==="[object Function]"}pp.exports=function(t,r,i){hS(r)&&(i=r,r={}),r=r||{},cS.readFile(t,"utf-8",function(n,o){if(n)return i(n);try{i(null,lS(o,r))}catch(s){i(s)}})}});var yp=E((uI,gp)=>{"use strict";y();var fS=F("fs"),dS=hs();gp.exports=function(t,r){var i=fS.readFileSync(t,"utf-8");return r=r||{},dS(i,r)}});var xp=E((lI,vp)=>{"use strict";y();vp.exports={highlight:hs(),highlightFile:mp(),highlightFileSync:yp()}});var Ep=E((fI,wp)=>{y();var $=ls();wp.exports={Boolean:{true:void 0,false:void 0,_default:$.brightRed},Identifier:{undefined:$.brightBlack,self:$.brightRed,console:$.blue,log:$.blue,warn:$.red,error:$.brightRed,_default:$.white},Null:{_default:$.brightBlack},Numeric:{_default:$.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?$.brightBlue(e):$.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:$.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:$.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:$.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:$.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:$.red,static:void 0,super:void 0,switch:void 0,this:$.brightRed,throw:void 0,try:$.cyan,typeof:void 0,var:$.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:$.brightBlue},Punctuator:{";":$.brightBlack,".":$.green,",":$.green,"{":$.brightWhite,"}":$.brightWhite,"(":$.brightBlack,")":$.brightBlack,"[":$.brightWhite,"]":$.brightWhite,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:$.brightYellow},Line:{_default:$.brightBlack},Block:{_default:$.brightBlack},_default:void 0}});var bp=E(fs=>{"use strict";y();Object.defineProperty(fs,"__esModule",{value:!0});fs.ExitError=void 0;var Pa=class extends Error{code;error;ux;constructor(t,r){let i="EEXIT";super(r?r.message:`${i}: ${t}`),this.error=r,this.ux={exit:t},this.code=i}};fs.ExitError=Pa});var Ri=E(_=>{"use strict";y();var pS=_&&_.__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]})),mS=_&&_.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ja=_&&_.__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)&&pS(t,e,r);return mS(t,e),t},ms=_&&_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_,"__esModule",{value:!0});_.write=_.colorize=_.Table=_.ExitError=_.config=_.Config=_.ActionBase=_.warn=_.wait=_.url=_.tree=_.trace=_.table=_.styledObject=_.styledJSON=_.styledHeader=_.prompt=_.progress=_.logToStderr=_.log=_.info=_.flush=_.exit=_.error=_.done=_.debug=_.confirm=_.anykey=_.annotation=_.action=_.ux=void 0;var Ia=ms(Be()),ds=F("node:util"),gS=ja($e()),Na=Un(),yS=zn(),Ma=ja(fh()),ps=ja(_a()),vS=ms(ip()),Dp=ms(Ot()),xS=sp(),Bi=class{static config=Na.config;static get action(){return Na.config.action}static annotation(t,r){Pc().stdout?this.log(`\x1B]1337;AddAnnotation=${t.length}|${r}\x07${t}`):this.log(t)}static get anykey(){return Ma.anykey}static get confirm(){return Ma.confirm}static debug(t,...r){["debug","trace"].includes(this.config.outputLevel)&&this.info((0,ds.format)(t,...r)+`
130
+ `)}dp.exports=function(t,r){r=r||{};try{var i=rS(t,r.theme||iS,{jsx:!!r.jsx}),n=r.firstline&&!isNaN(r.firstline)?r.firstline:1;return r.linenos?uS(i.code,n):i.code}catch(o){throw o.message="Unable to perform highlight. The code contained syntax errors: "+o.message,o}}});var mp=E((oI,pp)=>{"use strict";y();var cS=F("fs"),lS=hs();function hS(e){return toString.call(e)==="[object Function]"}pp.exports=function(t,r,i){hS(r)&&(i=r,r={}),r=r||{},cS.readFile(t,"utf-8",function(n,o){if(n)return i(n);try{i(null,lS(o,r))}catch(s){i(s)}})}});var yp=E((uI,gp)=>{"use strict";y();var fS=F("fs"),dS=hs();gp.exports=function(t,r){var i=fS.readFileSync(t,"utf-8");return r=r||{},dS(i,r)}});var xp=E((lI,vp)=>{"use strict";y();vp.exports={highlight:hs(),highlightFile:mp(),highlightFileSync:yp()}});var Ep=E((fI,wp)=>{y();var $=ls();wp.exports={Boolean:{true:void 0,false:void 0,_default:$.brightRed},Identifier:{undefined:$.brightBlack,self:$.brightRed,console:$.blue,log:$.blue,warn:$.red,error:$.brightRed,_default:$.white},Null:{_default:$.brightBlack},Numeric:{_default:$.blue},String:{_default:function(e,t){var r=t.tokens[t.tokenIndex+1];return r&&r.type==="Punctuator"&&r.value===":"?$.brightBlue(e):$.brightGreen(e)}},Keyword:{break:void 0,case:void 0,catch:$.cyan,class:void 0,const:void 0,continue:void 0,debugger:void 0,default:void 0,delete:$.red,do:void 0,else:void 0,enum:void 0,export:void 0,extends:void 0,finally:$.cyan,for:void 0,function:void 0,if:void 0,implements:void 0,import:void 0,in:void 0,instanceof:void 0,let:void 0,new:$.red,package:void 0,private:void 0,protected:void 0,public:void 0,return:$.red,static:void 0,super:void 0,switch:void 0,this:$.brightRed,throw:void 0,try:$.cyan,typeof:void 0,var:$.green,void:void 0,while:void 0,with:void 0,yield:void 0,_default:$.brightBlue},Punctuator:{";":$.brightBlack,".":$.green,",":$.green,"{":$.brightWhite,"}":$.brightWhite,"(":$.brightBlack,")":$.brightBlack,"[":$.brightWhite,"]":$.brightWhite,"<":void 0,">":void 0,"+":void 0,"-":void 0,"*":void 0,"%":void 0,"&":void 0,"|":void 0,"^":void 0,"!":void 0,"~":void 0,"?":void 0,":":void 0,"=":void 0,"<=":void 0,">=":void 0,"==":void 0,"!=":void 0,"++":void 0,"--":void 0,"<<":void 0,">>":void 0,"&&":void 0,"||":void 0,"+=":void 0,"-=":void 0,"*=":void 0,"%=":void 0,"&=":void 0,"|=":void 0,"^=":void 0,"/=":void 0,"=>":void 0,"**":void 0,"===":void 0,"!==":void 0,">>>":void 0,"<<=":void 0,">>=":void 0,"...":void 0,"**=":void 0,">>>=":void 0,_default:$.brightYellow},Line:{_default:$.brightBlack},Block:{_default:$.brightBlack},_default:void 0}});var bp=E(fs=>{"use strict";y();Object.defineProperty(fs,"__esModule",{value:!0});fs.ExitError=void 0;var Pa=class extends Error{code;error;ux;constructor(t,r){let i="EEXIT";super(r?r.message:`${i}: ${t}`),this.error=r,this.ux={exit:t},this.code=i}};fs.ExitError=Pa});var Li=E(_=>{"use strict";y();var pS=_&&_.__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]})),mS=_&&_.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),ja=_&&_.__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)&&pS(t,e,r);return mS(t,e),t},ms=_&&_.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_,"__esModule",{value:!0});_.write=_.colorize=_.Table=_.ExitError=_.config=_.Config=_.ActionBase=_.warn=_.wait=_.url=_.tree=_.trace=_.table=_.styledObject=_.styledJSON=_.styledHeader=_.prompt=_.progress=_.logToStderr=_.log=_.info=_.flush=_.exit=_.error=_.done=_.debug=_.confirm=_.anykey=_.annotation=_.action=_.ux=void 0;var Ia=ms(Be()),ds=F("node:util"),gS=ja($e()),Na=Un(),yS=zn(),Ma=ja(fh()),ps=ja(_a()),vS=ms(ip()),Dp=ms(Ot()),xS=sp(),Ri=class{static config=Na.config;static get action(){return Na.config.action}static annotation(t,r){Pc().stdout?this.log(`\x1B]1337;AddAnnotation=${t.length}|${r}\x07${t}`):this.log(t)}static get anykey(){return Ma.anykey}static get confirm(){return Ma.confirm}static debug(t,...r){["debug","trace"].includes(this.config.outputLevel)&&this.info((0,ds.format)(t,...r)+`
131
131
  `)}static async done(){Na.config.action.stop()}static async flush(t=1e4){await(0,yS.flush)(t)}static info(t,...r){Dp.default.stdout((0,ds.format)(t,...r)+`
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=Bi;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}=Bi;_.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 Bi.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 Li=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,Li.performance.mark(this.startMarker)}addDetails(t){this.details={...this.details,...t}}measure(){Li.performance.measure(this.name,this.startMarker,this.stopMarker)}stop(){this.stopped=!0,Li.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 Li.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{}Li.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]},$i=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($i(f)+"-"+$i(l)):l===f&&i.push($i(l)),f="",o++;continue}if(e.startsWith("-]",o+1)){i.push($i(l+"-")),o+=2;continue}if(e.startsWith("-",o+1)){f=l,o+=2;continue}i.push($i(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(),qi=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=qi(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=qi(e),bt.isAbsolute(t)){if(qi(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(qi(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=qi(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()),Ui=$e(),js=wi(),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 Ui.CLIError("`oclif.commandDiscovery.target` is required.");if(!e.strategy)throw new Ui.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,Ui.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 Ui.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 Ui.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(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}
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_=Ri(),p_=er(),ni=$e(),m_=Mr(),g_=wi(),we=Yr(),pu=Pt(),qm=yt(),Um=Fp(),Rs=oe(),y_=yu(Lm()),v_=Pr(),zi=Or(),Hi=(0,zi.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,zi.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){Hi(`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(),Hi("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}`);Hi("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}`);Hi("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),Hi("%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_(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(`
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,zi.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,zi.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,zi.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(`
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()),Ji=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+=`
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(`
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
- ${s}`}super({exit:Ji.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+=`:
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+=`:
143
143
  ${c}`}if(i?.length){let c=i.map(h=>`--${h}`).join(", ");o+=`
144
144
 
145
145
  Note: ${c} allow${i.length===1?"s":""} multiple values. Because of this you need to provide all arguments before providing ${i.length===1?"that flag":"those flags"}.`,o+=`
146
- Alternatively, you can use "--" to signify the end of the flags and the beginning of arguments.`}super({exit:Ji.default.getInstance().get("exitCodes")?.requiredArgs??r,message:o,parse:n}),this.args=t,this.showHelp=!0}};Z.RequiredArgsError=xu;var wu=class extends lt{args;constructor({args:t,exit:r,parse:i}){let n=`Unexpected argument${t.length===1?"":"s"}: ${t.join(", ")}`;super({exit:Ji.default.getInstance().get("exitCodes")?.unexpectedArgs??r,message:n,parse:i}),this.args=t,this.showHelp=!0}};Z.UnexpectedArgsError=wu;var Eu=class extends lt{flags;constructor({exit:t,flags:r,parse:i}){let n=`Nonexistent flag${r.length===1?"":"s"}: ${r.join(", ")}`;super({exit:Ji.default.getInstance().get("exitCodes")?.nonExistentFlag??t,message:n,parse:i}),this.flags=r,this.showHelp=!0}};Z.NonExistentFlagsError=Eu;var bu=class extends lt{constructor(t,r){let i=`Expected --${t.name}=${r} to be one of: ${t.options.join(", ")}`;super({message:i,parse:{}})}};Z.FlagInvalidOptionError=bu;var Du=class extends lt{constructor(t,r){let i=`Expected ${r} to be one of: ${t.options.join(", ")}`;super({message:i,parse:{}})}};Z.ArgInvalidOptionError=Du;var Cu=class extends lt{constructor({exit:t,failed:r,parse:i}){let n=r.map(h=>h.reason),o=(0,P_.uniq)(n),c=`The following ${o.length===1?"error":"errors"} occurred:
146
+ Alternatively, you can use "--" to signify the end of the flags and the beginning of arguments.`}super({exit:Wi.default.getInstance().get("exitCodes")?.requiredArgs??r,message:o,parse:n}),this.args=t,this.showHelp=!0}};Z.RequiredArgsError=xu;var wu=class extends lt{args;constructor({args:t,exit:r,parse:i}){let n=`Unexpected argument${t.length===1?"":"s"}: ${t.join(", ")}`;super({exit:Wi.default.getInstance().get("exitCodes")?.unexpectedArgs??r,message:n,parse:i}),this.args=t,this.showHelp=!0}};Z.UnexpectedArgsError=wu;var Eu=class extends lt{flags;constructor({exit:t,flags:r,parse:i}){let n=`Nonexistent flag${r.length===1?"":"s"}: ${r.join(", ")}`;super({exit:Wi.default.getInstance().get("exitCodes")?.nonExistentFlag??t,message:n,parse:i}),this.flags=r,this.showHelp=!0}};Z.NonExistentFlagsError=Eu;var bu=class extends lt{constructor(t,r){let i=`Expected --${t.name}=${r} to be one of: ${t.options.join(", ")}`;super({message:i,parse:{}})}};Z.FlagInvalidOptionError=bu;var Du=class extends lt{constructor(t,r){let i=`Expected ${r} to be one of: ${t.options.join(", ")}`;super({message:i,parse:{}})}};Z.ArgInvalidOptionError=Du;var Cu=class extends lt{constructor({exit:t,failed:r,parse:i}){let n=r.map(h=>h.reason),o=(0,P_.uniq)(n),c=`The following ${o.length===1?"error":"errors"} occurred:
147
147
  ${T_.default.dim(o.join(`
148
- `))}`;super({exit:Ji.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}
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
- 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(),Wi=Su();async function L_(e){let t;function r(){if(e.output.nonExistentFlags?.length>0)throw new Wi.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 Wi.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 Wi.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 Wi.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 Wi.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=Ri(),Q_=$s(),oi=ng($e()),Gi=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,Gi.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,Gi.formatCommandDeprecationWarning)(i,{to:r}))}if(this.ctor.state==="deprecated"){let r=(0,Fu.toConfiguredId)(this.ctor.id,this.config);this.warn((0,Gi.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,Gi.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,Gi.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=Ri(),nF=$s(),Ou=Si(),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(Ri());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=Si();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(wi());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,Xi=(()=>{try{let e=N(le(Nu),"templates","skeleton");return kF(e)}catch{return!1}})(),VN=Xi?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 Vi(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(!Xi)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(Xi)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 Yi(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 Yi(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+`
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+`
152
152
  `+s).replace(a,u+`
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 Yi(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-77RHJICZ.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:
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:
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 Yi(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 Ki(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 Ki(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 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
159
159
  query LinkStorefront {
160
160
  hydrogenStorefronts {
161
161
  id
@@ -264,9 +264,9 @@ if (!$profileContent -or $profileContent -NotLike '*Invoke-Local-H2*') {
264
264
  status
265
265
  webUrl
266
266
  }
267
- `;async function Wg(e){let{currentUserAccount:t}=await Cc(sk,e);if(!t)throw new I("Unable to get current user account");return{email:t.email,activeShops:[...t.organizations?.edges?.flatMap(r=>r.node?.categories.flatMap(i=>i?.destinations?.edges?.map(n=>n.node)))??[],...t.orphanDestinations?.categories?.flatMap(r=>r.destinations?.edges?.map(i=>i.node))??[]].filter(({status:r})=>r==="ACTIVE").map(({name:r,webUrl:i})=>({name:r,fqdn:i.replace(/^https?:\/\//,"").replace(/\/admin$/,"")}))}}y();y();function fi({host:e="",graphql:t}){let r=`${e.endsWith("/")?e.slice(0,-1):e}/graphiql`;if(t){let{query:i,variables:n}=t;typeof n!="string"&&(n=JSON.stringify(n)),r+=`?query=${encodeURIComponent(i)}${n?`&variables=${encodeURIComponent(n)}`:""}`,t.schema&&(r+=`&schema=${t.schema}`)}return r}var Gg={...console},Xg=new Set,Vg=new Set,Yg=[];function Qi(e,...t){Vg.has(e)||(Vg.add(e),Yg.push(...t))}var Gu=new Set;function ok(e,t){let r=e.map(i=>{let n=i?.message??i;return typeof n=="string"?n:""}).filter(Boolean).join("");return Gu.has(r)?!0:(Gu.add(r),t!==!0&&setTimeout(()=>Gu.delete(r),t??1e3),!1)}function Zi([e]){return typeof e=="string"&&/\[h2:(warn|info):(createStorefrontClient|createCustomerAccountClient)\]/.test(e)?!0:void 0}function St(e,t){Xg.has(e)||(Xg.add(e),console[e]=(...r)=>{if(t!==!1&&ok(r,t?.(r)))return;let i=Yg.reduce((o,[s,c])=>(s(r,o.length)&&o.push(c),o),[]);if(i.length===0)return Gg[e](...r);let n=i.reduce((o,s)=>o&&s(o),r);if(n)return Gg[e](...n)})}function DB({workerReload:e}={}){St("log"),St("error"),St("warn",Zi),St("debug",!1);let t=!0;Qi("dev-node",[([s])=>typeof s=="string"&&s.includes("[mf:"),s=>{let c=s[0];if(e!==!1&&c.includes("Worker reloaded")){if(t){t=!1;return}return[c.replace("[mf:inf] ","\u{1F504} ")+`
268
- `,...s.slice(1)]}c.includes("[mf:err]")}]),Qi("dev-workerd",[([s])=>typeof s=="string"&&/^\x1B\[31m(workerd\/|stack:( (0|[a-f\d]{4,})){3,})/.test(s),()=>{}],[([s])=>typeof s=="string"&&/\$LLVM_SYMBOLIZER|recursive isolate lock/.test(s),()=>{}],[([s])=>typeof s=="string"&&/^A promise rejection/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/resolved to multiple addresses/i.test(s),()=>{}],[([s])=>{let c=s?.message??s;return typeof c=="string"&&/^Network connection lost/i.test(c)},()=>{}]);let r=!1,i=!1;Qi("dev-vite",[([s])=>typeof s=="string"&&/^Sourcemap for .*@remix-run/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/^\[vite\] (connected|program reload)/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/^Re-optimizing dependencies because/i.test(s),()=>{}],[([s])=>{let c=s?.message??s;return/virtual-routes/.test(c)&&/(Failed to load url|Could not resolve module for file)/i.test(c)},()=>{}],[([s])=>typeof s=="string"&&/^Generated an empty chunk:/i.test(s),()=>{}],[([s],c)=>{if(c===0&&typeof s=="string"){let h=/^\s+[A-Z]+\s+\d{3}\s+[a-z]+\s+\//.test(s.replace(/\u001b\[.*?m/g,""));!r&&(h&&!i||!h&&i)&&process.stdout.write(`
269
- `),i=h,r=/\n$/.test(s)}return!1},s=>s]);let n=process.stderr.write,o=setTimeout(()=>{process.stderr.write=n},5e3);process.stderr.write=(...s)=>typeof s[0]=="string"&&s[0].includes("Could not find ts-node")?(clearTimeout(o),process.stderr.write=n,!1):n.apply(process.stderr,s)}function to(e=!1){St("log",Zi),Qi("auth",[([t])=>e&&typeof t=="string"&&t.includes("To run this command,"),([t])=>{}],[([t])=>typeof t=="string"&&t.includes("Logged in."),()=>{process.stdout.write(Oc.eraseLines(e?5:6))}])}function CB(e){St("error"),St("warn",Zi),St("log",Zi),St("info",Zi),Qi("h2-warn",[([t])=>{let r=t?.message??t;return typeof r=="string"&&r.includes("[h2:")},t=>{let r=t[0],i=typeof r=="object"&&r.stack?r:void 0,n=i?.message??r;n.startsWith("[h2:info:createStorefrontClient]")&&n.includes("defaulting to mock.shop")&&(n+="\nRun `h2 link` to link your store.");let[,o,s,c]=n.match(/\[h2:([^:]+):([^\]]+)\]\s+(.*)$/ims)||[];if(!o||!s||!c)return t;let h=`In Hydrogen's \`${s.trim()}\`:
267
+ `;async function Wg(e){let{currentUserAccount:t}=await Cc(sk,e);if(!t)throw new I("Unable to get current user account");return{email:t.email,activeShops:[...t.organizations?.edges?.flatMap(r=>r.node?.categories.flatMap(i=>i?.destinations?.edges?.map(n=>n.node)))??[],...t.orphanDestinations?.categories?.flatMap(r=>r.destinations?.edges?.map(i=>i.node))??[]].filter(({status:r})=>r==="ACTIVE").map(({name:r,webUrl:i})=>({name:r,fqdn:i.replace(/^https?:\/\//,"").replace(/\/admin$/,"")}))}}y();y();function fi({host:e="",graphql:t}){let r=`${e.endsWith("/")?e.slice(0,-1):e}/graphiql`;if(t){let{query:i,variables:n}=t;typeof n!="string"&&(n=JSON.stringify(n)),r+=`?query=${encodeURIComponent(i)}${n?`&variables=${encodeURIComponent(n)}`:""}`,t.schema&&(r+=`&schema=${t.schema}`)}return r}var Gg={...console},Xg=new Set,Vg=new Set,Yg=[];function Zi(e,...t){Vg.has(e)||(Vg.add(e),Yg.push(...t))}var Gu=new Set;function ok(e,t){let r=e.map(i=>{let n=i?.message??i;return typeof n=="string"?n:""}).filter(Boolean).join("");return Gu.has(r)?!0:(Gu.add(r),t!==!0&&setTimeout(()=>Gu.delete(r),t??1e3),!1)}function en([e]){return typeof e=="string"&&/\[h2:(warn|info):(createStorefrontClient|createCustomerAccountClient)\]/.test(e)?!0:void 0}function St(e,t){Xg.has(e)||(Xg.add(e),console[e]=(...r)=>{if(t!==!1&&ok(r,t?.(r)))return;let i=Yg.reduce((o,[s,c])=>(s(r,o.length)&&o.push(c),o),[]);if(i.length===0)return Gg[e](...r);let n=i.reduce((o,s)=>o&&s(o),r);if(n)return Gg[e](...n)})}function DB({workerReload:e}={}){St("log"),St("error"),St("warn",en),St("debug",!1);let t=!0;Zi("dev-node",[([s])=>typeof s=="string"&&s.includes("[mf:"),s=>{let c=s[0];if(e!==!1&&c.includes("Worker reloaded")){if(t){t=!1;return}return[c.replace("[mf:inf] ","\u{1F504} ")+`
268
+ `,...s.slice(1)]}c.includes("[mf:err]")}]),Zi("dev-workerd",[([s])=>typeof s=="string"&&/^\x1B\[31m(workerd\/|stack:( (0|[a-f\d]{4,})){3,})/.test(s),()=>{}],[([s])=>typeof s=="string"&&/\$LLVM_SYMBOLIZER|recursive isolate lock/.test(s),()=>{}],[([s])=>typeof s=="string"&&/^A promise rejection/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/resolved to multiple addresses/i.test(s),()=>{}],[([s])=>{let c=s?.message??s;return typeof c=="string"&&/^Network connection lost/i.test(c)},()=>{}]);let r=!1,i=!1;Zi("dev-vite",[([s])=>typeof s=="string"&&/^Sourcemap for .*@remix-run/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/^\[vite\] (connected|program reload)/i.test(s),()=>{}],[([s])=>typeof s=="string"&&/^Re-optimizing dependencies because/i.test(s),()=>{}],[([s])=>{let c=s?.message??s;return/virtual-routes/.test(c)&&/(Failed to load url|Could not resolve module for file)/i.test(c)},()=>{}],[([s])=>typeof s=="string"&&/^Generated an empty chunk:/i.test(s),()=>{}],[([s],c)=>{if(c===0&&typeof s=="string"){let h=/^\s+[A-Z]+\s+\d{3}\s+[a-z]+\s+\//.test(s.replace(/\u001b\[.*?m/g,""));!r&&(h&&!i||!h&&i)&&process.stdout.write(`
269
+ `),i=h,r=/\n$/.test(s)}return!1},s=>s]);let n=process.stderr.write,o=setTimeout(()=>{process.stderr.write=n},5e3);process.stderr.write=(...s)=>typeof s[0]=="string"&&s[0].includes("Could not find ts-node")?(clearTimeout(o),process.stderr.write=n,!1):n.apply(process.stderr,s)}function to(e=!1){St("log",en),Zi("auth",[([t])=>e&&typeof t=="string"&&t.includes("To run this command,"),([t])=>{}],[([t])=>typeof t=="string"&&t.includes("Logged in."),()=>{process.stdout.write(Oc.eraseLines(e?5:6))}])}function CB(e){St("error"),St("warn",en),St("log",en),St("info",en),Zi("h2-warn",[([t])=>{let r=t?.message??t;return typeof r=="string"&&r.includes("[h2:")},t=>{let r=t[0],i=typeof r=="object"&&r.stack?r:void 0,n=i?.message??r;n.startsWith("[h2:info:createStorefrontClient]")&&n.includes("defaulting to mock.shop")&&(n+="\nRun `h2 link` to link your store.");let[,o,s,c]=n.match(/\[h2:([^:]+):([^\]]+)\]\s+(.*)$/ims)||[];if(!o||!s||!c)return t;let h=`In Hydrogen's \`${s.trim()}\`:
270
270
 
271
271
  `,m=c.split(`
272
272
  `),d=m.at(-1)??"",f=/https?:\/\//.test(d),p=/`h2 [^`]+`/.test(d);if(p&&d&&(d=d.replace(/`(h2) ([^`]+)`/g,W.magentaBright(`\`${e.cliCommand??"$1"} $2\``))),(f||p)&&m.pop(),o==="error"||i){let l=f||p?d:void 0,g=i?.stack,v=i?.cause;if(typeof v=="string")try{v=JSON.parse(v)}catch{}if(typeof v!="string"&&v?.graphql?.query){let P=fi({host:e.host,graphql:v.graphql}),[,B,L]=v.graphql.query.match(/(query|mutation)\s+(\w+)/)||[];l=(l?`${l}
@@ -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 Vi(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 Vi(e+p,s),g=await bk(l,await Vi("",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 Vi(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 Xi&&(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: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=`
280
280
  node_modules
281
281
  /.cache
282
282
  /build
@@ -296,7 +296,7 @@ node_modules
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
 
299
- After you run the \`link\` command, you can access the [env list](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-list), [env pull](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-pull), and [unlink](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-unlink) commands.`;static description="Link a local project to one of your shop's Hydrogen storefronts.";static flags={...ci.force,...ci.path,...ci.shop,storefront:io.Flags.string({description:`The name of a Hydrogen Storefront (e.g. "Jane's Apparel")`,env:"SHOPIFY_HYDROGEN_STOREFRONT",exclusive:["create-storefront","name"]}),"create-storefront":io.Flags.boolean({description:"Create a new Hydrogen storefront.",env:"SHOPIFY_HYDROGEN_FLAG_CREATE_STOREFRONT",exclusive:["storefront"]}),name:io.Flags.string({description:"The name to use when creating a new Hydrogen storefront.",env:"SHOPIFY_HYDROGEN_FLAG_NAME",exclusive:["storefront"]})};async run(){let{flags:t}=await this.parse(e);await Ok(Ki(t))}};async function Ok({createStorefront:e,force:t,path:r=process.cwd(),shop:i,storefront:n,name:o}){let[{session:s,config:c},h]=await Promise.all([At(r,i),eo()]),m=await ec(r,s,c,{force:t,flagCreateStorefront:e,flagStorefront:n,storefrontName:o,cliCommand:h});m&&Cr({body:[{userInput:m.title},"is now linked"],nextSteps:[["Run",{command:`${h} dev`},"to start your local development server and start building"]]})}async function ec(e,t,r,{force:i=!1,flagCreateStorefront:n,flagStorefront:o,storefrontName:s,cliCommand:c,storefronts:h}){if(s=s?.trim()||void 0,o&&(n||s))throw new I("`--storefront` cannot be used with storefront creation flags.","Use `--storefront` to link an existing storefront or `--name` to create a new one.");if(!r.shop)throw new I("No shop found in local config, login first.");if(r.storefront?.id&&!i&&!await rt({message:`Your project is currently linked to ${r.storefront.title}. Do you want to link to a different Hydrogen storefront on Shopify?`}))return;h||(h=await Ks(t));let m;if(o){if(m=h.find(({title:d})=>d===o),!m){Xe({headline:`Couldn't find ${o}`,body:["There's no storefront matching",{userInput:o},"on your",{userInput:r.shop},"shop. To see all available Hydrogen storefronts, run",{command:`${c} list`}]});return}}else n||s?m=await l0(e,t,h,s):(m=await Zu(h),m||(m=await l0(e,t,h)));return await Mg(e,m),m}async function l0(e,t,r,i){let n=Tt(e),o=Zs(n);r.some(({title:d})=>d===o)&&(o=u0());let c=i??await Sr({message:"New storefront name",defaultValue:o}),h,m;if(await Ic([{title:"Creating storefront",task:async()=>{let d=await Bg(t,c);h=d.storefront,m=d.jobId}},{title:"Creating API tokens",task:async()=>{try{await Rg(t,m)}catch{h=void 0}},skip:()=>!m}]),!h)throw new I("Unknown error ocurred. Please try again or contact support if the error persists.");return h}y();var en=nn(Gs(),1);y();var Pk=`#graphql
299
+ After you run the \`link\` command, you can access the [env list](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-list), [env pull](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-env-pull), and [unlink](https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-unlink) commands.`;static description="Link a local project to one of your shop's Hydrogen storefronts.";static flags={...ci.force,...ci.path,...ci.shop,storefront:io.Flags.string({description:`The name of a Hydrogen Storefront (e.g. "Jane's Apparel")`,env:"SHOPIFY_HYDROGEN_STOREFRONT",exclusive:["create-storefront","name"]}),"create-storefront":io.Flags.boolean({description:"Create a new Hydrogen storefront.",env:"SHOPIFY_HYDROGEN_FLAG_CREATE_STOREFRONT",exclusive:["storefront"]}),name:io.Flags.string({description:"The name to use when creating a new Hydrogen storefront.",env:"SHOPIFY_HYDROGEN_FLAG_NAME",exclusive:["storefront"]})};async run(){let{flags:t}=await this.parse(e);await Ok(Qi(t))}};async function Ok({createStorefront:e,force:t,path:r=process.cwd(),shop:i,storefront:n,name:o}){let[{session:s,config:c},h]=await Promise.all([At(r,i),eo()]),m=await ec(r,s,c,{force:t,flagCreateStorefront:e,flagStorefront:n,storefrontName:o,cliCommand:h});m&&Cr({body:[{userInput:m.title},"is now linked"],nextSteps:[["Run",{command:`${h} dev`},"to start your local development server and start building"]]})}async function ec(e,t,r,{force:i=!1,flagCreateStorefront:n,flagStorefront:o,storefrontName:s,cliCommand:c,storefronts:h}){if(s=s?.trim()||void 0,o&&(n||s))throw new I("`--storefront` cannot be used with storefront creation flags.","Use `--storefront` to link an existing storefront or `--name` to create a new one.");if(!r.shop)throw new I("No shop found in local config, login first.");if(r.storefront?.id&&!i&&!await rt({message:`Your project is currently linked to ${r.storefront.title}. Do you want to link to a different Hydrogen storefront on Shopify?`}))return;h||(h=await Ks(t));let m;if(o){if(m=h.find(({title:d})=>d===o),!m){Xe({headline:`Couldn't find ${o}`,body:["There's no storefront matching",{userInput:o},"on your",{userInput:r.shop},"shop. To see all available Hydrogen storefronts, run",{command:`${c} list`}]});return}}else n||s?m=await l0(e,t,h,s):(m=await Zu(h),m||(m=await l0(e,t,h)));return await Mg(e,m),m}async function l0(e,t,r,i){let n=Tt(e),o=Zs(n);r.some(({title:d})=>d===o)&&(o=u0());let c=i??await Sr({message:"New storefront name",defaultValue:o}),h,m;if(await Ic([{title:"Creating storefront",task:async()=>{let d=await Bg(t,c);h=d.storefront,m=d.jobId}},{title:"Creating API tokens",task:async()=>{try{await Rg(t,m)}catch{h=void 0}},skip:()=>!m}]),!h)throw new I("Unknown error ocurred. Please try again or contact support if the error persists.");return h}y();var di=nn(Gs(),1);y();var Pk=`#graphql
300
300
  mutation CustomerApplicationUrlsReplace($storefrontId: ID!, $urlsReplaceInput: HydrogenStorefrontCustomerApplicationUrlsReplaceInput!) {
301
301
  hydrogenStorefrontCustomerApplicationUrlsReplace(
302
302
  storefrontId: $storefrontId,
@@ -310,9 +310,9 @@ node_modules
310
310
  }
311
311
  }
312
312
  }
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":en.Flags.string({description:"The id of the storefront the configuration should be pushed to. Must start with 'gid://shopify/HydrogenStorefront/'"}),"dev-origin":en.Flags.string({description:"The development domain of your application.",required:!0}),"relative-redirect-uri":en.Flags.string({description:"The relative url of allowed callback url for Customer Account API OAuth flow. Default is '/account/authorize'"}),"relative-logout-uri":en.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({...Ki(t)})}};async function rc({path:e=process.cwd(),storefrontId:t,devOrigin:r,redirectUriRelativeUrl:i="/account/authorize",logoutUriRelativeUrl:n}){let o=await ic(e,t);try{if(!o)throw new Error("No storefrontId was found in --storefront-id flag or .shopify/project.json");let s=i?new URL(i,r).toString():r,c=r,h=n?new URL(n,r).toString():r;if(!s&&!c&&!h)return;let{session:m,config:d}=await At(e),f=d?.storefront?.customerAccountConfig,{success:p,userErrors:a}=await tc(m,o,{redirectUri:{add:s?[s]:void 0,removeRegex:f?.redirectUri},javascriptOrigin:{add:c?[c]:void 0,removeRegex:f?.javascriptOrigin},logoutUris:{add:h?[h]:void 0,removeRegex:f?.logoutUri}});if(!p||a.length){let u=new Error("Customer Account Application setup update fail.");throw u.userErrors=a,u}return await jg(e,{redirectUri:s,javascriptOrigin:c,logoutUri:h}),()=>Ik(m,o,{redirectUri:s,javascriptOrigin:c,logoutUri:h})}catch(s){let c=!1,h=s?.userErrors?.length?s.userErrors.map(d=>(/Javascript origin is not allowed for this application type/i.test(d.message)&&(c=!0),`${d.field}: ${d.message}`)):s.message?[s.message]:[],m=[{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 c&&m.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.",h.length?[{list:{title:"The following error occurs during update:",items:h.map((d,f)=>`${f!=0?`
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
- `:""}${d}`)}}]:void 0,m)}}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}":
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
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}
317
317
  `)),r.enqueue(i.encode(`data: ${h}
318
318
 
@@ -356,4 +356,4 @@ Starting tunnel...
356
356
  ${fi({host:e})}`,`View server network requests:
357
357
  ${e}/subrequest-profiler`].map((t,r)=>({subdued:`${r===0?"":`
358
358
 
359
- `}${t}`}))}export{Gs as a,Qe as b,$N as c,Xi as d,VN as e,Ze as f,Vi as g,Mu as h,Xs as i,ju as j,ft as k,zt as l,ui as m,Vs as n,Yi as o,Ru as p,Lu as q,qM as r,Ag as s,_g as t,qF as u,qu as v,Uu as w,Tg as x,Og as y,UF as z,HF as A,ci as B,Ki as C,Aj as D,_j as E,Hc as F,dy as G,uR as H,cR as I,lR as J,r0 as K,Zg as L,uk as M,Vu as N,e0 as O,dk as P,KB as Q,Je as R,Pg as S,Ks as T,hi as U,Ng as V,Mg as W,zj as X,Bg as Y,Rg as Z,ke as _,Jg as $,eo as aa,DB as ba,to as ca,CB as da,SB as ea,AB as fa,jB as ga,At as ha,Kg as ia,$B as ja,xk as ka,s0 as la,_k as ma,XR as na,VR as oa,YR as pa,KR as qa,QR as ra,ZR as sa,eL as ta,tL as ua,rL as va,iL as wa,kk as xa,nL as ya,sL as za,c0 as Aa,ec as Ba,h0 as Ca,qL as Da,UL as Ea,HL as Fa,zL as Ga,KL as Ha,QL as Ia,ZL as Ja,l3 as Ka,h3 as La,f3 as Ma,g0 as Na,p0 as Oa,m0 as Pa,A3 as Qa,Hk as Ra,H3 as Sa,z3 as Ta,E0 as Ua,J3 as Va,W3 as Wa,G3 as Xa};
359
+ `}${t}`}))}export{Gs as a,Qe as b,$N as c,Vi as d,VN as e,Ze as f,Yi as g,Mu as h,Xs as i,ju as j,ft as k,zt as l,ui as m,Vs as n,Ki as o,Ru as p,Lu as q,qM as r,Ag as s,_g as t,qF as u,qu as v,Uu as w,Tg as x,Og as y,UF as z,HF as A,ci as B,Qi as C,Aj as D,_j as E,Hc as F,dy as G,uR as H,cR as I,lR as J,r0 as K,Zg as L,uk as M,Vu as N,e0 as O,dk as P,KB as Q,Je as R,Pg as S,Ks as T,hi as U,Ng as V,Mg as W,zj as X,Bg as Y,Rg as Z,ke as _,Jg as $,eo as aa,DB as ba,to as ca,CB as da,SB as ea,AB as fa,jB as ga,At as ha,Kg as ia,$B as ja,xk as ka,s0 as la,_k as ma,XR as na,VR as oa,YR as pa,KR as qa,QR as ra,ZR as sa,eL as ta,tL as ua,rL as va,iL as wa,kk as xa,nL as ya,sL as za,c0 as Aa,ec as Ba,h0 as Ca,qL as Da,UL as Ea,HL as Fa,zL as Ga,KL as Ha,QL as Ia,ZL as Ja,l3 as Ka,h3 as La,f3 as Ma,g0 as Na,p0 as Oa,m0 as Pa,A3 as Qa,Hk as Ra,H3 as Sa,z3 as Ta,E0 as Ua,J3 as Va,W3 as Wa,G3 as Xa};