@shopify/cli 4.0.0 → 4.2.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 (392) hide show
  1. package/README.md +2 -2
  2. package/dist/analytics-CX22YIUZ.js +1 -0
  3. package/dist/analytics-UBWQIQYF.js +1 -0
  4. package/dist/angular-UTTM4Y4S.js +4 -0
  5. package/dist/bootstrap.js +1 -1
  6. package/dist/{chunk-DU4WR4OP.js → chunk-23AMFHXC.js} +1 -1
  7. package/dist/{chunk-LNHLDRC5.js → chunk-2EJCY4CE.js} +1 -1
  8. package/dist/{chunk-YMWHHINU.js → chunk-2KH2S7PI.js} +1 -1
  9. package/dist/chunk-2N4O33VM.js +6 -0
  10. package/dist/{chunk-WZBSLU4Q.js → chunk-2VLMN5QZ.js} +1 -1
  11. package/dist/chunk-2WNODIWJ.js +1 -0
  12. package/dist/chunk-2YXKZWYW.js +1 -0
  13. package/dist/{chunk-GFJ7UV74.js → chunk-3BRUCKZ2.js} +1 -1
  14. package/dist/{chunk-RM5SJJN6.js → chunk-3V63X7WZ.js} +66 -66
  15. package/dist/chunk-3YWUSKWF.js +159 -0
  16. package/dist/chunk-42RMKTCJ.js +8 -0
  17. package/dist/{chunk-V2CNCPIE.js → chunk-4EXYYBQ6.js} +1 -1
  18. package/dist/chunk-4KRT35A2.js +1 -0
  19. package/dist/chunk-4V4DQ6W7.js +836 -0
  20. package/dist/chunk-4Z2WYNTE.js +1 -0
  21. package/dist/chunk-57N2DFIF.js +1 -0
  22. package/dist/chunk-5TIJLYZU.js +3 -0
  23. package/dist/{chunk-GNPS5SBU.js → chunk-6AJZKIZ3.js} +1 -1
  24. package/dist/{chunk-XNO6DZYP.js → chunk-6HZTMQD6.js} +1 -1
  25. package/dist/chunk-6LK6ZP3Q.js +1 -0
  26. package/dist/chunk-6SXOUZ7V.js +1 -0
  27. package/dist/chunk-6TEXPRI2.js +2 -0
  28. package/dist/{chunk-OUOYKNMY.js → chunk-6TORWTD7.js} +1 -1
  29. package/dist/{chunk-IASVAERO.js → chunk-6YAXFS6V.js} +1 -1
  30. package/dist/chunk-6YHJ554P.js +6 -0
  31. package/dist/chunk-6ZIOYXEF.js +3 -0
  32. package/dist/chunk-7BFDUVOG.js +1 -0
  33. package/dist/chunk-7DVOSOEP.js +11 -0
  34. package/dist/chunk-7JESXDF2.js +14 -0
  35. package/dist/chunk-7KJ5TBWG.js +5 -0
  36. package/dist/{chunk-7MUKLZOL.js → chunk-A3VYI4LO.js} +2 -2
  37. package/dist/{chunk-4HHXSMD7.js → chunk-A5SQCM63.js} +2 -2
  38. package/dist/chunk-A6X2IVGT.js +4 -0
  39. package/dist/{chunk-HUZUORYM.js → chunk-AP3RFOPL.js} +10 -10
  40. package/dist/{chunk-3LVGAQB4.js → chunk-ATPFTRCC.js} +1 -1
  41. package/dist/chunk-AWQ5AR2K.js +5 -0
  42. package/dist/chunk-BECEP46I.js +16 -0
  43. package/dist/{chunk-JPGO36XP.js → chunk-BHWEA4V2.js} +1 -1
  44. package/dist/chunk-BPVZ7E63.js +1 -0
  45. package/dist/chunk-C2FFA4O4.js +1 -0
  46. package/dist/chunk-C3LZPAAH.js +3 -0
  47. package/dist/chunk-C6ABJCRG.js +1 -0
  48. package/dist/chunk-CCEA5CUX.js +1 -0
  49. package/dist/chunk-CE6FKJFS.js +1 -0
  50. package/dist/chunk-CW7WJZKR.js +28 -0
  51. package/dist/chunk-D3DDLLNF.js +2 -0
  52. package/dist/chunk-D656BV5Z.js +25 -0
  53. package/dist/chunk-DCBYHVKW.js +1 -0
  54. package/dist/{chunk-RF2DPBA6.js → chunk-DCK2FX6J.js} +1 -1
  55. package/dist/chunk-DERA4K6A.js +32 -0
  56. package/dist/chunk-DNLOSMHL.js +3 -0
  57. package/dist/chunk-E2YBU6D3.js +294 -0
  58. package/dist/{chunk-INEU4XKS.js → chunk-F47MFBKM.js} +1 -1
  59. package/dist/chunk-F6T3UBBL.js +1 -0
  60. package/dist/{chunk-WXVZJJOR.js → chunk-FBVBO5YQ.js} +1 -1
  61. package/dist/chunk-FD5S2O6M.js +7 -0
  62. package/dist/chunk-FFYYJKF7.js +1 -0
  63. package/dist/{chunk-LX3ZOW52.js → chunk-FGVC22EY.js} +1 -1
  64. package/dist/{chunk-NRAFVIU3.js → chunk-FP2NOZSD.js} +1 -1
  65. package/dist/chunk-FQDRVPCY.js +2 -0
  66. package/dist/{chunk-IOLVEXM6.js → chunk-FSTCEWXX.js} +1 -1
  67. package/dist/chunk-FTN7Y6HD.js +7 -0
  68. package/dist/{chunk-52GC6XUT.js → chunk-GVITHCQJ.js} +1 -1
  69. package/dist/chunk-H4W4DFKK.js +1 -0
  70. package/dist/{chunk-72F3YBNA.js → chunk-HD5TYIDZ.js} +1 -1
  71. package/dist/chunk-HHXHOQQP.js +3 -0
  72. package/dist/chunk-HJSYHK4S.js +8 -0
  73. package/dist/chunk-HLMFVORT.js +1 -0
  74. package/dist/chunk-HSYRYSX4.js +3 -0
  75. package/dist/chunk-I3LX25MB.js +1 -0
  76. package/dist/chunk-INFBVFMU.js +4 -0
  77. package/dist/chunk-IOQQUHST.js +18 -0
  78. package/dist/chunk-IVGWFPMA.js +19 -0
  79. package/dist/chunk-IWCPQD7X.js +1382 -0
  80. package/dist/chunk-IWE4RUI7.js +1 -0
  81. package/dist/chunk-IXUVSFW2.js +1 -0
  82. package/dist/chunk-J6VTZEE2.js +15 -0
  83. package/dist/{chunk-MQNYGGAM.js → chunk-K3PGC6DC.js} +1 -1
  84. package/dist/{chunk-MBAFWQSZ.js → chunk-K77WAKOB.js} +1 -1
  85. package/dist/{chunk-UGDBJTLP.js → chunk-K7K6GNF6.js} +1 -1
  86. package/dist/chunk-KFCGMT67.js +1 -0
  87. package/dist/chunk-KLA7AWG6.js +7 -0
  88. package/dist/{chunk-6B53BWJW.js → chunk-KQU6HOJ3.js} +1 -1
  89. package/dist/{chunk-A74GETYC.js → chunk-KU5OPV7U.js} +1 -1
  90. package/dist/chunk-L2VSSINY.js +1 -0
  91. package/dist/chunk-LCCMXY6N.js +1 -0
  92. package/dist/{chunk-GOJ2QHSR.js → chunk-LITB5QQX.js} +1 -1
  93. package/dist/chunk-LKS47US7.js +8 -0
  94. package/dist/{chunk-DJONKJSZ.js → chunk-LQMSF3F7.js} +1 -1
  95. package/dist/chunk-LTWXTDDR.js +5 -0
  96. package/dist/{chunk-D6JARNEH.js → chunk-M2TJICTB.js} +1 -1
  97. package/dist/chunk-M4LOKANA.js +1 -0
  98. package/dist/chunk-M4V2OQAX.js +1 -0
  99. package/dist/chunk-MA52QGHP.js +1 -0
  100. package/dist/chunk-MFLBTJO7.js +1 -0
  101. package/dist/chunk-MGL4YM3S.js +28 -0
  102. package/dist/{chunk-6TZAAS5H.js → chunk-MIO2CV3Q.js} +1 -1
  103. package/dist/{chunk-2APPXD5Z.js → chunk-MKE434RB.js} +1 -1
  104. package/dist/chunk-MZJRNFAU.js +1 -0
  105. package/dist/{chunk-HSK7YMRE.js → chunk-N3YWHJMB.js} +11 -11
  106. package/dist/{chunk-TQYMC7TH.js → chunk-N5ROZKPZ.js} +1 -1
  107. package/dist/chunk-NBYS6YQ2.js +5 -0
  108. package/dist/chunk-NEZEHBT2.js +1 -0
  109. package/dist/chunk-NO5KVFTV.js +22 -0
  110. package/dist/{chunk-3DQIVE24.js → chunk-NP4UFPAX.js} +1 -1
  111. package/dist/chunk-NPM3MFB3.js +7 -0
  112. package/dist/{chunk-JVIKCGDY.js → chunk-NXL6LDJU.js} +1 -1
  113. package/dist/chunk-OA4P6AKS.js +1 -0
  114. package/dist/chunk-OKNBZSGN.js +2 -0
  115. package/dist/chunk-OKOYLEA7.js +278 -0
  116. package/dist/chunk-OLOBQ42K.js +1 -0
  117. package/dist/chunk-OYP7DKPU.js +1 -0
  118. package/dist/{chunk-7UYZQN4V.js → chunk-PBTXPBI6.js} +2 -2
  119. package/dist/chunk-PLQFX5ZP.js +9 -0
  120. package/dist/{chunk-JLBH7RCF.js → chunk-PS25FEBF.js} +1 -1
  121. package/dist/{chunk-OLZHWPZP.js → chunk-PSQFZAF3.js} +1 -1
  122. package/dist/chunk-PUTZFF2Z.js +613 -0
  123. package/dist/chunk-QLQGHMVU.js +15 -0
  124. package/dist/{chunk-XLELNRFF.js → chunk-QTGMS62F.js} +1 -1
  125. package/dist/chunk-R6JNXEB3.js +1 -0
  126. package/dist/chunk-RAH5NW3R.js +1 -0
  127. package/dist/{chunk-R466TU3N.js → chunk-RGNAWKD7.js} +1 -1
  128. package/dist/chunk-RL5BWZ7D.js +15 -0
  129. package/dist/{chunk-Y5JKV2AI.js → chunk-RVMB5LC2.js} +1 -1
  130. package/dist/chunk-SSM346XI.js +5 -0
  131. package/dist/chunk-T5MK7ZSF.js +1 -0
  132. package/dist/{chunk-22PCRFG4.js → chunk-TGACBJIY.js} +1 -1
  133. package/dist/{chunk-KBQ4LGFB.js → chunk-TLSAQ6FG.js} +1 -1
  134. package/dist/chunk-TNQXTZAX.js +32 -0
  135. package/dist/{chunk-ELVFJ7BR.js → chunk-TQGTEVSR.js} +1 -1
  136. package/dist/chunk-TXUTT6UA.js +17 -0
  137. package/dist/chunk-U3ZG675O.js +5 -0
  138. package/dist/chunk-UARVYVLN.js +3 -0
  139. package/dist/chunk-UBKVCI7A.js +3 -0
  140. package/dist/{chunk-SRCQVUMC.js → chunk-UCLSPAVX.js} +1 -1
  141. package/dist/chunk-ULQG3XQS.js +1 -0
  142. package/dist/chunk-UOQ75BL3.js +1 -0
  143. package/dist/{chunk-OXPWCC7I.js → chunk-UOQQNAHX.js} +2 -2
  144. package/dist/chunk-UURFVUAH.js +11 -0
  145. package/dist/chunk-VA5IUGZV.js +2 -0
  146. package/dist/{chunk-YZDDTYTU.js → chunk-VEDZUOVI.js} +3 -3
  147. package/dist/chunk-VICNWPLQ.js +567 -0
  148. package/dist/chunk-VPL2NDH6.js +370 -0
  149. package/dist/chunk-VT77EFRL.js +10 -0
  150. package/dist/chunk-VYXVYOIJ.js +3 -0
  151. package/dist/chunk-WCWNI3ZV.js +283 -0
  152. package/dist/chunk-WNGV4JQS.js +4 -0
  153. package/dist/chunk-WUK5NQSX.js +6 -0
  154. package/dist/chunk-X2TC7S57.js +103 -0
  155. package/dist/chunk-X4CV6TRE.js +1 -0
  156. package/dist/chunk-XDAOLCPN.js +4 -0
  157. package/dist/chunk-XFKCDWXB.js +5 -0
  158. package/dist/chunk-XP6IRAZN.js +1 -0
  159. package/dist/{chunk-JGXWQULI.js → chunk-XX343DDG.js} +1 -1
  160. package/dist/{chunk-Q7ING5F5.js → chunk-XXE7667M.js} +1 -1
  161. package/dist/chunk-YGMVL6NZ.js +6 -0
  162. package/dist/chunk-YJB7P2HC.js +1 -0
  163. package/dist/{chunk-P6XE4MH5.js → chunk-YS6VOQ7I.js} +1 -1
  164. package/dist/chunk-ZZYFG22L.js +26 -0
  165. package/dist/cli/commands/app/app-logs/sources.js +1 -2
  166. package/dist/cli/commands/app/build.js +1 -1
  167. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  168. package/dist/cli/commands/app/bulk/execute.js +1 -9
  169. package/dist/cli/commands/app/bulk/status.js +1 -5
  170. package/dist/cli/commands/app/config/link.js +1 -4
  171. package/dist/cli/commands/app/config/pull.js +1 -1
  172. package/dist/cli/commands/app/config/use.js +1 -1
  173. package/dist/cli/commands/app/config/validate.js +1 -3
  174. package/dist/cli/commands/app/demo/watcher.js +1 -1
  175. package/dist/cli/commands/app/deploy.js +1 -22
  176. package/dist/cli/commands/app/dev/clean.js +1 -5
  177. package/dist/cli/commands/app/dev.js +1 -320
  178. package/dist/cli/commands/app/env/pull.js +1 -11
  179. package/dist/cli/commands/app/env/show.js +1 -1
  180. package/dist/cli/commands/app/execute.js +1 -1
  181. package/dist/cli/commands/app/function/build.js +1 -1
  182. package/dist/cli/commands/app/function/info.js +1 -16
  183. package/dist/cli/commands/app/function/replay.js +1 -5
  184. package/dist/cli/commands/app/function/run.js +1 -1
  185. package/dist/cli/commands/app/function/schema.js +1 -1
  186. package/dist/cli/commands/app/function/typegen.js +1 -1
  187. package/dist/cli/commands/app/generate/extension.js +1 -5
  188. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -4
  189. package/dist/cli/commands/app/import-extensions.js +1 -1
  190. package/dist/cli/commands/app/info.js +1 -11
  191. package/dist/cli/commands/app/init.js +1 -10
  192. package/dist/cli/commands/app/logs.js +1 -2
  193. package/dist/cli/commands/app/release.js +1 -4
  194. package/dist/cli/commands/app/versions/list.js +1 -1
  195. package/dist/cli/commands/app/webhook/trigger.js +1 -25
  196. package/dist/cli/commands/auth/login.js +1 -1
  197. package/dist/cli/commands/auth/logout.js +1 -1
  198. package/dist/cli/commands/cache/clear.js +1 -1
  199. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  200. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  201. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  202. package/dist/cli/commands/debug/command-flags.js +1 -1
  203. package/dist/cli/commands/docs/generate.d.ts +0 -8
  204. package/dist/cli/commands/docs/generate.js +1 -1
  205. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  206. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  207. package/dist/cli/commands/help.js +1 -1
  208. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  209. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  210. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  211. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  212. package/dist/cli/commands/notifications/generate.js +1 -1
  213. package/dist/cli/commands/notifications/list.js +1 -1
  214. package/dist/cli/commands/organization/list.js +1 -1
  215. package/dist/cli/commands/search.js +1 -1
  216. package/dist/cli/commands/theme/check.js +1 -1
  217. package/dist/cli/commands/theme/console.js +1 -15
  218. package/dist/cli/commands/theme/delete.js +1 -7
  219. package/dist/cli/commands/theme/dev.js +1 -26
  220. package/dist/cli/commands/theme/duplicate.js +1 -32
  221. package/dist/cli/commands/theme/info.js +1 -1
  222. package/dist/cli/commands/theme/init.js +1 -8
  223. package/dist/cli/commands/theme/language-server.js +1 -1
  224. package/dist/cli/commands/theme/list.js +1 -1
  225. package/dist/cli/commands/theme/metafields/pull.js +1 -3
  226. package/dist/cli/commands/theme/open.js +1 -8
  227. package/dist/cli/commands/theme/package.js +1 -7
  228. package/dist/cli/commands/theme/preview.js +1 -1
  229. package/dist/cli/commands/theme/profile.js +1 -3
  230. package/dist/cli/commands/theme/publish.js +1 -7
  231. package/dist/cli/commands/theme/pull.js +1 -3
  232. package/dist/cli/commands/theme/push.js +1 -28
  233. package/dist/cli/commands/theme/rename.js +1 -6
  234. package/dist/cli/commands/theme/share.js +1 -3
  235. package/dist/cli/commands/upgrade.js +1 -1
  236. package/dist/cli/commands/version.js +1 -1
  237. package/dist/command-registry.js +1 -1
  238. package/dist/conf-store-6QNH5BID.js +1 -0
  239. package/dist/configs/all.yml +3 -0
  240. package/dist/configs/recommended.yml +3 -0
  241. package/dist/{custom-oclif-loader-DVFFWCBV.js → custom-oclif-loader-TSPWW5YF.js} +1 -1
  242. package/dist/data/filters.json +60 -0
  243. package/dist/data/latest.json +1 -1
  244. package/dist/data/setting.json +29 -9
  245. package/dist/data/shopify_system_translations.json +71 -19
  246. package/dist/data/tags.json +3 -3
  247. package/dist/deprecations-F6JWVV2W.js +1 -0
  248. package/dist/{devtools-OLOT2NY4.js → devtools-HCKYP7DQ.js} +1 -1
  249. package/dist/{devtools-UFRKBFGI.js → devtools-VEZNCV6W.js} +1 -1
  250. package/dist/dist-4BD6KOLR.js +1 -0
  251. package/dist/dist-AUABCVPI.js +1 -0
  252. package/dist/environments-RGLI75HN.js +1 -0
  253. package/dist/error-OZALZZ3U.js +1 -0
  254. package/dist/error-handler-V7LSEXHM.js +1 -0
  255. package/dist/{estree-KI7NUW53.js → estree-BYYJYS3A.js} +1 -1
  256. package/dist/fs-YMUQ6JLE.js +1 -0
  257. package/dist/hooks/app-init.js +1 -1
  258. package/dist/hooks/did-you-mean.js +1 -1
  259. package/dist/hooks/hydrogen-init.js +1 -1
  260. package/dist/hooks/plugin-plugins.js +1 -1
  261. package/dist/hooks/postrun.js +1 -1
  262. package/dist/hooks/prerun.js +1 -1
  263. package/dist/hooks/public-metadata.js +1 -1
  264. package/dist/hooks/sensitive-metadata.js +1 -1
  265. package/dist/hooks/tunnel-provider.js +1 -1
  266. package/dist/hooks/tunnel-start.js +1 -1
  267. package/dist/html-HETICZ2F.js +25 -0
  268. package/dist/index.js +9 -1182
  269. package/dist/is-global-BLIZ57HQ.js +1 -0
  270. package/dist/is-wsl-TN2CXYI7.js +1 -0
  271. package/dist/{latest-version-EFWBOTWM.js → latest-version-6OAYLOBL.js} +1 -1
  272. package/dist/{lib-QB6I6CTC.js → lib-AK5EOIKR.js} +1 -1
  273. package/dist/{lib-C3VO2BQW.js → lib-LVUMLZ4H.js} +1 -1
  274. package/dist/lib-ME6554NA.js +1 -0
  275. package/dist/local-GPDAXHE6.js +1 -0
  276. package/dist/local-storage-P66KJG6I.js +1 -0
  277. package/dist/{markdown-PLKL4IZK.js → markdown-5TVCXM53.js} +1 -1
  278. package/dist/{metadata-UDMOTRS7.js → metadata-TRH25EHU.js} +1 -1
  279. package/dist/{morph-EMYAITFM.js → morph-I35VYPBH.js} +4 -4
  280. package/dist/node-package-manager-GO4ZRTKQ.js +1 -0
  281. package/dist/notifications-system-HM6JZ6WJ.js +1 -0
  282. package/dist/{npa-ICFSA3NL.js → npa-VNALV7XY.js} +1 -1
  283. package/dist/output-7IYOMPSA.js +1 -0
  284. package/dist/{postcss-3FJQPJI2.js → postcss-IIK6CGAW.js} +1 -1
  285. package/dist/{prettier-NVRHEAFO.js → prettier-ZSBNNQTK.js} +1 -1
  286. package/dist/system-X5C4EQQH.js +1 -0
  287. package/dist/tsconfig.tsbuildinfo +1 -1
  288. package/dist/ui-H62CMRLG.js +1 -0
  289. package/dist/upgrade-EEOPH464.js +1 -0
  290. package/dist/version-76NBQR4K.js +1 -0
  291. package/dist/version-IGSEISUA.js +1 -0
  292. package/dist/{workerd-L2EJKIAQ.js → workerd-ST6XJKUN.js} +1 -1
  293. package/oclif.manifest.json +142 -7
  294. package/package.json +14 -11
  295. package/dist/analytics-6IHHYAV6.js +0 -1
  296. package/dist/analytics-KKVP5DT3.js +0 -1
  297. package/dist/angular-VRDO2DBE.js +0 -4
  298. package/dist/chunk-26D72ZNV.js +0 -1
  299. package/dist/chunk-2I4PRX2I.js +0 -1
  300. package/dist/chunk-2VQJQ36C.js +0 -103
  301. package/dist/chunk-323UTVMM.js +0 -1
  302. package/dist/chunk-3F6NZK7S.js +0 -2
  303. package/dist/chunk-4G7J6HIV.js +0 -1
  304. package/dist/chunk-66RJ5T7A.js +0 -102
  305. package/dist/chunk-6BMMB2UO.js +0 -1
  306. package/dist/chunk-6HBRBQAN.js +0 -6
  307. package/dist/chunk-74HYYXXE.js +0 -17
  308. package/dist/chunk-7BGM2GAH.js +0 -1
  309. package/dist/chunk-AIV5RI3X.js +0 -1
  310. package/dist/chunk-AKML26N3.js +0 -7
  311. package/dist/chunk-ALKTLKQ6.js +0 -5
  312. package/dist/chunk-B2EHO7ZC.js +0 -847
  313. package/dist/chunk-B2IVY4V5.js +0 -1
  314. package/dist/chunk-BDVAE5MS.js +0 -28
  315. package/dist/chunk-CERXUPGC.js +0 -14
  316. package/dist/chunk-D3TSJA5S.js +0 -1
  317. package/dist/chunk-DFMQWJQ3.js +0 -3
  318. package/dist/chunk-DJQVNH7P.js +0 -567
  319. package/dist/chunk-ELYP4KFP.js +0 -8
  320. package/dist/chunk-FFQ5EWII.js +0 -294
  321. package/dist/chunk-FUOIGXI4.js +0 -1
  322. package/dist/chunk-GD7FWXJ5.js +0 -2
  323. package/dist/chunk-GFEAKSGV.js +0 -374
  324. package/dist/chunk-IIIVWD4R.js +0 -1
  325. package/dist/chunk-IX5ICOBV.js +0 -7
  326. package/dist/chunk-J3KVONB3.js +0 -6
  327. package/dist/chunk-JHPRFW5B.js +0 -19
  328. package/dist/chunk-K2WUCOQJ.js +0 -32
  329. package/dist/chunk-K5YV6UVF.js +0 -4
  330. package/dist/chunk-KGXQS7LS.js +0 -1
  331. package/dist/chunk-KL5Z3T6L.js +0 -1
  332. package/dist/chunk-KNVM7N3U.js +0 -1
  333. package/dist/chunk-KWJ562F2.js +0 -12
  334. package/dist/chunk-LALIKZPS.js +0 -5
  335. package/dist/chunk-LAZJ47DZ.js +0 -6
  336. package/dist/chunk-LDGAHMS7.js +0 -159
  337. package/dist/chunk-LW7U753G.js +0 -1
  338. package/dist/chunk-LXFJDCNG.js +0 -1
  339. package/dist/chunk-N5YIPQ6J.js +0 -1
  340. package/dist/chunk-N7RBSKYT.js +0 -1
  341. package/dist/chunk-NF2ABOOU.js +0 -1
  342. package/dist/chunk-ODNGDO4H.js +0 -50
  343. package/dist/chunk-OHY4ZL3U.js +0 -2
  344. package/dist/chunk-P5VVOLGV.js +0 -1
  345. package/dist/chunk-P7R7FBY2.js +0 -3
  346. package/dist/chunk-QRRNOVJ3.js +0 -1
  347. package/dist/chunk-RFG5RMPL.js +0 -1
  348. package/dist/chunk-RVNMVBPM.js +0 -1
  349. package/dist/chunk-SBEZBZM7.js +0 -144
  350. package/dist/chunk-SGQ6D3LU.js +0 -15
  351. package/dist/chunk-TFSBQ4RY.js +0 -5
  352. package/dist/chunk-UGXYQ23Y.js +0 -1411
  353. package/dist/chunk-VS3T5YOG.js +0 -264
  354. package/dist/chunk-VWYM4OWK.js +0 -1
  355. package/dist/chunk-VY6SNDKW.js +0 -3
  356. package/dist/chunk-WFXRSKRK.js +0 -1
  357. package/dist/chunk-XBXMPFXM.js +0 -1
  358. package/dist/chunk-YC6G4MHD.js +0 -3
  359. package/dist/chunk-YI232QLS.js +0 -1
  360. package/dist/chunk-ZTMSBSYD.js +0 -1
  361. package/dist/chunk-ZV6NCNI4.js +0 -586
  362. package/dist/chunk-ZVJVDCIM.js +0 -1
  363. package/dist/conf-store-U5ZITKJN.js +0 -1
  364. package/dist/deprecations-TU5UQJVV.js +0 -1
  365. package/dist/dist-2Z5TND4U.js +0 -1
  366. package/dist/dist-GYHFDHKP.js +0 -1
  367. package/dist/environments-Z5PR7DSI.js +0 -1
  368. package/dist/error-IJGNYKZ3.js +0 -1
  369. package/dist/error-handler-WSCGNS2P.js +0 -1
  370. package/dist/fs-5BDEA2KD.js +0 -1
  371. package/dist/html-VSSXOZOQ.js +0 -25
  372. package/dist/is-global-V4ZRHQG2.js +0 -1
  373. package/dist/is-wsl-FVUIXDOK.js +0 -1
  374. package/dist/lib-5L7UKDEK.js +0 -1
  375. package/dist/local-6QPX4GCJ.js +0 -1
  376. package/dist/local-storage-JLXBZVWO.js +0 -1
  377. package/dist/node-package-manager-HAFRYGUM.js +0 -1
  378. package/dist/notifications-system-MP7WDOCS.js +0 -1
  379. package/dist/output-YGMHXEIS.js +0 -1
  380. package/dist/system-KLXD4FXF.js +0 -1
  381. package/dist/ui-GHG3UGB3.js +0 -1
  382. package/dist/upgrade-OPZGPM5J.js +0 -1
  383. package/dist/version-D5PJZIRW.js +0 -1
  384. package/dist/version-KRQBMYCH.js +0 -1
  385. /package/dist/{acorn-LOOAJL3S.js → acorn-QBS5IYTX.js} +0 -0
  386. /package/dist/{babel-URCL33XX.js → babel-JS32NLHY.js} +0 -0
  387. /package/dist/{flow-MLHT7MTJ.js → flow-M3Q2HPQT.js} +0 -0
  388. /package/dist/{glimmer-HAJ4HQCW.js → glimmer-3DEJJGOJ.js} +0 -0
  389. /package/dist/{graphql-F7IHGXDT.js → graphql-A4HHE3MB.js} +0 -0
  390. /package/dist/{meriyah-AYZQ3BGY.js → meriyah-23OZNYWC.js} +0 -0
  391. /package/dist/{typescript-ODJ335NU.js → typescript-YKZ232QT.js} +0 -0
  392. /package/dist/{yaml-BIHS2GQW.js → yaml-SJKIH3VD.js} +0 -0
