@socketsecurity/lib 3.2.2 → 3.2.4

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 (307) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/abort.js +1 -1
  3. package/dist/agent.js +1 -1
  4. package/dist/ansi.js +1 -1
  5. package/dist/argv/flags.js +1 -1
  6. package/dist/argv/parse.js +1 -1
  7. package/dist/arrays.js +1 -1
  8. package/dist/bin.js +1 -1
  9. package/dist/cacache.js +1 -1
  10. package/dist/cache-with-ttl.js +1 -1
  11. package/dist/constants/agents.js +1 -1
  12. package/dist/constants/core.js +1 -1
  13. package/dist/constants/encoding.js +1 -1
  14. package/dist/constants/github.js +1 -1
  15. package/dist/constants/licenses.js +1 -1
  16. package/dist/constants/node.js +1 -1
  17. package/dist/constants/packages.js +1 -1
  18. package/dist/constants/paths.js +1 -1
  19. package/dist/constants/platform.js +1 -1
  20. package/dist/constants/process.js +1 -1
  21. package/dist/constants/socket.js +1 -1
  22. package/dist/constants/testing.js +1 -1
  23. package/dist/constants/time.js +1 -1
  24. package/dist/constants/typescript.js +1 -1
  25. package/dist/cover/code.js +1 -1
  26. package/dist/cover/formatters.js +1 -1
  27. package/dist/cover/type.js +1 -1
  28. package/dist/cover/types.js +1 -1
  29. package/dist/debug.js +1 -1
  30. package/dist/dlx-binary.js +1 -1
  31. package/dist/dlx-manifest.js +1 -1
  32. package/dist/dlx-package.js +1 -1
  33. package/dist/dlx.js +1 -1
  34. package/dist/effects/pulse-frames.js +4 -4
  35. package/dist/effects/text-shimmer.js +1 -1
  36. package/dist/effects/types.js +1 -1
  37. package/dist/effects/ultra.js +1 -1
  38. package/dist/env/ci.js +1 -1
  39. package/dist/env/debug.js +1 -1
  40. package/dist/env/github.js +1 -1
  41. package/dist/env/helpers.js +1 -1
  42. package/dist/env/home.js +1 -1
  43. package/dist/env/locale.js +1 -1
  44. package/dist/env/node-auth-token.js +1 -1
  45. package/dist/env/node-env.js +1 -1
  46. package/dist/env/npm.js +1 -1
  47. package/dist/env/package-manager.js +1 -1
  48. package/dist/env/path.js +1 -1
  49. package/dist/env/pre-commit.js +1 -1
  50. package/dist/env/rewire.js +1 -1
  51. package/dist/env/shell.js +1 -1
  52. package/dist/env/socket-cli-shadow.js +1 -1
  53. package/dist/env/socket-cli.js +1 -1
  54. package/dist/env/socket.js +1 -1
  55. package/dist/env/temp-dir.js +1 -1
  56. package/dist/env/term.js +1 -1
  57. package/dist/env/test.js +1 -1
  58. package/dist/env/windows.js +1 -1
  59. package/dist/env/xdg.js +1 -1
  60. package/dist/env.js +1 -1
  61. package/dist/external/@inquirer/confirm.js +16 -15
  62. package/dist/external/@inquirer/input.js +16 -15
  63. package/dist/external/@inquirer/password.js +17 -16
  64. package/dist/external/@inquirer/search.js +18 -17
  65. package/dist/external/@inquirer/select.js +19 -18
  66. package/dist/external/@npmcli/package-json/lib/read-package.js +7 -1
  67. package/dist/external/@npmcli/package-json/lib/sort.js +6 -1
  68. package/dist/external/@npmcli/package-json.js +18 -0
  69. package/dist/external/@npmcli/promise-spawn.js +2 -1
  70. package/dist/external/@socketregistry/is-unicode-supported.js +2 -1
  71. package/dist/external/@socketregistry/packageurl-js.js +3 -2
  72. package/dist/external/@socketregistry/yocto-spinner.js +5 -4
  73. package/dist/external/@yarnpkg/extensions.js +2 -1
  74. package/dist/external/cacache.js +10 -9
  75. package/dist/external/debug.js +2 -5
  76. package/dist/external/del.js +3 -2
  77. package/dist/external/fast-glob.js +3 -2
  78. package/dist/external/fast-sort.js +2 -1
  79. package/dist/external/get-east-asian-width.js +2 -1
  80. package/dist/external/libnpmexec.js +6 -0
  81. package/dist/external/libnpmpack.js +68 -71
  82. package/dist/external/make-fetch-happen.js +17 -20
  83. package/dist/external/normalize-package-data.js +3 -2
  84. package/dist/external/npm-package-arg.js +3 -2
  85. package/dist/external/pacote.js +38 -41
  86. package/dist/external/picomatch.js +2 -1
  87. package/dist/external/semver.js +2 -1
  88. package/dist/external/spdx-correct.js +2 -1
  89. package/dist/external/spdx-expression-parse.js +2 -1
  90. package/dist/external/streaming-iterables.js +2 -1
  91. package/dist/external/validate-npm-package-name.js +2 -1
  92. package/dist/external/which.js +2 -1
  93. package/dist/external/yargs-parser.js +2 -1
  94. package/dist/external/yoctocolors-cjs.js +2 -1
  95. package/dist/external/zod.js +10 -9
  96. package/dist/fs.js +1 -1
  97. package/dist/functions.js +1 -1
  98. package/dist/git.js +1 -1
  99. package/dist/github.js +1 -1
  100. package/dist/globs.js +1 -1
  101. package/dist/http-request.js +1 -1
  102. package/dist/ipc.js +1 -1
  103. package/dist/json.js +1 -1
  104. package/dist/links/index.js +1 -1
  105. package/dist/logger.d.ts +29 -4
  106. package/dist/logger.js +34 -5
  107. package/dist/maintained-node-versions.js +1 -1
  108. package/dist/memoization.js +1 -1
  109. package/dist/objects.js +1 -1
  110. package/dist/packages/editable.js +1 -1
  111. package/dist/packages/exports.js +1 -1
  112. package/dist/packages/isolation.js +1 -1
  113. package/dist/packages/licenses.js +1 -1
  114. package/dist/packages/manifest.js +1 -1
  115. package/dist/packages/normalize.js +1 -1
  116. package/dist/packages/operations.js +1 -1
  117. package/dist/packages/paths.js +1 -1
  118. package/dist/packages/provenance.js +1 -1
  119. package/dist/packages/specs.js +1 -1
  120. package/dist/packages/validation.js +1 -1
  121. package/dist/packages.js +1 -1
  122. package/dist/path.js +1 -1
  123. package/dist/paths/rewire.js +1 -1
  124. package/dist/paths.js +1 -1
  125. package/dist/performance.js +1 -1
  126. package/dist/process-lock.js +1 -1
  127. package/dist/promise-queue.js +1 -1
  128. package/dist/promises.js +1 -1
  129. package/dist/regexps.js +1 -1
  130. package/dist/sea.js +1 -1
  131. package/dist/shadow.js +1 -1
  132. package/dist/signal-exit.js +1 -1
  133. package/dist/sorts.js +1 -1
  134. package/dist/spawn.js +1 -1
  135. package/dist/spinner.js +1 -1
  136. package/dist/ssri.js +1 -1
  137. package/dist/stdio/clear.js +1 -1
  138. package/dist/stdio/divider.js +1 -1
  139. package/dist/stdio/footer.js +1 -1
  140. package/dist/stdio/header.js +1 -1
  141. package/dist/stdio/mask.js +1 -1
  142. package/dist/stdio/progress.js +1 -1
  143. package/dist/stdio/prompts.js +1 -1
  144. package/dist/stdio/stderr.js +1 -1
  145. package/dist/stdio/stdout.js +1 -1
  146. package/dist/streams.js +1 -1
  147. package/dist/strings.js +1 -1
  148. package/dist/suppress-warnings.js +1 -1
  149. package/dist/tables.js +1 -1
  150. package/dist/temporary-executor.js +1 -1
  151. package/dist/themes/context.js +1 -1
  152. package/dist/themes/index.js +1 -1
  153. package/dist/themes/themes.js +1 -1
  154. package/dist/themes/types.js +1 -1
  155. package/dist/themes/utils.js +1 -1
  156. package/dist/types.js +1 -1
  157. package/dist/url.js +1 -1
  158. package/dist/utils/get-ipc.js +1 -1
  159. package/dist/validation/json-parser.js +1 -1
  160. package/dist/validation/types.js +1 -1
  161. package/dist/versions.js +1 -1
  162. package/dist/words.js +1 -1
  163. package/dist/zod.js +1 -1
  164. package/package.json +1 -1
  165. package/dist/abort.js.map +0 -7
  166. package/dist/agent.js.map +0 -7
  167. package/dist/ansi.js.map +0 -7
  168. package/dist/argv/flags.js.map +0 -7
  169. package/dist/argv/parse.js.map +0 -7
  170. package/dist/arrays.js.map +0 -7
  171. package/dist/bin.js.map +0 -7
  172. package/dist/cacache.js.map +0 -7
  173. package/dist/cache-with-ttl.js.map +0 -7
  174. package/dist/constants/agents.js.map +0 -7
  175. package/dist/constants/core.js.map +0 -7
  176. package/dist/constants/encoding.js.map +0 -7
  177. package/dist/constants/github.js.map +0 -7
  178. package/dist/constants/licenses.js.map +0 -7
  179. package/dist/constants/node.js.map +0 -7
  180. package/dist/constants/packages.js.map +0 -7
  181. package/dist/constants/paths.js.map +0 -7
  182. package/dist/constants/platform.js.map +0 -7
  183. package/dist/constants/process.js.map +0 -7
  184. package/dist/constants/socket.js.map +0 -7
  185. package/dist/constants/testing.js.map +0 -7
  186. package/dist/constants/time.js.map +0 -7
  187. package/dist/constants/typescript.js.map +0 -7
  188. package/dist/cover/code.js.map +0 -7
  189. package/dist/cover/formatters.js.map +0 -7
  190. package/dist/cover/type.js.map +0 -7
  191. package/dist/cover/types.js.map +0 -7
  192. package/dist/debug.js.map +0 -7
  193. package/dist/dlx-binary.js.map +0 -7
  194. package/dist/dlx-manifest.js.map +0 -7
  195. package/dist/dlx-package.js.map +0 -7
  196. package/dist/dlx.js.map +0 -7
  197. package/dist/effects/pulse-frames.js.map +0 -7
  198. package/dist/effects/text-shimmer.js.map +0 -7
  199. package/dist/effects/types.js.map +0 -7
  200. package/dist/effects/ultra.js.map +0 -7
  201. package/dist/env/ci.js.map +0 -7
  202. package/dist/env/debug.js.map +0 -7
  203. package/dist/env/github.js.map +0 -7
  204. package/dist/env/helpers.js.map +0 -7
  205. package/dist/env/home.js.map +0 -7
  206. package/dist/env/locale.js.map +0 -7
  207. package/dist/env/node-auth-token.js.map +0 -7
  208. package/dist/env/node-env.js.map +0 -7
  209. package/dist/env/npm.js.map +0 -7
  210. package/dist/env/package-manager.js.map +0 -7
  211. package/dist/env/path.js.map +0 -7
  212. package/dist/env/pre-commit.js.map +0 -7
  213. package/dist/env/rewire.js.map +0 -7
  214. package/dist/env/shell.js.map +0 -7
  215. package/dist/env/socket-cli-shadow.js.map +0 -7
  216. package/dist/env/socket-cli.js.map +0 -7
  217. package/dist/env/socket.js.map +0 -7
  218. package/dist/env/temp-dir.js.map +0 -7
  219. package/dist/env/term.js.map +0 -7
  220. package/dist/env/test.js.map +0 -7
  221. package/dist/env/windows.js.map +0 -7
  222. package/dist/env/xdg.js.map +0 -7
  223. package/dist/env.js.map +0 -7
  224. package/dist/external/@npmcli/package-json/index.js +0 -1
  225. package/dist/external/@socketregistry/is-unicode-supported.d.ts +0 -2
  226. package/dist/external/@socketregistry/yocto-spinner.d.ts +0 -12
  227. package/dist/external/@yarnpkg/extensions.d.ts +0 -4
  228. package/dist/external/cacache.d.ts +0 -86
  229. package/dist/external/debug.d.ts +0 -22
  230. package/dist/external/del.d.ts +0 -1
  231. package/dist/external/fast-sort.d.ts +0 -3
  232. package/dist/external/get-east-asian-width.d.ts +0 -5
  233. package/dist/external/libnpmexec.d.ts +0 -33
  234. package/dist/external/libnpmpack.d.ts +0 -2
  235. package/dist/external/make-fetch-happen.d.ts +0 -15
  236. package/dist/external/pacote.d.ts +0 -14
  237. package/dist/external/semver.d.ts +0 -2
  238. package/dist/external/yargs-parser.d.ts +0 -2
  239. package/dist/external/yoctocolors-cjs.d.ts +0 -52
  240. package/dist/external/zod.d.ts +0 -1
  241. package/dist/fs.js.map +0 -7
  242. package/dist/functions.js.map +0 -7
  243. package/dist/git.js.map +0 -7
  244. package/dist/github.js.map +0 -7
  245. package/dist/globs.js.map +0 -7
  246. package/dist/http-request.js.map +0 -7
  247. package/dist/ipc.js.map +0 -7
  248. package/dist/json.js.map +0 -7
  249. package/dist/links/index.js.map +0 -7
  250. package/dist/logger.js.map +0 -7
  251. package/dist/maintained-node-versions.js.map +0 -7
  252. package/dist/memoization.js.map +0 -7
  253. package/dist/objects.js.map +0 -7
  254. package/dist/packages/editable.js.map +0 -7
  255. package/dist/packages/exports.js.map +0 -7
  256. package/dist/packages/isolation.js.map +0 -7
  257. package/dist/packages/licenses.js.map +0 -7
  258. package/dist/packages/manifest.js.map +0 -7
  259. package/dist/packages/normalize.js.map +0 -7
  260. package/dist/packages/operations.js.map +0 -7
  261. package/dist/packages/paths.js.map +0 -7
  262. package/dist/packages/provenance.js.map +0 -7
  263. package/dist/packages/specs.js.map +0 -7
  264. package/dist/packages/validation.js.map +0 -7
  265. package/dist/packages.js.map +0 -7
  266. package/dist/path.js.map +0 -7
  267. package/dist/paths/rewire.js.map +0 -7
  268. package/dist/paths.js.map +0 -7
  269. package/dist/performance.js.map +0 -7
  270. package/dist/process-lock.js.map +0 -7
  271. package/dist/promise-queue.js.map +0 -7
  272. package/dist/promises.js.map +0 -7
  273. package/dist/regexps.js.map +0 -7
  274. package/dist/sea.js.map +0 -7
  275. package/dist/shadow.js.map +0 -7
  276. package/dist/signal-exit.js.map +0 -7
  277. package/dist/sorts.js.map +0 -7
  278. package/dist/spawn.js.map +0 -7
  279. package/dist/spinner.js.map +0 -7
  280. package/dist/ssri.js.map +0 -7
  281. package/dist/stdio/clear.js.map +0 -7
  282. package/dist/stdio/divider.js.map +0 -7
  283. package/dist/stdio/footer.js.map +0 -7
  284. package/dist/stdio/header.js.map +0 -7
  285. package/dist/stdio/mask.js.map +0 -7
  286. package/dist/stdio/progress.js.map +0 -7
  287. package/dist/stdio/prompts.js.map +0 -7
  288. package/dist/stdio/stderr.js.map +0 -7
  289. package/dist/stdio/stdout.js.map +0 -7
  290. package/dist/streams.js.map +0 -7
  291. package/dist/strings.js.map +0 -7
  292. package/dist/suppress-warnings.js.map +0 -7
  293. package/dist/tables.js.map +0 -7
  294. package/dist/temporary-executor.js.map +0 -7
  295. package/dist/themes/context.js.map +0 -7
  296. package/dist/themes/index.js.map +0 -7
  297. package/dist/themes/themes.js.map +0 -7
  298. package/dist/themes/types.js.map +0 -7
  299. package/dist/themes/utils.js.map +0 -7
  300. package/dist/types.js.map +0 -7
  301. package/dist/url.js.map +0 -7
  302. package/dist/utils/get-ipc.js.map +0 -7
  303. package/dist/validation/json-parser.js.map +0 -7
  304. package/dist/validation/types.js.map +0 -7
  305. package/dist/versions.js.map +0 -7
  306. package/dist/words.js.map +0 -7
  307. package/dist/zod.js.map +0 -7
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /**
3
+ * Bundled from @npmcli/package-json
4
+ * This is a zero-dependency bundle created by esbuild.
5
+ */
6
+ "use strict";var Wh=Object.defineProperty;var o=(s,e)=>Wh(s,"name",{value:e,configurable:!0});var w=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports);var Xs=w((Tb,zr)=>{"use strict";var zh=Symbol.for("indent"),Hh=Symbol.for("newline"),Vh=`
7
+ `,Yh=" ",Xh=/^\uFEFF/,Kh=/^\s*[{[]((?:\r?\n)+)([\s\t]*)/,Jh=/^(?:\{\}|\[\])((?:\r?\n)+)?$/,qr=/^Unexpected token '?(.)'?(,)? /i,Zh=o(s=>{let e=s.charCodeAt(0).toString(16).toUpperCase();return`0x${e.length%2?"0":""}${e}`},"hexify"),Br=o(s=>String(s).replace(Xh,""),"stripBOM"),Ys=o((s,e,t=0)=>({message:`${s} while parsing ${e}`,position:t}),"makeParsedError"),Qh=o((s,e,t=20)=>{let i=s.message;if(!e)return Ys(i,"empty string");let r=i.match(qr),n=i.match(/ position\s+(\d+)/i);r&&(i=i.replace(qr,`Unexpected token ${JSON.stringify(r[1])} (${Zh(r[1])})$2 `));let a;if(n?a=+n[1]:i.match(/^Unexpected end of JSON.*/i)&&(a=e.length-1),a==null)return Ys(i,`'${e.slice(0,t*2)}'`);let c=a<=t?0:a-t,l=a+t>=e.length?e.length:a+t,h=`${c?"...":""}${e.slice(c,l)}${l===e.length?"":"..."}`;return Ys(i,`${e===h?"":"near "}${JSON.stringify(h)}`,a)},"parseError"),qt=class extends SyntaxError{static{o(this,"JSONParseError")}constructor(e,t,i,r){let n=Qh(e,t,i);super(n.message),Object.assign(this,n),this.code="EJSONPARSE",this.systemError=e,Error.captureStackTrace(this,r||this.constructor)}get name(){return this.constructor.name}set name(e){}get[Symbol.toStringTag](){return this.constructor.name}},Wr=o((s,e)=>{let t=JSON.parse(s,e);if(t&&typeof t=="object"){let i=s.match(Jh)||s.match(Kh)||[null,"",""];t[Hh]=i[1]??Vh,t[zh]=i[2]??Yh}return t},"parseJson"),Bt=o((s,e,t)=>{let i=Br(s);try{return Wr(i,e)}catch(r){if(typeof s!="string"&&!Buffer.isBuffer(s)){let n=Array.isArray(s)&&s.length===0?"an empty array":String(s);throw Object.assign(new TypeError(`Cannot parse ${n}`),{code:"EJSONPARSE",systemError:r})}throw new qt(r,i,t,Bt)}},"parseJsonError");zr.exports=Bt;Bt.JSONParseError=qt;Bt.noExceptions=(s,e)=>{try{return Wr(Br(s),e)}catch{}}});var Yr=w((Ib,Vr)=>{var Ks=new Set(["dependencies","optionalDependencies","devDependencies","peerDependencies"]),eu=o(s=>{for(let e of Ks)s&&s[e]&&(s[e]=Object.keys(s[e]).sort((t,i)=>t.localeCompare(i,"en")).reduce((t,i)=>(t[i]=s[e][i],t),{}));return s},"orderDeps"),Hr=o(({content:s,originalContent:e})=>{let t=eu({...s});if(t.dependencies&&t.optionalDependencies)for(let c of Object.keys(t.optionalDependencies))delete t.dependencies[c];let i={...e};for(let c of Ks)t[c]&&(i[c]=t[c]),t[c]&&typeof t=="object"&&Object.keys(t[c]).length===0&&delete i[c];let{dependencies:r,peerDependencies:n}=e||{},{peerDependencies:a}=i;if(r&&n&&a)for(let c of Object.keys(n))r[c]!==void 0&&a[c]!==void 0&&(i.dependencies=i.dependencies||{},i.dependencies[c]=a[c]);return i},"updateDependencies");Hr.knownKeys=Ks;Vr.exports=Hr});var Kr=w((Fb,Xr)=>{var tu=o(({content:s,originalContent:e={}})=>{let t=s.scripts;if(!t)return e;if(o(()=>Object.entries(t).some(([r,n])=>typeof r!="string"||typeof n!="string"),"hasInvalidScripts")())throw Object.assign(new TypeError("package.json scripts should be a key-value pair of strings."),{code:"ESCRIPTSINVALID"});return{...e,scripts:{...t}}},"updateScripts");Xr.exports=tu});var Zr=w((jb,Jr)=>{var su=o(({content:s,originalContent:e={}})=>{let t=s.workspaces;if(!t)return e;let i=o(()=>t.some(r=>typeof r!="string"),"hasInvalidWorkspaces");if(!t.length||i())throw Object.assign(new TypeError("workspaces should be an array of strings."),{code:"EWORKSPACESINVALID"});return{...e,workspaces:[...t]}},"updateWorkspaces");Jr.exports=su});var Ze=w((kb,Qr)=>{"use strict";var iu=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...s)=>{}:()=>{};Qr.exports=iu});var Qe=w((Ub,en)=>{"use strict";var ru="2.0.0",nu=Number.MAX_SAFE_INTEGER||9007199254740991,ou=16,au=250,cu=["major","premajor","minor","preminor","patch","prepatch","prerelease"];en.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:ou,MAX_SAFE_BUILD_LENGTH:au,MAX_SAFE_INTEGER:nu,RELEASE_TYPES:cu,SEMVER_SPEC_VERSION:ru,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var _e=w((he,tn)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Js,MAX_SAFE_BUILD_LENGTH:lu,MAX_LENGTH:hu}=Qe(),uu=Ze();he=tn.exports={};var fu=he.re=[],du=he.safeRe=[],E=he.src=[],pu=he.safeSrc=[],L=he.t={},mu=0,Zs="[a-zA-Z0-9-]",gu=[["\\s",1],["\\d",hu],[Zs,lu]],wu=o(s=>{for(let[e,t]of gu)s=s.split(`${e}*`).join(`${e}{0,${t}}`).split(`${e}+`).join(`${e}{1,${t}}`);return s},"makeSafeRegex"),$=o((s,e,t)=>{let i=wu(e),r=mu++;uu(s,r,e),L[s]=r,E[r]=e,pu[r]=i,fu[r]=new RegExp(e,t?"g":void 0),du[r]=new RegExp(i,t?"g":void 0)},"createToken");$("NUMERICIDENTIFIER","0|[1-9]\\d*");$("NUMERICIDENTIFIERLOOSE","\\d+");$("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Zs}*`);$("MAINVERSION",`(${E[L.NUMERICIDENTIFIER]})\\.(${E[L.NUMERICIDENTIFIER]})\\.(${E[L.NUMERICIDENTIFIER]})`);$("MAINVERSIONLOOSE",`(${E[L.NUMERICIDENTIFIERLOOSE]})\\.(${E[L.NUMERICIDENTIFIERLOOSE]})\\.(${E[L.NUMERICIDENTIFIERLOOSE]})`);$("PRERELEASEIDENTIFIER",`(?:${E[L.NONNUMERICIDENTIFIER]}|${E[L.NUMERICIDENTIFIER]})`);$("PRERELEASEIDENTIFIERLOOSE",`(?:${E[L.NONNUMERICIDENTIFIER]}|${E[L.NUMERICIDENTIFIERLOOSE]})`);$("PRERELEASE",`(?:-(${E[L.PRERELEASEIDENTIFIER]}(?:\\.${E[L.PRERELEASEIDENTIFIER]})*))`);$("PRERELEASELOOSE",`(?:-?(${E[L.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${E[L.PRERELEASEIDENTIFIERLOOSE]})*))`);$("BUILDIDENTIFIER",`${Zs}+`);$("BUILD",`(?:\\+(${E[L.BUILDIDENTIFIER]}(?:\\.${E[L.BUILDIDENTIFIER]})*))`);$("FULLPLAIN",`v?${E[L.MAINVERSION]}${E[L.PRERELEASE]}?${E[L.BUILD]}?`);$("FULL",`^${E[L.FULLPLAIN]}$`);$("LOOSEPLAIN",`[v=\\s]*${E[L.MAINVERSIONLOOSE]}${E[L.PRERELEASELOOSE]}?${E[L.BUILD]}?`);$("LOOSE",`^${E[L.LOOSEPLAIN]}$`);$("GTLT","((?:<|>)?=?)");$("XRANGEIDENTIFIERLOOSE",`${E[L.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);$("XRANGEIDENTIFIER",`${E[L.NUMERICIDENTIFIER]}|x|X|\\*`);$("XRANGEPLAIN",`[v=\\s]*(${E[L.XRANGEIDENTIFIER]})(?:\\.(${E[L.XRANGEIDENTIFIER]})(?:\\.(${E[L.XRANGEIDENTIFIER]})(?:${E[L.PRERELEASE]})?${E[L.BUILD]}?)?)?`);$("XRANGEPLAINLOOSE",`[v=\\s]*(${E[L.XRANGEIDENTIFIERLOOSE]})(?:\\.(${E[L.XRANGEIDENTIFIERLOOSE]})(?:\\.(${E[L.XRANGEIDENTIFIERLOOSE]})(?:${E[L.PRERELEASELOOSE]})?${E[L.BUILD]}?)?)?`);$("XRANGE",`^${E[L.GTLT]}\\s*${E[L.XRANGEPLAIN]}$`);$("XRANGELOOSE",`^${E[L.GTLT]}\\s*${E[L.XRANGEPLAINLOOSE]}$`);$("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Js}})(?:\\.(\\d{1,${Js}}))?(?:\\.(\\d{1,${Js}}))?`);$("COERCE",`${E[L.COERCEPLAIN]}(?:$|[^\\d])`);$("COERCEFULL",E[L.COERCEPLAIN]+`(?:${E[L.PRERELEASE]})?(?:${E[L.BUILD]})?(?:$|[^\\d])`);$("COERCERTL",E[L.COERCE],!0);$("COERCERTLFULL",E[L.COERCEFULL],!0);$("LONETILDE","(?:~>?)");$("TILDETRIM",`(\\s*)${E[L.LONETILDE]}\\s+`,!0);he.tildeTrimReplace="$1~";$("TILDE",`^${E[L.LONETILDE]}${E[L.XRANGEPLAIN]}$`);$("TILDELOOSE",`^${E[L.LONETILDE]}${E[L.XRANGEPLAINLOOSE]}$`);$("LONECARET","(?:\\^)");$("CARETTRIM",`(\\s*)${E[L.LONECARET]}\\s+`,!0);he.caretTrimReplace="$1^";$("CARET",`^${E[L.LONECARET]}${E[L.XRANGEPLAIN]}$`);$("CARETLOOSE",`^${E[L.LONECARET]}${E[L.XRANGEPLAINLOOSE]}$`);$("COMPARATORLOOSE",`^${E[L.GTLT]}\\s*(${E[L.LOOSEPLAIN]})$|^$`);$("COMPARATOR",`^${E[L.GTLT]}\\s*(${E[L.FULLPLAIN]})$|^$`);$("COMPARATORTRIM",`(\\s*)${E[L.GTLT]}\\s*(${E[L.LOOSEPLAIN]}|${E[L.XRANGEPLAIN]})`,!0);he.comparatorTrimReplace="$1$2$3";$("HYPHENRANGE",`^\\s*(${E[L.XRANGEPLAIN]})\\s+-\\s+(${E[L.XRANGEPLAIN]})\\s*$`);$("HYPHENRANGELOOSE",`^\\s*(${E[L.XRANGEPLAINLOOSE]})\\s+-\\s+(${E[L.XRANGEPLAINLOOSE]})\\s*$`);$("STAR","(<|>)?=?\\s*\\*");$("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");$("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Wt=w((Bb,sn)=>{"use strict";var yu=Object.freeze({loose:!0}),bu=Object.freeze({}),Su=o(s=>s?typeof s!="object"?yu:s:bu,"parseOptions");sn.exports=Su});var Qs=w((zb,on)=>{"use strict";var rn=/^[0-9]+$/,nn=o((s,e)=>{let t=rn.test(s),i=rn.test(e);return t&&i&&(s=+s,e=+e),s===e?0:t&&!i?-1:i&&!t?1:s<e?-1:1},"compareIdentifiers"),Eu=o((s,e)=>nn(e,s),"rcompareIdentifiers");on.exports={compareIdentifiers:nn,rcompareIdentifiers:Eu}});var V=w((Vb,cn)=>{"use strict";var zt=Ze(),{MAX_LENGTH:an,MAX_SAFE_INTEGER:Ht}=Qe(),{safeRe:Vt,t:Yt}=_e(),Lu=Wt(),{compareIdentifiers:Fe}=Qs(),ei=class s{static{o(this,"SemVer")}constructor(e,t){if(t=Lu(t),e instanceof s){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>an)throw new TypeError(`version is longer than ${an} characters`);zt("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?Vt[Yt.LOOSE]:Vt[Yt.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>Ht||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ht||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ht||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(r=>{if(/^[0-9]+$/.test(r)){let n=+r;if(n>=0&&n<Ht)return n}return r}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(zt("SemVer.compare",this.version,this.options,e),!(e instanceof s)){if(typeof e=="string"&&e===this.version)return 0;e=new s(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof s||(e=new s(e,this.options)),Fe(this.major,e.major)||Fe(this.minor,e.minor)||Fe(this.patch,e.patch)}comparePre(e){if(e instanceof s||(e=new s(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{let i=this.prerelease[t],r=e.prerelease[t];if(zt("prerelease compare",t,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return Fe(i,r)}while(++t)}compareBuild(e){e instanceof s||(e=new s(e,this.options));let t=0;do{let i=this.build[t],r=e.build[t];if(zt("build compare",t,i,r),i===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(i===void 0)return-1;if(i===r)continue;return Fe(i,r)}while(++t)}inc(e,t,i){if(e.startsWith("pre")){if(!t&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(t){let r=`-${t}`.match(this.options.loose?Vt[Yt.PRERELEASELOOSE]:Vt[Yt.PRERELEASE]);if(!r||r[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,i),this.inc("pre",t,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,i),this.inc("pre",t,i);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let r=Number(i)?1:0;if(this.prerelease.length===0)this.prerelease=[r];else{let n=this.prerelease.length;for(;--n>=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(t===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(r)}}if(t){let n=[t,r];i===!1&&(n=[t]),Fe(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};cn.exports=ei});var Oe=w((Xb,hn)=>{"use strict";var ln=V(),vu=o((s,e,t=!1)=>{if(s instanceof ln)return s;try{return new ln(s,e)}catch(i){if(!t)return null;throw i}},"parse");hn.exports=vu});var ti=w((Jb,un)=>{"use strict";var Cu=Oe(),Au=o((s,e)=>{let t=Cu(s,e);return t?t.version:null},"valid");un.exports=Au});var si=w((Qb,fn)=>{"use strict";var $u=Oe(),Ou=o((s,e)=>{let t=$u(s.trim().replace(/^[=v]+/,""),e);return t?t.version:null},"clean");fn.exports=Ou});var Xt=w((tS,dn)=>{var Pu=Symbol("proc-log.meta");dn.exports={META:Pu,output:{LEVELS:["standard","error","buffer","flush"],KEYS:{standard:"standard",error:"error",buffer:"buffer",flush:"flush"},standard:o(function(...s){return process.emit("output","standard",...s)},"standard"),error:o(function(...s){return process.emit("output","error",...s)},"error"),buffer:o(function(...s){return process.emit("output","buffer",...s)},"buffer"),flush:o(function(...s){return process.emit("output","flush",...s)},"flush")},log:{LEVELS:["notice","error","warn","info","verbose","http","silly","timing","pause","resume"],KEYS:{notice:"notice",error:"error",warn:"warn",info:"info",verbose:"verbose",http:"http",silly:"silly",timing:"timing",pause:"pause",resume:"resume"},error:o(function(...s){return process.emit("log","error",...s)},"error"),notice:o(function(...s){return process.emit("log","notice",...s)},"notice"),warn:o(function(...s){return process.emit("log","warn",...s)},"warn"),info:o(function(...s){return process.emit("log","info",...s)},"info"),verbose:o(function(...s){return process.emit("log","verbose",...s)},"verbose"),http:o(function(...s){return process.emit("log","http",...s)},"http"),silly:o(function(...s){return process.emit("log","silly",...s)},"silly"),timing:o(function(...s){return process.emit("log","timing",...s)},"timing"),pause:o(function(){return process.emit("log","pause")},"pause"),resume:o(function(){return process.emit("log","resume")},"resume")},time:{LEVELS:["start","end"],KEYS:{start:"start",end:"end"},start:o(function(s,e){process.emit("time","start",s);function t(){return process.emit("time","end",s)}if(o(t,"end"),typeof e=="function"){let i=e();return i&&i.finally?i.finally(t):(t(),i)}return t},"start"),end:o(function(s){return process.emit("time","end",s)},"end")},input:{LEVELS:["start","end","read"],KEYS:{start:"start",end:"end",read:"read"},start:o(function(s){process.emit("input","start");function e(){return process.emit("input","end")}if(o(e,"end"),typeof s=="function"){let t=s();return t&&t.finally?t.finally(e):(e(),t)}return e},"start"),end:o(function(){return process.emit("input","end")},"end"),read:o(function(...s){let e,t,i=new Promise((r,n)=>{e=r,t=n});return process.emit("input","read",e,t,...s),i},"read")}}});var oi=w(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.LRUCache=void 0;var Ru=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,mn=new Set,ii=typeof process=="object"&&process?process:{},gn=o((s,e,t,i)=>{typeof ii.emitWarning=="function"&&ii.emitWarning(s,e,t,i)},"emitWarning"),Kt=globalThis.AbortController,pn=globalThis.AbortSignal;if(typeof Kt>"u"){pn=class{static{o(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(i,r){this._onabort.push(r)}},Kt=class{static{o(this,"AbortController")}constructor(){e()}signal=new pn;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let r of this.signal._onabort)r(i);this.signal.onabort?.(i)}}};let s=ii.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=o(()=>{s&&(s=!1,gn("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"warnACPolyfill")}var Du=o(s=>!mn.has(s),"shouldWarn"),nS=Symbol("type"),ye=o(s=>s&&s===Math.floor(s)&&s>0&&isFinite(s),"isPosInt"),wn=o(s=>ye(s)?s<=Math.pow(2,8)?Uint8Array:s<=Math.pow(2,16)?Uint16Array:s<=Math.pow(2,32)?Uint32Array:s<=Number.MAX_SAFE_INTEGER?Ge:null:null,"getUintArray"),Ge=class extends Array{static{o(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},ri=class s{static{o(this,"Stack")}heap;length;static#e=!1;static create(e){let t=wn(e);if(!t)return[];s.#e=!0;let i=new s(e,t);return s.#e=!1,i}constructor(e,t){if(!s.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},ni=class s{static{o(this,"LRUCache")}#e;#s;#t;#n;#c;#O;#u;#p;get perf(){return this.#p}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#l;#i;#h;#r;#m;#g;#S;#f;#$;#b;#E;#C;#L;#y;#D;#v;#o;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#L,sizes:e.#E,keyMap:e.#i,keyList:e.#h,valList:e.#r,next:e.#m,prev:e.#g,get head(){return e.#S},get tail(){return e.#f},free:e.#$,isBackgroundFetch:o(t=>e.#d(t),"isBackgroundFetch"),backgroundFetch:o((t,i,r,n)=>e.#k(t,i,r,n),"backgroundFetch"),moveToTail:o(t=>e.#B(t),"moveToTail"),indexes:o(t=>e.#T(t),"indexes"),rindexes:o(t=>e.#I(t),"rindexes"),isStale:o(t=>e.#P(t),"isStale")}}get max(){return this.#e}get maxSize(){return this.#s}get calculatedSize(){return this.#l}get size(){return this.#a}get fetchMethod(){return this.#O}get memoMethod(){return this.#u}get dispose(){return this.#t}get onInsert(){return this.#n}get disposeAfter(){return this.#c}constructor(e){let{max:t=0,ttl:i,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:a,updateAgeOnHas:c,allowStale:l,dispose:h,onInsert:u,disposeAfter:f,noDisposeOnSet:p,noUpdateTTL:d,maxSize:g=0,maxEntrySize:m=0,sizeCalculation:b,fetchMethod:y,memoMethod:C,noDeleteOnFetchRejection:A,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:O,allowStaleOnFetchAbort:F,ignoreFetchAbort:G,perf:P}=e;if(P!==void 0&&typeof P?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#p=P??Ru,t!==0&&!ye(t))throw new TypeError("max option must be a nonnegative integer");let _=t?wn(t):Array;if(!_)throw new Error("invalid max value: "+t);if(this.#e=t,this.#s=g,this.maxEntrySize=m||this.#s,this.sizeCalculation=b,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(C!==void 0&&typeof C!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#u=C,y!==void 0&&typeof y!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#O=y,this.#D=!!y,this.#i=new Map,this.#h=new Array(t).fill(void 0),this.#r=new Array(t).fill(void 0),this.#m=new _(t),this.#g=new _(t),this.#S=0,this.#f=0,this.#$=ri.create(t),this.#a=0,this.#l=0,typeof h=="function"&&(this.#t=h),typeof u=="function"&&(this.#n=u),typeof f=="function"?(this.#c=f,this.#b=[]):(this.#c=void 0,this.#b=void 0),this.#y=!!this.#t,this.#o=!!this.#n,this.#v=!!this.#c,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!A,this.allowStaleOnFetchRejection=!!O,this.allowStaleOnFetchAbort=!!F,this.ignoreFetchAbort=!!G,this.maxEntrySize!==0){if(this.#s!==0&&!ye(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!ye(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#U()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!c,this.ttlResolution=ye(r)||r===0?r:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!ye(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#F()}if(this.#e===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#s){let j="LRU_CACHE_UNBOUNDED";Du(j)&&(mn.add(j),gn("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",j,s))}}getRemainingTTL(e){return this.#i.has(e)?1/0:0}#F(){let e=new Ge(this.#e),t=new Ge(this.#e);this.#L=e,this.#C=t,this.#G=(n,a,c=this.#p.now())=>{if(t[n]=a!==0?c:0,e[n]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#P(n)&&this.#_(this.#h[n],"expire")},a+1);l.unref&&l.unref()}},this.#A=n=>{t[n]=e[n]!==0?this.#p.now():0},this.#R=(n,a)=>{if(e[a]){let c=e[a],l=t[a];if(!c||!l)return;n.ttl=c,n.start=l,n.now=i||r();let h=n.now-l;n.remainingTTL=c-h}};let i=0,r=o(()=>{let n=this.#p.now();if(this.ttlResolution>0){i=n;let a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref()}return n},"getNow");this.getRemainingTTL=n=>{let a=this.#i.get(n);if(a===void 0)return 0;let c=e[a],l=t[a];if(!c||!l)return 1/0;let h=(i||r())-l;return c-h},this.#P=n=>{let a=t[n],c=e[n];return!!c&&!!a&&(i||r())-a>c}}#A=o(()=>{},"#updateItemAge");#R=o(()=>{},"#statusTTL");#G=o(()=>{},"#setItemTTL");#P=o(()=>!1,"#isStale");#U(){let e=new Ge(this.#e);this.#l=0,this.#E=e,this.#x=t=>{this.#l-=e[t],e[t]=0},this.#j=(t,i,r,n)=>{if(this.#d(i))return 0;if(!ye(r))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(r=n(i,t),!ye(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return r},this.#N=(t,i,r)=>{if(e[t]=i,this.#s){let n=this.#s-e[t];for(;this.#l>n;)this.#M(!0)}this.#l+=e[t],r&&(r.entrySize=i,r.totalCalculatedSize=this.#l)}}#x=o(e=>{},"#removeItemSize");#N=o((e,t,i)=>{},"#addItemSize");#j=o((e,t,i,r)=>{if(i||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#T({allowStale:e=this.allowStale}={}){if(this.#a)for(let t=this.#f;!(!this.#w(t)||((e||!this.#P(t))&&(yield t),t===this.#S));)t=this.#g[t]}*#I({allowStale:e=this.allowStale}={}){if(this.#a)for(let t=this.#S;!(!this.#w(t)||((e||!this.#P(t))&&(yield t),t===this.#f));)t=this.#m[t]}#w(e){return e!==void 0&&this.#i.get(this.#h[e])===e}*entries(){for(let e of this.#T())this.#r[e]!==void 0&&this.#h[e]!==void 0&&!this.#d(this.#r[e])&&(yield[this.#h[e],this.#r[e]])}*rentries(){for(let e of this.#I())this.#r[e]!==void 0&&this.#h[e]!==void 0&&!this.#d(this.#r[e])&&(yield[this.#h[e],this.#r[e]])}*keys(){for(let e of this.#T()){let t=this.#h[e];t!==void 0&&!this.#d(this.#r[e])&&(yield t)}}*rkeys(){for(let e of this.#I()){let t=this.#h[e];t!==void 0&&!this.#d(this.#r[e])&&(yield t)}}*values(){for(let e of this.#T())this.#r[e]!==void 0&&!this.#d(this.#r[e])&&(yield this.#r[e])}*rvalues(){for(let e of this.#I())this.#r[e]!==void 0&&!this.#d(this.#r[e])&&(yield this.#r[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#T()){let r=this.#r[i],n=this.#d(r)?r.__staleWhileFetching:r;if(n!==void 0&&e(n,this.#h[i],this))return this.get(this.#h[i],t)}}forEach(e,t=this){for(let i of this.#T()){let r=this.#r[i],n=this.#d(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(t,n,this.#h[i],this)}}rforEach(e,t=this){for(let i of this.#I()){let r=this.#r[i],n=this.#d(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(t,n,this.#h[i],this)}}purgeStale(){let e=!1;for(let t of this.#I({allowStale:!0}))this.#P(t)&&(this.#_(this.#h[t],"expire"),e=!0);return e}info(e){let t=this.#i.get(e);if(t===void 0)return;let i=this.#r[t],r=this.#d(i)?i.__staleWhileFetching:i;if(r===void 0)return;let n={value:r};if(this.#L&&this.#C){let a=this.#L[t],c=this.#C[t];if(a&&c){let l=a-(this.#p.now()-c);n.ttl=l,n.start=Date.now()}}return this.#E&&(n.size=this.#E[t]),n}dump(){let e=[];for(let t of this.#T({allowStale:!0})){let i=this.#h[t],r=this.#r[t],n=this.#d(r)?r.__staleWhileFetching:r;if(n===void 0||i===void 0)continue;let a={value:n};if(this.#L&&this.#C){a.ttl=this.#L[t];let c=this.#p.now()-this.#C[t];a.start=Math.floor(Date.now()-c)}this.#E&&(a.size=this.#E[t]),e.unshift([i,a])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let r=Date.now()-i.start;i.start=this.#p.now()-r}this.set(t,i.value,i)}}set(e,t,i={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:n,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:c=this.sizeCalculation,status:l}=i,{noUpdateTTL:h=this.noUpdateTTL}=i,u=this.#j(e,t,i.size||0,c);if(this.maxEntrySize&&u>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#_(e,"set"),this;let f=this.#a===0?void 0:this.#i.get(e);if(f===void 0)f=this.#a===0?this.#f:this.#$.length!==0?this.#$.pop():this.#a===this.#e?this.#M(!1):this.#a,this.#h[f]=e,this.#r[f]=t,this.#i.set(e,f),this.#m[this.#f]=f,this.#g[f]=this.#f,this.#f=f,this.#a++,this.#N(f,u,l),l&&(l.set="add"),h=!1,this.#o&&this.#n?.(t,e,"add");else{this.#B(f);let p=this.#r[f];if(t!==p){if(this.#D&&this.#d(p)){p.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:d}=p;d!==void 0&&!a&&(this.#y&&this.#t?.(d,e,"set"),this.#v&&this.#b?.push([d,e,"set"]))}else a||(this.#y&&this.#t?.(p,e,"set"),this.#v&&this.#b?.push([p,e,"set"]));if(this.#x(f),this.#N(f,u,l),this.#r[f]=t,l){l.set="replace";let d=p&&this.#d(p)?p.__staleWhileFetching:p;d!==void 0&&(l.oldValue=d)}}else l&&(l.set="update");this.#o&&this.onInsert?.(t,e,t===p?"update":"replace")}if(r!==0&&!this.#L&&this.#F(),this.#L&&(h||this.#G(f,r,n),l&&this.#R(l,f)),!a&&this.#v&&this.#b){let p=this.#b,d;for(;d=p?.shift();)this.#c?.(...d)}return this}pop(){try{for(;this.#a;){let e=this.#r[this.#S];if(this.#M(!0),this.#d(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#v&&this.#b){let e=this.#b,t;for(;t=e?.shift();)this.#c?.(...t)}}}#M(e){let t=this.#S,i=this.#h[t],r=this.#r[t];return this.#D&&this.#d(r)?r.__abortController.abort(new Error("evicted")):(this.#y||this.#v)&&(this.#y&&this.#t?.(r,i,"evict"),this.#v&&this.#b?.push([r,i,"evict"])),this.#x(t),e&&(this.#h[t]=void 0,this.#r[t]=void 0,this.#$.push(t)),this.#a===1?(this.#S=this.#f=0,this.#$.length=0):this.#S=this.#m[t],this.#i.delete(i),this.#a--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:r}=t,n=this.#i.get(e);if(n!==void 0){let a=this.#r[n];if(this.#d(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#P(n))r&&(r.has="stale",this.#R(r,n));else return i&&this.#A(n),r&&(r.has="hit",this.#R(r,n)),!0}else r&&(r.has="miss");return!1}peek(e,t={}){let{allowStale:i=this.allowStale}=t,r=this.#i.get(e);if(r===void 0||!i&&this.#P(r))return;let n=this.#r[r];return this.#d(n)?n.__staleWhileFetching:n}#k(e,t,i,r){let n=t===void 0?void 0:this.#r[t];if(this.#d(n))return n;let a=new Kt,{signal:c}=i;c?.addEventListener("abort",()=>a.abort(c.reason),{signal:a.signal});let l={signal:a.signal,options:i,context:r},h=o((m,b=!1)=>{let{aborted:y}=a.signal,C=i.ignoreFetchAbort&&m!==void 0;if(i.status&&(y&&!b?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,C&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),y&&!C&&!b)return f(a.signal.reason);let A=d,S=this.#r[t];return(S===d||C&&b&&S===void 0)&&(m===void 0?A.__staleWhileFetching!==void 0?this.#r[t]=A.__staleWhileFetching:this.#_(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,m,l.options))),m},"cb"),u=o(m=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=m),f(m)),"eb"),f=o(m=>{let{aborted:b}=a.signal,y=b&&i.allowStaleOnFetchAbort,C=y||i.allowStaleOnFetchRejection,A=C||i.noDeleteOnFetchRejection,S=d;if(this.#r[t]===d&&(!A||S.__staleWhileFetching===void 0?this.#_(e,"fetch"):y||(this.#r[t]=S.__staleWhileFetching)),C)return i.status&&S.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw m},"fetchFail"),p=o((m,b)=>{let y=this.#O?.(e,n,l);y&&y instanceof Promise&&y.then(C=>m(C===void 0?void 0:C),b),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(m(void 0),i.allowStaleOnFetchAbort&&(m=o(C=>h(C,!0),"res")))})},"pcall");i.status&&(i.status.fetchDispatched=!0);let d=new Promise(p).then(h,u),g=Object.assign(d,{__abortController:a,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.set(e,g,{...l.options,status:void 0}),t=this.#i.get(e)):this.#r[t]=g,g}#d(e){if(!this.#D)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Kt}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:l=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:m,forceRefresh:b=!1,status:y,signal:C}=t;if(!this.#D)return y&&(y.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:n,status:y});let A={allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:a,noDisposeOnSet:c,size:l,sizeCalculation:h,noUpdateTTL:u,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:g,ignoreFetchAbort:d,status:y,signal:C},S=this.#i.get(e);if(S===void 0){y&&(y.fetch="miss");let O=this.#k(e,S,A,m);return O.__returned=O}else{let O=this.#r[S];if(this.#d(O)){let j=i&&O.__staleWhileFetching!==void 0;return y&&(y.fetch="inflight",j&&(y.returnedStale=!0)),j?O.__staleWhileFetching:O.__returned=O}let F=this.#P(S);if(!b&&!F)return y&&(y.fetch="hit"),this.#B(S),r&&this.#A(S),y&&this.#R(y,S),O;let G=this.#k(e,S,A,m),_=G.__staleWhileFetching!==void 0&&i;return y&&(y.fetch=F?"stale":"refresh",_&&F&&(y.returnedStale=!0)),_?G.__staleWhileFetching:G.__returned=G}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#u;if(!i)throw new Error("no memoMethod provided to constructor");let{context:r,forceRefresh:n,...a}=t,c=this.get(e,a);if(!n&&c!==void 0)return c;let l=i(e,c,{options:a,context:r});return this.set(e,l,a),l}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:a}=t,c=this.#i.get(e);if(c!==void 0){let l=this.#r[c],h=this.#d(l);return a&&this.#R(a,c),this.#P(c)?(a&&(a.get="stale"),h?(a&&i&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),i?l.__staleWhileFetching:void 0):(n||this.#_(e,"expire"),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),h?l.__staleWhileFetching:(this.#B(c),r&&this.#A(c),l))}else a&&(a.get="miss")}#q(e,t){this.#g[t]=e,this.#m[e]=t}#B(e){e!==this.#f&&(e===this.#S?this.#S=this.#m[e]:this.#q(this.#g[e],this.#m[e]),this.#q(this.#f,e),this.#f=e)}delete(e){return this.#_(e,"delete")}#_(e,t){let i=!1;if(this.#a!==0){let r=this.#i.get(e);if(r!==void 0)if(i=!0,this.#a===1)this.#W(t);else{this.#x(r);let n=this.#r[r];if(this.#d(n)?n.__abortController.abort(new Error("deleted")):(this.#y||this.#v)&&(this.#y&&this.#t?.(n,e,t),this.#v&&this.#b?.push([n,e,t])),this.#i.delete(e),this.#h[r]=void 0,this.#r[r]=void 0,r===this.#f)this.#f=this.#g[r];else if(r===this.#S)this.#S=this.#m[r];else{let a=this.#g[r];this.#m[a]=this.#m[r];let c=this.#m[r];this.#g[c]=this.#g[r]}this.#a--,this.#$.push(r)}}if(this.#v&&this.#b?.length){let r=this.#b,n;for(;n=r?.shift();)this.#c?.(...n)}return i}clear(){return this.#W("delete")}#W(e){for(let t of this.#I({allowStale:!0})){let i=this.#r[t];if(this.#d(i))i.__abortController.abort(new Error("deleted"));else{let r=this.#h[t];this.#y&&this.#t?.(i,r,e),this.#v&&this.#b?.push([i,r,e])}}if(this.#i.clear(),this.#r.fill(void 0),this.#h.fill(void 0),this.#L&&this.#C&&(this.#L.fill(0),this.#C.fill(0)),this.#E&&this.#E.fill(0),this.#S=0,this.#f=0,this.#$.length=0,this.#l=0,this.#a=0,this.#v&&this.#b){let t=this.#b,i;for(;i=t?.shift();)this.#c?.(...i)}}};Jt.LRUCache=ni});var Sn=w((cS,bn)=>{"use strict";var x=o((...s)=>s.every(e=>e)?s.join(""):"","maybeJoin"),k=o(s=>s?encodeURIComponent(s):"","maybeEncode"),yn=o(s=>s.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),"formatHashFragment"),xu={sshtemplate:o(({domain:s,user:e,project:t,committish:i})=>`git@${s}:${e}/${t}.git${x("#",i)}`,"sshtemplate"),sshurltemplate:o(({domain:s,user:e,project:t,committish:i})=>`git+ssh://git@${s}/${e}/${t}.git${x("#",i)}`,"sshurltemplate"),edittemplate:o(({domain:s,user:e,project:t,committish:i,editpath:r,path:n})=>`https://${s}/${e}/${t}${x("/",r,"/",k(i||"HEAD"),"/",n)}`,"edittemplate"),browsetemplate:o(({domain:s,user:e,project:t,committish:i,treepath:r})=>`https://${s}/${e}/${t}${x("/",r,"/",k(i))}`,"browsetemplate"),browsetreetemplate:o(({domain:s,user:e,project:t,committish:i,treepath:r,path:n,fragment:a,hashformat:c})=>`https://${s}/${e}/${t}/${r}/${k(i||"HEAD")}/${n}${x("#",c(a||""))}`,"browsetreetemplate"),browseblobtemplate:o(({domain:s,user:e,project:t,committish:i,blobpath:r,path:n,fragment:a,hashformat:c})=>`https://${s}/${e}/${t}/${r}/${k(i||"HEAD")}/${n}${x("#",c(a||""))}`,"browseblobtemplate"),docstemplate:o(({domain:s,user:e,project:t,treepath:i,committish:r})=>`https://${s}/${e}/${t}${x("/",i,"/",k(r))}#readme`,"docstemplate"),httpstemplate:o(({auth:s,domain:e,user:t,project:i,committish:r})=>`git+https://${x(s,"@")}${e}/${t}/${i}.git${x("#",r)}`,"httpstemplate"),filetemplate:o(({domain:s,user:e,project:t,committish:i,path:r})=>`https://${s}/${e}/${t}/raw/${k(i||"HEAD")}/${r}`,"filetemplate"),shortcuttemplate:o(({type:s,user:e,project:t,committish:i})=>`${s}:${e}/${t}${x("#",i)}`,"shortcuttemplate"),pathtemplate:o(({user:s,project:e,committish:t})=>`${s}/${e}${x("#",t)}`,"pathtemplate"),bugstemplate:o(({domain:s,user:e,project:t})=>`https://${s}/${e}/${t}/issues`,"bugstemplate"),hashformat:yn},be={};be.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:o(({auth:s,user:e,project:t,committish:i,path:r})=>`https://${x(s,"@")}raw.githubusercontent.com/${e}/${t}/${k(i||"HEAD")}/${r}`,"filetemplate"),gittemplate:o(({auth:s,domain:e,user:t,project:i,committish:r})=>`git://${x(s,"@")}${e}/${t}/${i}.git${x("#",r)}`,"gittemplate"),tarballtemplate:o(({domain:s,user:e,project:t,committish:i})=>`https://codeload.${s}/${e}/${t}/tar.gz/${k(i||"HEAD")}`,"tarballtemplate"),extract:o(s=>{let[,e,t,i,r]=s.pathname.split("/",5);if(!(i&&i!=="tree")&&(i||(r=s.hash.slice(1)),t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:r}},"extract")};be.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:o(({domain:s,user:e,project:t,committish:i,treepath:r,path:n,editpath:a})=>`https://${s}/${e}/${t}${x("/",r,"/",k(i||"HEAD"),"/",n,a)}`,"edittemplate"),tarballtemplate:o(({domain:s,user:e,project:t,committish:i})=>`https://${s}/${e}/${t}/get/${k(i||"HEAD")}.tar.gz`,"tarballtemplate"),extract:o(s=>{let[,e,t,i]=s.pathname.split("/",4);if(!["get"].includes(i)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:s.hash.slice(1)}},"extract")};be.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",tarballtemplate:o(({domain:s,user:e,project:t,committish:i})=>`https://${s}/${e}/${t}/repository/archive.tar.gz?ref=${k(i||"HEAD")}`,"tarballtemplate"),extract:o(s=>{let e=s.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let t=e.split("/"),i=t.pop();i.endsWith(".git")&&(i=i.slice(0,-4));let r=t.join("/");if(!(!r||!i))return{user:r,project:i,committish:s.hash.slice(1)}},"extract")};be.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:o(({domain:s,project:e,committish:t})=>`git@${s}:${e}.git${x("#",t)}`,"sshtemplate"),sshurltemplate:o(({domain:s,project:e,committish:t})=>`git+ssh://git@${s}/${e}.git${x("#",t)}`,"sshurltemplate"),edittemplate:o(({domain:s,user:e,project:t,committish:i,editpath:r})=>`https://${s}/${e}/${t}${x("/",k(i))}/${r}`,"edittemplate"),browsetemplate:o(({domain:s,project:e,committish:t})=>`https://${s}/${e}${x("/",k(t))}`,"browsetemplate"),browsetreetemplate:o(({domain:s,project:e,committish:t,path:i,hashformat:r})=>`https://${s}/${e}${x("/",k(t))}${x("#",r(i))}`,"browsetreetemplate"),browseblobtemplate:o(({domain:s,project:e,committish:t,path:i,hashformat:r})=>`https://${s}/${e}${x("/",k(t))}${x("#",r(i))}`,"browseblobtemplate"),docstemplate:o(({domain:s,project:e,committish:t})=>`https://${s}/${e}${x("/",k(t))}`,"docstemplate"),httpstemplate:o(({domain:s,project:e,committish:t})=>`git+https://${s}/${e}.git${x("#",t)}`,"httpstemplate"),filetemplate:o(({user:s,project:e,committish:t,path:i})=>`https://gist.githubusercontent.com/${s}/${e}/raw${x("/",k(t))}/${i}`,"filetemplate"),shortcuttemplate:o(({type:s,project:e,committish:t})=>`${s}:${e}${x("#",t)}`,"shortcuttemplate"),pathtemplate:o(({project:s,committish:e})=>`${s}${x("#",e)}`,"pathtemplate"),bugstemplate:o(({domain:s,project:e})=>`https://${s}/${e}`,"bugstemplate"),gittemplate:o(({domain:s,project:e,committish:t})=>`git://${s}/${e}.git${x("#",t)}`,"gittemplate"),tarballtemplate:o(({project:s,committish:e})=>`https://codeload.github.com/gist/${s}/tar.gz/${k(e||"HEAD")}`,"tarballtemplate"),extract:o(s=>{let[,e,t,i]=s.pathname.split("/",4);if(i!=="raw"){if(!t){if(!e)return;t=e,e=null}return t.endsWith(".git")&&(t=t.slice(0,-4)),{user:e,project:t,committish:s.hash.slice(1)}}},"extract"),hashformat:o(function(s){return s&&"file-"+yn(s)},"hashformat")};be.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:o(({domain:s,user:e,project:t,committish:i,path:r})=>`https://${s}/${e}/${t}/blob/${k(i)||"HEAD"}/${r}`,"filetemplate"),httpstemplate:o(({domain:s,user:e,project:t,committish:i})=>`https://${s}/${e}/${t}.git${x("#",i)}`,"httpstemplate"),tarballtemplate:o(({domain:s,user:e,project:t,committish:i})=>`https://${s}/${e}/${t}/archive/${k(i)||"HEAD"}.tar.gz`,"tarballtemplate"),bugstemplate:o(()=>null,"bugstemplate"),extract:o(s=>{let[,e,t,i]=s.pathname.split("/",4);if(!["archive"].includes(i)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:s.hash.slice(1)}},"extract")};for(let[s,e]of Object.entries(be))be[s]=Object.assign({},xu,e);bn.exports=be});var ci=w((hS,Ln)=>{var Tu=require("url"),ai=o((s,e,t)=>{let i=s.indexOf(t);return s.lastIndexOf(e,i>-1?i:1/0)},"lastIndexOfBefore"),En=o(s=>{try{return new Tu.URL(s)}catch{}},"safeUrl"),Nu=o((s,e)=>{let t=s.indexOf(":"),i=s.slice(0,t+1);if(Object.prototype.hasOwnProperty.call(e,i)||s.substr(t,3)==="://")return s;let r=s.indexOf("@");return r>-1?r>t?`git+ssh://${s}`:s:`${s.slice(0,t+1)}//${s.slice(t+1)}`},"correctProtocol"),Iu=o(s=>{let e=ai(s,"@","#"),t=ai(s,":","#");return t>e&&(s=s.slice(0,t)+"/"+s.slice(t+1)),ai(s,":","#")===-1&&s.indexOf("//")===-1&&(s=`git+ssh://${s}`),s},"correctUrl");Ln.exports=(s,e)=>{let t=e?Nu(s,e):s;return En(t)||En(Iu(t))}});var Cn=w((fS,vn)=>{"use strict";var _u=ci(),Fu=o(s=>{let e=s.indexOf("#"),t=s.indexOf("/"),i=s.indexOf("/",t+1),r=s.indexOf(":"),n=/\s/.exec(s),a=s.indexOf("@"),c=!n||e>-1&&n.index>e,l=a===-1||e>-1&&a>e,h=r===-1||e>-1&&r>e,u=i===-1||e>-1&&i>e,f=t>0,p=e>-1?s[e-1]!=="/":!s.endsWith("/"),d=!s.startsWith(".");return c&&f&&p&&d&&l&&h&&u},"isGitHubShorthand");vn.exports=(s,e,{gitHosts:t,protocols:i})=>{if(!s)return;let r=Fu(s)?`github:${s}`:s,n=_u(r,i);if(!n)return;let a=t.byShortcut[n.protocol],c=t.byDomain[n.hostname.startsWith("www.")?n.hostname.slice(4):n.hostname],l=a||c;if(!l)return;let h=t[a||c],u=null;i[n.protocol]?.auth&&(n.username||n.password)&&(u=`${n.username}${n.password?":"+n.password:""}`);let f=null,p=null,d=null,g=null;try{if(a){let m=n.pathname.startsWith("/")?n.pathname.slice(1):n.pathname,b=m.indexOf("@");b>-1&&(m=m.slice(b+1));let y=m.lastIndexOf("/");y>-1?(p=decodeURIComponent(m.slice(0,y)),p||(p=null),d=decodeURIComponent(m.slice(y+1))):d=decodeURIComponent(m),d.endsWith(".git")&&(d=d.slice(0,-4)),n.hash&&(f=decodeURIComponent(n.hash.slice(1))),g="shortcut"}else{if(!h.protocols.includes(n.protocol))return;let m=h.extract(n);if(!m)return;p=m.user&&decodeURIComponent(m.user),d=decodeURIComponent(m.project),f=decodeURIComponent(m.committish),g=i[n.protocol]?.name||n.protocol.slice(0,-1)}}catch(m){if(m instanceof URIError)return;throw m}return[l,p,u,d,f,g,e]}});var hi=w((pS,An)=>{"use strict";var{LRUCache:Gu}=oi(),ju=Sn(),Mu=Cn(),ku=ci(),li=new Gu({max:1e3});function Uu(s){try{let{protocol:e,hostname:t,pathname:i}=new URL(s);if(!t)return null;let r=/(?:git\+)http:$/.test(e)?"http:":"https:",n=i.replace(/\.git$/,"");return`${r}//${t}${n}`}catch{return null}}o(Uu,"unknownHostedUrl");var Zt=class s{static{o(this,"GitHost")}constructor(e,t,i,r,n,a,c={}){Object.assign(this,s.#e[e],{type:e,user:t,auth:i,project:r,committish:n,default:a,opts:c})}static#e={byShortcut:{},byDomain:{}};static#s={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(e,t){s.#e[e]=t,s.#e.byDomain[t.domain]=e,s.#e.byShortcut[`${e}:`]=e,s.#s[`${e}:`]={name:e}}static fromUrl(e,t){if(typeof e!="string")return;let i=e+JSON.stringify(t||{});if(!li.has(i)){let r=Mu(e,t,{gitHosts:s.#e,protocols:s.#s});li.set(i,r?new s(...r):void 0)}return li.get(i)}static fromManifest(e,t={}){if(!e||typeof e!="object")return;let i=e.repository,r=i&&(typeof i=="string"?i:typeof i=="object"&&typeof i.url=="string"?i.url:null);if(!r)throw new Error("no repository");let n=r&&s.fromUrl(r.replace(/^git\+/,""),t)||null;if(n)return n;let a=Uu(r);return s.fromUrl(a,t)||a}static parseUrl(e){return ku(e)}#t(e,t){if(typeof e!="function")return null;let i={...this,...this.opts,...t};i.path||(i.path=""),i.path.startsWith("/")&&(i.path=i.path.slice(1)),i.noCommittish&&(i.committish=null);let r=e(i);return i.noGitPlus&&r.startsWith("git+")?r.slice(4):r}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#t(this.sshtemplate,e)}sshurl(e){return this.#t(this.sshurltemplate,e)}browse(e,...t){return typeof e!="string"?this.#t(this.browsetemplate,e):typeof t[0]!="string"?this.#t(this.browsetreetemplate,{...t[0],path:e}):this.#t(this.browsetreetemplate,{...t[1],fragment:t[0],path:e})}browseFile(e,...t){return typeof t[0]!="string"?this.#t(this.browseblobtemplate,{...t[0],path:e}):this.#t(this.browseblobtemplate,{...t[1],fragment:t[0],path:e})}docs(e){return this.#t(this.docstemplate,e)}bugs(e){return this.#t(this.bugstemplate,e)}https(e){return this.#t(this.httpstemplate,e)}git(e){return this.#t(this.gittemplate,e)}shortcut(e){return this.#t(this.shortcuttemplate,e)}path(e){return this.#t(this.pathtemplate,e)}tarball(e){return this.#t(this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return this.#t(this.filetemplate,{...t,path:e})}edit(e,t){return this.#t(this.edittemplate,{...t,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}};for(let[s,e]of Object.entries(ju))Zt.addHost(s,e);An.exports=Zt});var On=w(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.range=Pe.balanced=void 0;var qu=o((s,e,t)=>{let i=s instanceof RegExp?$n(s,t):s,r=e instanceof RegExp?$n(e,t):e,n=i!==null&&r!=null&&(0,Pe.range)(i,r,t);return n&&{start:n[0],end:n[1],pre:t.slice(0,n[0]),body:t.slice(n[0]+i.length,n[1]),post:t.slice(n[1]+r.length)}},"balanced");Pe.balanced=qu;var $n=o((s,e)=>{let t=e.match(s);return t?t[0]:null},"maybeMatch"),Bu=o((s,e,t)=>{let i,r,n,a,c,l=t.indexOf(s),h=t.indexOf(e,l+1),u=l;if(l>=0&&h>0){if(s===e)return[l,h];for(i=[],n=t.length;u>=0&&!c;){if(u===l)i.push(u),l=t.indexOf(s,u+1);else if(i.length===1){let f=i.pop();f!==void 0&&(c=[f,h])}else r=i.pop(),r!==void 0&&r<n&&(n=r,a=h),h=t.indexOf(e,u+1);u=l<h&&l>=0?l:h}i.length&&a!==void 0&&(c=[n,a])}return c},"range");Pe.range=Bu});var In=w(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.expand=sf;var Pn=On(),Rn="\0SLASH"+Math.random()+"\0",Dn="\0OPEN"+Math.random()+"\0",fi="\0CLOSE"+Math.random()+"\0",xn="\0COMMA"+Math.random()+"\0",Tn="\0PERIOD"+Math.random()+"\0",Wu=new RegExp(Rn,"g"),zu=new RegExp(Dn,"g"),Hu=new RegExp(fi,"g"),Vu=new RegExp(xn,"g"),Yu=new RegExp(Tn,"g"),Xu=/\\\\/g,Ku=/\\{/g,Ju=/\\}/g,Zu=/\\,/g,Qu=/\\./g;function ui(s){return isNaN(s)?s.charCodeAt(0):parseInt(s,10)}o(ui,"numeric");function ef(s){return s.replace(Xu,Rn).replace(Ku,Dn).replace(Ju,fi).replace(Zu,xn).replace(Qu,Tn)}o(ef,"escapeBraces");function tf(s){return s.replace(Wu,"\\").replace(zu,"{").replace(Hu,"}").replace(Vu,",").replace(Yu,".")}o(tf,"unescapeBraces");function Nn(s){if(!s)return[""];let e=[],t=(0,Pn.balanced)("{","}",s);if(!t)return s.split(",");let{pre:i,body:r,post:n}=t,a=i.split(",");a[a.length-1]+="{"+r+"}";let c=Nn(n);return n.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),e.push.apply(e,a),e}o(Nn,"parseCommaParts");function sf(s){return s?(s.slice(0,2)==="{}"&&(s="\\{\\}"+s.slice(2)),et(ef(s),!0).map(tf)):[]}o(sf,"expand");function rf(s){return"{"+s+"}"}o(rf,"embrace");function nf(s){return/^-?0\d/.test(s)}o(nf,"isPadded");function of(s,e){return s<=e}o(of,"lte");function af(s,e){return s>=e}o(af,"gte");function et(s,e){let t=[],i=(0,Pn.balanced)("{","}",s);if(!i)return[s];let r=i.pre,n=i.post.length?et(i.post,!1):[""];if(/\$$/.test(i.pre))for(let a=0;a<n.length;a++){let c=r+"{"+i.body+"}"+n[a];t.push(c)}else{let a=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),c=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),l=a||c,h=i.body.indexOf(",")>=0;if(!l&&!h)return i.post.match(/,(?!,).*\}/)?(s=i.pre+"{"+i.body+fi+i.post,et(s)):[s];let u;if(l)u=i.body.split(/\.\./);else if(u=Nn(i.body),u.length===1&&u[0]!==void 0&&(u=et(u[0],!1).map(rf),u.length===1))return n.map(p=>i.pre+u[0]+p);let f;if(l&&u[0]!==void 0&&u[1]!==void 0){let p=ui(u[0]),d=ui(u[1]),g=Math.max(u[0].length,u[1].length),m=u.length===3&&u[2]!==void 0?Math.abs(ui(u[2])):1,b=of;d<p&&(m*=-1,b=af);let C=u.some(nf);f=[];for(let A=p;b(A,d);A+=m){let S;if(c)S=String.fromCharCode(A),S==="\\"&&(S="");else if(S=String(A),C){let O=g-S.length;if(O>0){let F=new Array(O+1).join("0");A<0?S="-"+F+S.slice(1):S=F+S}}f.push(S)}}else{f=[];for(let p=0;p<u.length;p++)f.push.apply(f,et(u[p],!1))}for(let p=0;p<f.length;p++)for(let d=0;d<n.length;d++){let g=r+f[p]+n[d];(!e||l||g)&&t.push(g)}}return t}o(et,"expand_")});var _n=w(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.assertValidPattern=void 0;var cf=1024*64,lf=o(s=>{if(typeof s!="string")throw new TypeError("invalid pattern");if(s.length>cf)throw new TypeError("pattern is too long")},"assertValidPattern");Qt.assertValidPattern=lf});var Gn=w(es=>{"use strict";Object.defineProperty(es,"__esModule",{value:!0});es.parseClass=void 0;var hf={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},tt=o(s=>s.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),uf=o(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),Fn=o(s=>s.join(""),"rangesToString"),ff=o((s,e)=>{let t=e;if(s.charAt(t)!=="[")throw new Error("not in a brace expression");let i=[],r=[],n=t+1,a=!1,c=!1,l=!1,h=!1,u=t,f="";e:for(;n<s.length;){let m=s.charAt(n);if((m==="!"||m==="^")&&n===t+1){h=!0,n++;continue}if(m==="]"&&a&&!l){u=n+1;break}if(a=!0,m==="\\"&&!l){l=!0,n++;continue}if(m==="["&&!l){for(let[b,[y,C,A]]of Object.entries(hf))if(s.startsWith(b,n)){if(f)return["$.",!1,s.length-t,!0];n+=b.length,A?r.push(y):i.push(y),c=c||C;continue e}}if(l=!1,f){m>f?i.push(tt(f)+"-"+tt(m)):m===f&&i.push(tt(m)),f="",n++;continue}if(s.startsWith("-]",n+1)){i.push(tt(m+"-")),n+=2;continue}if(s.startsWith("-",n+1)){f=m,n+=2;continue}i.push(tt(m)),n++}if(u<n)return["",!1,0,!1];if(!i.length&&!r.length)return["$.",!1,s.length-t,!0];if(r.length===0&&i.length===1&&/^\\?.$/.test(i[0])&&!h){let m=i[0].length===2?i[0].slice(-1):i[0];return[uf(m),!1,u-t,!1]}let p="["+(h?"^":"")+Fn(i)+"]",d="["+(h?"":"^")+Fn(r)+"]";return[i.length&&r.length?"("+p+"|"+d+")":i.length?p:d,c,u-t,!0]},"parseClass");es.parseClass=ff});var ss=w(ts=>{"use strict";Object.defineProperty(ts,"__esModule",{value:!0});ts.unescape=void 0;var df=o((s,{windowsPathsNoEscape:e=!1}={})=>e?s.replace(/\[([^\/\\])\]/g,"$1"):s.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");ts.unescape=df});var gi=w(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.AST=void 0;var pf=Gn(),is=ss(),mf=new Set(["!","?","+","*","@"]),jn=o(s=>mf.has(s),"isExtglobType"),gf="(?!(?:^|/)\\.\\.?(?:$|/))",rs="(?!\\.)",wf=new Set(["[","."]),yf=new Set(["..","."]),bf=new Set("().*{}+?[]^$\\!"),Sf=o(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),mi="[^/]",Mn=mi+"*?",kn=mi+"+?",pi=class s{static{o(this,"AST")}type;#e;#s;#t=!1;#n=[];#c;#O;#u;#p=!1;#a;#l;#i=!1;constructor(e,t,i={}){this.type=e,e&&(this.#s=!0),this.#c=t,this.#e=this.#c?this.#c.#e:this,this.#a=this.#e===this?i:this.#e.#a,this.#u=this.#e===this?[]:this.#e.#u,e==="!"&&!this.#e.#p&&this.#u.push(this),this.#O=this.#c?this.#c.#n.length:0}get hasMagic(){if(this.#s!==void 0)return this.#s;for(let e of this.#n)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#s=!0;return this.#s}toString(){return this.#l!==void 0?this.#l:this.type?this.#l=this.type+"("+this.#n.map(e=>String(e)).join("|")+")":this.#l=this.#n.map(e=>String(e)).join("")}#h(){if(this!==this.#e)throw new Error("should only call on root");if(this.#p)return this;this.toString(),this.#p=!0;let e;for(;e=this.#u.pop();){if(e.type!=="!")continue;let t=e,i=t.#c;for(;i;){for(let r=t.#O+1;!i.type&&r<i.#n.length;r++)for(let n of e.#n){if(typeof n=="string")throw new Error("string part in extglob AST??");n.copyIn(i.#n[r])}t=i,i=t.#c}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof s&&t.#c===this))throw new Error("invalid part: "+t);this.#n.push(t)}}toJSON(){let e=this.type===null?this.#n.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#n.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#p&&this.#c?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#c?.isStart())return!1;if(this.#O===0)return!0;let e=this.#c;for(let t=0;t<this.#O;t++){let i=e.#n[t];if(!(i instanceof s&&i.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#c?.type==="!")return!0;if(!this.#c?.isEnd())return!1;if(!this.type)return this.#c?.isEnd();let e=this.#c?this.#c.#n.length:0;return this.#O===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new s(this.type,e);for(let i of this.#n)t.copyIn(i);return t}static#r(e,t,i,r){let n=!1,a=!1,c=-1,l=!1;if(t.type===null){let d=i,g="";for(;d<e.length;){let m=e.charAt(d++);if(n||m==="\\"){n=!n,g+=m;continue}if(a){d===c+1?(m==="^"||m==="!")&&(l=!0):m==="]"&&!(d===c+2&&l)&&(a=!1),g+=m;continue}else if(m==="["){a=!0,c=d,l=!1,g+=m;continue}if(!r.noext&&jn(m)&&e.charAt(d)==="("){t.push(g),g="";let b=new s(m,t);d=s.#r(e,b,d,r),t.push(b);continue}g+=m}return t.push(g),d}let h=i+1,u=new s(null,t),f=[],p="";for(;h<e.length;){let d=e.charAt(h++);if(n||d==="\\"){n=!n,p+=d;continue}if(a){h===c+1?(d==="^"||d==="!")&&(l=!0):d==="]"&&!(h===c+2&&l)&&(a=!1),p+=d;continue}else if(d==="["){a=!0,c=h,l=!1,p+=d;continue}if(jn(d)&&e.charAt(h)==="("){u.push(p),p="";let g=new s(d,u);u.push(g),h=s.#r(e,g,h,r);continue}if(d==="|"){u.push(p),p="",f.push(u),u=new s(null,t);continue}if(d===")")return p===""&&t.#n.length===0&&(t.#i=!0),u.push(p),p="",t.push(...f,u),h;p+=d}return t.type=null,t.#s=void 0,t.#n=[e.substring(i-1)],h}static fromGlob(e,t={}){let i=new s(null,void 0,t);return s.#r(e,i,0,t),i}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,i,r,n]=this.toRegExpSource();if(!(r||this.#s||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return i;let c=(this.#a.nocase?"i":"")+(n?"u":"");return Object.assign(new RegExp(`^${t}$`,c),{_src:t,_glob:e})}get options(){return this.#a}toRegExpSource(e){let t=e??!!this.#a.dot;if(this.#e===this&&this.#h(),!this.type){let l=this.isStart()&&this.isEnd(),h=this.#n.map(d=>{let[g,m,b,y]=typeof d=="string"?s.#g(d,this.#s,l):d.toRegExpSource(e);return this.#s=this.#s||b,this.#t=this.#t||y,g}).join(""),u="";if(this.isStart()&&typeof this.#n[0]=="string"&&!(this.#n.length===1&&yf.has(this.#n[0]))){let g=wf,m=t&&g.has(h.charAt(0))||h.startsWith("\\.")&&g.has(h.charAt(2))||h.startsWith("\\.\\.")&&g.has(h.charAt(4)),b=!t&&!e&&g.has(h.charAt(0));u=m?gf:b?rs:""}let f="";return this.isEnd()&&this.#e.#p&&this.#c?.type==="!"&&(f="(?:$|\\/)"),[u+h+f,(0,is.unescape)(h),this.#s=!!this.#s,this.#t]}let i=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",n=this.#m(t);if(this.isStart()&&this.isEnd()&&!n&&this.type!=="!"){let l=this.toString();return this.#n=[l],this.type=null,this.#s=void 0,[l,(0,is.unescape)(this.toString()),!1,!1]}let a=!i||e||t||!rs?"":this.#m(!0);a===n&&(a=""),a&&(n=`(?:${n})(?:${a})*?`);let c="";if(this.type==="!"&&this.#i)c=(this.isStart()&&!t?rs:"")+kn;else{let l=this.type==="!"?"))"+(this.isStart()&&!t&&!e?rs:"")+Mn+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;c=r+n+l}return[c,(0,is.unescape)(n),this.#s=!!this.#s,this.#t]}#m(e){return this.#n.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[i,r,n,a]=t.toRegExpSource(e);return this.#t=this.#t||a,i}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#g(e,t,i=!1){let r=!1,n="",a=!1;for(let c=0;c<e.length;c++){let l=e.charAt(c);if(r){r=!1,n+=(bf.has(l)?"\\":"")+l;continue}if(l==="\\"){c===e.length-1?n+="\\\\":r=!0;continue}if(l==="["){let[h,u,f,p]=(0,pf.parseClass)(e,c);if(f){n+=h,a=a||u,c+=f-1,t=t||p;continue}}if(l==="*"){i&&e==="*"?n+=kn:n+=Mn,t=!0;continue}if(l==="?"){n+=mi,t=!0;continue}n+=Sf(l)}return[n,(0,is.unescape)(e),!!t,a]}};ns.AST=pi});var wi=w(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.escape=void 0;var Ef=o((s,{windowsPathsNoEscape:e=!1}={})=>e?s.replace(/[?*()[\]]/g,"[$&]"):s.replace(/[?*()[\]\\]/g,"\\$&"),"escape");os.escape=Ef});var Se=w(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});v.unescape=v.escape=v.AST=v.Minimatch=v.match=v.makeRe=v.braceExpand=v.defaults=v.filter=v.GLOBSTAR=v.sep=v.minimatch=void 0;var Lf=In(),as=_n(),Bn=gi(),vf=wi(),Cf=ss(),Af=o((s,e,t={})=>((0,as.assertValidPattern)(e),!t.nocomment&&e.charAt(0)==="#"?!1:new Re(e,t).match(s)),"minimatch");v.minimatch=Af;var $f=/^\*+([^+@!?\*\[\(]*)$/,Of=o(s=>e=>!e.startsWith(".")&&e.endsWith(s),"starDotExtTest"),Pf=o(s=>e=>e.endsWith(s),"starDotExtTestDot"),Rf=o(s=>(s=s.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(s)),"starDotExtTestNocase"),Df=o(s=>(s=s.toLowerCase(),e=>e.toLowerCase().endsWith(s)),"starDotExtTestNocaseDot"),xf=/^\*+\.\*+$/,Tf=o(s=>!s.startsWith(".")&&s.includes("."),"starDotStarTest"),Nf=o(s=>s!=="."&&s!==".."&&s.includes("."),"starDotStarTestDot"),If=/^\.\*+$/,_f=o(s=>s!=="."&&s!==".."&&s.startsWith("."),"dotStarTest"),Ff=/^\*+$/,Gf=o(s=>s.length!==0&&!s.startsWith("."),"starTest"),jf=o(s=>s.length!==0&&s!=="."&&s!=="..","starTestDot"),Mf=/^\?+([^+@!?\*\[\(]*)?$/,kf=o(([s,e=""])=>{let t=Wn([s]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},"qmarksTestNocase"),Uf=o(([s,e=""])=>{let t=zn([s]);return e?(e=e.toLowerCase(),i=>t(i)&&i.toLowerCase().endsWith(e)):t},"qmarksTestNocaseDot"),qf=o(([s,e=""])=>{let t=zn([s]);return e?i=>t(i)&&i.endsWith(e):t},"qmarksTestDot"),Bf=o(([s,e=""])=>{let t=Wn([s]);return e?i=>t(i)&&i.endsWith(e):t},"qmarksTest"),Wn=o(([s])=>{let e=s.length;return t=>t.length===e&&!t.startsWith(".")},"qmarksTestNoExt"),zn=o(([s])=>{let e=s.length;return t=>t.length===e&&t!=="."&&t!==".."},"qmarksTestNoExtDot"),Hn=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Un={win32:{sep:"\\"},posix:{sep:"/"}};v.sep=Hn==="win32"?Un.win32.sep:Un.posix.sep;v.minimatch.sep=v.sep;v.GLOBSTAR=Symbol("globstar **");v.minimatch.GLOBSTAR=v.GLOBSTAR;var Wf="[^/]",zf=Wf+"*?",Hf="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Vf="(?:(?!(?:\\/|^)\\.).)*?",Yf=o((s,e={})=>t=>(0,v.minimatch)(t,s,e),"filter");v.filter=Yf;v.minimatch.filter=v.filter;var te=o((s,e={})=>Object.assign({},s,e),"ext"),Xf=o(s=>{if(!s||typeof s!="object"||!Object.keys(s).length)return v.minimatch;let e=v.minimatch;return Object.assign(o((i,r,n={})=>e(i,r,te(s,n)),"m"),{Minimatch:class extends e.Minimatch{static{o(this,"Minimatch")}constructor(r,n={}){super(r,te(s,n))}static defaults(r){return e.defaults(te(s,r)).Minimatch}},AST:class extends e.AST{static{o(this,"AST")}constructor(r,n,a={}){super(r,n,te(s,a))}static fromGlob(r,n={}){return e.AST.fromGlob(r,te(s,n))}},unescape:o((i,r={})=>e.unescape(i,te(s,r)),"unescape"),escape:o((i,r={})=>e.escape(i,te(s,r)),"escape"),filter:o((i,r={})=>e.filter(i,te(s,r)),"filter"),defaults:o(i=>e.defaults(te(s,i)),"defaults"),makeRe:o((i,r={})=>e.makeRe(i,te(s,r)),"makeRe"),braceExpand:o((i,r={})=>e.braceExpand(i,te(s,r)),"braceExpand"),match:o((i,r,n={})=>e.match(i,r,te(s,n)),"match"),sep:e.sep,GLOBSTAR:v.GLOBSTAR})},"defaults");v.defaults=Xf;v.minimatch.defaults=v.defaults;var Kf=o((s,e={})=>((0,as.assertValidPattern)(s),e.nobrace||!/\{(?:(?!\{).)*\}/.test(s)?[s]:(0,Lf.expand)(s)),"braceExpand");v.braceExpand=Kf;v.minimatch.braceExpand=v.braceExpand;var Jf=o((s,e={})=>new Re(s,e).makeRe(),"makeRe");v.makeRe=Jf;v.minimatch.makeRe=v.makeRe;var Zf=o((s,e,t={})=>{let i=new Re(e,t);return s=s.filter(r=>i.match(r)),i.options.nonull&&!s.length&&s.push(e),s},"match");v.match=Zf;v.minimatch.match=v.match;var qn=/[?*]|[+@!]\(.*?\)|\[|\]/,Qf=o(s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Re=class{static{o(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e,t={}){(0,as.assertValidPattern)(e),t=t||{},this.options=t,this.pattern=e,this.platform=t.platform||Hn,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...n)=>{}),this.debug(this.pattern,this.globSet);let i=this.globSet.map(n=>this.slashSplit(n));this.globParts=this.preprocess(i),this.debug(this.pattern,this.globParts);let r=this.globParts.map((n,a,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=n[0]===""&&n[1]===""&&(n[2]==="?"||!qn.test(n[2]))&&!qn.test(n[3]),h=/^[a-z]:/i.test(n[0]);if(l)return[...n.slice(0,4),...n.slice(4).map(u=>this.parse(u))];if(h)return[n[0],...n.slice(1).map(u=>this.parse(u))]}return n.map(l=>this.parse(l))});if(this.debug(this.pattern,r),this.set=r.filter(n=>n.indexOf(!1)===-1),this.isWindows)for(let n=0;n<this.set.length;n++){let a=this.set[n];a[0]===""&&a[1]===""&&this.globParts[n][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let i=0;i<e.length;i++)for(let r=0;r<e[i].length;r++)e[i][r]==="**"&&(e[i][r]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let i=-1;for(;(i=t.indexOf("**",i+1))!==-1;){let r=i;for(;t[r+1]==="**";)r++;r!==i&&t.splice(i,r-i)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((i,r)=>{let n=i[i.length-1];return r==="**"&&n==="**"?i:r===".."&&n&&n!==".."&&n!=="."&&n!=="**"?(i.pop(),i):(i.push(r),i)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let r=1;r<e.length-1;r++){let n=e[r];r===1&&n===""&&e[0]===""||(n==="."||n==="")&&(t=!0,e.splice(r,1),r--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let i=0;for(;(i=e.indexOf("..",i+1))!==-1;){let r=e[i-1];r&&r!=="."&&r!==".."&&r!=="**"&&(t=!0,e.splice(i-1,2),i-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let i of e){let r=-1;for(;(r=i.indexOf("**",r+1))!==-1;){let a=r;for(;i[a+1]==="**";)a++;a>r&&i.splice(r+1,a-r);let c=i[r+1],l=i[r+2],h=i[r+3];if(c!==".."||!l||l==="."||l===".."||!h||h==="."||h==="..")continue;t=!0,i.splice(r,1);let u=i.slice(0);u[r]="**",e.push(u),r--}if(!this.preserveMultipleSlashes){for(let a=1;a<i.length-1;a++){let c=i[a];a===1&&c===""&&i[0]===""||(c==="."||c==="")&&(t=!0,i.splice(a,1),a--)}i[0]==="."&&i.length===2&&(i[1]==="."||i[1]==="")&&(t=!0,i.pop())}let n=0;for(;(n=i.indexOf("..",n+1))!==-1;){let a=i[n-1];if(a&&a!=="."&&a!==".."&&a!=="**"){t=!0;let l=n===1&&i[n+1]==="**"?["."]:[];i.splice(n-1,2,...l),i.length===0&&i.push(""),n-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let i=t+1;i<e.length;i++){let r=this.partsMatch(e[t],e[i],!this.preserveMultipleSlashes);if(r){e[t]=[],e[i]=r;break}}return e.filter(t=>t.length)}partsMatch(e,t,i=!1){let r=0,n=0,a=[],c="";for(;r<e.length&&n<t.length;)if(e[r]===t[n])a.push(c==="b"?t[n]:e[r]),r++,n++;else if(i&&e[r]==="**"&&t[n]===e[r+1])a.push(e[r]),r++;else if(i&&t[n]==="**"&&e[r]===t[n+1])a.push(t[n]),n++;else if(e[r]==="*"&&t[n]&&(this.options.dot||!t[n].startsWith("."))&&t[n]!=="**"){if(c==="b")return!1;c="a",a.push(e[r]),r++,n++}else if(t[n]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(c==="a")return!1;c="b",a.push(t[n]),r++,n++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,i=0;for(let r=0;r<e.length&&e.charAt(r)==="!";r++)t=!t,i++;i&&(this.pattern=e.slice(i)),this.negate=t}matchOne(e,t,i=!1){let r=this.options;if(this.isWindows){let m=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),b=!m&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),y=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),C=!y&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),A=b?3:m?0:void 0,S=C?3:y?0:void 0;if(typeof A=="number"&&typeof S=="number"){let[O,F]=[e[A],t[S]];O.toLowerCase()===F.toLowerCase()&&(t[S]=O,S>A?t=t.slice(S):A>S&&(e=e.slice(A)))}}let{optimizationLevel:n=1}=this.options;n>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var a=0,c=0,l=e.length,h=t.length;a<l&&c<h;a++,c++){this.debug("matchOne loop");var u=t[c],f=e[a];if(this.debug(t,u,f),u===!1)return!1;if(u===v.GLOBSTAR){this.debug("GLOBSTAR",[t,u,f]);var p=a,d=c+1;if(d===h){for(this.debug("** at the end");a<l;a++)if(e[a]==="."||e[a]===".."||!r.dot&&e[a].charAt(0)===".")return!1;return!0}for(;p<l;){var g=e[p];if(this.debug(`
8
+ globstar while`,e,p,t,d,g),this.matchOne(e.slice(p),t.slice(d),i))return this.debug("globstar found match!",p,l,g),!0;if(g==="."||g===".."||!r.dot&&g.charAt(0)==="."){this.debug("dot detected!",e,p,t,d);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(i&&(this.debug(`
9
+ >>> no match, partial?`,e,p,t,d),p===l))}let m;if(typeof u=="string"?(m=f===u,this.debug("string match",u,f,m)):(m=u.test(f),this.debug("pattern match",u,f,m)),!m)return!1}if(a===l&&c===h)return!0;if(a===l)return i;if(c===h)return a===l-1&&e[a]==="";throw new Error("wtf?")}braceExpand(){return(0,v.braceExpand)(this.pattern,this.options)}parse(e){(0,as.assertValidPattern)(e);let t=this.options;if(e==="**")return v.GLOBSTAR;if(e==="")return"";let i,r=null;(i=e.match(Ff))?r=t.dot?jf:Gf:(i=e.match($f))?r=(t.nocase?t.dot?Df:Rf:t.dot?Pf:Of)(i[1]):(i=e.match(Mf))?r=(t.nocase?t.dot?Uf:kf:t.dot?qf:Bf)(i):(i=e.match(xf))?r=t.dot?Nf:Tf:(i=e.match(If))&&(r=_f);let n=Bn.AST.fromGlob(e,this.options).toMMPattern();return r&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:r}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,i=t.noglobstar?zf:t.dot?Hf:Vf,r=new Set(t.nocase?["i"]:[]),n=e.map(l=>{let h=l.map(u=>{if(u instanceof RegExp)for(let f of u.flags.split(""))r.add(f);return typeof u=="string"?Qf(u):u===v.GLOBSTAR?v.GLOBSTAR:u._src});return h.forEach((u,f)=>{let p=h[f+1],d=h[f-1];u!==v.GLOBSTAR||d===v.GLOBSTAR||(d===void 0?p!==void 0&&p!==v.GLOBSTAR?h[f+1]="(?:\\/|"+i+"\\/)?"+p:h[f]=i:p===void 0?h[f-1]=d+"(?:\\/|"+i+")?":p!==v.GLOBSTAR&&(h[f-1]=d+"(?:\\/|\\/"+i+"\\/)"+p,h[f+1]=v.GLOBSTAR))}),h.filter(u=>u!==v.GLOBSTAR).join("/")}).join("|"),[a,c]=e.length>1?["(?:",")"]:["",""];n="^"+a+n+c+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let i=this.options;this.isWindows&&(e=e.split("\\").join("/"));let r=this.slashSplit(e);this.debug(this.pattern,"split",r);let n=this.set;this.debug(this.pattern,"set",n);let a=r[r.length-1];if(!a)for(let c=r.length-2;!a&&c>=0;c--)a=r[c];for(let c=0;c<n.length;c++){let l=n[c],h=r;if(i.matchBase&&l.length===1&&(h=[a]),this.matchOne(h,l,t))return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate}static defaults(e){return v.minimatch.defaults(e).Minimatch}};v.Minimatch=Re;var ed=gi();Object.defineProperty(v,"AST",{enumerable:!0,get:o(function(){return ed.AST},"get")});var td=wi();Object.defineProperty(v,"escape",{enumerable:!0,get:o(function(){return td.escape},"get")});var sd=ss();Object.defineProperty(v,"unescape",{enumerable:!0,get:o(function(){return sd.unescape},"get")});v.minimatch.AST=Bn.AST;v.minimatch.Minimatch=Re;v.minimatch.escape=vf.escape;v.minimatch.unescape=Cf.unescape});var Ai=w(K=>{"use strict";var id=K&&K.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(K,"__esModule",{value:!0});K.Minipass=K.isWritable=K.isReadable=K.isStream=void 0;var Vn=typeof process=="object"&&process?process:{stdout:null,stderr:null},Ci=require("node:events"),Jn=id(require("node:stream")),rd=require("node:string_decoder"),nd=o(s=>!!s&&typeof s=="object"&&(s instanceof ps||s instanceof Jn.default||(0,K.isReadable)(s)||(0,K.isWritable)(s)),"isStream");K.isStream=nd;var od=o(s=>!!s&&typeof s=="object"&&s instanceof Ci.EventEmitter&&typeof s.pipe=="function"&&s.pipe!==Jn.default.Writable.prototype.pipe,"isReadable");K.isReadable=od;var ad=o(s=>!!s&&typeof s=="object"&&s instanceof Ci.EventEmitter&&typeof s.write=="function"&&typeof s.end=="function","isWritable");K.isWritable=ad;var pe=Symbol("EOF"),me=Symbol("maybeEmitEnd"),Ee=Symbol("emittedEnd"),cs=Symbol("emittingEnd"),st=Symbol("emittedError"),ls=Symbol("closed"),Yn=Symbol("read"),hs=Symbol("flush"),Xn=Symbol("flushChunk"),ae=Symbol("encoding"),je=Symbol("decoder"),B=Symbol("flowing"),it=Symbol("paused"),Me=Symbol("resume"),W=Symbol("buffer"),X=Symbol("pipes"),z=Symbol("bufferLength"),yi=Symbol("bufferPush"),us=Symbol("bufferShift"),Y=Symbol("objectMode"),M=Symbol("destroyed"),bi=Symbol("error"),Si=Symbol("emitData"),Kn=Symbol("emitEnd"),Ei=Symbol("emitEnd2"),ue=Symbol("async"),Li=Symbol("abort"),fs=Symbol("aborted"),rt=Symbol("signal"),De=Symbol("dataListeners"),ee=Symbol("discarded"),nt=o(s=>Promise.resolve().then(s),"defer"),cd=o(s=>s(),"nodefer"),ld=o(s=>s==="end"||s==="finish"||s==="prefinish","isEndish"),hd=o(s=>s instanceof ArrayBuffer||!!s&&typeof s=="object"&&s.constructor&&s.constructor.name==="ArrayBuffer"&&s.byteLength>=0,"isArrayBufferLike"),ud=o(s=>!Buffer.isBuffer(s)&&ArrayBuffer.isView(s),"isArrayBufferView"),ds=class{static{o(this,"Pipe")}src;dest;opts;ondrain;constructor(e,t,i){this.src=e,this.dest=t,this.opts=i,this.ondrain=()=>e[Me](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},vi=class extends ds{static{o(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,i){super(e,t,i),this.proxyErrors=r=>t.emit("error",r),e.on("error",this.proxyErrors)}},fd=o(s=>!!s.objectMode,"isObjectModeOptions"),dd=o(s=>!s.objectMode&&!!s.encoding&&s.encoding!=="buffer","isEncodingOptions"),ps=class extends Ci.EventEmitter{static{o(this,"Minipass")}[B]=!1;[it]=!1;[X]=[];[W]=[];[Y];[ae];[ue];[je];[pe]=!1;[Ee]=!1;[cs]=!1;[ls]=!1;[st]=null;[z]=0;[M]=!1;[rt];[fs]=!1;[De]=0;[ee]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");fd(t)?(this[Y]=!0,this[ae]=null):dd(t)?(this[ae]=t.encoding,this[Y]=!1):(this[Y]=!1,this[ae]=null),this[ue]=!!t.async,this[je]=this[ae]?new rd.StringDecoder(this[ae]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:o(()=>this[W],"get")}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:o(()=>this[X],"get")});let{signal:i}=t;i&&(this[rt]=i,i.aborted?this[Li]():i.addEventListener("abort",()=>this[Li]()))}get bufferLength(){return this[z]}get encoding(){return this[ae]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Y]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[ue]}set async(e){this[ue]=this[ue]||!!e}[Li](){this[fs]=!0,this.emit("abort",this[rt]?.reason),this.destroy(this[rt]?.reason)}get aborted(){return this[fs]}set aborted(e){}write(e,t,i){if(this[fs])return!1;if(this[pe])throw new Error("write after end");if(this[M])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(i=t,t="utf8"),t||(t="utf8");let r=this[ue]?nt:cd;if(!this[Y]&&!Buffer.isBuffer(e)){if(ud(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(hd(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Y]?(this[B]&&this[z]!==0&&this[hs](!0),this[B]?this.emit("data",e):this[yi](e),this[z]!==0&&this.emit("readable"),i&&r(i),this[B]):e.length?(typeof e=="string"&&!(t===this[ae]&&!this[je]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[ae]&&(e=this[je].write(e)),this[B]&&this[z]!==0&&this[hs](!0),this[B]?this.emit("data",e):this[yi](e),this[z]!==0&&this.emit("readable"),i&&r(i),this[B]):(this[z]!==0&&this.emit("readable"),i&&r(i),this[B])}read(e){if(this[M])return null;if(this[ee]=!1,this[z]===0||e===0||e&&e>this[z])return this[me](),null;this[Y]&&(e=null),this[W].length>1&&!this[Y]&&(this[W]=[this[ae]?this[W].join(""):Buffer.concat(this[W],this[z])]);let t=this[Yn](e||null,this[W][0]);return this[me](),t}[Yn](e,t){if(this[Y])this[us]();else{let i=t;e===i.length||e===null?this[us]():typeof i=="string"?(this[W][0]=i.slice(e),t=i.slice(0,e),this[z]-=e):(this[W][0]=i.subarray(e),t=i.subarray(0,e),this[z]-=e)}return this.emit("data",t),!this[W].length&&!this[pe]&&this.emit("drain"),t}end(e,t,i){return typeof e=="function"&&(i=e,e=void 0),typeof t=="function"&&(i=t,t="utf8"),e!==void 0&&this.write(e,t),i&&this.once("end",i),this[pe]=!0,this.writable=!1,(this[B]||!this[it])&&this[me](),this}[Me](){this[M]||(!this[De]&&!this[X].length&&(this[ee]=!0),this[it]=!1,this[B]=!0,this.emit("resume"),this[W].length?this[hs]():this[pe]?this[me]():this.emit("drain"))}resume(){return this[Me]()}pause(){this[B]=!1,this[it]=!0,this[ee]=!1}get destroyed(){return this[M]}get flowing(){return this[B]}get paused(){return this[it]}[yi](e){this[Y]?this[z]+=1:this[z]+=e.length,this[W].push(e)}[us](){return this[Y]?this[z]-=1:this[z]-=this[W][0].length,this[W].shift()}[hs](e=!1){do;while(this[Xn](this[us]())&&this[W].length);!e&&!this[W].length&&!this[pe]&&this.emit("drain")}[Xn](e){return this.emit("data",e),this[B]}pipe(e,t){if(this[M])return e;this[ee]=!1;let i=this[Ee];return t=t||{},e===Vn.stdout||e===Vn.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,i?t.end&&e.end():(this[X].push(t.proxyErrors?new vi(this,e,t):new ds(this,e,t)),this[ue]?nt(()=>this[Me]()):this[Me]()),e}unpipe(e){let t=this[X].find(i=>i.dest===e);t&&(this[X].length===1?(this[B]&&this[De]===0&&(this[B]=!1),this[X]=[]):this[X].splice(this[X].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let i=super.on(e,t);if(e==="data")this[ee]=!1,this[De]++,!this[X].length&&!this[B]&&this[Me]();else if(e==="readable"&&this[z]!==0)super.emit("readable");else if(ld(e)&&this[Ee])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[st]){let r=t;this[ue]?nt(()=>r.call(this,this[st])):r.call(this,this[st])}return i}removeListener(e,t){return this.off(e,t)}off(e,t){let i=super.off(e,t);return e==="data"&&(this[De]=this.listeners("data").length,this[De]===0&&!this[ee]&&!this[X].length&&(this[B]=!1)),i}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[De]=0,!this[ee]&&!this[X].length&&(this[B]=!1)),t}get emittedEnd(){return this[Ee]}[me](){!this[cs]&&!this[Ee]&&!this[M]&&this[W].length===0&&this[pe]&&(this[cs]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[ls]&&this.emit("close"),this[cs]=!1)}emit(e,...t){let i=t[0];if(e!=="error"&&e!=="close"&&e!==M&&this[M])return!1;if(e==="data")return!this[Y]&&!i?!1:this[ue]?(nt(()=>this[Si](i)),!0):this[Si](i);if(e==="end")return this[Kn]();if(e==="close"){if(this[ls]=!0,!this[Ee]&&!this[M])return!1;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[st]=i,super.emit(bi,i);let n=!this[rt]||this.listeners("error").length?super.emit("error",i):!1;return this[me](),n}else if(e==="resume"){let n=super.emit("resume");return this[me](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let r=super.emit(e,...t);return this[me](),r}[Si](e){for(let i of this[X])i.dest.write(e)===!1&&this.pause();let t=this[ee]?!1:super.emit("data",e);return this[me](),t}[Kn](){return this[Ee]?!1:(this[Ee]=!0,this.readable=!1,this[ue]?(nt(()=>this[Ei]()),!0):this[Ei]())}[Ei](){if(this[je]){let t=this[je].end();if(t){for(let i of this[X])i.dest.write(t);this[ee]||super.emit("data",t)}}for(let t of this[X])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[Y]||(e.dataLength=0);let t=this.promise();return this.on("data",i=>{e.push(i),this[Y]||(e.dataLength+=i.length)}),await t,e}async concat(){if(this[Y])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[ae]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(M,()=>t(new Error("stream destroyed"))),this.on("error",i=>t(i)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[ee]=!1;let e=!1,t=o(async()=>(this.pause(),e=!0,{value:void 0,done:!0}),"stop");return{next:o(()=>{if(e)return t();let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[pe])return t();let n,a,c=o(f=>{this.off("data",l),this.off("end",h),this.off(M,u),t(),a(f)},"onerr"),l=o(f=>{this.off("error",c),this.off("end",h),this.off(M,u),this.pause(),n({value:f,done:!!this[pe]})},"ondata"),h=o(()=>{this.off("error",c),this.off("data",l),this.off(M,u),t(),n({done:!0,value:void 0})},"onend"),u=o(()=>c(new Error("stream destroyed")),"ondestroy");return new Promise((f,p)=>{a=p,n=f,this.once(M,u),this.once("error",c),this.once("end",h),this.once("data",l)})},"next"),throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[ee]=!1;let e=!1,t=o(()=>(this.pause(),this.off(bi,t),this.off(M,t),this.off("end",t),e=!0,{done:!0,value:void 0}),"stop"),i=o(()=>{if(e)return t();let r=this.read();return r===null?t():{done:!1,value:r}},"next");return this.once("end",t),this.once(bi,t),this.once(M,t),{next:i,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[M])return e?this.emit("error",e):this.emit(M),this;this[M]=!0,this[ee]=!0,this[W].length=0,this[z]=0;let t=this;return typeof t.close=="function"&&!this[ls]&&t.close(),e?this.emit("error",e):this.emit(M),this}static get isStream(){return K.isStream}};K.Minipass=ps});var fo=w(T=>{"use strict";var pd=T&&T.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),md=T&&T.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),gd=T&&T.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&pd(e,s,t);return md(e,s),e};Object.defineProperty(T,"__esModule",{value:!0});T.PathScurry=T.Path=T.PathScurryDarwin=T.PathScurryPosix=T.PathScurryWin32=T.PathScurryBase=T.PathPosix=T.PathWin32=T.PathBase=T.ChildrenCache=T.ResolveCache=void 0;var io=oi(),bs=require("node:path"),wd=require("node:url"),at=require("fs"),yd=gd(require("node:fs")),bd=at.realpathSync.native,ms=require("node:fs/promises"),Zn=Ai(),ct={lstatSync:at.lstatSync,readdir:at.readdir,readdirSync:at.readdirSync,readlinkSync:at.readlinkSync,realpathSync:bd,promises:{lstat:ms.lstat,readdir:ms.readdir,readlink:ms.readlink,realpath:ms.realpath}},ro=o(s=>!s||s===ct||s===yd?ct:{...ct,...s,promises:{...ct.promises,...s.promises||{}}},"fsFromOption"),no=/^\\\\\?\\([a-z]:)\\?$/i,Sd=o(s=>s.replace(/\//g,"\\").replace(no,"$1\\"),"uncToDrive"),Ed=/[\\\/]/,ie=0,oo=1,ao=2,fe=4,co=6,lo=8,xe=10,ho=12,se=15,ot=~se,$i=16,Qn=32,lt=64,ce=128,gs=256,ys=512,eo=lt|ce|ys,Ld=1023,Oi=o(s=>s.isFile()?lo:s.isDirectory()?fe:s.isSymbolicLink()?xe:s.isCharacterDevice()?ao:s.isBlockDevice()?co:s.isSocket()?ho:s.isFIFO()?oo:ie,"entToType"),to=new Map,ht=o(s=>{let e=to.get(s);if(e)return e;let t=s.normalize("NFKD");return to.set(s,t),t},"normalize"),so=new Map,ws=o(s=>{let e=so.get(s);if(e)return e;let t=ht(s.toLowerCase());return so.set(s,t),t},"normalizeNocase"),ut=class extends io.LRUCache{static{o(this,"ResolveCache")}constructor(){super({max:256})}};T.ResolveCache=ut;var Ss=class extends io.LRUCache{static{o(this,"ChildrenCache")}constructor(e=16*1024){super({maxSize:e,sizeCalculation:o(t=>t.length+1,"sizeCalculation")})}};T.ChildrenCache=Ss;var uo=Symbol("PathScurry setAsCwd"),H=class{static{o(this,"PathBase")}name;root;roots;parent;nocase;isCWD=!1;#e;#s;get dev(){return this.#s}#t;get mode(){return this.#t}#n;get nlink(){return this.#n}#c;get uid(){return this.#c}#O;get gid(){return this.#O}#u;get rdev(){return this.#u}#p;get blksize(){return this.#p}#a;get ino(){return this.#a}#l;get size(){return this.#l}#i;get blocks(){return this.#i}#h;get atimeMs(){return this.#h}#r;get mtimeMs(){return this.#r}#m;get ctimeMs(){return this.#m}#g;get birthtimeMs(){return this.#g}#S;get atime(){return this.#S}#f;get mtime(){return this.#f}#$;get ctime(){return this.#$}#b;get birthtime(){return this.#b}#E;#C;#L;#y;#D;#v;#o;#F;#A;#R;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=ie,i,r,n,a,c){this.name=e,this.#E=n?ws(e):ht(e),this.#o=t&Ld,this.nocase=n,this.roots=r,this.root=i||this,this.#F=a,this.#L=c.fullpath,this.#D=c.relative,this.#v=c.relativePosix,this.parent=c.parent,this.parent?this.#e=this.parent.#e:this.#e=ro(c.fs)}depth(){return this.#C!==void 0?this.#C:this.parent?this.#C=this.parent.depth()+1:this.#C=0}childrenCache(){return this.#F}resolve(e){if(!e)return this;let t=this.getRootString(e),r=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#G(r):this.#G(r)}#G(e){let t=this;for(let i of e)t=t.child(i);return t}children(){let e=this.#F.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#F.set(this,t),this.#o&=~$i,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let i=this.children(),r=this.nocase?ws(e):ht(e);for(let l of i)if(l.#E===r)return l;let n=this.parent?this.sep:"",a=this.#L?this.#L+n+e:void 0,c=this.newChild(e,ie,{...t,parent:this,fullpath:a});return this.canReaddir()||(c.#o|=ce),i.push(c),c}relative(){if(this.isCWD)return"";if(this.#D!==void 0)return this.#D;let e=this.name,t=this.parent;if(!t)return this.#D=this.name;let i=t.relative();return i+(!i||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#v!==void 0)return this.#v;let e=this.name,t=this.parent;if(!t)return this.#v=this.fullpathPosix();let i=t.relativePosix();return i+(!i||!t.parent?"":"/")+e}fullpath(){if(this.#L!==void 0)return this.#L;let e=this.name,t=this.parent;if(!t)return this.#L=this.name;let r=t.fullpath()+(t.parent?this.sep:"")+e;return this.#L=r}fullpathPosix(){if(this.#y!==void 0)return this.#y;if(this.sep==="/")return this.#y=this.fullpath();if(!this.parent){let r=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(r)?this.#y=`//?/${r}`:this.#y=r}let e=this.parent,t=e.fullpathPosix(),i=t+(!t||!e.parent?"":"/")+this.name;return this.#y=i}isUnknown(){return(this.#o&se)===ie}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#o&se)===lo}isDirectory(){return(this.#o&se)===fe}isCharacterDevice(){return(this.#o&se)===ao}isBlockDevice(){return(this.#o&se)===co}isFIFO(){return(this.#o&se)===oo}isSocket(){return(this.#o&se)===ho}isSymbolicLink(){return(this.#o&xe)===xe}lstatCached(){return this.#o&Qn?this:void 0}readlinkCached(){return this.#A}realpathCached(){return this.#R}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#A)return!0;if(!this.parent)return!1;let e=this.#o&se;return!(e!==ie&&e!==xe||this.#o&gs||this.#o&ce)}calledReaddir(){return!!(this.#o&$i)}isENOENT(){return!!(this.#o&ce)}isNamed(e){return this.nocase?this.#E===ws(e):this.#E===ht(e)}async readlink(){let e=this.#A;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=await this.#e.promises.readlink(this.fullpath()),i=(await this.parent.realpath())?.resolve(t);if(i)return this.#A=i}catch(t){this.#w(t.code);return}}readlinkSync(){let e=this.#A;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=this.#e.readlinkSync(this.fullpath()),i=this.parent.realpathSync()?.resolve(t);if(i)return this.#A=i}catch(t){this.#w(t.code);return}}#P(e){this.#o|=$i;for(let t=e.provisional;t<e.length;t++){let i=e[t];i&&i.#U()}}#U(){this.#o&ce||(this.#o=(this.#o|ce)&ot,this.#x())}#x(){let e=this.children();e.provisional=0;for(let t of e)t.#U()}#N(){this.#o|=ys,this.#j()}#j(){if(this.#o&lt)return;let e=this.#o;(e&se)===fe&&(e&=ot),this.#o=e|lt,this.#x()}#T(e=""){e==="ENOTDIR"||e==="EPERM"?this.#j():e==="ENOENT"?this.#U():this.children().provisional=0}#I(e=""){e==="ENOTDIR"?this.parent.#j():e==="ENOENT"&&this.#U()}#w(e=""){let t=this.#o;t|=gs,e==="ENOENT"&&(t|=ce),(e==="EINVAL"||e==="UNKNOWN")&&(t&=ot),this.#o=t,e==="ENOTDIR"&&this.parent&&this.parent.#j()}#M(e,t){return this.#d(e,t)||this.#k(e,t)}#k(e,t){let i=Oi(e),r=this.newChild(e.name,i,{parent:this}),n=r.#o&se;return n!==fe&&n!==xe&&n!==ie&&(r.#o|=lt),t.unshift(r),t.provisional++,r}#d(e,t){for(let i=t.provisional;i<t.length;i++){let r=t[i];if((this.nocase?ws(e.name):ht(e.name))===r.#E)return this.#q(e,r,i,t)}}#q(e,t,i,r){let n=t.name;return t.#o=t.#o&ot|Oi(e),n!==e.name&&(t.name=e.name),i!==r.provisional&&(i===r.length-1?r.pop():r.splice(i,1),r.unshift(t)),r.provisional++,t}async lstat(){if((this.#o&ce)===0)try{return this.#B(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#I(e.code)}}lstatSync(){if((this.#o&ce)===0)try{return this.#B(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#I(e.code)}}#B(e){let{atime:t,atimeMs:i,birthtime:r,birthtimeMs:n,blksize:a,blocks:c,ctime:l,ctimeMs:h,dev:u,gid:f,ino:p,mode:d,mtime:g,mtimeMs:m,nlink:b,rdev:y,size:C,uid:A}=e;this.#S=t,this.#h=i,this.#b=r,this.#g=n,this.#p=a,this.#i=c,this.#$=l,this.#m=h,this.#s=u,this.#O=f,this.#a=p,this.#t=d,this.#f=g,this.#r=m,this.#n=b,this.#u=y,this.#l=C,this.#c=A;let S=Oi(e);this.#o=this.#o&ot|S|Qn,S!==ie&&S!==fe&&S!==xe&&(this.#o|=lt)}#_=[];#W=!1;#H(e){this.#W=!1;let t=this.#_.slice();this.#_.length=0,t.forEach(i=>i(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let i=this.children();if(this.calledReaddir()){let n=i.slice(0,i.provisional);t?e(null,n):queueMicrotask(()=>e(null,n));return}if(this.#_.push(e),this.#W)return;this.#W=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(n,a)=>{if(n)this.#T(n.code),i.provisional=0;else{for(let c of a)this.#M(c,i);this.#P(i)}this.#H(i.slice(0,i.provisional))})}#z;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#z)await this.#z;else{let i=o(()=>{},"resolve");this.#z=new Promise(r=>i=r);try{for(let r of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#M(r,e);this.#P(e)}catch(r){this.#T(r.code),e.provisional=0}this.#z=void 0,i()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let i of this.#e.readdirSync(t,{withFileTypes:!0}))this.#M(i,e);this.#P(e)}catch(i){this.#T(i.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#o&eo)return!1;let e=se&this.#o;return e===ie||e===fe||e===xe}shouldWalk(e,t){return(this.#o&fe)===fe&&!(this.#o&eo)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#R)return this.#R;if(!((ys|gs|ce)&this.#o))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#R=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#R)return this.#R;if(!((ys|gs|ce)&this.#o))try{let e=this.#e.realpathSync(this.fullpath());return this.#R=this.resolve(e)}catch{this.#N()}}[uo](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),i=[],r=this;for(;r&&r.parent;)t.add(r),r.#D=i.join(this.sep),r.#v=i.join("/"),r=r.parent,i.push("..");for(r=e;r&&r.parent&&!t.has(r);)r.#D=void 0,r.#v=void 0,r=r.parent}};T.PathBase=H;var ft=class s extends H{static{o(this,"PathWin32")}sep="\\";splitSep=Ed;constructor(e,t=ie,i,r,n,a,c){super(e,t,i,r,n,a,c)}newChild(e,t=ie,i={}){return new s(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}getRootString(e){return bs.win32.parse(e).root}getRoot(e){if(e=Sd(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,i]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=i;return this.roots[e]=new mt(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(no,"$1\\"),e===t}};T.PathWin32=ft;var dt=class s extends H{static{o(this,"PathPosix")}splitSep="/";sep="/";constructor(e,t=ie,i,r,n,a,c){super(e,t,i,r,n,a,c)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=ie,i={}){return new s(e,t,this.root,this.roots,this.nocase,this.childrenCache(),i)}};T.PathPosix=dt;var pt=class{static{o(this,"PathScurryBase")}root;rootPath;roots;cwd;#e;#s;#t;nocase;#n;constructor(e=process.cwd(),t,i,{nocase:r,childrenCacheSize:n=16*1024,fs:a=ct}={}){this.#n=ro(a),(e instanceof URL||e.startsWith("file://"))&&(e=(0,wd.fileURLToPath)(e));let c=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(c),this.#e=new ut,this.#s=new ut,this.#t=new Ss(n);let l=c.substring(this.rootPath.length).split(i);if(l.length===1&&!l[0]&&l.pop(),r===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=r,this.root=this.newRoot(this.#n),this.roots[this.rootPath]=this.root;let h=this.root,u=l.length-1,f=t.sep,p=this.rootPath,d=!1;for(let g of l){let m=u--;h=h.child(g,{relative:new Array(m).fill("..").join(f),relativePosix:new Array(m).fill("..").join("/"),fullpath:p+=(d?"":f)+g}),d=!0}this.cwd=h}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#t}resolve(...e){let t="";for(let n=e.length-1;n>=0;n--){let a=e[n];if(!(!a||a===".")&&(t=t?`${a}/${t}`:a,this.isAbsolute(a)))break}let i=this.#e.get(t);if(i!==void 0)return i;let r=this.cwd.resolve(t).fullpath();return this.#e.set(t,r),r}resolvePosix(...e){let t="";for(let n=e.length-1;n>=0;n--){let a=e[n];if(!(!a||a===".")&&(t=t?`${a}/${t}`:a,this.isAbsolute(a)))break}let i=this.#s.get(t);if(i!==void 0)return i;let r=this.cwd.resolve(t).fullpathPosix();return this.#s.set(t,r),r}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i}=t;if(e.canReaddir()){let r=await e.readdir();return i?r:r.map(n=>n.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0}=t;return e.canReaddir()?i?e.readdirSync():e.readdirSync().map(r=>r.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e.withFileTypes,e=this.cwd);let i=await e.readlink();return t?i:i?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e.withFileTypes,e=this.cwd);let i=e.readlinkSync();return t?i:i?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e.withFileTypes,e=this.cwd);let i=await e.realpath();return t?i:i?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e.withFileTypes,e=this.cwd);let i=e.realpathSync();return t?i:i?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:a}=t,c=[];(!n||n(e))&&c.push(i?e:e.fullpath());let l=new Set,h=o((f,p)=>{l.add(f),f.readdirCB((d,g)=>{if(d)return p(d);let m=g.length;if(!m)return p();let b=o(()=>{--m===0&&p()},"next");for(let y of g)(!n||n(y))&&c.push(i?y:y.fullpath()),r&&y.isSymbolicLink()?y.realpath().then(C=>C?.isUnknown()?C.lstat():C).then(C=>C?.shouldWalk(l,a)?h(C,b):b()):y.shouldWalk(l,a)?h(y,b):b()},!0)},"walk"),u=e;return new Promise((f,p)=>{h(u,d=>{if(d)return p(d);f(c)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:a}=t,c=[];(!n||n(e))&&c.push(i?e:e.fullpath());let l=new Set([e]);for(let h of l){let u=h.readdirSync();for(let f of u){(!n||n(f))&&c.push(i?f:f.fullpath());let p=f;if(f.isSymbolicLink()){if(!(r&&(p=f.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(l,a)&&l.add(p)}}return c}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:a}=t;(!n||n(e))&&(yield i?e:e.fullpath());let c=new Set([e]);for(let l of c){let h=l.readdirSync();for(let u of h){(!n||n(u))&&(yield i?u:u.fullpath());let f=u;if(u.isSymbolicLink()){if(!(r&&(f=u.realpathSync())))continue;f.isUnknown()&&f.lstatSync()}f.shouldWalk(c,a)&&c.add(f)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:a}=t,c=new Zn.Minipass({objectMode:!0});(!n||n(e))&&c.write(i?e:e.fullpath());let l=new Set,h=[e],u=0,f=o(()=>{let p=!1;for(;!p;){let d=h.shift();if(!d){u===0&&c.end();return}u++,l.add(d);let g=o((b,y,C=!1)=>{if(b)return c.emit("error",b);if(r&&!C){let A=[];for(let S of y)S.isSymbolicLink()&&A.push(S.realpath().then(O=>O?.isUnknown()?O.lstat():O));if(A.length){Promise.all(A).then(()=>g(null,y,!0));return}}for(let A of y)A&&(!n||n(A))&&(c.write(i?A:A.fullpath())||(p=!0));u--;for(let A of y){let S=A.realpathCached()||A;S.shouldWalk(l,a)&&h.push(S)}p&&!c.flowing?c.once("drain",f):m||f()},"onReaddir"),m=!0;d.readdirCB(g,!0),m=!1}},"process");return f(),c}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof H||(t=e,e=this.cwd);let{withFileTypes:i=!0,follow:r=!1,filter:n,walkFilter:a}=t,c=new Zn.Minipass({objectMode:!0}),l=new Set;(!n||n(e))&&c.write(i?e:e.fullpath());let h=[e],u=0,f=o(()=>{let p=!1;for(;!p;){let d=h.shift();if(!d){u===0&&c.end();return}u++,l.add(d);let g=d.readdirSync();for(let m of g)(!n||n(m))&&(c.write(i?m:m.fullpath())||(p=!0));u--;for(let m of g){let b=m;if(m.isSymbolicLink()){if(!(r&&(b=m.realpathSync())))continue;b.isUnknown()&&b.lstatSync()}b.shouldWalk(l,a)&&h.push(b)}}p&&!c.flowing&&c.once("drain",f)},"process");return f(),c}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[uo](t)}};T.PathScurryBase=pt;var mt=class extends pt{static{o(this,"PathScurryWin32")}sep="\\";constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,bs.win32,"\\",{...t,nocase:i}),this.nocase=i;for(let r=this.cwd;r;r=r.parent)r.nocase=this.nocase}parseRootPath(e){return bs.win32.parse(e).root.toUpperCase()}newRoot(e){return new ft(this.rootPath,fe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}};T.PathScurryWin32=mt;var gt=class extends pt{static{o(this,"PathScurryPosix")}sep="/";constructor(e=process.cwd(),t={}){let{nocase:i=!1}=t;super(e,bs.posix,"/",{...t,nocase:i}),this.nocase=i}parseRootPath(e){return"/"}newRoot(e){return new dt(this.rootPath,fe,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}};T.PathScurryPosix=gt;var Es=class extends gt{static{o(this,"PathScurryDarwin")}constructor(e=process.cwd(),t={}){let{nocase:i=!0}=t;super(e,{...t,nocase:i})}};T.PathScurryDarwin=Es;T.Path=process.platform==="win32"?ft:dt;T.PathScurry=process.platform==="win32"?mt:process.platform==="darwin"?Es:gt});var Ri=w(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});Ls.Pattern=void 0;var vd=Se(),Cd=o(s=>s.length>=1,"isPatternList"),Ad=o(s=>s.length>=1,"isGlobList"),Pi=class s{static{o(this,"Pattern")}#e;#s;#t;length;#n;#c;#O;#u;#p;#a;#l=!0;constructor(e,t,i,r){if(!Cd(e))throw new TypeError("empty pattern list");if(!Ad(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,i<0||i>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#s=t,this.#t=i,this.#n=r,this.#t===0){if(this.isUNC()){let[n,a,c,l,...h]=this.#e,[u,f,p,d,...g]=this.#s;h[0]===""&&(h.shift(),g.shift());let m=[n,a,c,l,""].join("/"),b=[u,f,p,d,""].join("/");this.#e=[m,...h],this.#s=[b,...g],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[n,...a]=this.#e,[c,...l]=this.#s;a[0]===""&&(a.shift(),l.shift());let h=n+"/",u=c+"/";this.#e=[h,...a],this.#s=[u,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#t]}isString(){return typeof this.#e[this.#t]=="string"}isGlobstar(){return this.#e[this.#t]===vd.GLOBSTAR}isRegExp(){return this.#e[this.#t]instanceof RegExp}globString(){return this.#O=this.#O||(this.#t===0?this.isAbsolute()?this.#s[0]+this.#s.slice(1).join("/"):this.#s.join("/"):this.#s.slice(this.#t).join("/"))}hasMore(){return this.length>this.#t+1}rest(){return this.#c!==void 0?this.#c:this.hasMore()?(this.#c=new s(this.#e,this.#s,this.#t+1,this.#n),this.#c.#a=this.#a,this.#c.#p=this.#p,this.#c.#u=this.#u,this.#c):this.#c=null}isUNC(){let e=this.#e;return this.#p!==void 0?this.#p:this.#p=this.#n==="win32"&&this.#t===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#u!==void 0?this.#u:this.#u=this.#n==="win32"&&this.#t===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#t===0?e:""}checkFollowGlobstar(){return!(this.#t===0||!this.isGlobstar()||!this.#l)}markFollowGlobstar(){return this.#t===0||!this.isGlobstar()||!this.#l?!1:(this.#l=!1,!0)}};Ls.Pattern=Pi});var xi=w(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.Ignore=void 0;var po=Se(),$d=Ri(),Od=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Di=class{static{o(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:i,noext:r,noglobstar:n,platform:a=Od}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:t,nocase:i,noext:r,noglobstar:n,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let c of e)this.add(c)}add(e){let t=new po.Minimatch(e,this.mmopts);for(let i=0;i<t.set.length;i++){let r=t.set[i],n=t.globParts[i];if(!r||!n)throw new Error("invalid pattern object");for(;r[0]==="."&&n[0]===".";)r.shift(),n.shift();let a=new $d.Pattern(r,n,0,this.platform),c=new po.Minimatch(a.globString(),this.mmopts),l=n[n.length-1]==="**",h=a.isAbsolute();h?this.absolute.push(c):this.relative.push(c),l&&(h?this.absoluteChildren.push(c):this.relativeChildren.push(c))}}ignored(e){let t=e.fullpath(),i=`${t}/`,r=e.relative()||".",n=`${r}/`;for(let a of this.relative)if(a.match(r)||a.match(n))return!0;for(let a of this.absolute)if(a.match(t)||a.match(i))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",i=(e.relative()||".")+"/";for(let r of this.relativeChildren)if(r.match(i))return!0;for(let r of this.absoluteChildren)if(r.match(t))return!0;return!1}};vs.Ignore=Di});var go=w(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.Processor=de.SubWalks=de.MatchRecord=de.HasWalkedCache=void 0;var mo=Se(),Cs=class s{static{o(this,"HasWalkedCache")}store;constructor(e=new Map){this.store=e}copy(){return new s(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let i=e.fullpath(),r=this.store.get(i);r?r.add(t.globString()):this.store.set(i,new Set([t.globString()]))}};de.HasWalkedCache=Cs;var As=class{static{o(this,"MatchRecord")}store=new Map;add(e,t,i){let r=(t?2:0)|(i?1:0),n=this.store.get(e);this.store.set(e,n===void 0?r:r&n)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}};de.MatchRecord=As;var $s=class{static{o(this,"SubWalks")}store=new Map;add(e,t){if(!e.canReaddir())return;let i=this.store.get(e);i?i.find(r=>r.globString()===t.globString())||i.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}};de.SubWalks=$s;var Ti=class s{static{o(this,"Processor")}hasWalkedCache;matches=new As;subwalks=new $s;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new Cs}processPatterns(e,t){this.patterns=t;let i=t.map(r=>[e,r]);for(let[r,n]of i){this.hasWalkedCache.storeWalked(r,n);let a=n.root(),c=n.isAbsolute()&&this.opts.absolute!==!1;if(a){r=r.resolve(a==="/"&&this.opts.root!==void 0?this.opts.root:a);let f=n.rest();if(f)n=f;else{this.matches.add(r,!0,!1);continue}}if(r.isENOENT())continue;let l,h,u=!1;for(;typeof(l=n.pattern())=="string"&&(h=n.rest());)r=r.resolve(l),n=h,u=!0;if(l=n.pattern(),h=n.rest(),u){if(this.hasWalkedCache.hasWalked(r,n))continue;this.hasWalkedCache.storeWalked(r,n)}if(typeof l=="string"){let f=l===".."||l===""||l===".";this.matches.add(r.resolve(l),c,f);continue}else if(l===mo.GLOBSTAR){(!r.isSymbolicLink()||this.follow||n.checkFollowGlobstar())&&this.subwalks.add(r,n);let f=h?.pattern(),p=h?.rest();if(!h||(f===""||f===".")&&!p)this.matches.add(r,c,f===""||f===".");else if(f===".."){let d=r.parent||r;p?this.hasWalkedCache.hasWalked(d,p)||this.subwalks.add(d,p):this.matches.add(d,c,!0)}}else l instanceof RegExp&&this.subwalks.add(r,n)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new s(this.opts,this.hasWalkedCache)}filterEntries(e,t){let i=this.subwalks.get(e),r=this.child();for(let n of t)for(let a of i){let c=a.isAbsolute(),l=a.pattern(),h=a.rest();l===mo.GLOBSTAR?r.testGlobstar(n,a,h,c):l instanceof RegExp?r.testRegExp(n,l,h,c):r.testString(n,l,h,c)}return r}testGlobstar(e,t,i,r){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(i&&t.checkFollowGlobstar()?this.subwalks.add(e,i):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),i){let n=i.pattern();if(typeof n=="string"&&n!==".."&&n!==""&&n!==".")this.testString(e,n,i.rest(),r);else if(n===".."){let a=e.parent||e;this.subwalks.add(a,i)}else n instanceof RegExp&&this.testRegExp(e,n,i.rest(),r)}}testRegExp(e,t,i,r){t.test(e.name)&&(i?this.subwalks.add(e,i):this.matches.add(e,r,!1))}testString(e,t,i,r){e.isNamed(t)&&(i?this.subwalks.add(e,i):this.matches.add(e,r,!1))}};de.Processor=Ti});var bo=w(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.GlobStream=Le.GlobWalker=Le.GlobUtil=void 0;var Pd=Ai(),wo=xi(),yo=go(),Rd=o((s,e)=>typeof s=="string"?new wo.Ignore([s],e):Array.isArray(s)?new wo.Ignore(s,e):s,"makeIgnore"),wt=class{static{o(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#s;#t;signal;maxDepth;includeChildMatches;constructor(e,t,i){if(this.patterns=e,this.path=t,this.opts=i,this.#t=!i.posix&&i.platform==="win32"?"\\":"/",this.includeChildMatches=i.includeChildMatches!==!1,(i.ignore||!this.includeChildMatches)&&(this.#s=Rd(i.ignore??[],i),!this.includeChildMatches&&typeof this.#s.add!="function")){let r="cannot ignore child matches, ignore lacks add() method.";throw new Error(r)}this.maxDepth=i.maxDepth||1/0,i.signal&&(this.signal=i.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#n(e){return this.seen.has(e)||!!this.#s?.ignored?.(e)}#c(e){return!!this.#s?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||await e.realpath(),!i)return;e=i}let n=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){let a=await n.realpath();a&&(a.isUnknown()||this.opts.stat)&&await a.lstat()}return this.matchCheckTest(n,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#n(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let i;if(this.opts.realpath){if(i=e.realpathCached()||e.realpathSync(),!i)return;e=i}let n=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&n?.isSymbolicLink()){let a=n.realpathSync();a&&(a?.isUnknown()||this.opts.stat)&&a.lstatSync()}return this.matchCheckTest(n,t)}matchFinish(e,t){if(this.#n(e))return;if(!this.includeChildMatches&&this.#s?.add){let n=`${e.relativePosix()}/**`;this.#s.add(n)}let i=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#t:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(i){let n=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(n+r)}else{let n=this.opts.posix?e.relativePosix():e.relative(),a=this.opts.dotRelative&&!n.startsWith(".."+this.#t)?"."+this.#t:"";this.matchEmit(n?a+n+r:"."+r)}}async match(e,t,i){let r=await this.matchCheck(e,i);r&&this.matchFinish(r,t)}matchSync(e,t,i){let r=this.matchCheckSync(e,i);r&&this.matchFinish(r,t)}walkCB(e,t,i){this.signal?.aborted&&i(),this.walkCB2(e,t,new yo.Processor(this.opts),i)}walkCB2(e,t,i,r){if(this.#c(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,i,r));return}i.processPatterns(e,t);let n=1,a=o(()=>{--n===0&&r()},"next");for(let[c,l,h]of i.matches.entries())this.#n(c)||(n++,this.match(c,l,h).then(()=>a()));for(let c of i.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;n++;let l=c.readdirCached();c.calledReaddir()?this.walkCB3(c,l,i,a):c.readdirCB((h,u)=>this.walkCB3(c,u,i,a),!0)}a()}walkCB3(e,t,i,r){i=i.filterEntries(e,t);let n=1,a=o(()=>{--n===0&&r()},"next");for(let[c,l,h]of i.matches.entries())this.#n(c)||(n++,this.match(c,l,h).then(()=>a()));for(let[c,l]of i.subwalks.entries())n++,this.walkCB2(c,l,i.child(),a);a()}walkCBSync(e,t,i){this.signal?.aborted&&i(),this.walkCB2Sync(e,t,new yo.Processor(this.opts),i)}walkCB2Sync(e,t,i,r){if(this.#c(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,i,r));return}i.processPatterns(e,t);let n=1,a=o(()=>{--n===0&&r()},"next");for(let[c,l,h]of i.matches.entries())this.#n(c)||this.matchSync(c,l,h);for(let c of i.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;n++;let l=c.readdirSync();this.walkCB3Sync(c,l,i,a)}a()}walkCB3Sync(e,t,i,r){i=i.filterEntries(e,t);let n=1,a=o(()=>{--n===0&&r()},"next");for(let[c,l,h]of i.matches.entries())this.#n(c)||this.matchSync(c,l,h);for(let[c,l]of i.subwalks.entries())n++,this.walkCB2Sync(c,l,i.child(),a);a()}};Le.GlobUtil=wt;var Ni=class extends wt{static{o(this,"GlobWalker")}matches=new Set;constructor(e,t,i){super(e,t,i)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};Le.GlobWalker=Ni;var Ii=class extends wt{static{o(this,"GlobStream")}results;constructor(e,t,i){super(e,t,i),this.results=new Pd.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};Le.GlobStream=Ii});var Fi=w(Rs=>{"use strict";Object.defineProperty(Rs,"__esModule",{value:!0});Rs.Glob=void 0;var Dd=Se(),xd=require("node:url"),Os=fo(),Td=Ri(),Ps=bo(),Nd=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",_i=class{static{o(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,xd.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=t.platform||Nd,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=t.platform==="win32"?Os.PathScurryWin32:t.platform==="darwin"?Os.PathScurryDarwin:t.platform?Os.PathScurryPosix:Os.PathScurry;this.scurry=new l(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let i=this.platform==="darwin"||this.platform==="win32",r={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:i,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},n=this.pattern.map(l=>new Dd.Minimatch(l,r)),[a,c]=n.reduce((l,h)=>(l[0].push(...h.set),l[1].push(...h.globParts),l),[[],[]]);this.patterns=a.map((l,h)=>{let u=c[h];if(!u)throw new Error("invalid pattern object");return new Td.Pattern(l,u,0,this.platform)})}async walk(){return[...await new Ps.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Ps.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Ps.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Ps.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};Rs.Glob=_i});var Gi=w(Ds=>{"use strict";Object.defineProperty(Ds,"__esModule",{value:!0});Ds.hasMagic=void 0;var Id=Se(),_d=o((s,e={})=>{Array.isArray(s)||(s=[s]);for(let t of s)if(new Id.Minimatch(t,e).hasMagic())return!0;return!1},"hasMagic");Ds.hasMagic=_d});var vo=w(R=>{"use strict";Object.defineProperty(R,"__esModule",{value:!0});R.glob=R.sync=R.iterate=R.iterateSync=R.stream=R.streamSync=R.Ignore=R.hasMagic=R.Glob=R.unescape=R.escape=void 0;R.globStreamSync=yt;R.globStream=ji;R.globSync=Mi;R.globIterateSync=bt;R.globIterate=ki;var So=Se(),Te=Fi(),Fd=Gi(),Lo=Se();Object.defineProperty(R,"escape",{enumerable:!0,get:o(function(){return Lo.escape},"get")});Object.defineProperty(R,"unescape",{enumerable:!0,get:o(function(){return Lo.unescape},"get")});var Gd=Fi();Object.defineProperty(R,"Glob",{enumerable:!0,get:o(function(){return Gd.Glob},"get")});var jd=Gi();Object.defineProperty(R,"hasMagic",{enumerable:!0,get:o(function(){return jd.hasMagic},"get")});var Md=xi();Object.defineProperty(R,"Ignore",{enumerable:!0,get:o(function(){return Md.Ignore},"get")});function yt(s,e={}){return new Te.Glob(s,e).streamSync()}o(yt,"globStreamSync");function ji(s,e={}){return new Te.Glob(s,e).stream()}o(ji,"globStream");function Mi(s,e={}){return new Te.Glob(s,e).walkSync()}o(Mi,"globSync");async function Eo(s,e={}){return new Te.Glob(s,e).walk()}o(Eo,"glob_");function bt(s,e={}){return new Te.Glob(s,e).iterateSync()}o(bt,"globIterateSync");function ki(s,e={}){return new Te.Glob(s,e).iterate()}o(ki,"globIterate");R.streamSync=yt;R.stream=Object.assign(ji,{sync:yt});R.iterateSync=bt;R.iterate=Object.assign(ki,{sync:bt});R.sync=Object.assign(Mi,{stream:yt,iterate:bt});R.glob=Object.assign(Eo,{glob:Eo,globSync:Mi,sync:R.sync,globStream:ji,stream:R.stream,globStreamSync:yt,streamSync:R.streamSync,globIterate:ki,iterate:R.iterate,globIterateSync:bt,iterateSync:R.iterateSync,Glob:Te.Glob,hasMagic:Fd.hasMagic,escape:So.escape,unescape:So.unescape});R.glob.glob=R.glob});var Ui=w((ZS,kd)=>{kd.exports=["0BSD","3D-Slicer-1.0","AAL","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AGPL-1.0-only","AGPL-1.0-or-later","AGPL-3.0-only","AGPL-3.0-or-later","AMD-newlib","AMDPLPA","AML","AML-glslang","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","ASWF-Digital-Assets-1.0","ASWF-Digital-Assets-1.1","Abstyles","AdaCore-doc","Adobe-2006","Adobe-Display-PostScript","Adobe-Glyph","Adobe-Utopia","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","App-s2p","Arphic-1999","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","Artistic-dist","Aspell-RU","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","BSD-2-Clause-pkgconf-disclaimer","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-HP","BSD-3-Clause-LBNL","BSD-3-Clause-Modification","BSD-3-Clause-No-Military-License","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-Open-MPI","BSD-3-Clause-Sun","BSD-3-Clause-acpica","BSD-3-Clause-flex","BSD-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-4.3RENO","BSD-4.3TAHOE","BSD-Advertising-Acknowledgement","BSD-Attribution-HPND-disclaimer","BSD-Inferno-Nettverk","BSD-Protection","BSD-Source-Code","BSD-Source-beginning-file","BSD-Systemics","BSD-Systemics-W3Works","BSL-1.0","BUSL-1.1","Baekmuk","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Bitstream-Charter","Bitstream-Vera","BlueOak-1.0.0","Boehm-GC","Boehm-GC-without-fee","Borceux","Brian-Gladman-2-Clause","Brian-Gladman-3-Clause","C-UDA-1.0","CAL-1.0","CAL-1.0-Combined-Work-Exception","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-2.5-AU","CC-BY-3.0","CC-BY-3.0-AT","CC-BY-3.0-AU","CC-BY-3.0-DE","CC-BY-3.0-IGO","CC-BY-3.0-NL","CC-BY-3.0-US","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-3.0-DE","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-3.0-DE","CC-BY-NC-ND-3.0-IGO","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.0-DE","CC-BY-NC-SA-2.0-FR","CC-BY-NC-SA-2.0-UK","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-3.0-DE","CC-BY-NC-SA-3.0-IGO","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-3.0-DE","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.0-UK","CC-BY-SA-2.1-JP","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-3.0-AT","CC-BY-SA-3.0-DE","CC-BY-SA-3.0-IGO","CC-BY-SA-4.0","CC-PDDC","CC-PDM-1.0","CC-SA-1.0","CC0-1.0","CDDL-1.0","CDDL-1.1","CDL-1.0","CDLA-Permissive-1.0","CDLA-Permissive-2.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","CERN-OHL-1.1","CERN-OHL-1.2","CERN-OHL-P-2.0","CERN-OHL-S-2.0","CERN-OHL-W-2.0","CFITSIO","CMU-Mach","CMU-Mach-nodoc","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","COIL-1.0","CPAL-1.0","CPL-1.0","CPOL-1.02","CUA-OPL-1.0","Caldera","Caldera-no-preamble","Catharon","ClArtistic","Clips","Community-Spec-1.0","Condor-1.1","Cornell-Lossless-JPEG","Cronyx","Crossword","CryptoSwift","CrystalStacker","Cube","D-FSL-1.0","DEC-3-Clause","DL-DE-BY-2.0","DL-DE-ZERO-2.0","DOC","DRL-1.0","DRL-1.1","DSDP","DocBook-DTD","DocBook-Schema","DocBook-Stylesheet","DocBook-XML","Dotseqn","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","EPICS","EPL-1.0","EPL-2.0","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Elastic-2.0","Entessa","ErlPL-1.1","Eurosym","FBM","FDK-AAC","FSFAP","FSFAP-no-warranty-disclaimer","FSFUL","FSFULLR","FSFULLRSD","FSFULLRWD","FSL-1.1-ALv2","FSL-1.1-MIT","FTL","Fair","Ferguson-Twofish","Frameworx-1.0","FreeBSD-DOC","FreeImage","Furuseth","GCR-docs","GD","GFDL-1.1-invariants-only","GFDL-1.1-invariants-or-later","GFDL-1.1-no-invariants-only","GFDL-1.1-no-invariants-or-later","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-invariants-only","GFDL-1.2-invariants-or-later","GFDL-1.2-no-invariants-only","GFDL-1.2-no-invariants-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-invariants-only","GFDL-1.3-invariants-or-later","GFDL-1.3-no-invariants-only","GFDL-1.3-no-invariants-or-later","GFDL-1.3-only","GFDL-1.3-or-later","GL2PS","GLWTPL","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","Game-Programming-Gems","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","HDF5","HIDAPI","HP-1986","HP-1989","HPND","HPND-DEC","HPND-Fenneberg-Livingston","HPND-INRIA-IMAG","HPND-Intel","HPND-Kevlin-Henney","HPND-MIT-disclaimer","HPND-Markus-Kuhn","HPND-Netrek","HPND-Pbmplus","HPND-UC","HPND-UC-export-US","HPND-doc","HPND-doc-sell","HPND-export-US","HPND-export-US-acknowledgement","HPND-export-US-modify","HPND-export2-US","HPND-merchantability-variant","HPND-sell-MIT-disclaimer-xserver","HPND-sell-regexpr","HPND-sell-variant","HPND-sell-variant-MIT-disclaimer","HPND-sell-variant-MIT-disclaimer-rev","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IEC-Code-Components-EULA","IJG","IJG-short","IPA","IPL-1.0","ISC","ISC-Veillard","ImageMagick","Imlib2","Info-ZIP","Inner-Net-2.0","InnoSetup","Intel","Intel-ACPI","Interbase-1.0","JPL-image","JPNIC","JSON","Jam","JasPer-2.0","Kastrup","Kazlib","Knuth-CTAN","LAL-1.2","LAL-1.3","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","LOOP","LPD-document","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","LZMA-SDK-9.11-to-9.20","LZMA-SDK-9.22","Latex2e","Latex2e-translated-notice","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-1-para","Linux-man-pages-copyleft","Linux-man-pages-copyleft-2-para","Linux-man-pages-copyleft-var","Lucida-Bitmap-Fonts","MIPS","MIT","MIT-0","MIT-CMU","MIT-Click","MIT-Festival","MIT-Khronos-old","MIT-Modern-Variant","MIT-Wu","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MIT-testregex","MITNFA","MMIXware","MPEG-SSG","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-LPL","MS-PL","MS-RL","MTLL","Mackerras-3-Clause","Mackerras-3-Clause-acknowledgment","MakeIndex","Martin-Birgmeier","McPhee-slideshow","Minpack","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCBI-PD","NCGL-UK-2.0","NCL","NCSA","NGPL","NICTA-1.0","NIST-PD","NIST-PD-fallback","NIST-Software","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTIA-PD","NTP","NTP-0","Naumen","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OAR","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","OFFIS","OFL-1.0","OFL-1.0-RFN","OFL-1.0-no-RFN","OFL-1.1","OFL-1.1-RFN","OFL-1.1-no-RFN","OGC-1.0","OGDL-Taiwan-1.0","OGL-Canada-2.0","OGL-UK-1.0","OGL-UK-2.0","OGL-UK-3.0","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OLFL-1.3","OML","OPL-1.0","OPL-UK-3.0","OPUBL-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OpenPBS-2.3","OpenSSL","OpenSSL-standalone","OpenVision","PADL","PDDL-1.0","PHP-3.0","PHP-3.01","PPL","PSF-2.0","Parity-6.0.0","Parity-7.0.0","Pixar","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","Python-2.0.1","QPL-1.0","QPL-1.0-INRIA-2004","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","Ruby-pty","SAX-PD","SAX-PD-2.0","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SGI-OpenGL","SGP4","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SL","SMAIL-GPL","SMLNJ","SMPPL","SNIA","SOFA","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-1.0","SUL-1.0","SWL","Saxpath","SchemeReport","Sendmail","Sendmail-8.23","Sendmail-Open-Source-1.1","SimPL-2.0","Sleepycat","Soundex","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","Sun-PPP","Sun-PPP-2000","SunPro","Symlinks","TAPR-OHL-1.0","TCL","TCP-wrappers","TGPPL-1.0","TMate","TORQUE-1.1","TOSL","TPDL","TPL-1.0","TTWL","TTYP0","TU-Berlin-1.0","TU-Berlin-2.0","TermReadKey","ThirdEye","TrustedQSL","UCAR","UCL-1.0","UMich-Merit","UPL-1.0","URT-RLE","Ubuntu-font-1.0","Unicode-3.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","UnixCrypt","Unlicense","Unlicense-libtelnet","Unlicense-libwhirlpool","VOSTROM","VSL-1.0","Vim","W3C","W3C-19980720","W3C-20150513","WTFPL","Watcom-1.0","Widget-Workshop","Wsuipa","X11","X11-distribute-modifications-variant","X11-swapped","XFree86-1.1","XSkat","Xdebug-1.03","Xerox","Xfig","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zeeff","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","any-OSI","any-OSI-perl-modules","bcrypt-Solar-Designer","blessing","bzip2-1.0.6","check-cvs","checkmk","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","cve-tou","diffmark","dtoa","dvipdfm","eGenix","etalab-2.0","fwlw","gSOAP-1.3b","generic-xts","gnuplot","gtkbook","hdparm","iMatix","jove","libpng-1.6.35","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","man2html","metamail","mpi-permissive","mpich2","mplus","ngrep","pkgconf","pnmstitch","psfrag","psutils","python-ldap","radvd","snprintf","softSurfer","ssh-keyscan","swrule","threeparttable","ulem","w3m","wwl","xinetd","xkeyboard-config-Zinoviev","xlock","xpp","xzoom","zlib-acknowledgement"]});var Co=w((QS,Ud)=>{Ud.exports=["AGPL-1.0","AGPL-3.0","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-2.0-with-GCC-exception","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-3.0","GPL-3.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","LGPL-2.0","LGPL-2.1","LGPL-3.0","Net-SNMP","Nunit","StandardML-NJ","bzip2-1.0.5","eCos-2.0","wxWindows"]});var Ao=w((eE,qd)=>{qd.exports=["389-exception","Asterisk-exception","Autoconf-exception-2.0","Autoconf-exception-3.0","Autoconf-exception-generic","Autoconf-exception-generic-3.0","Autoconf-exception-macro","Bison-exception-1.24","Bison-exception-2.2","Bootloader-exception","Classpath-exception-2.0","CLISP-exception-2.0","cryptsetup-OpenSSL-exception","DigiRule-FOSS-exception","eCos-exception-2.0","Fawkes-Runtime-exception","FLTK-exception","fmt-exception","Font-exception-2.0","freertos-exception-2.0","GCC-exception-2.0","GCC-exception-2.0-note","GCC-exception-3.1","Gmsh-exception","GNAT-exception","GNOME-examples-exception","GNU-compiler-exception","gnu-javamail-exception","GPL-3.0-interface-exception","GPL-3.0-linking-exception","GPL-3.0-linking-source-exception","GPL-CC-1.0","GStreamer-exception-2005","GStreamer-exception-2008","i2p-gpl-java-exception","KiCad-libraries-exception","LGPL-3.0-linking-exception","libpri-OpenH323-exception","Libtool-exception","Linux-syscall-note","LLGPL","LLVM-exception","LZMA-exception","mif-exception","OCaml-LGPL-linking-exception","OCCT-exception-1.0","OpenJDK-assembly-exception-1.0","openvpn-openssl-exception","PS-or-PDF-font-exception-20170817","QPL-1.0-INRIA-2004-exception","Qt-GPL-exception-1.0","Qt-LGPL-exception-1.1","Qwt-exception-1.0","SANE-exception","SHL-2.0","SHL-2.1","stunnel-exception","SWI-exception","Swift-exception","Texinfo-exception","u-boot-exception-2.0","UBDL-exception","Universal-FOSS-exception-1.0","vsftpd-openssl-exception","WxWindows-exception-3.1","x11vnc-openssl-exception"]});var Oo=w((tE,$o)=>{"use strict";var Bd=[].concat(Ui()).concat(Co()),Wd=Ao();$o.exports=function(s){var e=0;function t(){return e<s.length}o(t,"hasMore");function i(g){if(g instanceof RegExp){var m=s.slice(e),b=m.match(g);if(b)return e+=b[0].length,b[0]}else if(s.indexOf(g,e)===e)return e+=g.length,g}o(i,"read");function r(){i(/[ ]*/)}o(r,"skipWhitespace");function n(){for(var g,m=["WITH","AND","OR","(",")",":","+"],b=0;b<m.length&&(g=i(m[b]),!g);b++);if(g==="+"&&e>1&&s[e-2]===" ")throw new Error("Space before `+`");return g&&{type:"OPERATOR",string:g}}o(n,"operator");function a(){return i(/[A-Za-z0-9-.]+/)}o(a,"idstring");function c(){var g=a();if(!g)throw new Error("Expected idstring at offset "+e);return g}o(c,"expectIdstring");function l(){if(i("DocumentRef-")){var g=c();return{type:"DOCUMENTREF",string:g}}}o(l,"documentRef");function h(){if(i("LicenseRef-")){var g=c();return{type:"LICENSEREF",string:g}}}o(h,"licenseRef");function u(){var g=e,m=a();if(Bd.indexOf(m)!==-1)return{type:"LICENSE",string:m};if(Wd.indexOf(m)!==-1)return{type:"EXCEPTION",string:m};e=g}o(u,"identifier");function f(){return n()||l()||h()||u()}o(f,"parseToken");for(var p=[];t()&&(r(),!!t());){var d=f();if(!d)throw new Error("Unexpected `"+s[e]+"` at offset "+e);p.push(d)}return p}});var Ro=w((iE,Po)=>{"use strict";Po.exports=function(s){var e=0;function t(){return e<s.length}o(t,"hasMore");function i(){return t()?s[e]:null}o(i,"token");function r(){if(!t())throw new Error;e++}o(r,"next");function n(m){var b=i();if(b&&b.type==="OPERATOR"&&m===b.string)return r(),b.string}o(n,"parseOperator");function a(){if(n("WITH")){var m=i();if(m&&m.type==="EXCEPTION")return r(),m.string;throw new Error("Expected exception after `WITH`")}}o(a,"parseWith");function c(){var m=e,b="",y=i();if(y.type==="DOCUMENTREF"&&(r(),b+="DocumentRef-"+y.string+":",!n(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(y=i(),y.type==="LICENSEREF")return r(),b+="LicenseRef-"+y.string,{license:b};e=m}o(c,"parseLicenseRef");function l(){var m=i();if(m&&m.type==="LICENSE"){r();var b={license:m.string};n("+")&&(b.plus=!0);var y=a();return y&&(b.exception=y),b}}o(l,"parseLicense");function h(){var m=n("(");if(m){var b=d();if(!n(")"))throw new Error("Expected `)`");return b}}o(h,"parseParenthesizedExpression");function u(){return h()||c()||l()}o(u,"parseAtom");function f(m,b){return o(function y(){var C=b();if(C){if(!n(m))return C;var A=y();if(!A)throw new Error("Expected expression");return{left:C,conjunction:m.toLowerCase(),right:A}}},"parseBinaryOp")}o(f,"makeBinaryOpParser");var p=f("AND",u),d=f("OR",p),g=d();if(!g||t())throw new Error("Syntax error");return g}});var qi=w((nE,Do)=>{"use strict";var zd=Oo(),Hd=Ro();Do.exports=function(s){return Hd(zd(s))}});var Mo=w((oE,jo)=>{var Vd=qi(),Yd=Ui();function xs(s){try{return Vd(s),!0}catch{return!1}}o(xs,"valid");function Go(s,e){var t=e[0].length-s[0].length;return t!==0?t:s[0].toUpperCase().localeCompare(e[0].toUpperCase())}o(Go,"sortTranspositions");var xo=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(Go),Xd=0,Kd=1,To=[function(s){return s.toUpperCase()},function(s){return s.trim()},function(s){return s.replace(/\./g,"")},function(s){return s.replace(/\s+/g,"")},function(s){return s.replace(/\s+/g,"-")},function(s){return s.replace("v","-")},function(s){return s.replace(/,?\s*(\d)/,"-$1")},function(s){return s.replace(/,?\s*(\d)/,"-$1.0")},function(s){return s.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(s){return s.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(s){return s[0].toUpperCase()+s.slice(1)},function(s){return s.replace("/","-")},function(s){return s.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(s){return s.indexOf("3.0")!==-1?s+"-or-later":s+"-only"},function(s){return s+"only"},function(s){return s.replace(/(\d)$/,"-$1.0")},function(s){return s.replace(/(-| )?(\d)$/,"-$2-Clause")},function(s){return s.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(s){return s.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(s){return s.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(s){return s.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(s){return s.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(s){return s.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(s){return"CC-"+s},function(s){return"CC-"+s+"-4.0"},function(s){return s.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(s){return"CC-"+s.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],Bi=Yd.map(function(s){var e=/^(.*)-\d+\.\d+$/.exec(s);return e?[e[0],e[1]]:[s,null]}).reduce(function(s,e){var t=e[1];return s[t]=s[t]||[],s[t].push(e[0]),s},{}),Jd=Object.keys(Bi).map(o(function(e){return[e,Bi[e]]},"makeEntries")).filter(o(function(e){return e[1].length===1&&e[0]!==null&&e[0]!=="APL"},"identifySoleVersions")).map(o(function(e){return[e[0],e[1][0]]},"createLastResorts"));Bi=void 0;var No=[["UNLI","Unlicense"],["WTF","WTFPL"],["2 CLAUSE","BSD-2-Clause"],["2-CLAUSE","BSD-2-Clause"],["3 CLAUSE","BSD-3-Clause"],["3-CLAUSE","BSD-3-Clause"],["AFFERO","AGPL-3.0-or-later"],["AGPL","AGPL-3.0-or-later"],["APACHE","Apache-2.0"],["ARTISTIC","Artistic-2.0"],["Affero","AGPL-3.0-or-later"],["BEER","Beerware"],["BOOST","BSL-1.0"],["BSD","BSD-2-Clause"],["CDDL","CDDL-1.1"],["ECLIPSE","EPL-1.0"],["FUCK","WTFPL"],["GNU","GPL-3.0-or-later"],["LGPL","LGPL-3.0-or-later"],["GPLV1","GPL-1.0-only"],["GPL-1","GPL-1.0-only"],["GPLV2","GPL-2.0-only"],["GPL-2","GPL-2.0-only"],["GPL","GPL-3.0-or-later"],["MIT +NO-FALSE-ATTRIBS","MITNFA"],["MIT","MIT"],["MPL","MPL-2.0"],["X11","X11"],["ZLIB","Zlib"]].concat(Jd).sort(Go),Zd=0,Qd=1,Io=o(function(s){for(var e=0;e<To.length;e++){var t=To[e](s).trim();if(t!==s&&xs(t))return t}return null},"validTransformation"),_o=o(function(s){for(var e=s.toUpperCase(),t=0;t<No.length;t++){var i=No[t];if(e.indexOf(i[Zd])>-1)return i[Qd]}return null},"validLastResort"),Fo=o(function(s,e){for(var t=0;t<xo.length;t++){var i=xo[t],r=i[Xd];if(s.indexOf(r)>-1){var n=s.replace(r,i[Kd]),a=e(n);if(a!==null)return a}}return null},"anyCorrection");jo.exports=function(s,e){e=e||{};var t=e.upgrade===void 0?!0:!!e.upgrade;function i(c){return t?ep(c):c}o(i,"postprocess");var r=typeof s=="string"&&s.trim().length!==0;if(!r)throw Error("Invalid argument. Expected non-empty string.");if(s=s.trim(),xs(s))return i(s);var n=s.replace(/\+$/,"").trim();if(xs(n))return i(n);var a=Io(s);return a!==null||(a=Fo(s,function(c){return xs(c)?c:Io(c)}),a!==null)||(a=_o(s),a!==null)||(a=Fo(s,_o),a!==null)?i(a):null};function ep(s){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(s)!==-1?s+"-only":["GPL-1.0+","GPL-2.0+","GPL-3.0+","LGPL-2.0+","LGPL-2.1+","LGPL-3.0+","AGPL-1.0+","AGPL-3.0+"].indexOf(s)!==-1?s.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(s)!==-1?s+"-or-later":s}o(ep,"upgradeGPLs")});var Bo=w((cE,qo)=>{var tp=qi(),sp=Mo(),ko='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',ip=/^SEE LICEN[CS]E IN (.+)$/;function Uo(s,e){return e.slice(0,s.length)===s}o(Uo,"startsWith");function Wi(s){if(s.hasOwnProperty("license")){var e=s.license;return Uo("LicenseRef",e)||Uo("DocumentRef",e)}else return Wi(s.left)||Wi(s.right)}o(Wi,"usesLicenseRef");qo.exports=function(s){var e;try{e=tp(s)}catch{var t;if(s==="UNLICENSED"||s==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(t=ip.exec(s))return{validForOldPackages:!0,validForNewPackages:!0,inFile:t[1]};var i={validForOldPackages:!1,validForNewPackages:!1,warnings:[ko]};if(s.trim().length!==0){var r=sp(s);r&&i.warnings.push('license is similar to the valid expression "'+r+'"')}return i}return Wi(e)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[ko]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}}});var Xo=w((hE,Yo)=>{var{URL:zi}=require("node:url"),Wo=hi(),rp=Bo(),zo={dependancies:"dependencies",dependecies:"dependencies",depdenencies:"dependencies",devEependencies:"devDependencies",depends:"dependencies","dev-dependencies":"devDependencies",devDependences:"devDependencies",devDepenencies:"devDependencies",devdependencies:"devDependencies",repostitory:"repository",repo:"repository",prefereGlobal:"preferGlobal",hompage:"homepage",hampage:"homepage",autohr:"author",autor:"author",contributers:"contributors",publicationConfig:"publishConfig",script:"scripts"},Ho=o(s=>s.includes("@")&&s.indexOf("@")<s.lastIndexOf("."),"isEmail");function np(s){let e=s.trim().split(`
10
+ `),t=0;for(;e[t]?.trim().match(/^(#|$)/);)t++;let i=t+1;for(;i<e.length&&e[i].trim();)i++;return e.slice(t,i).join(" ").trim()}o(np,"extractDescription");function Vo(s){if(typeof s!="string"){let n=s.name||"",a=s.url||s.web,c=a?" ("+a+")":"",l=s.email||s.mail,h=l?" <"+l+">":"";s=n+h+c}let e=s.match(/^([^(<]+)/),t=s.match(/\(([^()]+)\)/),i=s.match(/<([^<>]+)>/),r={};return e?.[0].trim()&&(r.name=e[0].trim()),i&&(r.email=i[1]),t&&(r.url=t[1]),r}o(Vo,"stringifyPerson");function op(s,e){s.description&&typeof s.description!="string"&&(e?.push("'description' field should be a string"),delete s.description),s.readme&&!s.description&&s.readme!=="ERROR: No README data found!"&&(s.description=np(s.readme)),s.description===void 0&&delete s.description,s.description||e?.push("No description"),s.modules&&(e?.push("modules field is deprecated"),delete s.modules);let t=s.files;if(t&&!Array.isArray(t)?(e?.push("Invalid 'files' member"),delete s.files):s.files&&(s.files=s.files.filter(function(a){return!a||typeof a!="string"?(e?.push(`Invalid filename in 'files' list: ${a}`),!1):!0})),s.man&&typeof s.man=="string"&&(s.man=[s.man]),!s.bugs&&s.repository?.url){let a=Wo.fromUrl(s.repository.url);a&&a.bugs()&&(s.bugs={url:a.bugs()})}else if(s.bugs){if(typeof s.bugs=="string")Ho(s.bugs)?s.bugs={email:s.bugs}:zi.canParse(s.bugs)?s.bugs={url:s.bugs}:e?.push("Bug string field must be url, email, or {email,url}");else{for(let c in s.bugs)["web","name"].includes(c)&&(e?.push(`bugs['${c}'] should probably be bugs['url'].`),s.bugs.url=s.bugs[c],delete s.bugs[c]);let a=s.bugs;s.bugs={},a.url&&(zi.canParse(a.url)?s.bugs.url=a.url:e?.push("bugs.url field must be a string url. Deleted.")),a.email&&(typeof a.email=="string"&&Ho(a.email)?s.bugs.email=a.email:e?.push("bugs.email field must be a string email. Deleted."))}!s.bugs.email&&!s.bugs.url&&(delete s.bugs,e?.push("Normalized value of bugs field is an empty object. Deleted."))}typeof s.keywords=="string"&&(s.keywords=s.keywords.split(/,\s+/)),s.keywords&&!Array.isArray(s.keywords)?(delete s.keywords,e?.push("keywords should be an array of strings")):s.keywords&&(s.keywords=s.keywords.filter(function(a){return typeof a!="string"||!a?(e?.push("keywords should be an array of strings"),!1):!0}));let i="bundledDependencies",r="bundleDependencies";if(s[i]&&!s[r]&&(s[r]=s[i],delete s[i]),s[r]&&!Array.isArray(s[r])?(e?.push("Invalid 'bundleDependencies' list. Must be array of package names"),delete s[r]):s[r]&&(s[r]=s[r].filter(function(a){return!a||typeof a!="string"?(e?.push(`Invalid bundleDependencies member: ${a}`),!1):(s.dependencies||(s.dependencies={}),Object.prototype.hasOwnProperty.call(s.dependencies,a)||(e?.push(`Non-dependency in bundleDependencies: ${a}`),s.dependencies[a]="*"),!0)})),!s.homepage&&s.repository&&s.repository.url){let a=Wo.fromUrl(s.repository.url);a&&(s.homepage=a.docs())}s.homepage&&(typeof s.homepage!="string"?(e?.push("homepage field must be a string url. Deleted."),delete s.homepage):zi.canParse(s.homepage)||(s.homepage="http://"+s.homepage)),s.readme||(e?.push("No README data"),s.readme="ERROR: No README data found!");let n=s.license||s.licence;n?typeof n!="string"||n.length<1||n.trim()===""?e?.push("license should be a valid SPDX license expression"):rp(n).validForNewPackages||e?.push("license should be a valid SPDX license expression"):e?.push("No license field."),s.author&&(s.author=Vo(s.author)),["maintainers","contributors"].forEach(function(a){Array.isArray(s[a])&&(s[a]=s[a].map(Vo))});for(let a in zo)Object.prototype.hasOwnProperty.call(s,a)&&e?.push(`${a} should probably be ${zo[a]}.`)}o(op,"normalizeData");Yo.exports={normalizeData:op}});var Jo=w(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.sync=ke.isexe=void 0;var ap=require("fs"),cp=require("fs/promises"),lp=o(async(s,e={})=>{let{ignoreErrors:t=!1}=e;try{return Ko(await(0,cp.stat)(s),e)}catch(i){let r=i;if(t||r.code==="EACCES")return!1;throw r}},"isexe");ke.isexe=lp;var hp=o((s,e={})=>{let{ignoreErrors:t=!1}=e;try{return Ko((0,ap.statSync)(s),e)}catch(i){let r=i;if(t||r.code==="EACCES")return!1;throw r}},"sync");ke.sync=hp;var Ko=o((s,e)=>s.isFile()&&up(s,e),"checkStat"),up=o((s,e)=>{let t=e.uid??process.getuid?.(),i=e.groups??process.getgroups?.()??[],r=e.gid??process.getgid?.()??i[0];if(t===void 0||r===void 0)throw new Error("cannot get uid or gid");let n=new Set([r,...i]),a=s.mode,c=s.uid,l=s.gid,h=parseInt("100",8),u=parseInt("010",8),f=parseInt("001",8),p=h|u;return!!(a&f||a&u&&n.has(l)||a&h&&c===t||a&p&&t===0)},"checkMode")});var Qo=w(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.sync=Ue.isexe=void 0;var fp=require("fs"),dp=require("fs/promises"),pp=o(async(s,e={})=>{let{ignoreErrors:t=!1}=e;try{return Zo(await(0,dp.stat)(s),s,e)}catch(i){let r=i;if(t||r.code==="EACCES")return!1;throw r}},"isexe");Ue.isexe=pp;var mp=o((s,e={})=>{let{ignoreErrors:t=!1}=e;try{return Zo((0,fp.statSync)(s),s,e)}catch(i){let r=i;if(t||r.code==="EACCES")return!1;throw r}},"sync");Ue.sync=mp;var gp=o((s,e)=>{let{pathExt:t=process.env.PATHEXT||""}=e,i=t.split(";");if(i.indexOf("")!==-1)return!0;for(let r=0;r<i.length;r++){let n=i[r].toLowerCase(),a=s.substring(s.length-n.length).toLowerCase();if(n&&a===n)return!0}return!1},"checkPathExt"),Zo=o((s,e,t)=>s.isFile()&&gp(e,t),"checkStat")});var ta=w(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0})});var aa=w(q=>{"use strict";var sa=q&&q.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var r=Object.getOwnPropertyDescriptor(e,t);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(s,i,r)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),wp=q&&q.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),ia=q&&q.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&sa(e,s,t);return wp(e,s),e},yp=q&&q.__exportStar||function(s,e){for(var t in s)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&sa(e,s,t)};Object.defineProperty(q,"__esModule",{value:!0});q.sync=q.isexe=q.posix=q.win32=void 0;var ra=ia(Jo());q.posix=ra;var na=ia(Qo());q.win32=na;yp(ta(),q);var bp=process.env._ISEXE_TEST_PLATFORM_||process.platform,oa=bp==="win32"?na:ra;q.isexe=oa.isexe;q.sync=oa.sync});var Hi=w((bE,ga)=>{var{isexe:Sp,sync:Ep}=aa(),{join:Lp,delimiter:vp,sep:ca,posix:la}=require("path"),ha=process.platform==="win32",ua=new RegExp(`[${la.sep}${ca===la.sep?"":ca}]`.replace(/(\\)/g,"\\$1")),Cp=new RegExp(`^\\.${ua.source}`),fa=o(s=>Object.assign(new Error(`not found: ${s}`),{code:"ENOENT"}),"getNotFoundError"),da=o((s,{path:e=process.env.PATH,pathExt:t=process.env.PATHEXT,delimiter:i=vp})=>{let r=s.match(ua)?[""]:[...ha?[process.cwd()]:[],...(e||"").split(i)];if(ha){let n=t||[".EXE",".CMD",".BAT",".COM"].join(i),a=n.split(i).flatMap(c=>[c,c.toLowerCase()]);return s.includes(".")&&a[0]!==""&&a.unshift(""),{pathEnv:r,pathExt:a,pathExtExe:n}}return{pathEnv:r,pathExt:[""]}},"getPathInfo"),pa=o((s,e)=>{let t=/^".*"$/.test(s)?s.slice(1,-1):s;return(!t&&Cp.test(e)?e.slice(0,2):"")+Lp(t,e)},"getPathPart"),ma=o(async(s,e={})=>{let{pathEnv:t,pathExt:i,pathExtExe:r}=da(s,e),n=[];for(let a of t){let c=pa(a,s);for(let l of i){let h=c+l;if(await Sp(h,{pathExt:r,ignoreErrors:!0})){if(!e.all)return h;n.push(h)}}}if(e.all&&n.length)return n;if(e.nothrow)return null;throw fa(s)},"which"),Ap=o((s,e={})=>{let{pathEnv:t,pathExt:i,pathExtExe:r}=da(s,e),n=[];for(let a of t){let c=pa(a,s);for(let l of i){let h=c+l;if(Ep(h,{pathExt:r,ignoreErrors:!0})){if(!e.all)return h;n.push(h)}}}if(e.all&&n.length)return n;if(e.nothrow)return null;throw fa(s)},"whichSync");ga.exports=ma;ma.sync=Ap});var ya=w((EE,wa)=>{"use strict";var $p=o((s,e)=>{if(!s.length)return'""';let t;if(!/[ \t\n\v"]/.test(s))t=s;else{t='"';for(let i=0;i<=s.length;++i){let r=0;for(;s[i]==="\\";)++i,++r;if(i===s.length){t+="\\".repeat(r*2);break}s[i]==='"'?(t+="\\".repeat(r*2+1),t+=s[i]):(t+="\\".repeat(r),t+=s[i])}t+='"'}return t=t.replace(/[ !%^&()<>|"]/g,"^$&"),e&&(t=t.replace(/[ !%^&()<>|"]/g,"^$&")),t},"cmd"),Op=o(s=>s.length?/[\t\n\r "#$&'()*;<>?\\`|~]/.test(s)?`'${s.replace(/'/g,"'\\''")}'`.replace(/^(?:'')+(?!$)/,"").replace(/\\'''/g,"\\'"):s:"''","sh");wa.exports={cmd:$p,sh:Op}});var va=w((vE,La)=>{"use strict";var{spawn:Pp}=require("child_process"),Rp=require("os"),Dp=Hi(),ba=ya(),Yi=o((s,e,t={},i={})=>{if(t.shell)return Ea(s,e,t,i);let r,n,a=new Promise((d,g)=>{r=d,n=g}),c=new Error("command failed"),l=[],h=[],u=o(d=>({cmd:s,args:e,...d,...Tp(l,h,t),...i}),"getResult"),f=o((d,g)=>{let m=u(g);n(Object.assign(d,m))},"rejectWithOpts"),p=Pp(s,e,t);return a.stdin=p.stdin,a.process=p,p.on("error",f),p.stdout&&(p.stdout.on("data",d=>l.push(d)),p.stdout.on("error",f)),p.stderr&&(p.stderr.on("data",d=>h.push(d)),p.stderr.on("error",f)),p.on("close",(d,g)=>{d||g?f(c,{code:d,signal:g}):r(u({code:d,signal:g}))}),a},"promiseSpawn"),Ea=o((s,e,t,i)=>{let r=t.shell;r===!0&&(r=process.platform==="win32"?process.env.ComSpec||"cmd.exe":"sh");let n={...t,shell:!1},a=[],c=s;if(/(?:^|\\)cmd(?:\.exe)?$/i.test(r)){let h=!1,u="",f=!1;for(let d=0;d<s.length;++d){let g=s.charAt(d);if(g===" "&&!f)break;u+=g,(g==='"'||g==="'")&&(f=!f)}let p;try{p=Dp.sync(u,{path:n.env&&Sa(n.env,"PATH")||process.env.PATH,pathext:n.env&&Sa(n.env,"PATHEXT")||process.env.PATHEXT}).toLowerCase()}catch{p=u.toLowerCase()}h=p.endsWith(".cmd")||p.endsWith(".bat");for(let d of e)c+=` ${ba.cmd(d,h)}`;a.push("/d","/s","/c",c),n.windowsVerbatimArguments=!0}else{for(let h of e)c+=` ${ba.sh(h)}`;a.push("-c",c)}return Yi(r,a,n,i)},"spawnWithShell"),xp=o((s,e={},t={})=>{let i={...e,shell:!0},r=[].concat(s),n=process.platform;if(n==="linux"&&Rp.release().toLowerCase().includes("microsoft")&&(n="wsl",!process.env.BROWSER))return Promise.reject(new Error("Set the BROWSER environment variable to your desired browser."));let a=i.command;return a||(n==="win32"?(i.shell=process.env.ComSpec,a='start ""'):n==="wsl"?a="sensible-browser":n==="darwin"?a="open":a="xdg-open"),Ea(a,r,i,t)},"open");Yi.open=xp;var Vi=o((s="pipe",e)=>s==="pipe"||s===null?!0:Array.isArray(s)?Vi(s[e],e):!1,"isPipe"),Tp=o((s,e,{stdioString:t=!0,stdio:i})=>{let r={stdout:null,stderr:null};return Vi(i,1)&&(r.stdout=Buffer.concat(s),t&&(r.stdout=r.stdout.toString().trim())),Vi(i,2)&&(r.stderr=Buffer.concat(e),t&&(r.stderr=r.stderr.toString().trim())),r},"stdioResult"),Sa=o((s,e)=>{e=e.toLowerCase();for(let t of Object.keys(s).sort())if(t.toLowerCase()===e)return s[t]},"findInObject");La.exports=Yi});var $a=w((AE,Aa)=>{"use strict";function Ca(s,e){for(let t in e)Object.defineProperty(s,t,{value:e[t],enumerable:!0,configurable:!0});return s}o(Ca,"assign");function Np(s,e,t){if(!s||typeof s=="string")throw new TypeError("Please pass an Error to err-code");t||(t={}),typeof e=="object"&&(t=e,e=void 0),e!=null&&(t.code=e);try{return Ca(s,t)}catch{t.message=s.message,t.stack=s.stack;let r=o(function(){},"ErrClass");return r.prototype=Object.create(Object.getPrototypeOf(s)),Ca(new r,t)}}o(Np,"createError");Aa.exports=Np});var Pa=w((OE,Oa)=>{function re(s,e){typeof e=="boolean"&&(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(s)),this._timeouts=s,this._options=e||{},this._maxRetryTime=e&&e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}o(re,"RetryOperation");Oa.exports=re;re.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts};re.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};re.prototype.retry=function(s){if(this._timeout&&clearTimeout(this._timeout),!s)return!1;var e=new Date().getTime();if(s&&e-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(s);var t=this._timeouts.shift();if(t===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),t=this._timeouts.shift();else return!1;var i=this,r=setTimeout(function(){i._attempts++,i._operationTimeoutCb&&(i._timeout=setTimeout(function(){i._operationTimeoutCb(i._attempts)},i._operationTimeout),i._options.unref&&i._timeout.unref()),i._fn(i._attempts)},t);return this._options.unref&&r.unref(),!0};re.prototype.attempt=function(s,e){this._fn=s,e&&(e.timeout&&(this._operationTimeout=e.timeout),e.cb&&(this._operationTimeoutCb=e.cb));var t=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){t._operationTimeoutCb()},t._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};re.prototype.try=function(s){this.attempt(s)};re.prototype.start=function(s){this.attempt(s)};re.prototype.start=re.prototype.try;re.prototype.errors=function(){return this._errors};re.prototype.attempts=function(){return this._attempts};re.prototype.mainError=function(){if(this._errors.length===0)return null;for(var s={},e=null,t=0,i=0;i<this._errors.length;i++){var r=this._errors[i],n=r.message,a=(s[n]||0)+1;s[n]=a,a>=t&&(e=r,t=a)}return e}});var Ra=w(Ne=>{var Ip=Pa();Ne.operation=function(s){var e=Ne.timeouts(s);return new Ip(e,{forever:s&&s.forever,unref:s&&s.unref,maxRetryTime:s&&s.maxRetryTime})};Ne.timeouts=function(s){if(s instanceof Array)return[].concat(s);var e={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var t in s)e[t]=s[t];if(e.minTimeout>e.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var i=[],r=0;r<e.retries;r++)i.push(this.createTimeout(r,e));return s&&s.forever&&!i.length&&i.push(this.createTimeout(r,e)),i.sort(function(n,a){return n-a}),i};Ne.createTimeout=function(s,e){var t=e.randomize?Math.random()+1:1,i=Math.round(t*e.minTimeout*Math.pow(e.factor,s));return i=Math.min(i,e.maxTimeout),i};Ne.wrap=function(s,e,t){if(e instanceof Array&&(t=e,e=null),!t){t=[];for(var i in s)typeof s[i]=="function"&&t.push(i)}for(var r=0;r<t.length;r++){var n=t[r],a=s[n];s[n]=o(function(l){var h=Ne.operation(e),u=Array.prototype.slice.call(arguments,1),f=u.pop();u.push(function(p){h.retry(p)||(p&&(arguments[0]=h.mainError()),f.apply(this,arguments))}),h.attempt(function(){l.apply(s,u)})},"retryWrapper").bind(s,a),s[n].options=e}}});var xa=w((xE,Da)=>{Da.exports=Ra()});var Ia=w((TE,Na)=>{"use strict";var _p=$a(),Fp=xa(),Gp=Object.prototype.hasOwnProperty;function Ta(s){return s&&s.code==="EPROMISERETRY"&&Gp.call(s,"retried")}o(Ta,"isRetryError");function jp(s,e){var t,i;return typeof s=="object"&&typeof e=="function"&&(t=e,e=s,s=t),i=Fp.operation(e),new Promise(function(r,n){i.attempt(function(a){Promise.resolve().then(function(){return s(function(c){throw Ta(c)&&(c=c.retried),_p(new Error("Retrying"),"EPROMISERETRY",{retried:c})},a)}).then(r,function(c){Ta(c)&&(c=c.retried,i.retry(c||new Error))||n(c)})})})}o(jp,"promiseRetry");Na.exports=jp});var Zi=w((IE,_a)=>{var St=class extends Error{static{o(this,"GitError")}shouldRetry(){return!1}},Xi=class extends St{static{o(this,"GitConnectionError")}constructor(){super("A git connection error occurred")}shouldRetry(e){return e<3}},Ki=class extends St{static{o(this,"GitPathspecError")}constructor(){super("The git reference could not be found")}},Ji=class extends St{static{o(this,"GitUnknownError")}constructor(){super("An unknown git error occurred")}};_a.exports={GitConnectionError:Xi,GitPathspecError:Ki,GitUnknownError:Ji}});var Ga=w((FE,Fa)=>{var{GitConnectionError:Mp,GitPathspecError:kp,GitUnknownError:Up}=Zi(),qp=new RegExp(["remote error: Internal Server Error","The remote end hung up unexpectedly","Connection timed out","Operation timed out","Failed to connect to .* Timed out","Connection reset by peer","SSL_ERROR_SYSCALL","The requested URL returned error: 503"].join("|")),Bp=/pathspec .* did not match any file\(s\) known to git/;function Wp(s){let e=s.stderr,t;return qp.test(e)?t=new Mp(e):Bp.test(e)?t=new kp(e):t=new Up(e),Object.assign(t,s)}o(Wp,"makeError");Fa.exports=Wp});var qa=w((jE,Ua)=>{var{hasOwnProperty:Qi}=Object.prototype,er=o((s,e={})=>{typeof e=="string"&&(e={section:e}),e.align=e.align===!0,e.newline=e.newline===!0,e.sort=e.sort===!0,e.whitespace=e.whitespace===!0||e.align===!0,e.platform=e.platform||typeof process<"u"&&process.platform,e.bracketedArray=e.bracketedArray!==!1;let t=e.platform==="win32"?`\r
11
+ `:`
12
+ `,i=e.whitespace?" = ":"=",r=[],n=e.sort?Object.keys(s).sort():Object.keys(s),a=0;e.align&&(a=ge(n.filter(h=>s[h]===null||Array.isArray(s[h])||typeof s[h]!="object").map(h=>Array.isArray(s[h])?`${h}[]`:h).concat([""]).reduce((h,u)=>ge(h).length>=ge(u).length?h:u)).length);let c="",l=e.bracketedArray?"[]":"";for(let h of n){let u=s[h];if(u&&Array.isArray(u))for(let f of u)c+=ge(`${h}${l}`).padEnd(a," ")+i+ge(f)+t;else u&&typeof u=="object"?r.push(h):c+=ge(h).padEnd(a," ")+i+ge(u)+t}e.section&&c.length&&(c="["+ge(e.section)+"]"+(e.newline?t+t:t)+c);for(let h of r){let u=Ma(h,".").join("\\."),f=(e.section?e.section+".":"")+u,p=er(s[h],{...e,section:f});c.length&&p.length&&(c+=t),c+=p}return c},"encode");function Ma(s,e){var t=0,i=0,r=0,n=[];do if(r=s.indexOf(e,t),r!==-1){if(t=r+e.length,r>0&&s[r-1]==="\\")continue;n.push(s.slice(i,r)),i=r+e.length}while(r!==-1);return n.push(s.slice(i)),n}o(Ma,"splitSections");var ja=o((s,e={})=>{e.bracketedArray=e.bracketedArray!==!1;let t=Object.create(null),i=t,r=null,n=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,a=s.split(/[\r\n]+/g),c={};for(let h of a){if(!h||h.match(/^\s*[;#]/)||h.match(/^\s*$/))continue;let u=h.match(n);if(!u)continue;if(u[1]!==void 0){if(r=Ts(u[1]),r==="__proto__"){i=Object.create(null);continue}i=t[r]=t[r]||Object.create(null);continue}let f=Ts(u[2]),p;e.bracketedArray?p=f.length>2&&f.slice(-2)==="[]":(c[f]=(c?.[f]||0)+1,p=c[f]>1);let d=p&&f.endsWith("[]")?f.slice(0,-2):f;if(d==="__proto__")continue;let g=u[3]?Ts(u[4]):!0,m=g==="true"||g==="false"||g==="null"?JSON.parse(g):g;p&&(Qi.call(i,d)?Array.isArray(i[d])||(i[d]=[i[d]]):i[d]=[]),Array.isArray(i[d])?i[d].push(m):i[d]=m}let l=[];for(let h of Object.keys(t)){if(!Qi.call(t,h)||typeof t[h]!="object"||Array.isArray(t[h]))continue;let u=Ma(h,".");i=t;let f=u.pop(),p=f.replace(/\\\./g,".");for(let d of u)d!=="__proto__"&&((!Qi.call(i,d)||typeof i[d]!="object")&&(i[d]=Object.create(null)),i=i[d]);i===t&&p===f||(i[p]=t[h],l.push(h))}for(let h of l)delete t[h];return t},"decode"),ka=o(s=>s.startsWith('"')&&s.endsWith('"')||s.startsWith("'")&&s.endsWith("'"),"isQuoted"),ge=o(s=>typeof s!="string"||s.match(/[=\r\n]/)||s.match(/^\[/)||s.length>1&&ka(s)||s!==s.trim()?JSON.stringify(s):s.split(";").join("\\;").split("#").join("\\#"),"safe"),Ts=o(s=>{if(s=(s||"").trim(),ka(s)){s.charAt(0)==="'"&&(s=s.slice(1,-1));try{s=JSON.parse(s)}catch{}}else{let e=!1,t="";for(let i=0,r=s.length;i<r;i++){let n=s.charAt(i);if(e)"\\;#".indexOf(n)!==-1?t+=n:t+="\\"+n,e=!1;else{if(";#".indexOf(n)!==-1)break;n==="\\"?e=!0:t+=n}}return e&&(t+="\\"),t.trim()}return s},"unsafe");Ua.exports={parse:ja,decode:ja,stringify:er,encode:er,safe:ge,unsafe:Ts}});var Ha=w((kE,tr)=>{var Ba=require("node:fs"),zp=require("node:os"),Hp=require("node:path"),Vp=qa(),Wa=Hp.join(zp.homedir(),".gitconfig"),Et=null,za=o(()=>{if(Et===null)try{if(Et={},Ba.existsSync(Wa)){let s=Ba.readFileSync(Wa,"utf-8");Et=Vp.parse(s)}}catch{Et={}}return Et},"loadGitConfig"),Yp=o(()=>{let s=za();return{sshCommandSetInConfig:s?.core?.sshCommand!==void 0,askPassSetInConfig:s?.core?.askpass!==void 0}},"checkGitConfigs"),Xp=process.env.GIT_SSH_COMMAND!==void 0,Kp=process.env.GIT_ASKPASS!==void 0,{sshCommandSetInConfig:Jp,askPassSetInConfig:Zp}=Yp(),Qp={...Kp||Zp?{}:{GIT_ASKPASS:"echo"},...Xp||Jp?{}:{GIT_SSH_COMMAND:"ssh -oStrictHostKeyChecking=accept-new"}};tr.exports=(s={})=>({stdioString:!0,...s,shell:!1,env:s.env||{...Qp,...process.env}});tr.exports.loadGitConfig=za});var Ya=w((qE,Va)=>{var em=Hi(),sr;try{sr=em.sync("git")}catch{}Va.exports=(s={})=>s.git?s.git:!sr||s.git===!1?Object.assign(new Error("No git binary found in $PATH"),{code:"ENOGIT"}):sr});var Lt=w((BE,Xa)=>{var tm=va(),sm=Ia(),{log:im}=Xt(),rm=Ga(),nm=Ha();Xa.exports=(s,e={})=>{let i=Ya()(e);if(i instanceof Error)return Promise.reject(i);let r=e.allowReplace||s[0]==="--no-replace-objects"?s:["--no-replace-objects",...s],n=e.retry;return n==null&&(n={retries:e.fetchRetries||2,factor:e.fetchRetryFactor||10,maxTimeout:e.fetchRetryMaxtimeout||6e4,minTimeout:e.fetchRetryMintimeout||1e3}),sm((a,c)=>(c!==1&&im.silly("git",`Retrying git command: ${r.join(" ")} attempt # ${c}`),tm(i,r,nm(e)).catch(l=>{let h=rm(l);if(!h.shouldRetry(c))throw h;a(h)})),n)}});var or=w(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.LRUCache=void 0;var qe=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ja=new Set,ir=typeof process=="object"&&process?process:{},Za=o((s,e,t,i)=>{typeof ir.emitWarning=="function"&&ir.emitWarning(s,e,t,i)},"emitWarning"),Ns=globalThis.AbortController,Ka=globalThis.AbortSignal;if(typeof Ns>"u"){Ka=class{static{o(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(i,r){this._onabort.push(r)}},Ns=class{static{o(this,"AbortController")}constructor(){e()}signal=new Ka;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let r of this.signal._onabort)r(i);this.signal.onabort?.(i)}}};let s=ir.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=o(()=>{s&&(s=!1,Za("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"warnACPolyfill")}var om=o(s=>!Ja.has(s),"shouldWarn"),HE=Symbol("type"),ve=o(s=>s&&s===Math.floor(s)&&s>0&&isFinite(s),"isPosInt"),Qa=o(s=>ve(s)?s<=Math.pow(2,8)?Uint8Array:s<=Math.pow(2,16)?Uint16Array:s<=Math.pow(2,32)?Uint32Array:s<=Number.MAX_SAFE_INTEGER?Be:null:null,"getUintArray"),Be=class extends Array{static{o(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},rr=class s{static{o(this,"Stack")}heap;length;static#e=!1;static create(e){let t=Qa(e);if(!t)return[];s.#e=!0;let i=new s(e,t);return s.#e=!1,i}constructor(e,t){if(!s.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},nr=class s{static{o(this,"LRUCache")}#e;#s;#t;#n;#c;#O;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#p;#a;#l;#i;#h;#r;#m;#g;#S;#f;#$;#b;#E;#C;#L;#y;static unsafeExposeInternals(e){return{starts:e.#b,ttls:e.#E,sizes:e.#$,keyMap:e.#a,keyList:e.#l,valList:e.#i,next:e.#h,prev:e.#r,get head(){return e.#m},get tail(){return e.#g},free:e.#S,isBackgroundFetch:o(t=>e.#w(t),"isBackgroundFetch"),backgroundFetch:o((t,i,r,n)=>e.#I(t,i,r,n),"backgroundFetch"),moveToTail:o(t=>e.#k(t),"moveToTail"),indexes:o(t=>e.#x(t),"indexes"),rindexes:o(t=>e.#N(t),"rindexes"),isStale:o(t=>e.#A(t),"isStale")}}get max(){return this.#e}get maxSize(){return this.#s}get calculatedSize(){return this.#p}get size(){return this.#u}get fetchMethod(){return this.#c}get memoMethod(){return this.#O}get dispose(){return this.#t}get disposeAfter(){return this.#n}constructor(e){let{max:t=0,ttl:i,ttlResolution:r=1,ttlAutopurge:n,updateAgeOnGet:a,updateAgeOnHas:c,allowStale:l,dispose:h,disposeAfter:u,noDisposeOnSet:f,noUpdateTTL:p,maxSize:d=0,maxEntrySize:g=0,sizeCalculation:m,fetchMethod:b,memoMethod:y,noDeleteOnFetchRejection:C,noDeleteOnStaleGet:A,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:O,ignoreFetchAbort:F}=e;if(t!==0&&!ve(t))throw new TypeError("max option must be a nonnegative integer");let G=t?Qa(t):Array;if(!G)throw new Error("invalid max value: "+t);if(this.#e=t,this.#s=d,this.maxEntrySize=g||this.#s,this.sizeCalculation=m,this.sizeCalculation){if(!this.#s&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#O=y,b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#c=b,this.#L=!!b,this.#a=new Map,this.#l=new Array(t).fill(void 0),this.#i=new Array(t).fill(void 0),this.#h=new G(t),this.#r=new G(t),this.#m=0,this.#g=0,this.#S=rr.create(t),this.#u=0,this.#p=0,typeof h=="function"&&(this.#t=h),typeof u=="function"?(this.#n=u,this.#f=[]):(this.#n=void 0,this.#f=void 0),this.#C=!!this.#t,this.#y=!!this.#n,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!C,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!O,this.ignoreFetchAbort=!!F,this.maxEntrySize!==0){if(this.#s!==0&&!ve(this.#s))throw new TypeError("maxSize must be a positive integer if specified");if(!ve(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#R()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!A,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!c,this.ttlResolution=ve(r)||r===0?r:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!ve(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#D()}if(this.#e===0&&this.ttl===0&&this.#s===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#s){let P="LRU_CACHE_UNBOUNDED";om(P)&&(Ja.add(P),Za("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",P,s))}}getRemainingTTL(e){return this.#a.has(e)?1/0:0}#D(){let e=new Be(this.#e),t=new Be(this.#e);this.#E=e,this.#b=t,this.#F=(n,a,c=qe.now())=>{if(t[n]=a!==0?c:0,e[n]=a,a!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#A(n)&&this.#d(this.#l[n],"expire")},a+1);l.unref&&l.unref()}},this.#v=n=>{t[n]=e[n]!==0?qe.now():0},this.#o=(n,a)=>{if(e[a]){let c=e[a],l=t[a];if(!c||!l)return;n.ttl=c,n.start=l,n.now=i||r();let h=n.now-l;n.remainingTTL=c-h}};let i=0,r=o(()=>{let n=qe.now();if(this.ttlResolution>0){i=n;let a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref()}return n},"getNow");this.getRemainingTTL=n=>{let a=this.#a.get(n);if(a===void 0)return 0;let c=e[a],l=t[a];if(!c||!l)return 1/0;let h=(i||r())-l;return c-h},this.#A=n=>{let a=t[n],c=e[n];return!!c&&!!a&&(i||r())-a>c}}#v=o(()=>{},"#updateItemAge");#o=o(()=>{},"#statusTTL");#F=o(()=>{},"#setItemTTL");#A=o(()=>!1,"#isStale");#R(){let e=new Be(this.#e);this.#p=0,this.#$=e,this.#G=t=>{this.#p-=e[t],e[t]=0},this.#U=(t,i,r,n)=>{if(this.#w(i))return 0;if(!ve(r))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(r=n(i,t),!ve(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return r},this.#P=(t,i,r)=>{if(e[t]=i,this.#s){let n=this.#s-e[t];for(;this.#p>n;)this.#T(!0)}this.#p+=e[t],r&&(r.entrySize=i,r.totalCalculatedSize=this.#p)}}#G=o(e=>{},"#removeItemSize");#P=o((e,t,i)=>{},"#addItemSize");#U=o((e,t,i,r)=>{if(i||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#x({allowStale:e=this.allowStale}={}){if(this.#u)for(let t=this.#g;!(!this.#j(t)||((e||!this.#A(t))&&(yield t),t===this.#m));)t=this.#r[t]}*#N({allowStale:e=this.allowStale}={}){if(this.#u)for(let t=this.#m;!(!this.#j(t)||((e||!this.#A(t))&&(yield t),t===this.#g));)t=this.#h[t]}#j(e){return e!==void 0&&this.#a.get(this.#l[e])===e}*entries(){for(let e of this.#x())this.#i[e]!==void 0&&this.#l[e]!==void 0&&!this.#w(this.#i[e])&&(yield[this.#l[e],this.#i[e]])}*rentries(){for(let e of this.#N())this.#i[e]!==void 0&&this.#l[e]!==void 0&&!this.#w(this.#i[e])&&(yield[this.#l[e],this.#i[e]])}*keys(){for(let e of this.#x()){let t=this.#l[e];t!==void 0&&!this.#w(this.#i[e])&&(yield t)}}*rkeys(){for(let e of this.#N()){let t=this.#l[e];t!==void 0&&!this.#w(this.#i[e])&&(yield t)}}*values(){for(let e of this.#x())this.#i[e]!==void 0&&!this.#w(this.#i[e])&&(yield this.#i[e])}*rvalues(){for(let e of this.#N())this.#i[e]!==void 0&&!this.#w(this.#i[e])&&(yield this.#i[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#x()){let r=this.#i[i],n=this.#w(r)?r.__staleWhileFetching:r;if(n!==void 0&&e(n,this.#l[i],this))return this.get(this.#l[i],t)}}forEach(e,t=this){for(let i of this.#x()){let r=this.#i[i],n=this.#w(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(t,n,this.#l[i],this)}}rforEach(e,t=this){for(let i of this.#N()){let r=this.#i[i],n=this.#w(r)?r.__staleWhileFetching:r;n!==void 0&&e.call(t,n,this.#l[i],this)}}purgeStale(){let e=!1;for(let t of this.#N({allowStale:!0}))this.#A(t)&&(this.#d(this.#l[t],"expire"),e=!0);return e}info(e){let t=this.#a.get(e);if(t===void 0)return;let i=this.#i[t],r=this.#w(i)?i.__staleWhileFetching:i;if(r===void 0)return;let n={value:r};if(this.#E&&this.#b){let a=this.#E[t],c=this.#b[t];if(a&&c){let l=a-(qe.now()-c);n.ttl=l,n.start=Date.now()}}return this.#$&&(n.size=this.#$[t]),n}dump(){let e=[];for(let t of this.#x({allowStale:!0})){let i=this.#l[t],r=this.#i[t],n=this.#w(r)?r.__staleWhileFetching:r;if(n===void 0||i===void 0)continue;let a={value:n};if(this.#E&&this.#b){a.ttl=this.#E[t];let c=qe.now()-this.#b[t];a.start=Math.floor(Date.now()-c)}this.#$&&(a.size=this.#$[t]),e.unshift([i,a])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let r=Date.now()-i.start;i.start=qe.now()-r}this.set(t,i.value,i)}}set(e,t,i={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:n,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:c=this.sizeCalculation,status:l}=i,{noUpdateTTL:h=this.noUpdateTTL}=i,u=this.#U(e,t,i.size||0,c);if(this.maxEntrySize&&u>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#d(e,"set"),this;let f=this.#u===0?void 0:this.#a.get(e);if(f===void 0)f=this.#u===0?this.#g:this.#S.length!==0?this.#S.pop():this.#u===this.#e?this.#T(!1):this.#u,this.#l[f]=e,this.#i[f]=t,this.#a.set(e,f),this.#h[this.#g]=f,this.#r[f]=this.#g,this.#g=f,this.#u++,this.#P(f,u,l),l&&(l.set="add"),h=!1;else{this.#k(f);let p=this.#i[f];if(t!==p){if(this.#L&&this.#w(p)){p.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:d}=p;d!==void 0&&!a&&(this.#C&&this.#t?.(d,e,"set"),this.#y&&this.#f?.push([d,e,"set"]))}else a||(this.#C&&this.#t?.(p,e,"set"),this.#y&&this.#f?.push([p,e,"set"]));if(this.#G(f),this.#P(f,u,l),this.#i[f]=t,l){l.set="replace";let d=p&&this.#w(p)?p.__staleWhileFetching:p;d!==void 0&&(l.oldValue=d)}}else l&&(l.set="update")}if(r!==0&&!this.#E&&this.#D(),this.#E&&(h||this.#F(f,r,n),l&&this.#o(l,f)),!a&&this.#y&&this.#f){let p=this.#f,d;for(;d=p?.shift();)this.#n?.(...d)}return this}pop(){try{for(;this.#u;){let e=this.#i[this.#m];if(this.#T(!0),this.#w(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#y&&this.#f){let e=this.#f,t;for(;t=e?.shift();)this.#n?.(...t)}}}#T(e){let t=this.#m,i=this.#l[t],r=this.#i[t];return this.#L&&this.#w(r)?r.__abortController.abort(new Error("evicted")):(this.#C||this.#y)&&(this.#C&&this.#t?.(r,i,"evict"),this.#y&&this.#f?.push([r,i,"evict"])),this.#G(t),e&&(this.#l[t]=void 0,this.#i[t]=void 0,this.#S.push(t)),this.#u===1?(this.#m=this.#g=0,this.#S.length=0):this.#m=this.#h[t],this.#a.delete(i),this.#u--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:r}=t,n=this.#a.get(e);if(n!==void 0){let a=this.#i[n];if(this.#w(a)&&a.__staleWhileFetching===void 0)return!1;if(this.#A(n))r&&(r.has="stale",this.#o(r,n));else return i&&this.#v(n),r&&(r.has="hit",this.#o(r,n)),!0}else r&&(r.has="miss");return!1}peek(e,t={}){let{allowStale:i=this.allowStale}=t,r=this.#a.get(e);if(r===void 0||!i&&this.#A(r))return;let n=this.#i[r];return this.#w(n)?n.__staleWhileFetching:n}#I(e,t,i,r){let n=t===void 0?void 0:this.#i[t];if(this.#w(n))return n;let a=new Ns,{signal:c}=i;c?.addEventListener("abort",()=>a.abort(c.reason),{signal:a.signal});let l={signal:a.signal,options:i,context:r},h=o((m,b=!1)=>{let{aborted:y}=a.signal,C=i.ignoreFetchAbort&&m!==void 0;if(i.status&&(y&&!b?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,C&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),y&&!C&&!b)return f(a.signal.reason);let A=d;return this.#i[t]===d&&(m===void 0?A.__staleWhileFetching?this.#i[t]=A.__staleWhileFetching:this.#d(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,m,l.options))),m},"cb"),u=o(m=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=m),f(m)),"eb"),f=o(m=>{let{aborted:b}=a.signal,y=b&&i.allowStaleOnFetchAbort,C=y||i.allowStaleOnFetchRejection,A=C||i.noDeleteOnFetchRejection,S=d;if(this.#i[t]===d&&(!A||S.__staleWhileFetching===void 0?this.#d(e,"fetch"):y||(this.#i[t]=S.__staleWhileFetching)),C)return i.status&&S.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw m},"fetchFail"),p=o((m,b)=>{let y=this.#c?.(e,n,l);y&&y instanceof Promise&&y.then(C=>m(C===void 0?void 0:C),b),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(m(void 0),i.allowStaleOnFetchAbort&&(m=o(C=>h(C,!0),"res")))})},"pcall");i.status&&(i.status.fetchDispatched=!0);let d=new Promise(p).then(h,u),g=Object.assign(d,{__abortController:a,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.set(e,g,{...l.options,status:void 0}),t=this.#a.get(e)):this.#i[t]=g,g}#w(e){if(!this.#L)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Ns}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:l=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:m,forceRefresh:b=!1,status:y,signal:C}=t;if(!this.#L)return y&&(y.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:n,status:y});let A={allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:n,ttl:a,noDisposeOnSet:c,size:l,sizeCalculation:h,noUpdateTTL:u,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:g,ignoreFetchAbort:d,status:y,signal:C},S=this.#a.get(e);if(S===void 0){y&&(y.fetch="miss");let O=this.#I(e,S,A,m);return O.__returned=O}else{let O=this.#i[S];if(this.#w(O)){let j=i&&O.__staleWhileFetching!==void 0;return y&&(y.fetch="inflight",j&&(y.returnedStale=!0)),j?O.__staleWhileFetching:O.__returned=O}let F=this.#A(S);if(!b&&!F)return y&&(y.fetch="hit"),this.#k(S),r&&this.#v(S),y&&this.#o(y,S),O;let G=this.#I(e,S,A,m),_=G.__staleWhileFetching!==void 0&&i;return y&&(y.fetch=F?"stale":"refresh",_&&F&&(y.returnedStale=!0)),_?G.__staleWhileFetching:G.__returned=G}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#O;if(!i)throw new Error("no memoMethod provided to constructor");let{context:r,forceRefresh:n,...a}=t,c=this.get(e,a);if(!n&&c!==void 0)return c;let l=i(e,c,{options:a,context:r});return this.set(e,l,a),l}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:a}=t,c=this.#a.get(e);if(c!==void 0){let l=this.#i[c],h=this.#w(l);return a&&this.#o(a,c),this.#A(c)?(a&&(a.get="stale"),h?(a&&i&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),i?l.__staleWhileFetching:void 0):(n||this.#d(e,"expire"),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),h?l.__staleWhileFetching:(this.#k(c),r&&this.#v(c),l))}else a&&(a.get="miss")}#M(e,t){this.#r[t]=e,this.#h[e]=t}#k(e){e!==this.#g&&(e===this.#m?this.#m=this.#h[e]:this.#M(this.#r[e],this.#h[e]),this.#M(this.#g,e),this.#g=e)}delete(e){return this.#d(e,"delete")}#d(e,t){let i=!1;if(this.#u!==0){let r=this.#a.get(e);if(r!==void 0)if(i=!0,this.#u===1)this.#q(t);else{this.#G(r);let n=this.#i[r];if(this.#w(n)?n.__abortController.abort(new Error("deleted")):(this.#C||this.#y)&&(this.#C&&this.#t?.(n,e,t),this.#y&&this.#f?.push([n,e,t])),this.#a.delete(e),this.#l[r]=void 0,this.#i[r]=void 0,r===this.#g)this.#g=this.#r[r];else if(r===this.#m)this.#m=this.#h[r];else{let a=this.#r[r];this.#h[a]=this.#h[r];let c=this.#h[r];this.#r[c]=this.#r[r]}this.#u--,this.#S.push(r)}}if(this.#y&&this.#f?.length){let r=this.#f,n;for(;n=r?.shift();)this.#n?.(...n)}return i}clear(){return this.#q("delete")}#q(e){for(let t of this.#N({allowStale:!0})){let i=this.#i[t];if(this.#w(i))i.__abortController.abort(new Error("deleted"));else{let r=this.#l[t];this.#C&&this.#t?.(i,r,e),this.#y&&this.#f?.push([i,r,e])}}if(this.#a.clear(),this.#i.fill(void 0),this.#l.fill(void 0),this.#E&&this.#b&&(this.#E.fill(0),this.#b.fill(0)),this.#$&&this.#$.fill(0),this.#m=0,this.#g=0,this.#S.length=0,this.#p=0,this.#u=0,this.#y&&this.#f){let t=this.#f,i;for(;i=t?.shift();)this.#n?.(...i)}}};Is.LRUCache=nr});var sc=w((XE,tc)=>{"use strict";var ec=V(),am=o((s,e,t,i,r)=>{typeof t=="string"&&(r=i,i=t,t=void 0);try{return new ec(s instanceof ec?s.version:s,t).inc(e,i,r).version}catch{return null}},"inc");tc.exports=am});var nc=w((JE,rc)=>{"use strict";var ic=Oe(),cm=o((s,e)=>{let t=ic(s,null,!0),i=ic(e,null,!0),r=t.compare(i);if(r===0)return null;let n=r>0,a=n?t:i,c=n?i:t,l=!!a.prerelease.length;if(!!c.prerelease.length&&!l){if(!c.patch&&!c.minor)return"major";if(c.compareMain(a)===0)return c.minor&&!c.patch?"minor":"patch"}let u=l?"pre":"";return t.major!==i.major?u+"major":t.minor!==i.minor?u+"minor":t.patch!==i.patch?u+"patch":"prerelease"},"diff");rc.exports=cm});var ac=w((QE,oc)=>{"use strict";var lm=V(),hm=o((s,e)=>new lm(s,e).major,"major");oc.exports=hm});var lc=w((t0,cc)=>{"use strict";var um=V(),fm=o((s,e)=>new um(s,e).minor,"minor");cc.exports=fm});var uc=w((i0,hc)=>{"use strict";var dm=V(),pm=o((s,e)=>new dm(s,e).patch,"patch");hc.exports=pm});var dc=w((n0,fc)=>{"use strict";var mm=Oe(),gm=o((s,e)=>{let t=mm(s,e);return t&&t.prerelease.length?t.prerelease:null},"prerelease");fc.exports=gm});var ne=w((a0,mc)=>{"use strict";var pc=V(),wm=o((s,e,t)=>new pc(s,t).compare(new pc(e,t)),"compare");mc.exports=wm});var wc=w((l0,gc)=>{"use strict";var ym=ne(),bm=o((s,e,t)=>ym(e,s,t),"rcompare");gc.exports=bm});var bc=w((u0,yc)=>{"use strict";var Sm=ne(),Em=o((s,e)=>Sm(s,e,!0),"compareLoose");yc.exports=Em});var _s=w((d0,Ec)=>{"use strict";var Sc=V(),Lm=o((s,e,t)=>{let i=new Sc(s,t),r=new Sc(e,t);return i.compare(r)||i.compareBuild(r)},"compareBuild");Ec.exports=Lm});var vc=w((m0,Lc)=>{"use strict";var vm=_s(),Cm=o((s,e)=>s.sort((t,i)=>vm(t,i,e)),"sort");Lc.exports=Cm});var Ac=w((w0,Cc)=>{"use strict";var Am=_s(),$m=o((s,e)=>s.sort((t,i)=>Am(i,t,e)),"rsort");Cc.exports=$m});var vt=w((b0,$c)=>{"use strict";var Om=ne(),Pm=o((s,e,t)=>Om(s,e,t)>0,"gt");$c.exports=Pm});var Fs=w((E0,Oc)=>{"use strict";var Rm=ne(),Dm=o((s,e,t)=>Rm(s,e,t)<0,"lt");Oc.exports=Dm});var ar=w((v0,Pc)=>{"use strict";var xm=ne(),Tm=o((s,e,t)=>xm(s,e,t)===0,"eq");Pc.exports=Tm});var cr=w((A0,Rc)=>{"use strict";var Nm=ne(),Im=o((s,e,t)=>Nm(s,e,t)!==0,"neq");Rc.exports=Im});var Gs=w((O0,Dc)=>{"use strict";var _m=ne(),Fm=o((s,e,t)=>_m(s,e,t)>=0,"gte");Dc.exports=Fm});var js=w((R0,xc)=>{"use strict";var Gm=ne(),jm=o((s,e,t)=>Gm(s,e,t)<=0,"lte");xc.exports=jm});var lr=w((x0,Tc)=>{"use strict";var Mm=ar(),km=cr(),Um=vt(),qm=Gs(),Bm=Fs(),Wm=js(),zm=o((s,e,t,i)=>{switch(e){case"===":return typeof s=="object"&&(s=s.version),typeof t=="object"&&(t=t.version),s===t;case"!==":return typeof s=="object"&&(s=s.version),typeof t=="object"&&(t=t.version),s!==t;case"":case"=":case"==":return Mm(s,t,i);case"!=":return km(s,t,i);case">":return Um(s,t,i);case">=":return qm(s,t,i);case"<":return Bm(s,t,i);case"<=":return Wm(s,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");Tc.exports=zm});var Ic=w((N0,Nc)=>{"use strict";var Hm=V(),Vm=Oe(),{safeRe:Ms,t:ks}=_e(),Ym=o((s,e)=>{if(s instanceof Hm)return s;if(typeof s=="number"&&(s=String(s)),typeof s!="string")return null;e=e||{};let t=null;if(!e.rtl)t=s.match(e.includePrerelease?Ms[ks.COERCEFULL]:Ms[ks.COERCE]);else{let l=e.includePrerelease?Ms[ks.COERCERTLFULL]:Ms[ks.COERCERTL],h;for(;(h=l.exec(s))&&(!t||t.index+t[0].length!==s.length);)(!t||h.index+h[0].length!==t.index+t[0].length)&&(t=h),l.lastIndex=h.index+h[1].length+h[2].length;l.lastIndex=-1}if(t===null)return null;let i=t[2],r=t[3]||"0",n=t[4]||"0",a=e.includePrerelease&&t[5]?`-${t[5]}`:"",c=e.includePrerelease&&t[6]?`+${t[6]}`:"";return Vm(`${i}.${r}.${n}${a}${c}`,e)},"coerce");Nc.exports=Ym});var Fc=w((_0,_c)=>{"use strict";var hr=class{static{o(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let r=this.map.keys().next().value;this.delete(r)}this.map.set(e,t)}return this}};_c.exports=hr});var oe=w((G0,kc)=>{"use strict";var Xm=/\s+/g,ur=class s{static{o(this,"Range")}constructor(e,t){if(t=Jm(t),e instanceof s)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new s(e.raw,t);if(e instanceof fr)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().replace(Xm," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(r=>!jc(r[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let r of this.set)if(r.length===1&&rg(r[0])){this.set=[r];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let t=this.set[e];for(let i=0;i<t.length;i++)i>0&&(this.formatted+=" "),this.formatted+=t[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let i=((this.options.includePrerelease&&sg)|(this.options.loose&&ig))+":"+e,r=Gc.get(i);if(r)return r;let n=this.options.loose,a=n?Q[J.HYPHENRANGELOOSE]:Q[J.HYPHENRANGE];e=e.replace(a,pg(this.options.includePrerelease)),N("hyphen replace",e),e=e.replace(Q[J.COMPARATORTRIM],Qm),N("comparator trim",e),e=e.replace(Q[J.TILDETRIM],eg),N("tilde trim",e),e=e.replace(Q[J.CARETTRIM],tg),N("caret trim",e);let c=e.split(" ").map(f=>ng(f,this.options)).join(" ").split(/\s+/).map(f=>dg(f,this.options));n&&(c=c.filter(f=>(N("loose invalid filter",f,this.options),!!f.match(Q[J.COMPARATORLOOSE])))),N("range list",c);let l=new Map,h=c.map(f=>new fr(f,this.options));for(let f of h){if(jc(f))return[f];l.set(f.value,f)}l.size>1&&l.has("")&&l.delete("");let u=[...l.values()];return Gc.set(i,u),u}intersects(e,t){if(!(e instanceof s))throw new TypeError("a Range is required");return this.set.some(i=>Mc(i,t)&&e.set.some(r=>Mc(r,t)&&i.every(n=>r.every(a=>n.intersects(a,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Zm(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(mg(this.set[t],e,this.options))return!0;return!1}};kc.exports=ur;var Km=Fc(),Gc=new Km,Jm=Wt(),fr=Ct(),N=Ze(),Zm=V(),{safeRe:Q,t:J,comparatorTrimReplace:Qm,tildeTrimReplace:eg,caretTrimReplace:tg}=_e(),{FLAG_INCLUDE_PRERELEASE:sg,FLAG_LOOSE:ig}=Qe(),jc=o(s=>s.value==="<0.0.0-0","isNullSet"),rg=o(s=>s.value==="","isAny"),Mc=o((s,e)=>{let t=!0,i=s.slice(),r=i.pop();for(;t&&i.length;)t=i.every(n=>r.intersects(n,e)),r=i.pop();return t},"isSatisfiable"),ng=o((s,e)=>(N("comp",s,e),s=cg(s,e),N("caret",s),s=og(s,e),N("tildes",s),s=hg(s,e),N("xrange",s),s=fg(s,e),N("stars",s),s),"parseComparator"),Z=o(s=>!s||s.toLowerCase()==="x"||s==="*","isX"),og=o((s,e)=>s.trim().split(/\s+/).map(t=>ag(t,e)).join(" "),"replaceTildes"),ag=o((s,e)=>{let t=e.loose?Q[J.TILDELOOSE]:Q[J.TILDE];return s.replace(t,(i,r,n,a,c)=>{N("tilde",s,i,r,n,a,c);let l;return Z(r)?l="":Z(n)?l=`>=${r}.0.0 <${+r+1}.0.0-0`:Z(a)?l=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:c?(N("replaceTilde pr",c),l=`>=${r}.${n}.${a}-${c} <${r}.${+n+1}.0-0`):l=`>=${r}.${n}.${a} <${r}.${+n+1}.0-0`,N("tilde return",l),l})},"replaceTilde"),cg=o((s,e)=>s.trim().split(/\s+/).map(t=>lg(t,e)).join(" "),"replaceCarets"),lg=o((s,e)=>{N("caret",s,e);let t=e.loose?Q[J.CARETLOOSE]:Q[J.CARET],i=e.includePrerelease?"-0":"";return s.replace(t,(r,n,a,c,l)=>{N("caret",s,r,n,a,c,l);let h;return Z(n)?h="":Z(a)?h=`>=${n}.0.0${i} <${+n+1}.0.0-0`:Z(c)?n==="0"?h=`>=${n}.${a}.0${i} <${n}.${+a+1}.0-0`:h=`>=${n}.${a}.0${i} <${+n+1}.0.0-0`:l?(N("replaceCaret pr",l),n==="0"?a==="0"?h=`>=${n}.${a}.${c}-${l} <${n}.${a}.${+c+1}-0`:h=`>=${n}.${a}.${c}-${l} <${n}.${+a+1}.0-0`:h=`>=${n}.${a}.${c}-${l} <${+n+1}.0.0-0`):(N("no pr"),n==="0"?a==="0"?h=`>=${n}.${a}.${c}${i} <${n}.${a}.${+c+1}-0`:h=`>=${n}.${a}.${c}${i} <${n}.${+a+1}.0-0`:h=`>=${n}.${a}.${c} <${+n+1}.0.0-0`),N("caret return",h),h})},"replaceCaret"),hg=o((s,e)=>(N("replaceXRanges",s,e),s.split(/\s+/).map(t=>ug(t,e)).join(" ")),"replaceXRanges"),ug=o((s,e)=>{s=s.trim();let t=e.loose?Q[J.XRANGELOOSE]:Q[J.XRANGE];return s.replace(t,(i,r,n,a,c,l)=>{N("xRange",s,i,r,n,a,c,l);let h=Z(n),u=h||Z(a),f=u||Z(c),p=f;return r==="="&&p&&(r=""),l=e.includePrerelease?"-0":"",h?r===">"||r==="<"?i="<0.0.0-0":i="*":r&&p?(u&&(a=0),c=0,r===">"?(r=">=",u?(n=+n+1,a=0,c=0):(a=+a+1,c=0)):r==="<="&&(r="<",u?n=+n+1:a=+a+1),r==="<"&&(l="-0"),i=`${r+n}.${a}.${c}${l}`):u?i=`>=${n}.0.0${l} <${+n+1}.0.0-0`:f&&(i=`>=${n}.${a}.0${l} <${n}.${+a+1}.0-0`),N("xRange return",i),i})},"replaceXRange"),fg=o((s,e)=>(N("replaceStars",s,e),s.trim().replace(Q[J.STAR],"")),"replaceStars"),dg=o((s,e)=>(N("replaceGTE0",s,e),s.trim().replace(Q[e.includePrerelease?J.GTE0PRE:J.GTE0],"")),"replaceGTE0"),pg=o(s=>(e,t,i,r,n,a,c,l,h,u,f,p)=>(Z(i)?t="":Z(r)?t=`>=${i}.0.0${s?"-0":""}`:Z(n)?t=`>=${i}.${r}.0${s?"-0":""}`:a?t=`>=${t}`:t=`>=${t}${s?"-0":""}`,Z(h)?l="":Z(u)?l=`<${+h+1}.0.0-0`:Z(f)?l=`<${h}.${+u+1}.0-0`:p?l=`<=${h}.${u}.${f}-${p}`:s?l=`<${h}.${u}.${+f+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),"hyphenReplace"),mg=o((s,e,t)=>{for(let i=0;i<s.length;i++)if(!s[i].test(e))return!1;if(e.prerelease.length&&!t.includePrerelease){for(let i=0;i<s.length;i++)if(N(s[i].semver),s[i].semver!==fr.ANY&&s[i].semver.prerelease.length>0){let r=s[i].semver;if(r.major===e.major&&r.minor===e.minor&&r.patch===e.patch)return!0}return!1}return!0},"testSet")});var Ct=w((M0,Hc)=>{"use strict";var At=Symbol("SemVer ANY"),mr=class s{static{o(this,"Comparator")}static get ANY(){return At}constructor(e,t){if(t=Uc(t),e instanceof s){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),pr("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===At?this.value="":this.value=this.operator+this.semver.version,pr("comp",this)}parse(e){let t=this.options.loose?qc[Bc.COMPARATORLOOSE]:qc[Bc.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new Wc(i[2],this.options.loose):this.semver=At}toString(){return this.value}test(e){if(pr("Comparator.test",e,this.options.loose),this.semver===At||e===At)return!0;if(typeof e=="string")try{e=new Wc(e,this.options)}catch{return!1}return dr(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof s))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new zc(e.value,t).test(this.value):e.operator===""?e.value===""?!0:new zc(this.value,t).test(e.semver):(t=Uc(t),t.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||dr(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||dr(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Hc.exports=mr;var Uc=Wt(),{safeRe:qc,t:Bc}=_e(),dr=lr(),pr=Ze(),Wc=V(),zc=oe()});var We=w((U0,Vc)=>{"use strict";var gg=oe(),wg=o((s,e,t)=>{try{e=new gg(e,t)}catch{return!1}return e.test(s)},"satisfies");Vc.exports=wg});var Xc=w((B0,Yc)=>{"use strict";var yg=oe(),bg=o((s,e)=>new yg(s,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" ")),"toComparators");Yc.exports=bg});var Jc=w((z0,Kc)=>{"use strict";var Sg=V(),Eg=oe(),Lg=o((s,e,t)=>{let i=null,r=null,n=null;try{n=new Eg(e,t)}catch{return null}return s.forEach(a=>{n.test(a)&&(!i||r.compare(a)===-1)&&(i=a,r=new Sg(i,t))}),i},"maxSatisfying");Kc.exports=Lg});var Qc=w((V0,Zc)=>{"use strict";var vg=V(),Cg=oe(),Ag=o((s,e,t)=>{let i=null,r=null,n=null;try{n=new Cg(e,t)}catch{return null}return s.forEach(a=>{n.test(a)&&(!i||r.compare(a)===1)&&(i=a,r=new vg(i,t))}),i},"minSatisfying");Zc.exports=Ag});var sl=w((X0,tl)=>{"use strict";var gr=V(),$g=oe(),el=vt(),Og=o((s,e)=>{s=new $g(s,e);let t=new gr("0.0.0");if(s.test(t)||(t=new gr("0.0.0-0"),s.test(t)))return t;t=null;for(let i=0;i<s.set.length;++i){let r=s.set[i],n=null;r.forEach(a=>{let c=new gr(a.semver.version);switch(a.operator){case">":c.prerelease.length===0?c.patch++:c.prerelease.push(0),c.raw=c.format();case"":case">=":(!n||el(c,n))&&(n=c);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),n&&(!t||el(t,n))&&(t=n)}return t&&s.test(t)?t:null},"minVersion");tl.exports=Og});var wr=w((J0,il)=>{"use strict";var Pg=oe(),Rg=o((s,e)=>{try{return new Pg(s,e).range||"*"}catch{return null}},"validRange");il.exports=Rg});var Us=w((Q0,al)=>{"use strict";var Dg=V(),ol=Ct(),{ANY:xg}=ol,Tg=oe(),Ng=We(),rl=vt(),nl=Fs(),Ig=js(),_g=Gs(),Fg=o((s,e,t,i)=>{s=new Dg(s,i),e=new Tg(e,i);let r,n,a,c,l;switch(t){case">":r=rl,n=Ig,a=nl,c=">",l=">=";break;case"<":r=nl,n=_g,a=rl,c="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ng(s,e,i))return!1;for(let h=0;h<e.set.length;++h){let u=e.set[h],f=null,p=null;if(u.forEach(d=>{d.semver===xg&&(d=new ol(">=0.0.0")),f=f||d,p=p||d,r(d.semver,f.semver,i)?f=d:a(d.semver,p.semver,i)&&(p=d)}),f.operator===c||f.operator===l||(!p.operator||p.operator===c)&&n(s,p.semver))return!1;if(p.operator===l&&a(s,p.semver))return!1}return!0},"outside");al.exports=Fg});var ll=w((tL,cl)=>{"use strict";var Gg=Us(),jg=o((s,e,t)=>Gg(s,e,">",t),"gtr");cl.exports=jg});var ul=w((iL,hl)=>{"use strict";var Mg=Us(),kg=o((s,e,t)=>Mg(s,e,"<",t),"ltr");hl.exports=kg});var pl=w((nL,dl)=>{"use strict";var fl=oe(),Ug=o((s,e,t)=>(s=new fl(s,t),e=new fl(e,t),s.intersects(e,t)),"intersects");dl.exports=Ug});var gl=w((aL,ml)=>{"use strict";var qg=We(),Bg=ne();ml.exports=(s,e,t)=>{let i=[],r=null,n=null,a=s.sort((u,f)=>Bg(u,f,t));for(let u of a)qg(u,e,t)?(n=u,r||(r=u)):(n&&i.push([r,n]),n=null,r=null);r&&i.push([r,null]);let c=[];for(let[u,f]of i)u===f?c.push(u):!f&&u===a[0]?c.push("*"):f?u===a[0]?c.push(`<=${f}`):c.push(`${u} - ${f}`):c.push(`>=${u}`);let l=c.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return l.length<h.length?l:e}});var Ll=w((cL,El)=>{"use strict";var wl=oe(),br=Ct(),{ANY:yr}=br,$t=We(),Sr=ne(),Wg=o((s,e,t={})=>{if(s===e)return!0;s=new wl(s,t),e=new wl(e,t);let i=!1;e:for(let r of s.set){for(let n of e.set){let a=Hg(r,n,t);if(i=i||a!==null,a)continue e}if(i)return!1}return!0},"subset"),zg=[new br(">=0.0.0-0")],yl=[new br(">=0.0.0")],Hg=o((s,e,t)=>{if(s===e)return!0;if(s.length===1&&s[0].semver===yr){if(e.length===1&&e[0].semver===yr)return!0;t.includePrerelease?s=zg:s=yl}if(e.length===1&&e[0].semver===yr){if(t.includePrerelease)return!0;e=yl}let i=new Set,r,n;for(let d of s)d.operator===">"||d.operator===">="?r=bl(r,d,t):d.operator==="<"||d.operator==="<="?n=Sl(n,d,t):i.add(d.semver);if(i.size>1)return null;let a;if(r&&n){if(a=Sr(r.semver,n.semver,t),a>0)return null;if(a===0&&(r.operator!==">="||n.operator!=="<="))return null}for(let d of i){if(r&&!$t(d,String(r),t)||n&&!$t(d,String(n),t))return null;for(let g of e)if(!$t(d,String(g),t))return!1;return!0}let c,l,h,u,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1,p=r&&!t.includePrerelease&&r.semver.prerelease.length?r.semver:!1;f&&f.prerelease.length===1&&n.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let d of e){if(u=u||d.operator===">"||d.operator===">=",h=h||d.operator==="<"||d.operator==="<=",r){if(p&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===p.major&&d.semver.minor===p.minor&&d.semver.patch===p.patch&&(p=!1),d.operator===">"||d.operator===">="){if(c=bl(r,d,t),c===d&&c!==r)return!1}else if(r.operator===">="&&!$t(r.semver,String(d),t))return!1}if(n){if(f&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===f.major&&d.semver.minor===f.minor&&d.semver.patch===f.patch&&(f=!1),d.operator==="<"||d.operator==="<="){if(l=Sl(n,d,t),l===d&&l!==n)return!1}else if(n.operator==="<="&&!$t(n.semver,String(d),t))return!1}if(!d.operator&&(n||r)&&a!==0)return!1}return!(r&&h&&!n&&a!==0||n&&u&&!r&&a!==0||p||f)},"simpleSubset"),bl=o((s,e,t)=>{if(!s)return e;let i=Sr(s.semver,e.semver,t);return i>0?s:i<0||e.operator===">"&&s.operator===">="?e:s},"higherGT"),Sl=o((s,e,t)=>{if(!s)return e;let i=Sr(s.semver,e.semver,t);return i<0?s:i>0||e.operator==="<"&&s.operator==="<="?e:s},"lowerLT");El.exports=Wg});var Ot=w((hL,Al)=>{"use strict";var Er=_e(),vl=Qe(),Vg=V(),Cl=Qs(),Yg=Oe(),Xg=ti(),Kg=si(),Jg=sc(),Zg=nc(),Qg=ac(),ew=lc(),tw=uc(),sw=dc(),iw=ne(),rw=wc(),nw=bc(),ow=_s(),aw=vc(),cw=Ac(),lw=vt(),hw=Fs(),uw=ar(),fw=cr(),dw=Gs(),pw=js(),mw=lr(),gw=Ic(),ww=Ct(),yw=oe(),bw=We(),Sw=Xc(),Ew=Jc(),Lw=Qc(),vw=sl(),Cw=wr(),Aw=Us(),$w=ll(),Ow=ul(),Pw=pl(),Rw=gl(),Dw=Ll();Al.exports={parse:Yg,valid:Xg,clean:Kg,inc:Jg,diff:Zg,major:Qg,minor:ew,patch:tw,prerelease:sw,compare:iw,rcompare:rw,compareLoose:nw,compareBuild:ow,sort:aw,rsort:cw,gt:lw,lt:hw,eq:uw,neq:fw,gte:dw,lte:pw,cmp:mw,coerce:gw,Comparator:ww,Range:yw,satisfies:bw,toComparators:Sw,maxSatisfying:Ew,minSatisfying:Lw,minVersion:vw,validRange:Cw,outside:Aw,gtr:$w,ltr:Ow,intersects:Pw,simplifyRange:Rw,subset:Dw,SemVer:Vg,re:Er.re,src:Er.src,tokens:Er.t,SEMVER_SPEC_VERSION:vl.SEMVER_SPEC_VERSION,RELEASE_TYPES:vl.RELEASE_TYPES,compareIdentifiers:Cl.compareIdentifiers,rcompareIdentifiers:Cl.rcompareIdentifiers}});var Pl=w((uL,Ol)=>{var $l=Ot();Ol.exports=s=>xw(s.reduce(Gw,{versions:{},"dist-tags":{},refs:{},shas:{}}));var xw=o(s=>Iw(Tw(Nw(s))),"finish"),Tw=o(s=>(Object.keys(s.refs).forEach(e=>{let t=s.refs[e];s.shas[t.sha]?s.shas[t.sha].push(e):s.shas[t.sha]=[e]}),s),"shaList"),Nw=o(s=>(Object.keys(s.refs).filter(e=>e.endsWith("^{}")).forEach(e=>{let t=s.refs[e],i=s.refs[e.replace(/\^\{\}$/,"")];i&&(i.sha=t.sha,delete s.refs[e])}),s),"peelTags"),Iw=o(s=>{let e=s.refs.HEAD||{};return Object.keys(s.versions).forEach(i=>{let r=s.versions[i];s.refs.latest&&r.sha===s.refs.latest.sha?s["dist-tags"].latest=i:r.sha===e.sha&&(s["dist-tags"].HEAD=i,s.refs.latest||(s["dist-tags"].latest=i))}),s},"distTags"),_w=o(s=>s.startsWith("refs/tags/")?"tag":s.startsWith("refs/heads/")?"branch":s.startsWith("refs/pull/")?"pull":s==="HEAD"?"head":"other","refType"),Fw=o(s=>{let e=s.trim().split(/\s+/,2);if(e.length<2)return null;let t=e[0].trim(),i=e[1].trim(),r=_w(i);if(r==="tag"){let n=i.slice(10);return{sha:t,ref:n,rawRef:i,type:r}}if(r==="branch"){let n=i.slice(11);return{sha:t,ref:n,rawRef:i,type:r}}if(r==="pull"){let n=i.slice(5).replace(/\/head$/,"");return{sha:t,ref:n,rawRef:i,type:r}}return r==="head"?{sha:t,ref:"HEAD",rawRef:i,type:r}:{sha:t,ref:i,rawRef:i,type:r}},"lineToRevDoc"),Gw=o((s,e)=>{let t=Fw(e);if(!t)return s;if(s.refs[t.ref]=t,s.refs[t.rawRef]=t,t.type==="tag"){let i=!t.ref.endsWith("^{}")&&t.ref.match(/v?(\d+\.\d+\.\d+(?:[-+].+)?)$/);i&&$l.valid(i[1],!0)&&(s.versions[$l.clean(i[1],!0)]=t)}return s},"linesToRevsReducer")});var Lr=w((dL,Dl)=>{var jw=Lt(),{LRUCache:Mw}=or(),kw=Pl(),Rl=new Mw({max:100,ttl:300*1e3});Dl.exports=async(s,e={})=>{if(!e.noGitRevCache){let r=Rl.get(s);if(r)return r}let{stdout:t}=await jw(["ls-remote",s],e),i=kw(t.trim().split(`
13
+ `));return Rl.set(s,i),i}});var Tl=w(xl=>{var Uw=o(s=>(s.fakePlatform||process.platform)==="win32","isWindows");xl.isWindows=Uw});var _l=w((gL,Il)=>{"use strict";var D=o((...s)=>s.every(e=>e)?s.join(""):"","maybeJoin"),U=o(s=>s?encodeURIComponent(s):"","maybeEncode"),Nl=o(s=>s.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),"formatHashFragment"),qw={sshtemplate:o(({domain:s,user:e,project:t,committish:i})=>`git@${s}:${e}/${t}.git${D("#",i)}`,"sshtemplate"),sshurltemplate:o(({domain:s,user:e,project:t,committish:i})=>`git+ssh://git@${s}/${e}/${t}.git${D("#",i)}`,"sshurltemplate"),edittemplate:o(({domain:s,user:e,project:t,committish:i,editpath:r,path:n})=>`https://${s}/${e}/${t}${D("/",r,"/",U(i||"HEAD"),"/",n)}`,"edittemplate"),browsetemplate:o(({domain:s,user:e,project:t,committish:i,treepath:r})=>`https://${s}/${e}/${t}${D("/",r,"/",U(i))}`,"browsetemplate"),browsetreetemplate:o(({domain:s,user:e,project:t,committish:i,treepath:r,path:n,fragment:a,hashformat:c})=>`https://${s}/${e}/${t}/${r}/${U(i||"HEAD")}/${n}${D("#",c(a||""))}`,"browsetreetemplate"),browseblobtemplate:o(({domain:s,user:e,project:t,committish:i,blobpath:r,path:n,fragment:a,hashformat:c})=>`https://${s}/${e}/${t}/${r}/${U(i||"HEAD")}/${n}${D("#",c(a||""))}`,"browseblobtemplate"),docstemplate:o(({domain:s,user:e,project:t,treepath:i,committish:r})=>`https://${s}/${e}/${t}${D("/",i,"/",U(r))}#readme`,"docstemplate"),httpstemplate:o(({auth:s,domain:e,user:t,project:i,committish:r})=>`git+https://${D(s,"@")}${e}/${t}/${i}.git${D("#",r)}`,"httpstemplate"),filetemplate:o(({domain:s,user:e,project:t,committish:i,path:r})=>`https://${s}/${e}/${t}/raw/${U(i||"HEAD")}/${r}`,"filetemplate"),shortcuttemplate:o(({type:s,user:e,project:t,committish:i})=>`${s}:${e}/${t}${D("#",i)}`,"shortcuttemplate"),pathtemplate:o(({user:s,project:e,committish:t})=>`${s}/${e}${D("#",t)}`,"pathtemplate"),bugstemplate:o(({domain:s,user:e,project:t})=>`https://${s}/${e}/${t}/issues`,"bugstemplate"),hashformat:Nl},Ce={};Ce.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:o(({auth:s,user:e,project:t,committish:i,path:r})=>`https://${D(s,"@")}raw.githubusercontent.com/${e}/${t}/${U(i||"HEAD")}/${r}`,"filetemplate"),gittemplate:o(({auth:s,domain:e,user:t,project:i,committish:r})=>`git://${D(s,"@")}${e}/${t}/${i}.git${D("#",r)}`,"gittemplate"),tarballtemplate:o(({domain:s,user:e,project:t,committish:i})=>`https://codeload.${s}/${e}/${t}/tar.gz/${U(i||"HEAD")}`,"tarballtemplate"),extract:o(s=>{let[,e,t,i,r]=s.pathname.split("/",5);if(!(i&&i!=="tree")&&(i||(r=s.hash.slice(1)),t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:r}},"extract")};Ce.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:o(({domain:s,user:e,project:t,committish:i,treepath:r,path:n,editpath:a})=>`https://${s}/${e}/${t}${D("/",r,"/",U(i||"HEAD"),"/",n,a)}`,"edittemplate"),tarballtemplate:o(({domain:s,user:e,project:t,committish:i})=>`https://${s}/${e}/${t}/get/${U(i||"HEAD")}.tar.gz`,"tarballtemplate"),extract:o(s=>{let[,e,t,i]=s.pathname.split("/",4);if(!["get"].includes(i)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:s.hash.slice(1)}},"extract")};Ce.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:o(({auth:s,domain:e,user:t,project:i,committish:r})=>`git+https://${D(s,"@")}${e}/${t}/${i}.git${D("#",r)}`,"httpstemplate"),tarballtemplate:o(({domain:s,user:e,project:t,committish:i})=>`https://${s}/${e}/${t}/repository/archive.tar.gz?ref=${U(i||"HEAD")}`,"tarballtemplate"),extract:o(s=>{let e=s.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let t=e.split("/"),i=t.pop();i.endsWith(".git")&&(i=i.slice(0,-4));let r=t.join("/");if(!(!r||!i))return{user:r,project:i,committish:s.hash.slice(1)}},"extract")};Ce.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:o(({domain:s,project:e,committish:t})=>`git@${s}:${e}.git${D("#",t)}`,"sshtemplate"),sshurltemplate:o(({domain:s,project:e,committish:t})=>`git+ssh://git@${s}/${e}.git${D("#",t)}`,"sshurltemplate"),edittemplate:o(({domain:s,user:e,project:t,committish:i,editpath:r})=>`https://${s}/${e}/${t}${D("/",U(i))}/${r}`,"edittemplate"),browsetemplate:o(({domain:s,project:e,committish:t})=>`https://${s}/${e}${D("/",U(t))}`,"browsetemplate"),browsetreetemplate:o(({domain:s,project:e,committish:t,path:i,hashformat:r})=>`https://${s}/${e}${D("/",U(t))}${D("#",r(i))}`,"browsetreetemplate"),browseblobtemplate:o(({domain:s,project:e,committish:t,path:i,hashformat:r})=>`https://${s}/${e}${D("/",U(t))}${D("#",r(i))}`,"browseblobtemplate"),docstemplate:o(({domain:s,project:e,committish:t})=>`https://${s}/${e}${D("/",U(t))}`,"docstemplate"),httpstemplate:o(({domain:s,project:e,committish:t})=>`git+https://${s}/${e}.git${D("#",t)}`,"httpstemplate"),filetemplate:o(({user:s,project:e,committish:t,path:i})=>`https://gist.githubusercontent.com/${s}/${e}/raw${D("/",U(t))}/${i}`,"filetemplate"),shortcuttemplate:o(({type:s,project:e,committish:t})=>`${s}:${e}${D("#",t)}`,"shortcuttemplate"),pathtemplate:o(({project:s,committish:e})=>`${s}${D("#",e)}`,"pathtemplate"),bugstemplate:o(({domain:s,project:e})=>`https://${s}/${e}`,"bugstemplate"),gittemplate:o(({domain:s,project:e,committish:t})=>`git://${s}/${e}.git${D("#",t)}`,"gittemplate"),tarballtemplate:o(({project:s,committish:e})=>`https://codeload.github.com/gist/${s}/tar.gz/${U(e||"HEAD")}`,"tarballtemplate"),extract:o(s=>{let[,e,t,i]=s.pathname.split("/",4);if(i!=="raw"){if(!t){if(!e)return;t=e,e=null}return t.endsWith(".git")&&(t=t.slice(0,-4)),{user:e,project:t,committish:s.hash.slice(1)}}},"extract"),hashformat:o(function(s){return s&&"file-"+Nl(s)},"hashformat")};Ce.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:o(({domain:s,user:e,project:t,committish:i,path:r})=>`https://${s}/${e}/${t}/blob/${U(i)||"HEAD"}/${r}`,"filetemplate"),httpstemplate:o(({domain:s,user:e,project:t,committish:i})=>`https://${s}/${e}/${t}.git${D("#",i)}`,"httpstemplate"),tarballtemplate:o(({domain:s,user:e,project:t,committish:i})=>`https://${s}/${e}/${t}/archive/${U(i)||"HEAD"}.tar.gz`,"tarballtemplate"),bugstemplate:o(()=>null,"bugstemplate"),extract:o(s=>{let[,e,t,i]=s.pathname.split("/",4);if(!["archive"].includes(i)&&(t&&t.endsWith(".git")&&(t=t.slice(0,-4)),!(!e||!t)))return{user:e,project:t,committish:s.hash.slice(1)}},"extract")};for(let[s,e]of Object.entries(Ce))Ce[s]=Object.assign({},qw,e);Il.exports=Ce});var Cr=w((yL,Gl)=>{var Bw=require("url"),vr=o((s,e,t)=>{let i=s.indexOf(t);return s.lastIndexOf(e,i>-1?i:1/0)},"lastIndexOfBefore"),Fl=o(s=>{try{return new Bw.URL(s)}catch{}},"safeUrl"),Ww=o((s,e)=>{let t=s.indexOf(":"),i=s.slice(0,t+1);if(Object.prototype.hasOwnProperty.call(e,i))return s;let r=s.indexOf("@");return r>-1?r>t?`git+ssh://${s}`:s:s.indexOf("//")===t+1?s:`${s.slice(0,t+1)}//${s.slice(t+1)}`},"correctProtocol"),zw=o(s=>{let e=vr(s,"@","#"),t=vr(s,":","#");return t>e&&(s=s.slice(0,t)+"/"+s.slice(t+1)),vr(s,":","#")===-1&&s.indexOf("//")===-1&&(s=`git+ssh://${s}`),s},"correctUrl");Gl.exports=(s,e)=>{let t=e?Ww(s,e):s;return Fl(t)||Fl(zw(t))}});var Ml=w((SL,jl)=>{"use strict";var Hw=Cr(),Vw=o(s=>{let e=s.indexOf("#"),t=s.indexOf("/"),i=s.indexOf("/",t+1),r=s.indexOf(":"),n=/\s/.exec(s),a=s.indexOf("@"),c=!n||e>-1&&n.index>e,l=a===-1||e>-1&&a>e,h=r===-1||e>-1&&r>e,u=i===-1||e>-1&&i>e,f=t>0,p=e>-1?s[e-1]!=="/":!s.endsWith("/"),d=!s.startsWith(".");return c&&f&&p&&d&&l&&h&&u},"isGitHubShorthand");jl.exports=(s,e,{gitHosts:t,protocols:i})=>{if(!s)return;let r=Vw(s)?`github:${s}`:s,n=Hw(r,i);if(!n)return;let a=t.byShortcut[n.protocol],c=t.byDomain[n.hostname.startsWith("www.")?n.hostname.slice(4):n.hostname],l=a||c;if(!l)return;let h=t[a||c],u=null;i[n.protocol]?.auth&&(n.username||n.password)&&(u=`${n.username}${n.password?":"+n.password:""}`);let f=null,p=null,d=null,g=null;try{if(a){let m=n.pathname.startsWith("/")?n.pathname.slice(1):n.pathname,b=m.indexOf("@");b>-1&&(m=m.slice(b+1));let y=m.lastIndexOf("/");y>-1?(p=decodeURIComponent(m.slice(0,y)),p||(p=null),d=decodeURIComponent(m.slice(y+1))):d=decodeURIComponent(m),d.endsWith(".git")&&(d=d.slice(0,-4)),n.hash&&(f=decodeURIComponent(n.hash.slice(1))),g="shortcut"}else{if(!h.protocols.includes(n.protocol))return;let m=h.extract(n);if(!m)return;p=m.user&&decodeURIComponent(m.user),d=decodeURIComponent(m.project),f=decodeURIComponent(m.committish),g=i[n.protocol]?.name||n.protocol.slice(0,-1)}}catch(m){if(m instanceof URIError)return;throw m}return[l,p,u,d,f,g,e]}});var Ul=w((LL,kl)=>{"use strict";var{LRUCache:Yw}=or(),Xw=_l(),Kw=Ml(),Jw=Cr(),Ar=new Yw({max:1e3});function Zw(s){try{let{protocol:e,hostname:t,pathname:i}=new URL(s);if(!t)return null;let r=/(?:git\+)http:$/.test(e)?"http:":"https:",n=i.replace(/\.git$/,"");return`${r}//${t}${n}`}catch{return null}}o(Zw,"unknownHostedUrl");var qs=class s{static{o(this,"GitHost")}constructor(e,t,i,r,n,a,c={}){Object.assign(this,s.#e[e],{type:e,user:t,auth:i,project:r,committish:n,default:a,opts:c})}static#e={byShortcut:{},byDomain:{}};static#s={"git+ssh:":{name:"sshurl"},"ssh:":{name:"sshurl"},"git+https:":{name:"https",auth:!0},"git:":{auth:!0},"http:":{auth:!0},"https:":{auth:!0},"git+http:":{auth:!0}};static addHost(e,t){s.#e[e]=t,s.#e.byDomain[t.domain]=e,s.#e.byShortcut[`${e}:`]=e,s.#s[`${e}:`]={name:e}}static fromUrl(e,t){if(typeof e!="string")return;let i=e+JSON.stringify(t||{});if(!Ar.has(i)){let r=Kw(e,t,{gitHosts:s.#e,protocols:s.#s});Ar.set(i,r?new s(...r):void 0)}return Ar.get(i)}static fromManifest(e,t={}){if(!e||typeof e!="object")return;let i=e.repository,r=i&&(typeof i=="string"?i:typeof i=="object"&&typeof i.url=="string"?i.url:null);if(!r)throw new Error("no repository");let n=r&&s.fromUrl(r.replace(/^git\+/,""),t)||null;if(n)return n;let a=Zw(r);return s.fromUrl(a,t)||a}static parseUrl(e){return Jw(e)}#t(e,t){if(typeof e!="function")return null;let i={...this,...this.opts,...t};i.path||(i.path=""),i.path.startsWith("/")&&(i.path=i.path.slice(1)),i.noCommittish&&(i.committish=null);let r=e(i);return i.noGitPlus&&r.startsWith("git+")?r.slice(4):r}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#t(this.sshtemplate,e)}sshurl(e){return this.#t(this.sshurltemplate,e)}browse(e,...t){return typeof e!="string"?this.#t(this.browsetemplate,e):typeof t[0]!="string"?this.#t(this.browsetreetemplate,{...t[0],path:e}):this.#t(this.browsetreetemplate,{...t[1],fragment:t[0],path:e})}browseFile(e,...t){return typeof t[0]!="string"?this.#t(this.browseblobtemplate,{...t[0],path:e}):this.#t(this.browseblobtemplate,{...t[1],fragment:t[0],path:e})}docs(e){return this.#t(this.docstemplate,e)}bugs(e){return this.#t(this.bugstemplate,e)}https(e){return this.#t(this.httpstemplate,e)}git(e){return this.#t(this.gittemplate,e)}shortcut(e){return this.#t(this.shortcuttemplate,e)}path(e){return this.#t(this.pathtemplate,e)}tarball(e){return this.#t(this.tarballtemplate,{...e,noCommittish:!1})}file(e,t){return this.#t(this.filetemplate,{...t,path:e})}edit(e,t){return this.#t(this.edittemplate,{...t,path:e})}getDefaultRepresentation(){return this.default}toString(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)}};for(let[s,e]of Object.entries(Xw))qs.addHost(s,e);kl.exports=qs});var Bl=w((CL,ql)=>{"use strict";var{builtinModules:Qw}=require("module"),ey=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),ty=["node_modules","favicon.ico"];function sy(s){var e=[],t=[];if(s===null)return t.push("name cannot be null"),Pt(e,t);if(s===void 0)return t.push("name cannot be undefined"),Pt(e,t);if(typeof s!="string")return t.push("name must be a string"),Pt(e,t);if(s.length||t.push("name length must be greater than zero"),s.startsWith(".")&&t.push("name cannot start with a period"),s.match(/^_/)&&t.push("name cannot start with an underscore"),s.trim()!==s&&t.push("name cannot contain leading or trailing spaces"),ty.forEach(function(a){s.toLowerCase()===a&&t.push(a+" is not a valid package name")}),Qw.includes(s.toLowerCase())&&e.push(s+" is a core module name"),s.length>214&&e.push("name can no longer contain more than 214 characters"),s.toLowerCase()!==s&&e.push("name can no longer contain capital letters"),/[~'!()*]/.test(s.split("/").slice(-1)[0])&&e.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(s)!==s){var i=s.match(ey);if(i){var r=i[1],n=i[2];if(n.startsWith(".")&&t.push("name cannot start with a period"),encodeURIComponent(r)===r&&encodeURIComponent(n)===n)return Pt(e,t)}t.push("name can only contain URL-friendly characters")}return Pt(e,t)}o(sy,"validate");var Pt=o(function(s,e){var t={validForNewPackages:e.length===0&&s.length===0,validForOldPackages:e.length===0,warnings:s,errors:e};return t.warnings.length||delete t.warnings,t.errors.length||delete t.errors,t},"done");ql.exports=sy});var Zl=w(($L,Tt)=>{"use strict";var xt=process.platform==="win32",{URL:$r}=require("node:url"),ze=xt?require("node:path/win32"):require("node:path"),{homedir:iy}=require("node:os"),ry=Ul(),Wl=Ot(),Yl=Bl(),{log:ny}=Xt(),Xl=xt?/\\|[/]/:/[/]/,Kl=/^(?:git[+])?[a-z]+:/i,oy=/^[^@]+@[^:.]+\.[^:]+:.+$/i,Pr=/[.](?:tgz|tar.gz|tar)$/i,ay=/:[0-9]+(\/|$)/i,cy=/^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/,ly=/^(?:[.]|~[/]|[/]|[a-zA-Z]:)/,zl="https://registry.npmjs.org";function Rt(s,e){let t,i;if(typeof s=="object")return s instanceof Dt&&(!e||e===s.where)?s:s.name&&s.rawSpec?Rt.resolve(s.name,s.rawSpec,e||s.where):Rt(s.raw,e||s.where);let r=s.indexOf("@",1),n=r>0?s.slice(0,r):s;return Kl.test(s)?i=s:oy.test(s)?i=`git+ssh://${s}`:!n.startsWith("@")&&(Xl.test(n)||Pr.test(n))?i=s:r>0?(t=n,i=s.slice(r+1)||"*"):Yl(s).validForOldPackages?(t=s,i="*"):i=s,Jl(t,i,e,s)}o(Rt,"npa");function hy(s){return s?s.toLowerCase().startsWith("file:")?!0:xt?cy.test(s):ly.test(s):!1}o(hy,"isFileSpec");function uy(s){return s?s.toLowerCase().startsWith("npm:"):!1}o(uy,"isAliasSpec");function Jl(s,e,t,i){let r=new Dt({raw:i,name:s,rawSpec:e,fromArgument:i!=null});if(s&&(r.name=s),t||(t=process.cwd()),hy(e))return Vl(r,t);if(uy(e))return Sy(r,t);let n=ry.fromUrl(e,{noGitPlus:!0,noCommittish:!0});return n?wy(r,n):e&&Kl.test(e)?by(r):e&&(Xl.test(e)||Pr.test(e))?Vl(r,t):Ey(r)}o(Jl,"resolve");function fy(s,e=zl){let t=Rt(s);if(t.type!=="version")throw my(t.type,t.raw);let i="pkg:npm/"+t.name.replace(/^@/,"%40")+"@"+t.rawSpec;return e!==zl&&(i+="?repository_url="+e),i}o(fy,"toPurl");function dy(s,e,t){let i=new Error(`Invalid package name "${s}" of package "${t}": ${e.errors.join("; ")}.`);return i.code="EINVALIDPACKAGENAME",i}o(dy,"invalidPackageName");function py(s,e){let t=new Error(`Invalid tag name "${s}" of package "${e}": Tags may not have any characters that encodeURIComponent encodes.`);return t.code="EINVALIDTAGNAME",t}o(py,"invalidTagName");function my(s,e){let t=new Error(`Invalid type "${s}" of package "${e}": Purl can only be generated for "version" types.`);return t.code="EINVALIDPURLTYPE",t}o(my,"invalidPurlType");var Dt=class{static{o(this,"Result")}constructor(e){this.type=e.type,this.registry=e.registry,this.where=e.where,e.raw==null?this.raw=e.name?`${e.name}@${e.rawSpec}`:e.rawSpec:this.raw=e.raw,this.name=void 0,this.escapedName=void 0,this.scope=void 0,this.rawSpec=e.rawSpec||"",this.saveSpec=e.saveSpec,this.fetchSpec=e.fetchSpec,e.name&&this.setName(e.name),this.gitRange=e.gitRange,this.gitCommittish=e.gitCommittish,this.gitSubdir=e.gitSubdir,this.hosted=e.hosted}setName(e){let t=Yl(e);if(!t.validForOldPackages)throw dy(e,t,this.raw);return this.name=e,this.scope=e[0]==="@"?e.slice(0,e.indexOf("/")):void 0,this.escapedName=e.replace("/","%2f"),this}toString(){let e=[];this.name!=null&&this.name!==""&&e.push(this.name);let t=this.saveSpec||this.fetchSpec||this.rawSpec;return t!=null&&t!==""&&e.push(t),e.length?e.join("@"):this.raw}toJSON(){let e=Object.assign({},this);return delete e.hosted,e}};function Or(s,e){if(!e){s.gitCommittish=null;return}for(let t of e.split("::")){if(!t.includes(":")){if(s.gitRange)throw new Error("cannot override existing semver range with a committish");if(s.gitCommittish)throw new Error("cannot override existing committish with a second committish");s.gitCommittish=t;continue}let[i,r]=t.split(":");if(i==="semver"){if(s.gitCommittish)throw new Error("cannot override existing committish with a semver range");if(s.gitRange)throw new Error("cannot override existing semver range with a second semver range");s.gitRange=decodeURIComponent(r);continue}if(i==="path"){if(s.gitSubdir)throw new Error("cannot override existing path with a second path");s.gitSubdir=`/${r}`;continue}ny.warn("npm-package-arg",`ignoring unknown key "${i}"`)}}o(Or,"setGitAttrs");var gy=new Map([["\0","%00"],[" ","%09"],[`
14
+ `,"%0A"],["\r","%0D"],[" ","%20"],['"',"%22"],["#","%23"],["%","%25"],["?","%3F"],["[","%5B"],["\\",xt?"/":"%5C"],["]","%5D"],["^","%5E"],["|","%7C"],["~","%7E"]]);function Hl(s){let e="";for(let t=0;t<s.length;t++)e=`${e}${gy.get(s[t])??s[t]}`;return e.startsWith("file:")?e:`file:${e}`}o(Hl,"pathToFileURL");function Vl(s,e){s.type=Pr.test(s.rawSpec)?"file":"directory",s.where=e;let t=Hl(s.rawSpec);t.startsWith("file:/")&&(/^file:\/\/[^/]/.test(t)&&(t=`file:/${t.slice(5)}`),/^\/{1,3}\.\.?(\/|$)/.test(t.slice(5))&&(t=t.replace(/^file:\/{1,3}/,"file:")));let i,r;try{i=new $r(t,`${Hl(ze.resolve(e))}/`),r=new $r(t)}catch(c){let l=new Error("Invalid file: URL, must comply with RFC 8089");throw Object.assign(l,{raw:s.rawSpec,spec:s,where:e,originalError:c})}let n=decodeURIComponent(r.pathname),a=decodeURIComponent(i.pathname);return xt&&(n=n.replace(/^\/+([a-z]:\/)/i,"$1"),a=a.replace(/^\/+([a-z]:\/)/i,"$1")),/^\/~(\/|$)/.test(n)?(s.saveSpec=`file:${n.substr(1)}`,a=ze.resolve(iy(),n.substr(3))):ze.isAbsolute(t.slice(5))?s.saveSpec=`file:${ze.resolve(a)}`:s.saveSpec=`file:${ze.relative(e,a)}`,s.fetchSpec=ze.resolve(e,a),s.saveSpec=s.saveSpec.split("\\").join("/"),s.saveSpec.startsWith("file://")&&(s.saveSpec=`file:/${s.saveSpec.slice(7)}`),s}o(Vl,"fromFile");function wy(s,e){return s.type="git",s.hosted=e,s.saveSpec=e.toString({noGitPlus:!1,noCommittish:!1}),s.fetchSpec=e.getDefaultRepresentation()==="shortcut"?null:e.toString(),Or(s,e.committish),s}o(wy,"fromHostedGit");function yy(s,e){let t=new Error(`Unsupported URL Type "${s}": ${e}`);return t.code="EUNSUPPORTEDPROTOCOL",t}o(yy,"unsupportedURLType");function by(s){let e=s.rawSpec;if(s.saveSpec=e,e.startsWith("git+ssh:")){let i=e.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i);if(i&&!i[1].match(ay))return s.type="git",Or(s,i[2]),s.fetchSpec=i[1],s}else e.startsWith("git+file://")&&(e=e.replace(/\\/g,"/"));let t=new $r(e);switch(t.protocol){case"git:":case"git+http:":case"git+https:":case"git+rsync:":case"git+ftp:":case"git+file:":case"git+ssh:":s.type="git",Or(s,t.hash.slice(1)),t.protocol==="git+file:"&&/^git\+file:\/\/[a-z]:/i.test(e)?s.fetchSpec=`git+file://${t.host.toLowerCase()}:${t.pathname}`:(t.hash="",s.fetchSpec=t.toString()),s.fetchSpec.startsWith("git+")&&(s.fetchSpec=s.fetchSpec.slice(4));break;case"http:":case"https:":s.type="remote",s.fetchSpec=s.saveSpec;break;default:throw yy(t.protocol,e)}return s}o(by,"fromURL");function Sy(s,e){let t=Rt(s.rawSpec.substr(4),e);if(t.type==="alias")throw new Error("nested aliases not supported");if(!t.registry)throw new Error("aliases only work for registry deps");if(!t.name)throw new Error("aliases must have a name");return s.subSpec=t,s.registry=!0,s.type="alias",s.saveSpec=null,s.fetchSpec=null,s}o(Sy,"fromAlias");function Ey(s){s.registry=!0;let e=s.rawSpec.trim();s.saveSpec=null,s.fetchSpec=e;let t=Wl.valid(e,!0),i=Wl.validRange(e,!0);if(t)s.type="version";else if(i)s.type="range";else{if(encodeURIComponent(e)!==e)throw py(e,s.raw);s.type="tag"}return s}o(Ey,"fromRegistry");Tt.exports=Rt;Tt.exports.resolve=Jl;Tt.exports.toPurl=fy;Tt.exports.Result=Dt});var ih=w((PL,sh)=>{var Ie=require("node:process"),Ly=require("node:os"),vy=require("node:fs");function Cy(s){return s.includes("libc.musl-")||s.includes("ld-musl-")}o(Cy,"isMusl");function Ql(){return Ie.platform}o(Ql,"os");function eh(){return Ie.arch}o(eh,"cpu");var Ay="/usr/bin/ldd";function $y(){try{let s=vy.readFileSync(Ay,"utf-8");return s.includes("musl")?"musl":s.includes("GNU C Library")?"glibc":null}catch{return}}o($y,"getFamilyFromFilesystem");function Oy(){let s=Ie.report.excludeNetwork;Ie.report.excludeNetwork=!0;let e=Ie.report.getReport();return Ie.report.excludeNetwork=s,e.header?.glibcVersionRuntime?we="glibc":Array.isArray(e.sharedObjects)&&e.sharedObjects.some(Cy)?we="musl":we=null,we}o(Oy,"getFamilyFromReport");var we;function th(s){if(s==="linux")return we===void 0&&(we=$y(),we===void 0&&(we=Oy())),we}o(th,"libc");function Py(s={}){let e=s.os||Ql();return{cpu:{name:s.cpu||eh()},libc:{name:s.libc||th(e)},os:{name:e,version:s.osVersion||Ly.release()},packageManager:{name:"npm",version:s.npmVersion},runtime:{name:"node",version:s.nodeVersion||Ie.version}}}o(Py,"devEngines");sh.exports={cpu:eh,libc:th,os:Ql,devEngines:Py}});var nh=w((DL,rh)=>{var Ry=We(),Dy=wr(),xy=["ignore","warn","error","download"],Ty=["name","version","onFail"],Ny=["packageManager","runtime","cpu","libc","os"];function Iy(s,e,t){let{engine:i}=t;if(typeof s!="object"||s===null||Array.isArray(s))throw new Error(`Invalid non-object value for "${i}"`);let r=Object.keys(s);for(let n of r)if(!Ty.includes(n))throw new Error(`Invalid property "${n}" for "${i}"`);if(!r.includes("name"))throw new Error(`Missing "name" property for "${i}"`);if(typeof s.name!="string")throw new Error(`Invalid non-string value for "name" within "${i}"`);if(typeof e.name!="string"||e.name==="")throw new Error(`Unable to determine "name" for "${i}"`);if(r.includes("onFail")){if(typeof s.onFail!="string")throw new Error(`Invalid non-string value for "onFail" within "${i}"`);if(!xy.includes(s.onFail))throw new Error(`Invalid onFail value "${s.onFail}" for "${i}"`)}if(s.name!==e.name)return new Error(`Invalid name "${s.name}" does not match "${e.name}" for "${i}"`);if(r.includes("version")){if(typeof s.version!="string")throw new Error(`Invalid non-string value for "version" within "${i}"`);if(typeof e.version!="string"||e.version==="")throw new Error(`Unable to determine "version" for "${i}" "${s.name}"`);if(Dy(s.version)){if(!Ry(e.version,s.version,t.semver))return new Error(`Invalid semver version "${s.version}" does not match "${e.version}" for "${i}"`)}else if(s.version!==e.version)return new Error(`Invalid version "${s.version}" does not match "${e.version}" for "${i}"`)}}o(Iy,"checkDependency");function _y(s,e={},t={}){if(typeof s!="object"||s===null||Array.isArray(s))throw new Error('Invalid non-object value for "devEngines"');let i=[];for(let r of Object.keys(s)){if(!Ny.includes(r))throw new Error(`Invalid property "devEngines.${r}"`);let n=s[r],a=[n].flat(),c=e[r]||{};if(a.length===0)continue;let l=[];for(let u of a){let f=Iy(u,c,{...t,engine:r});f&&l.push(f)}if(l.length===a.length){let f=a[a.length-1].onFail||"error";f==="download"&&(f="error");let p=Object.assign(new Error(`Invalid devEngines.${r}`),{errors:l,engine:r,isWarn:f==="warn",isError:f==="error",current:c,required:n});i.push(p)}}return i}o(_y,"checkDevEngines");rh.exports={checkDevEngines:_y}});var ch=w((TL,ah)=>{var oh=Ot(),Bs=ih(),{checkDevEngines:Fy}=nh(),Gy=o((s,e,t,i=!1)=>{let r=i?null:t,n=s.engines,a={includePrerelease:!0};if(!n)return;let c=r&&n.node&&!oh.satisfies(r,n.node,a),l=e&&n.npm&&!oh.satisfies(e,n.npm,a);if(c||l)throw Object.assign(new Error("Unsupported engine"),{pkgid:s._id,current:{node:t,npm:e},required:n,code:"EBADENGINE"})},"checkEngine"),jy=o((s,e=!1,t={})=>{if(e)return;let i=t.os||Bs.os(),r=t.cpu||Bs.cpu(),n=t.libc||Bs.libc(i),a=s.os?Rr(i,s.os):!0,c=s.cpu?Rr(r,s.cpu):!0,l=s.libc?Rr(n,s.libc):!0;if(s.libc&&!n&&(l=!1),!a||!c||!l)throw Object.assign(new Error("Unsupported platform"),{pkgid:s._id,current:{os:i,cpu:r,libc:n},required:{os:s.os,cpu:s.cpu,libc:s.libc},code:"EBADPLATFORM"})},"checkPlatform"),Rr=o((s,e)=>{if(typeof e=="string"&&(e=[e]),e.length===1&&e[0]==="any")return!0;let t=0,i=!1;for(let r of e){let n=r.charAt(0)==="!",a=n?r.slice(1):r;if(n){if(t++,s===a)return!1}else i=i||s===a}return i||t===e.length},"checkList");ah.exports={checkEngine:Gy,checkPlatform:jy,checkDevEngines:Fy,currentEnv:Bs}});var fh=w((IL,uh)=>{var{join:lh,basename:hh}=require("path"),My=o(s=>s.bin?typeof s.bin=="string"?ky(s):Array.isArray(s.bin)?Uy(s):typeof s.bin=="object"?xr(s):Dr(s):Dr(s),"normalize"),ky=o(s=>s.name?(s.bin={[s.name]:s.bin},xr(s)):Dr(s),"normalizeString"),Uy=o(s=>(s.bin=s.bin.reduce((e,t)=>(e[hh(t)]=t,e),{}),xr(s)),"normalizeArray"),Dr=o(s=>(delete s.bin,s),"removeBin"),xr=o(s=>{let e=s.bin,t={},i=!1;return Object.keys(e).forEach(r=>{let n=lh("/",hh(r.replace(/\\|:/g,"/"))).slice(1);if(typeof e[r]!="string"||!n)return;let a=lh("/",e[r].replace(/\\/g,"/")).replace(/\\/g,"/").slice(1);a&&(t[n]=a,i=!0)}),i?s.bin=t:delete s.bin,s},"normalizeObject");uh.exports=My});var mh=w((FL,ph)=>{"use strict";var dh=Zl(),Nt=Ot(),{checkEngine:qy}=ch(),By=fh(),Tr=o((s,e,t)=>{try{return qy(s,e,t),!0}catch{return!1}},"engineOk"),Ws=o((s,e,t)=>!s||!s[e]||Date.parse(s[e])<=t,"isBefore"),Wy={includePrerelease:!0,loose:!0},zs=o((s,e)=>e&&Nt.satisfies(s,e,Wy),"shouldAvoid"),Nr=o((s,e)=>s&&zs(s.version,e)?{...s,_shouldAvoid:!0}:s,"decorateAvoid"),It=o((s,e,t)=>{let{defaultTag:i="latest",before:r=null,nodeVersion:n=process.version,npmVersion:a=null,includeStaged:c=!1,avoid:l=null,avoidStrict:h=!1}=t,{name:u,time:f}=s,p=s.versions||{};if(h){let P={...t,avoidStrict:!1},_=It(s,e,P);if(!_||!_._shouldAvoid)return _;let j=It(s,`^${_.version}`,P);if(!j||!j._shouldAvoid)return{...j,_outsideDependencyRange:!0,_isSemVerMajor:!1};let le=It(s,"*",P);if(!le||!le._shouldAvoid)return{...le,_outsideDependencyRange:!0,_isSemVerMajor:!0};throw Object.assign(new Error(`No avoidable versions for ${u}`),{code:"ETARGET",name:u,wanted:e,avoid:l,before:r,versions:Object.keys(p)})}let d=c&&s.stagedVersions&&s.stagedVersions.versions||{},g=s.policyRestrictions&&s.policyRestrictions.versions||{},m=r&&f?+new Date(r):1/0,y=dh.resolve(u,e||i).type,C=s["dist-tags"]||{};if(y!=="tag"&&y!=="version"&&y!=="range")throw new Error("Only tag, version, and range are supported");if(e&&y==="tag"){let P=C[e];return Ws(f,P,m)?Nr(p[P]||d[P]||g[P],l):It(s,`<=${P}`,t)}if(e&&y==="version"){let P=Nt.clean(e,{loose:!0}),_=p[P]||d[P]||g[P];return Ws(f,P,m)?Nr(_,l):null}let A=y==="range"?e:"*",S=C[i];if(S&&(A==="*"||Nt.satisfies(S,A,{loose:!0}))&&!g[S]&&!zs(S,l)){let P=p[S];if(P&&Ws(f,S,m)&&Tr(P,a,n)&&!P.deprecated&&!d[S])return P}let O=Object.entries(p).concat(Object.entries(d)).concat(Object.entries(g)).filter(([P])=>Ws(f,P,m));if(!O.length)throw Object.assign(new Error(`No versions available for ${u}`),{code:"ENOVERSIONS",name:u,type:y,wanted:e,before:r,versions:Object.keys(p)});let F={loose:!0},G=O.filter(([P])=>Nt.satisfies(P,A,{loose:!0})).sort((P,_)=>{let[j,le]=P,[$e,Ve]=_,Ft=!zs(j,l),Gt=!zs($e,l),jt=!g[j],Mt=!g[$e],kt=!d[j],Ut=!d[$e],Ye=!le.deprecated,Xe=!Ve.deprecated,Ke=Tr(le,a,n),Je=Tr(Ve,a,n);return Gt-Ft||Mt-jt||Ut-kt||(Xe&&Je)-(Ye&&Ke)||Je-Ke||Xe-Ye||Nt.rcompare(j,$e,F)});return Nr(G[0]&&G[0][1],l)},"pickManifest");ph.exports=(s,e,t={})=>{let i=It(s,e,t),r=i&&By(i),n=s.policyRestrictions,a=n&&n.versions||{};if(r&&!a[r.version])return r;let{before:c=null,defaultTag:l="latest"}=t,h=c?new Date(c).toLocaleString():"",{name:u}=s,f=`${u}@${e}`+(c?` with a date before ${h}`:""),p=r&&!!a[r.version],d=p?n.message:"",g=p?`Could not download ${f} due to policy violations:
15
+ ${d}`:`No matching version found for ${f}.`,m=p?"E403":"ETARGET";throw Object.assign(new Error(g),{code:m,type:dh.resolve(s.name,e).type,wanted:e,versions:Object.keys(s.versions??{}),name:u,distTags:s["dist-tags"],defaultTag:l})}});var bh=w((jL,yh)=>{var zy=new Set(["github.com","gist.github.com","gitlab.com","bitbucket.com","bitbucket.org"]),{parse:Hy}=require("url"),gh=require("path"),Vy=Lr(),_t=Lt(),{isWindows:Hs}=Tl(),Yy=mh(),Ir=require("fs/promises");yh.exports=(s,e="HEAD",t=null,i={})=>Vy(s,i).then(r=>Ky(s,r,e,Jy(r,e,i),t||Xy(s,i.cwd),i));var _r=o((s,e)=>e.gitShallow===!1||e.gitShallow?e.gitShallow:zy.has(Hy(s).host),"maybeShallow"),Xy=o((s,e=process.cwd())=>gh.resolve(e,gh.basename(s.replace(/[/\\]?\.git$/,""))),"defaultTarget"),Ky=o((s,e,t,i,r,n)=>i?i.sha===e.refs.HEAD.sha?eb(s,i,r,n):i.type==="tag"||i.type==="branch"?Qy(s,i,r,n):Zy(s,i,r,n):tb(s,t,r,n),"clone"),Jy=o((s,e,t)=>{let{spec:i={}}=t;return e=i.gitCommittish||e,s?i.gitRange?Yy(s,i.gitRange,t):e?s.refs[e]?s.refs[e]:s.shas[e]?s.refs[s.shas[e][0]]:null:s.refs.HEAD:null},"resolveRef"),Zy=o((s,e,t,i)=>{let r=_r(s,i),n=["fetch","origin",e.rawRef].concat(r?["--depth=1"]:[]),a=o(c=>_t(c,{...i,cwd:t}),"git");return Ir.mkdir(t,{recursive:!0}).then(()=>a(["init"])).then(()=>Hs(i)?a(["config","--local","--add","core.longpaths","true"]):null).then(()=>a(["remote","add","origin",s])).then(()=>a(n)).then(()=>a(["checkout",e.sha])).then(()=>wh(t,i)).then(()=>e.sha)},"other"),Qy=o((s,e,t,i)=>{let r=["clone","-b",e.ref,s,t,"--recurse-submodules"];return _r(s,i)&&r.push("--depth=1"),Hs(i)&&r.push("--config","core.longpaths=true"),_t(r,i).then(()=>e.sha)},"branch"),eb=o((s,e,t,i)=>{let r=["clone",s,t,"--recurse-submodules"];return _r(s,i)&&r.push("--depth=1"),Hs(i)&&r.push("--config","core.longpaths=true"),_t(r,i).then(()=>e.sha)},"plain"),wh=o(async(s,e)=>await Ir.stat(`${s}/.gitmodules`).then(()=>!0).catch(()=>!1)?_t(["submodule","update","-q","--init","--recursive"],{...e,cwd:s}):null,"updateSubmodules"),tb=o((s,e,t,i)=>{let r=Hs(i)?["--config","core.longpaths=true"]:[],n=["clone","--mirror","-q",s,t+"/.git"],a=o(c=>_t(c,{...i,cwd:t}),"git");return Ir.mkdir(t,{recursive:!0}).then(()=>a(n.concat(r))).then(()=>a(["init"])).then(()=>a(["checkout",e])).then(()=>wh(t,i)).then(()=>a(["rev-parse","--revs-only","HEAD"])).then(({stdout:c})=>c.trim())},"unresolved")});var Fr=w((kL,Sh)=>{var{stat:sb}=require("fs/promises");Sh.exports=({cwd:s=process.cwd()}={})=>sb(s+"/.git").then(()=>!0,()=>!1)});var Lh=w((UL,Eh)=>{var ib=Fr(),{dirname:rb}=require("path");Eh.exports=async({cwd:s=process.cwd(),root:e}={})=>{for(;;){if(await ib({cwd:s}))return s;let t=rb(s);if(s===e||s===t)return null;s=t}}});var Ch=w((qL,vh)=>{var nb=Lt();vh.exports=(s={})=>nb(["status","--porcelain=v1","-uno"],s).then(e=>!e.stdout.trim().split(/\r?\n+/).map(t=>t.trim()).filter(t=>t).length)});var $h=w((BL,Ah)=>{Ah.exports={clone:bh(),revs:Lr(),spawn:Lt(),is:Fr(),find:Lh(),isClean:Ch(),errors:Zi()}});var Th=w((WL,xh)=>{var ob=ti(),ab=si(),Ae=require("node:fs/promises"),I=require("node:path"),{log:Rh}=Xt(),cb=require("node:module"),Gr;function Oh(){return Gr||(Gr=hi()),Gr}o(Oh,"lazyHostedGitInfo");var jr;function Vs(){return jr||(jr=vo().glob),jr}o(Vs,"lazyLoadGlob");function lb(s,e){if(s.bin&&(typeof s.bin=="string"&&s.name?(e?.push('"bin" was converted to an object'),s.bin={[s.name]:s.bin}):Array.isArray(s.bin)&&(e?.push('"bin" was converted to an object'),s.bin=s.bin.reduce((t,i)=>(t[I.basename(i)]=i,t),{})),typeof s.bin=="object")){for(let t in s.bin){if(typeof s.bin[t]!="string"){delete s.bin[t],e?.push(`removed invalid "bin[${t}]"`);continue}let i=I.basename(He(t));if(!i){delete s.bin[t],e?.push(`removed invalid "bin[${t}]"`);continue}let r=He(s.bin[t]);if(!r){delete s.bin[t],e?.push(`removed invalid "bin[${t}]"`);continue}i!==t&&(delete s.bin[t],e?.push(`"bin[${t}]" was renamed to "bin[${i}]"`)),r!==s.bin[t]&&e?.push(`"bin[${i}]" script name ${r} was invalid and removed`),s.bin[i]=r}return Object.keys(s.bin).length===0&&(e?.push('empty "bin" was removed'),delete s.bin),s}delete s.bin}o(lb,"normalizePackageBin");function hb(s,e){if(s.man){let t=[];for(let i of Array.isArray(s.man)?s.man:[s.man])typeof i!="string"?e?.push(`removed invalid "man [${i}]"`):t.push(He(i));if(!t.length)e?.push('empty "man" was removed');else return s.man=t,s}delete s.man}o(hb,"normalizePackageMan");function ub(s){return!s.match(/[/@\s+%:]/)&&s===encodeURIComponent(s)}o(ub,"isCorrectlyEncodedName");function fb(s){if(s.charAt(0)!=="@")return!1;let e=s.slice(1).split("/");return e.length!==2?!1:e[0]&&e[1]&&e[0]===encodeURIComponent(e[0])&&e[1]===encodeURIComponent(e[1])}o(fb,"isValidScopedPackageName");function Ph(s){return s.replace(/\\|:/g,"/")}o(Ph,"unixifyPath");function He(s){let e=Ph(I.join(".",I.join("/",Ph(s))));return e.startsWith("./")?"":e}o(He,"secureAndUnixifyPath");function Dh(s,{strict:e,steps:t,changes:i,allowLegacyCase:r}){let n=s.content,a=`${n.name??""}@${n.version??""}`;if(t.includes("fixName")||t.includes("fixNameField")||t.includes("normalizeData"))if(!n.name&&!e)i?.push('Missing "name" field was set to an empty string'),n.name="";else{if(typeof n.name!="string")throw new Error("name field must be a string.");if(!e){let c=n.name.trim();n.name!==c&&(i?.push('Whitespace was trimmed from "name"'),n.name=c)}if(n.name.startsWith(".")||!(fb(n.name)||ub(n.name))||e&&!r&&n.name!==n.name.toLowerCase()||n.name.toLowerCase()==="node_modules"||n.name.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(n.name))}if(t.includes("fixName")&&cb.builtinModules.includes(n.name)&&Rh.warn("package-json",a,`Package name "${n.name}" conflicts with a Node.js built-in module name`),t.includes("fixVersionField")||t.includes("normalizeData")){let c=!e;if(!n.version)n.version="";else{if(!ob(n.version,c))throw new Error(`Invalid version: "${n.version}"`);let l=ab(n.version,c);l!==n.version&&(i?.push(`"version" was cleaned and set to "${l}"`),n.version=l)}}if(t.includes("_attributes"))for(let c in n)c.startsWith("_")&&(i?.push(`"${c}" was removed`),delete s.content[c]);if(t.includes("_id")&&n.name&&n.version&&(i?.push(`"_id" was set to ${a}`),n._id=a),t.includes("bundledDependencies")&&(n.bundleDependencies===void 0&&n.bundledDependencies!==void 0&&(n.bundleDependencies=n.bundledDependencies,i?.push('Deleted incorrect "bundledDependencies"')),delete n.bundledDependencies),t.includes("bundleDependencies")){let c=n.bundleDependencies;c===!1&&!t.includes("bundleDependenciesDeleteFalse")?(i?.push('"bundleDependencies" was changed from "false" to "[]"'),n.bundleDependencies=[]):c===!0?(i?.push('"bundleDependencies" was auto-populated from "dependencies"'),n.bundleDependencies=Object.keys(n.dependencies||{})):c&&typeof c=="object"?Array.isArray(c)||(i?.push('"bundleDependencies" was changed from an object to an array'),n.bundleDependencies=Object.keys(c)):"bundleDependencies"in n&&(i?.push('"bundleDependencies" was removed'),delete n.bundleDependencies)}if(t.includes("optionalDedupe")&&n.dependencies&&n.optionalDependencies&&typeof n.optionalDependencies=="object"){for(let c in n.optionalDependencies)i?.push(`optionalDependencies."${c}" was removed`),delete n.dependencies[c];Object.keys(n.dependencies).length||(i?.push('Empty "optionalDependencies" was removed'),delete n.dependencies)}if((t.includes("scripts")||t.includes("scriptpath"))&&n.scripts!==void 0){let c=/^(\.[/\\])?node_modules[/\\].bin[\\/]/;if(typeof n.scripts=="object")for(let l in n.scripts)typeof n.scripts[l]!="string"?(delete n.scripts[l],i?.push(`Invalid scripts."${l}" was removed`)):t.includes("scriptpath")&&c.test(n.scripts[l])&&(n.scripts[l]=n.scripts[l].replace(c,""),i?.push(`scripts entry "${l}" was fixed to remove node_modules/.bin reference`));else i?.push('Removed invalid "scripts"'),delete n.scripts}if(t.includes("funding")&&n.funding&&typeof n.funding=="string"&&(n.funding={url:n.funding},i?.push('"funding" was changed to an object with a url attribute')),(t.includes("fixRepositoryField")||t.includes("normalizeData"))&&(n.repositories&&(i?.push(`"repository" was set to the first entry in "repositories" (${n.repository})`),n.repository=n.repositories[0]),n.repository&&(typeof n.repository=="string"&&(i?.push('"repository" was changed from a string to an object'),n.repository={type:"git",url:n.repository}),n.repository.url))){let c=Oh().fromUrl(n.repository.url),l;c&&(c.getDefaultRepresentation()==="shortcut"?l=c.https():l=c.toString(),l!==n.repository.url&&(i?.push(`"repository.url" was normalized to "${l}"`),n.repository.url=l))}if(t.includes("fixDependencies")||t.includes("normalizeData")){for(let c of["dependencies","devDependencies","optionalDependencies"])if(n[c]){let l=!0;if(typeof n[c]=="string"&&(i?.push(`"${c}" was converted from a string into an object`),n[c]=n[c].trim().split(/[\n\r\s\t ,]+/),l=!1),Array.isArray(n[c])){l&&i?.push(`"${c}" was converted from an array into an object`);let h={};for(let u of n[c])if(typeof u=="string"){let f=u.trim().split(/(:?[@\s><=])/),p=f.shift(),d=f.join("").replace(/^@/,"").trim();h[p]=d}n[c]=h}}for(let c of["dependencies","devDependencies"])if(c in n)if(!n[c]||typeof n[c]!="object")i?.push(`Removed invalid "${c}"`),delete n[c];else for(let l in n[c]){typeof n[c][l]!="string"&&(i?.push(`Removed invalid "${c}.${l}"`),delete n[c][l]);let u=Oh().fromUrl(n[c][l])?.toString();u&&u!==n[c][l]&&(i?.push(`Normalized git reference to "${c}.${l}"`),n[c][l]=u.toString())}}if(t.includes("normalizeData")){let{normalizeData:c}=Xo();c(n,i)}}o(Dh,"syncSteps");async function db(s,{steps:e,root:t,changes:i}){let r=s.content,n=r.scripts||{},a=`${r.name??""}@${r.version??""}`;if(e.includes("gypfile")&&!n.install&&!n.preinstall&&r.gypfile!==!1&&(await Vs()("*.gyp",{cwd:s.path})).length&&(n.install="node-gyp rebuild",r.scripts=n,r.gypfile=!0,i?.push('"scripts.install" was set to "node-gyp rebuild"'),i?.push('"gypfile" was set to "true"')),e.includes("serverjs")&&!n.start)try{await Ae.access(I.join(s.path,"server.js")),n.start="node server.js",r.scripts=n,i?.push('"scripts.start" was set to "node server.js"')}catch{}if(e.includes("authors")&&!r.contributors)try{let l=(await Ae.readFile(I.join(s.path,"AUTHORS"),"utf8")).split(/\r?\n/g).map(h=>h.replace(/^\s*#.*$/,"").trim()).filter(h=>h);r.contributors=l,i?.push('"contributors" was auto-populated with the contents of the "AUTHORS" file')}catch{}if(e.includes("readme")&&!r.readme){let c=/\.m?a?r?k?d?o?w?n?$/i,l=await Vs()("{README,README.*}",{cwd:s.path,nocase:!0,mark:!0}),h;for(let u of l)if(!u.endsWith(I.sep)){if(u.match(c)){h=u;break}u.endsWith("README")&&(h=u)}if(h){let u=await Ae.readFile(I.join(s.path,h),"utf8");r.readme=u,r.readmeFilename=h,i?.push(`"readme" was set to the contents of ${h}`),i?.push(`"readmeFilename" was set to ${h}`)}r.readme||(r.readme="ERROR: No README data found!")}if(e.includes("mans")){if(r.directories?.man&&!r.man){let c=He(r.directories.man),l=I.resolve(s.path,c),h=await Vs()("**/*.[0-9]",{cwd:l});r.man=h.map(u=>I.relative(s.path,I.join(l,u)).split(I.sep).join("/"))}hb(r,i)}if(e.includes("binDir")&&r.directories?.bin&&!r.bin){let c=He(r.directories.bin),l=await Vs()("**",{cwd:I.resolve(s.path,c)});r.bin=l.reduce((h,u)=>{if(u&&!u.startsWith(".")){let f=I.basename(u);h[f]=`${c}/${He(u)}`}return h},{})}else(e.includes("bin")||e.includes("binDir")||e.includes("binRefs"))&&lb(r,i);if(e.includes("gitHead")&&!r.gitHead){let l=await $h().find({cwd:s.path,root:t}),h;if(l)try{h=await Ae.readFile(I.resolve(l,".git/HEAD"),"utf8")}catch{}let u;if(h)if(h.startsWith("ref: ")){let f=h.replace(/^ref: /,"").trim(),p=I.resolve(l,".git",f);try{u=await Ae.readFile(p,"utf8"),u=u.replace(/^ref: /,"").trim()}catch{}if(!u){let d=I.resolve(l,".git/packed-refs");try{let g=await Ae.readFile(d,"utf8");if(g){g=g.split(`
16
+ `);for(let m=0;m<g.length;m++){let b=g[m].match(/^([0-9a-f]{40}) (.+)$/);if(b&&b[2].trim()===f){u=b[1];break}}}}catch{}}}else u=h.trim();u&&(r.gitHead=u)}if(e.includes("fillTypes")){let c=r.main||"index.js";if(typeof c!="string")throw new TypeError('The "main" attribute must be of type string.');let h=`./${I.join(I.dirname(c),I.basename(c,I.extname(c)))}.d.ts`;if(!("types"in r||"typings"in r))try{await Ae.access(I.join(s.path,h)),r.types=h.split(I.sep).join("/")}catch{}}if(e.includes("binRefs")&&r.bin instanceof Object)for(let c in r.bin)try{await Ae.access(I.resolve(s.path,r.bin[c]))}catch{Rh.warn("package-json",a,`No bin file found at ${r.bin[c]}`)}}o(db,"asyncSteps");async function pb(s,e){if(!s.content)throw new Error("Can not normalize without content");await db(s,e),Dh(s,e)}o(pb,"normalize");function mb(s,e){Dh(s,e)}o(mb,"syncNormalize");xh.exports={normalize:pb,syncNormalize:mb}});var Fh=w((HL,_h)=>{var{readFile:gb}=require("fs/promises"),wb=Xs();async function Nh(s){try{return await gb(s,"utf8")}catch(e){throw e.message=`Could not read package.json: ${e}`,e}}o(Nh,"read");function Ih(s){try{return wb(s)}catch(e){throw e.message=`Invalid package.json: ${e}`,e}}o(Ih,"parse");async function yb(s){let e=await Nh(s);return Ih(e)}o(yb,"readPackage");_h.exports={read:Nh,parse:Ih,readPackage:yb}});var jh=w((YL,Gh)=>{function bb(s){let{name:e,version:t,private:i,description:r,keywords:n,homepage:a,bugs:c,repository:l,funding:h,license:u,author:f,maintainers:p,contributors:d,type:g,imports:m,exports:b,main:y,browser:C,types:A,bin:S,man:O,directories:F,files:G,workspaces:P,scripts:_,config:j,dependencies:le,devDependencies:$e,peerDependencies:Ve,peerDependenciesMeta:Ft,optionalDependencies:Gt,bundledDependencies:jt,bundleDependencies:Mt,engines:kt,os:Ut,cpu:Ye,publishConfig:Xe,devEngines:Ke,licenses:Je,overrides:Ur,...Bh}=s;return{...typeof e<"u"?{name:e}:{},...typeof t<"u"?{version:t}:{},...typeof i<"u"?{private:i}:{},...typeof r<"u"?{description:r}:{},...typeof n<"u"?{keywords:n}:{},...typeof a<"u"?{homepage:a}:{},...typeof c<"u"?{bugs:c}:{},...typeof l<"u"?{repository:l}:{},...typeof h<"u"?{funding:h}:{},...typeof u<"u"?{license:u}:{},...typeof f<"u"?{author:f}:{},...typeof p<"u"?{maintainers:p}:{},...typeof d<"u"?{contributors:d}:{},...typeof g<"u"?{type:g}:{},...typeof m<"u"?{imports:m}:{},...typeof b<"u"?{exports:b}:{},...typeof y<"u"?{main:y}:{},...typeof C<"u"?{browser:C}:{},...typeof A<"u"?{types:A}:{},...typeof S<"u"?{bin:S}:{},...typeof O<"u"?{man:O}:{},...typeof F<"u"?{directories:F}:{},...typeof G<"u"?{files:G}:{},...typeof P<"u"?{workspaces:P}:{},...typeof _<"u"?{scripts:_}:{},...typeof j<"u"?{config:j}:{},...typeof le<"u"?{dependencies:le}:{},...typeof $e<"u"?{devDependencies:$e}:{},...typeof Ve<"u"?{peerDependencies:Ve}:{},...typeof Ft<"u"?{peerDependenciesMeta:Ft}:{},...typeof Gt<"u"?{optionalDependencies:Gt}:{},...typeof jt<"u"?{bundledDependencies:jt}:{},...typeof Mt<"u"?{bundleDependencies:Mt}:{},...typeof kt<"u"?{engines:kt}:{},...typeof Ut<"u"?{os:Ut}:{},...typeof Ye<"u"?{cpu:Ye}:{},...typeof Xe<"u"?{publishConfig:Xe}:{},...typeof Ke<"u"?{devEngines:Ke}:{},...typeof Je<"u"?{licenses:Je}:{},...typeof Ur<"u"?{overrides:Ur}:{},...Bh}}o(bb,"packageSort");Gh.exports={packageSort:bb}});var qh=w((KL,Uh)=>{var{readFile:Sb,writeFile:Eb}=require("node:fs/promises"),{resolve:Mh}=require("node:path"),Lb=Xs(),kh=Yr(),vb=Kr(),Cb=Zr(),{normalize:Mr,syncNormalize:Ab}=Th(),{read:$b,parse:Ob}=Fh(),{packageSort:Pb}=jh(),Rb=new Set([kh,vb,Cb]),Db=new Set([...kh.knownKeys,"scripts","workspaces"]),kr=class s{static{o(this,"PackageJson")}static fixSteps=Object.freeze(["binRefs","bundleDependencies","fixName","fixVersionField","fixRepositoryField","fixDependencies","devDependencies","scriptpath"]);static normalizeSteps=Object.freeze(["_id","_attributes","bundledDependencies","bundleDependencies","optionalDedupe","scripts","funding","bin","binDir"]);static prepareSteps=Object.freeze(["_id","_attributes","bundledDependencies","bundleDependencies","bundleDependenciesDeleteFalse","gypfile","serverjs","scriptpath","authors","readme","mans","binDir","gitHead","fillTypes","normalizeData","binRefs"]);static async create(e,t={}){let i=new s;return await i.create(e),t.data?i.update(t.data):i}static async load(e,t={}){let i=new s;if(!t.create)return i.load(e);try{return await i.load(e)}catch(r){if(!r.message.startsWith("Could not read package.json"))throw r;return await i.create(e)}}static async fix(e,t){let i=new s;return await i.load(e,!0),i.fix(t)}static async prepare(e,t){let i=new s;return await i.load(e,!0),i.prepare(t)}static async normalize(e,t){let i=new s;return await i.load(e),i.normalize(t)}#e;#s;#t="";#n=!0;async load(e,t){this.#e=e;let i;try{this.#t=await $b(this.filename)}catch(r){if(!t)throw r;i=r}if(i){let r=Mh(this.path,"index.js"),n;try{n=await Sb(r,"utf8")}catch{throw i}try{this.fromComment(n)}catch{throw i}return this.#n=!1,this}return this.fromJSON(this.#t)}fromJSON(e){return this.#s=Ob(e),this}fromContent(e){if(!e||typeof e!="object")throw new Error("Content data must be an object");return this.#s=e,this.#n=!1,this}fromComment(e){if(e=e.split(/^\/\*\*package(?:\s|$)/m),e.length<2)throw new Error("File has no package in comments");if(e=e[1],e=e.split(/\*\*\/$/m),e.length<2)throw new Error("File has no package in comments");return e=e[0],e=e.replace(/^\s*\*/mg,""),this.#s=Lb(e),this}get content(){return this.#s}get path(){return this.#e}get filename(){if(this.path)return Mh(this.path,"package.json")}create(e){return this.#e=e,this.#s={},this}update(e){if(!this.content)throw new Error("Can not update without content. Please `load` or `create`");for(let t of Rb)this.#s=t({content:e,originalContent:this.content});for(let[t,i]of Object.entries(e))Db.has(t)||(this.content[t]=i);return this}async save({sort:e}={}){if(!this.#n)throw new Error("No package.json to save to");let{[Symbol.for("indent")]:t,[Symbol.for("newline")]:i,...r}=this.content,n=t===void 0?" ":t,a=i===void 0?`
17
+ `:i,c=e?Pb(r):r,l=`${JSON.stringify(c,null,n)}
18
+ `.replace(/\n/g,a);if(l.trim()!==this.#t.trim()){let h=await Eb(this.filename,l);return this.#t=l,h}}syncNormalize(e={}){return e.steps=this.constructor.normalizeSteps.filter(t=>t!=="_attributes"),Ab(this,e),this}async normalize(e={}){return e.steps||(e.steps=this.constructor.normalizeSteps),await Mr(this,e),this}async prepare(e={}){return e.steps||(e.steps=this.constructor.prepareSteps),await Mr(this,e),this}async fix(e={}){return e.steps=this.constructor.fixSteps,await Mr(this,e),this}};Uh.exports=kr});module.exports=qh();