werkmeister 0.91.2 → 0.91.3

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 (148) hide show
  1. package/dist/{budget-U55QJ6RQ.js → budget-76EJNNOI.js} +2 -2
  2. package/dist/{cache-277X2VN7.js → cache-ZALXGJ2M.js} +2 -2
  3. package/dist/{chunk-WNCT54BF.js → chunk-3AF5DHGQ.js} +2 -2
  4. package/dist/{chunk-Z5B5JN3T.js → chunk-3N4GZJ6G.js} +2 -2
  5. package/dist/{chunk-JDLDACTO.js → chunk-3ODW3USF.js} +2 -2
  6. package/dist/{chunk-Q3RQIGZV.js → chunk-4DNCBO66.js} +2 -2
  7. package/dist/{chunk-EJIKMENG.js → chunk-4RJIJDHG.js} +2 -2
  8. package/dist/{chunk-MLDID3L3.js → chunk-6RWLCIGI.js} +2 -2
  9. package/dist/{chunk-XKJSMEDK.js → chunk-7JDN5TSM.js} +2 -2
  10. package/dist/{chunk-ZKGQH7TE.js → chunk-7Y3433MV.js} +2 -2
  11. package/dist/{chunk-ZNPNJ6PV.js → chunk-AQUDNCL7.js} +2 -2
  12. package/dist/{chunk-2CNYFUAA.js → chunk-ASISB2JX.js} +2 -2
  13. package/dist/{chunk-F7NAUYQY.js → chunk-B2BMSTLU.js} +2 -2
  14. package/dist/{chunk-JET6M6FJ.js → chunk-C2LOJFYS.js} +2 -2
  15. package/dist/{chunk-PWV3BTBD.js → chunk-CBDVSE3T.js} +2 -2
  16. package/dist/{chunk-R4GF3HDY.js → chunk-CHBJ6GOU.js} +2 -2
  17. package/dist/{chunk-V56745JI.js → chunk-CKSU6HO6.js} +2 -2
  18. package/dist/{chunk-3SM7OPFC.js → chunk-CYUHJC7W.js} +2 -2
  19. package/dist/{chunk-LGUAVZVV.js → chunk-DLHVOUIX.js} +2 -2
  20. package/dist/{chunk-DHJOVWA4.js → chunk-DNVDXB2M.js} +2 -2
  21. package/dist/{chunk-2X6AXXB5.js → chunk-DOBP53S5.js} +3 -3
  22. package/dist/{chunk-CDNW6ZDD.js → chunk-ECAFEVVZ.js} +2 -2
  23. package/dist/{chunk-UHGPFFNJ.js → chunk-EF6Y64XT.js} +3 -3
  24. package/dist/{chunk-X65MW2WW.js → chunk-EPITYPTZ.js} +2 -2
  25. package/dist/{chunk-H7BNP4O4.js → chunk-ERSLNN4Z.js} +3 -3
  26. package/dist/{chunk-CKVMBB4O.js → chunk-EYML364V.js} +2 -2
  27. package/dist/{chunk-MHWK63YA.js → chunk-F2HDGW2L.js} +2 -2
  28. package/dist/{chunk-FU2B23KJ.js → chunk-FGYLQFW2.js} +2 -2
  29. package/dist/{chunk-JDTI4XFH.js → chunk-FTHR74NZ.js} +2 -2
  30. package/dist/{chunk-FAAX2QYX.js → chunk-FUEWMZ47.js} +2 -2
  31. package/dist/{chunk-FIX7P5QJ.js → chunk-FZ5NEMRH.js} +2 -2
  32. package/dist/{chunk-HXML4LA3.js → chunk-G7CCV3D4.js} +2 -2
  33. package/dist/{chunk-U2DV5VKH.js → chunk-GRALPSUJ.js} +2 -2
  34. package/dist/{chunk-46BQCITV.js → chunk-GZMNMVS4.js} +2 -2
  35. package/dist/{chunk-BTAUC2FI.js → chunk-HAQBWPRB.js} +2 -2
  36. package/dist/{chunk-HKYWS6BI.js → chunk-HDIM2QAL.js} +2 -2
  37. package/dist/{chunk-QIP6ITHV.js → chunk-IOJKYQN3.js} +2 -2
  38. package/dist/{chunk-V36JN3L2.js → chunk-JAXP6MM3.js} +2 -2
  39. package/dist/{chunk-QPK726UX.js → chunk-JYBY6BPT.js} +2 -2
  40. package/dist/{chunk-TSEX5HWM.js → chunk-LCYZ3ZRO.js} +2 -2
  41. package/dist/{chunk-MQXD4BF7.js → chunk-LSQIZZU3.js} +2 -2
  42. package/dist/{chunk-HEZZDBJL.js → chunk-M7UCR3AV.js} +2 -2
  43. package/dist/{chunk-RDY6H5F3.js → chunk-MX2C2PHD.js} +2 -2
  44. package/dist/{chunk-IZX4HGHP.js → chunk-N5W2MOBO.js} +2 -2
  45. package/dist/chunk-NK6PSEAT.js +4 -0
  46. package/dist/{chunk-T4SXN77U.js → chunk-NLVYKHTR.js} +2 -2
  47. package/dist/{chunk-6NINBBUQ.js → chunk-NWFYUQOD.js} +2 -2
  48. package/dist/{chunk-O3AIZBOX.js → chunk-OCCF7KR6.js} +2 -2
  49. package/dist/{chunk-Z5EZBADB.js → chunk-PXA5WNOG.js} +2 -2
  50. package/dist/{chunk-Q4LPPRPK.js → chunk-QMOAHIXT.js} +2 -2
  51. package/dist/{chunk-J6MK2HTK.js → chunk-RFGFGC4M.js} +2 -2
  52. package/dist/{chunk-EP4XTUSC.js → chunk-THHNYRYT.js} +2 -2
  53. package/dist/{chunk-TIYYMZBR.js → chunk-TYXGVYP6.js} +2 -2
  54. package/dist/{chunk-26NE2TKQ.js → chunk-UB5NPPOE.js} +2 -2
  55. package/dist/{chunk-NI4SD5KN.js → chunk-UGMSDJFA.js} +2 -2
  56. package/dist/{chunk-Y2R57EVU.js → chunk-VDT62DH4.js} +2 -2
  57. package/dist/{chunk-JWQPWWEN.js → chunk-VK5ROIQM.js} +2 -2
  58. package/dist/{chunk-MYYQTERC.js → chunk-VMSPWAOM.js} +2 -2
  59. package/dist/{chunk-FYQS5A6E.js → chunk-WMWTYABJ.js} +2 -2
  60. package/dist/{chunk-EDQ6YISN.js → chunk-WXNQD3Y2.js} +2 -2
  61. package/dist/{chunk-NW56IEMZ.js → chunk-XKRTDXLT.js} +2 -2
  62. package/dist/{chunk-BRUQFOAI.js → chunk-XW2OTOPL.js} +2 -2
  63. package/dist/{chunk-EC3BKOYR.js → chunk-Y2DCVTEZ.js} +2 -2
  64. package/dist/{chunk-FO3OSGDP.js → chunk-YB4QV6ZV.js} +2 -2
  65. package/dist/{chunk-2OZ3J23R.js → chunk-YCMW6OZG.js} +2 -2
  66. package/dist/{chunk-NGCQLNYL.js → chunk-YLHOFWMD.js} +2 -2
  67. package/dist/{chunk-INLAFMQV.js → chunk-YOAZY3D6.js} +3 -3
  68. package/dist/{chunk-MM4H553O.js → chunk-YRXU2I5V.js} +2 -2
  69. package/dist/clean-64FY6FQO.js +8 -0
  70. package/dist/close_out-TFTZ2DCS.js +8 -0
  71. package/dist/code-TYX2HWB6.js +4 -0
  72. package/dist/{config-E4W34GGD.js → config-NML4TOM6.js} +2 -2
  73. package/dist/{connect-Q4G5BJIU.js → connect-NDLF4WCN.js} +2 -2
  74. package/dist/{daemon-WDAVVUDV.js → daemon-7ZXS3XAG.js} +2 -2
  75. package/dist/dashboard.js +1 -1
  76. package/dist/{detect-VWL55GB5.js → detect-MB7GTWZ3.js} +2 -2
  77. package/dist/{down-LN22LX5G.js → down-QGXRYK2U.js} +3 -3
  78. package/dist/{fixture-XAKYLZA6.js → fixture-KI467565.js} +2 -2
  79. package/dist/form-cli.js +1 -1
  80. package/dist/hooks-OWI7RINZ.js +4 -0
  81. package/dist/{hooks_gen-IIBLEWJC.js → hooks_gen-CPAB2USL.js} +2 -2
  82. package/dist/infra-3WPMEHPS.js +4 -0
  83. package/dist/init_workspace-ZASNRX4S.js +4 -0
  84. package/dist/{intercept-FDNNXBUS.js → intercept-TOGHNZG6.js} +2 -2
  85. package/dist/{issue-ULF5DUOO.js → issue-DIANX2YX.js} +2 -2
  86. package/dist/lib/agent_state.js +1 -1
  87. package/dist/lib/gate.js +1 -1
  88. package/dist/lib/pr_guard.js +1 -1
  89. package/dist/list_workspaces-7XI4AKST.js +7 -0
  90. package/dist/logs-PI5P4DNX.js +6 -0
  91. package/dist/main.js +3 -3
  92. package/dist/mcp-proxy.js +1 -1
  93. package/dist/mcp.js +1 -1
  94. package/dist/{migrate-LTTAMFKZ.js → migrate-BPRYVDYQ.js} +2 -2
  95. package/dist/notes-CNWDPO2J.js +4 -0
  96. package/dist/{open-JGBUCTSB.js → open-H33TUYCP.js} +2 -2
  97. package/dist/{optimize-7MN2UM5F.js → optimize-SZEPHRDS.js} +2 -2
  98. package/dist/pause-7ARV5YAM.js +4 -0
  99. package/dist/pr-RMLFBIUQ.js +5 -0
  100. package/dist/proxy_reload-HASMQRBN.js +6 -0
  101. package/dist/{registry-L42L4E4M.js → registry-SUUEDN4W.js} +2 -2
  102. package/dist/remove-E47CAEEV.js +7 -0
  103. package/dist/remove_workspace-X5XND4NC.js +8 -0
  104. package/dist/restart-DO3PACVR.js +8 -0
  105. package/dist/resume-ZQ4VHARD.js +8 -0
  106. package/dist/{safari-NTMZA4NA.js → safari-RKDCUELC.js} +2 -2
  107. package/dist/{sandbox-HPZXCIHM.js → sandbox-7HSDP54X.js} +2 -2
  108. package/dist/{services-PZWN25SA.js → services-MYOD6ADQ.js} +2 -2
  109. package/dist/{setup-XCRDWY2G.js → setup-S2OPEACJ.js} +2 -2
  110. package/dist/skills-FI7TS5BG.js +4 -0
  111. package/dist/{slots-7ZI2WWHU.js → slots-VQ7OKS6Q.js} +2 -2
  112. package/dist/{standards-YZXIXLNF.js → standards-PH4K4W2Y.js} +2 -2
  113. package/dist/start_args-VCMCD6OQ.js +4 -0
  114. package/dist/starting_prompt-XJCG3TRA.js +4 -0
  115. package/dist/stats-QXARJ64L.js +4 -0
  116. package/dist/{status-ZNJ7IIXZ.js → status-B7R2CLRP.js} +2 -2
  117. package/dist/{stop-O64ROXRA.js → stop-XF7TU66K.js} +2 -2
  118. package/dist/{telepresence-4GSYLVMJ.js → telepresence-5QYKQEMV.js} +2 -2
  119. package/dist/{test-B26WZAMO.js → test-NTXP5SLR.js} +2 -2
  120. package/dist/{tokens-CSMWT5QF.js → tokens-RJSJYCAG.js} +2 -2
  121. package/dist/{up-2UM6MBOF.js → up-CWYGYKUN.js} +3 -3
  122. package/dist/{v4-BO6ZQGAM.js → v4-SBN7CJLF.js} +2 -2
  123. package/dist/wait_load-UKYCVA36.js +4 -0
  124. package/dist/werkmeister-workspaces.vsix +0 -0
  125. package/dist/{workspace-UYFKZFUJ.js → workspace-E6BA3YLW.js} +2 -2
  126. package/package.json +4 -4
  127. package/dist/chunk-GJ4YZGEB.js +0 -4
  128. package/dist/clean-3IKRKL36.js +0 -8
  129. package/dist/close_out-YIJIEPMM.js +0 -8
  130. package/dist/code-RIKLE3JZ.js +0 -4
  131. package/dist/hooks-4AMWNS57.js +0 -4
  132. package/dist/infra-O3PETZQO.js +0 -4
  133. package/dist/init_workspace-EVWQSFKB.js +0 -4
  134. package/dist/list_workspaces-OAKHLTGW.js +0 -7
  135. package/dist/logs-2IF6GKX7.js +0 -6
  136. package/dist/notes-CWUFFJPM.js +0 -4
  137. package/dist/pause-VR4KFRX3.js +0 -4
  138. package/dist/pr-C5JL663A.js +0 -5
  139. package/dist/proxy_reload-TS7B7K5W.js +0 -6
  140. package/dist/remove-5IYFVTE2.js +0 -7
  141. package/dist/remove_workspace-QW565D5D.js +0 -8
  142. package/dist/restart-UHOD6XFM.js +0 -8
  143. package/dist/resume-6TSQFS4I.js +0 -8
  144. package/dist/skills-VXA6S2S3.js +0 -4
  145. package/dist/start_args-Q4NFUBDM.js +0 -4
  146. package/dist/starting_prompt-ZY6VYVVZ.js +0 -4
  147. package/dist/stats-WKLRE37U.js +0 -4
  148. package/dist/wait_load-XSZ2QX44.js +0 -4
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{a as st}from"./chunk-Y2R57EVU.js";import{a as se,b as $e,c as le,d as Ae,h as ot,i as Se}from"./chunk-EJIKMENG.js";import{a as et,b as tt,c as nt,d as rt,e as be,n as it}from"./chunk-LGUAVZVV.js";import{b as V,c as oe,d as Ze,g as Ke,j as Ce}from"./chunk-3SM7OPFC.js";import{a as Xe}from"./chunk-FU2B23KJ.js";import{l as ie,m as we}from"./chunk-NI4SD5KN.js";import{c as Qe}from"./chunk-O3AIZBOX.js";import{d as ke,f as Je,o as ye,q as Ye,r as ze,s as qe}from"./chunk-Z5B5JN3T.js";import{A as We,B as He,G as Ge,X as P,r as ge,t as Ve,v as Be,w as he,z as Me}from"./chunk-RDY6H5F3.js";import{a,f as O}from"./chunk-NW56IEMZ.js";O();import*as k from"node:fs";import*as I from"node:os";import*as b from"node:path";O();O();O();function X(e,r=!1){let n=e.length,t=0,o="",i=0,c=16,s=0,l=0,f=0,u=0,p=0;function m(g,v){let w=0,h=0;for(;w<g||!v;){let d=e.charCodeAt(t);if(d>=48&&d<=57)h=h*16+d-48;else if(d>=65&&d<=70)h=h*16+d-65+10;else if(d>=97&&d<=102)h=h*16+d-97+10;else break;t++,w++}return w<g&&(h=-1),h}a(m,"scanHexDigits");function y(g){t=g,o="",i=0,c=16,p=0}a(y,"setPosition");function A(){let g=t;if(e.charCodeAt(t)===48)t++;else for(t++;t<e.length&&H(e.charCodeAt(t));)t++;if(t<e.length&&e.charCodeAt(t)===46)if(t++,t<e.length&&H(e.charCodeAt(t)))for(t++;t<e.length&&H(e.charCodeAt(t));)t++;else return p=3,e.substring(g,t);let v=t;if(t<e.length&&(e.charCodeAt(t)===69||e.charCodeAt(t)===101))if(t++,(t<e.length&&e.charCodeAt(t)===43||e.charCodeAt(t)===45)&&t++,t<e.length&&H(e.charCodeAt(t))){for(t++;t<e.length&&H(e.charCodeAt(t));)t++;v=t}else p=3;return e.substring(g,v)}a(A,"scanNumber");function x(){let g="",v=t;for(;;){if(t>=n){g+=e.substring(v,t),p=2;break}let w=e.charCodeAt(t);if(w===34){g+=e.substring(v,t),t++;break}if(w===92){if(g+=e.substring(v,t),t++,t>=n){p=2;break}switch(e.charCodeAt(t++)){case 34:g+='"';break;case 92:g+="\\";break;case 47:g+="/";break;case 98:g+="\b";break;case 102:g+="\f";break;case 110:g+=`
3
+ import{a as st}from"./chunk-VDT62DH4.js";import{a as se,b as $e,c as le,d as Ae,h as ot,i as Se}from"./chunk-4RJIJDHG.js";import{a as et,b as tt,c as nt,d as rt,e as be,n as it}from"./chunk-DLHVOUIX.js";import{b as V,c as oe,d as Ze,g as Ke,j as Ce}from"./chunk-CYUHJC7W.js";import{a as Xe}from"./chunk-FGYLQFW2.js";import{l as ie,m as we}from"./chunk-UGMSDJFA.js";import{c as Qe}from"./chunk-OCCF7KR6.js";import{d as ke,f as Je,o as ye,q as Ye,r as ze,s as qe}from"./chunk-3N4GZJ6G.js";import{A as We,B as He,G as Ge,X as P,r as ge,t as Ve,v as Be,w as he,z as Me}from"./chunk-MX2C2PHD.js";import{a,f as O}from"./chunk-XKRTDXLT.js";O();import*as k from"node:fs";import*as I from"node:os";import*as b from"node:path";O();O();O();function X(e,r=!1){let n=e.length,t=0,o="",i=0,c=16,s=0,l=0,f=0,u=0,p=0;function m(g,v){let w=0,h=0;for(;w<g||!v;){let d=e.charCodeAt(t);if(d>=48&&d<=57)h=h*16+d-48;else if(d>=65&&d<=70)h=h*16+d-65+10;else if(d>=97&&d<=102)h=h*16+d-97+10;else break;t++,w++}return w<g&&(h=-1),h}a(m,"scanHexDigits");function y(g){t=g,o="",i=0,c=16,p=0}a(y,"setPosition");function A(){let g=t;if(e.charCodeAt(t)===48)t++;else for(t++;t<e.length&&H(e.charCodeAt(t));)t++;if(t<e.length&&e.charCodeAt(t)===46)if(t++,t<e.length&&H(e.charCodeAt(t)))for(t++;t<e.length&&H(e.charCodeAt(t));)t++;else return p=3,e.substring(g,t);let v=t;if(t<e.length&&(e.charCodeAt(t)===69||e.charCodeAt(t)===101))if(t++,(t<e.length&&e.charCodeAt(t)===43||e.charCodeAt(t)===45)&&t++,t<e.length&&H(e.charCodeAt(t))){for(t++;t<e.length&&H(e.charCodeAt(t));)t++;v=t}else p=3;return e.substring(g,v)}a(A,"scanNumber");function x(){let g="",v=t;for(;;){if(t>=n){g+=e.substring(v,t),p=2;break}let w=e.charCodeAt(t);if(w===34){g+=e.substring(v,t),t++;break}if(w===92){if(g+=e.substring(v,t),t++,t>=n){p=2;break}switch(e.charCodeAt(t++)){case 34:g+='"';break;case 92:g+="\\";break;case 47:g+="/";break;case 98:g+="\b";break;case 102:g+="\f";break;case 110:g+=`
4
4
  `;break;case 114:g+="\r";break;case 116:g+=" ";break;case 117:let d=m(4,!0);d>=0?g+=String.fromCharCode(d):p=4;break;default:p=5}v=t;continue}if(w>=0&&w<=31)if(Q(w)){g+=e.substring(v,t),p=2;break}else p=6;t++}return g}a(x,"scanString");function $(){if(o="",p=0,i=t,l=s,u=f,t>=n)return i=n,c=17;let g=e.charCodeAt(t);if(ve(g)){do t++,o+=String.fromCharCode(g),g=e.charCodeAt(t);while(ve(g));return c=15}if(Q(g))return t++,o+=String.fromCharCode(g),g===13&&e.charCodeAt(t)===10&&(t++,o+=`
5
5
  `),s++,f=t,c=14;switch(g){case 123:return t++,c=1;case 125:return t++,c=2;case 91:return t++,c=3;case 93:return t++,c=4;case 58:return t++,c=6;case 44:return t++,c=5;case 34:return t++,o=x(),c=10;case 47:let v=t-1;if(e.charCodeAt(t+1)===47){for(t+=2;t<n&&!Q(e.charCodeAt(t));)t++;return o=e.substring(v,t),c=12}if(e.charCodeAt(t+1)===42){t+=2;let w=n-1,h=!1;for(;t<w;){let d=e.charCodeAt(t);if(d===42&&e.charCodeAt(t+1)===47){t+=2,h=!0;break}t++,Q(d)&&(d===13&&e.charCodeAt(t)===10&&t++,s++,f=t)}return h||(t++,p=1),o=e.substring(v,t),c=13}return o+=String.fromCharCode(g),t++,c=16;case 45:if(o+=String.fromCharCode(g),t++,t===n||!H(e.charCodeAt(t)))return c=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=A(),c=11;default:for(;t<n&&L(g);)t++,g=e.charCodeAt(t);if(i!==t){switch(o=e.substring(i,t),o){case"true":return c=8;case"false":return c=9;case"null":return c=7}return c=16}return o+=String.fromCharCode(g),t++,c=16}}a($,"scanNext");function L(g){if(ve(g)||Q(g))return!1;switch(g){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}a(L,"isUnknownContentCharacter");function j(){let g;do g=$();while(g>=12&&g<=15);return g}return a(j,"scanNextNonTrivia"),{setPosition:y,getPosition:a(()=>t,"getPosition"),scan:r?j:$,getToken:a(()=>c,"getToken"),getTokenValue:a(()=>o,"getTokenValue"),getTokenOffset:a(()=>i,"getTokenOffset"),getTokenLength:a(()=>t-i,"getTokenLength"),getTokenStartLine:a(()=>l,"getTokenStartLine"),getTokenStartCharacter:a(()=>i-u,"getTokenStartCharacter"),getTokenError:a(()=>p,"getTokenError")}}a(X,"createScanner");function ve(e){return e===32||e===9}a(ve,"isWhiteSpace");function Q(e){return e===10||e===13}a(Q,"isLineBreak");function H(e){return e>=48&&e<=57}a(H,"isDigit");var lt;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(lt||(lt={}));O();var _=new Array(20).fill(0).map((e,r)=>" ".repeat(r)),G=200,Te={" ":{"\n":new Array(G).fill(0).map((e,r)=>`
6
6
  `+" ".repeat(r)),"\r":new Array(G).fill(0).map((e,r)=>"\r"+" ".repeat(r)),"\r\n":new Array(G).fill(0).map((e,r)=>`\r
@@ -86,4 +86,4 @@ ${mn}`}]}if(r)return[{label:t,ok:!0,detail:`configured for ${e.email} (run \`wer
86
86
  `}a(Ln,"daemonPlist");async function On(e){try{return await fetch(e,{signal:AbortSignal.timeout(2e3)}),!0}catch{return!1}}a(On,"anythingAnswers");async function jn(e,r,n={}){let t="werkmeister daemon",o=Fe(n),i=n.port===void 0?Qe():`http://127.0.0.1:${n.port}`,c=a(()=>(n.serving??On)(i),"answers"),s=`nothing answers at ${i}: the daemon is not running`;if(!o.darwin)return e&&!await c()?[{label:t,ok:!1,optional:!0,detail:`not on macOS and ${s} \u2014 run \`werkmeister infra connect\``}]:[{label:t,ok:!0,detail:"not on macOS: `werkmeister infra connect` starts it"}];let l=Ln(n);if(l===null)return[{label:t,ok:!1,detail:`${V.label} not built or bundled; run the build first`}];if(e||!r){let u=k.existsSync(o.plist)?k.readFileSync(o.plist,"utf8"):null,p=u===null?"not installed":u===l?"installed":"stale",m=e&&u===l&&!await c()?`, but ${s} \u2014 see ${o.logFile}, or run \`werkmeister daemon restart\``:"";return[{label:t,ok:u===l&&!m,optional:!0,detail:`launchd agent ${o.plist}: ${p}${m}${u===l?"":" \u2014 run `werkmeister machine setup`"}`}]}k.existsSync(o.plist)||await(n.stopPidServer??(()=>Ce(V)))();let f=It(oe,o.plist,l,o.uid,o.runner);return"error"in f?[{label:t,ok:!1,detail:f.error.join(" ")}]:[{label:t,ok:!0,detail:`${f.changed?"installed":"up to date"}: launchd agent ${o.plist}, logs \u2192 ${o.logFile}`}]}a(jn,"syncDaemonAgent");function Ar(e={}){let r="werkmeister daemon",n=Fe(e);return k.existsSync(n.plist)?(n.runner(["launchctl","bootout",`gui/${n.uid}/${oe}`]),k.rmSync(n.plist,{force:!0}),{label:r,ok:!0,detail:`removed launchd agent ${n.plist}`}):{label:r,ok:!0,detail:"no launchd agent installed"}}a(Ar,"uninstallDaemonAgent");var je="jbbz.werkmeister-vscode",_n=b.join("dist","werkmeister-workspaces.vsix");function Pt(e=N,r=P()){let[n,t]=e(["code","--list-extensions","--show-versions"]),o=`${je}@`,i=n===0?t.split(`
87
87
  `).find(s=>s.trim().toLowerCase().startsWith(o)):void 0,c=b.join(r,_n);return{cli:n===0,installed:i?i.trim().slice(o.length):null,bundled:k.existsSync(c)?{path:c,version:q(b.join(r,"package.json"))?.version}:null,checkout:q(b.join(r,"..","..","packages","werkmeister-vscode","package.json"))?.version??null}}a(Pt,"vscodeExtensionState");function In(e,r,n=Pt(),t=N){let o="VS Code extension (optional)";if(!n.cli)return[{label:o,ok:!0,detail:"`code` not on PATH \u2014 skipped (in VS Code: \"Shell Command: Install 'code' command in PATH\")"}];if(!n.bundled)return n.installed&&n.checkout&&n.installed!==n.checkout?[{label:o,ok:!1,optional:!0,detail:`${n.installed}, checkout has ${n.checkout} \u2014 pnpm --filter werkmeister-vscode install:local`}]:[{label:o,ok:!0,detail:`${n.installed??"not installed"}; running from a checkout, which bundles no .vsix \u2014 build it from packages/werkmeister-vscode`}];let i=n.bundled.version;if(n.installed===i)return[{label:o,ok:!0,detail:`${je} ${i}`}];if(e||!r)return n.installed?[{label:o,ok:!1,optional:!0,detail:`${n.installed} < bundled ${i} \u2014 re-run \`werkmeister machine setup\``}]:[{label:o,ok:!0,detail:"not installed (opt in via `werkmeister machine setup`)"}];let[c,s]=t(["code","--install-extension",n.bundled.path,"--force"]);return c!==0?[{label:o,ok:!1,optional:!0,detail:`code --install-extension failed: ${U(s)}`}]:[{label:o,ok:!0,detail:`installed ${je} ${i} \u2014 reload VS Code windows to pick it up`}]}a(In,"syncVscodeExtension");function Nn(e,r,n={}){let t="telepresence (optional)",o=se.join("."),i=a(()=>{let[L,j]=e(["telepresence","version"]);if(L!==0)return[null,null];let g=ot(j);return g===null?[{label:t,ok:!1,optional:!0,detail:`version unparseable: ${j.slice(0,80)}`},null]:[null,g]},"probe"),[c,s]=i();if(c)return[c];if(s&&!Se(s,se))return[{label:t,ok:!0,detail:`OSS client ${s.join(".")}`}];let l=s!==null,f=l?`${s.join(".")} < required ${o}`:"not installed";if(r||!n.install)return l?[{label:t,ok:!1,optional:!0,detail:`${f} \u2014 ${Ae}`}]:[{label:t,ok:!0,detail:`not installed (needed only for \`werkmeister infra intercept\`; ${Ae})`}];let[u]=e(["brew","--version"]);if(u!==0)return[{label:t,ok:!l,optional:!0,detail:`${f}; Homebrew not found \u2014 ${le}`}];let p=l?"upgrade":"install",[m,y]=e(["brew",p,$e]);if(m!==0)return[{label:t,ok:!1,optional:!0,detail:`brew ${p} ${$e} failed: ${U(y)}
88
88
  Telepresence stays optional \u2014 this does not block anything except \`werkmeister infra intercept\`. Install manually with: ${le}`}];let[A,x]=i();if(A)return[A];if(x===null)return[{label:t,ok:!1,optional:!0,detail:`brew ${p} reported success but telepresence is not on PATH`}];let $=x.join(".");return Se(x,se)?[{label:t,ok:!1,optional:!0,detail:`brew installed ${$}, still < required ${o} \u2014 ${le}`}]:[{label:t,ok:!0,detail:`installed OSS client ${$} via brew`}]}a(Nn,"syncTelepresence");function Rn(e,r,n){let t="playwright chromium (optional)",o=`playwright@${st}`,i="",c=a(()=>{let[u,p]=e(["npx","-y",o,"install","--dry-run","chromium"]);i=p;let m=[...p.matchAll(/Install location:\s*(\S.*)$/gm)].map(y=>y[1].trim());return u!==0||m.length===0?null:m.filter(y=>!k.existsSync(b.join(y,"INSTALLATION_COMPLETE")))},"missingDirs"),s=c();if(s===null)return[{label:t,ok:!1,optional:!0,detail:`\`npx ${o} install --dry-run chromium\` failed: ${U(i)}`}];if(s.length===0)return[{label:t,ok:!0,detail:`chromium for ${o} present`}];if(r)return[{label:t,ok:!1,optional:!0,detail:`chromium for ${o} missing \u2014 re-run \`werkmeister machine setup\``}];let l=(n??Tt)(["npx","-y",o,"install","chromium"]),f=c();if(l!==0||f===null||f.length>0){let u=l!==0?`exited ${l}`:"finished, but the browser is still not reported installed";return[{label:t,ok:!1,optional:!0,detail:`\`npx ${o} install chromium\` ${u} \u2014 run it manually to see why`}]}return[{label:t,ok:!0,detail:`installed chromium for ${o}`}]}a(Rn,"syncPlaywright");async function Sr(e={}){let r=e.checkOnly??!1,n=e.reposRoot??Ge(),t=e.claudePluginsDir??b.join(I.homedir(),".claude","plugins"),o=e.repoPluginDir??b.join(P(),"plugins",E),i=e.runner??N,c=e.jira??Ye(),s=[],l=e.pathDirs??{repos_root:ye().repos_root,workspaces_root:ye().workspaces_root};s.push(...an(r,l)),s.push(...un(r,e.registry??{}));let[f]=i(["claude","--version"]);if(f===127)s.push({label:"claude CLI",ok:!1,detail:`not found on PATH \u2014 the ${E} and ponytail plugins cannot be installed without it. Install Claude Code from https://claude.com/claude-code (the VS Code extension alone does not put \`claude\` on PATH), then re-run \`werkmeister machine setup\`.`});else{for(let m of Xt){let y=null;m.name===E&&(y=a(()=>yt(o,t),"driftProbe"));let A=xt(m,t,i,r,y);s.push(...A),m.name===E&&(r||A.every(x=>x.ok))&&s.push(...Zt(t,i,r))}for(let m of Kt)s.push(...ln(m,t,i,r,e.installOptionalPlugins??!1))}let u=e.workspaceRepo??(qe()||tn(i));u?s.push(...wt(n,rn(u),i,r,e.repointWorkspaceOrigin)):s.push({label:`repo ${_e}`,ok:!1,optional:!0,detail:"no workspace repo configured and `gh` could not name one \u2014 set overrides.workspace_repo (or run `gh auth login`, then `werkmeister machine setup`). Workspaces will fall back to plain directories."}),(e.demo||k.existsSync(b.join(n,vt)))&&s.push(...wt(n,on,i,r)),s.push(...it({reposRoot:n,checkOnly:r}));let p=typeof e.hostnames=="function"?e.hostnames():e.hostnames??[];return s.push(...pn(r,{hostnames:p,ingress:e.ingress??void 0,skipSudo:e.skipSudo},e.interactiveRunner)),s.push(...await hn(c,r,e.jiraVerifier)),s.push(...Nn(i,r,{install:e.installTelepresence})),s.push(...Rn(i,r,e.interactiveRunner)),s.push(...wn(r,e.mapEditorSchemas??!1)),s.push(...$n(r,e.grantStandardsDir??!1)),s.push(...Sn(r)),s.push(...In(r,e.installVscodeExtension??!1,Pt(i),i)),s.push(...xn(r,e.installPrWatch??!1,{runner:i})),s.push(...await jn(r,e.installDaemon??!1,{runner:i})),s}a(Sr,"runSetup");export{yt as a,_e as b,Ct as c,$t as d,en as e,br as f,tn as g,Lt as h,yn as i,ne as j,bn as k,Tn as l,En as m,$r as n,jn as o,Ar as p,Pt as q,Sr as r};
89
- //# sourceMappingURL=chunk-XKJSMEDK.js.map
89
+ //# sourceMappingURL=chunk-7JDN5TSM.js.map
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{b as f}from"./chunk-TSEX5HWM.js";import{a as n,f as m}from"./chunk-NW56IEMZ.js";m();import{randomBytes as u}from"node:crypto";import*as r from"node:fs";import*as p from"node:os";import*as o from"node:path";var h="token";function a(){return o.join(f(p.homedir()),"tokens")}n(a,"tokensDir");function l(e){return o.join(f(e),h)}n(l,"workspaceTokenFile");function x(e,s){let i=o.join(a(),e),t="";try{t=r.readFileSync(i,"utf8").trim()}catch{}t||=u(32).toString("hex");for(let c of[i,l(s)])r.mkdirSync(o.dirname(c),{recursive:!0}),r.writeFileSync(c,`${t}
3
+ import{b as f}from"./chunk-LCYZ3ZRO.js";import{a as n,f as m}from"./chunk-XKRTDXLT.js";m();import{randomBytes as u}from"node:crypto";import*as r from"node:fs";import*as p from"node:os";import*as o from"node:path";var h="token";function a(){return o.join(f(p.homedir()),"tokens")}n(a,"tokensDir");function l(e){return o.join(f(e),h)}n(l,"workspaceTokenFile");function x(e,s){let i=o.join(a(),e),t="";try{t=r.readFileSync(i,"utf8").trim()}catch{}t||=u(32).toString("hex");for(let c of[i,l(s)])r.mkdirSync(o.dirname(c),{recursive:!0}),r.writeFileSync(c,`${t}
4
4
  `,{mode:384}),r.chmodSync(c,384);return t}n(x,"mintWorkspaceToken");function F(e){r.rmSync(o.join(a(),e),{force:!0})}n(F,"revokeWorkspaceToken");function T(e){let s=new Set(r.readdirSync(e,{withFileTypes:!0}).filter(t=>t.isDirectory()||t.isSymbolicLink()&&y(o.join(e,t.name))).map(t=>t.name)),i=[];try{i=r.readdirSync(a())}catch{}if(i.length&&!s.size)throw new Error(`no workspace folders found under ${e}`);return i.filter(t=>!s.has(t)).sort()}n(T,"staleTokens");function y(e){try{return r.statSync(e).isDirectory()}catch{return!1}}n(y,"isDir");export{a,l as b,x as c,F as d,T as e};
5
- //# sourceMappingURL=chunk-ZKGQH7TE.js.map
5
+ //# sourceMappingURL=chunk-7Y3433MV.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{I as y,k as g,m as w,o as _,q as h,s as $}from"./chunk-INLAFMQV.js";import{n as p}from"./chunk-Z5B5JN3T.js";import{a,f}from"./chunk-NW56IEMZ.js";f();import*as d from"node:fs";import*as c from"node:path";var b=["in_progress","in_review","merged","done","abandoned"],C={jira:{in_progress:"In Progress",in_review:"In Review",merged:null,done:"Done",abandoned:null},github:{in_progress:"status: in progress",in_review:"status: in review",merged:null,done:"closed",abandoned:"not planned"}},x={in_progress:"issue_progress_status",in_review:"issue_review_status",done:"issue_done_status"},O={in_progress:1,in_review:2,merged:3,done:4,abandoned:4},S=a(e=>e==null||String(e).trim()===""?null:String(e).trim(),"blankToNull");function I(e,t){let o=e.issue_statuses??{},n={...C[t]};for(let s of b){let r=x[s];Object.hasOwn(o,s)?n[s]=S(o[s]):r&&e[r]!==void 0&&(n[s]=S(e[r]))}return n}a(I,"resolveIssueStatuses");function L(e){let t=e?w(e):null;return t?I({issue_statuses:t.issueStatuses},t.tracker):I(p().overrides??{},g())}a(L,"issueStatuses");function N(e,t){let o=new Set([e.status,...e.labels??[]].flatMap(s=>s?[s.trim().toLowerCase()]:[])),n=a(s=>{let r=t[s];return r!==null&&o.has(r.toLowerCase())},"is");return e.statusCategory==="done"||n("done")?4:n("merged")?3:n("in_review")?2:n("in_progress")||e.statusCategory==="indeterminate"?1:0}a(N,"issuePosition");async function T(e,t,o,n,s){let r=n[o];try{if(r===null)return s.alwaysComment?(await e.updateIssue(t,{comment:s.comment}),`${t} commented (no ${o} status configured)`):"";let i=[],u=await e.fetchIssue(t,i)??await e.fetchIssue(t,i);if(!u)return`${t} not moved to "${r}": could not read its current status (${[...new Set(i)].join("; ")||"no reason given"}); move it by hand: werkmeister issue update ${t} --status ${JSON.stringify(r)} --comment ${JSON.stringify(s.comment)}`;let m=N(u,n);if(!(O[o]>m||s.back&&m>=2&&m<4)){s.alwaysComment&&await e.updateIssue(t,{comment:s.comment});let l=u.labels?.find(v=>b.some(j=>n[j]?.toLowerCase()===v.toLowerCase()));return`${t} already ${u.status??"past that"}${l?` (${l})`:""}`}return await e.updateIssue(t,{status:r,comment:s.comment}),`${t} \u2192 ${r}`}catch(i){return`${t} not moved to "${r??o}": ${i.message}`}}a(T,"moveIssue");function k(e){let t;try{t=d.readdirSync(c.join(e,"stages")).filter(n=>/^\d+_/.test(n)).sort()}catch{return"research phase"}return`stage ${t.find(n=>{try{return!d.readdirSync(c.join(e,"stages",n,"output")).some(s=>!s.startsWith("."))}catch{return!0}})??t[0]??"01"}`}a(k,"currentStage");async function D(e,t,o){let n=y(e,null),s=$(n);if(!s.length)return"no issue";let r=`Work started: ${k(e)} in workspace ${c.basename(e)}.`;return A(s,i=>{let u={project:h(n),text:i};return T(t??_(u),i,"in_progress",o??L(u),{comment:r})})}a(D,"startIssue");async function A(e,t){let o=[];for(let n of e)o.push(await t(n));return o.filter(Boolean).join("; ")}a(A,"eachIssue");export{L as a,T as b,D as c,A as d};
4
- //# sourceMappingURL=chunk-ZNPNJ6PV.js.map
3
+ import{I as y,k as g,m as w,o as _,q as h,s as $}from"./chunk-YOAZY3D6.js";import{n as p}from"./chunk-3N4GZJ6G.js";import{a,f}from"./chunk-XKRTDXLT.js";f();import*as d from"node:fs";import*as c from"node:path";var b=["in_progress","in_review","merged","done","abandoned"],C={jira:{in_progress:"In Progress",in_review:"In Review",merged:null,done:"Done",abandoned:null},github:{in_progress:"status: in progress",in_review:"status: in review",merged:null,done:"closed",abandoned:"not planned"}},x={in_progress:"issue_progress_status",in_review:"issue_review_status",done:"issue_done_status"},O={in_progress:1,in_review:2,merged:3,done:4,abandoned:4},S=a(e=>e==null||String(e).trim()===""?null:String(e).trim(),"blankToNull");function I(e,t){let o=e.issue_statuses??{},n={...C[t]};for(let s of b){let r=x[s];Object.hasOwn(o,s)?n[s]=S(o[s]):r&&e[r]!==void 0&&(n[s]=S(e[r]))}return n}a(I,"resolveIssueStatuses");function L(e){let t=e?w(e):null;return t?I({issue_statuses:t.issueStatuses},t.tracker):I(p().overrides??{},g())}a(L,"issueStatuses");function N(e,t){let o=new Set([e.status,...e.labels??[]].flatMap(s=>s?[s.trim().toLowerCase()]:[])),n=a(s=>{let r=t[s];return r!==null&&o.has(r.toLowerCase())},"is");return e.statusCategory==="done"||n("done")?4:n("merged")?3:n("in_review")?2:n("in_progress")||e.statusCategory==="indeterminate"?1:0}a(N,"issuePosition");async function T(e,t,o,n,s){let r=n[o];try{if(r===null)return s.alwaysComment?(await e.updateIssue(t,{comment:s.comment}),`${t} commented (no ${o} status configured)`):"";let i=[],u=await e.fetchIssue(t,i)??await e.fetchIssue(t,i);if(!u)return`${t} not moved to "${r}": could not read its current status (${[...new Set(i)].join("; ")||"no reason given"}); move it by hand: werkmeister issue update ${t} --status ${JSON.stringify(r)} --comment ${JSON.stringify(s.comment)}`;let m=N(u,n);if(!(O[o]>m||s.back&&m>=2&&m<4)){s.alwaysComment&&await e.updateIssue(t,{comment:s.comment});let l=u.labels?.find(v=>b.some(j=>n[j]?.toLowerCase()===v.toLowerCase()));return`${t} already ${u.status??"past that"}${l?` (${l})`:""}`}return await e.updateIssue(t,{status:r,comment:s.comment}),`${t} \u2192 ${r}`}catch(i){return`${t} not moved to "${r??o}": ${i.message}`}}a(T,"moveIssue");function k(e){let t;try{t=d.readdirSync(c.join(e,"stages")).filter(n=>/^\d+_/.test(n)).sort()}catch{return"research phase"}return`stage ${t.find(n=>{try{return!d.readdirSync(c.join(e,"stages",n,"output")).some(s=>!s.startsWith("."))}catch{return!0}})??t[0]??"01"}`}a(k,"currentStage");async function D(e,t,o){let n=y(e,null),s=$(n);if(!s.length)return"no issue";let r=`Work started: ${k(e)} in workspace ${c.basename(e)}.`;return A(s,i=>{let u={project:h(n),text:i};return T(t??_(u),i,"in_progress",o??L(u),{comment:r})})}a(D,"startIssue");async function A(e,t){let o=[];for(let n of e)o.push(await t(n));return o.filter(Boolean).join("; ")}a(A,"eachIssue");export{L as a,T as b,D as c,A as d};
4
+ //# sourceMappingURL=chunk-AQUDNCL7.js.map
@@ -1,6 +1,6 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{l as cr,m as hr}from"./chunk-NI4SD5KN.js";import{b as or,c as ar,d as sr,e as ur,f as fr,g as lr}from"./chunk-RDY6H5F3.js";import{a as i,b as L,c as S,e as Pi,f as c}from"./chunk-NW56IEMZ.js";var mr=S((Gs,vr)=>{"use strict";c();var C=L("fs"),re=L("path"),ki=C.lchown?"lchown":"chown",Ni=C.lchownSync?"lchownSync":"chownSync",pr=C.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),dr=i((e,t,r)=>{try{return C[Ni](e,t,r)}catch(n){if(n.code!=="ENOENT")throw n}},"lchownSync"),Mi=i((e,t,r)=>{try{return C.chownSync(e,t,r)}catch(n){if(n.code!=="ENOENT")throw n}},"chownSync"),Ai=pr?(e,t,r,n)=>o=>{!o||o.code!=="EISDIR"?n(o):C.chown(e,t,r,n)}:(e,t,r,n)=>n,ht=pr?(e,t,r)=>{try{return dr(e,t,r)}catch(n){if(n.code!=="EISDIR")throw n;Mi(e,t,r)}}:(e,t,r)=>dr(e,t,r),Di=process.version,yr=i((e,t,r)=>C.readdir(e,t,r),"readdir"),qi=i((e,t)=>C.readdirSync(e,t),"readdirSync");/^v4\./.test(Di)&&(yr=i((e,t,r)=>C.readdir(e,r),"readdir"));var Be=i((e,t,r,n)=>{C[ki](e,t,r,Ai(e,t,r,o=>{n(o&&o.code!=="ENOENT"?o:null)}))},"chown"),gr=i((e,t,r,n,o)=>{if(typeof t=="string")return C.lstat(re.resolve(e,t),(a,s)=>{if(a)return o(a.code!=="ENOENT"?a:null);s.name=t,gr(e,s,r,n,o)});if(t.isDirectory())dt(re.resolve(e,t.name),r,n,a=>{if(a)return o(a);let s=re.resolve(e,t.name);Be(s,r,n,o)});else{let a=re.resolve(e,t.name);Be(a,r,n,o)}},"chownrKid"),dt=i((e,t,r,n)=>{yr(e,{withFileTypes:!0},(o,a)=>{if(o){if(o.code==="ENOENT")return n();if(o.code!=="ENOTDIR"&&o.code!=="ENOTSUP")return n(o)}if(o||!a.length)return Be(e,t,r,n);let s=a.length,u=null,f=i(l=>{if(!u){if(l)return n(u=l);if(--s===0)return Be(e,t,r,n)}},"then");a.forEach(l=>gr(e,l,t,r,f))})},"chownr"),Ii=i((e,t,r,n)=>{if(typeof t=="string")try{let o=C.lstatSync(re.resolve(e,t));o.name=t,t=o}catch(o){if(o.code==="ENOENT")return;throw o}t.isDirectory()&&_r(re.resolve(e,t.name),r,n),ht(re.resolve(e,t.name),r,n)},"chownrKidSync"),_r=i((e,t,r)=>{let n;try{n=qi(e,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return;if(o.code==="ENOTDIR"||o.code==="ENOTSUP")return ht(e,t,r);throw o}return n&&n.length&&n.forEach(o=>Ii(e,o,t,r)),ht(e,t,r)},"chownrSync");vr.exports=dt;dt.sync=_r});var pt=S((Ys,wr)=>{c();wr.exports=L("stream")});var Or=S((Js,Tr)=>{"use strict";c();function br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}i(br,"ownKeys");function Er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?br(Object(r),!0).forEach(function(n){Ci(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):br(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}i(Er,"_objectSpread");function Ci(e,t,r){return t=Rr(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}i(Ci,"_defineProperty");function ji(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i(ji,"_classCallCheck");function Sr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Rr(n.key),n)}}i(Sr,"_defineProperties");function Bi(e,t,r){return t&&Sr(e.prototype,t),r&&Sr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}i(Bi,"_createClass");function Rr(e){var t=Fi(e,"string");return typeof t=="symbol"?t:String(t)}i(Rr,"_toPropertyKey");function Fi(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}i(Fi,"_toPrimitive");var Ui=L("buffer"),Fe=Ui.Buffer,Wi=L("util"),yt=Wi.inspect,Hi=yt&&yt.custom||"inspect";function $i(e,t,r){Fe.prototype.copy.call(e,t,r)}i($i,"copyBuffer");Tr.exports=function(){function e(){ji(this,e),this.head=null,this.tail=null,this.length=0}return i(e,"BufferList"),Bi(e,[{key:"push",value:i(function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},"push")},{key:"unshift",value:i(function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},"unshift")},{key:"shift",value:i(function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},"shift")},{key:"clear",value:i(function(){this.head=this.tail=null,this.length=0},"clear")},{key:"join",value:i(function(r){if(this.length===0)return"";for(var n=this.head,o=""+n.data;n=n.next;)o+=r+n.data;return o},"join")},{key:"concat",value:i(function(r){if(this.length===0)return Fe.alloc(0);for(var n=Fe.allocUnsafe(r>>>0),o=this.head,a=0;o;)$i(o.data,n,a),a+=o.data.length,o=o.next;return n},"concat")},{key:"consume",value:i(function(r,n){var o;return r<this.head.data.length?(o=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?o=this.shift():o=n?this._getString(r):this._getBuffer(r),o},"consume")},{key:"first",value:i(function(){return this.head.data},"first")},{key:"_getString",value:i(function(r){var n=this.head,o=1,a=n.data;for(r-=a.length;n=n.next;){var s=n.data,u=r>s.length?s.length:r;if(u===s.length?a+=s:a+=s.slice(0,r),r-=u,r===0){u===s.length?(++o,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(u));break}++o}return this.length-=o,a},"_getString")},{key:"_getBuffer",value:i(function(r){var n=Fe.allocUnsafe(r),o=this.head,a=1;for(o.data.copy(n),r-=o.data.length;o=o.next;){var s=o.data,u=r>s.length?s.length:r;if(s.copy(n,n.length-r,0,u),r-=u,r===0){u===s.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=s.slice(u));break}++a}return this.length-=a,n},"_getBuffer")},{key:Hi,value:i(function(r,n){return yt(this,Er(Er({},n),{},{depth:0,customInspect:!1}))},"value")}]),e}()});var _t=S((eu,Lr)=>{"use strict";c();function zi(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(gt,this,e)):process.nextTick(gt,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(Ue,r):(r._writableState.errorEmitted=!0,process.nextTick(xr,r,a)):process.nextTick(xr,r,a):t?(process.nextTick(Ue,r),t(a)):process.nextTick(Ue,r)}),this)}i(zi,"destroy");function xr(e,t){gt(e,t),Ue(e)}i(xr,"emitErrorAndCloseNT");function Ue(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}i(Ue,"emitCloseNT");function Gi(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}i(Gi,"undestroy");function gt(e,t){e.emit("error",t)}i(gt,"emitErrorNT");function Vi(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}i(Vi,"errorOrDestroy");Lr.exports={destroy:zi,undestroy:Gi,errorOrDestroy:Vi}});var K=S((nu,Nr)=>{"use strict";c();var kr={};function j(e,t,r){r||(r=Error);function n(a,s,u){return typeof t=="string"?t:t(a,s,u)}i(n,"getMessage");class o extends r{static{i(this,"NodeError")}constructor(s,u,f){super(n(s,u,f))}}o.prototype.name=r.name,o.prototype.code=e,kr[e]=o}i(j,"createErrorType");function Pr(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(n=>String(n)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}i(Pr,"oneOf");function Ki(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}i(Ki,"startsWith");function Yi(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}i(Yi,"endsWith");function Xi(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}i(Xi,"includes");j("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);j("ERR_INVALID_ARG_TYPE",function(e,t,r){let n;typeof t=="string"&&Ki(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";let o;if(Yi(e," argument"))o=`The ${e} ${n} ${Pr(t,"type")}`;else{let a=Xi(e,".")?"property":"argument";o=`The "${e}" ${a} ${n} ${Pr(t,"type")}`}return o+=`. Received type ${typeof r}`,o},TypeError);j("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");j("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});j("ERR_STREAM_PREMATURE_CLOSE","Premature close");j("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});j("ERR_MULTIPLE_CALLBACK","Callback called multiple times");j("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");j("ERR_STREAM_WRITE_AFTER_END","write after end");j("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);j("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);j("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Nr.exports.codes=kr});var vt=S((au,Mr)=>{"use strict";c();var Ji=K().codes.ERR_INVALID_OPT_VALUE;function Zi(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}i(Zi,"highWaterMarkFrom");function Qi(e,t,r,n){var o=Zi(t,n,r);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var a=n?r:"highWaterMark";throw new Ji(a,o)}return Math.floor(o)}return e.objectMode?16:16*1024}i(Qi,"getHighWaterMark");Mr.exports={getHighWaterMark:Qi}});var Ar=S((fu,mt)=>{c();typeof Object.create=="function"?mt.exports=i(function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):mt.exports=i(function(t,r){if(r){t.super_=r;var n=i(function(){},"TempCtor");n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}},"inherits")});var Y=S((hu,bt)=>{c();try{if(wt=L("util"),typeof wt.inherits!="function")throw"";bt.exports=wt.inherits}catch{bt.exports=Ar()}var wt});var qr=S((pu,Dr)=>{c();Dr.exports=L("util").deprecate});var Rt=S((gu,Ur)=>{"use strict";c();Ur.exports=k;function Cr(e){var t=this;this.next=null,this.entry=null,this.finish=function(){xo(t,e)}}i(Cr,"CorkedRequest");var le;k.WritableState=Ee;var eo={deprecate:qr()},jr=pt(),He=L("buffer").Buffer,to=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function ro(e){return He.from(e)}i(ro,"_uint8ArrayToBuffer");function no(e){return He.isBuffer(e)||e instanceof to}i(no,"_isUint8Array");var St=_t(),io=vt(),oo=io.getHighWaterMark,X=K().codes,ao=X.ERR_INVALID_ARG_TYPE,so=X.ERR_METHOD_NOT_IMPLEMENTED,uo=X.ERR_MULTIPLE_CALLBACK,fo=X.ERR_STREAM_CANNOT_PIPE,lo=X.ERR_STREAM_DESTROYED,co=X.ERR_STREAM_NULL_VALUES,ho=X.ERR_STREAM_WRITE_AFTER_END,po=X.ERR_UNKNOWN_ENCODING,ce=St.errorOrDestroy;Y()(k,jr);function yo(){}i(yo,"nop");function Ee(e,t,r){le=le||ne(),e=e||{},typeof r!="boolean"&&(r=t instanceof le),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=oo(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){Eo(t,o)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Cr(this)}i(Ee,"WritableState");Ee.prototype.getBuffer=i(function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r},"getBuffer");(function(){try{Object.defineProperty(Ee.prototype,"buffer",{get:eo.deprecate(i(function(){return this.getBuffer()},"writableStateBufferGetter"),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var We;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(We=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:i(function(t){return We.call(this,t)?!0:this!==k?!1:t&&t._writableState instanceof Ee},"value")})):We=i(function(t){return t instanceof this},"realHasInstance");function k(e){le=le||ne();var t=this instanceof le;if(!t&&!We.call(k,this))return new k(e);this._writableState=new Ee(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),jr.call(this)}i(k,"Writable");k.prototype.pipe=function(){ce(this,new fo)};function go(e,t){var r=new ho;ce(e,r),process.nextTick(t,r)}i(go,"writeAfterEnd");function _o(e,t,r,n){var o;return r===null?o=new co:typeof r!="string"&&!t.objectMode&&(o=new ao("chunk",["string","Buffer"],r)),o?(ce(e,o),process.nextTick(n,o),!1):!0}i(_o,"validChunk");k.prototype.write=function(e,t,r){var n=this._writableState,o=!1,a=!n.objectMode&&no(e);return a&&!He.isBuffer(e)&&(e=ro(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=yo),n.ending?go(this,r):(a||_o(this,n,e,r))&&(n.pendingcb++,o=mo(this,n,a,e,t,r)),o};k.prototype.cork=function(){this._writableState.corked++};k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Br(this,e))};k.prototype.setDefaultEncoding=i(function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new po(t);return this._writableState.defaultEncoding=t,this},"setDefaultEncoding");Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:i(function(){return this._writableState&&this._writableState.getBuffer()},"get")});function vo(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=He.from(t,r)),t}i(vo,"decodeChunk");Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:i(function(){return this._writableState.highWaterMark},"get")});function mo(e,t,r,n,o,a){if(!r){var s=vo(t,n,o);n!==s&&(r=!0,o="buffer",n=s)}var u=t.objectMode?1:n.length;t.length+=u;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Et(e,t,!1,u,n,o,a);return f}i(mo,"writeOrBuffer");function Et(e,t,r,n,o,a,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new lo("write")):r?e._writev(o,t.onwrite):e._write(o,a,t.onwrite),t.sync=!1}i(Et,"doWrite");function wo(e,t,r,n,o){--t.pendingcb,r?(process.nextTick(o,n),process.nextTick(be,e,t),e._writableState.errorEmitted=!0,ce(e,n)):(o(n),e._writableState.errorEmitted=!0,ce(e,n),be(e,t))}i(wo,"onwriteError");function bo(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}i(bo,"onwriteStateUpdate");function Eo(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(typeof o!="function")throw new uo;if(bo(r),t)wo(e,r,n,t,o);else{var a=Fr(r)||e.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Br(e,r),n?process.nextTick(Ir,e,r,a,o):Ir(e,r,a,o)}}i(Eo,"onwrite");function Ir(e,t,r,n){r||So(e,t),t.pendingcb--,n(),be(e,t)}i(Ir,"afterWrite");function So(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}i(So,"onwriteDrain");function Br(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,Et(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new Cr(t),t.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,l=r.encoding,g=r.callback,d=t.objectMode?1:f.length;if(Et(e,t,!1,d,f,l,g),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}i(Br,"clearBuffer");k.prototype._write=function(e,t,r){r(new so("_write()"))};k.prototype._writev=null;k.prototype.end=function(e,t,r){var n=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||Oo(this,n,r),this};Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:i(function(){return this._writableState.length},"get")});function Fr(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}i(Fr,"needFinish");function Ro(e,t){e._final(function(r){t.pendingcb--,r&&ce(e,r),t.prefinished=!0,e.emit("prefinish"),be(e,t)})}i(Ro,"callFinal");function To(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(Ro,e,t)):(t.prefinished=!0,e.emit("prefinish")))}i(To,"prefinish");function be(e,t){var r=Fr(t);if(r&&(To(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}i(be,"finishMaybe");function Oo(e,t,r){t.ending=!0,be(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}i(Oo,"endWritable");function xo(e,t,r){var n=e.entry;for(e.entry=null;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree.next=e}i(xo,"onCorkedFinish");Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:i(function(){return this._writableState===void 0?!1:this._writableState.destroyed},"get"),set:i(function(t){this._writableState&&(this._writableState.destroyed=t)},"set")});k.prototype.destroy=St.destroy;k.prototype._undestroy=St.undestroy;k.prototype._destroy=function(e,t){t(e)}});var ne=S((mu,Hr)=>{"use strict";c();var Lo=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Hr.exports=U;var Wr=xt(),Ot=Rt();Y()(U,Wr);for(Tt=Lo(Ot.prototype),$e=0;$e<Tt.length;$e++)ze=Tt[$e],U.prototype[ze]||(U.prototype[ze]=Ot.prototype[ze]);var Tt,ze,$e;function U(e){if(!(this instanceof U))return new U(e);Wr.call(this,e),Ot.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",Po)))}i(U,"Duplex");Object.defineProperty(U.prototype,"writableHighWaterMark",{enumerable:!1,get:i(function(){return this._writableState.highWaterMark},"get")});Object.defineProperty(U.prototype,"writableBuffer",{enumerable:!1,get:i(function(){return this._writableState&&this._writableState.getBuffer()},"get")});Object.defineProperty(U.prototype,"writableLength",{enumerable:!1,get:i(function(){return this._writableState.length},"get")});function Po(){this._writableState.ended||process.nextTick(ko,this)}i(Po,"onend");function ko(e){e.end()}i(ko,"onEndNT");Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:i(function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},"get"),set:i(function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)},"set")})});var Gr=S((Lt,zr)=>{c();var Ge=L("buffer"),W=Ge.Buffer;function $r(e,t){for(var r in e)t[r]=e[r]}i($r,"copyProps");W.from&&W.alloc&&W.allocUnsafe&&W.allocUnsafeSlow?zr.exports=Ge:($r(Ge,Lt),Lt.Buffer=ie);function ie(e,t,r){return W(e,t,r)}i(ie,"SafeBuffer");ie.prototype=Object.create(W.prototype);$r(W,ie);ie.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return W(e,t,r)};ie.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=W(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};ie.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return W(e)};ie.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Ge.SlowBuffer(e)}});var Nt=S(Kr=>{"use strict";c();var kt=Gr().Buffer,Vr=kt.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function No(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}i(No,"_normalizeEncoding");function Mo(e){var t=No(e);if(typeof t!="string"&&(kt.isEncoding===Vr||!Vr(e)))throw new Error("Unknown encoding: "+e);return t||e}i(Mo,"normalizeEncoding");Kr.StringDecoder=Se;function Se(e){this.encoding=Mo(e);var t;switch(this.encoding){case"utf16le":this.text=jo,this.end=Bo,t=4;break;case"utf8":this.fillLast=qo,t=4;break;case"base64":this.text=Fo,this.end=Uo,t=3;break;default:this.write=Wo,this.end=Ho;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=kt.allocUnsafe(t)}i(Se,"StringDecoder");Se.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};Se.prototype.end=Co;Se.prototype.text=Io;Se.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Pt(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}i(Pt,"utf8CheckByte");function Ao(e,t,r){var n=t.length-1;if(n<r)return 0;var o=Pt(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||o===-2?0:(o=Pt(t[n]),o>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||o===-2?0:(o=Pt(t[n]),o>=0?(o>0&&(o===2?o=0:e.lastNeed=o-3),o):0))}i(Ao,"utf8CheckIncomplete");function Do(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}i(Do,"utf8CheckExtraBytes");function qo(e){var t=this.lastTotal-this.lastNeed,r=Do(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}i(qo,"utf8FillLast");function Io(e,t){var r=Ao(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}i(Io,"utf8Text");function Co(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}i(Co,"utf8End");function jo(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}i(jo,"utf16Text");function Bo(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}i(Bo,"utf16End");function Fo(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}i(Fo,"base64Text");function Uo(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}i(Uo,"base64End");function Wo(e){return e.toString(this.encoding)}i(Wo,"simpleWrite");function Ho(e){return e&&e.length?this.write(e):""}i(Ho,"simpleEnd")});var Ve=S((xu,Jr)=>{"use strict";c();var Yr=K().codes.ERR_STREAM_PREMATURE_CLOSE;function $o(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}i($o,"once");function zo(){}i(zo,"noop");function Go(e){return e.setHeader&&typeof e.abort=="function"}i(Go,"isRequest");function Xr(e,t,r){if(typeof t=="function")return Xr(e,null,t);t||(t={}),r=$o(r||zo);var n=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,a=i(function(){e.writable||u()},"onlegacyfinish"),s=e._writableState&&e._writableState.finished,u=i(function(){o=!1,s=!0,n||r.call(e)},"onfinish"),f=e._readableState&&e._readableState.endEmitted,l=i(function(){n=!1,f=!0,o||r.call(e)},"onend"),g=i(function(w){r.call(e,w)},"onerror"),d=i(function(){var w;if(n&&!f)return(!e._readableState||!e._readableState.ended)&&(w=new Yr),r.call(e,w);if(o&&!s)return(!e._writableState||!e._writableState.ended)&&(w=new Yr),r.call(e,w)},"onclose"),y=i(function(){e.req.on("finish",u)},"onrequest");return Go(e)?(e.on("complete",u),e.on("abort",d),e.req?y():e.on("request",y)):o&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",u),t.error!==!1&&e.on("error",g),e.on("close",d),function(){e.removeListener("complete",u),e.removeListener("abort",d),e.removeListener("request",y),e.req&&e.req.removeListener("finish",u),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",u),e.removeListener("end",l),e.removeListener("error",g),e.removeListener("close",d)}}i(Xr,"eos");Jr.exports=Xr});var Qr=S((ku,Zr)=>{"use strict";c();var Ke;function J(e,t,r){return t=Vo(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}i(J,"_defineProperty");function Vo(e){var t=Ko(e,"string");return typeof t=="symbol"?t:String(t)}i(Vo,"_toPropertyKey");function Ko(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}i(Ko,"_toPrimitive");var Yo=Ve(),Z=Symbol("lastResolve"),oe=Symbol("lastReject"),Re=Symbol("error"),Ye=Symbol("ended"),ae=Symbol("lastPromise"),Mt=Symbol("handlePromise"),se=Symbol("stream");function Q(e,t){return{value:e,done:t}}i(Q,"createIterResult");function Xo(e){var t=e[Z];if(t!==null){var r=e[se].read();r!==null&&(e[ae]=null,e[Z]=null,e[oe]=null,t(Q(r,!1)))}}i(Xo,"readAndResolve");function Jo(e){process.nextTick(Xo,e)}i(Jo,"onReadable");function Zo(e,t){return function(r,n){e.then(function(){if(t[Ye]){r(Q(void 0,!0));return}t[Mt](r,n)},n)}}i(Zo,"wrapForNext");var Qo=Object.getPrototypeOf(function(){}),ea=Object.setPrototypeOf((Ke={get stream(){return this[se]},next:i(function(){var t=this,r=this[Re];if(r!==null)return Promise.reject(r);if(this[Ye])return Promise.resolve(Q(void 0,!0));if(this[se].destroyed)return new Promise(function(s,u){process.nextTick(function(){t[Re]?u(t[Re]):s(Q(void 0,!0))})});var n=this[ae],o;if(n)o=new Promise(Zo(n,this));else{var a=this[se].read();if(a!==null)return Promise.resolve(Q(a,!1));o=new Promise(this[Mt])}return this[ae]=o,o},"next")},J(Ke,Symbol.asyncIterator,function(){return this}),J(Ke,"return",i(function(){var t=this;return new Promise(function(r,n){t[se].destroy(null,function(o){if(o){n(o);return}r(Q(void 0,!0))})})},"_return")),Ke),Qo),ta=i(function(t){var r,n=Object.create(ea,(r={},J(r,se,{value:t,writable:!0}),J(r,Z,{value:null,writable:!0}),J(r,oe,{value:null,writable:!0}),J(r,Re,{value:null,writable:!0}),J(r,Ye,{value:t._readableState.endEmitted,writable:!0}),J(r,Mt,{value:i(function(a,s){var u=n[se].read();u?(n[ae]=null,n[Z]=null,n[oe]=null,a(Q(u,!1))):(n[Z]=a,n[oe]=s)},"value"),writable:!0}),r));return n[ae]=null,Yo(t,function(o){if(o&&o.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[oe];a!==null&&(n[ae]=null,n[Z]=null,n[oe]=null,a(o)),n[Re]=o;return}var s=n[Z];s!==null&&(n[ae]=null,n[Z]=null,n[oe]=null,s(Q(void 0,!0))),n[Ye]=!0}),t.on("readable",Jo.bind(null,n)),n},"createReadableStreamAsyncIterator");Zr.exports=ta});var nn=S((Au,rn)=>{"use strict";c();function en(e,t,r,n,o,a,s){try{var u=e[a](s),f=u.value}catch(l){r(l);return}u.done?t(f):Promise.resolve(f).then(n,o)}i(en,"asyncGeneratorStep");function ra(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function s(f){en(a,n,o,s,u,"next",f)}i(s,"_next");function u(f){en(a,n,o,s,u,"throw",f)}i(u,"_throw"),s(void 0)})}}i(ra,"_asyncToGenerator");function tn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}i(tn,"ownKeys");function na(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tn(Object(r),!0).forEach(function(n){ia(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}i(na,"_objectSpread");function ia(e,t,r){return t=oa(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}i(ia,"_defineProperty");function oa(e){var t=aa(e,"string");return typeof t=="symbol"?t:String(t)}i(oa,"_toPropertyKey");function aa(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}i(aa,"_toPrimitive");var sa=K().codes.ERR_INVALID_ARG_TYPE;function ua(e,t,r){var n;if(t&&typeof t.next=="function")n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new sa("iterable",["Iterable"],t);var o=new e(na({objectMode:!0},r)),a=!1;o._read=function(){a||(a=!0,s())};function s(){return u.apply(this,arguments)}i(s,"next");function u(){return u=ra(function*(){try{var f=yield n.next(),l=f.value,g=f.done;g?o.push(null):o.push(yield l)?s():a=!1}catch(d){o.destroy(d)}}),u.apply(this,arguments)}return i(u,"_next2"),o}i(ua,"from");rn.exports=ua});var xt=S((Cu,pn)=>{"use strict";c();pn.exports=R;var he;R.ReadableState=un;var Iu=L("events").EventEmitter,sn=i(function(t,r){return t.listeners(r).length},"EElistenerCount"),Oe=pt(),Xe=L("buffer").Buffer,fa=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function la(e){return Xe.from(e)}i(la,"_uint8ArrayToBuffer");function ca(e){return Xe.isBuffer(e)||e instanceof fa}i(ca,"_isUint8Array");var At=L("util"),m;At&&At.debuglog?m=At.debuglog("stream"):m=i(function(){},"debug");var ha=Or(),Ft=_t(),da=vt(),pa=da.getHighWaterMark,Je=K().codes,ya=Je.ERR_INVALID_ARG_TYPE,ga=Je.ERR_STREAM_PUSH_AFTER_EOF,_a=Je.ERR_METHOD_NOT_IMPLEMENTED,va=Je.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,de,Dt,qt;Y()(R,Oe);var Te=Ft.errorOrDestroy,It=["error","close","destroy","pause","resume"];function ma(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}i(ma,"prependListener");function un(e,t,r){he=he||ne(),e=e||{},typeof r!="boolean"&&(r=t instanceof he),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=pa(this,e,"readableHighWaterMark",r),this.buffer=new ha,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(de||(de=Nt().StringDecoder),this.decoder=new de(e.encoding),this.encoding=e.encoding)}i(un,"ReadableState");function R(e){if(he=he||ne(),!(this instanceof R))return new R(e);var t=this instanceof he;this._readableState=new un(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Oe.call(this)}i(R,"Readable");Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:i(function(){return this._readableState===void 0?!1:this._readableState.destroyed},"get"),set:i(function(t){this._readableState&&(this._readableState.destroyed=t)},"set")});R.prototype.destroy=Ft.destroy;R.prototype._undestroy=Ft.undestroy;R.prototype._destroy=function(e,t){t(e)};R.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Xe.from(e,t),t=""),n=!0),fn(this,e,t,!1,n)};R.prototype.unshift=function(e){return fn(this,e,null,!0,!1)};function fn(e,t,r,n,o){m("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,Ea(e,a);else{var s;if(o||(s=wa(a,t)),s)Te(e,s);else if(a.objectMode||t&&t.length>0)if(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==Xe.prototype&&(t=la(t)),n)a.endEmitted?Te(e,new va):Ct(e,a,t,!0);else if(a.ended)Te(e,new ga);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Ct(e,a,t,!1):Bt(e,a)):Ct(e,a,t,!1)}else n||(a.reading=!1,Bt(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}i(fn,"readableAddChunk");function Ct(e,t,r,n){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Ze(e)),Bt(e,t)}i(Ct,"addChunk");function wa(e,t){var r;return!ca(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new ya("chunk",["string","Buffer","Uint8Array"],t)),r}i(wa,"chunkInvalid");R.prototype.isPaused=function(){return this._readableState.flowing===!1};R.prototype.setEncoding=function(e){de||(de=Nt().StringDecoder);var t=new de(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var on=1073741824;function ba(e){return e>=on?e=on:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}i(ba,"computeNewHighWaterMark");function an(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=ba(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}i(an,"howMuchToRead");R.prototype.read=function(e){m("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return m("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?jt(this):Ze(this),null;if(e=an(e,t),e===0&&t.ended)return t.length===0&&jt(this),null;var n=t.needReadable;m("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,m("length less than watermark",n)),t.ended||t.reading?(n=!1,m("reading or ended",n)):n&&(m("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=an(r,t)));var o;return e>0?o=hn(e,t):o=null,o===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&jt(this)),o!==null&&this.emit("data",o),o};function Ea(e,t){if(m("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?Ze(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,ln(e)))}}i(Ea,"onEofChunk");function Ze(e){var t=e._readableState;m("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(m("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(ln,e))}i(Ze,"emitReadable");function ln(e){var t=e._readableState;m("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Ut(e)}i(ln,"emitReadable_");function Bt(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(Sa,e,t))}i(Bt,"maybeReadMore");function Sa(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(m("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}i(Sa,"maybeReadMore_");R.prototype._read=function(e){Te(this,new _a("_read()"))};R.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,m("pipe count=%d opts=%j",n.pipesCount,t);var o=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=o?u:T;n.endEmitted?process.nextTick(a):r.once("end",a),e.on("unpipe",s);function s(b,p){m("onunpipe"),b===r&&p&&p.hasUnpiped===!1&&(p.hasUnpiped=!0,g())}i(s,"onunpipe");function u(){m("onend"),e.end()}i(u,"onend");var f=Ra(r);e.on("drain",f);var l=!1;function g(){m("cleanup"),e.removeListener("close",_),e.removeListener("finish",w),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",T),r.removeListener("data",d),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&f()}i(g,"cleanup"),r.on("data",d);function d(b){m("ondata");var p=e.write(b);m("dest.write",p),p===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&dn(n.pipes,e)!==-1)&&!l&&(m("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}i(d,"ondata");function y(b){m("onerror",b),T(),e.removeListener("error",y),sn(e,"error")===0&&Te(e,b)}i(y,"onerror"),ma(e,"error",y);function _(){e.removeListener("finish",w),T()}i(_,"onclose"),e.once("close",_);function w(){m("onfinish"),e.removeListener("close",_),T()}i(w,"onfinish"),e.once("finish",w);function T(){m("unpipe"),r.unpipe(e)}return i(T,"unpipe"),e.emit("pipe",r),n.flowing||(m("pipe resume"),r.resume()),e};function Ra(e){return i(function(){var r=e._readableState;m("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&sn(e,"data")&&(r.flowing=!0,Ut(e))},"pipeOnDrainFunctionResult")}i(Ra,"pipeOnDrain");R.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<o;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=dn(t.pipes,e);return s===-1?this:(t.pipes.splice(s,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};R.prototype.on=function(e,t){var r=Oe.prototype.on.call(this,e,t),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,m("on readable",n.length,n.reading),n.length?Ze(this):n.reading||process.nextTick(Ta,this)),r};R.prototype.addListener=R.prototype.on;R.prototype.removeListener=function(e,t){var r=Oe.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(cn,this),r};R.prototype.removeAllListeners=function(e){var t=Oe.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(cn,this),t};function cn(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}i(cn,"updateReadableListening");function Ta(e){m("readable nexttick read 0"),e.read(0)}i(Ta,"nReadingNextTick");R.prototype.resume=function(){var e=this._readableState;return e.flowing||(m("resume"),e.flowing=!e.readableListening,Oa(this,e)),e.paused=!1,this};function Oa(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(xa,e,t))}i(Oa,"resume");function xa(e,t){m("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),Ut(e),t.flowing&&!t.reading&&e.read(0)}i(xa,"resume_");R.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Ut(e){var t=e._readableState;for(m("flow",t.flowing);t.flowing&&e.read()!==null;);}i(Ut,"flow");R.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(m("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&t.push(s)}t.push(null)}),e.on("data",function(s){if(m("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var u=t.push(s);u||(n=!0,e.pause())}});for(var o in e)this[o]===void 0&&typeof e[o]=="function"&&(this[o]=i(function(u){return i(function(){return e[u].apply(e,arguments)},"methodWrapReturnFunction")},"methodWrap")(o));for(var a=0;a<It.length;a++)e.on(It[a],this.emit.bind(this,It[a]));return this._read=function(s){m("wrapped _read",s),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(R.prototype[Symbol.asyncIterator]=function(){return Dt===void 0&&(Dt=Qr()),Dt(this)});Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:i(function(){return this._readableState.highWaterMark},"get")});Object.defineProperty(R.prototype,"readableBuffer",{enumerable:!1,get:i(function(){return this._readableState&&this._readableState.buffer},"get")});Object.defineProperty(R.prototype,"readableFlowing",{enumerable:!1,get:i(function(){return this._readableState.flowing},"get"),set:i(function(t){this._readableState&&(this._readableState.flowing=t)},"set")});R._fromList=hn;Object.defineProperty(R.prototype,"readableLength",{enumerable:!1,get:i(function(){return this._readableState.length},"get")});function hn(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}i(hn,"fromList");function jt(e){var t=e._readableState;m("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(La,t,e))}i(jt,"endReadable");function La(e,t){if(m("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}i(La,"endReadableNT");typeof Symbol=="function"&&(R.from=function(e,t){return qt===void 0&&(qt=nn()),qt(R,e,t)});function dn(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}i(dn,"indexOf")});var Wt=S((Fu,gn)=>{"use strict";c();gn.exports=z;var Qe=K().codes,Pa=Qe.ERR_METHOD_NOT_IMPLEMENTED,ka=Qe.ERR_MULTIPLE_CALLBACK,Na=Qe.ERR_TRANSFORM_ALREADY_TRANSFORMING,Ma=Qe.ERR_TRANSFORM_WITH_LENGTH_0,et=ne();Y()(z,et);function Aa(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new ka);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}i(Aa,"afterTransform");function z(e){if(!(this instanceof z))return new z(e);et.call(this,e),this._transformState={afterTransform:Aa.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Da)}i(z,"Transform");function Da(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){yn(e,t,r)}):yn(this,null,null)}i(Da,"prefinish");z.prototype.push=function(e,t){return this._transformState.needTransform=!1,et.prototype.push.call(this,e,t)};z.prototype._transform=function(e,t,r){r(new Pa("_transform()"))};z.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}};z.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};z.prototype._destroy=function(e,t){et.prototype._destroy.call(this,e,function(r){t(r)})};function yn(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Ma;if(e._transformState.transforming)throw new Na;return e.push(null)}i(yn,"done")});var mn=S((Hu,vn)=>{"use strict";c();vn.exports=xe;var _n=Wt();Y()(xe,_n);function xe(e){if(!(this instanceof xe))return new xe(e);_n.call(this,e)}i(xe,"PassThrough");xe.prototype._transform=function(e,t,r){r(null,e)}});var Rn=S((Gu,Sn)=>{"use strict";c();var Ht;function qa(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}i(qa,"once");var En=K().codes,Ia=En.ERR_MISSING_ARGS,Ca=En.ERR_STREAM_DESTROYED;function wn(e){if(e)throw e}i(wn,"noop");function ja(e){return e.setHeader&&typeof e.abort=="function"}i(ja,"isRequest");function Ba(e,t,r,n){n=qa(n);var o=!1;e.on("close",function(){o=!0}),Ht===void 0&&(Ht=Ve()),Ht(e,{readable:t,writable:r},function(s){if(s)return n(s);o=!0,n()});var a=!1;return function(s){if(!o&&!a){if(a=!0,ja(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(s||new Ca("pipe"))}}}i(Ba,"destroyer");function bn(e){e()}i(bn,"call");function Fa(e,t){return e.pipe(t)}i(Fa,"pipe");function Ua(e){return!e.length||typeof e[e.length-1]!="function"?wn:e.pop()}i(Ua,"popCallback");function Wa(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Ua(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Ia("streams");var o,a=t.map(function(s,u){var f=u<t.length-1,l=u>0;return Ba(s,f,l,function(g){o||(o=g),g&&a.forEach(bn),!f&&(a.forEach(bn),n(o))})});return t.reduce(Fa)}i(Wa,"pipeline");Sn.exports=Wa});var pe=S((B,Pe)=>{c();var Le=L("stream");process.env.READABLE_STREAM==="disable"&&Le?(Pe.exports=Le.Readable,Object.assign(Pe.exports,Le),Pe.exports.Stream=Le):(B=Pe.exports=xt(),B.Stream=Le||B,B.Readable=B,B.Writable=Rt(),B.Duplex=ne(),B.Transform=Wt(),B.PassThrough=mn(),B.finished=Ve(),B.pipeline=Rn())});var xn=S((Xu,On)=>{"use strict";c();var{Buffer:F}=L("buffer"),Tn=Symbol.for("BufferList");function x(e){if(!(this instanceof x))return new x(e);x._init.call(this,e)}i(x,"BufferList");x._init=i(function(t){Object.defineProperty(this,Tn,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},"_init");x.prototype._new=i(function(t){return new x(t)},"_new");x.prototype._offset=i(function(t){if(t===0)return[0,0];let r=0;for(let n=0;n<this._bufs.length;n++){let o=r+this._bufs[n].length;if(t<o||n===this._bufs.length-1)return[n,t-r];r=o}},"_offset");x.prototype._reverseOffset=function(e){let t=e[0],r=e[1];for(let n=0;n<t;n++)r+=this._bufs[n].length;return r};x.prototype.get=i(function(t){if(t>this.length||t<0)return;let r=this._offset(t);return this._bufs[r[0]][r[1]]},"get");x.prototype.slice=i(function(t,r){return typeof t=="number"&&t<0&&(t+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,t,r)},"slice");x.prototype.copy=i(function(t,r,n,o){if((typeof n!="number"||n<0)&&(n=0),(typeof o!="number"||o>this.length)&&(o=this.length),n>=this.length||o<=0)return t||F.alloc(0);let a=!!t,s=this._offset(n),u=o-n,f=u,l=a&&r||0,g=s[1];if(n===0&&o===this.length){if(!a)return this._bufs.length===1?this._bufs[0]:F.concat(this._bufs,this.length);for(let d=0;d<this._bufs.length;d++)this._bufs[d].copy(t,l),l+=this._bufs[d].length;return t}if(f<=this._bufs[s[0]].length-g)return a?this._bufs[s[0]].copy(t,r,g,g+f):this._bufs[s[0]].slice(g,g+f);a||(t=F.allocUnsafe(u));for(let d=s[0];d<this._bufs.length;d++){let y=this._bufs[d].length-g;if(f>y)this._bufs[d].copy(t,l,g),l+=y;else{this._bufs[d].copy(t,l,g,g+f),l+=y;break}f-=y,g&&(g=0)}return t.length>l?t.slice(0,l):t},"copy");x.prototype.shallowSlice=i(function(t,r){if(t=t||0,r=typeof r!="number"?this.length:r,t<0&&(t+=this.length),r<0&&(r+=this.length),t===r)return this._new();let n=this._offset(t),o=this._offset(r),a=this._bufs.slice(n[0],o[0]+1);return o[1]===0?a.pop():a[a.length-1]=a[a.length-1].slice(0,o[1]),n[1]!==0&&(a[0]=a[0].slice(n[1])),this._new(a)},"shallowSlice");x.prototype.toString=i(function(t,r,n){return this.slice(r,n).toString(t)},"toString");x.prototype.consume=i(function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this},"consume");x.prototype.duplicate=i(function(){let t=this._new();for(let r=0;r<this._bufs.length;r++)t.append(this._bufs[r]);return t},"duplicate");x.prototype.append=i(function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(F.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let r=0;r<t.length;r++)this.append(t[r]);else if(this._isBufferList(t))for(let r=0;r<t._bufs.length;r++)this.append(t._bufs[r]);else typeof t=="number"&&(t=t.toString()),this._appendBuffer(F.from(t));return this},"append");x.prototype._appendBuffer=i(function(t){this._bufs.push(t),this.length+=t.length},"appendBuffer");x.prototype.indexOf=function(e,t,r){if(r===void 0&&typeof t=="string"&&(r=t,t=void 0),typeof e=="function"||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof e=="number"?e=F.from([e]):typeof e=="string"?e=F.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=F.from(e.buffer,e.byteOffset,e.byteLength):F.isBuffer(e)||(e=F.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),e.length===0)return t>this.length?this.length:t;let n=this._offset(t),o=n[0],a=n[1];for(;o<this._bufs.length;o++){let s=this._bufs[o];for(;a<s.length;)if(s.length-a>=e.length){let f=s.indexOf(e,a);if(f!==-1)return this._reverseOffset([o,f]);a=s.length-e.length+1}else{let f=this._reverseOffset([o,a]);if(this._match(f,e))return f;a++}a=0}return-1};x.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0};(function(){let e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let t in e)(function(r){e[r]===null?x.prototype[r]=function(n,o){return this.slice(n,n+o)[r](0,o)}:x.prototype[r]=function(n=0){return this.slice(n,n+e[r])[r](0)}})(t)})();x.prototype._isBufferList=i(function(t){return t instanceof x||x.isBufferList(t)},"_isBufferList");x.isBufferList=i(function(t){return t!=null&&t[Tn]},"isBufferList");On.exports=x});var Ln=S((Qu,tt)=>{"use strict";c();var $t=pe().Duplex,Ha=Y(),ke=xn();function N(e){if(!(this instanceof N))return new N(e);if(typeof e=="function"){this._callback=e;let t=i(function(n){this._callback&&(this._callback(n),this._callback=null)},"piper").bind(this);this.on("pipe",i(function(n){n.on("error",t)},"onPipe")),this.on("unpipe",i(function(n){n.removeListener("error",t)},"onUnpipe")),e=null}ke._init.call(this,e),$t.call(this)}i(N,"BufferListStream");Ha(N,$t);Object.assign(N.prototype,ke.prototype);N.prototype._new=i(function(t){return new N(t)},"_new");N.prototype._write=i(function(t,r,n){this._appendBuffer(t),typeof n=="function"&&n()},"_write");N.prototype._read=i(function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)},"_read");N.prototype.end=i(function(t){$t.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)},"end");N.prototype._destroy=i(function(t,r){this._bufs.length=0,this.length=0,r(t)},"_destroy");N.prototype._isBufferList=i(function(t){return t instanceof N||t instanceof ke||N.isBufferList(t)},"_isBufferList");N.isBufferList=ke.isBufferList;tt.exports=N;tt.exports.BufferListStream=N;tt.exports.BufferList=ke});var Vt=S(ge=>{c();var $a=Buffer.alloc,za="0000000000000000000",Ga="7777777777777777777",Pn=48,kn=Buffer.from("ustar\0","binary"),Va=Buffer.from("00","binary"),Ka=Buffer.from("ustar ","binary"),Ya=Buffer.from(" \0","binary"),Xa=parseInt("7777",8),Ne=257,Gt=263,Ja=i(function(e,t,r){return typeof e!="number"?r:(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0)},"clamp"),Za=i(function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},"toType"),Qa=i(function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},"toTypeflag"),Nn=i(function(e,t,r,n){for(;r<n;r++)if(e[r]===t)return r;return n},"indexOf"),Mn=i(function(e){for(var t=256,r=0;r<148;r++)t+=e[r];for(var n=156;n<512;n++)t+=e[n];return t},"cksum"),ee=i(function(e,t){return e=e.toString(8),e.length>t?Ga.slice(0,t)+" ":za.slice(0,t-e.length)+e+" "},"encodeOct");function es(e){var t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;for(var r=[],n=e.length-1;n>0;n--){var o=e[n];t?r.push(o):r.push(255-o)}var a=0,s=r.length;for(n=0;n<s;n++)a+=r[n]*Math.pow(256,n);return t?a:-1*a}i(es,"parse256");var te=i(function(e,t,r){if(e=e.slice(t,t+r),t=0,e[t]&128)return es(e);for(;t<e.length&&e[t]===32;)t++;for(var n=Ja(Nn(e,32,t,e.length),e.length,e.length);t<n&&e[t]===0;)t++;return n===t?0:parseInt(e.slice(t,n).toString(),8)},"decodeOct"),ye=i(function(e,t,r,n){return e.slice(t,Nn(e,0,t,t+r)).toString(n)},"decodeStr"),zt=i(function(e){var t=Buffer.byteLength(e),r=Math.floor(Math.log(t)/Math.log(10))+1;return t+r>=Math.pow(10,r)&&r++,t+r+e},"addLength");ge.decodeLongPath=function(e,t){return ye(e,0,e.length,t)};ge.encodePax=function(e){var t="";e.name&&(t+=zt(" path="+e.name+`
3
+ import{l as cr,m as hr}from"./chunk-UGMSDJFA.js";import{b as or,c as ar,d as sr,e as ur,f as fr,g as lr}from"./chunk-MX2C2PHD.js";import{a as i,b as L,c as S,e as Pi,f as c}from"./chunk-XKRTDXLT.js";var mr=S((Gs,vr)=>{"use strict";c();var C=L("fs"),re=L("path"),ki=C.lchown?"lchown":"chown",Ni=C.lchownSync?"lchownSync":"chownSync",pr=C.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),dr=i((e,t,r)=>{try{return C[Ni](e,t,r)}catch(n){if(n.code!=="ENOENT")throw n}},"lchownSync"),Mi=i((e,t,r)=>{try{return C.chownSync(e,t,r)}catch(n){if(n.code!=="ENOENT")throw n}},"chownSync"),Ai=pr?(e,t,r,n)=>o=>{!o||o.code!=="EISDIR"?n(o):C.chown(e,t,r,n)}:(e,t,r,n)=>n,ht=pr?(e,t,r)=>{try{return dr(e,t,r)}catch(n){if(n.code!=="EISDIR")throw n;Mi(e,t,r)}}:(e,t,r)=>dr(e,t,r),Di=process.version,yr=i((e,t,r)=>C.readdir(e,t,r),"readdir"),qi=i((e,t)=>C.readdirSync(e,t),"readdirSync");/^v4\./.test(Di)&&(yr=i((e,t,r)=>C.readdir(e,r),"readdir"));var Be=i((e,t,r,n)=>{C[ki](e,t,r,Ai(e,t,r,o=>{n(o&&o.code!=="ENOENT"?o:null)}))},"chown"),gr=i((e,t,r,n,o)=>{if(typeof t=="string")return C.lstat(re.resolve(e,t),(a,s)=>{if(a)return o(a.code!=="ENOENT"?a:null);s.name=t,gr(e,s,r,n,o)});if(t.isDirectory())dt(re.resolve(e,t.name),r,n,a=>{if(a)return o(a);let s=re.resolve(e,t.name);Be(s,r,n,o)});else{let a=re.resolve(e,t.name);Be(a,r,n,o)}},"chownrKid"),dt=i((e,t,r,n)=>{yr(e,{withFileTypes:!0},(o,a)=>{if(o){if(o.code==="ENOENT")return n();if(o.code!=="ENOTDIR"&&o.code!=="ENOTSUP")return n(o)}if(o||!a.length)return Be(e,t,r,n);let s=a.length,u=null,f=i(l=>{if(!u){if(l)return n(u=l);if(--s===0)return Be(e,t,r,n)}},"then");a.forEach(l=>gr(e,l,t,r,f))})},"chownr"),Ii=i((e,t,r,n)=>{if(typeof t=="string")try{let o=C.lstatSync(re.resolve(e,t));o.name=t,t=o}catch(o){if(o.code==="ENOENT")return;throw o}t.isDirectory()&&_r(re.resolve(e,t.name),r,n),ht(re.resolve(e,t.name),r,n)},"chownrKidSync"),_r=i((e,t,r)=>{let n;try{n=qi(e,{withFileTypes:!0})}catch(o){if(o.code==="ENOENT")return;if(o.code==="ENOTDIR"||o.code==="ENOTSUP")return ht(e,t,r);throw o}return n&&n.length&&n.forEach(o=>Ii(e,o,t,r)),ht(e,t,r)},"chownrSync");vr.exports=dt;dt.sync=_r});var pt=S((Ys,wr)=>{c();wr.exports=L("stream")});var Or=S((Js,Tr)=>{"use strict";c();function br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}i(br,"ownKeys");function Er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?br(Object(r),!0).forEach(function(n){Ci(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):br(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}i(Er,"_objectSpread");function Ci(e,t,r){return t=Rr(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}i(Ci,"_defineProperty");function ji(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i(ji,"_classCallCheck");function Sr(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Rr(n.key),n)}}i(Sr,"_defineProperties");function Bi(e,t,r){return t&&Sr(e.prototype,t),r&&Sr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}i(Bi,"_createClass");function Rr(e){var t=Fi(e,"string");return typeof t=="symbol"?t:String(t)}i(Rr,"_toPropertyKey");function Fi(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}i(Fi,"_toPrimitive");var Ui=L("buffer"),Fe=Ui.Buffer,Wi=L("util"),yt=Wi.inspect,Hi=yt&&yt.custom||"inspect";function $i(e,t,r){Fe.prototype.copy.call(e,t,r)}i($i,"copyBuffer");Tr.exports=function(){function e(){ji(this,e),this.head=null,this.tail=null,this.length=0}return i(e,"BufferList"),Bi(e,[{key:"push",value:i(function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length},"push")},{key:"unshift",value:i(function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length},"unshift")},{key:"shift",value:i(function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},"shift")},{key:"clear",value:i(function(){this.head=this.tail=null,this.length=0},"clear")},{key:"join",value:i(function(r){if(this.length===0)return"";for(var n=this.head,o=""+n.data;n=n.next;)o+=r+n.data;return o},"join")},{key:"concat",value:i(function(r){if(this.length===0)return Fe.alloc(0);for(var n=Fe.allocUnsafe(r>>>0),o=this.head,a=0;o;)$i(o.data,n,a),a+=o.data.length,o=o.next;return n},"concat")},{key:"consume",value:i(function(r,n){var o;return r<this.head.data.length?(o=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?o=this.shift():o=n?this._getString(r):this._getBuffer(r),o},"consume")},{key:"first",value:i(function(){return this.head.data},"first")},{key:"_getString",value:i(function(r){var n=this.head,o=1,a=n.data;for(r-=a.length;n=n.next;){var s=n.data,u=r>s.length?s.length:r;if(u===s.length?a+=s:a+=s.slice(0,r),r-=u,r===0){u===s.length?(++o,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=s.slice(u));break}++o}return this.length-=o,a},"_getString")},{key:"_getBuffer",value:i(function(r){var n=Fe.allocUnsafe(r),o=this.head,a=1;for(o.data.copy(n),r-=o.data.length;o=o.next;){var s=o.data,u=r>s.length?s.length:r;if(s.copy(n,n.length-r,0,u),r-=u,r===0){u===s.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=s.slice(u));break}++a}return this.length-=a,n},"_getBuffer")},{key:Hi,value:i(function(r,n){return yt(this,Er(Er({},n),{},{depth:0,customInspect:!1}))},"value")}]),e}()});var _t=S((eu,Lr)=>{"use strict";c();function zi(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(gt,this,e)):process.nextTick(gt,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(Ue,r):(r._writableState.errorEmitted=!0,process.nextTick(xr,r,a)):process.nextTick(xr,r,a):t?(process.nextTick(Ue,r),t(a)):process.nextTick(Ue,r)}),this)}i(zi,"destroy");function xr(e,t){gt(e,t),Ue(e)}i(xr,"emitErrorAndCloseNT");function Ue(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}i(Ue,"emitCloseNT");function Gi(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}i(Gi,"undestroy");function gt(e,t){e.emit("error",t)}i(gt,"emitErrorNT");function Vi(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}i(Vi,"errorOrDestroy");Lr.exports={destroy:zi,undestroy:Gi,errorOrDestroy:Vi}});var K=S((nu,Nr)=>{"use strict";c();var kr={};function j(e,t,r){r||(r=Error);function n(a,s,u){return typeof t=="string"?t:t(a,s,u)}i(n,"getMessage");class o extends r{static{i(this,"NodeError")}constructor(s,u,f){super(n(s,u,f))}}o.prototype.name=r.name,o.prototype.code=e,kr[e]=o}i(j,"createErrorType");function Pr(e,t){if(Array.isArray(e)){let r=e.length;return e=e.map(n=>String(n)),r>2?`one of ${t} ${e.slice(0,r-1).join(", ")}, or `+e[r-1]:r===2?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}else return`of ${t} ${String(e)}`}i(Pr,"oneOf");function Ki(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}i(Ki,"startsWith");function Yi(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}i(Yi,"endsWith");function Xi(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}i(Xi,"includes");j("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);j("ERR_INVALID_ARG_TYPE",function(e,t,r){let n;typeof t=="string"&&Ki(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";let o;if(Yi(e," argument"))o=`The ${e} ${n} ${Pr(t,"type")}`;else{let a=Xi(e,".")?"property":"argument";o=`The "${e}" ${a} ${n} ${Pr(t,"type")}`}return o+=`. Received type ${typeof r}`,o},TypeError);j("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");j("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});j("ERR_STREAM_PREMATURE_CLOSE","Premature close");j("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});j("ERR_MULTIPLE_CALLBACK","Callback called multiple times");j("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");j("ERR_STREAM_WRITE_AFTER_END","write after end");j("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);j("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);j("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Nr.exports.codes=kr});var vt=S((au,Mr)=>{"use strict";c();var Ji=K().codes.ERR_INVALID_OPT_VALUE;function Zi(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}i(Zi,"highWaterMarkFrom");function Qi(e,t,r,n){var o=Zi(t,n,r);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var a=n?r:"highWaterMark";throw new Ji(a,o)}return Math.floor(o)}return e.objectMode?16:16*1024}i(Qi,"getHighWaterMark");Mr.exports={getHighWaterMark:Qi}});var Ar=S((fu,mt)=>{c();typeof Object.create=="function"?mt.exports=i(function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))},"inherits"):mt.exports=i(function(t,r){if(r){t.super_=r;var n=i(function(){},"TempCtor");n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}},"inherits")});var Y=S((hu,bt)=>{c();try{if(wt=L("util"),typeof wt.inherits!="function")throw"";bt.exports=wt.inherits}catch{bt.exports=Ar()}var wt});var qr=S((pu,Dr)=>{c();Dr.exports=L("util").deprecate});var Rt=S((gu,Ur)=>{"use strict";c();Ur.exports=k;function Cr(e){var t=this;this.next=null,this.entry=null,this.finish=function(){xo(t,e)}}i(Cr,"CorkedRequest");var le;k.WritableState=Ee;var eo={deprecate:qr()},jr=pt(),He=L("buffer").Buffer,to=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function ro(e){return He.from(e)}i(ro,"_uint8ArrayToBuffer");function no(e){return He.isBuffer(e)||e instanceof to}i(no,"_isUint8Array");var St=_t(),io=vt(),oo=io.getHighWaterMark,X=K().codes,ao=X.ERR_INVALID_ARG_TYPE,so=X.ERR_METHOD_NOT_IMPLEMENTED,uo=X.ERR_MULTIPLE_CALLBACK,fo=X.ERR_STREAM_CANNOT_PIPE,lo=X.ERR_STREAM_DESTROYED,co=X.ERR_STREAM_NULL_VALUES,ho=X.ERR_STREAM_WRITE_AFTER_END,po=X.ERR_UNKNOWN_ENCODING,ce=St.errorOrDestroy;Y()(k,jr);function yo(){}i(yo,"nop");function Ee(e,t,r){le=le||ne(),e=e||{},typeof r!="boolean"&&(r=t instanceof le),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=oo(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(o){Eo(t,o)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Cr(this)}i(Ee,"WritableState");Ee.prototype.getBuffer=i(function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r},"getBuffer");(function(){try{Object.defineProperty(Ee.prototype,"buffer",{get:eo.deprecate(i(function(){return this.getBuffer()},"writableStateBufferGetter"),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var We;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(We=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:i(function(t){return We.call(this,t)?!0:this!==k?!1:t&&t._writableState instanceof Ee},"value")})):We=i(function(t){return t instanceof this},"realHasInstance");function k(e){le=le||ne();var t=this instanceof le;if(!t&&!We.call(k,this))return new k(e);this._writableState=new Ee(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),jr.call(this)}i(k,"Writable");k.prototype.pipe=function(){ce(this,new fo)};function go(e,t){var r=new ho;ce(e,r),process.nextTick(t,r)}i(go,"writeAfterEnd");function _o(e,t,r,n){var o;return r===null?o=new co:typeof r!="string"&&!t.objectMode&&(o=new ao("chunk",["string","Buffer"],r)),o?(ce(e,o),process.nextTick(n,o),!1):!0}i(_o,"validChunk");k.prototype.write=function(e,t,r){var n=this._writableState,o=!1,a=!n.objectMode&&no(e);return a&&!He.isBuffer(e)&&(e=ro(e)),typeof t=="function"&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=yo),n.ending?go(this,r):(a||_o(this,n,e,r))&&(n.pendingcb++,o=mo(this,n,a,e,t,r)),o};k.prototype.cork=function(){this._writableState.corked++};k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&Br(this,e))};k.prototype.setDefaultEncoding=i(function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new po(t);return this._writableState.defaultEncoding=t,this},"setDefaultEncoding");Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:i(function(){return this._writableState&&this._writableState.getBuffer()},"get")});function vo(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=He.from(t,r)),t}i(vo,"decodeChunk");Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:i(function(){return this._writableState.highWaterMark},"get")});function mo(e,t,r,n,o,a){if(!r){var s=vo(t,n,o);n!==s&&(r=!0,o="buffer",n=s)}var u=t.objectMode?1:n.length;t.length+=u;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:o,isBuf:r,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Et(e,t,!1,u,n,o,a);return f}i(mo,"writeOrBuffer");function Et(e,t,r,n,o,a,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new lo("write")):r?e._writev(o,t.onwrite):e._write(o,a,t.onwrite),t.sync=!1}i(Et,"doWrite");function wo(e,t,r,n,o){--t.pendingcb,r?(process.nextTick(o,n),process.nextTick(be,e,t),e._writableState.errorEmitted=!0,ce(e,n)):(o(n),e._writableState.errorEmitted=!0,ce(e,n),be(e,t))}i(wo,"onwriteError");function bo(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}i(bo,"onwriteStateUpdate");function Eo(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(typeof o!="function")throw new uo;if(bo(r),t)wo(e,r,n,t,o);else{var a=Fr(r)||e.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Br(e,r),n?process.nextTick(Ir,e,r,a,o):Ir(e,r,a,o)}}i(Eo,"onwrite");function Ir(e,t,r,n){r||So(e,t),t.pendingcb--,n(),be(e,t)}i(Ir,"afterWrite");function So(e,t){t.length===0&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}i(So,"onwriteDrain");function Br(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,o=new Array(n),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,Et(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new Cr(t),t.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,l=r.encoding,g=r.callback,d=t.objectMode?1:f.length;if(Et(e,t,!1,d,f,l,g),r=r.next,t.bufferedRequestCount--,t.writing)break}r===null&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}i(Br,"clearBuffer");k.prototype._write=function(e,t,r){r(new so("_write()"))};k.prototype._writev=null;k.prototype.end=function(e,t,r){var n=this._writableState;return typeof e=="function"?(r=e,e=null,t=null):typeof t=="function"&&(r=t,t=null),e!=null&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||Oo(this,n,r),this};Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:i(function(){return this._writableState.length},"get")});function Fr(e){return e.ending&&e.length===0&&e.bufferedRequest===null&&!e.finished&&!e.writing}i(Fr,"needFinish");function Ro(e,t){e._final(function(r){t.pendingcb--,r&&ce(e,r),t.prefinished=!0,e.emit("prefinish"),be(e,t)})}i(Ro,"callFinal");function To(e,t){!t.prefinished&&!t.finalCalled&&(typeof e._final=="function"&&!t.destroyed?(t.pendingcb++,t.finalCalled=!0,process.nextTick(Ro,e,t)):(t.prefinished=!0,e.emit("prefinish")))}i(To,"prefinish");function be(e,t){var r=Fr(t);if(r&&(To(e,t),t.pendingcb===0&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}i(be,"finishMaybe");function Oo(e,t,r){t.ending=!0,be(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}i(Oo,"endWritable");function xo(e,t,r){var n=e.entry;for(e.entry=null;n;){var o=n.callback;t.pendingcb--,o(r),n=n.next}t.corkedRequestsFree.next=e}i(xo,"onCorkedFinish");Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:i(function(){return this._writableState===void 0?!1:this._writableState.destroyed},"get"),set:i(function(t){this._writableState&&(this._writableState.destroyed=t)},"set")});k.prototype.destroy=St.destroy;k.prototype._undestroy=St.undestroy;k.prototype._destroy=function(e,t){t(e)}});var ne=S((mu,Hr)=>{"use strict";c();var Lo=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Hr.exports=U;var Wr=xt(),Ot=Rt();Y()(U,Wr);for(Tt=Lo(Ot.prototype),$e=0;$e<Tt.length;$e++)ze=Tt[$e],U.prototype[ze]||(U.prototype[ze]=Ot.prototype[ze]);var Tt,ze,$e;function U(e){if(!(this instanceof U))return new U(e);Wr.call(this,e),Ot.call(this,e),this.allowHalfOpen=!0,e&&(e.readable===!1&&(this.readable=!1),e.writable===!1&&(this.writable=!1),e.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",Po)))}i(U,"Duplex");Object.defineProperty(U.prototype,"writableHighWaterMark",{enumerable:!1,get:i(function(){return this._writableState.highWaterMark},"get")});Object.defineProperty(U.prototype,"writableBuffer",{enumerable:!1,get:i(function(){return this._writableState&&this._writableState.getBuffer()},"get")});Object.defineProperty(U.prototype,"writableLength",{enumerable:!1,get:i(function(){return this._writableState.length},"get")});function Po(){this._writableState.ended||process.nextTick(ko,this)}i(Po,"onend");function ko(e){e.end()}i(ko,"onEndNT");Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:i(function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},"get"),set:i(function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)},"set")})});var Gr=S((Lt,zr)=>{c();var Ge=L("buffer"),W=Ge.Buffer;function $r(e,t){for(var r in e)t[r]=e[r]}i($r,"copyProps");W.from&&W.alloc&&W.allocUnsafe&&W.allocUnsafeSlow?zr.exports=Ge:($r(Ge,Lt),Lt.Buffer=ie);function ie(e,t,r){return W(e,t,r)}i(ie,"SafeBuffer");ie.prototype=Object.create(W.prototype);$r(W,ie);ie.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return W(e,t,r)};ie.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=W(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};ie.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return W(e)};ie.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Ge.SlowBuffer(e)}});var Nt=S(Kr=>{"use strict";c();var kt=Gr().Buffer,Vr=kt.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function No(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}i(No,"_normalizeEncoding");function Mo(e){var t=No(e);if(typeof t!="string"&&(kt.isEncoding===Vr||!Vr(e)))throw new Error("Unknown encoding: "+e);return t||e}i(Mo,"normalizeEncoding");Kr.StringDecoder=Se;function Se(e){this.encoding=Mo(e);var t;switch(this.encoding){case"utf16le":this.text=jo,this.end=Bo,t=4;break;case"utf8":this.fillLast=qo,t=4;break;case"base64":this.text=Fo,this.end=Uo,t=3;break;default:this.write=Wo,this.end=Ho;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=kt.allocUnsafe(t)}i(Se,"StringDecoder");Se.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""};Se.prototype.end=Co;Se.prototype.text=Io;Se.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function Pt(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}i(Pt,"utf8CheckByte");function Ao(e,t,r){var n=t.length-1;if(n<r)return 0;var o=Pt(t[n]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--n<r||o===-2?0:(o=Pt(t[n]),o>=0?(o>0&&(e.lastNeed=o-2),o):--n<r||o===-2?0:(o=Pt(t[n]),o>=0?(o>0&&(o===2?o=0:e.lastNeed=o-3),o):0))}i(Ao,"utf8CheckIncomplete");function Do(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}i(Do,"utf8CheckExtraBytes");function qo(e){var t=this.lastTotal-this.lastNeed,r=Do(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}i(qo,"utf8FillLast");function Io(e,t){var r=Ao(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}i(Io,"utf8Text");function Co(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}i(Co,"utf8End");function jo(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}i(jo,"utf16Text");function Bo(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}i(Bo,"utf16End");function Fo(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}i(Fo,"base64Text");function Uo(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}i(Uo,"base64End");function Wo(e){return e.toString(this.encoding)}i(Wo,"simpleWrite");function Ho(e){return e&&e.length?this.write(e):""}i(Ho,"simpleEnd")});var Ve=S((xu,Jr)=>{"use strict";c();var Yr=K().codes.ERR_STREAM_PREMATURE_CLOSE;function $o(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}i($o,"once");function zo(){}i(zo,"noop");function Go(e){return e.setHeader&&typeof e.abort=="function"}i(Go,"isRequest");function Xr(e,t,r){if(typeof t=="function")return Xr(e,null,t);t||(t={}),r=$o(r||zo);var n=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,a=i(function(){e.writable||u()},"onlegacyfinish"),s=e._writableState&&e._writableState.finished,u=i(function(){o=!1,s=!0,n||r.call(e)},"onfinish"),f=e._readableState&&e._readableState.endEmitted,l=i(function(){n=!1,f=!0,o||r.call(e)},"onend"),g=i(function(w){r.call(e,w)},"onerror"),d=i(function(){var w;if(n&&!f)return(!e._readableState||!e._readableState.ended)&&(w=new Yr),r.call(e,w);if(o&&!s)return(!e._writableState||!e._writableState.ended)&&(w=new Yr),r.call(e,w)},"onclose"),y=i(function(){e.req.on("finish",u)},"onrequest");return Go(e)?(e.on("complete",u),e.on("abort",d),e.req?y():e.on("request",y)):o&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",u),t.error!==!1&&e.on("error",g),e.on("close",d),function(){e.removeListener("complete",u),e.removeListener("abort",d),e.removeListener("request",y),e.req&&e.req.removeListener("finish",u),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",u),e.removeListener("end",l),e.removeListener("error",g),e.removeListener("close",d)}}i(Xr,"eos");Jr.exports=Xr});var Qr=S((ku,Zr)=>{"use strict";c();var Ke;function J(e,t,r){return t=Vo(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}i(J,"_defineProperty");function Vo(e){var t=Ko(e,"string");return typeof t=="symbol"?t:String(t)}i(Vo,"_toPropertyKey");function Ko(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}i(Ko,"_toPrimitive");var Yo=Ve(),Z=Symbol("lastResolve"),oe=Symbol("lastReject"),Re=Symbol("error"),Ye=Symbol("ended"),ae=Symbol("lastPromise"),Mt=Symbol("handlePromise"),se=Symbol("stream");function Q(e,t){return{value:e,done:t}}i(Q,"createIterResult");function Xo(e){var t=e[Z];if(t!==null){var r=e[se].read();r!==null&&(e[ae]=null,e[Z]=null,e[oe]=null,t(Q(r,!1)))}}i(Xo,"readAndResolve");function Jo(e){process.nextTick(Xo,e)}i(Jo,"onReadable");function Zo(e,t){return function(r,n){e.then(function(){if(t[Ye]){r(Q(void 0,!0));return}t[Mt](r,n)},n)}}i(Zo,"wrapForNext");var Qo=Object.getPrototypeOf(function(){}),ea=Object.setPrototypeOf((Ke={get stream(){return this[se]},next:i(function(){var t=this,r=this[Re];if(r!==null)return Promise.reject(r);if(this[Ye])return Promise.resolve(Q(void 0,!0));if(this[se].destroyed)return new Promise(function(s,u){process.nextTick(function(){t[Re]?u(t[Re]):s(Q(void 0,!0))})});var n=this[ae],o;if(n)o=new Promise(Zo(n,this));else{var a=this[se].read();if(a!==null)return Promise.resolve(Q(a,!1));o=new Promise(this[Mt])}return this[ae]=o,o},"next")},J(Ke,Symbol.asyncIterator,function(){return this}),J(Ke,"return",i(function(){var t=this;return new Promise(function(r,n){t[se].destroy(null,function(o){if(o){n(o);return}r(Q(void 0,!0))})})},"_return")),Ke),Qo),ta=i(function(t){var r,n=Object.create(ea,(r={},J(r,se,{value:t,writable:!0}),J(r,Z,{value:null,writable:!0}),J(r,oe,{value:null,writable:!0}),J(r,Re,{value:null,writable:!0}),J(r,Ye,{value:t._readableState.endEmitted,writable:!0}),J(r,Mt,{value:i(function(a,s){var u=n[se].read();u?(n[ae]=null,n[Z]=null,n[oe]=null,a(Q(u,!1))):(n[Z]=a,n[oe]=s)},"value"),writable:!0}),r));return n[ae]=null,Yo(t,function(o){if(o&&o.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[oe];a!==null&&(n[ae]=null,n[Z]=null,n[oe]=null,a(o)),n[Re]=o;return}var s=n[Z];s!==null&&(n[ae]=null,n[Z]=null,n[oe]=null,s(Q(void 0,!0))),n[Ye]=!0}),t.on("readable",Jo.bind(null,n)),n},"createReadableStreamAsyncIterator");Zr.exports=ta});var nn=S((Au,rn)=>{"use strict";c();function en(e,t,r,n,o,a,s){try{var u=e[a](s),f=u.value}catch(l){r(l);return}u.done?t(f):Promise.resolve(f).then(n,o)}i(en,"asyncGeneratorStep");function ra(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function s(f){en(a,n,o,s,u,"next",f)}i(s,"_next");function u(f){en(a,n,o,s,u,"throw",f)}i(u,"_throw"),s(void 0)})}}i(ra,"_asyncToGenerator");function tn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}i(tn,"ownKeys");function na(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tn(Object(r),!0).forEach(function(n){ia(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tn(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}i(na,"_objectSpread");function ia(e,t,r){return t=oa(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}i(ia,"_defineProperty");function oa(e){var t=aa(e,"string");return typeof t=="symbol"?t:String(t)}i(oa,"_toPropertyKey");function aa(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}i(aa,"_toPrimitive");var sa=K().codes.ERR_INVALID_ARG_TYPE;function ua(e,t,r){var n;if(t&&typeof t.next=="function")n=t;else if(t&&t[Symbol.asyncIterator])n=t[Symbol.asyncIterator]();else if(t&&t[Symbol.iterator])n=t[Symbol.iterator]();else throw new sa("iterable",["Iterable"],t);var o=new e(na({objectMode:!0},r)),a=!1;o._read=function(){a||(a=!0,s())};function s(){return u.apply(this,arguments)}i(s,"next");function u(){return u=ra(function*(){try{var f=yield n.next(),l=f.value,g=f.done;g?o.push(null):o.push(yield l)?s():a=!1}catch(d){o.destroy(d)}}),u.apply(this,arguments)}return i(u,"_next2"),o}i(ua,"from");rn.exports=ua});var xt=S((Cu,pn)=>{"use strict";c();pn.exports=R;var he;R.ReadableState=un;var Iu=L("events").EventEmitter,sn=i(function(t,r){return t.listeners(r).length},"EElistenerCount"),Oe=pt(),Xe=L("buffer").Buffer,fa=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function la(e){return Xe.from(e)}i(la,"_uint8ArrayToBuffer");function ca(e){return Xe.isBuffer(e)||e instanceof fa}i(ca,"_isUint8Array");var At=L("util"),m;At&&At.debuglog?m=At.debuglog("stream"):m=i(function(){},"debug");var ha=Or(),Ft=_t(),da=vt(),pa=da.getHighWaterMark,Je=K().codes,ya=Je.ERR_INVALID_ARG_TYPE,ga=Je.ERR_STREAM_PUSH_AFTER_EOF,_a=Je.ERR_METHOD_NOT_IMPLEMENTED,va=Je.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,de,Dt,qt;Y()(R,Oe);var Te=Ft.errorOrDestroy,It=["error","close","destroy","pause","resume"];function ma(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}i(ma,"prependListener");function un(e,t,r){he=he||ne(),e=e||{},typeof r!="boolean"&&(r=t instanceof he),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=pa(this,e,"readableHighWaterMark",r),this.buffer=new ha,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(de||(de=Nt().StringDecoder),this.decoder=new de(e.encoding),this.encoding=e.encoding)}i(un,"ReadableState");function R(e){if(he=he||ne(),!(this instanceof R))return new R(e);var t=this instanceof he;this._readableState=new un(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),Oe.call(this)}i(R,"Readable");Object.defineProperty(R.prototype,"destroyed",{enumerable:!1,get:i(function(){return this._readableState===void 0?!1:this._readableState.destroyed},"get"),set:i(function(t){this._readableState&&(this._readableState.destroyed=t)},"set")});R.prototype.destroy=Ft.destroy;R.prototype._undestroy=Ft.undestroy;R.prototype._destroy=function(e,t){t(e)};R.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=Xe.from(e,t),t=""),n=!0),fn(this,e,t,!1,n)};R.prototype.unshift=function(e){return fn(this,e,null,!0,!1)};function fn(e,t,r,n,o){m("readableAddChunk",t);var a=e._readableState;if(t===null)a.reading=!1,Ea(e,a);else{var s;if(o||(s=wa(a,t)),s)Te(e,s);else if(a.objectMode||t&&t.length>0)if(typeof t!="string"&&!a.objectMode&&Object.getPrototypeOf(t)!==Xe.prototype&&(t=la(t)),n)a.endEmitted?Te(e,new va):Ct(e,a,t,!0);else if(a.ended)Te(e,new ga);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||t.length!==0?Ct(e,a,t,!1):Bt(e,a)):Ct(e,a,t,!1)}else n||(a.reading=!1,Bt(e,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}i(fn,"readableAddChunk");function Ct(e,t,r,n){t.flowing&&t.length===0&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Ze(e)),Bt(e,t)}i(Ct,"addChunk");function wa(e,t){var r;return!ca(t)&&typeof t!="string"&&t!==void 0&&!e.objectMode&&(r=new ya("chunk",["string","Buffer","Uint8Array"],t)),r}i(wa,"chunkInvalid");R.prototype.isPaused=function(){return this._readableState.flowing===!1};R.prototype.setEncoding=function(e){de||(de=Nt().StringDecoder);var t=new de(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var on=1073741824;function ba(e){return e>=on?e=on:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}i(ba,"computeNewHighWaterMark");function an(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=ba(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}i(an,"howMuchToRead");R.prototype.read=function(e){m("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return m("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?jt(this):Ze(this),null;if(e=an(e,t),e===0&&t.ended)return t.length===0&&jt(this),null;var n=t.needReadable;m("need readable",n),(t.length===0||t.length-e<t.highWaterMark)&&(n=!0,m("length less than watermark",n)),t.ended||t.reading?(n=!1,m("reading or ended",n)):n&&(m("do read"),t.reading=!0,t.sync=!0,t.length===0&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=an(r,t)));var o;return e>0?o=hn(e,t):o=null,o===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&jt(this)),o!==null&&this.emit("data",o),o};function Ea(e,t){if(m("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?Ze(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,ln(e)))}}i(Ea,"onEofChunk");function Ze(e){var t=e._readableState;m("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(m("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(ln,e))}i(Ze,"emitReadable");function ln(e){var t=e._readableState;m("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,Ut(e)}i(ln,"emitReadable_");function Bt(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(Sa,e,t))}i(Bt,"maybeReadMore");function Sa(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&t.length===0);){var r=t.length;if(m("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}i(Sa,"maybeReadMore_");R.prototype._read=function(e){Te(this,new _a("_read()"))};R.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e);break}n.pipesCount+=1,m("pipe count=%d opts=%j",n.pipesCount,t);var o=(!t||t.end!==!1)&&e!==process.stdout&&e!==process.stderr,a=o?u:T;n.endEmitted?process.nextTick(a):r.once("end",a),e.on("unpipe",s);function s(b,p){m("onunpipe"),b===r&&p&&p.hasUnpiped===!1&&(p.hasUnpiped=!0,g())}i(s,"onunpipe");function u(){m("onend"),e.end()}i(u,"onend");var f=Ra(r);e.on("drain",f);var l=!1;function g(){m("cleanup"),e.removeListener("close",_),e.removeListener("finish",w),e.removeListener("drain",f),e.removeListener("error",y),e.removeListener("unpipe",s),r.removeListener("end",u),r.removeListener("end",T),r.removeListener("data",d),l=!0,n.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&f()}i(g,"cleanup"),r.on("data",d);function d(b){m("ondata");var p=e.write(b);m("dest.write",p),p===!1&&((n.pipesCount===1&&n.pipes===e||n.pipesCount>1&&dn(n.pipes,e)!==-1)&&!l&&(m("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}i(d,"ondata");function y(b){m("onerror",b),T(),e.removeListener("error",y),sn(e,"error")===0&&Te(e,b)}i(y,"onerror"),ma(e,"error",y);function _(){e.removeListener("finish",w),T()}i(_,"onclose"),e.once("close",_);function w(){m("onfinish"),e.removeListener("close",_),T()}i(w,"onfinish"),e.once("finish",w);function T(){m("unpipe"),r.unpipe(e)}return i(T,"unpipe"),e.emit("pipe",r),n.flowing||(m("pipe resume"),r.resume()),e};function Ra(e){return i(function(){var r=e._readableState;m("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&sn(e,"data")&&(r.flowing=!0,Ut(e))},"pipeOnDrainFunctionResult")}i(Ra,"pipeOnDrain");R.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<o;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var s=dn(t.pipes,e);return s===-1?this:(t.pipes.splice(s,1),t.pipesCount-=1,t.pipesCount===1&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r),this)};R.prototype.on=function(e,t){var r=Oe.prototype.on.call(this,e,t),n=this._readableState;return e==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,m("on readable",n.length,n.reading),n.length?Ze(this):n.reading||process.nextTick(Ta,this)),r};R.prototype.addListener=R.prototype.on;R.prototype.removeListener=function(e,t){var r=Oe.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(cn,this),r};R.prototype.removeAllListeners=function(e){var t=Oe.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(cn,this),t};function cn(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}i(cn,"updateReadableListening");function Ta(e){m("readable nexttick read 0"),e.read(0)}i(Ta,"nReadingNextTick");R.prototype.resume=function(){var e=this._readableState;return e.flowing||(m("resume"),e.flowing=!e.readableListening,Oa(this,e)),e.paused=!1,this};function Oa(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(xa,e,t))}i(Oa,"resume");function xa(e,t){m("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),Ut(e),t.flowing&&!t.reading&&e.read(0)}i(xa,"resume_");R.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Ut(e){var t=e._readableState;for(m("flow",t.flowing);t.flowing&&e.read()!==null;);}i(Ut,"flow");R.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(m("wrapped end"),r.decoder&&!r.ended){var s=r.decoder.end();s&&s.length&&t.push(s)}t.push(null)}),e.on("data",function(s){if(m("wrapped data"),r.decoder&&(s=r.decoder.write(s)),!(r.objectMode&&s==null)&&!(!r.objectMode&&(!s||!s.length))){var u=t.push(s);u||(n=!0,e.pause())}});for(var o in e)this[o]===void 0&&typeof e[o]=="function"&&(this[o]=i(function(u){return i(function(){return e[u].apply(e,arguments)},"methodWrapReturnFunction")},"methodWrap")(o));for(var a=0;a<It.length;a++)e.on(It[a],this.emit.bind(this,It[a]));return this._read=function(s){m("wrapped _read",s),n&&(n=!1,e.resume())},this};typeof Symbol=="function"&&(R.prototype[Symbol.asyncIterator]=function(){return Dt===void 0&&(Dt=Qr()),Dt(this)});Object.defineProperty(R.prototype,"readableHighWaterMark",{enumerable:!1,get:i(function(){return this._readableState.highWaterMark},"get")});Object.defineProperty(R.prototype,"readableBuffer",{enumerable:!1,get:i(function(){return this._readableState&&this._readableState.buffer},"get")});Object.defineProperty(R.prototype,"readableFlowing",{enumerable:!1,get:i(function(){return this._readableState.flowing},"get"),set:i(function(t){this._readableState&&(this._readableState.flowing=t)},"set")});R._fromList=hn;Object.defineProperty(R.prototype,"readableLength",{enumerable:!1,get:i(function(){return this._readableState.length},"get")});function hn(e,t){if(t.length===0)return null;var r;return t.objectMode?r=t.buffer.shift():!e||e>=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}i(hn,"fromList");function jt(e){var t=e._readableState;m("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(La,t,e))}i(jt,"endReadable");function La(e,t){if(m("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}i(La,"endReadableNT");typeof Symbol=="function"&&(R.from=function(e,t){return qt===void 0&&(qt=nn()),qt(R,e,t)});function dn(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}i(dn,"indexOf")});var Wt=S((Fu,gn)=>{"use strict";c();gn.exports=z;var Qe=K().codes,Pa=Qe.ERR_METHOD_NOT_IMPLEMENTED,ka=Qe.ERR_MULTIPLE_CALLBACK,Na=Qe.ERR_TRANSFORM_ALREADY_TRANSFORMING,Ma=Qe.ERR_TRANSFORM_WITH_LENGTH_0,et=ne();Y()(z,et);function Aa(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new ka);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}i(Aa,"afterTransform");function z(e){if(!(this instanceof z))return new z(e);et.call(this,e),this._transformState={afterTransform:Aa.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Da)}i(z,"Transform");function Da(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){yn(e,t,r)}):yn(this,null,null)}i(Da,"prefinish");z.prototype.push=function(e,t){return this._transformState.needTransform=!1,et.prototype.push.call(this,e,t)};z.prototype._transform=function(e,t,r){r(new Pa("_transform()"))};z.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}};z.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};z.prototype._destroy=function(e,t){et.prototype._destroy.call(this,e,function(r){t(r)})};function yn(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new Ma;if(e._transformState.transforming)throw new Na;return e.push(null)}i(yn,"done")});var mn=S((Hu,vn)=>{"use strict";c();vn.exports=xe;var _n=Wt();Y()(xe,_n);function xe(e){if(!(this instanceof xe))return new xe(e);_n.call(this,e)}i(xe,"PassThrough");xe.prototype._transform=function(e,t,r){r(null,e)}});var Rn=S((Gu,Sn)=>{"use strict";c();var Ht;function qa(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}i(qa,"once");var En=K().codes,Ia=En.ERR_MISSING_ARGS,Ca=En.ERR_STREAM_DESTROYED;function wn(e){if(e)throw e}i(wn,"noop");function ja(e){return e.setHeader&&typeof e.abort=="function"}i(ja,"isRequest");function Ba(e,t,r,n){n=qa(n);var o=!1;e.on("close",function(){o=!0}),Ht===void 0&&(Ht=Ve()),Ht(e,{readable:t,writable:r},function(s){if(s)return n(s);o=!0,n()});var a=!1;return function(s){if(!o&&!a){if(a=!0,ja(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(s||new Ca("pipe"))}}}i(Ba,"destroyer");function bn(e){e()}i(bn,"call");function Fa(e,t){return e.pipe(t)}i(Fa,"pipe");function Ua(e){return!e.length||typeof e[e.length-1]!="function"?wn:e.pop()}i(Ua,"popCallback");function Wa(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Ua(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Ia("streams");var o,a=t.map(function(s,u){var f=u<t.length-1,l=u>0;return Ba(s,f,l,function(g){o||(o=g),g&&a.forEach(bn),!f&&(a.forEach(bn),n(o))})});return t.reduce(Fa)}i(Wa,"pipeline");Sn.exports=Wa});var pe=S((B,Pe)=>{c();var Le=L("stream");process.env.READABLE_STREAM==="disable"&&Le?(Pe.exports=Le.Readable,Object.assign(Pe.exports,Le),Pe.exports.Stream=Le):(B=Pe.exports=xt(),B.Stream=Le||B,B.Readable=B,B.Writable=Rt(),B.Duplex=ne(),B.Transform=Wt(),B.PassThrough=mn(),B.finished=Ve(),B.pipeline=Rn())});var xn=S((Xu,On)=>{"use strict";c();var{Buffer:F}=L("buffer"),Tn=Symbol.for("BufferList");function x(e){if(!(this instanceof x))return new x(e);x._init.call(this,e)}i(x,"BufferList");x._init=i(function(t){Object.defineProperty(this,Tn,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},"_init");x.prototype._new=i(function(t){return new x(t)},"_new");x.prototype._offset=i(function(t){if(t===0)return[0,0];let r=0;for(let n=0;n<this._bufs.length;n++){let o=r+this._bufs[n].length;if(t<o||n===this._bufs.length-1)return[n,t-r];r=o}},"_offset");x.prototype._reverseOffset=function(e){let t=e[0],r=e[1];for(let n=0;n<t;n++)r+=this._bufs[n].length;return r};x.prototype.get=i(function(t){if(t>this.length||t<0)return;let r=this._offset(t);return this._bufs[r[0]][r[1]]},"get");x.prototype.slice=i(function(t,r){return typeof t=="number"&&t<0&&(t+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,t,r)},"slice");x.prototype.copy=i(function(t,r,n,o){if((typeof n!="number"||n<0)&&(n=0),(typeof o!="number"||o>this.length)&&(o=this.length),n>=this.length||o<=0)return t||F.alloc(0);let a=!!t,s=this._offset(n),u=o-n,f=u,l=a&&r||0,g=s[1];if(n===0&&o===this.length){if(!a)return this._bufs.length===1?this._bufs[0]:F.concat(this._bufs,this.length);for(let d=0;d<this._bufs.length;d++)this._bufs[d].copy(t,l),l+=this._bufs[d].length;return t}if(f<=this._bufs[s[0]].length-g)return a?this._bufs[s[0]].copy(t,r,g,g+f):this._bufs[s[0]].slice(g,g+f);a||(t=F.allocUnsafe(u));for(let d=s[0];d<this._bufs.length;d++){let y=this._bufs[d].length-g;if(f>y)this._bufs[d].copy(t,l,g),l+=y;else{this._bufs[d].copy(t,l,g,g+f),l+=y;break}f-=y,g&&(g=0)}return t.length>l?t.slice(0,l):t},"copy");x.prototype.shallowSlice=i(function(t,r){if(t=t||0,r=typeof r!="number"?this.length:r,t<0&&(t+=this.length),r<0&&(r+=this.length),t===r)return this._new();let n=this._offset(t),o=this._offset(r),a=this._bufs.slice(n[0],o[0]+1);return o[1]===0?a.pop():a[a.length-1]=a[a.length-1].slice(0,o[1]),n[1]!==0&&(a[0]=a[0].slice(n[1])),this._new(a)},"shallowSlice");x.prototype.toString=i(function(t,r,n){return this.slice(r,n).toString(t)},"toString");x.prototype.consume=i(function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;)if(t>=this._bufs[0].length)t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}return this},"consume");x.prototype.duplicate=i(function(){let t=this._new();for(let r=0;r<this._bufs.length;r++)t.append(this._bufs[r]);return t},"duplicate");x.prototype.append=i(function(t){if(t==null)return this;if(t.buffer)this._appendBuffer(F.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let r=0;r<t.length;r++)this.append(t[r]);else if(this._isBufferList(t))for(let r=0;r<t._bufs.length;r++)this.append(t._bufs[r]);else typeof t=="number"&&(t=t.toString()),this._appendBuffer(F.from(t));return this},"append");x.prototype._appendBuffer=i(function(t){this._bufs.push(t),this.length+=t.length},"appendBuffer");x.prototype.indexOf=function(e,t,r){if(r===void 0&&typeof t=="string"&&(r=t,t=void 0),typeof e=="function"||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if(typeof e=="number"?e=F.from([e]):typeof e=="string"?e=F.from(e,r):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=F.from(e.buffer,e.byteOffset,e.byteLength):F.isBuffer(e)||(e=F.from(e)),t=Number(t||0),isNaN(t)&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),e.length===0)return t>this.length?this.length:t;let n=this._offset(t),o=n[0],a=n[1];for(;o<this._bufs.length;o++){let s=this._bufs[o];for(;a<s.length;)if(s.length-a>=e.length){let f=s.indexOf(e,a);if(f!==-1)return this._reverseOffset([o,f]);a=s.length-e.length+1}else{let f=this._reverseOffset([o,a]);if(this._match(f,e))return f;a++}a=0}return-1};x.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(let r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0};(function(){let e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(let t in e)(function(r){e[r]===null?x.prototype[r]=function(n,o){return this.slice(n,n+o)[r](0,o)}:x.prototype[r]=function(n=0){return this.slice(n,n+e[r])[r](0)}})(t)})();x.prototype._isBufferList=i(function(t){return t instanceof x||x.isBufferList(t)},"_isBufferList");x.isBufferList=i(function(t){return t!=null&&t[Tn]},"isBufferList");On.exports=x});var Ln=S((Qu,tt)=>{"use strict";c();var $t=pe().Duplex,Ha=Y(),ke=xn();function N(e){if(!(this instanceof N))return new N(e);if(typeof e=="function"){this._callback=e;let t=i(function(n){this._callback&&(this._callback(n),this._callback=null)},"piper").bind(this);this.on("pipe",i(function(n){n.on("error",t)},"onPipe")),this.on("unpipe",i(function(n){n.removeListener("error",t)},"onUnpipe")),e=null}ke._init.call(this,e),$t.call(this)}i(N,"BufferListStream");Ha(N,$t);Object.assign(N.prototype,ke.prototype);N.prototype._new=i(function(t){return new N(t)},"_new");N.prototype._write=i(function(t,r,n){this._appendBuffer(t),typeof n=="function"&&n()},"_write");N.prototype._read=i(function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)},"_read");N.prototype.end=i(function(t){$t.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)},"end");N.prototype._destroy=i(function(t,r){this._bufs.length=0,this.length=0,r(t)},"_destroy");N.prototype._isBufferList=i(function(t){return t instanceof N||t instanceof ke||N.isBufferList(t)},"_isBufferList");N.isBufferList=ke.isBufferList;tt.exports=N;tt.exports.BufferListStream=N;tt.exports.BufferList=ke});var Vt=S(ge=>{c();var $a=Buffer.alloc,za="0000000000000000000",Ga="7777777777777777777",Pn=48,kn=Buffer.from("ustar\0","binary"),Va=Buffer.from("00","binary"),Ka=Buffer.from("ustar ","binary"),Ya=Buffer.from(" \0","binary"),Xa=parseInt("7777",8),Ne=257,Gt=263,Ja=i(function(e,t,r){return typeof e!="number"?r:(e=~~e,e>=t?t:e>=0||(e+=t,e>=0)?e:0)},"clamp"),Za=i(function(e){switch(e){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},"toType"),Qa=i(function(e){switch(e){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},"toTypeflag"),Nn=i(function(e,t,r,n){for(;r<n;r++)if(e[r]===t)return r;return n},"indexOf"),Mn=i(function(e){for(var t=256,r=0;r<148;r++)t+=e[r];for(var n=156;n<512;n++)t+=e[n];return t},"cksum"),ee=i(function(e,t){return e=e.toString(8),e.length>t?Ga.slice(0,t)+" ":za.slice(0,t-e.length)+e+" "},"encodeOct");function es(e){var t;if(e[0]===128)t=!0;else if(e[0]===255)t=!1;else return null;for(var r=[],n=e.length-1;n>0;n--){var o=e[n];t?r.push(o):r.push(255-o)}var a=0,s=r.length;for(n=0;n<s;n++)a+=r[n]*Math.pow(256,n);return t?a:-1*a}i(es,"parse256");var te=i(function(e,t,r){if(e=e.slice(t,t+r),t=0,e[t]&128)return es(e);for(;t<e.length&&e[t]===32;)t++;for(var n=Ja(Nn(e,32,t,e.length),e.length,e.length);t<n&&e[t]===0;)t++;return n===t?0:parseInt(e.slice(t,n).toString(),8)},"decodeOct"),ye=i(function(e,t,r,n){return e.slice(t,Nn(e,0,t,t+r)).toString(n)},"decodeStr"),zt=i(function(e){var t=Buffer.byteLength(e),r=Math.floor(Math.log(t)/Math.log(10))+1;return t+r>=Math.pow(10,r)&&r++,t+r+e},"addLength");ge.decodeLongPath=function(e,t){return ye(e,0,e.length,t)};ge.encodePax=function(e){var t="";e.name&&(t+=zt(" path="+e.name+`
4
4
  `)),e.linkname&&(t+=zt(" linkpath="+e.linkname+`
5
5
  `));var r=e.pax;if(r)for(var n in r)t+=zt(" "+n+"="+r[n]+`
6
6
  `);return Buffer.from(t)};ge.decodePax=function(e){for(var t={};e.length;){for(var r=0;r<e.length&&e[r]!==32;)r++;var n=parseInt(e.slice(0,r).toString(),10);if(!n)return t;var o=e.slice(r+1,n-1).toString(),a=o.indexOf("=");if(a===-1)return t;t[o.slice(0,a)]=o.slice(a+1),e=e.slice(n)}return t};ge.encode=function(e){var t=$a(512),r=e.name,n="";if(e.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var o=r.indexOf("/");if(o===-1)return null;n+=n?"/"+r.slice(0,o):r.slice(0,o),r=r.slice(o+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(n)>155||e.linkname&&Buffer.byteLength(e.linkname)>100?null:(t.write(r),t.write(ee(e.mode&Xa,6),100),t.write(ee(e.uid,6),108),t.write(ee(e.gid,6),116),t.write(ee(e.size,11),124),t.write(ee(e.mtime.getTime()/1e3|0,11),136),t[156]=Pn+Qa(e.type),e.linkname&&t.write(e.linkname,157),kn.copy(t,Ne),Va.copy(t,Gt),e.uname&&t.write(e.uname,265),e.gname&&t.write(e.gname,297),t.write(ee(e.devmajor||0,6),329),t.write(ee(e.devminor||0,6),337),n&&t.write(n,345),t.write(ee(Mn(t),6),148),t)};ge.decode=function(e,t,r){var n=e[156]===0?0:e[156]-Pn,o=ye(e,0,100,t),a=te(e,100,8),s=te(e,108,8),u=te(e,116,8),f=te(e,124,12),l=te(e,136,12),g=Za(n),d=e[157]===0?null:ye(e,157,100,t),y=ye(e,265,32),_=ye(e,297,32),w=te(e,329,8),T=te(e,337,8),b=Mn(e);if(b===8*32)return null;if(b!==te(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(kn.compare(e,Ne,Ne+6)===0)e[345]&&(o=ye(e,345,155,t)+"/"+o);else if(!(Ka.compare(e,Ne,Ne+6)===0&&Ya.compare(e,Gt,Gt+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return n===0&&o&&o[o.length-1]==="/"&&(n=5),{name:o,mode:a,uid:s,gid:u,size:f,mtime:new Date(1e3*l),type:g,linkname:d,uname:y,gname:_,devmajor:w,devminor:T}}});var Bn=S((af,jn)=>{c();var Dn=L("util"),ts=Ln(),Me=Vt(),qn=pe().Writable,In=pe().PassThrough,Cn=i(function(){},"noop"),An=i(function(e){return e&=511,e&&512-e},"overflow"),rs=i(function(e,t){var r=new rt(e,t);return r.end(),r},"emptyStream"),ns=i(function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e},"mixinPax"),rt=i(function(e,t){this._parent=e,this.offset=t,In.call(this,{autoDestroy:!1})},"Source");Dn.inherits(rt,In);rt.prototype.destroy=function(e){this._parent.destroy(e)};var G=i(function(e){if(!(this instanceof G))return new G(e);qn.call(this,e),e=e||{},this._offset=0,this._buffer=ts(),this._missing=0,this._partial=!1,this._onparse=Cn,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var t=this,r=t._buffer,n=i(function(){t._continue()},"oncontinue"),o=i(function(y){if(t._locked=!1,y)return t.destroy(y);t._stream||n()},"onunlock"),a=i(function(){t._stream=null;var y=An(t._header.size);y?t._parse(y,s):t._parse(512,d),t._locked||n()},"onstreamend"),s=i(function(){t._buffer.consume(An(t._header.size)),t._parse(512,d),n()},"ondrain"),u=i(function(){var y=t._header.size;t._paxGlobal=Me.decodePax(r.slice(0,y)),r.consume(y),a()},"onpaxglobalheader"),f=i(function(){var y=t._header.size;t._pax=Me.decodePax(r.slice(0,y)),t._paxGlobal&&(t._pax=Object.assign({},t._paxGlobal,t._pax)),r.consume(y),a()},"onpaxheader"),l=i(function(){var y=t._header.size;this._gnuLongPath=Me.decodeLongPath(r.slice(0,y),e.filenameEncoding),r.consume(y),a()},"ongnulongpath"),g=i(function(){var y=t._header.size;this._gnuLongLinkPath=Me.decodeLongPath(r.slice(0,y),e.filenameEncoding),r.consume(y),a()},"ongnulonglinkpath"),d=i(function(){var y=t._offset,_;try{_=t._header=Me.decode(r.slice(0,512),e.filenameEncoding,e.allowUnknownFormat)}catch(w){t.emit("error",w)}if(r.consume(512),!_){t._parse(512,d),n();return}if(_.type==="gnu-long-path"){t._parse(_.size,l),n();return}if(_.type==="gnu-long-link-path"){t._parse(_.size,g),n();return}if(_.type==="pax-global-header"){t._parse(_.size,u),n();return}if(_.type==="pax-header"){t._parse(_.size,f),n();return}if(t._gnuLongPath&&(_.name=t._gnuLongPath,t._gnuLongPath=null),t._gnuLongLinkPath&&(_.linkname=t._gnuLongLinkPath,t._gnuLongLinkPath=null),t._pax&&(t._header=_=ns(_,t._pax),t._pax=null),t._locked=!0,!_.size||_.type==="directory"){t._parse(512,d),t.emit("entry",_,rs(t,y),o);return}t._stream=new rt(t,y),t.emit("entry",_,t._stream,o),t._parse(_.size,a),n()},"onheader");this._onheader=d,this._parse(512,d)},"Extract");Dn.inherits(G,qn);G.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))};G.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)};G.prototype._continue=function(){if(!this._destroyed){var e=this._cb;this._cb=Cn,this._overflow?this._write(this._overflow,void 0,e):e()}};G.prototype._write=function(e,t,r){if(!this._destroyed){var n=this._stream,o=this._buffer,a=this._missing;if(e.length&&(this._partial=!0),e.length<a)return this._missing-=e.length,this._overflow=null,n?n.write(e,r):(o.append(e),r());this._cb=r,this._missing=0;var s=null;e.length>a&&(s=e.slice(a),e=e.slice(0,a)),n?n.end(e):o.append(e),this._overflow=s,this._onparse()}};G.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data"));e()};jn.exports=G});var Un=S((ff,Fn)=>{c();Fn.exports=L("fs").constants||L("constants")});var $n=S((cf,Hn)=>{c();Hn.exports=Wn;function Wn(e,t){if(e&&t)return Wn(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){r[n]=e[n]}),r;function r(){for(var n=new Array(arguments.length),o=0;o<n.length;o++)n[o]=arguments[o];var a=e.apply(this,n),s=n[n.length-1];return typeof a=="function"&&a!==s&&Object.keys(s).forEach(function(u){a[u]=s[u]}),a}i(r,"wrapper")}i(Wn,"wrappy")});var Yt=S((pf,Kt)=>{c();var zn=$n();Kt.exports=zn(nt);Kt.exports.strict=zn(Gn);nt.proto=nt(function(){Object.defineProperty(Function.prototype,"once",{value:i(function(){return nt(this)},"value"),configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:i(function(){return Gn(this)},"value"),configurable:!0})});function nt(e){var t=i(function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))},"f");return t.called=!1,t}i(nt,"once");function Gn(e){var t=i(function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},"f"),r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}i(Gn,"onceStrict")});var Xt=S((_f,Kn)=>{c();var is=Yt(),os=i(function(){},"noop"),as=global.Bare?queueMicrotask:process.nextTick.bind(process),ss=i(function(e){return e.setHeader&&typeof e.abort=="function"},"isRequest"),us=i(function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},"isChildProcess"),Vn=i(function(e,t,r){if(typeof t=="function")return Vn(e,null,t);t||(t={}),r=is(r||os);var n=e._writableState,o=e._readableState,a=t.readable||t.readable!==!1&&e.readable,s=t.writable||t.writable!==!1&&e.writable,u=!1,f=i(function(){e.writable||l()},"onlegacyfinish"),l=i(function(){s=!1,a||r.call(e)},"onfinish"),g=i(function(){a=!1,s||r.call(e)},"onend"),d=i(function(b){r.call(e,b?new Error("exited with error code: "+b):null)},"onexit"),y=i(function(b){r.call(e,b)},"onerror"),_=i(function(){as(w)},"onclose"),w=i(function(){if(!u){if(a&&!(o&&o.ended&&!o.destroyed))return r.call(e,new Error("premature close"));if(s&&!(n&&n.ended&&!n.destroyed))return r.call(e,new Error("premature close"))}},"onclosenexttick"),T=i(function(){e.req.on("finish",l)},"onrequest");return ss(e)?(e.on("complete",l),e.on("abort",_),e.req?T():e.on("request",T)):s&&!n&&(e.on("end",f),e.on("close",f)),us(e)&&e.on("exit",d),e.on("end",g),e.on("finish",l),t.error!==!1&&e.on("error",y),e.on("close",_),function(){u=!0,e.removeListener("complete",l),e.removeListener("abort",_),e.removeListener("request",T),e.req&&e.req.removeListener("finish",l),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",l),e.removeListener("exit",d),e.removeListener("end",g),e.removeListener("error",y),e.removeListener("close",_)}},"eos");Kn.exports=Vn});var Qn=S((wf,Zn)=>{c();var _e=Un(),Yn=Xt(),ot=Y(),fs=Buffer.alloc,Xn=pe().Readable,ve=pe().Writable,ls=L("string_decoder").StringDecoder,it=Vt(),cs=parseInt("755",8),hs=parseInt("644",8),Jn=fs(1024),Zt=i(function(){},"noop"),Jt=i(function(e,t){t&=511,t&&e.push(Jn.slice(0,512-t))},"overflow");function ds(e){switch(e&_e.S_IFMT){case _e.S_IFBLK:return"block-device";case _e.S_IFCHR:return"character-device";case _e.S_IFDIR:return"directory";case _e.S_IFIFO:return"fifo";case _e.S_IFLNK:return"symlink"}return"file"}i(ds,"modeToType");var at=i(function(e){ve.call(this),this.written=0,this._to=e,this._destroyed=!1},"Sink");ot(at,ve);at.prototype._write=function(e,t,r){if(this.written+=e.length,this._to.push(e))return r();this._to._drain=r};at.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var st=i(function(){ve.call(this),this.linkname="",this._decoder=new ls("utf-8"),this._destroyed=!1},"LinkSink");ot(st,ve);st.prototype._write=function(e,t,r){this.linkname+=this._decoder.write(e),r()};st.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Ae=i(function(){ve.call(this),this._destroyed=!1},"Void");ot(Ae,ve);Ae.prototype._write=function(e,t,r){r(new Error("No body allowed for this entry"))};Ae.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var H=i(function(e){if(!(this instanceof H))return new H(e);Xn.call(this,e),this._drain=Zt,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null},"Pack");ot(H,Xn);H.prototype.entry=function(e,t,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof t=="function"&&(r=t,t=null),r||(r=Zt);var n=this;if((!e.size||e.type==="symlink")&&(e.size=0),e.type||(e.type=ds(e.mode)),e.mode||(e.mode=e.type==="directory"?cs:hs),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),typeof t=="string"&&(t=Buffer.from(t)),Buffer.isBuffer(t)){e.size=t.length,this._encode(e);var o=this.push(t);return Jt(n,e.size),o?process.nextTick(r):this._drain=r,new Ae}if(e.type==="symlink"&&!e.linkname){var a=new st;return Yn(a,function(u){if(u)return n.destroy(),r(u);e.linkname=a.linkname,n._encode(e),r()}),a}if(this._encode(e),e.type!=="file"&&e.type!=="contiguous-file")return process.nextTick(r),new Ae;var s=new at(this);return this._stream=s,Yn(s,function(u){if(n._stream=null,u)return n.destroy(),r(u);if(s.written!==e.size)return n.destroy(),r(new Error("size mismatch"));Jt(n,e.size),n._finalizing&&n.finalize(),r()}),s}};H.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(Jn),this.push(null))};H.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};H.prototype._encode=function(e){if(!e.pax){var t=it.encode(e);if(t){this.push(t);return}}this._encodePax(e)};H.prototype._encodePax=function(e){var t=it.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor};this.push(it.encode(r)),this.push(t),Jt(this,t.length),r.size=e.size,r.type=e.type,this.push(it.encode(r))};H.prototype._read=function(e){var t=this._drain;this._drain=Zt,t()};Zn.exports=H});var ei=S(Qt=>{c();Qt.extract=Bn();Qt.pack=Qn()});var ni=S((Tf,ri)=>{c();var ps=Yt(),ys=Xt(),ut;try{ut=L("fs")}catch{}var De=i(function(){},"noop"),gs=typeof process>"u"?!1:/^v?\.0/.test(process.version),ft=i(function(e){return typeof e=="function"},"isFn"),_s=i(function(e){return!gs||!ut?!1:(e instanceof(ut.ReadStream||De)||e instanceof(ut.WriteStream||De))&&ft(e.close)},"isFS"),vs=i(function(e){return e.setHeader&&ft(e.abort)},"isRequest"),ms=i(function(e,t,r,n){n=ps(n);var o=!1;e.on("close",function(){o=!0}),ys(e,{readable:t,writable:r},function(s){if(s)return n(s);o=!0,n()});var a=!1;return function(s){if(!o&&!a){if(a=!0,_s(e))return e.close(De);if(vs(e))return e.abort();if(ft(e.destroy))return e.destroy();n(s||new Error("stream was destroyed"))}}},"destroyer"),ti=i(function(e){e()},"call"),ws=i(function(e,t){return e.pipe(t)},"pipe"),bs=i(function(){var e=Array.prototype.slice.call(arguments),t=ft(e[e.length-1]||De)&&e.pop()||De;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,n=e.map(function(o,a){var s=a<e.length-1,u=a>0;return ms(o,s,u,function(f){r||(r=f),f&&n.forEach(ti),!s&&(n.forEach(ti),t(r))})});return e.reduce(ws)},"pump");ri.exports=bs});var si=S((Lf,ai)=>{c();var lt=L("path"),ii=L("fs"),oi=parseInt("0777",8);ai.exports=me.mkdirp=me.mkdirP=me;function me(e,t,r,n){typeof t=="function"?(r=t,t={}):(!t||typeof t!="object")&&(t={mode:t});var o=t.mode,a=t.fs||ii;o===void 0&&(o=oi&~process.umask()),n||(n=null);var s=r||function(){};e=lt.resolve(e),a.mkdir(e,o,function(u){if(!u)return n=n||e,s(null,n);switch(u.code){case"ENOENT":me(lt.dirname(e),t,function(f,l){f?s(f,l):me(e,t,s,l)});break;default:a.stat(e,function(f,l){f||!l.isDirectory()?s(u,n):s(null,n)});break}})}i(me,"mkdirP");me.sync=i(function e(t,r,n){(!r||typeof r!="object")&&(r={mode:r});var o=r.mode,a=r.fs||ii;o===void 0&&(o=oi&~process.umask()),n||(n=null),t=lt.resolve(t);try{a.mkdirSync(t,o),n=n||t}catch(u){switch(u.code){case"ENOENT":n=e(lt.dirname(t),r,n),e(t,r,n);break;default:var s;try{s=a.statSync(t)}catch{throw u}if(!s.isDirectory())throw u;break}}return n},"sync")});var gi=S(nr=>{c();var Es=mr(),fi=ei(),li=ni(),Ss=si(),ci=L("fs"),P=L("path"),Rs=L("os"),qe=Rs.platform()==="win32",Ie=i(function(){},"noop"),rr=i(function(e){return e},"echo"),er=qe?function(e){return e.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:rr,Ts=i(function(e,t,r,n,o,a){for(var s=o||["."],u=0;u<s.length;u++)if(!tr(P.resolve(r,s[u]),r))throw new Error(s[u]+" is not a valid path");return i(function(l){if(!s.length)return l();var g=s.shift(),d=P.join(r,g);t.call(e,d,function(y,_){if(y)return l(y);if(!_.isDirectory())return l(null,g,_);e.readdir(d,function(w,T){if(w)return l(w);a&&T.sort();for(var b=0;b<T.length;b++)n(P.join(r,g,T[b]))||s.push(P.join(g,T[b]));l(null,g,_)})})},"loop")},"statAll"),hi=i(function(e,t){return function(r){r.name=r.name.split("/").slice(t).join("/");var n=r.linkname;return n&&(r.type==="link"||P.isAbsolute(n))&&(r.linkname=n.split("/").slice(t).join("/")),e(r)}},"strip");nr.pack=function(e,t){e||(e="."),t||(t={});var r=t.fs||ci,n=t.ignore||t.filter||Ie,o=t.map||Ie,a=t.mapStream||rr,s=Ts(r,t.dereference?r.stat:r.lstat,e,n,t.entries,t.sort),u=t.strict!==!1,f=typeof t.umask=="number"?~t.umask:~di(),l=typeof t.dmode=="number"?t.dmode:0,g=typeof t.fmode=="number"?t.fmode:0,d=t.pack||fi.pack(),y=t.finish||Ie;t.strip&&(o=hi(o,t.strip)),t.readable&&(l|=parseInt(555,8),g|=parseInt(444,8)),t.writable&&(l|=parseInt(333,8),g|=parseInt(222,8));var _=i(function(b,p){r.readlink(P.join(e,b),function(v,h){if(v)return d.destroy(v);p.linkname=er(h),d.entry(p,T)})},"onsymlink"),w=i(function(b,p,v){if(b)return d.destroy(b);if(!p)return t.finalize!==!1&&d.finalize(),y(d);if(v.isSocket())return T();var h={name:er(p),mode:(v.mode|(v.isDirectory()?l:g))&f,mtime:v.mtime,size:v.size,type:"file",uid:v.uid,gid:v.gid};if(v.isDirectory())return h.size=0,h.type="directory",h=o(h)||h,d.entry(h,T);if(v.isSymbolicLink())return h.size=0,h.type="symlink",h=o(h)||h,_(p,h);if(h=o(h)||h,!v.isFile())return u?d.destroy(new Error("unsupported type for "+p)):T();var O=d.entry(h,T);if(O){var A=a(r.createReadStream(P.join(e,p),{start:0,end:h.size>0?h.size-1:h.size}),h);A.on("error",function(V){O.destroy(V)}),li(A,O)}},"onstat"),T=i(function(b){if(b)return d.destroy(b);s(w)},"onnextentry");return T(),d};var Os=i(function(e){return e.length?e[e.length-1]:null},"head"),xs=i(function(){return process.getuid?process.getuid():-1},"processGetuid"),di=i(function(){return process.umask?process.umask():0},"processUmask");nr.extract=function(e,t){e||(e="."),t||(t={});var r=t.fs||ci,n=t.ignore||t.filter||Ie,o=t.map||Ie,a=t.mapStream||rr,s=t.chown!==!1&&!qe&&xs()===0,u=t.extract||fi.extract(),f=[],l=new Date,g=typeof t.umask=="number"?~t.umask:~di(),d=typeof t.dmode=="number"?t.dmode:0,y=typeof t.fmode=="number"?t.fmode:0,_=t.strict!==!1;t.strip&&(o=hi(o,t.strip)),t.readable&&(d|=parseInt(555,8),y|=parseInt(444,8)),t.writable&&(d|=parseInt(333,8),y|=parseInt(222,8));var w=i(function(p,v){for(var h;(h=Os(f))&&p.slice(0,h[0].length)!==h[0];)f.pop();if(!h)return v();r.utimes(h[0],l,h[1],v)},"utimesParent"),T=i(function(p,v,h){if(t.utimes===!1)return h();if(v.type==="directory")return r.utimes(p,l,v.mtime,h);if(v.type==="symlink")return w(p,h);r.utimes(p,l,v.mtime,function(O){if(O)return h(O);w(p,h)})},"utimes"),b=i(function(p,v,h){var O=v.type==="symlink",A=O?r.lchmod:r.chmod,V=O?r.lchown:r.chown;if(!A)return h();var ct=(v.mode|(v.type==="directory"?d:y))&g&parseInt(777,8);V&&s?V.call(r,p,v.uid,v.gid,we):we(null);function we(ue){if(ue)return h(ue);if(!A)return h();A.call(r,p,ct,h)}i(we,"onchown")},"chperm");return u.on("entry",function(p,v,h){p=o(p)||p,p.name=er(p.name);var O=P.join(e,P.join("/",p.name));if(n(O,p))return v.resume(),h();var A=i(function(D){if(D)return h(D);if(P.join(O,".")===P.join(e,"."))return h();T(O,p,function(q){if(q)return h(q);if(qe)return h();b(O,p,h)})},"stat"),V=i(function(){if(qe)return h();r.unlink(O,function(){var D=P.resolve(P.dirname(O),p.linkname);if(!tr(D,e))return h(new Error(O+" is not a valid symlink"));yi(r,D,P.resolve(e),function(q,I){if(q)return h(q);if(!I)return h(new Error(O+" is not a valid symlink"));r.symlink(p.linkname,O,A)})})},"onsymlink"),ct=i(function(){if(qe)return h();r.unlink(O,function(){var D=P.join(e,P.join("/",p.linkname));r.realpath(D,function(q,I){if(q||!tr(I,e))return h(new Error(O+" is not a valid hardlink"));r.link(I,O,function(fe){if(fe&&fe.code==="EPERM"&&t.hardlinkAsFilesFallback)return v=r.createReadStream(D),we();A(fe)})})})},"onlink"),we=i(function(){r.lstat(O,function(q,I){if(!q&&I.isSymbolicLink())return r.unlink(O,D);D()});function D(q){if(q)return h(q);var I=r.createWriteStream(O),fe=a(v,p);I.on("error",function(je){fe.destroy(je)}),li(fe,I,function(je){if(je)return h(je);I.on("close",A)})}i(D,"onwrite")},"onfile");if(p.type==="directory")return f.push([O,p.mtime]),ui(O,{fs:r,own:s,uid:p.uid,gid:p.gid},A);var ue=P.dirname(O);pi(r,ue,P.join(e,"."),function(D,q){if(D)return h(D);if(!q)return h(new Error(ue+" is not a valid path"));ui(ue,{fs:r,own:s,uid:p.uid,gid:p.gid},function(I){if(I)return h(I);switch(p.type){case"file":return we();case"link":return ct();case"symlink":return V()}if(_)return h(new Error("unsupported type for "+O+" ("+p.type+")"));v.resume(),h()})})}),t.finish&&u.on("finish",t.finish),u};function pi(e,t,r,n){if(t===r)return n(null,!0);e.lstat(t,function(o,a){if(o&&o.code!=="ENOENT")return n(o);if(o||a.isDirectory())return pi(e,P.join(t,".."),r,n);n(null,!1)})}i(pi,"validate");function yi(e,t,r,n){if(t===r)return n(null,!0);if(!t.startsWith(r+P.sep))return n(null,!1);e.lstat(t,function(o,a){if(o&&o.code!=="ENOENT"&&o.code!=="EPERM")return n(o);if(o||!a.isSymbolicLink())return yi(e,P.join(t,".."),r,n);n(null,!1)})}i(yi,"validateNotSymlink");function ui(e,t,r){Ss(e,{fs:t.fs},function(n,o){!n&&o&&t.own?Es(o,t.uid,t.gid,r):r(n)})}i(ui,"mkdirfix");function tr(e,t){return t=P.resolve(t),t===e||e.startsWith(t+P.sep)}i(tr,"inCwd")});c();var Ti=Pi(gi(),1);import{createHash as Ps}from"node:crypto";import{readFileSync as Ei}from"node:fs";import*as Si from"node:os";import*as $ from"node:path";import{PassThrough as vi,Readable as Ri}from"node:stream";import{StringDecoder as ks}from"node:string_decoder";c();import{createRequire as Ls}from"node:module";function _i(){return Ls(import.meta.url)("dockerode")}i(_i,"loadDockerode");function Ns(){return process.env.NODE_TEST_CONTEXT&&!process.env.WERKMEISTER_DOCKER_ENGINE?(process.stderr.write(`Docker engine reached in a test without useDockerEngine() (fixtures.mjs); using a dead socket
@@ -12,4 +12,4 @@ import{l as cr,m as hr}from"./chunk-NI4SD5KN.js";import{b as or,c as ar,d as sr,
12
12
  safe-buffer/index.js:
13
13
  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
14
14
  */
15
- //# sourceMappingURL=chunk-2CNYFUAA.js.map
15
+ //# sourceMappingURL=chunk-ASISB2JX.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{a as S}from"./chunk-FO3OSGDP.js";import{m as z,n as O}from"./chunk-2CNYFUAA.js";import{m as j}from"./chunk-NI4SD5KN.js";import{U as w}from"./chunk-RDY6H5F3.js";import{a as l,f as _}from"./chunk-NW56IEMZ.js";_();import*as k from"node:fs";import*as d from"node:path";function g(n,e){return e.host?{kind:"host",name:e.host}:{kind:"volume",name:e.volume??`werkmeister-${n}`}}l(g,"cacheSource");function R(n,e){return e.host||e.volume?null:`sandbox-${n}`}l(R,"legacyCacheVolume");function I(n,e,i){for(let t=e;;t=d.dirname(t)){if(n.some(o=>k.existsSync(d.join(t,o))))return!0;if(t===i||!t.startsWith(i))return!1}}l(I,"detectedIn");function N(n,e,i,t,o){let s;if(Array.isArray(e.caches))s=[...e.caches];else{let r=S(e,i)?.caches??[],u=o&&k.existsSync(o)?Object.keys(t).filter(c=>{let a=t[c]?.detect??[];return a.length>0&&I(a,d.resolve(o,e.path??"."),d.resolve(o))}):[];s=[...new Set([...r,...u])]}for(let r of s)if(!(r in t))throw new Error(`services.yaml: service '${n}' names unknown cache '${r}' \u2014 no \`caches.${r}\` entry`);return s.sort()}l(N,"serviceCaches");function C(n,e,i){let t=[...n.extra_volumes??[]],o={};for(let s of e){let r=i[s],u=g(s,r),c=`${u.kind==="volume"?`^${u.name}`:u.name}:${r.path}`;t.includes(c)||t.push(c),o={...o,...r.env}}return{...n,extra_volumes:t,environment:{...o,...n.environment}}}l(C,"withCaches");function W(n,e,i,t,o){if(Object.keys(t).length===0)return[n,e];let s={},r=new Map;for(let[c,a]of Object.entries(n)){let h=a.repo?d.join(o,a.repo):null,m=N(c,a,i,t,h);if(s[c]=m.length?C(a,m,t):a,a.setup_service&&m.length){let p=r.get(a.setup_service)??new Set;for(let v of m)p.add(v);r.set(a.setup_service,p)}}let u={};for(let[c,a]of Object.entries(e)){let h=[...r.get(c)??[]].sort();u[c]=h.length?C(a,h,t):a}return[s,u]}l(W,"applyCaches");function B(n){let e=0;for(let i of k.readdirSync(n,{withFileTypes:!0,recursive:!0}))i.isFile()&&(e+=k.statSync(d.join(i.parentPath,i.name)).size);return e}l(B,"dirSize");async function E(n=w(),e=void 0){return e??=await z(),Object.keys(n).sort().flatMap(i=>{let t=n[i],o=R(i,t),s=o?e?.get(o):void 0,r=g(i,t),u=A(i,r,e);return s&&o?[u,A(i,{kind:"volume",name:o},e)]:[u]})}l(E,"cacheSnapshots");function A(n,e,i){if(e.kind==="host"){let o=k.statSync(e.name,{throwIfNoEntry:!1});return{name:n,kind:e.kind,source:e.name,exists:!!o,size_bytes:o?B(e.name):null,created_at:o?o.birthtime.toISOString():null}}let t=i?.get(e.name);return{name:n,kind:e.kind,source:e.name,exists:!!t,size_bytes:t&&t.size>=0?t.size:null,created_at:t?.createdAt??null}}l(A,"snapshotOf");var F=l(()=>({caches:w(),snapshots:l(n=>E(n),"snapshots"),busy:O,run:l(n=>j(n,{capture:!0}),"run")}),"defaultDeps");async function q(n={},e=F()){let{caches:i}=e;if(n.name!==void 0&&!(n.name in i)){let s=Object.keys(i).sort().join(", ")||"none";return[{name:n.name,action:"skipped",detail:`unknown cache (known: ${s})`,ok:!1}]}let t=(await e.snapshots(i)).filter(s=>n.name===void 0||s.name===n.name),o=[];for(let s of t){let r=i[s.name],u=s.source===g(s.name,r).name?s.name:`${s.name} (${s.source})`,c=l((f,y=!0)=>o.push({name:u,action:"skipped",detail:f,ok:y}),"skip");if(!s.exists){c("not created");continue}let a="";if(!n.force){let f=await e.busy(s.source);if(f===null){c("Docker is unreachable",!1);continue}if(f.length&&!n.dryRun){c(`in use by ${f.join(", ")} (--force to prune anyway)`);continue}f.length&&(a=` (in use by ${f.join(", ")})`)}let h=`'${r.path}'`,m,p,v=[];if(n.reset)m="reset",p=`find ${h} -mindepth 1 -delete`;else if(r.max_age){let f=/^([1-9][0-9]*)d$/.exec(r.max_age)?.[1];if(!f){c(`max_age '${r.max_age}' is not <N>d`,!1);continue}m="max_age";let y=`find ${h} -mindepth 1 -type f -mmin +${Number(f)*1440}`;p=n.dryRun?`${y} | wc -l`:`${y} -delete && find ${h} -mindepth 1 -type d -empty -delete`}else if(r.prune)m="prune",p=r.prune,v=Object.entries(r.env??{}).flatMap(([f,y])=>["-e",`${f}=${y}`]);else{c("no prune rule; use --reset");continue}if(n.dryRun&&m!=="max_age"){let f=s.size_bytes===null?"unknown size":`${s.size_bytes} bytes`,y=m==="reset"?`would empty ${f}`:`would run: ${p}`;o.push({name:u,action:m,detail:y+a,ok:!0});continue}let x=["docker","run","--rm","-v",`${s.source}:${r.path}`,...v];x.push(r.image??"node:22","sh","-c",p);let $=e.run(x),b=$.stdout.trim(),M=$.status!==0?$.stderr.trim()||`exit ${$.status}`:n.dryRun?`would delete ${b} file(s) older than ${r.max_age}${a}`:b||"done";o.push({name:u,action:m,detail:M,ok:$.status===0})}return o}l(q,"pruneCaches");export{W as a,E as b,q as c};
4
- //# sourceMappingURL=chunk-F7NAUYQY.js.map
3
+ import{a as S}from"./chunk-YB4QV6ZV.js";import{m as z,n as O}from"./chunk-ASISB2JX.js";import{m as j}from"./chunk-UGMSDJFA.js";import{U as w}from"./chunk-MX2C2PHD.js";import{a as l,f as _}from"./chunk-XKRTDXLT.js";_();import*as k from"node:fs";import*as d from"node:path";function g(n,e){return e.host?{kind:"host",name:e.host}:{kind:"volume",name:e.volume??`werkmeister-${n}`}}l(g,"cacheSource");function R(n,e){return e.host||e.volume?null:`sandbox-${n}`}l(R,"legacyCacheVolume");function I(n,e,i){for(let t=e;;t=d.dirname(t)){if(n.some(o=>k.existsSync(d.join(t,o))))return!0;if(t===i||!t.startsWith(i))return!1}}l(I,"detectedIn");function N(n,e,i,t,o){let s;if(Array.isArray(e.caches))s=[...e.caches];else{let r=S(e,i)?.caches??[],u=o&&k.existsSync(o)?Object.keys(t).filter(c=>{let a=t[c]?.detect??[];return a.length>0&&I(a,d.resolve(o,e.path??"."),d.resolve(o))}):[];s=[...new Set([...r,...u])]}for(let r of s)if(!(r in t))throw new Error(`services.yaml: service '${n}' names unknown cache '${r}' \u2014 no \`caches.${r}\` entry`);return s.sort()}l(N,"serviceCaches");function C(n,e,i){let t=[...n.extra_volumes??[]],o={};for(let s of e){let r=i[s],u=g(s,r),c=`${u.kind==="volume"?`^${u.name}`:u.name}:${r.path}`;t.includes(c)||t.push(c),o={...o,...r.env}}return{...n,extra_volumes:t,environment:{...o,...n.environment}}}l(C,"withCaches");function W(n,e,i,t,o){if(Object.keys(t).length===0)return[n,e];let s={},r=new Map;for(let[c,a]of Object.entries(n)){let h=a.repo?d.join(o,a.repo):null,m=N(c,a,i,t,h);if(s[c]=m.length?C(a,m,t):a,a.setup_service&&m.length){let p=r.get(a.setup_service)??new Set;for(let v of m)p.add(v);r.set(a.setup_service,p)}}let u={};for(let[c,a]of Object.entries(e)){let h=[...r.get(c)??[]].sort();u[c]=h.length?C(a,h,t):a}return[s,u]}l(W,"applyCaches");function B(n){let e=0;for(let i of k.readdirSync(n,{withFileTypes:!0,recursive:!0}))i.isFile()&&(e+=k.statSync(d.join(i.parentPath,i.name)).size);return e}l(B,"dirSize");async function E(n=w(),e=void 0){return e??=await z(),Object.keys(n).sort().flatMap(i=>{let t=n[i],o=R(i,t),s=o?e?.get(o):void 0,r=g(i,t),u=A(i,r,e);return s&&o?[u,A(i,{kind:"volume",name:o},e)]:[u]})}l(E,"cacheSnapshots");function A(n,e,i){if(e.kind==="host"){let o=k.statSync(e.name,{throwIfNoEntry:!1});return{name:n,kind:e.kind,source:e.name,exists:!!o,size_bytes:o?B(e.name):null,created_at:o?o.birthtime.toISOString():null}}let t=i?.get(e.name);return{name:n,kind:e.kind,source:e.name,exists:!!t,size_bytes:t&&t.size>=0?t.size:null,created_at:t?.createdAt??null}}l(A,"snapshotOf");var F=l(()=>({caches:w(),snapshots:l(n=>E(n),"snapshots"),busy:O,run:l(n=>j(n,{capture:!0}),"run")}),"defaultDeps");async function q(n={},e=F()){let{caches:i}=e;if(n.name!==void 0&&!(n.name in i)){let s=Object.keys(i).sort().join(", ")||"none";return[{name:n.name,action:"skipped",detail:`unknown cache (known: ${s})`,ok:!1}]}let t=(await e.snapshots(i)).filter(s=>n.name===void 0||s.name===n.name),o=[];for(let s of t){let r=i[s.name],u=s.source===g(s.name,r).name?s.name:`${s.name} (${s.source})`,c=l((f,y=!0)=>o.push({name:u,action:"skipped",detail:f,ok:y}),"skip");if(!s.exists){c("not created");continue}let a="";if(!n.force){let f=await e.busy(s.source);if(f===null){c("Docker is unreachable",!1);continue}if(f.length&&!n.dryRun){c(`in use by ${f.join(", ")} (--force to prune anyway)`);continue}f.length&&(a=` (in use by ${f.join(", ")})`)}let h=`'${r.path}'`,m,p,v=[];if(n.reset)m="reset",p=`find ${h} -mindepth 1 -delete`;else if(r.max_age){let f=/^([1-9][0-9]*)d$/.exec(r.max_age)?.[1];if(!f){c(`max_age '${r.max_age}' is not <N>d`,!1);continue}m="max_age";let y=`find ${h} -mindepth 1 -type f -mmin +${Number(f)*1440}`;p=n.dryRun?`${y} | wc -l`:`${y} -delete && find ${h} -mindepth 1 -type d -empty -delete`}else if(r.prune)m="prune",p=r.prune,v=Object.entries(r.env??{}).flatMap(([f,y])=>["-e",`${f}=${y}`]);else{c("no prune rule; use --reset");continue}if(n.dryRun&&m!=="max_age"){let f=s.size_bytes===null?"unknown size":`${s.size_bytes} bytes`,y=m==="reset"?`would empty ${f}`:`would run: ${p}`;o.push({name:u,action:m,detail:y+a,ok:!0});continue}let x=["docker","run","--rm","-v",`${s.source}:${r.path}`,...v];x.push(r.image??"node:22","sh","-c",p);let $=e.run(x),b=$.stdout.trim(),M=$.status!==0?$.stderr.trim()||`exit ${$.status}`:n.dryRun?`would delete ${b} file(s) older than ${r.max_age}${a}`:b||"done";o.push({name:u,action:m,detail:M,ok:$.status===0})}return o}l(q,"pruneCaches");export{W as a,E as b,q as c};
4
+ //# sourceMappingURL=chunk-B2BMSTLU.js.map
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{f as $,t as B,u as F,w as _}from"./chunk-EJIKMENG.js";import{b as D,d as N}from"./chunk-NGCQLNYL.js";import{d as O,o as T}from"./chunk-PWV3BTBD.js";import{b as E}from"./chunk-F7NAUYQY.js";import{f as I}from"./chunk-3SM7OPFC.js";import{P,V as A,aa as y,ba as C,d as k,s as R,t as j}from"./chunk-JDLDACTO.js";import{d as v}from"./chunk-2CNYFUAA.js";import{M as w}from"./chunk-RDY6H5F3.js";import{a,f as x}from"./chunk-NW56IEMZ.js";x();async function M(){return(await v(O,void 0,{all:!1})??[]).map(({service:e,state:n,health:r})=>{let s;return r==="healthy"?s="healthy":r==="starting"?s="starting":n==="running"?s="running":s=n||"down",{service:e||"unknown",display:s}})}a(M,"getInfraStatus");function Q(t){if(typeof t=="number"){let[e,n]=C(t);return`${e}-${n}`}return"?"}a(Q,"featurePortRange");function U(t){return j(t.service,t.role)&&t.status==="exited"&&t.exitCode===0}a(U,"finishedSetup");function V(t){return t.filter(e=>!U(e))}a(V,"tallied");function H(t){return Object.entries(t).sort((e,n)=>{let r=typeof e[1].slot=="number"?e[1].slot:99,s=typeof n[1].slot=="number"?n[1].slot:99;return r-s})}a(H,"sortedSlots");function J(t,e,n){let r=[];for(let[s,f]of H(t))for(let l of f.services??[]){let u=e[l],p=B(u),c=p===null?String(u.k8s_deployment):null,i=c!==null?n.intercepts.get(c):void 0;r.push({feature:s,service:l,deployment:c,interceptable:p===null,blocker:p,intercepted:i!==void 0,intercepted_by:i??null})}return r}a(J,"buildInterceptRows");var L=a(t=>$(t,void 0,15),"STATUS_READ");async function ot(){let t=await _(L),e=w(),n=t.installed?J(await y(),e,t):[];return{available:t.available,installed:t.installed,connected_namespace:t.namespace,intercepts:n,remote_services:Object.keys(e).filter(r=>F(e[r])).sort()}}a(ot,"interceptsSnapshot");async function W(){let[t,e]=await Promise.all([v().then(n=>D(n??[])),N().catch(()=>null)]);return{health:t,resources:e}}a(W,"featureVitals");async function at(){let t=W(),e=E().catch(()=>[]),n=await M(),r=await T(),s=await y(),f=await I(),l=await _(L),u=J(s,w(),l),{health:p,resources:c}=await t,i=[];for(let[o,m]of H(s)){let h=V(await R(o)),S=await k(o),b=c?.projects[S],d=p.get(S);i.push({name:o,slot:m.slot,services:m.services??[],port_range:Q(m.slot),containers:h,containers_running:h.filter(g=>g.status==="running").length,containers_total:h.length,intercepts:u.filter(g=>g.feature===o),cpu_percent:b?.cpuPercent??null,mem_mib:b?.memMib??null,started_at:d?.started?.at??null,started_by:d?.started?.by??null,crash_loops:d?.crashLoops??[]})}return{host:c?.host??null,infrastructure:n,mcp_web_server:f,k8s_forwards:r,features:i,waiting:await P(),caches:await e,summary:{total_features:i.length,available_slots:A()-i.length,infra_healthy:n.length>0&&n.every(o=>o.display==="healthy"||o.display==="running"),k8s_alive:r.filter(o=>o.status==="alive").length,k8s_total:r.length,telepresence_available:l.available,intercepts_active:u.filter(o=>o.intercepted).length}}}a(at,"statusSnapshot");export{M as a,Q as b,U as c,V as d,H as e,J as f,ot as g,W as h,at as i};
4
- //# sourceMappingURL=chunk-JET6M6FJ.js.map
3
+ import{f as $,t as B,u as F,w as _}from"./chunk-4RJIJDHG.js";import{b as D,d as N}from"./chunk-YLHOFWMD.js";import{d as O,o as T}from"./chunk-CBDVSE3T.js";import{b as E}from"./chunk-B2BMSTLU.js";import{f as I}from"./chunk-CYUHJC7W.js";import{P,V as A,aa as y,ba as C,d as k,s as R,t as j}from"./chunk-3ODW3USF.js";import{d as v}from"./chunk-ASISB2JX.js";import{M as w}from"./chunk-MX2C2PHD.js";import{a,f as x}from"./chunk-XKRTDXLT.js";x();async function M(){return(await v(O,void 0,{all:!1})??[]).map(({service:e,state:n,health:r})=>{let s;return r==="healthy"?s="healthy":r==="starting"?s="starting":n==="running"?s="running":s=n||"down",{service:e||"unknown",display:s}})}a(M,"getInfraStatus");function Q(t){if(typeof t=="number"){let[e,n]=C(t);return`${e}-${n}`}return"?"}a(Q,"featurePortRange");function U(t){return j(t.service,t.role)&&t.status==="exited"&&t.exitCode===0}a(U,"finishedSetup");function V(t){return t.filter(e=>!U(e))}a(V,"tallied");function H(t){return Object.entries(t).sort((e,n)=>{let r=typeof e[1].slot=="number"?e[1].slot:99,s=typeof n[1].slot=="number"?n[1].slot:99;return r-s})}a(H,"sortedSlots");function J(t,e,n){let r=[];for(let[s,f]of H(t))for(let l of f.services??[]){let u=e[l],p=B(u),c=p===null?String(u.k8s_deployment):null,i=c!==null?n.intercepts.get(c):void 0;r.push({feature:s,service:l,deployment:c,interceptable:p===null,blocker:p,intercepted:i!==void 0,intercepted_by:i??null})}return r}a(J,"buildInterceptRows");var L=a(t=>$(t,void 0,15),"STATUS_READ");async function ot(){let t=await _(L),e=w(),n=t.installed?J(await y(),e,t):[];return{available:t.available,installed:t.installed,connected_namespace:t.namespace,intercepts:n,remote_services:Object.keys(e).filter(r=>F(e[r])).sort()}}a(ot,"interceptsSnapshot");async function W(){let[t,e]=await Promise.all([v().then(n=>D(n??[])),N().catch(()=>null)]);return{health:t,resources:e}}a(W,"featureVitals");async function at(){let t=W(),e=E().catch(()=>[]),n=await M(),r=await T(),s=await y(),f=await I(),l=await _(L),u=J(s,w(),l),{health:p,resources:c}=await t,i=[];for(let[o,m]of H(s)){let h=V(await R(o)),S=await k(o),b=c?.projects[S],d=p.get(S);i.push({name:o,slot:m.slot,services:m.services??[],port_range:Q(m.slot),containers:h,containers_running:h.filter(g=>g.status==="running").length,containers_total:h.length,intercepts:u.filter(g=>g.feature===o),cpu_percent:b?.cpuPercent??null,mem_mib:b?.memMib??null,started_at:d?.started?.at??null,started_by:d?.started?.by??null,crash_loops:d?.crashLoops??[]})}return{host:c?.host??null,infrastructure:n,mcp_web_server:f,k8s_forwards:r,features:i,waiting:await P(),caches:await e,summary:{total_features:i.length,available_slots:A()-i.length,infra_healthy:n.length>0&&n.every(o=>o.display==="healthy"||o.display==="running"),k8s_alive:r.filter(o=>o.status==="alive").length,k8s_total:r.length,telepresence_available:l.available,intercepts_active:u.filter(o=>o.intercepted).length}}}a(at,"statusSnapshot");export{M as a,Q as b,U as c,V as d,H as e,J as f,ot as g,W as h,at as i};
4
+ //# sourceMappingURL=chunk-C2LOJFYS.js.map
@@ -1,10 +1,10 @@
1
1
  import { createRequire as __sandboxCreateRequire } from "node:module";
2
2
  const require = __sandboxCreateRequire(import.meta.url);
3
- import{U as Y}from"./chunk-JDLDACTO.js";import{d as N,e as L}from"./chunk-2CNYFUAA.js";import{l as R,m as g}from"./chunk-NI4SD5KN.js";import{b as J}from"./chunk-MM4H553O.js";import{E as K,J as M,M as h,P as U,Z as B,_ as f,a as ne,j as l,k as y,l as A,m as p,t as W,x}from"./chunk-RDY6H5F3.js";import{a as n,e as oe,f as u}from"./chunk-NW56IEMZ.js";u();var q=oe(ne(),1);import*as $ from"node:fs";import*as S from"node:path";var se=/@sha256:[0-9a-f]{64}$/;function m(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}n(m,"isDict");function ie(e,r){let t=(e??x()).infra,o=m(t)?t.baseline:void 0;if(!m(o))return[];let i=r??h();return Object.entries(o).map(([s,a])=>{let d=`config.yaml infra.baseline.${s}`,H=i[s];if(!m(H))throw new Error(`${d}: no such service in services.yaml`);let b=m(a)?a.image:void 0;if(typeof b!="string"||!se.test(b))throw new Error(`${d}.image must be pinned as <image>@sha256:<digest>, got ${JSON.stringify(b)}. Resolve one with: docker pull <image>:<tag> && docker inspect --format='{{index .RepoDigests 0}}' <image>:<tag>`);let _=m(a)?a.environment??{}:{};if(!m(_)||Object.values(_).some(v=>m(v)||Array.isArray(v)))throw new Error(`${d}.environment must be a map of plain values`);return{service:s,image:b,port:Number(H.internal_port??3e3),environment:Object.fromEntries(Object.entries(_).map(([v,te])=>[v,String(te)]))}})}n(ie,"baselineSpecs");function I(){return S.join(f(),"compose","baseline.override.yml")}n(I,"baselineOverridePath");var ae=["# AUTO-GENERATED by `werkmeister infra connect` from ~/.werkmeister/config.yaml infra.baseline \u2014 do not edit.","# Merged over infra/compose/shared-infra.yml by every `docker compose` call the CLI makes."];function ce(e){let r=Object.fromEntries(e.map(t=>{let o=`baseline-${t.service}`;return[o,{image:t.image,container_name:`w9r-${o}`,restart:"unless-stopped",...Object.keys(t.environment).length>0?{environment:t.environment}:{},networks:{"werkmeister-shared":{aliases:[o]}}}]}));return[...ae,(0,q.stringify)({services:r},{aliasDuplicateObjects:!1})].join(`
3
+ import{U as Y}from"./chunk-3ODW3USF.js";import{d as N,e as L}from"./chunk-ASISB2JX.js";import{l as R,m as g}from"./chunk-UGMSDJFA.js";import{b as J}from"./chunk-YRXU2I5V.js";import{E as K,J as M,M as h,P as U,Z as B,_ as f,a as ne,j as l,k as y,l as A,m as p,t as W,x}from"./chunk-MX2C2PHD.js";import{a as n,e as oe,f as u}from"./chunk-XKRTDXLT.js";u();var q=oe(ne(),1);import*as $ from"node:fs";import*as S from"node:path";var se=/@sha256:[0-9a-f]{64}$/;function m(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}n(m,"isDict");function ie(e,r){let t=(e??x()).infra,o=m(t)?t.baseline:void 0;if(!m(o))return[];let i=r??h();return Object.entries(o).map(([s,a])=>{let d=`config.yaml infra.baseline.${s}`,H=i[s];if(!m(H))throw new Error(`${d}: no such service in services.yaml`);let b=m(a)?a.image:void 0;if(typeof b!="string"||!se.test(b))throw new Error(`${d}.image must be pinned as <image>@sha256:<digest>, got ${JSON.stringify(b)}. Resolve one with: docker pull <image>:<tag> && docker inspect --format='{{index .RepoDigests 0}}' <image>:<tag>`);let _=m(a)?a.environment??{}:{};if(!m(_)||Object.values(_).some(v=>m(v)||Array.isArray(v)))throw new Error(`${d}.environment must be a map of plain values`);return{service:s,image:b,port:Number(H.internal_port??3e3),environment:Object.fromEntries(Object.entries(_).map(([v,te])=>[v,String(te)]))}})}n(ie,"baselineSpecs");function I(){return S.join(f(),"compose","baseline.override.yml")}n(I,"baselineOverridePath");var ae=["# AUTO-GENERATED by `werkmeister infra connect` from ~/.werkmeister/config.yaml infra.baseline \u2014 do not edit.","# Merged over infra/compose/shared-infra.yml by every `docker compose` call the CLI makes."];function ce(e){let r=Object.fromEntries(e.map(t=>{let o=`baseline-${t.service}`;return[o,{image:t.image,container_name:`w9r-${o}`,restart:"unless-stopped",...Object.keys(t.environment).length>0?{environment:t.environment}:{},networks:{"werkmeister-shared":{aliases:[o]}}}]}));return[...ae,(0,q.stringify)({services:r},{aliasDuplicateObjects:!1})].join(`
4
4
  `)}n(ce,"renderBaselineOverride");function Fe(e=!1){let r=ie(),t=I();$.mkdirSync(S.dirname(t),{recursive:!0}),$.writeFileSync(t,ce(r)),e||l(`Generated ${t}`)}n(Fe,"generateBaselineOverride");u();import*as w from"node:fs";import*as k from"node:path";function E(e,r){return K(e??h(),r??U())}n(E,"forwardSpecs");function fe(e,r){return E(e,r).map(t=>`${t.name}|${t.listen}|${t.remote}|${t.ns}|${t.prefix}|${t.health}`)}n(fe,"buildForwardRows");function z(){return k.join(f(),"k8s-port-forward","forwards")}n(z,"forwardsFilePath");function P(){return k.join(f(),"compose","k8s-forwards.override.yml")}n(P,"overrideFilePath");function ue(e){e=e??z(),w.mkdirSync(k.dirname(e),{recursive:!0});let r=["# AUTO-GENERATED by `werkmeister infra connect` from ~/.werkmeister/services.yaml \u2014 do not edit.","# Format: name|listen_port|remote_port|namespace|pod_prefix|health_path",...fe(),""].join(`
5
5
  `);return w.writeFileSync(e,r),e}n(ue,"generateForwardsFile");var V=["# AUTO-GENERATED by `werkmeister infra connect` from ~/.werkmeister/services.yaml \u2014 do not edit.","# Merged over infra/compose/shared-infra.yml by every `docker compose` call the CLI makes."];function le(e){return e.length===0?[...V,"services:"," k8s-forwards: {}",""].join(`
6
6
  `):[...V,"services:"," k8s-forwards:"," ports:",...e.map(r=>` - "${r.listen}:${r.listen}" # ${r.name}`)," networks:"," werkmeister-shared:"," aliases:",...e.map(r=>` - k8s-${r.name}`),""].join(`
7
7
  `)}n(le,"renderK8sForwardsOverride");function X(e=!1){ue();let r=P();w.mkdirSync(k.dirname(r),{recursive:!0}),w.writeFileSync(r,le(E())),e||l(`Generated ${z()} and ${r}`)}n(X,"generateK8sForwards");u();import*as D from"node:fs";import*as F from"node:path";var j="w9r-infra",He="sandbox-infra",C="w9r-k8s-forwards";function me(){let r=x().infra?.profiles;return Array.isArray(r)?r.filter(t=>typeof t=="string"&&t!==""):[]}n(me,"infraProfiles");function Q(){let e=P();D.existsSync(e)||X(!0);let r=I();return{argv:["docker","compose","-f",F.join(B(),"compose","shared-infra.yml"),"-f",e,...D.existsSync(r)?["-f",r]:[],"-p",j,...me().flatMap(t=>["--profile",t])],env:{...process.env,WERKMEISTER_STATE_DIR:f()},cwd:F.dirname(f())}}n(Q,"composeInvocation");u();import*as c from"node:fs";import*as Z from"node:http";import*as G from"node:net";import*as O from"node:path";import{setTimeout as de}from"node:timers/promises";async function pe(){return{"k8s-forwards":(await N(j,"k8s-forwards",{all:!1})??[]).some(r=>r.health==="healthy"||r.state==="running"&&!r.health)}}n(pe,"checkPortForwardHealth");function he(e,r){if(!e)return!0;let t=new Map;for(let o of e){let i=Y(o.labels,"feature");if(!i)continue;let s=t.get(i)??{local:[],running:!1};s.local.push(o.service),s.running||=o.state==="running",t.set(i,s)}return[...t.values()].some(o=>o.running&&M(o.local,r))}n(he,"clusterNeeded");async function we(e){let r;try{r=h()}catch{return!0}return he(e===void 0?await N():e,r)}n(we,"forwarderNeeded");function ke(e){return c.existsSync(e)&&c.statSync(e).isDirectory()}n(ke,"isDir");function ye(e){return/server:\s*https:\/\/(127\.0\.0\.1|localhost)\b/.test(e)?e.replace(/(server:\s*https:\/\/)(127\.0\.0\.1|localhost)\b/g,"$1host.docker.internal").replace(/^(\s*)certificate-authority-data:.*$/gm,"$1insecure-skip-tls-verify: true"):e}n(ye,"shimLocalApiServer");function ge(){let e=O.join(f(),"k8s-port-forward","kubeconfig");ke(e)&&c.rmSync(e,{recursive:!0,force:!0}),c.mkdirSync(O.dirname(e),{recursive:!0}),l("Refreshing k8s-port-forward/kubeconfig from current context...");try{let r=g(["kubectl","config","view","--raw","--minify","--flatten"],{capture:!0,timeout:30});if(r.status===0){c.writeFileSync(e,ye(r.stdout));let t=g(["kubectl","--kubeconfig",e,"config","current-context"],{capture:!0,timeout:15}),o=t.status===0?t.stdout.trim():"?";y(`Kubeconfig pinned to context: ${o}`)}else p(`kubectl config view failed: ${r.stderr.trim()}`)}catch(r){if(r instanceof R&&(r.code==="ENOENT"||r.code==="ETIMEDOUT"))p(`Could not generate kubeconfig: ${r.message}`);else throw r}return c.existsSync(e)&&c.statSync(e).isFile()}n(ge,"refreshKubeconfig");function Ee(){try{return g(["kubectl","--request-timeout=3s","get","--raw","/readyz"],{capture:!0,timeout:20}).status===0}catch(e){if(e instanceof R)return!1;throw e}}n(Ee,"clusterReachable");async function er(){if(W())return l("k8s port-forwards skipped (WERKMEISTER_FIXTURE)"),"healthy";if((await pe())["k8s-forwards"]??!1)return y("k8s port-forwards container is healthy"),"healthy";if(A("k8s port-forwards container is unhealthy \u2014 restarting..."),!ge())return p("Not restarting k8s-forwards without a kubeconfig file to mount"),"failed";if(!Ee())return A("No reachable k8s cluster \u2014 skipping port-forwards; services not run locally are unavailable"),"failed";let{argv:r,env:t,cwd:o}=Q();try{let i=g([...r,"up","-d","--force-recreate","k8s-forwards"],{capture:!0,timeout:60,env:t,cwd:o});return i.status!==0?(p(`Failed to restart k8s-forwards: ${i.stderr.trim()}`),"failed"):(y("k8s port-forwards container restarted"),"restarted")}catch(i){if(i instanceof R)return p(`Failed to restart k8s-forwards: ${i.message}`),"failed";throw i}}n(er,"ensurePortForwardsHealthy");async function rr(e=3e4,r=500){let t=E();if(!t.length)return;l("Waiting for port-forwards to reconnect...");let o=Date.now()+e;for(;;){if(t=(await Promise.all(t.map(async s=>({spec:s,ok:(await re(s.listen,s.health)).ok})))).filter(s=>!s.ok).map(s=>s.spec),!t.length){y("k8s port-forwards are carrying traffic");return}if(Date.now()>=o)throw new J(`k8s port-forwards did not come back within ${Math.round(e/1e3)}s: ${t.map(s=>`${s.name}:${s.listen}`).join(", ")}
8
8
  Check \`docker logs ${C}\` and your kubeconfig.`,"FORWARDS_NEVER_READY");await de(r)}}n(rr,"waitForForwards");function be(e,r,t=3500){return new Promise(o=>{let i=Z.get({host:"127.0.0.1",port:e,path:r,timeout:t},s=>{s.resume();let a=s.statusCode??0;o({ok:a<500,detail:`HTTP ${a}`})});i.on("timeout",()=>{i.destroy(),o({ok:!1,detail:"timeout"})}),i.on("error",s=>o({ok:!1,detail:s.code??s.message}))})}n(be,"checkHttpHealth");var ee={redis:{send:Buffer.from(`PING\r
9
9
  `),ok:n(e=>e.toString("latin1").startsWith("+PONG"),"ok")},postgres:{send:Buffer.from([0,0,0,8,4,210,22,47]),ok:n(e=>e[0]===83||e[0]===78,"ok")}};function ve(e,r,t=3500){return new Promise(o=>{let i=ee[r],s=G.connect({host:"127.0.0.1",port:e,timeout:t});s.on("connect",()=>s.write(i.send)),s.once("data",a=>{s.destroy();let d=i.ok(a);o({ok:d,detail:d?`${r} ok`:`${r} bad reply`})}),s.on("timeout",()=>{s.destroy(),o({ok:!1,detail:"timeout (connected, no reply)"})}),s.on("error",a=>o({ok:!1,detail:a.code??a.message})),s.on("close",()=>o({ok:!1,detail:"closed without reply"}))})}n(ve,"checkWireHealth");function xe(e,r=2500){return new Promise(t=>{let o=G.connect({host:"127.0.0.1",port:e,timeout:r});o.on("connect",()=>{o.destroy(),t({ok:!0,detail:"tcp open"})}),o.on("timeout",()=>{o.destroy(),t({ok:!1,detail:"timeout"})}),o.on("error",i=>t({ok:!1,detail:i.code??i.message}))})}n(xe,"checkTcpHealth");function re(e,r){return r.startsWith("/")?be(e,r):ee[r]?ve(e,r):r?Promise.resolve({ok:!1,detail:`unknown probe "${r}"`}):xe(e)}n(re,"checkForwardHealth");async function Re(e,r){return(await re(e,r)).ok?"alive":"dead"}n(Re,"classifyForward");async function tr(){let e=await L(C),r;try{r=E()}catch{return[]}let t=e?null:await we()?"container_down":"stopped",o=[];for(let i of r)o.push({name:i.name,listen_port:i.listen,remote_port:i.remote,health_path:i.health,status:t??await Re(i.listen,i.health)});return o}n(tr,"getPerServiceStatus");export{ie as a,Fe as b,X as c,j as d,He as e,C as f,me as g,Q as h,pe as i,we as j,ge as k,er as l,rr as m,re as n,tr as o};
10
- //# sourceMappingURL=chunk-PWV3BTBD.js.map
10
+ //# sourceMappingURL=chunk-CBDVSE3T.js.map