@@ -1 +0,0 @@
1
- import{a as c,b as d}from"./chunk-OXPWCC7I.js";import{m as p,n as f}from"./chunk-B2EHO7ZC.js";import{d as n}from"./chunk-JPGO36XP.js";import{Ga as l,na as m}from"./chunk-GFEAKSGV.js";import{d as a}from"./chunk-IU2ZQ6TE.js";import{g as s}from"./chunk-VPRTJUIN.js";s();import{writeFile as E}from"fs/promises";var u=1024*1024,h=100,w=h*u;async function _(r,t){let e=a(t,"manifest.json");await E(e,JSON.stringify(r,null,2))}var S=["!**/*.js.map","!**/*.metafile.json"];async function b(r,t,e){let o=e??["**/*",...S];t.endsWith(".br")?await d({inputDirectory:r,outputPath:t,matchFilePattern:o}):await c({inputDirectory:r,outputZipPath:t,matchFilePattern:o})}async function C(r,t){let e=await l(t);if(e>w){let g=`${(Math.ceil(e/u*100)/100).toFixed(2)} MB`;throw new n(`Your app bundle exceeds the ${h} MB upload limit (it is ${g}).`,"Check the asset paths in your extension configuration \u2014 a misconfigured source can pull in much more than intended. Exclude large files or directories from your bundle, then try again.")}let o=p(),i=m(t);o.append("my_upload",i),await f(r,{method:"put",body:i,headers:o.getHeaders()},"slow-request")}async function N(r,t){let e=await r.generateSignedUploadUrl(t);if(!e.assetUrl||e.userErrors?.length>0){let o=e.userErrors.map(i=>i.message).join(", ");throw new n(o)}return e.assetUrl}export{_ as a,S as b,b as c,C as d,N as e};
@@ -1,6 +0,0 @@
1
- import{a as Nt,b as Mt,c as We,d as Ze}from"./chunk-3TNEIDOD.js";import{b as St}from"./chunk-LDGAHMS7.js";import{a as qt}from"./chunk-FUOIGXI4.js";import{a as _,c as f,g as i}from"./chunk-VPRTJUIN.js";var Qe=f(U=>{"use strict";i();Object.defineProperty(U,"__esModule",{value:!0});U.boolean=void 0;var Lt=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1"].includes(e.trim().toLowerCase());case"[object Number]":return e.valueOf()===1;case"[object Boolean]":return e.valueOf();default:return!1}};U.boolean=Lt});var er=f(H=>{"use strict";i();Object.defineProperty(H,"__esModule",{value:!0});H.isBooleanable=void 0;var jt=function(e){switch(Object.prototype.toString.call(e)){case"[object String]":return["true","t","yes","y","on","1","false","f","no","n","off","0"].includes(e.trim().toLowerCase());case"[object Number]":return[0,1].includes(e.valueOf());case"[object Boolean]":return!0;default:return!1}};H.isBooleanable=jt});var I=f(x=>{"use strict";i();Object.defineProperty(x,"__esModule",{value:!0});x.isBooleanable=x.boolean=void 0;var kt=Qe();Object.defineProperty(x,"boolean",{enumerable:!0,get:function(){return kt.boolean}});var Dt=er();Object.defineProperty(x,"isBooleanable",{enumerable:!0,get:function(){return Dt.isBooleanable}})});var $=f((ra,rr)=>{i();rr.exports=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"});var be=f((na,nr)=>{"use strict";i();var tr=Object.prototype.toString;nr.exports=function(r){var t=tr.call(r),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&tr.call(r.callee)==="[object Function]"),n}});var pr=f((aa,fr)=>{"use strict";i();var cr;Object.keys||(S=Object.prototype.hasOwnProperty,he=Object.prototype.toString,or=be(),_e=Object.prototype.propertyIsEnumerable,ar=!_e.call({toString:null},"toString"),ir=_e.call(function(){},"prototype"),N=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],B=function(e){var r=e.constructor;return r&&r.prototype===e},sr={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},ur=(function(){if(typeof window>"u")return!1;for(var e in window)try{if(!sr["$"+e]&&S.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{B(window[e])}catch{return!0}}catch{return!0}return!1})(),lr=function(e){if(typeof window>"u"||!ur)return B(e);try{return B(e)}catch{return!1}},cr=function(r){var t=r!==null&&typeof r=="object",n=he.call(r)==="[object Function]",s=or(r),o=t&&he.call(r)==="[object String]",u=[];if(!t&&!n&&!s)throw new TypeError("Object.keys called on a non-object");var c=ir&&n;if(o&&r.length>0&&!S.call(r,0))for(var l=0;l<r.length;++l)u.push(String(l));if(s&&r.length>0)for(var y=0;y<r.length;++y)u.push(String(y));else for(var a in r)!(c&&a==="prototype")&&S.call(r,a)&&u.push(String(a));if(ar)for(var g=lr(r),d=0;d<N.length;++d)!(g&&N[d]==="constructor")&&S.call(r,N[d])&&u.push(N[d]);return u});var S,he,or,_e,ar,ir,N,B,sr,ur,lr;fr.exports=cr});var br=f((sa,yr)=>{"use strict";i();var Ct=Array.prototype.slice,Gt=be(),dr=Object.keys,X=dr?function(r){return dr(r)}:pr(),gr=Object.keys;X.shim=function(){if(Object.keys){var r=(function(){var t=Object.keys(arguments);return t&&t.length===arguments.length})(1,2);r||(Object.keys=function(n){return Gt(n)?gr(Ct.call(n)):gr(n)})}else Object.keys=X;return Object.keys||X};yr.exports=X});var mr=f((la,vr)=>{"use strict";i();var hr=Ze(),Ut=Nt(),A=Mt(),_r=We();vr.exports=function(r,t,n){if(!r||typeof r!="object"&&typeof r!="function")throw new A("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new A("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new A("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new A("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new A("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new A("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,l=!!_r&&_r(r,t);if(hr)hr(r,t,{configurable:u===null&&l?l.configurable:!u,enumerable:s===null&&l?l.enumerable:!s,value:n,writable:o===null&&l?l.writable:!o});else if(c||!s&&!o&&!u)r[t]=n;else throw new Ut("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var wr=f((fa,Pr)=>{"use strict";i();var ve=Ze(),Or=function(){return!!ve};Or.hasArrayLengthDefineBug=function(){if(!ve)return null;try{return ve([],"length",{value:1}).length!==1}catch{return!0}};Pr.exports=Or});var me=f((da,Er)=>{"use strict";i();var Ht=br(),It=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",$t=Object.prototype.toString,Bt=Array.prototype.concat,xr=mr(),Xt=function(e){return typeof e=="function"&&$t.call(e)==="[object Function]"},Ar=wr()(),Yt=function(e,r,t,n){if(r in e){if(n===!0){if(e[r]===t)return}else if(!Xt(n)||!n())return}Ar?xr(e,r,t,!0):xr(e,r,t)},Tr=function(e,r){var t=arguments.length>2?arguments[2]:{},n=Ht(r);It&&(n=Bt.call(n,Object.getOwnPropertySymbols(r)));for(var s=0;s<n.length;s+=1)Yt(e,n[s],r[n[s]],t[n[s]])};Tr.supportsDescriptors=!!Ar;Er.exports=Tr});var Oe=f((ya,Rr)=>{"use strict";i();Rr.exports=global});var Pe=f((ha,qr)=>{"use strict";i();var zt=Oe();qr.exports=function(){return typeof global!="object"||!global||global.Math!==Math||global.Array!==Array?zt:global}});var Nr=f((va,Sr)=>{"use strict";i();var Ft=me(),Vt=We(),Jt=Pe();Sr.exports=function(){var r=Jt();if(Ft.supportsDescriptors){var t=Vt(r,"globalThis");(!t||t.configurable&&(t.enumerable||!t.writable||globalThis!==r))&&Object.defineProperty(r,"globalThis",{configurable:!0,enumerable:!1,value:r,writable:!0})}else(typeof globalThis!="object"||globalThis!==r)&&(r.globalThis=r);return r}});var we=f((Oa,jr)=>{"use strict";i();var Kt=me(),Wt=Oe(),Mr=Pe(),Zt=Nr(),Qt=Mr(),Lr=function(){return Qt};Kt(Lr,{getPolyfill:Mr,implementation:Wt,shim:Zt});jr.exports=Lr});var Cr=f((xe,Dr)=>{i();xe=Dr.exports=en;xe.getSerialize=kr;function en(e,r,t,n){return JSON.stringify(e,kr(r,n),t)}function kr(e,r){var t=[],n=[];return r==null&&(r=function(s,o){return t[0]===o?"[Circular ~]":"[Circular ~."+n.slice(0,t.indexOf(o)).join(".")+"]"}),function(s,o){if(t.length>0){var u=t.indexOf(this);~u?t.splice(u+1):t.push(this),~u?n.splice(u,1/0,s):n.push(s),~t.indexOf(o)&&(o=r.call(this,s,o))}else t.push(o);return e==null?o:e.call(this,s,o)}}});var Gr=f(Y=>{i();(function(){"use strict";var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function r(u){return n(o(u),arguments)}function t(u,c){return r.apply(null,[u].concat(c||[]))}function n(u,c){var l=1,y=u.length,a,g="",d,b,p,m,O,w,G,P;for(d=0;d<y;d++)if(typeof u[d]=="string")g+=u[d];else if(typeof u[d]=="object"){if(p=u[d],p.keys)for(a=c[l],b=0;b<p.keys.length;b++){if(a==null)throw new Error(r('[sprintf] Cannot access property "%s" of undefined value "%s"',p.keys[b],p.keys[b-1]));a=a[p.keys[b]]}else p.param_no?a=c[p.param_no]:a=c[l++];if(e.not_type.test(p.type)&&e.not_primitive.test(p.type)&&a instanceof Function&&(a=a()),e.numeric_arg.test(p.type)&&typeof a!="number"&&isNaN(a))throw new TypeError(r("[sprintf] expecting number but found %T",a));switch(e.number.test(p.type)&&(G=a>=0),p.type){case"b":a=parseInt(a,10).toString(2);break;case"c":a=String.fromCharCode(parseInt(a,10));break;case"d":case"i":a=parseInt(a,10);break;case"j":a=JSON.stringify(a,null,p.width?parseInt(p.width):0);break;case"e":a=p.precision?parseFloat(a).toExponential(p.precision):parseFloat(a).toExponential();break;case"f":a=p.precision?parseFloat(a).toFixed(p.precision):parseFloat(a);break;case"g":a=p.precision?String(Number(a.toPrecision(p.precision))):parseFloat(a);break;case"o":a=(parseInt(a,10)>>>0).toString(8);break;case"s":a=String(a),a=p.precision?a.substring(0,p.precision):a;break;case"t":a=String(!!a),a=p.precision?a.substring(0,p.precision):a;break;case"T":a=Object.prototype.toString.call(a).slice(8,-1).toLowerCase(),a=p.precision?a.substring(0,p.precision):a;break;case"u":a=parseInt(a,10)>>>0;break;case"v":a=a.valueOf(),a=p.precision?a.substring(0,p.precision):a;break;case"x":a=(parseInt(a,10)>>>0).toString(16);break;case"X":a=(parseInt(a,10)>>>0).toString(16).toUpperCase();break}e.json.test(p.type)?g+=a:(e.number.test(p.type)&&(!G||p.sign)?(P=G?"+":"-",a=a.toString().replace(e.sign,"")):P="",O=p.pad_char?p.pad_char==="0"?"0":p.pad_char.charAt(1):" ",w=p.width-(P+a).length,m=p.width&&w>0?O.repeat(w):"",g+=p.align?P+a+m:O==="0"?P+m+a:m+P+a)}return g}var s=Object.create(null);function o(u){if(s[u])return s[u];for(var c=u,l,y=[],a=0;c;){if((l=e.text.exec(c))!==null)y.push(l[0]);else if((l=e.modulo.exec(c))!==null)y.push("%");else if((l=e.placeholder.exec(c))!==null){if(l[2]){a|=1;var g=[],d=l[2],b=[];if((b=e.key.exec(d))!==null)for(g.push(b[1]);(d=d.substring(b[0].length))!=="";)if((b=e.key_access.exec(d))!==null)g.push(b[1]);else if((b=e.index_access.exec(d))!==null)g.push(b[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");l[2]=g}else a|=2;if(a===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");y.push({placeholder:l[0],param_no:l[1],keys:l[2],sign:l[3],pad_char:l[4],align:l[5],width:l[6],precision:l[7],type:l[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");c=c.substring(l[0].length)}return s[u]=y}typeof Y<"u"&&(Y.sprintf=r,Y.vsprintf=t),typeof window<"u"&&(window.sprintf=r,window.vsprintf=t,typeof define=="function"&&define.amd&&define(function(){return{sprintf:r,vsprintf:t}}))})()});var Ae=f(z=>{"use strict";i();Object.defineProperty(z,"__esModule",{value:!0});z.logLevels=void 0;var rn={debug:20,error:50,fatal:60,info:30,trace:10,warn:40};z.logLevels=rn});var Ir=f(V=>{"use strict";i();Object.defineProperty(V,"__esModule",{value:!0});V.default=void 0;var tn=qe($()),nn=qe(we()),on=qe(Cr()),Te=Gr(),Ur=Ae();function qe(e){return e&&e.__esModule?e:{default:e}}function Ee(){return Ee=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Ee.apply(this,arguments)}function Hr(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,n)}return t}function h(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Hr(Object(t),!0).forEach(function(n){an(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Hr(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function an(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var sn=(0,nn.default)(),M;tn.default&&(M=_("domain"));var un=()=>{if(!M)return{};let e=[],r=process.domain;if(!r||!r.parentDomain)return{};for(;r&&r.parentDomain;)r=r.parentDomain,r.roarr&&r.roarr.context&&e.push(r.roarr.context);let t={};for(let n of e)t=h(h({},t),n);return t},F=()=>{if(!M)return{};let e=process.domain;if(e&&e.roarr&&e.roarr.context)return e.roarr.context;if(!e||!e.parentDomain)return{};for(;e&&e.parentDomain;)if(e=e.parentDomain,e.roarr&&e.roarr.context)return e.roarr.context;return{}},Re=(e,r)=>{let t=(n,s,o,u,c,l,y,a,g,d)=>{let b=Date.now(),p=sn.ROARR.sequence++,m,O;if(typeof n=="string"){m=h(h({},F()),r||{});let w=Ee({},{a:n,b:s,c:o,d:u,e:c,f:l,g:y,h:a,i:g,k:d});O=Object.keys(w).map(ye=>w[ye]).reduce((ye,Rt)=>ye+=typeof Rt>"u"?0:1,0)===1?(0,Te.sprintf)("%s",n):(0,Te.sprintf)(n,s,o,u,c,l,y,a,g,d)}else{if(typeof s!="string")throw new TypeError("Message must be a string.");m=JSON.parse((0,on.default)(h(h(h({},F()),r||{}),n))),O=(0,Te.sprintf)(s,o,u,c,l,y,a,g,d)}e({context:m,message:O,sequence:p,time:b,version:"1.0.0"})};t.child=n=>typeof n=="function"?Re(s=>{if(typeof n!="function")throw new TypeError("Unexpected state.");e(n(s))},r):Re(e,h(h(h({},F()),r),n)),t.getContext=()=>h(h({},F()),r||{}),t.adopt=async(n,s)=>{if(!M)return n();let o=M.create();return o.run(()=>(o.roarr={context:h(h({},un()),s)},n()))};for(let n of Object.keys(Ur.logLevels))t[n]=(s,o,u,c,l,y,a,g,d,b)=>t.child({logLevel:Ur.logLevels[n]})(s,o,u,c,l,y,a,g,d,b);return t},ln=Re;V.default=ln});var Xr=f(J=>{"use strict";i();Object.defineProperty(J,"__esModule",{value:!0});J.default=void 0;var $r=Ae(),Br=(e,r)=>{let t=(n,s,o,u,c,l,y,a,g,d)=>{};t.adopt=async n=>n(),t.child=n=>Br(e,r),t.getContext=()=>({});for(let n of Object.keys($r.logLevels))t[n]=(s,o,u,c,l,y,a,g,d,b)=>t.child({logLevel:$r.logLevels[n]})(s,o,u,c,l,y,a,g,d,b);return t},cn=Br;J.default=cn});var zr=f((Ma,Yr)=>{i();Yr.exports=function(r,t){for(var n=r.split("."),s=t.split("."),o=0;o<3;o++){var u=Number(n[o]),c=Number(s[o]);if(u>c)return 1;if(c>u)return-1;if(!isNaN(u)&&isNaN(c))return 1;if(isNaN(u)&&!isNaN(c))return-1}return 0}});var Fr=f((ja,fn)=>{fn.exports={author:{email:"gajus@gajus.com",name:"Gajus Kuizinas",url:"http://gajus.com"},ava:{babel:{compileAsTests:["test/helpers/**/*"]},files:["test/roarr/**/*"],require:["@babel/register"]},dependencies:{boolean:"^3.0.1","detect-node":"^2.0.4",globalthis:"^1.0.1","json-stringify-safe":"^5.0.1","semver-compare":"^1.0.0","sprintf-js":"^1.1.2"},description:"JSON logger for Node.js and browser.",devDependencies:{"@ava/babel":"^1.0.1","@babel/cli":"^7.11.6","@babel/core":"^7.11.6","@babel/node":"^7.10.5","@babel/plugin-transform-flow-strip-types":"^7.10.4","@babel/preset-env":"^7.11.5","@babel/register":"^7.11.5",ava:"^3.12.1","babel-plugin-istanbul":"^6.0.0","babel-plugin-transform-export-default-name":"^2.0.4",coveralls:"^3.1.0","domain-parent":"^1.0.0",eslint:"^7.9.0","eslint-config-canonical":"^24.1.1","flow-bin":"^0.133.0","flow-copy-source":"^2.0.9",gitdown:"^3.1.3",husky:"^4.3.0",nyc:"^15.1.0","semantic-release":"^17.1.1"},engines:{node:">=8.0"},husky:{hooks:{"pre-commit":"npm run lint && npm run test && npm run build","pre-push":"gitdown ./.README/README.md --output-file ./README.md --check"}},keywords:["log","logger","json"],main:"./dist/log.js",name:"roarr",nyc:{include:["src/**/*.js"],instrument:!1,reporter:["text-lcov"],require:["@babel/register"],sourceMap:!1},license:"BSD-3-Clause",repository:{type:"git",url:"git@github.com:gajus/roarr.git"},scripts:{build:"rm -fr ./dist && NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps && flow-copy-source src dist","create-readme":"gitdown ./.README/README.md --output-file ./README.md",dev:"NODE_ENV=production babel ./src --out-dir ./dist --copy-files --source-maps --watch",lint:"eslint ./src ./test && flow",test:"NODE_ENV=test ava --serial --verbose"},version:"2.15.4"}});var Vr=f(K=>{"use strict";i();Object.defineProperty(K,"__esModule",{value:!0});K.default=void 0;var pn=e=>({write:r=>{e.write(r+`
2
- `)}}),dn=()=>{let r=(process.env.ROARR_STREAM||"STDOUT").toUpperCase().toUpperCase()==="STDOUT"?process.stdout:process.stderr;return pn(r)},gn=dn;K.default=gn});var Kr=f(Z=>{"use strict";i();Object.defineProperty(Z,"__esModule",{value:!0});Z.default=void 0;var yn=Me($()),Se=Me(zr()),Ne=Fr(),bn=Me(Vr());function Me(e){return e&&e.__esModule?e:{default:e}}function Jr(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,n)}return t}function W(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?Jr(Object(t),!0).forEach(function(n){hn(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Jr(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function hn(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}var _n=e=>{let r=(e.versions||[]).concat();r.sort(Se.default);let t=!r.length||(0,Se.default)(Ne.version,r[r.length-1])===1;r.includes(Ne.version)||r.push(Ne.version),r.sort(Se.default);let n=W(W({sequence:0},e),{},{versions:r});return yn.default&&(t||!n.write)&&(n=W(W({},n),(0,bn.default)())),n},vn=_n;Z.default=vn});var Wr=f(L=>{"use strict";i();Object.defineProperty(L,"__esModule",{value:!0});Object.defineProperty(L,"createLogger",{enumerable:!0,get:function(){return mn.default}});Object.defineProperty(L,"createMockLogger",{enumerable:!0,get:function(){return On.default}});Object.defineProperty(L,"createRoarrInititialGlobalState",{enumerable:!0,get:function(){return Pn.default}});var mn=Le(Ir()),On=Le(Xr()),Pn=Le(Kr());function Le(e){return e&&e.__esModule?e:{default:e}}});var rt=f(T=>{"use strict";i();Object.defineProperty(T,"__esModule",{value:!0});T.default=T.ROARR=void 0;var wn=I(),xn=Qr($()),An=Qr(we()),ke=Wr();function Qr(e){return e&&e.__esModule?e:{default:e}}var Zr=(0,An.default)(),je=Zr.ROARR=(0,ke.createRoarrInititialGlobalState)(Zr.ROARR||{});T.ROARR=je;var et=ke.createLogger;xn.default&&((0,wn.boolean)(process.env.ROARR_LOG||"")||(et=ke.createMockLogger));var Tn=et(e=>{if(je.write){let r=JSON.stringify(e);je.write(r)}});T.default=Tn});var j=f(Q=>{"use strict";i();Object.defineProperty(Q,"__esModule",{value:!0});Q.default=void 0;var En=Rn(rt());function Rn(e){return e&&e.__esModule?e:{default:e}}var qn=En.default.child({package:"global-agent"}),Sn=qn;Q.default=Sn});var nt=f((Ya,tt)=>{"use strict";i();var De=class e extends Error{constructor(r){super(e._prepareSuperMessage(r)),Object.defineProperty(this,"name",{value:"NonError",configurable:!0,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(this,e)}static _prepareSuperMessage(r){try{return JSON.stringify(r)}catch{return String(r)}}},Nn=[{property:"name",enumerable:!1},{property:"message",enumerable:!1},{property:"stack",enumerable:!1},{property:"code",enumerable:!0}],Ce=({from:e,seen:r,to_:t,forceEnumerable:n})=>{let s=t||(Array.isArray(e)?[]:{});r.push(e);for(let[o,u]of Object.entries(e))if(typeof u!="function"){if(!u||typeof u!="object"){s[o]=u;continue}if(!r.includes(e[o])){s[o]=Ce({from:e[o],seen:r.slice(),forceEnumerable:n});continue}s[o]="[Circular]"}for(let{property:o,enumerable:u}of Nn)typeof e[o]=="string"&&Object.defineProperty(s,o,{value:e[o],enumerable:n?!0:u,configurable:!0,writable:!0});return s},Mn=e=>typeof e=="object"&&e!==null?Ce({from:e,seen:[],forceEnumerable:!0}):typeof e=="function"?`[Function: ${e.name||"anonymous"}]`:e,Ln=e=>{if(e instanceof Error)return e;if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let r=new Error;return Ce({from:e,seen:[],to_:r}),r}return new De(e)};tt.exports={serializeError:Mn,deserializeError:Ln}});var re=f(ee=>{"use strict";i();Object.defineProperty(ee,"__esModule",{value:!0});ee.default=void 0;var ot=nt(),jn=I(),kn=Dn(j());function Dn(e){return e&&e.__esModule?e:{default:e}}var v=kn.default.child({namespace:"Agent"}),Cn=0,Ge=class{constructor(r,t,n,s,o){this.fallbackAgent=s,this.isProxyConfigured=r,this.mustUrlUseProxy=t,this.getUrlProxy=n,this.socketConnectionTimeout=o}addRequest(r,t){let n;if(r.path.startsWith("http://")||r.path.startsWith("https://")?n=r.path:n=this.protocol+"//"+(t.hostname||t.host)+(t.port===80||t.port===443?"":":"+t.port)+r.path,!this.isProxyConfigured()){v.trace({destination:n},"not proxying request; GLOBAL_AGENT.HTTP_PROXY is not configured"),this.fallbackAgent.addRequest(r,t);return}if(!this.mustUrlUseProxy(n)){v.trace({destination:n},"not proxying request; url matches GLOBAL_AGENT.NO_PROXY"),this.fallbackAgent.addRequest(r,t);return}let s=Cn++,o=this.getUrlProxy(n);this.protocol==="http:"&&(r.path=n,o.authorization&&r.setHeader("proxy-authorization","Basic "+Buffer.from(o.authorization).toString("base64"))),v.trace({destination:n,proxy:"http://"+o.hostname+":"+o.port,requestId:s},"proxying request"),r.on("error",c=>{v.error({error:(0,ot.serializeError)(c)},"request error")}),r.once("response",c=>{v.trace({headers:c.headers,requestId:s,statusCode:c.statusCode},"proxying response")}),r.shouldKeepAlive=!1;let u={host:t.hostname||t.host,port:t.port||80,proxy:o,tls:{}};this.protocol==="https:"&&(u.tls={ca:t.ca,cert:t.cert,ciphers:t.ciphers,clientCertEngine:t.clientCertEngine,crl:t.crl,dhparam:t.dhparam,ecdhCurve:t.ecdhCurve,honorCipherOrder:t.honorCipherOrder,key:t.key,passphrase:t.passphrase,pfx:t.pfx,rejectUnauthorized:t.rejectUnauthorized,secureOptions:t.secureOptions,secureProtocol:t.secureProtocol,servername:t.servername||u.host,sessionIdContext:t.sessionIdContext},typeof process.env.NODE_TLS_REJECT_UNAUTHORIZED=="string"&&(0,jn.boolean)(process.env.NODE_TLS_REJECT_UNAUTHORIZED)===!1&&(u.tls.rejectUnauthorized=!1)),this.createConnection(u,(c,l)=>{v.trace({target:u},"connecting"),l&&(l.setTimeout(this.socketConnectionTimeout,()=>{l.destroy()}),l.once("connect",()=>{v.trace({target:u},"connected"),l.setTimeout(0)}),l.once("secureConnect",()=>{v.trace({target:u},"connected (secure)"),l.setTimeout(0)})),c?r.emit("error",c):(v.debug("created socket"),l.on("error",y=>{v.error({error:(0,ot.serializeError)(y)},"socket error")}),r.onSocket(l))})}},Gn=Ge;ee.default=Gn});var it=f(te=>{"use strict";i();Object.defineProperty(te,"__esModule",{value:!0});te.default=void 0;var Un=at(_("net")),Hn=at(re());function at(e){return e&&e.__esModule?e:{default:e}}var Ue=class extends Hn.default{constructor(...r){super(...r),this.protocol="http:",this.defaultPort=80}createConnection(r,t){let n=Un.default.connect(r.proxy.port,r.proxy.hostname);t(null,n)}},In=Ue;te.default=In});var st=f(ne=>{"use strict";i();Object.defineProperty(ne,"__esModule",{value:!0});ne.default=void 0;var $n=Ie(_("net")),Bn=Ie(_("tls")),Xn=Ie(re());function Ie(e){return e&&e.__esModule?e:{default:e}}var He=class extends Xn.default{constructor(...r){super(...r),this.protocol="https:",this.defaultPort=443}createConnection(r,t){let n=$n.default.connect(r.proxy.port,r.proxy.hostname);n.on("error",o=>{t(o)}),n.once("data",()=>{let o=Bn.default.connect({...r.tls,socket:n});t(null,o)});let s="";s+="CONNECT "+r.host+":"+r.port+` HTTP/1.1\r
3
- `,s+="Host: "+r.host+":"+r.port+`\r
4
- `,r.proxy.authorization&&(s+="Proxy-Authorization: Basic "+Buffer.from(r.proxy.authorization).toString("base64")+`\r
5
- `),s+=`\r
6
- `,n.write(s)}},Yn=He;ne.default=Yn});var ut=f(k=>{"use strict";i();Object.defineProperty(k,"__esModule",{value:!0});Object.defineProperty(k,"Agent",{enumerable:!0,get:function(){return zn.default}});Object.defineProperty(k,"HttpProxyAgent",{enumerable:!0,get:function(){return Fn.default}});Object.defineProperty(k,"HttpsProxyAgent",{enumerable:!0,get:function(){return Vn.default}});var zn=$e(re()),Fn=$e(it()),Vn=$e(st());function $e(e){return e&&e.__esModule?e:{default:e}}});var ft=f((oe,ct)=>{"use strict";i();Object.defineProperty(oe,"__esModule",{value:!0});function Jn(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function lt(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r&&(typeof r=="object"||typeof r=="function")?r:e}function Kn(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)}function Wn(e){function r(){e.apply(this,arguments)}return r.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e,r}var Zn=(function(e){Kn(r,e);function r(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";Jn(this,r);var n=lt(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,t));return Object.defineProperty(n,"message",{configurable:!0,enumerable:!1,value:t,writable:!0}),Object.defineProperty(n,"name",{configurable:!0,enumerable:!1,value:n.constructor.name,writable:!0}),Error.hasOwnProperty("captureStackTrace")?(Error.captureStackTrace(n,n.constructor),lt(n)):(Object.defineProperty(n,"stack",{configurable:!0,enumerable:!1,value:new Error(t).stack,writable:!0}),n)}return r})(Wn(Error));oe.default=Zn;ct.exports=oe.default});var ie=f(ae=>{"use strict";i();Object.defineProperty(ae,"__esModule",{value:!0});ae.UnexpectedStateError=void 0;var Qn=eo(ft());function eo(e){return e&&e.__esModule?e:{default:e}}var Be=class extends Qn.default{constructor(r,t="UNEXPECTED_STATE_ERROR"){super(r),this.code=t}};ae.UnexpectedStateError=Be});var dt=f(se=>{"use strict";i();Object.defineProperty(se,"__esModule",{value:!0});se.default=void 0;var ro=pt(_("http")),to=pt(_("https"));function pt(e){return e&&e.__esModule?e:{default:e}}var no=(e,r,t)=>(...n)=>{let s,o,u;return typeof n[0]=="string"||n[0]instanceof URL?(s=n[0],typeof n[1]=="function"?(o={},u=n[1]):(o={...n[1]},u=n[2])):(o={...n[0]},u=n[1]),t?o.agent=r:(o.agent||(o.agent=r),(o.agent===ro.default.globalAgent||o.agent===to.default.globalAgent)&&(o.agent=r)),s?e(s,o,u):e(o,u)},oo=no;se.default=oo});var yt=f((ii,Ye)=>{"use strict";i();var ao=St(),Xe=new Map;function gt(e,r){r={caseSensitive:!1,...r};let t=e+JSON.stringify(r);if(Xe.has(t))return Xe.get(t);let n=e[0]==="!";n&&(e=e.slice(1)),e=ao(e).replace(/\\\*/g,"[\\s\\S]*");let s=new RegExp(`^${e}$`,r.caseSensitive?"":"i");return s.negated=n,Xe.set(t,s),s}Ye.exports=(e,r,t)=>{if(!(Array.isArray(e)&&Array.isArray(r)))throw new TypeError(`Expected two arrays, got ${typeof e} ${typeof r}`);if(r.length===0)return e;let n=r[0][0]==="!";r=r.map(o=>gt(o,t));let s=[];for(let o of e){let u=n;for(let c of r)c.test(o)&&(u=!c.negated);u&&s.push(o)}return s};Ye.exports.isMatch=(e,r,t)=>{let n=Array.isArray(e)?e:[e],s=Array.isArray(r)?r:[r];return n.some(o=>s.every(u=>{let c=gt(u,t),l=c.test(o);return c.negated?!l:l}))}});var ht=f(ue=>{"use strict";i();Object.defineProperty(ue,"__esModule",{value:!0});ue.default=void 0;var io=_("url"),so=uo(yt()),bt=ie();function uo(e){return e&&e.__esModule?e:{default:e}}var lo=(e,r)=>{let t=(0,io.parse)(e),n=r.split(/[\s,]+/);for(let s of n){let o=s.replace(/^(?<leadingDot>\.)/,"*").match(/^(?<hostname>.+?)(?::(?<port>\d+))?$/);if(!o||!o.groups)throw new bt.UnexpectedStateError("Invalid NO_PROXY pattern.");if(!o.groups.hostname)throw new bt.UnexpectedStateError("NO_PROXY entry pattern must include hostname. Use * to match any hostname.");if(so.default.isMatch(t.hostname,o.groups.hostname)&&(!o.groups||!o.groups.port||t.port&&t.port===o.groups.port))return!0}return!1},co=lo;ue.default=co});var _t=f(le=>{"use strict";i();Object.defineProperty(le,"__esModule",{value:!0});le.default=void 0;var fo=_("url"),ze=ie(),po=e=>{let r=(0,fo.parse)(e);if(r.query!==null)throw new ze.UnexpectedStateError("Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have query.");if(r.hash!==null)throw new ze.UnexpectedStateError("Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL must not have hash.");if(r.protocol!=="http:")throw new ze.UnexpectedStateError('Unsupported `GLOBAL_AGENT.HTTP_PROXY` configuration value: URL protocol must be "http:".');let t=80;return r.port&&(t=Number.parseInt(r.port,10)),{authorization:r.auth||null,hostname:r.hostname,port:t}},go=po;le.default=go});var vt=f(D=>{"use strict";i();Object.defineProperty(D,"__esModule",{value:!0});Object.defineProperty(D,"bindHttpMethod",{enumerable:!0,get:function(){return yo.default}});Object.defineProperty(D,"isUrlMatchingNoProxy",{enumerable:!0,get:function(){return bo.default}});Object.defineProperty(D,"parseProxyUrl",{enumerable:!0,get:function(){return ho.default}});var yo=Fe(dt()),bo=Fe(ht()),ho=Fe(_t());function Fe(e){return e&&e.__esModule?e:{default:e}}});var Ve=f(ce=>{"use strict";i();Object.defineProperty(ce,"__esModule",{value:!0});ce.default=void 0;var _o=vo(j());function vo(e){return e&&e.__esModule?e:{default:e}}var mo=_o.default.child({namespace:"createProxyController"}),Oo=["HTTP_PROXY","HTTPS_PROXY","NO_PROXY"],Po=()=>new Proxy({HTTP_PROXY:null,HTTPS_PROXY:null,NO_PROXY:null},{set:(e,r,t)=>{if(!Oo.includes(r))throw new Error('Cannot set an unmapped property "'+r+'".');return e[r]=t,mo.info({change:{name:r,value:t},newConfiguration:e},"configuration changed"),!0}}),wo=Po;ce.default=wo});var xt=f(fe=>{"use strict";i();Object.defineProperty(fe,"__esModule",{value:!0});fe.default=void 0;var R=C(_("http")),q=C(_("https")),xo=I(),mt=C(qt()),Ao=C(j()),Ot=ut(),To=ie(),E=vt(),Eo=C(Ve());function C(e){return e&&e.__esModule?e:{default:e}}var Ro=R.default.get,qo=R.default.request,So=q.default.get,No=q.default.request,Pt=Ao.default.child({namespace:"createGlobalProxyAgent"}),wt={environmentVariableNamespace:void 0,forceGlobalAgent:void 0,socketConnectionTimeout:6e4},Mo=e=>{let r=Object.keys(e),t={};for(let n of r){let s=e[n];s!==void 0&&(t[n]=s)}return t},Lo=e=>{let r=process.env;return{...{environmentVariableNamespace:typeof r.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE=="string"?r.GLOBAL_AGENT_ENVIRONMENT_VARIABLE_NAMESPACE:"GLOBAL_AGENT_",forceGlobalAgent:typeof r.GLOBAL_AGENT_FORCE_GLOBAL_AGENT=="string"?(0,xo.boolean)(r.GLOBAL_AGENT_FORCE_GLOBAL_AGENT):!0,socketConnectionTimeout:typeof r.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT=="string"?Number.parseInt(r.GLOBAL_AGENT_SOCKET_CONNECTION_TIMEOUT,10):wt.socketConnectionTimeout},...Mo(e)}},jo=(e=wt)=>{let r=Lo(e),t=(0,Eo.default)();t.HTTP_PROXY=process.env[r.environmentVariableNamespace+"HTTP_PROXY"]||null,t.HTTPS_PROXY=process.env[r.environmentVariableNamespace+"HTTPS_PROXY"]||null,t.NO_PROXY=process.env[r.environmentVariableNamespace+"NO_PROXY"]||null,Pt.info({configuration:r,state:t},"global agent has been initialized");let n=g=>d=>g()?t.NO_PROXY?!(0,E.isUrlMatchingNoProxy)(d,t.NO_PROXY):!0:!1,s=g=>()=>{let d=g();if(!d)throw new To.UnexpectedStateError("HTTP(S) proxy must be configured.");return(0,E.parseProxyUrl)(d)},o=()=>t.HTTP_PROXY,u=class extends Ot.HttpProxyAgent{constructor(){super(()=>o(),n(o),s(o),R.default.globalAgent,r.socketConnectionTimeout)}},c=new u,l=()=>t.HTTPS_PROXY||t.HTTP_PROXY,y=class extends Ot.HttpsProxyAgent{constructor(){super(()=>l(),n(l),s(l),q.default.globalAgent,r.socketConnectionTimeout)}},a=new y;return mt.default.gte(process.version,"v11.7.0")&&(R.default.globalAgent=c,q.default.globalAgent=a),mt.default.gte(process.version,"v10.0.0")?(R.default.get=(0,E.bindHttpMethod)(Ro,c,r.forceGlobalAgent),R.default.request=(0,E.bindHttpMethod)(qo,c,r.forceGlobalAgent),q.default.get=(0,E.bindHttpMethod)(So,a,r.forceGlobalAgent),q.default.request=(0,E.bindHttpMethod)(No,a,r.forceGlobalAgent)):Pt.warn("attempt to initialize global-agent in unsupported Node.js version was ignored"),t},ko=jo;fe.default=ko});var Je=f(pe=>{"use strict";i();Object.defineProperty(pe,"__esModule",{value:!0});Object.defineProperty(pe,"createGlobalProxyAgent",{enumerable:!0,get:function(){return Do.default}});Object.defineProperty(pe,"createProxyController",{enumerable:!0,get:function(){return Co.default}});var Do=At(xt()),Co=At(Ve());function At(e){return e&&e.__esModule?e:{default:e}}});var Tt=f(de=>{"use strict";i();Object.defineProperty(de,"__esModule",{value:!0});de.default=void 0;var Go=Ho(j()),Uo=Je();function Ho(e){return e&&e.__esModule?e:{default:e}}var Io=Go.default.child({namespace:"bootstrap"}),$o=e=>global.GLOBAL_AGENT?(Io.warn("found global.GLOBAL_AGENT; second attempt to bootstrap global-agent was ignored"),!1):(global.GLOBAL_AGENT=(0,Uo.createGlobalProxyAgent)(e),!0),Bo=$o;de.default=Bo});var Et=f(Ke=>{"use strict";i();Object.defineProperty(Ke,"__esModule",{value:!0});Object.defineProperty(Ke,"bootstrap",{enumerable:!0,get:function(){return Xo.default}});var Xo=Yo(Tt());function Yo(e){return e&&e.__esModule?e:{default:e}}});var Vo=f(ge=>{"use strict";i();Object.defineProperty(ge,"__esModule",{value:!0});Object.defineProperty(ge,"bootstrap",{enumerable:!0,get:function(){return zo.bootstrap}});Object.defineProperty(ge,"createGlobalProxyAgent",{enumerable:!0,get:function(){return Fo.createGlobalProxyAgent}});var zo=Et(),Fo=Je()});export{Vo as a};
@@ -1,17 +0,0 @@
1
- import{a as A,h as $,k as b}from"./chunk-2VQJQ36C.js";import{e as w,f as v}from"./chunk-KWJ562F2.js";import{e as y}from"./chunk-KNVM7N3U.js";import{l as E,m as C}from"./chunk-RFG5RMPL.js";import{xa as T}from"./chunk-B2EHO7ZC.js";import{Qb as p}from"./chunk-GFEAKSGV.js";import{g as S}from"./chunk-VPRTJUIN.js";S();var P=20,_=1024*1024,B=2;function oe(t,e,r,o,s={},l){let n=A(r),i=new Map,c=a=>a.total===0?"[100%]":`[${Math.round(a.current/a.total*100)}%]`,u=j(t,e,n),f=Promise.all([o.ready(),u]).then(()=>L(n,o,t,e,i)),h=f.then(a=>a.promise).then(()=>M(n,o,t,e,s,i)),k=s?.deferPartialWork?u:h.then(a=>a.promise);return s?.backgroundWorkCatch&&Promise.all([u,f.then(a=>a.promise),h.then(a=>a.promise)]).catch(s.backgroundWorkCatch),{uploadResults:i,workPromise:k,renderThemeSyncProgress:async()=>{if(s?.deferPartialWork)return;let{progress:a,promise:m}=await f,d=s.multiEnvironment?4e3:1e3;await y(U({promise:m,titleGetter:()=>`Uploading files to remote theme ${c(a)}`,updateInterval:d}),l?.stderr,s?.multiEnvironment);let{progress:g,promise:F}=await h;await y(U({promise:F,titleGetter:()=>`Cleaning your remote theme ${c(g)}`,updateInterval:d}),l?.stderr,s?.multiEnvironment),await y([{title:"Theme upload complete",task:async()=>{}}],l?.stderr,s?.multiEnvironment),N(i,s?.environment)}}}function U({promise:t,titleGetter:e,updateInterval:r}){let o=[],s=()=>{o.push({title:e(),task:async()=>{await Promise.race([t,new Promise(n=>setTimeout(()=>n("timeout"),r))])==="timeout"&&s()}})};return s(),o}function M(t,e,r,o,s,l){if(s.nodelete)return{progress:{current:0,total:0},promise:Promise.resolve()};let n=W(t,e),i=z(n),c={current:0,total:i.length};if(i.length===0)return{progress:c,promise:Promise.resolve()};let u=[];for(let h=0;h<i.length;h+=P){let k=i.slice(h,h+P),a=E(r.id,k.map(m=>m.key),o).then(m=>{m.forEach(d=>{if(l.set(d.key,d),!d.success){let g=d.errors?.asset?.map(F=>`-${F}`).join(`
2
- `);v(d.key,"delete")(new Error(`Failed to delete ${d.key}: ${g}`))}}),c.current+=k.length});u.push(a)}let f=Promise.all(u).then(()=>{c.current=c.total});return{progress:c,promise:f}}function W(t,e){let o=e.applyIgnoreFilters(t).filter(s=>!e.files.has(s.key));return p(`Files to be deleted:
3
- ${o.map(s=>`-${s.key}`).join(`
4
- `)}`),o}function z(t){let e=b(t);return[...e.contextualizedJsonFiles,...e.templateJsonFiles,...e.sectionJsonFiles,...e.otherJsonFiles,...e.sectionLiquidFiles,...e.blockLiquidFiles,...e.layoutFiles,...e.otherLiquidFiles,...e.configDataFile,...e.configSchemaFile,...e.staticAssetFiles]}var J=[{key:"config/settings_schema.json",value:"[]"},{key:"layout/password.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"},{key:"layout/theme.liquid",value:"{{ content_for_header }}{{ content_for_layout }}"}];async function j(t,e,r){let o=new Set(r.map(l=>l.key)),s=J.filter(({key:l})=>!o.has(l));s.length>0&&await C(t.id,s,e)}function L(t,e,r,o,s){let l=x(e,t);e.unsyncedFileKeys.clear(),l.forEach(a=>e.unsyncedFileKeys.add(a.key));let{independentFiles:n,dependentFiles:i}=D(l),c={current:0,total:l.length},u=a=>a.length===0?Promise.resolve():Promise.all(q(a).map(m=>O(m,e,o,r.id,s).then(()=>{c.current+=m.length,m.forEach(d=>e.unsyncedFileKeys.delete(d.key))}))).then(()=>{}),f=i.reduce((a,m)=>a.then(()=>u(m)),Promise.resolve()),h=Promise.resolve().then(()=>u(n.flat())),k=Promise.all([f,h]).then(()=>{c.current=c.total});return{progress:c,promise:k}}function x(t,e){let r=I(t),o=t.applyIgnoreFilters(r),s=new Map(e.map(n=>[n.key,n])),l=o.filter(n=>{let i=s.get(n.key);return!i||i.checksum!==n.checksum});return p(`Files to be uploaded:
5
- ${l.map(n=>`-${n.key}`).join(`
6
- `)}`),l}function D(t){let e=b(t);return{independentFiles:[e.otherLiquidFiles,e.otherJsonFiles,e.staticAssetFiles],dependentFiles:[e.configSchemaFile,e.layoutFiles,e.blockLiquidFiles,e.sectionLiquidFiles,e.sectionJsonFiles,e.templateJsonFiles,e.contextualizedJsonFiles,e.configDataFile]}}function q(t){let e=[],r=[],o=0;for(let s of t){let l=r.length>=P,n=o>=_;(l||n)&&(e.push(r),r=[],o=0),r.push(s),o+=s.size??0}return r.length>0&&e.push(r),e}function I(t){let e=[];return t.files.forEach((r,o)=>{let s=r.value?Buffer.byteLength(r.value,"utf8"):r.attachment?.length??0;e.push({key:o,checksum:r.checksum,size:s})}),e}async function O(t,e,r,o,s){let l=t.map(i=>{let c=e.files.get(i.key)?.value,u=e.files.get(i.key)?.attachment;return{key:i.key,...c&&{value:c},...u&&{attachment:u}}});p(`Uploading the following files:
7
- ${t.map(i=>`-${i.key}`).join(`
8
- `)}`),(await R(l,o,r)).forEach(i=>{s.set(i.key,i),G(i,e,o)})}function G(t,e,r){if(t.success)e.uploadErrors.delete(t.key);else{let o=t.errors?.asset??["Response was not successful."];e.uploadErrors.set(t.key,o),$(r,t.key)}}async function R(t,e,r,o=0){if(t.length===0)return[];o>0&&p(`Retry Attempt ${o}/${B} for the following files:
9
- ${t.map(n=>`-${n.key}`).join(`
10
- `)}`);let s=await C(e,t,r);p(`File Upload Results:
11
- ${s.map(n=>`-${n.key}: ${n.success?"success":"failure"}`).join(`
12
- `)}`);let l=s.filter(n=>!n.success);if(l.length>0){p(`The following files failed to upload:
13
- ${l.map(i=>`-${i.key}`).join(`
14
- `)}`);let n=await K(l,t,e,r,o);return s.concat(n)}return s}async function K(t,e,r,o,s){let l=new Set(t.map(i=>i.key)),n=e.filter(i=>l.has(i.key));return s===B?(T("theme-service:upload-failed-retry:max-retry"),p(`Max retry count reached for the following files:
15
- ${n.map(i=>`-${i.key}`).join(`
16
- `)}`),t):(T(`theme-service:upload-failed-retry:${n.length}`),R(n,r,o,s+1))}function N(t,e){for(let[r,o]of t.entries())if(!o.success){let s=o.errors?.asset?.join(`
17
- `)??"File upload failed",l=e?`[${e}] ${r}`:r;w(l,new Error(s))}}export{oe as a};
@@ -1 +0,0 @@
1
- import{g as I}from"./chunk-VPRTJUIN.js";I();var o="4.0.0";export{o as a};
@@ -1 +0,0 @@
1
- import{n as a}from"./chunk-B2EHO7ZC.js";import{d as i}from"./chunk-JPGO36XP.js";import{g as s}from"./chunk-VPRTJUIN.js";s();var e={LOCALHOST:"localhost",HTTP:"http",PUBSUB:"google-pub-sub",EVENTBRIDGE:"event-bridge"},g={LOCALHOST:new RegExp("^http:","i"),HTTP:new RegExp("^https:","i"),PUBSUB:new RegExp("^pubsub:"),EVENTBRIDGE:new RegExp("^arn:aws:events:")};function p(t,n){let r=T(t);return r===e.LOCALHOST&&n===e.HTTP?!0:r===n}function f(t){return g.LOCALHOST.test(t)?new URL(t.toLowerCase()).hostname==="localhost":!1}function w(t,n){if(!p(t,n))throw new i(`Can't deliver your webhook payload to this address using '${n}'`,"Use a valid URL for address",l(n));let r=n;return f(t)&&(r=e.LOCALHOST),[t.trim(),r]}function l(t){return t===e.HTTP?["For remote HTTP testing, use a URL that starts with https://","For local HTTP testing, use http://localhost:{port}/{url-path}"]:t===e.PUBSUB?["For Google Pub/Sub, use pubsub://{project-id}:{topic-id}"]:t===e.EVENTBRIDGE?["For Amazon EventBridge, use an Amazon Resource Name (ARN) starting with arn:aws:events:"]:[]}function d(t,n){if(n.includes(t))return t;throw new i(`Api Version '${t}' does not exist`,`Allowed values: ${n.join(", ")}`,["Try again with a valid api-version value"])}function E(t,n,r){if(r.length===0)throw new i(`No topics found for '${n}'`);let o=c(t.trim(),r);if(o===void 0)throw new i(`Topic '${t}' does not exist for ApiVersion '${n}'`,`Allowed values: ${r.join(", ")}`,["Try again with a valid api-version - topic pair"]);return o}function c(t,n){return n.includes(t)?t:n.find(r=>r.toUpperCase().replace("/","_")===t)}function T(t){if(t){if(t.startsWith("pubsub:"))return e.PUBSUB;if(t.startsWith("arn:aws:events:"))return e.EVENTBRIDGE;if(f(t))return e.LOCALHOST;if(g.HTTP.test(t))return e.HTTP}}s();async function H(t,n,r){let o={method:"POST",body:n,headers:{"Content-Type":"application/json",...JSON.parse(r)}},u=await a(t,o);return u.status>=200&&u.status<300}export{H as a,e as b,p as c,w as d,d as e,E as f,T as g};
@@ -1,7 +0,0 @@
1
- import{a as g,c as E,e as H,g as d}from"./chunk-VPRTJUIN.js";var ze=E((gr,Ve)=>{"use strict";d();var{Duplex:Kt}=g("stream");function $e(t){t.emit("close")}function Xt(){!this.destroyed&&this._writableState.finished&&this.destroy()}function je(t){this.removeListener("error",je),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function Zt(t,e){let s=!0,r=new Kt({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(n,o){let f=!o&&r._readableState.objectMode?n.toString():n;r.push(f)||t.pause()}),t.once("error",function(n){r.destroyed||(s=!1,r.destroy(n))}),t.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(i,n){if(t.readyState===t.CLOSED){n(i),process.nextTick($e,r);return}let o=!1;t.once("error",function(l){o=!0,n(l)}),t.once("close",function(){o||n(i),process.nextTick($e,r)}),s&&t.terminate()},r._final=function(i){if(t.readyState===t.CONNECTING){t.once("open",function(){r._final(i)});return}t._socket!==null&&(t._socket._writableState.finished?(i(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",function(){i()}),t.close()))},r._read=function(){t.isPaused&&t.resume()},r._write=function(i,n,o){if(t.readyState===t.CONNECTING){t.once("open",function(){r._write(i,n,o)});return}t.send(i,o)},r.on("end",Xt),r.on("error",je),r}Ve.exports=Zt});var k=E((Sr,Ke)=>{"use strict";d();var He=["nodebuffer","arraybuffer","fragments"],Ye=typeof Blob<"u";Ye&&He.push("blob");Ke.exports={BINARY_TYPES:He,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Ye,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Y=E((Er,re)=>{"use strict";d();var{EMPTY_BUFFER:Qt}=k(),ye=Buffer[Symbol.species];function Jt(t,e){if(t.length===0)return Qt;if(t.length===1)return t[0];let s=Buffer.allocUnsafe(e),r=0;for(let i=0;i<t.length;i++){let n=t[i];s.set(n,r),r+=n.length}return r<e?new ye(s.buffer,s.byteOffset,r):s}function Xe(t,e,s,r,i){for(let n=0;n<i;n++)s[r+n]=t[n]^e[n&3]}function Ze(t,e){for(let s=0;s<t.length;s++)t[s]^=e[s&3]}function es(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}function Se(t){if(Se.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new ye(t):ArrayBuffer.isView(t)?e=new ye(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),Se.readOnly=!1),e}re.exports={concat:Jt,mask:Xe,toArrayBuffer:es,toBuffer:Se,unmask:Ze};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=g("bufferutil");re.exports.mask=function(e,s,r,i,n){n<48?Xe(e,s,r,i,n):t.mask(e,s,r,i,n)},re.exports.unmask=function(e,s){e.length<32?Ze(e,s):t.unmask(e,s)}}catch{}});var et=E((br,Je)=>{"use strict";d();var Qe=Symbol("kDone"),xe=Symbol("kRun"),Ee=class{constructor(e){this[Qe]=()=>{this.pending--,this[xe]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[xe]()}[xe](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Qe])}}};Je.exports=Ee});var Z=E((Or,it)=>{"use strict";d();var K=g("zlib"),tt=Y(),ts=et(),{kStatusCode:st}=k(),ss=Buffer[Symbol.species],rs=Buffer.from([0,0,255,255]),oe=Symbol("permessage-deflate"),C=Symbol("total-length"),X=Symbol("callback"),P=Symbol("buffers"),ne=Symbol("error"),ie,ve=class{constructor(e,s,r){if(this._maxPayload=r|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!s,this._deflate=null,this._inflate=null,this.params=null,!ie){let i=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ie=new ts(i)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[X];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let s=this._options,r=e.find(i=>!(s.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(s.serverMaxWindowBits===!1||typeof s.serverMaxWindowBits=="number"&&s.serverMaxWindowBits>i.server_max_window_bits)||typeof s.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return s.serverNoContextTakeover&&(r.server_no_context_takeover=!0),s.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof s.serverMaxWindowBits=="number"&&(r.server_max_window_bits=s.serverMaxWindowBits),typeof s.clientMaxWindowBits=="number"?r.client_max_window_bits=s.clientMaxWindowBits:(r.client_max_window_bits===!0||s.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let s=e[0];if(this._options.clientNoContextTakeover===!1&&s.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!s.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(s.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&s.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return s}normalizeParams(e){return e.forEach(s=>{Object.keys(s).forEach(r=>{let i=s[r];if(i.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(i=i[0],r==="client_max_window_bits"){if(i!==!0){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else if(r==="server_max_window_bits"){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else throw new Error(`Unknown parameter "${r}"`);s[r]=i})}),e}decompress(e,s,r){ie.add(i=>{this._decompress(e,s,(n,o)=>{i(),r(n,o)})})}compress(e,s,r){ie.add(i=>{this._compress(e,s,(n,o)=>{i(),r(n,o)})})}_decompress(e,s,r){let i=this._isServer?"client":"server";if(!this._inflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?K.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=K.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[oe]=this,this._inflate[C]=0,this._inflate[P]=[],this._inflate.on("error",ns),this._inflate.on("data",rt)}this._inflate[X]=r,this._inflate.write(e),s&&this._inflate.write(rs),this._inflate.flush(()=>{let n=this._inflate[ne];if(n){this._inflate.close(),this._inflate=null,r(n);return}let o=tt.concat(this._inflate[P],this._inflate[C]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[C]=0,this._inflate[P]=[],s&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),r(null,o)})}_compress(e,s,r){let i=this._isServer?"server":"client";if(!this._deflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?K.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=K.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[C]=0,this._deflate[P]=[],this._deflate.on("data",is)}this._deflate[X]=r,this._deflate.write(e),this._deflate.flush(K.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=tt.concat(this._deflate[P],this._deflate[C]);s&&(n=new ss(n.buffer,n.byteOffset,n.length-4)),this._deflate[X]=null,this._deflate[C]=0,this._deflate[P]=[],s&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),r(null,n)})}};it.exports=ve;function is(t){this[P].push(t),this[C]+=t.length}function rt(t){if(this[C]+=t.length,this[oe]._maxPayload<1||this[C]<=this[oe]._maxPayload){this[P].push(t);return}this[ne]=new RangeError("Max payload size exceeded"),this[ne].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[ne][st]=1009,this.removeListener("data",rt),this.reset()}function ns(t){this[oe]._inflate=null,t[st]=1007,this[X](t)}});var F=E((kr,ae)=>{"use strict";d();var{isUtf8:nt}=g("buffer"),{hasBlob:os}=k(),as=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function fs(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function be(t){let e=t.length,s=0;for(;s<e;)if((t[s]&128)===0)s++;else if((t[s]&224)===192){if(s+1===e||(t[s+1]&192)!==128||(t[s]&254)===192)return!1;s+=2}else if((t[s]&240)===224){if(s+2>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||t[s]===224&&(t[s+1]&224)===128||t[s]===237&&(t[s+1]&224)===160)return!1;s+=3}else if((t[s]&248)===240){if(s+3>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||(t[s+3]&192)!==128||t[s]===240&&(t[s+1]&240)===128||t[s]===244&&t[s+1]>143||t[s]>244)return!1;s+=4}else return!1;return!0}function ls(t){return os&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}ae.exports={isBlob:ls,isValidStatusCode:fs,isValidUTF8:be,tokenChars:as};if(nt)ae.exports.isValidUTF8=function(t){return t.length<24?be(t):nt(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=g("utf-8-validate");ae.exports.isValidUTF8=function(e){return e.length<32?be(e):t(e)}}catch{}});var Ce=E((Lr,ut)=>{"use strict";d();var{Writable:hs}=g("stream"),ot=Z(),{BINARY_TYPES:cs,EMPTY_BUFFER:at,kStatusCode:us,kWebSocket:ds}=k(),{concat:we,toArrayBuffer:_s,unmask:ps}=Y(),{isValidStatusCode:ms,isValidUTF8:ft}=F(),fe=Buffer[Symbol.species],b=0,lt=1,ht=2,ct=3,Oe=4,Te=5,le=6,ke=class extends hs{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||cs[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[ds]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=b}_write(e,s,r){if(this._opcode===8&&this._state==b)return r();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new fe(r.buffer,r.byteOffset+e,r.length-e),new fe(r.buffer,r.byteOffset,e)}let s=Buffer.allocUnsafe(e);do{let r=this._buffers[0],i=s.length-e;e>=r.length?s.set(this._buffers.shift(),i):(s.set(new Uint8Array(r.buffer,r.byteOffset,e),i),this._buffers[0]=new fe(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return s}startLoop(e){this._loop=!0;do switch(this._state){case b:this.getInfo(e);break;case lt:this.getPayloadLength16(e);break;case ht:this.getPayloadLength64(e);break;case ct:this.getMask();break;case Oe:this.getData(e);break;case Te:case le:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let s=this.consume(2);if((s[0]&48)!==0){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let r=(s[0]&64)===64;if(r&&!this._extensions[ot.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(s[0]&128)===128,this._opcode=s[0]&15,this._payloadLength=s[1]&127,this._opcode===0){if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(s[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=lt:this._payloadLength===127?this._state=ht:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let s=this.consume(8),r=s.readUInt32BE(0);if(r>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=r*Math.pow(2,32)+s.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(s);return}this._masked?this._state=ct:this._state=Oe}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Oe}getData(e){let s=at;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}s=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&ps(s,this._mask)}if(this._opcode>7){this.controlMessage(s,e);return}if(this._compressed){this._state=Te,this.decompress(s,e);return}s.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(s)),this.dataMessage(e)}decompress(e,s){this._extensions[ot.extensionName].decompress(e,this._fin,(i,n)=>{if(i)return s(i);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");s(o);return}this._fragments.push(n)}this.dataMessage(s),this._state===b&&this.startLoop(s)})}dataMessage(e){if(!this._fin){this._state=b;return}let s=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=we(r,s):this._binaryType==="arraybuffer"?i=_s(we(r,s)):this._binaryType==="blob"?i=new Blob(r):i=r,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=b):(this._state=le,setImmediate(()=>{this.emit("message",i,!0),this._state=b,this.startLoop(e)}))}else{let i=we(r,s);if(!this._skipUTF8Validation&&!ft(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(n);return}this._state===Te||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=b):(this._state=le,setImmediate(()=>{this.emit("message",i,!1),this._state=b,this.startLoop(e)}))}}controlMessage(e,s){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,at),this.end();else{let r=e.readUInt16BE(0);if(!ms(r)){let n=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");s(n);return}let i=new fe(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!ft(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");s(n);return}this._loop=!1,this.emit("conclude",r,i),this.end()}this._state=b;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=b):(this._state=le,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=b,this.startLoop(s)}))}createError(e,s,r,i,n){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${s}`:s);return Error.captureStackTrace(o,this.createError),o.code=n,o[us]=i,o}};ut.exports=ke});var Pe=E((Br,pt)=>{"use strict";d();var{Duplex:Pr}=g("stream"),{randomFillSync:gs}=g("crypto"),dt=Z(),{EMPTY_BUFFER:ys,kWebSocket:Ss,NOOP:xs}=k(),{isBlob:q,isValidStatusCode:Es}=F(),{mask:_t,toBuffer:R}=Y(),w=Symbol("kByteLength"),vs=Buffer.alloc(4),he=8*1024,U,G=he,O=0,bs=1,ws=2,Le=class t{constructor(e,s,r){this._extensions=s||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=O,this.onerror=xs,this[Ss]=void 0}static frame(e,s){let r,i=!1,n=2,o=!1;s.mask&&(r=s.maskBuffer||vs,s.generateMask?s.generateMask(r):(G===he&&(U===void 0&&(U=Buffer.alloc(he)),gs(U,0,he),G=0),r[0]=U[G++],r[1]=U[G++],r[2]=U[G++],r[3]=U[G++]),o=(r[0]|r[1]|r[2]|r[3])===0,n=6);let f;typeof e=="string"?(!s.mask||o)&&s[w]!==void 0?f=s[w]:(e=Buffer.from(e),f=e.length):(f=e.length,i=s.mask&&s.readOnly&&!o);let l=f;f>=65536?(n+=8,l=127):f>125&&(n+=2,l=126);let a=Buffer.allocUnsafe(i?f+n:n);return a[0]=s.fin?s.opcode|128:s.opcode,s.rsv1&&(a[0]|=64),a[1]=l,l===126?a.writeUInt16BE(f,2):l===127&&(a[2]=a[3]=0,a.writeUIntBE(f,4,6)),s.mask?(a[1]|=128,a[n-4]=r[0],a[n-3]=r[1],a[n-2]=r[2],a[n-1]=r[3],o?[a,e]:i?(_t(e,r,a,n,f),[a]):(_t(e,r,e,0,f),[a,e])):[a,e]}close(e,s,r,i){let n;if(e===void 0)n=ys;else{if(typeof e!="number"||!Es(e))throw new TypeError("First argument must be a valid error code number");if(s===void 0||!s.length)n=Buffer.allocUnsafe(2),n.writeUInt16BE(e,0);else{let f=Buffer.byteLength(s);if(f>123)throw new RangeError("The message must not be greater than 123 bytes");n=Buffer.allocUnsafe(2+f),n.writeUInt16BE(e,0),typeof s=="string"?n.write(s,2):n.set(s,2)}}let o={[w]:n.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==O?this.enqueue([this.dispatch,n,!1,o,i]):this.sendFrame(t.frame(n,o),i)}ping(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):q(e)?(i=e.size,n=!1):(e=R(e),i=e.length,n=R.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[w]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};q(e)?this._state!==O?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==O?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}pong(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):q(e)?(i=e.size,n=!1):(e=R(e),i=e.length,n=R.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[w]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};q(e)?this._state!==O?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==O?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}send(e,s,r){let i=this._extensions[dt.extensionName],n=s.binary?2:1,o=s.compress,f,l;typeof e=="string"?(f=Buffer.byteLength(e),l=!1):q(e)?(f=e.size,l=!1):(e=R(e),f=e.length,l=R.readOnly),this._firstFragment?(this._firstFragment=!1,o&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=f>=i._threshold),this._compress=o):(o=!1,n=0),s.fin&&(this._firstFragment=!0);let a={[w]:f,fin:s.fin,generateMask:this._generateMask,mask:s.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:l,rsv1:o};q(e)?this._state!==O?this.enqueue([this.getBlobData,e,this._compress,a,r]):this.getBlobData(e,this._compress,a,r):this._state!==O?this.enqueue([this.dispatch,e,this._compress,a,r]):this.dispatch(e,this._compress,a,r)}getBlobData(e,s,r,i){this._bufferedBytes+=r[w],this._state=ws,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let f=new Error("The socket was closed while the blob was being read");process.nextTick(Ne,this,f,i);return}this._bufferedBytes-=r[w];let o=R(n);s?this.dispatch(o,s,r,i):(this._state=O,this.sendFrame(t.frame(o,r),i),this.dequeue())}).catch(n=>{process.nextTick(Os,this,n,i)})}dispatch(e,s,r,i){if(!s){this.sendFrame(t.frame(e,r),i);return}let n=this._extensions[dt.extensionName];this._bufferedBytes+=r[w],this._state=bs,n.compress(e,r.fin,(o,f)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");Ne(this,l,i);return}this._bufferedBytes-=r[w],this._state=O,r.readOnly=!1,this.sendFrame(t.frame(f,r),i),this.dequeue()})}dequeue(){for(;this._state===O&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][w],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][w],this._queue.push(e)}sendFrame(e,s){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],s),this._socket.uncork()):this._socket.write(e[0],s)}};pt.exports=Le;function Ne(t,e,s){typeof s=="function"&&s(e);for(let r=0;r<t._queue.length;r++){let i=t._queue[r],n=i[i.length-1];typeof n=="function"&&n(e)}}function Os(t,e,s){Ne(t,e,s),t.onerror(e)}});var wt=E((Ur,bt)=>{"use strict";d();var{kForOnEventAttribute:Q,kListener:Be}=k(),mt=Symbol("kCode"),gt=Symbol("kData"),yt=Symbol("kError"),St=Symbol("kMessage"),xt=Symbol("kReason"),$=Symbol("kTarget"),Et=Symbol("kType"),vt=Symbol("kWasClean"),L=class{constructor(e){this[$]=null,this[Et]=e}get target(){return this[$]}get type(){return this[Et]}};Object.defineProperty(L.prototype,"target",{enumerable:!0});Object.defineProperty(L.prototype,"type",{enumerable:!0});var I=class extends L{constructor(e,s={}){super(e),this[mt]=s.code===void 0?0:s.code,this[xt]=s.reason===void 0?"":s.reason,this[vt]=s.wasClean===void 0?!1:s.wasClean}get code(){return this[mt]}get reason(){return this[xt]}get wasClean(){return this[vt]}};Object.defineProperty(I.prototype,"code",{enumerable:!0});Object.defineProperty(I.prototype,"reason",{enumerable:!0});Object.defineProperty(I.prototype,"wasClean",{enumerable:!0});var j=class extends L{constructor(e,s={}){super(e),this[yt]=s.error===void 0?null:s.error,this[St]=s.message===void 0?"":s.message}get error(){return this[yt]}get message(){return this[St]}};Object.defineProperty(j.prototype,"error",{enumerable:!0});Object.defineProperty(j.prototype,"message",{enumerable:!0});var J=class extends L{constructor(e,s={}){super(e),this[gt]=s.data===void 0?null:s.data}get data(){return this[gt]}};Object.defineProperty(J.prototype,"data",{enumerable:!0});var Ts={addEventListener(t,e,s={}){for(let i of this.listeners(t))if(!s[Q]&&i[Be]===e&&!i[Q])return;let r;if(t==="message")r=function(n,o){let f=new J("message",{data:o?n:n.toString()});f[$]=this,ce(e,this,f)};else if(t==="close")r=function(n,o){let f=new I("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});f[$]=this,ce(e,this,f)};else if(t==="error")r=function(n){let o=new j("error",{error:n,message:n.message});o[$]=this,ce(e,this,o)};else if(t==="open")r=function(){let n=new L("open");n[$]=this,ce(e,this,n)};else return;r[Q]=!!s[Q],r[Be]=e,s.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(let s of this.listeners(t))if(s[Be]===e&&!s[Q]){this.removeListener(t,s);break}}};bt.exports={CloseEvent:I,ErrorEvent:j,Event:L,EventTarget:Ts,MessageEvent:J};function ce(t,e,s){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,s):t.call(e,s)}});var Re=E((Dr,Ot)=>{"use strict";d();var{tokenChars:ee}=F();function T(t,e,s){t[e]===void 0?t[e]=[s]:t[e].push(s)}function ks(t){let e=Object.create(null),s=Object.create(null),r=!1,i=!1,n=!1,o,f,l=-1,a=-1,h=-1,c=0;for(;c<t.length;c++)if(a=t.charCodeAt(c),o===void 0)if(h===-1&&ee[a]===1)l===-1&&(l=c);else if(c!==0&&(a===32||a===9))h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let y=t.slice(l,h);a===44?(T(e,y,s),s=Object.create(null)):o=y,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(f===void 0)if(h===-1&&ee[a]===1)l===-1&&(l=c);else if(a===32||a===9)h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c),T(s,t.slice(l,h),!0),a===44&&(T(e,o,s),s=Object.create(null),o=void 0),l=h=-1}else if(a===61&&l!==-1&&h===-1)f=t.slice(l,c),l=h=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(i){if(ee[a]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1?l=c:r||(r=!0),i=!1}else if(n)if(ee[a]===1)l===-1&&(l=c);else if(a===34&&l!==-1)n=!1,h=c;else if(a===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(a===34&&t.charCodeAt(c-1)===61)n=!0;else if(h===-1&&ee[a]===1)l===-1&&(l=c);else if(l!==-1&&(a===32||a===9))h===-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let y=t.slice(l,h);r&&(y=y.replace(/\\/g,""),r=!1),T(s,f,y),a===44&&(T(e,o,s),s=Object.create(null),o=void 0),f=void 0,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(l===-1||n||a===32||a===9)throw new SyntaxError("Unexpected end of input");h===-1&&(h=c);let p=t.slice(l,h);return o===void 0?T(e,p,s):(f===void 0?T(s,p,!0):r?T(s,f,p.replace(/\\/g,"")):T(s,f,p),T(e,o,s)),e}function Cs(t){return Object.keys(t).map(e=>{let s=t[e];return Array.isArray(s)||(s=[s]),s.map(r=>[e].concat(Object.keys(r).map(i=>{let n=r[i];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?i:`${i}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}Ot.exports={format:Cs,parse:ks}});var Ae=E((Fr,Mt)=>{"use strict";d();var Ls=g("events"),Ns=g("https"),Ps=g("http"),Ct=g("net"),Bs=g("tls"),{randomBytes:Rs,createHash:Us}=g("crypto"),{Duplex:Ar,Readable:Wr}=g("stream"),{URL:Ue}=g("url"),B=Z(),Is=Ce(),Ds=Pe(),{isBlob:Ms}=F(),{BINARY_TYPES:Tt,EMPTY_BUFFER:ue,GUID:As,kForOnEventAttribute:Ie,kListener:Ws,kStatusCode:Fs,kWebSocket:S,NOOP:Lt}=k(),{EventTarget:{addEventListener:qs,removeEventListener:Gs}}=wt(),{format:$s,parse:js}=Re(),{toBuffer:Vs}=Y(),zs=30*1e3,Nt=Symbol("kAborted"),De=[8,13],N=["CONNECTING","OPEN","CLOSING","CLOSED"],Hs=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,_=class t extends Ls{constructor(e,s,r){super(),this._binaryType=Tt[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ue,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,s===void 0?s=[]:Array.isArray(s)||(typeof s=="object"&&s!==null?(r=s,s=[]):s=[s]),Pt(this,e,s,r)):(this._autoPong=r.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Tt.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,s,r){let i=new Is({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),n=new Ds(e,this._extensions,r.generateMask);this._receiver=i,this._sender=n,this._socket=e,i[S]=this,n[S]=this,e[S]=this,i.on("conclude",Xs),i.on("drain",Zs),i.on("error",Qs),i.on("message",Js),i.on("ping",er),i.on("pong",tr),n.onerror=sr,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),s.length>0&&e.unshift(s),e.on("close",Ut),e.on("data",_e),e.on("end",It),e.on("error",Dt),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[B.extensionName]&&this._extensions[B.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,s){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){v(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,s,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Rt(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Me(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.ping(e||ue,s,r)}pong(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Me(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.pong(e||ue,s,r)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof s=="function"&&(r=s,s={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Me(this,e,r);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...s};this._extensions[B.extensionName]||(i.compress=!1),this._sender.send(e||ue,i,r)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){v(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(_,"CONNECTING",{enumerable:!0,value:N.indexOf("CONNECTING")});Object.defineProperty(_.prototype,"CONNECTING",{enumerable:!0,value:N.indexOf("CONNECTING")});Object.defineProperty(_,"OPEN",{enumerable:!0,value:N.indexOf("OPEN")});Object.defineProperty(_.prototype,"OPEN",{enumerable:!0,value:N.indexOf("OPEN")});Object.defineProperty(_,"CLOSING",{enumerable:!0,value:N.indexOf("CLOSING")});Object.defineProperty(_.prototype,"CLOSING",{enumerable:!0,value:N.indexOf("CLOSING")});Object.defineProperty(_,"CLOSED",{enumerable:!0,value:N.indexOf("CLOSED")});Object.defineProperty(_.prototype,"CLOSED",{enumerable:!0,value:N.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(_.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(_.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[Ie])return e[Ws];return null},set(e){for(let s of this.listeners(t))if(s[Ie]){this.removeListener(t,s);break}typeof e=="function"&&this.addEventListener(t,e,{[Ie]:!0})}})});_.prototype.addEventListener=qs;_.prototype.removeEventListener=Gs;Mt.exports=_;function Pt(t,e,s,r){let i={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:De[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=i.autoPong,!De.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${De.join(", ")})`);let n;if(e instanceof Ue)n=e;else try{n=new Ue(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),t._url=n.href;let o=n.protocol==="wss:",f=n.protocol==="ws+unix:",l;if(n.protocol!=="ws:"&&!o&&!f?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:f&&!n.pathname?l="The URL's pathname is empty":n.hash&&(l="The URL contains a fragment identifier"),l){let u=new SyntaxError(l);if(t._redirects===0)throw u;de(t,u);return}let a=o?443:80,h=Rs(16).toString("base64"),c=o?Ns.request:Ps.request,p=new Set,y;if(i.createConnection=i.createConnection||(o?Ks:Ys),i.defaultPort=i.defaultPort||a,i.port=n.port||a,i.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":h,Connection:"Upgrade",Upgrade:"websocket"},i.path=n.pathname+n.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(y=new B(i.perMessageDeflate!==!0?i.perMessageDeflate:{},!1,i.maxPayload),i.headers["Sec-WebSocket-Extensions"]=$s({[B.extensionName]:y.offer()})),s.length){for(let u of s){if(typeof u!="string"||!Hs.test(u)||p.has(u))throw new SyntaxError("An invalid or duplicated subprotocol was specified");p.add(u)}i.headers["Sec-WebSocket-Protocol"]=s.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(n.username||n.password)&&(i.auth=`${n.username}:${n.password}`),f){let u=i.path.split(":");i.socketPath=u[0],i.path=u[1]}let m;if(i.followRedirects){if(t._redirects===0){t._originalIpc=f,t._originalSecure=o,t._originalHostOrSocketPath=f?i.socketPath:n.host;let u=r&&r.headers;if(r={...r,headers:{}},u)for(let[x,A]of Object.entries(u))r.headers[x.toLowerCase()]=A}else if(t.listenerCount("redirect")===0){let u=f?t._originalIpc?i.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:n.host===t._originalHostOrSocketPath;(!u||t._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,u||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),m=t._req=c(i),t._redirects&&t.emit("redirect",t.url,m)}else m=t._req=c(i);i.timeout&&m.on("timeout",()=>{v(t,m,"Opening handshake has timed out")}),m.on("error",u=>{m===null||m[Nt]||(m=t._req=null,de(t,u))}),m.on("response",u=>{let x=u.headers.location,A=u.statusCode;if(x&&i.followRedirects&&A>=300&&A<400){if(++t._redirects>i.maxRedirects){v(t,m,"Maximum redirects exceeded");return}m.abort();let V;try{V=new Ue(x,e)}catch{let W=new SyntaxError(`Invalid URL: ${x}`);de(t,W);return}Pt(t,V,s,r)}else t.emit("unexpected-response",m,u)||v(t,m,`Unexpected server response: ${u.statusCode}`)}),m.on("upgrade",(u,x,A)=>{if(t.emit("upgrade",u),t.readyState!==_.CONNECTING)return;m=t._req=null;let V=u.headers.upgrade;if(V===void 0||V.toLowerCase()!=="websocket"){v(t,x,"Invalid Upgrade header");return}let Fe=Us("sha1").update(h+As).digest("base64");if(u.headers["sec-websocket-accept"]!==Fe){v(t,x,"Invalid Sec-WebSocket-Accept header");return}let W=u.headers["sec-websocket-protocol"],z;if(W!==void 0?p.size?p.has(W)||(z="Server sent an invalid subprotocol"):z="Server sent a subprotocol but none was requested":p.size&&(z="Server sent no subprotocol"),z){v(t,x,z);return}W&&(t._protocol=W);let qe=u.headers["sec-websocket-extensions"];if(qe!==void 0){if(!y){v(t,x,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let me;try{me=js(qe)}catch{v(t,x,"Invalid Sec-WebSocket-Extensions header");return}let Ge=Object.keys(me);if(Ge.length!==1||Ge[0]!==B.extensionName){v(t,x,"Server indicated an extension that was not requested");return}try{y.accept(me[B.extensionName])}catch{v(t,x,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[B.extensionName]=y}t.setSocket(x,A,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(m,t):m.end()}function de(t,e){t._readyState=_.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function Ys(t){return t.path=t.socketPath,Ct.connect(t)}function Ks(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=Ct.isIP(t.host)?"":t.host),Bs.connect(t)}function v(t,e,s){t._readyState=_.CLOSING;let r=new Error(s);Error.captureStackTrace(r,v),e.setHeader?(e[Nt]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(de,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function Me(t,e,s){if(e){let r=Ms(e)?e.size:Vs(e).length;t._socket?t._sender._bufferedBytes+=r:t._bufferedAmount+=r}if(s){let r=new Error(`WebSocket is not open: readyState ${t.readyState} (${N[t.readyState]})`);process.nextTick(s,r)}}function Xs(t,e){let s=this[S];s._closeFrameReceived=!0,s._closeMessage=e,s._closeCode=t,s._socket[S]!==void 0&&(s._socket.removeListener("data",_e),process.nextTick(Bt,s._socket),t===1005?s.close():s.close(t,e))}function Zs(){let t=this[S];t.isPaused||t._socket.resume()}function Qs(t){let e=this[S];e._socket[S]!==void 0&&(e._socket.removeListener("data",_e),process.nextTick(Bt,e._socket),e.close(t[Fs])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function kt(){this[S].emitClose()}function Js(t,e){this[S].emit("message",t,e)}function er(t){let e=this[S];e._autoPong&&e.pong(t,!this._isServer,Lt),e.emit("ping",t)}function tr(t){this[S].emit("pong",t)}function Bt(t){t.resume()}function sr(t){let e=this[S];e.readyState!==_.CLOSED&&(e.readyState===_.OPEN&&(e._readyState=_.CLOSING,Rt(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Rt(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),zs)}function Ut(){let t=this[S];this.removeListener("close",Ut),this.removeListener("data",_e),this.removeListener("end",It),t._readyState=_.CLOSING;let e;!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&(e=t._socket.read())!==null&&t._receiver.write(e),t._receiver.end(),this[S]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",kt),t._receiver.on("finish",kt))}function _e(t){this[S]._receiver.write(t)||this.pause()}function It(){let t=this[S];t._readyState=_.CLOSING,t._receiver.end(),this.end()}function Dt(){let t=this[S];this.removeListener("error",Dt),this.on("error",Lt),t&&(t._readyState=_.CLOSING,this.destroy())}});var Wt=E((Gr,At)=>{"use strict";d();var{tokenChars:rr}=F();function ir(t){let e=new Set,s=-1,r=-1,i=0;for(i;i<t.length;i++){let o=t.charCodeAt(i);if(r===-1&&rr[o]===1)s===-1&&(s=i);else if(i!==0&&(o===32||o===9))r===-1&&s!==-1&&(r=i);else if(o===44){if(s===-1)throw new SyntaxError(`Unexpected character at index ${i}`);r===-1&&(r=i);let f=t.slice(s,r);if(e.has(f))throw new SyntaxError(`The "${f}" subprotocol is duplicated`);e.add(f),s=r=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(s===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let n=t.slice(s,i);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}At.exports={parse:ir}});var zt=E((Vr,Vt)=>{"use strict";d();var nr=g("events"),pe=g("http"),{Duplex:jr}=g("stream"),{createHash:or}=g("crypto"),Ft=Re(),D=Z(),ar=Wt(),fr=Ae(),{GUID:lr,kWebSocket:hr}=k(),cr=/^[+/0-9A-Za-z]{22}==$/,qt=0,Gt=1,jt=2,We=class extends nr{constructor(e,s){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:fr,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=pe.createServer((r,i)=>{let n=pe.STATUS_CODES[426];i.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),i.end(n)}),this._server.listen(e.port,e.host,e.backlog,s)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=ur(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,n,o)=>{this.handleUpgrade(i,n,o,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=qt}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===jt){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(te,this);return}if(e&&this.once("close",e),this._state!==Gt)if(this._state=Gt,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(te,this):process.nextTick(te,this);else{let s=this._server;this._removeListeners(),this._removeListeners=this._server=null,s.close(()=>{te(this)})}}shouldHandle(e){if(this.options.path){let s=e.url.indexOf("?");if((s!==-1?e.url.slice(0,s):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,s,r,i){s.on("error",$t);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,f=+e.headers["sec-websocket-version"];if(e.method!=="GET"){M(this,e,s,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){M(this,e,s,400,"Invalid Upgrade header");return}if(n===void 0||!cr.test(n)){M(this,e,s,400,"Missing or invalid Sec-WebSocket-Key header");return}if(f!==8&&f!==13){M(this,e,s,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(e)){se(s,400);return}let l=e.headers["sec-websocket-protocol"],a=new Set;if(l!==void 0)try{a=ar.parse(l)}catch{M(this,e,s,400,"Invalid Sec-WebSocket-Protocol header");return}let h=e.headers["sec-websocket-extensions"],c={};if(this.options.perMessageDeflate&&h!==void 0){let p=new D(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let y=Ft.parse(h);y[D.extensionName]&&(p.accept(y[D.extensionName]),c[D.extensionName]=p)}catch{M(this,e,s,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let p={origin:e.headers[`${f===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(p,(y,m,u,x)=>{if(!y)return se(s,m||401,u,x);this.completeUpgrade(c,n,a,e,s,r,i)});return}if(!this.options.verifyClient(p))return se(s,401)}this.completeUpgrade(c,n,a,e,s,r,i)}completeUpgrade(e,s,r,i,n,o,f){if(!n.readable||!n.writable)return n.destroy();if(n[hr])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>qt)return se(n,503);let a=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${or("sha1").update(s+lr).digest("base64")}`],h=new this.options.WebSocket(null,void 0,this.options);if(r.size){let c=this.options.handleProtocols?this.options.handleProtocols(r,i):r.values().next().value;c&&(a.push(`Sec-WebSocket-Protocol: ${c}`),h._protocol=c)}if(e[D.extensionName]){let c=e[D.extensionName].params,p=Ft.format({[D.extensionName]:[c]});a.push(`Sec-WebSocket-Extensions: ${p}`),h._extensions=e}this.emit("headers",a,i),n.write(a.concat(`\r
2
- `).join(`\r
3
- `)),n.removeListener("error",$t),h.setSocket(n,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(h),h.on("close",()=>{this.clients.delete(h),this._shouldEmitClose&&!this.clients.size&&process.nextTick(te,this)})),f(h,i)}};Vt.exports=We;function ur(t,e){for(let s of Object.keys(e))t.on(s,e[s]);return function(){for(let r of Object.keys(e))t.removeListener(r,e[r])}}function te(t){t._state=jt,t.emit("close")}function $t(){this.destroy()}function se(t,e,s,r){s=s||pe.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(s),...r},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${pe.STATUS_CODES[e]}\r
4
- `+Object.keys(r).map(i=>`${i}: ${r[i]}`).join(`\r
5
- `)+`\r
6
- \r
7
- `+s)}function M(t,e,s,r,i){if(t.listenerCount("wsClientError")){let n=new Error(i);Error.captureStackTrace(n,M),t.emit("wsClientError",n,s,e)}else se(s,r,i)}});d();var dr=H(ze(),1),_r=H(Ce(),1),pr=H(Pe(),1),Ht=H(Ae(),1),mr=H(zt(),1);var Hr=Ht.default;export{mr as a,Hr as b};
@@ -1,5 +0,0 @@
1
- import{l as R}from"./chunk-BDVAE5MS.js";import{d}from"./chunk-JPGO36XP.js";import{Qb as u,Rb as b,Z as h,da as y}from"./chunk-GFEAKSGV.js";import{g as c}from"./chunk-VPRTJUIN.js";c();c();var l=class{constructor({export:e,input:r,inputBytes:n,output:o,outputBytes:s,logs:i,functionId:g,fuelConsumed:p,target:x,errorMessage:N,errorType:T,inputQueryVariablesMetafieldValue:O,inputQueryVariablesMetafieldNamespace:L,inputQueryVariablesMetafieldKey:k}){this.export=e,this.input=r,this.inputBytes=n,this.output=o,this.outputBytes=s,this.logs=i,this.functionId=g,this.fuelConsumed=p,this.target=x,this.errorMessage=N,this.errorType=T,this.inputQueryVariablesMetafieldValue=O,this.inputQueryVariablesMetafieldNamespace=L,this.inputQueryVariablesMetafieldKey=k}},f=class{constructor({cacheEntryEpochMs:e,cacheTtlMs:r,httpRequest:n,httpResponse:o}){this.cacheEntryEpochMs=e,this.cacheTtlMs=r,this.httpRequest=n,this.httpResponse=o}};var _=class{constructor({reason:e,httpRequest:r}){this.reason=e,this.httpRequest=r}},m=class{constructor({attempt:e,connectTimeMs:r,writeReadTimeMs:n,httpRequest:o,httpResponse:s,error:i}){this.attempt=e,this.connectTimeMs=r,this.writeReadTimeMs=n,this.httpRequest=o,this.httpResponse=s,this.error=i}};c();function E(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function M(t,e){return e?.deep&&E(t)||e?.deep&&Array.isArray(t)?a(t,e):t}function a(t,e){if(Array.isArray(t))return t.map(r=>e?.deep?a(r,e):r);if(E(t)){let r={};for(let[n,o]of Object.entries(t))r[h(n)]=M(o,e);return r}return t}var S=450,I=5*1e3,w=60*1e3,z=5,Z=1e6,P="function_run",ee="function_network_access",C="function_network_access.response_from_cache",V="function_network_access.request_execution_in_background",q="function_network_access.request_execution",te="no_cached_response",re="cached_response_about_to_expire";function se(t){let e=JSON.parse(t),r=e.input_query_variables_metafield_value&&A(e.input_query_variables_metafield_value);return new l({export:e.export,input:e.input,inputBytes:e.input_bytes,output:e.output,outputBytes:e.output_bytes,logs:e.logs,functionId:e.function_id,fuelConsumed:e.fuel_consumed,target:e.target,errorMessage:e.error_message,errorType:e.error_type,inputQueryVariablesMetafieldValue:r,inputQueryVariablesMetafieldNamespace:e.input_query_variables_metafield_namespace,inputQueryVariablesMetafieldKey:e.input_query_variables_metafield_key})}function ne(t){let e=JSON.parse(t);return new f({cacheEntryEpochMs:e.cache_entry_epoch_ms,cacheTtlMs:e.cache_ttl_ms,httpRequest:e.http_request,httpResponse:e.http_response})}var U={no_cached_response:0,cached_response_about_to_expire:1};function oe(t){let e=JSON.parse(t);return new _({reason:U[e.reason]??2,httpRequest:e.http_request})}function ie(t){let e=JSON.parse(t);return new m({attempt:e.attempt,connectTimeMs:e.connect_time_ms??null,writeReadTimeMs:e.write_read_time_ms??null,httpRequest:e.http_request,httpResponse:e.http_response??null,error:e.error??null})}var ue=async t=>{let{errors:e}=t.response,r=S,n=null,o="not_attempted";if(e.length>0)if(u(`Errors: ${e.map(s=>s.message).join(", ")}`),e.some(s=>s.status===401))try{n=await t.onResubscribe(),o="succeeded"}catch(s){u(`Failed to resubscribe to app logs: ${s}`),r=w,o="failed",t.onThrottle(r)}else e.some(s=>s.status===429)?(r=w,t.onThrottle(r)):(r=I,t.onUnknownError(r));return{retryIntervalMs:r,nextJwtToken:n,resubscribeResult:o}};function ae(t){return t.allExtensions.flatMap(e=>e.isFunctionExtension?[`extensions.${e.configuration.handle}`]:[])}var pe=({appLog:t,appLogPayload:e,storeName:r,prettyPrint:n=!0})=>{let{cursor:o,...s}=t,i=a({...s,payload:e,localTime:y(t.log_timestamp),storeName:r});return e instanceof l&&(i.payload.logs=e.logs.split(`
2
- `).filter(Boolean),i.payload.inputQueryVariablesMetafieldValue&&(i.payload.inputQueryVariablesMetafieldValue=A(i.payload.inputQueryVariablesMetafieldValue))),n?JSON.stringify(i,null,2):JSON.stringify(i)},ce=(t,e)=>{let r=a(JSON.parse(t));return e===P?new l(r):e===C?new f(r):e===V?new _(r):e===q?new m(r):r},le=async(t,e,r,n)=>{let o=await t.subscribeToAppLogs(e,r);if(!o.appLogsSubscribe)throw new d("Failed to subscribe to app logs: No response received");let{jwtToken:s,success:i,errors:g}=o.appLogsSubscribe;if(u(`Token: ${s}
3
- `),u(`API Key: ${e.apiKey}
4
- `),g&&g.length>0){let p=g.join(", ");throw await R({stripAnsi:!1},()=>{b(`Errors subscribing to app logs: ${p}`,n),b("App log streaming is not available in this session.",n)}),new d(p)}else{if(!s)throw new d("Failed to subscribe to app logs: No response received");let p=Array.isArray(e.shopIds)?e.shopIds:[e.shopIds];u(`Subscribed to App Events for shop ID(s) ${p.join(", ")}`),i!==void 0&&u(`Success: ${i}
5
- `)}return s};function ge(t){try{if(typeof t=="string"){let e=JSON.parse(t);return JSON.stringify(e,null,2)}else return typeof t=="object"&&t!==null?JSON.stringify(t,null,2):void 0}catch(e){throw new Error(`Error parsing JSON: ${e}`)}}var A=t=>{try{return JSON.parse(t)}catch{return t}};export{l as a,f as b,_ as c,m as d,a as e,S as f,I as g,z as h,Z as i,P as j,ee as k,C as l,V as m,q as n,te as o,re as p,se as q,ne as r,oe as s,ie as t,ue as u,ae as v,pe as w,ce as x,le as y,ge as z};