updates 15.3.0 → 16.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -7
- package/dist/updates.js +46 -0
- package/package.json +7 -9
- package/bin/updates.js +0 -46
package/README.md
CHANGED
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
|
|
8
8
|
# Usage
|
|
9
9
|
|
|
10
|
+
`bun` and `node` are supported and tested. For bun, replace `npx` with `bunx` and `npm` with `bun`.
|
|
11
|
+
|
|
10
12
|
```bash
|
|
11
13
|
# check for updates
|
|
12
14
|
npx updates
|
|
@@ -15,13 +17,6 @@ npx updates
|
|
|
15
17
|
npx updates -u && npm i
|
|
16
18
|
```
|
|
17
19
|
|
|
18
|
-
## Bun and Deno
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
bunx updates
|
|
22
|
-
deno run -A npm:updates
|
|
23
|
-
```
|
|
24
|
-
|
|
25
20
|
## Options
|
|
26
21
|
|
|
27
22
|
See `--help`. Options that take multiple arguments can take them either via comma-separated value or by specifying the option multiple times.
|
|
@@ -30,6 +25,10 @@ If an option has a optional `pkg` argument but none is given, the option will be
|
|
|
30
25
|
|
|
31
26
|
All `pkg` options support glob matching via [picomatch](https://github.com/micromatch/picomatch) or regex (on CLI, wrap the regex in slashes, e.g. `'/^foo/'`).
|
|
32
27
|
|
|
28
|
+
## Notes
|
|
29
|
+
|
|
30
|
+
The module uses global `fetch` under the hood. In Node.js HTTP proxies from environment are [not supported](https://github.com/nodejs/undici/issues/1650), but it's still possible to enable `updates` to use them by installing the `undici` dependency into your project.
|
|
31
|
+
|
|
33
32
|
## Config File
|
|
34
33
|
|
|
35
34
|
The config file is used to configure certain options of the module. CLI arguments have precedence over options in the config file, except for `include` and `exclude` options which are merged.
|
package/dist/updates.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {createRequire} from 'module';const require = createRequire(import.meta.url);
|
|
3
|
+
var wa=Object.create;var ts=Object.defineProperty;var xa=Object.getOwnPropertyDescriptor;var ya=Object.getOwnPropertyNames;var Ta=Object.getPrototypeOf,ba=Object.prototype.hasOwnProperty;var Xe=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var A=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ca=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ya(e))!ba.call(t,i)&&i!==r&&ts(t,i,{get:()=>e[i],enumerable:!(s=xa(e,i))||s.enumerable});return t};var we=(t,e,r)=>(r=t!=null?wa(Ta(t)):{},Ca(e||!t||!t.__esModule?ts(r,"default",{value:t,enumerable:!0}):r,t));var Yt=A((xf,is)=>{"use strict";function Sa(t,e){var r=t;e.slice(0,-1).forEach(function(i){r=r[i]||{}});var s=e[e.length-1];return s in r}function rs(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function ss(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}is.exports=function(t,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(w){r.bools[w]=!0});var s={};function i(w){return s[w].some(function(C){return r.bools[C]})}Object.keys(e.alias||{}).forEach(function(w){s[w]=[].concat(e.alias[w]),s[w].forEach(function(C){s[C]=[w].concat(s[w].filter(function(L){return C!==L}))})}),[].concat(e.string).filter(Boolean).forEach(function(w){r.strings[w]=!0,s[w]&&[].concat(s[w]).forEach(function(C){r.strings[C]=!0})});var n=e.default||{},o={_:[]};function a(w,C){return r.allBools&&/^--[^=]+$/.test(C)||r.strings[w]||r.bools[w]||s[w]}function l(w,C,L){for(var $=w,I=0;I<C.length-1;I++){var v=C[I];if(ss($,v))return;$[v]===void 0&&($[v]={}),($[v]===Object.prototype||$[v]===Number.prototype||$[v]===String.prototype)&&($[v]={}),$[v]===Array.prototype&&($[v]=[]),$=$[v]}var f=C[C.length-1];ss($,f)||(($===Object.prototype||$===Number.prototype||$===String.prototype)&&($={}),$===Array.prototype&&($=[]),$[f]===void 0||r.bools[f]||typeof $[f]=="boolean"?$[f]=L:Array.isArray($[f])?$[f].push(L):$[f]=[$[f],L])}function h(w,C,L){if(!(L&&r.unknownFn&&!a(w,L)&&r.unknownFn(L)===!1)){var $=!r.strings[w]&&rs(C)?Number(C):C;l(o,w.split("."),$),(s[w]||[]).forEach(function(I){l(o,I.split("."),$)})}}Object.keys(r.bools).forEach(function(w){h(w,n[w]===void 0?!1:n[w])});var d=[];t.indexOf("--")!==-1&&(d=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var u=0;u<t.length;u++){var c=t[u],p,_;if(/^--.+=/.test(c)){var E=c.match(/^--([^=]+)=([\s\S]*)$/);p=E[1];var O=E[2];r.bools[p]&&(O=O!=="false"),h(p,O,c)}else if(/^--no-.+/.test(c))p=c.match(/^--no-(.+)/)[1],h(p,!1,c);else if(/^--.+/.test(c))p=c.match(/^--(.+)/)[1],_=t[u+1],_!==void 0&&!/^(-|--)[^-]/.test(_)&&!r.bools[p]&&!r.allBools&&(!s[p]||!i(p))?(h(p,_,c),u+=1):/^(true|false)$/.test(_)?(h(p,_==="true",c),u+=1):h(p,r.strings[p]?"":!0,c);else if(/^-[^-]+/.test(c)){for(var b=c.slice(1,-1).split(""),S=!1,N=0;N<b.length;N++){if(_=c.slice(N+2),_==="-"){h(b[N],_,c);continue}if(/[A-Za-z]/.test(b[N])&&_[0]==="="){h(b[N],_.slice(1),c),S=!0;break}if(/[A-Za-z]/.test(b[N])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(_)){h(b[N],_,c),S=!0;break}if(b[N+1]&&b[N+1].match(/\W/)){h(b[N],c.slice(N+2),c),S=!0;break}else h(b[N],r.strings[b[N]]?"":!0,c)}p=c.slice(-1)[0],!S&&p!=="-"&&(t[u+1]&&!/^(-|--)[^-]/.test(t[u+1])&&!r.bools[p]&&(!s[p]||!i(p))?(h(p,t[u+1],c),u+=1):t[u+1]&&/^(true|false)$/.test(t[u+1])?(h(p,t[u+1]==="true",c),u+=1):h(p,r.strings[p]?"":!0,c))}else if((!r.unknownFn||r.unknownFn(c)!==!1)&&o._.push(r.strings._||!rs(c)?c:Number(c)),e.stopEarly){o._.push.apply(o._,t.slice(u+1));break}}return Object.keys(n).forEach(function(w){Sa(o,w.split("."))||(l(o,w.split("."),n[w]),(s[w]||[]).forEach(function(C){l(o,C.split("."),n[w])}))}),e["--"]?o["--"]=d.slice():d.forEach(function(w){o._.push(w)}),o}});var os=A((yf,ns)=>{function $a(t){return Buffer.from(t,"base64").toString("utf8")}function Oa(t){return Buffer.from(t,"utf8").toString("base64")}ns.exports={decodeBase64:$a,encodeBase64:Oa}});var us=A(Ce=>{Ce.parse=Ce.decode=va;Ce.stringify=Ce.encode=as;Ce.safe=De;Ce.unsafe=gt;var Qt=typeof process<"u"&&process.platform==="win32"?`\r
|
|
4
|
+
`:`
|
|
5
|
+
`;function as(t,e){var r=[],s="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var i=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(n,o,a){var l=t[n];l&&Array.isArray(l)?l.forEach(function(h){s+=De(n+"[]")+i+De(h)+`
|
|
6
|
+
`}):l&&typeof l=="object"?r.push(n):s+=De(n)+i+De(l)+Qt}),e.section&&s.length&&(s="["+De(e.section)+"]"+Qt+s),r.forEach(function(n,o,a){var l=ls(n).join("\\."),h=(e.section?e.section+".":"")+l,d=as(t[n],{section:h,whitespace:e.whitespace});s.length&&d.length&&(s+=Qt),s+=d}),s}function ls(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function va(t){var e={},r=e,s=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,n=t.split(/[\r\n]+/g);return n.forEach(function(o,a,l){if(!(!o||o.match(/^\s*[;#]/))){var h=o.match(i);if(h){if(h[1]!==void 0){if(s=gt(h[1]),s==="__proto__"){r={};return}r=e[s]=e[s]||{};return}var d=gt(h[2]);if(d!=="__proto__"){var u=h[3]?gt(h[4]):!0;switch(u){case"true":case"false":case"null":u=JSON.parse(u)}if(d.length>2&&d.slice(-2)==="[]"){if(d=d.substring(0,d.length-2),d==="__proto__")return;r[d]?Array.isArray(r[d])||(r[d]=[r[d]]):r[d]=[]}Array.isArray(r[d])?r[d].push(u):r[d]=u}}}}),Object.keys(e).filter(function(o,a,l){if(!e[o]||typeof e[o]!="object"||Array.isArray(e[o]))return!1;var h=ls(o),d=e,u=h.pop(),c=u.replace(/\\\./g,".");return h.forEach(function(p,_,E){p!=="__proto__"&&((!d[p]||typeof d[p]!="object")&&(d[p]={}),d=d[p])}),d===e&&c===u?!1:(d[c]=e[o],!0)}).forEach(function(o,a,l){delete e[o]}),e}function hs(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function De(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&hs(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function gt(t,e){if(t=(t||"").trim(),hs(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,s="",i=0,n=t.length;i<n;i++){var o=t.charAt(i);if(r)"\\;#".indexOf(o)!==-1?s+=o:s+="\\"+o,r=!1;else{if(";#".indexOf(o)!==-1)break;o==="\\"?r=!0:s+=o}}return r&&(s+="\\"),s.trim()}return t}});var ps=A((bf,fs)=>{"use strict";var Zt=1,cs=2;function Ia(){return""}function Na(t,e,r){return t.slice(e,r).replace(/\S/g," ")}fs.exports=function(t,e){e=e||{};for(var r,s,i=!1,n=!1,o=0,a="",l=e.whitespace===!1?Ia:Na,h=0;h<t.length;h++){if(r=t[h],s=t[h+1],!n&&r==='"'){var d=t[h-1]==="\\"&&t[h-2]!=="\\";d||(i=!i)}if(!i){if(!n&&r+s==="//")a+=t.slice(o,h),o=h,n=Zt,h++;else if(n===Zt&&r+s===`\r
|
|
7
|
+
`){h++,n=!1,a+=l(t,o,h),o=h;continue}else if(n===Zt&&r===`
|
|
8
|
+
`)n=!1,a+=l(t,o,h),o=h;else if(!n&&r+s==="/*"){a+=t.slice(o,h),o=h,n=cs,h++;continue}else if(n===cs&&r+s==="*/"){h++,n=!1,a+=l(t,o,h+1),o=h+1;continue}}}return a+(n?l(t.substr(o)):t.substr(o))}});var ms=A(Pe=>{"use strict";var ds=Xe("fs"),La=us(),Ye=Xe("path"),Ha=ps(),Da=Pe.parse=function(t){return/^\s*{/.test(t)?JSON.parse(Ha(t)):La.parse(t)},Pa=Pe.file=function(){var t=[].slice.call(arguments).filter(function(i){return i!=null});for(var e in t)if(typeof t[e]!="string")return;var r=Ye.join.apply(null,t),s;try{return ds.readFileSync(r,"utf-8")}catch{return}},Cf=Pe.json=function(){var t=Pa.apply(null,arguments);return t?Da(t):null},Sf=Pe.env=function(t,e){e=e||process.env;var r={},s=t.length;for(var i in e)if(i.toLowerCase().indexOf(t.toLowerCase())===0){for(var n=i.substring(s).split("__"),o;(o=n.indexOf(""))>-1;)n.splice(o,1);var a=r;n.forEach(function(h,d){!h||typeof a!="object"||(d===n.length-1&&(a[h]=e[i]),a[h]===void 0&&(a[h]={}),a=a[h])})}return r},$f=Pe.find=function(){var t=Ye.join.apply(null,[].slice.call(arguments));function e(r,s){var i=Ye.join(r,s);try{return ds.statSync(i),i}catch{if(Ye.dirname(r)!==r)return e(Ye.dirname(r),s)}}return e(process.cwd(),t)}});var ws=A((vf,_s)=>{"use strict";function Es(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function Rs(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function As(t){var e=[];return t.forEach(function(r,s){typeof r=="object"&&r!==null?Array.isArray(r)?e[s]=As(r):Es(r)?e[s]=Rs(r):e[s]=Jt({},r):e[s]=r}),e}function gs(t,e){return e==="__proto__"?void 0:t[e]}var Jt=_s.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var t=arguments[0],e=Array.prototype.slice.call(arguments,1),r,s,i;return e.forEach(function(n){typeof n!="object"||n===null||Array.isArray(n)||Object.keys(n).forEach(function(o){if(s=gs(t,o),r=gs(n,o),r!==t)if(typeof r!="object"||r===null){t[o]=r;return}else if(Array.isArray(r)){t[o]=As(r);return}else if(Es(r)){t[o]=Rs(r);return}else if(typeof s!="object"||s===null||Array.isArray(s)){t[o]=Jt({},r);return}else{t[o]=Jt(s,r);return}})}),t}});var er=A((If,Ts)=>{var Qe=ms(),Ue=Xe("path").join,Ua=ws(),xs="/etc",ys=process.platform==="win32",Ze=ys?process.env.USERPROFILE:process.env.HOME;Ts.exports=function(t,e,r,s){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=Yt()(process.argv.slice(2))),e=(typeof e=="string"?Qe.json(e):e)||{},s=s||Qe.parse;var i=Qe.env(t+"_"),n=[e],o=[];function a(l){if(!(o.indexOf(l)>=0)){var h=Qe.file(l);h&&(n.push(s(h)),o.push(l))}}return ys||[Ue(xs,t,"config"),Ue(xs,t+"rc")].forEach(a),Ze&&[Ue(Ze,".config",t,"config"),Ue(Ze,".config",t),Ue(Ze,"."+t,"config"),Ue(Ze,"."+t+"rc")].forEach(a),a(Qe.find("."+t+"rc")),i.config&&a(i.config),r.config&&a(r.config),Ua.apply(null,n.concat([i,r,o.length?{configs:o,config:o[o.length-1]}:void 0]))}});var Ns=A((Nf,Is)=>{var tr=Xe("url"),Os=os(),Fa=Os.decodeBase64,Ma=Os.encodeBase64,bs=":_authToken",Cs=":_auth",Ss=":username",$s=":_password";Is.exports=function(){var t,e;return arguments.length>=2?(t=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?t=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||er()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),t=t||e.npmrc.registry,vs(t,e)||Ba(e.npmrc)};function vs(t,e){for(var r=tr.parse(t,!1,!0),s;s!=="/"&&r.pathname!==s;){s=r.pathname||"/";var i="//"+r.host+s.replace(/\/$/,""),n=Ga(i,e.npmrc);if(n)return n;if(!e.recursive)return/\/$/.test(t)?void 0:vs(tr.resolve(t,"."),e);r.pathname=tr.resolve(qa(s),"..")||"/"}}function Ba(t){if(t._auth){var e=Et(t._auth);return{token:e,type:"Basic"}}}function qa(t){return t[t.length-1]==="/"?t:t+"/"}function Ga(t,e){var r=ja(e[t+bs]||e[t+"/"+bs]);if(r)return r;var s=e[t+Ss]||e[t+"/"+Ss],i=e[t+$s]||e[t+"/"+$s],n=Wa(s,i);if(n)return n;var o=za(e[t+Cs]||e[t+"/"+Cs]);if(o)return o}function Et(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function ja(t){if(t){var e=Et(t);return{token:e,type:"Bearer"}}}function Wa(t,e){if(!(!t||!e)){var r=Fa(Et(e)),s=Ma(t+":"+r);return{token:s,type:"Basic",password:r,username:t}}}function za(t){if(t){var e=Et(t);return{token:e,type:"Basic"}}}});var Je=A((Lf,Ls)=>{var ka="2.0.0",Va=Number.MAX_SAFE_INTEGER||9007199254740991,Ka=16;Ls.exports={SEMVER_SPEC_VERSION:ka,MAX_LENGTH:256,MAX_SAFE_INTEGER:Va,MAX_SAFE_COMPONENT_LENGTH:Ka}});var et=A((Hf,Hs)=>{var Xa=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Hs.exports=Xa});var Se=A((xe,Ds)=>{var{MAX_SAFE_COMPONENT_LENGTH:rr}=Je(),Ya=et();xe=Ds.exports={};var Qa=xe.re=[],y=xe.src=[],T=xe.t={},Za=0,H=(t,e,r)=>{let s=Za++;Ya(t,s,e),T[t]=s,y[s]=e,Qa[s]=new RegExp(e,r?"g":void 0)};H("NUMERICIDENTIFIER","0|[1-9]\\d*");H("NUMERICIDENTIFIERLOOSE","[0-9]+");H("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");H("MAINVERSION",`(${y[T.NUMERICIDENTIFIER]})\\.(${y[T.NUMERICIDENTIFIER]})\\.(${y[T.NUMERICIDENTIFIER]})`);H("MAINVERSIONLOOSE",`(${y[T.NUMERICIDENTIFIERLOOSE]})\\.(${y[T.NUMERICIDENTIFIERLOOSE]})\\.(${y[T.NUMERICIDENTIFIERLOOSE]})`);H("PRERELEASEIDENTIFIER",`(?:${y[T.NUMERICIDENTIFIER]}|${y[T.NONNUMERICIDENTIFIER]})`);H("PRERELEASEIDENTIFIERLOOSE",`(?:${y[T.NUMERICIDENTIFIERLOOSE]}|${y[T.NONNUMERICIDENTIFIER]})`);H("PRERELEASE",`(?:-(${y[T.PRERELEASEIDENTIFIER]}(?:\\.${y[T.PRERELEASEIDENTIFIER]})*))`);H("PRERELEASELOOSE",`(?:-?(${y[T.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${y[T.PRERELEASEIDENTIFIERLOOSE]})*))`);H("BUILDIDENTIFIER","[0-9A-Za-z-]+");H("BUILD",`(?:\\+(${y[T.BUILDIDENTIFIER]}(?:\\.${y[T.BUILDIDENTIFIER]})*))`);H("FULLPLAIN",`v?${y[T.MAINVERSION]}${y[T.PRERELEASE]}?${y[T.BUILD]}?`);H("FULL",`^${y[T.FULLPLAIN]}$`);H("LOOSEPLAIN",`[v=\\s]*${y[T.MAINVERSIONLOOSE]}${y[T.PRERELEASELOOSE]}?${y[T.BUILD]}?`);H("LOOSE",`^${y[T.LOOSEPLAIN]}$`);H("GTLT","((?:<|>)?=?)");H("XRANGEIDENTIFIERLOOSE",`${y[T.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);H("XRANGEIDENTIFIER",`${y[T.NUMERICIDENTIFIER]}|x|X|\\*`);H("XRANGEPLAIN",`[v=\\s]*(${y[T.XRANGEIDENTIFIER]})(?:\\.(${y[T.XRANGEIDENTIFIER]})(?:\\.(${y[T.XRANGEIDENTIFIER]})(?:${y[T.PRERELEASE]})?${y[T.BUILD]}?)?)?`);H("XRANGEPLAINLOOSE",`[v=\\s]*(${y[T.XRANGEIDENTIFIERLOOSE]})(?:\\.(${y[T.XRANGEIDENTIFIERLOOSE]})(?:\\.(${y[T.XRANGEIDENTIFIERLOOSE]})(?:${y[T.PRERELEASELOOSE]})?${y[T.BUILD]}?)?)?`);H("XRANGE",`^${y[T.GTLT]}\\s*${y[T.XRANGEPLAIN]}$`);H("XRANGELOOSE",`^${y[T.GTLT]}\\s*${y[T.XRANGEPLAINLOOSE]}$`);H("COERCE",`(^|[^\\d])(\\d{1,${rr}})(?:\\.(\\d{1,${rr}}))?(?:\\.(\\d{1,${rr}}))?(?:$|[^\\d])`);H("COERCERTL",y[T.COERCE],!0);H("LONETILDE","(?:~>?)");H("TILDETRIM",`(\\s*)${y[T.LONETILDE]}\\s+`,!0);xe.tildeTrimReplace="$1~";H("TILDE",`^${y[T.LONETILDE]}${y[T.XRANGEPLAIN]}$`);H("TILDELOOSE",`^${y[T.LONETILDE]}${y[T.XRANGEPLAINLOOSE]}$`);H("LONECARET","(?:\\^)");H("CARETTRIM",`(\\s*)${y[T.LONECARET]}\\s+`,!0);xe.caretTrimReplace="$1^";H("CARET",`^${y[T.LONECARET]}${y[T.XRANGEPLAIN]}$`);H("CARETLOOSE",`^${y[T.LONECARET]}${y[T.XRANGEPLAINLOOSE]}$`);H("COMPARATORLOOSE",`^${y[T.GTLT]}\\s*(${y[T.LOOSEPLAIN]})$|^$`);H("COMPARATOR",`^${y[T.GTLT]}\\s*(${y[T.FULLPLAIN]})$|^$`);H("COMPARATORTRIM",`(\\s*)${y[T.GTLT]}\\s*(${y[T.LOOSEPLAIN]}|${y[T.XRANGEPLAIN]})`,!0);xe.comparatorTrimReplace="$1$2$3";H("HYPHENRANGE",`^\\s*(${y[T.XRANGEPLAIN]})\\s+-\\s+(${y[T.XRANGEPLAIN]})\\s*$`);H("HYPHENRANGELOOSE",`^\\s*(${y[T.XRANGEPLAINLOOSE]})\\s+-\\s+(${y[T.XRANGEPLAINLOOSE]})\\s*$`);H("STAR","(<|>)?=?\\s*\\*");H("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");H("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var tt=A((Df,Ps)=>{var Ja=["includePrerelease","loose","rtl"],el=t=>t?typeof t!="object"?{loose:!0}:Ja.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};Ps.exports=el});var sr=A((Pf,Ms)=>{var Us=/^[0-9]+$/,Fs=(t,e)=>{let r=Us.test(t),s=Us.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},tl=(t,e)=>Fs(e,t);Ms.exports={compareIdentifiers:Fs,rcompareIdentifiers:tl}});var re=A((Uf,js)=>{var Rt=et(),{MAX_LENGTH:Bs,MAX_SAFE_INTEGER:At}=Je(),{re:qs,t:Gs}=Se(),rl=tt(),{compareIdentifiers:Fe}=sr(),ir=class t{constructor(e,r){if(r=rl(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>Bs)throw new TypeError(`version is longer than ${Bs} characters`);Rt("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?qs[Gs.LOOSE]:qs[Gs.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>At||this.major<0)throw new TypeError("Invalid major version");if(this.minor>At||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>At||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<At)return n}return i}):this.prerelease=[],this.build=s[5]?s[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(Rt("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Fe(this.major,e.major)||Fe(this.minor,e.minor)||Fe(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(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 r=0;do{let s=this.prerelease[r],i=e.prerelease[r];if(Rt("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return Fe(s,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],i=e.build[r];if(Rt("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return Fe(s,i)}while(++r)}inc(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);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":if(this.prerelease.length===0)this.prerelease=[0];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);s===-1&&this.prerelease.push(0)}r&&(Fe(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};js.exports=ir});var $e=A((Ff,Vs)=>{var{MAX_LENGTH:sl}=Je(),{re:Ws,t:zs}=Se(),ks=re(),il=tt(),nl=(t,e)=>{if(e=il(e),t instanceof ks)return t;if(typeof t!="string"||t.length>sl||!(e.loose?Ws[zs.LOOSE]:Ws[zs.FULL]).test(t))return null;try{return new ks(t,e)}catch{return null}};Vs.exports=nl});var Xs=A((Mf,Ks)=>{var ol=$e(),al=(t,e)=>{let r=ol(t,e);return r?r.version:null};Ks.exports=al});var Qs=A((Bf,Ys)=>{var ll=$e(),hl=(t,e)=>{let r=ll(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};Ys.exports=hl});var ei=A((qf,Js)=>{var Zs=re(),ul=(t,e,r,s)=>{typeof r=="string"&&(s=r,r=void 0);try{return new Zs(t instanceof Zs?t.version:t,r).inc(e,s).version}catch{return null}};Js.exports=ul});var he=A((Gf,ri)=>{var ti=re(),cl=(t,e,r)=>new ti(t,r).compare(new ti(e,r));ri.exports=cl});var _t=A((jf,si)=>{var fl=he(),pl=(t,e,r)=>fl(t,e,r)===0;si.exports=pl});var oi=A((Wf,ni)=>{var ii=$e(),dl=_t(),ml=(t,e)=>{if(dl(t,e))return null;{let r=ii(t),s=ii(e),i=r.prerelease.length||s.prerelease.length,n=i?"pre":"",o=i?"prerelease":"";for(let a in r)if((a==="major"||a==="minor"||a==="patch")&&r[a]!==s[a])return n+a;return o}};ni.exports=ml});var li=A((zf,ai)=>{var gl=re(),El=(t,e)=>new gl(t,e).major;ai.exports=El});var ui=A((kf,hi)=>{var Rl=re(),Al=(t,e)=>new Rl(t,e).minor;hi.exports=Al});var fi=A((Vf,ci)=>{var _l=re(),wl=(t,e)=>new _l(t,e).patch;ci.exports=wl});var di=A((Kf,pi)=>{var xl=$e(),yl=(t,e)=>{let r=xl(t,e);return r&&r.prerelease.length?r.prerelease:null};pi.exports=yl});var gi=A((Xf,mi)=>{var Tl=he(),bl=(t,e,r)=>Tl(e,t,r);mi.exports=bl});var Ri=A((Yf,Ei)=>{var Cl=he(),Sl=(t,e)=>Cl(t,e,!0);Ei.exports=Sl});var wt=A((Qf,_i)=>{var Ai=re(),$l=(t,e,r)=>{let s=new Ai(t,r),i=new Ai(e,r);return s.compare(i)||s.compareBuild(i)};_i.exports=$l});var xi=A((Zf,wi)=>{var Ol=wt(),vl=(t,e)=>t.sort((r,s)=>Ol(r,s,e));wi.exports=vl});var Ti=A((Jf,yi)=>{var Il=wt(),Nl=(t,e)=>t.sort((r,s)=>Il(s,r,e));yi.exports=Nl});var rt=A((ep,bi)=>{var Ll=he(),Hl=(t,e,r)=>Ll(t,e,r)>0;bi.exports=Hl});var xt=A((tp,Ci)=>{var Dl=he(),Pl=(t,e,r)=>Dl(t,e,r)<0;Ci.exports=Pl});var nr=A((rp,Si)=>{var Ul=he(),Fl=(t,e,r)=>Ul(t,e,r)!==0;Si.exports=Fl});var yt=A((sp,$i)=>{var Ml=he(),Bl=(t,e,r)=>Ml(t,e,r)>=0;$i.exports=Bl});var Tt=A((ip,Oi)=>{var ql=he(),Gl=(t,e,r)=>ql(t,e,r)<=0;Oi.exports=Gl});var or=A((np,vi)=>{var jl=_t(),Wl=nr(),zl=rt(),kl=yt(),Vl=xt(),Kl=Tt(),Xl=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return jl(t,r,s);case"!=":return Wl(t,r,s);case">":return zl(t,r,s);case">=":return kl(t,r,s);case"<":return Vl(t,r,s);case"<=":return Kl(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};vi.exports=Xl});var Ni=A((op,Ii)=>{var Yl=re(),Ql=$e(),{re:bt,t:Ct}=Se(),Zl=(t,e)=>{if(t instanceof Yl)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(bt[Ct.COERCE]);else{let s;for(;(s=bt[Ct.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||s.index+s[0].length!==r.index+r[0].length)&&(r=s),bt[Ct.COERCERTL].lastIndex=s.index+s[1].length+s[2].length;bt[Ct.COERCERTL].lastIndex=-1}return r===null?null:Ql(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};Ii.exports=Zl});var Hi=A((ap,Li)=>{"use strict";Li.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Pi=A((lp,Di)=>{"use strict";Di.exports=G;G.Node=Oe;G.create=G;function G(t){var e=this;if(e instanceof G||(e=new G),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)e.push(arguments[r]);return e}G.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};G.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};G.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};G.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)eh(this,arguments[t]);return this.length};G.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)th(this,arguments[t]);return this.length};G.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};G.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};G.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,s=0;r!==null;s++)t.call(e,r.value,s,this),r=r.next};G.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,s=this.length-1;r!==null;s--)t.call(e,r.value,s,this),r=r.prev};G.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};G.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};G.prototype.map=function(t,e){e=e||this;for(var r=new G,s=this.head;s!==null;)r.push(t.call(e,s.value,this)),s=s.next;return r};G.prototype.mapReverse=function(t,e){e=e||this;for(var r=new G,s=this.tail;s!==null;)r.push(t.call(e,s.value,this)),s=s.prev;return r};G.prototype.reduce=function(t,e){var r,s=this.head;if(arguments.length>1)r=e;else if(this.head)s=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;s!==null;i++)r=t(r,s.value,i),s=s.next;return r};G.prototype.reduceReverse=function(t,e){var r,s=this.tail;if(arguments.length>1)r=e;else if(this.tail)s=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;s!==null;i--)r=t(r,s.value,i),s=s.prev;return r};G.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};G.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};G.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new G;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=0,i=this.head;i!==null&&s<t;s++)i=i.next;for(;i!==null&&s<e;s++,i=i.next)r.push(i.value);return r};G.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new G;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=this.length,i=this.tail;i!==null&&s>e;s--)i=i.prev;for(;i!==null&&s>t;s--,i=i.prev)r.push(i.value);return r};G.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var s=0,i=this.head;i!==null&&s<t;s++)i=i.next;for(var n=[],s=0;i&&s<e;s++)n.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var s=0;s<r.length;s++)i=Jl(this,i,r[s]);return n};G.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=e,this.tail=t,this};function Jl(t,e,r){var s=e===t.head?new Oe(r,null,e,t):new Oe(r,e,e.next,t);return s.next===null&&(t.tail=s),s.prev===null&&(t.head=s),t.length++,s}function eh(t,e){t.tail=new Oe(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function th(t,e){t.head=new Oe(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function Oe(t,e,r,s){if(!(this instanceof Oe))return new Oe(t,e,r,s);this.list=s,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Hi()(G)}catch{}});var qi=A((hp,Bi)=>{"use strict";var rh=Pi(),ve=Symbol("max"),Re=Symbol("length"),Me=Symbol("lengthCalculator"),it=Symbol("allowStale"),Ie=Symbol("maxAge"),Ee=Symbol("dispose"),Ui=Symbol("noDisposeOnSet"),te=Symbol("lruList"),pe=Symbol("cache"),Mi=Symbol("updateAgeOnGet"),ar=()=>1,hr=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let r=this[ve]=e.max||1/0,s=e.length||ar;if(this[Me]=typeof s!="function"?ar:s,this[it]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ie]=e.maxAge||0,this[Ee]=e.dispose,this[Ui]=e.noDisposeOnSet||!1,this[Mi]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[ve]=e||1/0,st(this)}get max(){return this[ve]}set allowStale(e){this[it]=!!e}get allowStale(){return this[it]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Ie]=e,st(this)}get maxAge(){return this[Ie]}set lengthCalculator(e){typeof e!="function"&&(e=ar),e!==this[Me]&&(this[Me]=e,this[Re]=0,this[te].forEach(r=>{r.length=this[Me](r.value,r.key),this[Re]+=r.length})),st(this)}get lengthCalculator(){return this[Me]}get length(){return this[Re]}get itemCount(){return this[te].length}rforEach(e,r){r=r||this;for(let s=this[te].tail;s!==null;){let i=s.prev;Fi(this,e,s,r),s=i}}forEach(e,r){r=r||this;for(let s=this[te].head;s!==null;){let i=s.next;Fi(this,e,s,r),s=i}}keys(){return this[te].toArray().map(e=>e.key)}values(){return this[te].toArray().map(e=>e.value)}reset(){this[Ee]&&this[te]&&this[te].length&&this[te].forEach(e=>this[Ee](e.key,e.value)),this[pe]=new Map,this[te]=new rh,this[Re]=0}dump(){return this[te].map(e=>St(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[te]}set(e,r,s){if(s=s||this[Ie],s&&typeof s!="number")throw new TypeError("maxAge must be a number");let i=s?Date.now():0,n=this[Me](r,e);if(this[pe].has(e)){if(n>this[ve])return Be(this,this[pe].get(e)),!1;let l=this[pe].get(e).value;return this[Ee]&&(this[Ui]||this[Ee](e,l.value)),l.now=i,l.maxAge=s,l.value=r,this[Re]+=n-l.length,l.length=n,this.get(e),st(this),!0}let o=new ur(e,r,n,i,s);return o.length>this[ve]?(this[Ee]&&this[Ee](e,r),!1):(this[Re]+=o.length,this[te].unshift(o),this[pe].set(e,this[te].head),st(this),!0)}has(e){if(!this[pe].has(e))return!1;let r=this[pe].get(e).value;return!St(this,r)}get(e){return lr(this,e,!0)}peek(e){return lr(this,e,!1)}pop(){let e=this[te].tail;return e?(Be(this,e),e.value):null}del(e){Be(this,this[pe].get(e))}load(e){this.reset();let r=Date.now();for(let s=e.length-1;s>=0;s--){let i=e[s],n=i.e||0;if(n===0)this.set(i.k,i.v);else{let o=n-r;o>0&&this.set(i.k,i.v,o)}}}prune(){this[pe].forEach((e,r)=>lr(this,r,!1))}},lr=(t,e,r)=>{let s=t[pe].get(e);if(s){let i=s.value;if(St(t,i)){if(Be(t,s),!t[it])return}else r&&(t[Mi]&&(s.value.now=Date.now()),t[te].unshiftNode(s));return i.value}},St=(t,e)=>{if(!e||!e.maxAge&&!t[Ie])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Ie]&&r>t[Ie]},st=t=>{if(t[Re]>t[ve])for(let e=t[te].tail;t[Re]>t[ve]&&e!==null;){let r=e.prev;Be(t,e),e=r}},Be=(t,e)=>{if(e){let r=e.value;t[Ee]&&t[Ee](r.key,r.value),t[Re]-=r.length,t[pe].delete(r.key),t[te].removeNode(e)}},ur=class{constructor(e,r,s,i,n){this.key=e,this.value=r,this.length=s,this.now=i,this.maxAge=n||0}},Fi=(t,e,r,s)=>{let i=r.value;St(t,i)&&(Be(t,r),t[it]||(i=void 0)),i&&e.call(s,i.value,i.key,t)};Bi.exports=hr});var ue=A((up,zi)=>{var cr=class t{constructor(e,r){if(r=ih(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof fr)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e,this.set=e.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(i=>!ji(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&hh(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let s=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=Gi.get(s);if(i)return i;let n=this.options.loose,o=n?oe[ie.HYPHENRANGELOOSE]:oe[ie.HYPHENRANGE];e=e.replace(o,Ah(this.options.includePrerelease)),K("hyphen replace",e),e=e.replace(oe[ie.COMPARATORTRIM],oh),K("comparator trim",e),e=e.replace(oe[ie.TILDETRIM],ah),e=e.replace(oe[ie.CARETTRIM],lh),e=e.split(/\s+/).join(" ");let a=e.split(" ").map(u=>uh(u,this.options)).join(" ").split(/\s+/).map(u=>Rh(u,this.options));n&&(a=a.filter(u=>(K("loose invalid filter",u,this.options),!!u.match(oe[ie.COMPARATORLOOSE])))),K("range list",a);let l=new Map,h=a.map(u=>new fr(u,this.options));for(let u of h){if(ji(u))return[u];l.set(u.value,u)}l.size>1&&l.has("")&&l.delete("");let d=[...l.values()];return Gi.set(s,d),d}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>Wi(s,r)&&e.set.some(i=>Wi(i,r)&&s.every(n=>i.every(o=>n.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new nh(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(_h(this.set[r],e,this.options))return!0;return!1}};zi.exports=cr;var sh=qi(),Gi=new sh({max:1e3}),ih=tt(),fr=nt(),K=et(),nh=re(),{re:oe,t:ie,comparatorTrimReplace:oh,tildeTrimReplace:ah,caretTrimReplace:lh}=Se(),ji=t=>t.value==="<0.0.0-0",hh=t=>t.value==="",Wi=(t,e)=>{let r=!0,s=t.slice(),i=s.pop();for(;r&&s.length;)r=s.every(n=>i.intersects(n,e)),i=s.pop();return r},uh=(t,e)=>(K("comp",t,e),t=ph(t,e),K("caret",t),t=ch(t,e),K("tildes",t),t=mh(t,e),K("xrange",t),t=Eh(t,e),K("stars",t),t),ne=t=>!t||t.toLowerCase()==="x"||t==="*",ch=(t,e)=>t.trim().split(/\s+/).map(r=>fh(r,e)).join(" "),fh=(t,e)=>{let r=e.loose?oe[ie.TILDELOOSE]:oe[ie.TILDE];return t.replace(r,(s,i,n,o,a)=>{K("tilde",t,s,i,n,o,a);let l;return ne(i)?l="":ne(n)?l=`>=${i}.0.0 <${+i+1}.0.0-0`:ne(o)?l=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:a?(K("replaceTilde pr",a),l=`>=${i}.${n}.${o}-${a} <${i}.${+n+1}.0-0`):l=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,K("tilde return",l),l})},ph=(t,e)=>t.trim().split(/\s+/).map(r=>dh(r,e)).join(" "),dh=(t,e)=>{K("caret",t,e);let r=e.loose?oe[ie.CARETLOOSE]:oe[ie.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(i,n,o,a,l)=>{K("caret",t,i,n,o,a,l);let h;return ne(n)?h="":ne(o)?h=`>=${n}.0.0${s} <${+n+1}.0.0-0`:ne(a)?n==="0"?h=`>=${n}.${o}.0${s} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.0${s} <${+n+1}.0.0-0`:l?(K("replaceCaret pr",l),n==="0"?o==="0"?h=`>=${n}.${o}.${a}-${l} <${n}.${o}.${+a+1}-0`:h=`>=${n}.${o}.${a}-${l} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.${a}-${l} <${+n+1}.0.0-0`):(K("no pr"),n==="0"?o==="0"?h=`>=${n}.${o}.${a}${s} <${n}.${o}.${+a+1}-0`:h=`>=${n}.${o}.${a}${s} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.${a} <${+n+1}.0.0-0`),K("caret return",h),h})},mh=(t,e)=>(K("replaceXRanges",t,e),t.split(/\s+/).map(r=>gh(r,e)).join(" ")),gh=(t,e)=>{t=t.trim();let r=e.loose?oe[ie.XRANGELOOSE]:oe[ie.XRANGE];return t.replace(r,(s,i,n,o,a,l)=>{K("xRange",t,s,i,n,o,a,l);let h=ne(n),d=h||ne(o),u=d||ne(a),c=u;return i==="="&&c&&(i=""),l=e.includePrerelease?"-0":"",h?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&c?(d&&(o=0),a=0,i===">"?(i=">=",d?(n=+n+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",d?n=+n+1:o=+o+1),i==="<"&&(l="-0"),s=`${i+n}.${o}.${a}${l}`):d?s=`>=${n}.0.0${l} <${+n+1}.0.0-0`:u&&(s=`>=${n}.${o}.0${l} <${n}.${+o+1}.0-0`),K("xRange return",s),s})},Eh=(t,e)=>(K("replaceStars",t,e),t.trim().replace(oe[ie.STAR],"")),Rh=(t,e)=>(K("replaceGTE0",t,e),t.trim().replace(oe[e.includePrerelease?ie.GTE0PRE:ie.GTE0],"")),Ah=t=>(e,r,s,i,n,o,a,l,h,d,u,c,p)=>(ne(s)?r="":ne(i)?r=`>=${s}.0.0${t?"-0":""}`:ne(n)?r=`>=${s}.${i}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,ne(h)?l="":ne(d)?l=`<${+h+1}.0.0-0`:ne(u)?l=`<${h}.${+d+1}.0-0`:c?l=`<=${h}.${d}.${u}-${c}`:t?l=`<${h}.${d}.${+u+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),_h=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(K(t[s].semver),t[s].semver!==fr.ANY&&t[s].semver.prerelease.length>0){let i=t[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var nt=A((cp,Yi)=>{var ot=Symbol("SemVer ANY"),mr=class t{static get ANY(){return ot}constructor(e,r){if(r=wh(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}dr("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===ot?this.value="":this.value=this.operator+this.semver.version,dr("comp",this)}parse(e){let r=this.options.loose?ki[Vi.COMPARATORLOOSE]:ki[Vi.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new Ki(s[2],this.options.loose):this.semver=ot}toString(){return this.value}test(e){if(dr("Comparator.test",e,this.options.loose),this.semver===ot||e===ot)return!0;if(typeof e=="string")try{e=new Ki(e,this.options)}catch{return!1}return pr(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new Xi(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new Xi(this.value,r).test(e.semver);let s=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),n=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=pr(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=pr(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return s||i||n&&o||a||l}};Yi.exports=mr;var wh=tt(),{re:ki,t:Vi}=Se(),pr=or(),dr=et(),Ki=re(),Xi=ue()});var at=A((fp,Qi)=>{var xh=ue(),yh=(t,e,r)=>{try{e=new xh(e,r)}catch{return!1}return e.test(t)};Qi.exports=yh});var Ji=A((pp,Zi)=>{var Th=ue(),bh=(t,e)=>new Th(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Zi.exports=bh});var tn=A((dp,en)=>{var Ch=re(),Sh=ue(),$h=(t,e,r)=>{let s=null,i=null,n=null;try{n=new Sh(e,r)}catch{return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===-1)&&(s=o,i=new Ch(s,r))}),s};en.exports=$h});var sn=A((mp,rn)=>{var Oh=re(),vh=ue(),Ih=(t,e,r)=>{let s=null,i=null,n=null;try{n=new vh(e,r)}catch{return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===1)&&(s=o,i=new Oh(s,r))}),s};rn.exports=Ih});var an=A((gp,on)=>{var gr=re(),Nh=ue(),nn=rt(),Lh=(t,e)=>{t=new Nh(t,e);let r=new gr("0.0.0");if(t.test(r)||(r=new gr("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let i=t.set[s],n=null;i.forEach(o=>{let a=new gr(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!n||nn(a,n))&&(n=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),n&&(!r||nn(r,n))&&(r=n)}return r&&t.test(r)?r:null};on.exports=Lh});var hn=A((Ep,ln)=>{var Hh=ue(),Dh=(t,e)=>{try{return new Hh(t,e).range||"*"}catch{return null}};ln.exports=Dh});var $t=A((Rp,pn)=>{var Ph=re(),fn=nt(),{ANY:Uh}=fn,Fh=ue(),Mh=at(),un=rt(),cn=xt(),Bh=Tt(),qh=yt(),Gh=(t,e,r,s)=>{t=new Ph(t,s),e=new Fh(e,s);let i,n,o,a,l;switch(r){case">":i=un,n=Bh,o=cn,a=">",l=">=";break;case"<":i=cn,n=qh,o=un,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Mh(t,e,s))return!1;for(let h=0;h<e.set.length;++h){let d=e.set[h],u=null,c=null;if(d.forEach(p=>{p.semver===Uh&&(p=new fn(">=0.0.0")),u=u||p,c=c||p,i(p.semver,u.semver,s)?u=p:o(p.semver,c.semver,s)&&(c=p)}),u.operator===a||u.operator===l||(!c.operator||c.operator===a)&&n(t,c.semver))return!1;if(c.operator===l&&o(t,c.semver))return!1}return!0};pn.exports=Gh});var mn=A((Ap,dn)=>{var jh=$t(),Wh=(t,e,r)=>jh(t,e,">",r);dn.exports=Wh});var En=A((_p,gn)=>{var zh=$t(),kh=(t,e,r)=>zh(t,e,"<",r);gn.exports=kh});var _n=A((wp,An)=>{var Rn=ue(),Vh=(t,e,r)=>(t=new Rn(t,r),e=new Rn(e,r),t.intersects(e));An.exports=Vh});var xn=A((xp,wn)=>{var Kh=at(),Xh=he();wn.exports=(t,e,r)=>{let s=[],i=null,n=null,o=t.sort((d,u)=>Xh(d,u,r));for(let d of o)Kh(d,e,r)?(n=d,i||(i=d)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let a=[];for(let[d,u]of s)d===u?a.push(d):!u&&d===o[0]?a.push("*"):u?d===o[0]?a.push(`<=${u}`):a.push(`${d} - ${u}`):a.push(`>=${d}`);let l=a.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return l.length<h.length?l:e}});var Sn=A((yp,Cn)=>{var yn=ue(),Ot=nt(),{ANY:Er}=Ot,lt=at(),Rr=he(),Yh=(t,e,r={})=>{if(t===e)return!0;t=new yn(t,r),e=new yn(e,r);let s=!1;e:for(let i of t.set){for(let n of e.set){let o=Qh(i,n,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},Qh=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Er){if(e.length===1&&e[0].semver===Er)return!0;r.includePrerelease?t=[new Ot(">=0.0.0-0")]:t=[new Ot(">=0.0.0")]}if(e.length===1&&e[0].semver===Er){if(r.includePrerelease)return!0;e=[new Ot(">=0.0.0")]}let s=new Set,i,n;for(let p of t)p.operator===">"||p.operator===">="?i=Tn(i,p,r):p.operator==="<"||p.operator==="<="?n=bn(n,p,r):s.add(p.semver);if(s.size>1)return null;let o;if(i&&n){if(o=Rr(i.semver,n.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let p of s){if(i&&!lt(p,String(i),r)||n&&!lt(p,String(n),r))return null;for(let _ of e)if(!lt(p,String(_),r))return!1;return!0}let a,l,h,d,u=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,c=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;u&&u.prerelease.length===1&&n.operator==="<"&&u.prerelease[0]===0&&(u=!1);for(let p of e){if(d=d||p.operator===">"||p.operator===">=",h=h||p.operator==="<"||p.operator==="<=",i){if(c&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===c.major&&p.semver.minor===c.minor&&p.semver.patch===c.patch&&(c=!1),p.operator===">"||p.operator===">="){if(a=Tn(i,p,r),a===p&&a!==i)return!1}else if(i.operator===">="&&!lt(i.semver,String(p),r))return!1}if(n){if(u&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===u.major&&p.semver.minor===u.minor&&p.semver.patch===u.patch&&(u=!1),p.operator==="<"||p.operator==="<="){if(l=bn(n,p,r),l===p&&l!==n)return!1}else if(n.operator==="<="&&!lt(n.semver,String(p),r))return!1}if(!p.operator&&(n||i)&&o!==0)return!1}return!(i&&h&&!n&&o!==0||n&&d&&!i&&o!==0||c||u)},Tn=(t,e,r)=>{if(!t)return e;let s=Rr(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},bn=(t,e,r)=>{if(!t)return e;let s=Rr(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Cn.exports=Yh});var vn=A((Tp,On)=>{var Ar=Se(),Zh=Je(),Jh=re(),$n=sr(),eu=$e(),tu=Xs(),ru=Qs(),su=ei(),iu=oi(),nu=li(),ou=ui(),au=fi(),lu=di(),hu=he(),uu=gi(),cu=Ri(),fu=wt(),pu=xi(),du=Ti(),mu=rt(),gu=xt(),Eu=_t(),Ru=nr(),Au=yt(),_u=Tt(),wu=or(),xu=Ni(),yu=nt(),Tu=ue(),bu=at(),Cu=Ji(),Su=tn(),$u=sn(),Ou=an(),vu=hn(),Iu=$t(),Nu=mn(),Lu=En(),Hu=_n(),Du=xn(),Pu=Sn();On.exports={parse:eu,valid:tu,clean:ru,inc:su,diff:iu,major:nu,minor:ou,patch:au,prerelease:lu,compare:hu,rcompare:uu,compareLoose:cu,compareBuild:fu,sort:pu,rsort:du,gt:mu,lt:gu,eq:Eu,neq:Ru,gte:Au,lte:_u,cmp:wu,coerce:xu,Comparator:yu,Range:Tu,satisfies:bu,toComparators:Cu,maxSatisfying:Su,minSatisfying:$u,minVersion:Ou,validRange:vu,outside:Iu,gtr:Nu,ltr:Lu,intersects:Hu,simplifyRange:Du,subset:Pu,SemVer:Jh,re:Ar.re,src:Ar.src,tokens:Ar.t,SEMVER_SPEC_VERSION:Zh.SEMVER_SPEC_VERSION,compareIdentifiers:$n.compareIdentifiers,rcompareIdentifiers:$n.rcompareIdentifiers}});var Dn=A((bp,Hn)=>{Hn.exports=function(t,e){e||(e={});var r=e.hsep===void 0?" ":e.hsep,s=e.align||[],i=e.stringLength||function(l){return String(l).length},n=Nn(t,function(l,h){return Ln(h,function(d,u){var c=In(d);(!l[u]||c>l[u])&&(l[u]=c)}),l},[]),o=vt(t,function(l){return vt(l,function(h,d){var u=String(h);if(s[d]==="."){var c=In(u),p=n[d]+(/\./.test(u)?1:2)-(i(u)-c);return u+Array(p).join(" ")}else return u})}),a=Nn(o,function(l,h){return Ln(h,function(d,u){var c=i(d);(!l[u]||c>l[u])&&(l[u]=c)}),l},[]);return vt(o,function(l){return vt(l,function(h,d){var u=a[d]-i(h)||0,c=Array(Math.max(u+1,1)).join(" ");return s[d]==="r"||s[d]==="."?c+h:s[d]==="c"?Array(Math.ceil(u/2+1)).join(" ")+h+Array(Math.floor(u/2+1)).join(" "):h+c}).join(r).replace(/\s+$/,"")}).join(`
|
|
9
|
+
`)};function In(t){var e=/\.[^.]*$/.exec(t);return e?e.index+1:t.length}function Nn(t,e,r){if(t.reduce)return t.reduce(e,r);for(var s=0,i=arguments.length>=3?r:t[s++];s<t.length;s++)e(i,t[s],s);return i}function Ln(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e.call(t,t[r],r)}function vt(t,e){if(t.map)return t.map(e);for(var r=[],s=0;s<t.length;s++)r.push(e.call(t,t[s],s));return r}});var Bn=A(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.LRUCache=void 0;var qe=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Un=new Set,_r=typeof process=="object"&&process?process:{},Fn=(t,e,r,s)=>{typeof _r.emitWarning=="function"?_r.emitWarning(t,e,r,s):console.error(`[${r}] ${e}: ${t}`)},It=globalThis.AbortController,Pn=globalThis.AbortSignal;if(typeof It>"u"){Pn=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,i){this._onabort.push(i)}},It=class{constructor(){e()}signal=new Pn;abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let i of this.signal._onabort)i(s);this.signal.onabort?.(s)}}};let t=_r.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,Fn("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))}}var Uu=t=>!Un.has(t),$p=Symbol("type"),ye=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Mn=t=>ye(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Ge:null:null,Ge=class extends Array{constructor(e){super(e),this.fill(0)}},wr=class t{heap;length;static#i=!1;static create(e){let r=Mn(e);if(!r)return[];t.#i=!0;let s=new t(e,r);return t.#i=!1,s}constructor(e,r){if(!t.#i)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},xr=class t{#i;#h;#t;#g;#O;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#E;#n;#s;#e;#c;#p;#u;#a;#R;#l;#A;#_;#d;#w;#b;#f;static unsafeExposeInternals(e){return{starts:e.#_,ttls:e.#d,sizes:e.#A,keyMap:e.#n,keyList:e.#s,valList:e.#e,next:e.#c,prev:e.#p,get head(){return e.#u},get tail(){return e.#a},free:e.#R,isBackgroundFetch:r=>e.#r(r),backgroundFetch:(r,s,i,n)=>e.#N(r,s,i,n),moveToTail:r=>e.#$(r),indexes:r=>e.#x(r),rindexes:r=>e.#y(r),isStale:r=>e.#m(r)}}get max(){return this.#i}get maxSize(){return this.#h}get calculatedSize(){return this.#E}get size(){return this.#o}get fetchMethod(){return this.#O}get dispose(){return this.#t}get disposeAfter(){return this.#g}constructor(e){let{max:r=0,ttl:s,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:h,disposeAfter:d,noDisposeOnSet:u,noUpdateTTL:c,maxSize:p=0,maxEntrySize:_=0,sizeCalculation:E,fetchMethod:O,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:N,allowStaleOnFetchAbort:w,ignoreFetchAbort:C}=e;if(r!==0&&!ye(r))throw new TypeError("max option must be a nonnegative integer");let L=r?Mn(r):Array;if(!L)throw new Error("invalid max value: "+r);if(this.#i=r,this.#h=p,this.maxEntrySize=_||this.#h,this.sizeCalculation=E,this.sizeCalculation){if(!this.#h&&!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(O!==void 0&&typeof O!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#O=O,this.#b=!!O,this.#n=new Map,this.#s=new Array(r).fill(void 0),this.#e=new Array(r).fill(void 0),this.#c=new L(r),this.#p=new L(r),this.#u=0,this.#a=0,this.#R=wr.create(r),this.#o=0,this.#E=0,typeof h=="function"&&(this.#t=h),typeof d=="function"?(this.#g=d,this.#l=[]):(this.#g=void 0,this.#l=void 0),this.#w=!!this.#t,this.#f=!!this.#g,this.noDisposeOnSet=!!u,this.noUpdateTTL=!!c,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!N,this.allowStaleOnFetchAbort=!!w,this.ignoreFetchAbort=!!C,this.maxEntrySize!==0){if(this.#h!==0&&!ye(this.#h))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.#F()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=ye(i)||i===0?i:1,this.ttlAutopurge=!!n,this.ttl=s||0,this.ttl){if(!ye(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#i===0&&this.ttl===0&&this.#h===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#i&&!this.#h){let $="LRU_CACHE_UNBOUNDED";Uu($)&&(Un.add($),Fn("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",$,t))}}getRemainingTTL(e){return this.#n.has(e)?1/0:0}#L(){let e=new Ge(this.#i),r=new Ge(this.#i);this.#d=e,this.#_=r,this.#H=(n,o,a=qe.now())=>{if(r[n]=o!==0?a:0,e[n]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#m(n)&&this.delete(this.#s[n])},o+1);l.unref&&l.unref()}},this.#C=n=>{r[n]=e[n]!==0?qe.now():0},this.#T=(n,o)=>{if(e[o]){let a=e[o],l=r[o];if(!a||!l)return;n.ttl=a,n.start=l,n.now=s||i();let h=n.now-l;n.remainingTTL=a-h}};let s=0,i=()=>{let n=qe.now();if(this.ttlResolution>0){s=n;let o=setTimeout(()=>s=0,this.ttlResolution);o.unref&&o.unref()}return n};this.getRemainingTTL=n=>{let o=this.#n.get(n);if(o===void 0)return 0;let a=e[o],l=r[o];if(!a||!l)return 1/0;let h=(s||i())-l;return a-h},this.#m=n=>{let o=r[n],a=e[n];return!!a&&!!o&&(s||i())-o>a}}#C=()=>{};#T=()=>{};#H=()=>{};#m=()=>!1;#F(){let e=new Ge(this.#i);this.#E=0,this.#A=e,this.#S=r=>{this.#E-=e[r],e[r]=0},this.#D=(r,s,i,n)=>{if(this.#r(s))return 0;if(!ye(i))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(i=n(s,r),!ye(i))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 i},this.#v=(r,s,i)=>{if(e[r]=s,this.#h){let n=this.#h-e[r];for(;this.#E>n;)this.#I(!0)}this.#E+=e[r],i&&(i.entrySize=s,i.totalCalculatedSize=this.#E)}}#S=e=>{};#v=(e,r,s)=>{};#D=(e,r,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#x({allowStale:e=this.allowStale}={}){if(this.#o)for(let r=this.#a;!(!this.#P(r)||((e||!this.#m(r))&&(yield r),r===this.#u));)r=this.#p[r]}*#y({allowStale:e=this.allowStale}={}){if(this.#o)for(let r=this.#u;!(!this.#P(r)||((e||!this.#m(r))&&(yield r),r===this.#a));)r=this.#c[r]}#P(e){return e!==void 0&&this.#n.get(this.#s[e])===e}*entries(){for(let e of this.#x())this.#e[e]!==void 0&&this.#s[e]!==void 0&&!this.#r(this.#e[e])&&(yield[this.#s[e],this.#e[e]])}*rentries(){for(let e of this.#y())this.#e[e]!==void 0&&this.#s[e]!==void 0&&!this.#r(this.#e[e])&&(yield[this.#s[e],this.#e[e]])}*keys(){for(let e of this.#x()){let r=this.#s[e];r!==void 0&&!this.#r(this.#e[e])&&(yield r)}}*rkeys(){for(let e of this.#y()){let r=this.#s[e];r!==void 0&&!this.#r(this.#e[e])&&(yield r)}}*values(){for(let e of this.#x())this.#e[e]!==void 0&&!this.#r(this.#e[e])&&(yield this.#e[e])}*rvalues(){for(let e of this.#y())this.#e[e]!==void 0&&!this.#r(this.#e[e])&&(yield this.#e[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let s of this.#x()){let i=this.#e[s],n=this.#r(i)?i.__staleWhileFetching:i;if(n!==void 0&&e(n,this.#s[s],this))return this.get(this.#s[s],r)}}forEach(e,r=this){for(let s of this.#x()){let i=this.#e[s],n=this.#r(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,this.#s[s],this)}}rforEach(e,r=this){for(let s of this.#y()){let i=this.#e[s],n=this.#r(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,this.#s[s],this)}}purgeStale(){let e=!1;for(let r of this.#y({allowStale:!0}))this.#m(r)&&(this.delete(this.#s[r]),e=!0);return e}info(e){let r=this.#n.get(e);if(r===void 0)return;let s=this.#e[r],i=this.#r(s)?s.__staleWhileFetching:s;if(i===void 0)return;let n={value:i};if(this.#d&&this.#_){let o=this.#d[r],a=this.#_[r];if(o&&a){let l=o-(qe.now()-a);n.ttl=l,n.start=Date.now()}}return this.#A&&(n.size=this.#A[r]),n}dump(){let e=[];for(let r of this.#x({allowStale:!0})){let s=this.#s[r],i=this.#e[r],n=this.#r(i)?i.__staleWhileFetching:i;if(n===void 0||s===void 0)continue;let o={value:n};if(this.#d&&this.#_){o.ttl=this.#d[r];let a=qe.now()-this.#_[r];o.start=Math.floor(Date.now()-a)}this.#A&&(o.size=this.#A[r]),e.unshift([s,o])}return e}load(e){this.clear();for(let[r,s]of e){if(s.start){let i=Date.now()-s.start;s.start=qe.now()-i}this.set(r,s.value,s)}}set(e,r,s={}){if(r===void 0)return this.delete(e),this;let{ttl:i=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=s,{noUpdateTTL:h=this.noUpdateTTL}=s,d=this.#D(e,r,s.size||0,a);if(this.maxEntrySize&&d>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let u=this.#o===0?void 0:this.#n.get(e);if(u===void 0)u=this.#o===0?this.#a:this.#R.length!==0?this.#R.pop():this.#o===this.#i?this.#I(!1):this.#o,this.#s[u]=e,this.#e[u]=r,this.#n.set(e,u),this.#c[this.#a]=u,this.#p[u]=this.#a,this.#a=u,this.#o++,this.#v(u,d,l),l&&(l.set="add"),h=!1;else{this.#$(u);let c=this.#e[u];if(r!==c){if(this.#b&&this.#r(c)){c.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=c;p!==void 0&&!o&&(this.#w&&this.#t?.(p,e,"set"),this.#f&&this.#l?.push([p,e,"set"]))}else o||(this.#w&&this.#t?.(c,e,"set"),this.#f&&this.#l?.push([c,e,"set"]));if(this.#S(u),this.#v(u,d,l),this.#e[u]=r,l){l.set="replace";let p=c&&this.#r(c)?c.__staleWhileFetching:c;p!==void 0&&(l.oldValue=p)}}else l&&(l.set="update")}if(i!==0&&!this.#d&&this.#L(),this.#d&&(h||this.#H(u,i,n),l&&this.#T(l,u)),!o&&this.#f&&this.#l){let c=this.#l,p;for(;p=c?.shift();)this.#g?.(...p)}return this}pop(){try{for(;this.#o;){let e=this.#e[this.#u];if(this.#I(!0),this.#r(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#f&&this.#l){let e=this.#l,r;for(;r=e?.shift();)this.#g?.(...r)}}}#I(e){let r=this.#u,s=this.#s[r],i=this.#e[r];return this.#b&&this.#r(i)?i.__abortController.abort(new Error("evicted")):(this.#w||this.#f)&&(this.#w&&this.#t?.(i,s,"evict"),this.#f&&this.#l?.push([i,s,"evict"])),this.#S(r),e&&(this.#s[r]=void 0,this.#e[r]=void 0,this.#R.push(r)),this.#o===1?(this.#u=this.#a=0,this.#R.length=0):this.#u=this.#c[r],this.#n.delete(s),this.#o--,r}has(e,r={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=r,n=this.#n.get(e);if(n!==void 0){let o=this.#e[n];if(this.#r(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#m(n))i&&(i.has="stale",this.#T(i,n));else return s&&this.#C(n),i&&(i.has="hit",this.#T(i,n)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){let{allowStale:s=this.allowStale}=r,i=this.#n.get(e);if(i===void 0||!s&&this.#m(i))return;let n=this.#e[i];return this.#r(n)?n.__staleWhileFetching:n}#N(e,r,s,i){let n=r===void 0?void 0:this.#e[r];if(this.#r(n))return n;let o=new It,{signal:a}=s;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:s,context:i},h=(E,O=!1)=>{let{aborted:b}=o.signal,S=s.ignoreFetchAbort&&E!==void 0;if(s.status&&(b&&!O?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,S&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),b&&!S&&!O)return u(o.signal.reason);let N=p;return this.#e[r]===p&&(E===void 0?N.__staleWhileFetching?this.#e[r]=N.__staleWhileFetching:this.delete(e):(s.status&&(s.status.fetchUpdated=!0),this.set(e,E,l.options))),E},d=E=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=E),u(E)),u=E=>{let{aborted:O}=o.signal,b=O&&s.allowStaleOnFetchAbort,S=b||s.allowStaleOnFetchRejection,N=S||s.noDeleteOnFetchRejection,w=p;if(this.#e[r]===p&&(!N||w.__staleWhileFetching===void 0?this.delete(e):b||(this.#e[r]=w.__staleWhileFetching)),S)return s.status&&w.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),w.__staleWhileFetching;if(w.__returned===w)throw E},c=(E,O)=>{let b=this.#O?.(e,n,l);b&&b instanceof Promise&&b.then(S=>E(S===void 0?void 0:S),O),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(E(void 0),s.allowStaleOnFetchAbort&&(E=S=>h(S,!0)))})};s.status&&(s.status.fetchDispatched=!0);let p=new Promise(c).then(h,d),_=Object.assign(p,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return r===void 0?(this.set(e,_,{...l.options,status:void 0}),r=this.#n.get(e)):this.#e[r]=_,_}#r(e){if(!this.#b)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof It}async fetch(e,r={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:E,forceRefresh:O=!1,status:b,signal:S}=r;if(!this.#b)return b&&(b.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:b});let N={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:h,noUpdateTTL:d,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:_,ignoreFetchAbort:p,status:b,signal:S},w=this.#n.get(e);if(w===void 0){b&&(b.fetch="miss");let C=this.#N(e,w,N,E);return C.__returned=C}else{let C=this.#e[w];if(this.#r(C)){let f=s&&C.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",f&&(b.returnedStale=!0)),f?C.__staleWhileFetching:C.__returned=C}let L=this.#m(w);if(!O&&!L)return b&&(b.fetch="hit"),this.#$(w),i&&this.#C(w),b&&this.#T(b,w),C;let $=this.#N(e,w,N,E),v=$.__staleWhileFetching!==void 0&&s;return b&&(b.fetch=L?"stale":"refresh",v&&L&&(b.returnedStale=!0)),v?$.__staleWhileFetching:$.__returned=$}}get(e,r={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=r,a=this.#n.get(e);if(a!==void 0){let l=this.#e[a],h=this.#r(l);return o&&this.#T(o,a),this.#m(a)?(o&&(o.get="stale"),h?(o&&s&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?l.__staleWhileFetching:void 0):(n||this.delete(e),o&&s&&(o.returnedStale=!0),s?l:void 0)):(o&&(o.get="hit"),h?l.__staleWhileFetching:(this.#$(a),i&&this.#C(a),l))}else o&&(o.get="miss")}#U(e,r){this.#p[r]=e,this.#c[e]=r}#$(e){e!==this.#a&&(e===this.#u?this.#u=this.#c[e]:this.#U(this.#p[e],this.#c[e]),this.#U(this.#a,e),this.#a=e)}delete(e){let r=!1;if(this.#o!==0){let s=this.#n.get(e);if(s!==void 0)if(r=!0,this.#o===1)this.clear();else{this.#S(s);let i=this.#e[s];if(this.#r(i)?i.__abortController.abort(new Error("deleted")):(this.#w||this.#f)&&(this.#w&&this.#t?.(i,e,"delete"),this.#f&&this.#l?.push([i,e,"delete"])),this.#n.delete(e),this.#s[s]=void 0,this.#e[s]=void 0,s===this.#a)this.#a=this.#p[s];else if(s===this.#u)this.#u=this.#c[s];else{let n=this.#p[s];this.#c[n]=this.#c[s];let o=this.#c[s];this.#p[o]=this.#p[s]}this.#o--,this.#R.push(s)}}if(this.#f&&this.#l?.length){let s=this.#l,i;for(;i=s?.shift();)this.#g?.(...i)}return r}clear(){for(let e of this.#y({allowStale:!0})){let r=this.#e[e];if(this.#r(r))r.__abortController.abort(new Error("deleted"));else{let s=this.#s[e];this.#w&&this.#t?.(r,s,"delete"),this.#f&&this.#l?.push([r,s,"delete"])}}if(this.#n.clear(),this.#e.fill(void 0),this.#s.fill(void 0),this.#d&&this.#_&&(this.#d.fill(0),this.#_.fill(0)),this.#A&&this.#A.fill(0),this.#u=0,this.#a=0,this.#R.length=0,this.#E=0,this.#o=0,this.#f&&this.#l){let e=this.#l,r;for(;r=e?.shift();)this.#g?.(...r)}}};Nt.LRUCache=xr});var jn=A((vp,Gn)=>{"use strict";var j=(...t)=>t.every(e=>e)?t.join(""):"",Z=t=>t?encodeURIComponent(t):"",qn=t=>t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),Fu={sshtemplate:({domain:t,user:e,project:r,committish:s})=>`git@${t}:${e}/${r}.git${j("#",s)}`,sshurltemplate:({domain:t,user:e,project:r,committish:s})=>`git+ssh://git@${t}/${e}/${r}.git${j("#",s)}`,edittemplate:({domain:t,user:e,project:r,committish:s,editpath:i,path:n})=>`https://${t}/${e}/${r}${j("/",i,"/",Z(s||"HEAD"),"/",n)}`,browsetemplate:({domain:t,user:e,project:r,committish:s,treepath:i})=>`https://${t}/${e}/${r}${j("/",i,"/",Z(s))}`,browsetreetemplate:({domain:t,user:e,project:r,committish:s,treepath:i,path:n,fragment:o,hashformat:a})=>`https://${t}/${e}/${r}/${i}/${Z(s||"HEAD")}/${n}${j("#",a(o||""))}`,browseblobtemplate:({domain:t,user:e,project:r,committish:s,blobpath:i,path:n,fragment:o,hashformat:a})=>`https://${t}/${e}/${r}/${i}/${Z(s||"HEAD")}/${n}${j("#",a(o||""))}`,docstemplate:({domain:t,user:e,project:r,treepath:s,committish:i})=>`https://${t}/${e}/${r}${j("/",s,"/",Z(i))}#readme`,httpstemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git+https://${j(t,"@")}${e}/${r}/${s}.git${j("#",i)}`,filetemplate:({domain:t,user:e,project:r,committish:s,path:i})=>`https://${t}/${e}/${r}/raw/${Z(s||"HEAD")}/${i}`,shortcuttemplate:({type:t,user:e,project:r,committish:s})=>`${t}:${e}/${r}${j("#",s)}`,pathtemplate:({user:t,project:e,committish:r})=>`${t}/${e}${j("#",r)}`,bugstemplate:({domain:t,user:e,project:r})=>`https://${t}/${e}/${r}/issues`,hashformat:qn},Te={};Te.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:t,user:e,project:r,committish:s,path:i})=>`https://${j(t,"@")}raw.githubusercontent.com/${e}/${r}/${Z(s||"HEAD")}/${i}`,gittemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git://${j(t,"@")}${e}/${r}/${s}.git${j("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://codeload.${t}/${e}/${r}/tar.gz/${Z(s||"HEAD")}`,extract:t=>{let[,e,r,s,i]=t.pathname.split("/",5);if(!(s&&s!=="tree")&&(s||(i=t.hash.slice(1)),r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:i}}};Te.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:t,user:e,project:r,committish:s,treepath:i,path:n,editpath:o})=>`https://${t}/${e}/${r}${j("/",i,"/",Z(s||"HEAD"),"/",n,o)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/get/${Z(s||"HEAD")}.tar.gz`,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(!["get"].includes(s)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};Te.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git+https://${j(t,"@")}${e}/${r}/${s}.git${j("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/repository/archive.tar.gz?ref=${Z(s||"HEAD")}`,extract:t=>{let e=t.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let r=e.split("/"),s=r.pop();s.endsWith(".git")&&(s=s.slice(0,-4));let i=r.join("/");if(!(!i||!s))return{user:i,project:s,committish:t.hash.slice(1)}}};Te.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:t,project:e,committish:r})=>`git@${t}:${e}.git${j("#",r)}`,sshurltemplate:({domain:t,project:e,committish:r})=>`git+ssh://git@${t}/${e}.git${j("#",r)}`,edittemplate:({domain:t,user:e,project:r,committish:s,editpath:i})=>`https://${t}/${e}/${r}${j("/",Z(s))}/${i}`,browsetemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${j("/",Z(r))}`,browsetreetemplate:({domain:t,project:e,committish:r,path:s,hashformat:i})=>`https://${t}/${e}${j("/",Z(r))}${j("#",i(s))}`,browseblobtemplate:({domain:t,project:e,committish:r,path:s,hashformat:i})=>`https://${t}/${e}${j("/",Z(r))}${j("#",i(s))}`,docstemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${j("/",Z(r))}`,httpstemplate:({domain:t,project:e,committish:r})=>`git+https://${t}/${e}.git${j("#",r)}`,filetemplate:({user:t,project:e,committish:r,path:s})=>`https://gist.githubusercontent.com/${t}/${e}/raw${j("/",Z(r))}/${s}`,shortcuttemplate:({type:t,project:e,committish:r})=>`${t}:${e}${j("#",r)}`,pathtemplate:({project:t,committish:e})=>`${t}${j("#",e)}`,bugstemplate:({domain:t,project:e})=>`https://${t}/${e}`,gittemplate:({domain:t,project:e,committish:r})=>`git://${t}/${e}.git${j("#",r)}`,tarballtemplate:({project:t,committish:e})=>`https://codeload.github.com/gist/${t}/tar.gz/${Z(e||"HEAD")}`,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(s!=="raw"){if(!r){if(!e)return;r=e,e=null}return r.endsWith(".git")&&(r=r.slice(0,-4)),{user:e,project:r,committish:t.hash.slice(1)}}},hashformat:function(t){return t&&"file-"+qn(t)}};Te.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:t,user:e,project:r,committish:s,path:i})=>`https://${t}/${e}/${r}/blob/${Z(s)||"HEAD"}/${i}`,httpstemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}.git${j("#",s)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/archive/${Z(s)||"HEAD"}.tar.gz`,bugstemplate:({user:t,project:e})=>null,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(!["archive"].includes(s)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};for(let[t,e]of Object.entries(Te))Te[t]=Object.assign({},Fu,e);Gn.exports=Te});var Tr=A((Ip,zn)=>{var Mu=Xe("url"),yr=(t,e,r)=>{let s=t.indexOf(r);return t.lastIndexOf(e,s>-1?s:1/0)},Wn=t=>{try{return new Mu.URL(t)}catch{}},Bu=(t,e)=>{let r=t.indexOf(":"),s=t.slice(0,r+1);if(Object.prototype.hasOwnProperty.call(e,s))return t;let i=t.indexOf("@");return i>-1?i>r?`git+ssh://${t}`:t:t.indexOf("//")===r+1?t:`${t.slice(0,r+1)}//${t.slice(r+1)}`},qu=t=>{let e=yr(t,"@","#"),r=yr(t,":","#");return r>e&&(t=t.slice(0,r)+"/"+t.slice(r+1)),yr(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`git+ssh://${t}`),t};zn.exports=(t,e)=>{let r=e?Bu(t,e):t;return Wn(r)||Wn(qu(r))}});var Vn=A((Np,kn)=>{"use strict";var Gu=Tr(),ju=t=>{let e=t.indexOf("#"),r=t.indexOf("/"),s=t.indexOf("/",r+1),i=t.indexOf(":"),n=/\s/.exec(t),o=t.indexOf("@"),a=!n||e>-1&&n.index>e,l=o===-1||e>-1&&o>e,h=i===-1||e>-1&&i>e,d=s===-1||e>-1&&s>e,u=r>0,c=e>-1?t[e-1]!=="/":!t.endsWith("/"),p=!t.startsWith(".");return a&&u&&c&&p&&l&&h&&d};kn.exports=(t,e,{gitHosts:r,protocols:s})=>{if(!t)return;let i=ju(t)?`github:${t}`:t,n=Gu(i,s);if(!n)return;let o=r.byShortcut[n.protocol],a=r.byDomain[n.hostname.startsWith("www.")?n.hostname.slice(4):n.hostname],l=o||a;if(!l)return;let h=r[o||a],d=null;s[n.protocol]?.auth&&(n.username||n.password)&&(d=`${n.username}${n.password?":"+n.password:""}`);let u=null,c=null,p=null,_=null;try{if(o){let E=n.pathname.startsWith("/")?n.pathname.slice(1):n.pathname,O=E.indexOf("@");O>-1&&(E=E.slice(O+1));let b=E.lastIndexOf("/");b>-1?(c=decodeURIComponent(E.slice(0,b)),c||(c=null),p=decodeURIComponent(E.slice(b+1))):p=decodeURIComponent(E),p.endsWith(".git")&&(p=p.slice(0,-4)),n.hash&&(u=decodeURIComponent(n.hash.slice(1))),_="shortcut"}else{if(!h.protocols.includes(n.protocol))return;let E=h.extract(n);if(!E)return;c=E.user&&decodeURIComponent(E.user),p=decodeURIComponent(E.project),u=decodeURIComponent(E.committish),_=s[n.protocol]?.name||n.protocol.slice(0,-1)}}catch(E){if(E instanceof URIError)return;throw E}return[l,c,d,p,u,_,e]}});var Xn=A((Lp,Kn)=>{"use strict";var{LRUCache:Wu}=Bn(),zu=jn(),ku=Vn(),Vu=Tr(),br=new Wu({max:1e3}),Lt=class t{constructor(e,r,s,i,n,o,a={}){Object.assign(this,t.#i[e],{type:e,user:r,auth:s,project:i,committish:n,default:o,opts:a})}static#i={byShortcut:{},byDomain:{}};static#h={"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,r){t.#i[e]=r,t.#i.byDomain[r.domain]=e,t.#i.byShortcut[`${e}:`]=e,t.#h[`${e}:`]={name:e}}static fromUrl(e,r){if(typeof e!="string")return;let s=e+JSON.stringify(r||{});if(!br.has(s)){let i=ku(e,r,{gitHosts:t.#i,protocols:t.#h});br.set(s,i?new t(...i):void 0)}return br.get(s)}static parseUrl(e){return Vu(e)}#t(e,r){if(typeof e!="function")return null;let s={...this,...this.opts,...r};s.path||(s.path=""),s.path.startsWith("/")&&(s.path=s.path.slice(1)),s.noCommittish&&(s.committish=null);let i=e(s);return s.noGitPlus&&i.startsWith("git+")?i.slice(4):i}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#t(this.sshtemplate,e)}sshurl(e){return this.#t(this.sshurltemplate,e)}browse(e,...r){return typeof e!="string"?this.#t(this.browsetemplate,e):typeof r[0]!="string"?this.#t(this.browsetreetemplate,{...r[0],path:e}):this.#t(this.browsetreetemplate,{...r[1],fragment:r[0],path:e})}browseFile(e,...r){return typeof r[0]!="string"?this.#t(this.browseblobtemplate,{...r[0],path:e}):this.#t(this.browseblobtemplate,{...r[1],fragment:r[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,r){return this.#t(this.filetemplate,{...r,path:e})}edit(e,r){return this.#t(this.edittemplate,{...r,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[t,e]of Object.entries(zu))Lt.addHost(t,e);Kn.exports=Lt});var ht=A((zp,ho)=>{"use strict";var de="\\\\/",no=`[^${de}]`,Ae="\\.",oc="\\+",ac="\\?",Ut="\\/",lc="(?=.)",oo="[^/]",Lr=`(?:${Ut}|$)`,ao=`(?:^|${Ut})`,Hr=`${Ae}{1,2}${Lr}`,hc=`(?!${Ae})`,uc=`(?!${ao}${Hr})`,cc=`(?!${Ae}{0,1}${Lr})`,fc=`(?!${Hr})`,pc=`[^.${Ut}]`,dc=`${oo}*?`,mc="/",lo={DOT_LITERAL:Ae,PLUS_LITERAL:oc,QMARK_LITERAL:ac,SLASH_LITERAL:Ut,ONE_CHAR:lc,QMARK:oo,END_ANCHOR:Lr,DOTS_SLASH:Hr,NO_DOT:hc,NO_DOTS:uc,NO_DOT_SLASH:cc,NO_DOTS_SLASH:fc,QMARK_NO_DOT:pc,STAR:dc,START_ANCHOR:ao,SEP:mc},gc={...lo,SLASH_LITERAL:`[${de}]`,QMARK:no,STAR:`${no}*?`,DOTS_SLASH:`${Ae}{1,2}(?:[${de}]|$)`,NO_DOT:`(?!${Ae})`,NO_DOTS:`(?!(?:^|[${de}])${Ae}{1,2}(?:[${de}]|$))`,NO_DOT_SLASH:`(?!${Ae}{0,1}(?:[${de}]|$))`,NO_DOTS_SLASH:`(?!${Ae}{1,2}(?:[${de}]|$))`,QMARK_NO_DOT:`[^.${de}]`,START_ANCHOR:`(?:^|[${de}])`,END_ANCHOR:`(?:[${de}]|$)`,SEP:"\\"},Ec={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};ho.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Ec,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?gc:lo}}});var Ft=A(le=>{"use strict";var{REGEX_BACKSLASH:Rc,REGEX_REMOVE_BACKSLASH:Ac,REGEX_SPECIAL_CHARS:_c,REGEX_SPECIAL_CHARS_GLOBAL:wc}=ht();le.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);le.hasRegexChars=t=>_c.test(t);le.isRegexChar=t=>t.length===1&&le.hasRegexChars(t);le.escapeRegex=t=>t.replace(wc,"\\$1");le.toPosixSlashes=t=>t.replace(Rc,"/");le.removeBackslashes=t=>t.replace(Ac,e=>e==="\\"?"":e);le.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]==="\\"?le.escapeLast(t,e,s-1):`${t.slice(0,s)}\\${t.slice(s)}`};le.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};le.wrapOutput=(t,e={},r={})=>{let s=r.contains?"":"^",i=r.contains?"":"$",n=`${s}(?:${t})${i}`;return e.negated===!0&&(n=`(?:^(?!${n}).*$)`),n};le.basename=(t,{windows:e}={})=>{let r=t.split(e?/[\\/]/:"/"),s=r[r.length-1];return s===""?r[r.length-2]:s}});var Ro=A((Vp,Eo)=>{"use strict";var uo=Ft(),{CHAR_ASTERISK:Dr,CHAR_AT:xc,CHAR_BACKWARD_SLASH:ut,CHAR_COMMA:yc,CHAR_DOT:Pr,CHAR_EXCLAMATION_MARK:Ur,CHAR_FORWARD_SLASH:go,CHAR_LEFT_CURLY_BRACE:Fr,CHAR_LEFT_PARENTHESES:Mr,CHAR_LEFT_SQUARE_BRACKET:Tc,CHAR_PLUS:bc,CHAR_QUESTION_MARK:co,CHAR_RIGHT_CURLY_BRACE:Cc,CHAR_RIGHT_PARENTHESES:fo,CHAR_RIGHT_SQUARE_BRACKET:Sc}=ht(),po=t=>t===go||t===ut,mo=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},$c=(t,e)=>{let r=e||{},s=t.length-1,i=r.parts===!0||r.scanToEnd===!0,n=[],o=[],a=[],l=t,h=-1,d=0,u=0,c=!1,p=!1,_=!1,E=!1,O=!1,b=!1,S=!1,N=!1,w=!1,C=!1,L=0,$,I,v={value:"",depth:0,isGlob:!1},f=()=>h>=s,W=()=>l.charCodeAt(h+1),U=()=>($=I,l.charCodeAt(++h));for(;h<s;){I=U();let D;if(I===ut){S=v.backslashes=!0,I=U(),I===Fr&&(b=!0);continue}if(b===!0||I===Fr){for(L++;f()!==!0&&(I=U());){if(I===ut){S=v.backslashes=!0,U();continue}if(I===Fr){L++;continue}if(b!==!0&&I===Pr&&(I=U())===Pr){if(c=v.isBrace=!0,_=v.isGlob=!0,C=!0,i===!0)continue;break}if(b!==!0&&I===yc){if(c=v.isBrace=!0,_=v.isGlob=!0,C=!0,i===!0)continue;break}if(I===Cc&&(L--,L===0)){b=!1,c=v.isBrace=!0,C=!0;break}}if(i===!0)continue;break}if(I===go){if(n.push(h),o.push(v),v={value:"",depth:0,isGlob:!1},C===!0)continue;if($===Pr&&h===d+1){d+=2;continue}u=h+1;continue}if(r.noext!==!0&&(I===bc||I===xc||I===Dr||I===co||I===Ur)===!0&&W()===Mr){if(_=v.isGlob=!0,E=v.isExtglob=!0,C=!0,I===Ur&&h===d&&(w=!0),i===!0){for(;f()!==!0&&(I=U());){if(I===ut){S=v.backslashes=!0,I=U();continue}if(I===fo){_=v.isGlob=!0,C=!0;break}}continue}break}if(I===Dr){if($===Dr&&(O=v.isGlobstar=!0),_=v.isGlob=!0,C=!0,i===!0)continue;break}if(I===co){if(_=v.isGlob=!0,C=!0,i===!0)continue;break}if(I===Tc){for(;f()!==!0&&(D=U());){if(D===ut){S=v.backslashes=!0,U();continue}if(D===Sc){p=v.isBracket=!0,_=v.isGlob=!0,C=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&I===Ur&&h===d){N=v.negated=!0,d++;continue}if(r.noparen!==!0&&I===Mr){if(_=v.isGlob=!0,i===!0){for(;f()!==!0&&(I=U());){if(I===Mr){S=v.backslashes=!0,I=U();continue}if(I===fo){C=!0;break}}continue}break}if(_===!0){if(C=!0,i===!0)continue;break}}r.noext===!0&&(E=!1,_=!1);let q=l,m="",g="";d>0&&(m=l.slice(0,d),l=l.slice(d),u-=d),q&&_===!0&&u>0?(q=l.slice(0,u),g=l.slice(u)):_===!0?(q="",g=l):q=l,q&&q!==""&&q!=="/"&&q!==l&&po(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),r.unescape===!0&&(g&&(g=uo.removeBackslashes(g)),q&&S===!0&&(q=uo.removeBackslashes(q)));let ee={prefix:m,input:t,start:d,base:q,glob:g,isBrace:c,isBracket:p,isGlob:_,isExtglob:E,isGlobstar:O,negated:N,negatedExtglob:w};if(r.tokens===!0&&(ee.maxDepth=0,po(I)||o.push(v),ee.tokens=o),r.parts===!0||r.tokens===!0){let D;for(let B=0;B<n.length;B++){let ae=D?D+1:d,Q=n[B],fe=t.slice(ae,Q);r.tokens&&(B===0&&d!==0?(o[B].isPrefix=!0,o[B].value=m):o[B].value=fe,mo(o[B]),ee.maxDepth+=o[B].depth),(B!==0||fe!=="")&&a.push(fe),D=Q}if(D&&D+1<t.length){let B=t.slice(D+1);a.push(B),r.tokens&&(o[o.length-1].value=B,mo(o[o.length-1]),ee.maxDepth+=o[o.length-1].depth)}ee.slashes=n,ee.parts=a}return ee};Eo.exports=$c});var wo=A((Kp,_o)=>{"use strict";var Mt=ht(),me=Ft(),{MAX_LENGTH:Bt,POSIX_REGEX_SOURCE:Oc,REGEX_NON_SPECIAL_CHARS:vc,REGEX_SPECIAL_CHARS_BACKREF:Ic,REPLACEMENTS:Ao}=Mt,Nc=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>me.escapeRegex(i)).join("..")}return r},ze=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Br=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=Ao[t]||t;let r={...e},s=typeof r.maxLength=="number"?Math.min(Bt,r.maxLength):Bt,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);let n={type:"bos",value:"",output:r.prepend||""},o=[n],a=r.capture?"":"?:",l=Mt.globChars(r.windows),h=Mt.extglobChars(l),{DOT_LITERAL:d,PLUS_LITERAL:u,SLASH_LITERAL:c,ONE_CHAR:p,DOTS_SLASH:_,NO_DOT:E,NO_DOT_SLASH:O,NO_DOTS_SLASH:b,QMARK:S,QMARK_NO_DOT:N,STAR:w,START_ANCHOR:C}=l,L=x=>`(${a}(?:(?!${C}${x.dot?_:d}).)*?)`,$=r.dot?"":E,I=r.dot?S:N,v=r.bash===!0?L(r):w;r.capture&&(v=`(${v})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let f={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=me.removePrefix(t,f),i=t.length;let W=[],U=[],q=[],m=n,g,ee=()=>f.index===i-1,D=f.peek=(x=1)=>t[f.index+x],B=f.advance=()=>t[++f.index]||"",ae=()=>t.slice(f.index+1),Q=(x="",k=0)=>{f.consumed+=x,f.index+=k},fe=x=>{f.output+=x.output!=null?x.output:x.value,Q(x.value)},Aa=()=>{let x=1;for(;D()==="!"&&(D(2)!=="("||D(3)==="?");)B(),f.start++,x++;return x%2===0?!1:(f.negated=!0,f.start++,!0)},pt=x=>{f[x]++,q.push(x)},be=x=>{f[x]--,q.pop()},F=x=>{if(m.type==="globstar"){let k=f.braces>0&&(x.type==="comma"||x.type==="brace"),R=x.extglob===!0||W.length&&(x.type==="pipe"||x.type==="paren");x.type!=="slash"&&x.type!=="paren"&&!k&&!R&&(f.output=f.output.slice(0,-m.output.length),m.type="star",m.value="*",m.output=v,f.output+=m.output)}if(W.length&&x.type!=="paren"&&(W[W.length-1].inner+=x.value),(x.value||x.output)&&fe(x),m&&m.type==="text"&&x.type==="text"){m.output=(m.output||m.value)+x.value,m.value+=x.value;return}x.prev=m,o.push(x),m=x},dt=(x,k)=>{let R={...h[k],conditions:1,inner:""};R.prev=m,R.parens=f.parens,R.output=f.output;let P=(r.capture?"(":"")+R.open;pt("parens"),F({type:x,value:k,output:f.output?"":p}),F({type:"paren",extglob:!0,value:B(),output:P}),W.push(R)},_a=x=>{let k=x.close+(r.capture?")":""),R;if(x.type==="negate"){let P=v;if(x.inner&&x.inner.length>1&&x.inner.includes("/")&&(P=L(r)),(P!==v||ee()||/^\)+$/.test(ae()))&&(k=x.close=`)$))${P}`),x.inner.includes("*")&&(R=ae())&&/^\.[^\\/.]+$/.test(R)){let V=Br(R,{...e,fastpaths:!1}).output;k=x.close=`)${V})${P})`}x.prev.type==="bos"&&(f.negatedExtglob=!0)}F({type:"paren",extglob:!0,value:g,output:k}),be("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let x=!1,k=t.replace(Ic,(R,P,V,se,J,Kt)=>se==="\\"?(x=!0,R):se==="?"?P?P+se+(J?S.repeat(J.length):""):Kt===0?I+(J?S.repeat(J.length):""):S.repeat(V.length):se==="."?d.repeat(V.length):se==="*"?P?P+se+(J?v:""):v:P?R:`\\${R}`);return x===!0&&(r.unescape===!0?k=k.replace(/\\/g,""):k=k.replace(/\\+/g,R=>R.length%2===0?"\\\\":R?"\\":"")),k===t&&r.contains===!0?(f.output=t,f):(f.output=me.wrapOutput(k,f,e),f)}for(;!ee();){if(g=B(),g==="\0")continue;if(g==="\\"){let R=D();if(R==="/"&&r.bash!==!0||R==="."||R===";")continue;if(!R){g+="\\",F({type:"text",value:g});continue}let P=/^\\+/.exec(ae()),V=0;if(P&&P[0].length>2&&(V=P[0].length,f.index+=V,V%2!==0&&(g+="\\")),r.unescape===!0?g=B():g+=B(),f.brackets===0){F({type:"text",value:g});continue}}if(f.brackets>0&&(g!=="]"||m.value==="["||m.value==="[^")){if(r.posix!==!1&&g===":"){let R=m.value.slice(1);if(R.includes("[")&&(m.posix=!0,R.includes(":"))){let P=m.value.lastIndexOf("["),V=m.value.slice(0,P),se=m.value.slice(P+2),J=Oc[se];if(J){m.value=V+J,f.backtrack=!0,B(),!n.output&&o.indexOf(m)===1&&(n.output=p);continue}}}(g==="["&&D()!==":"||g==="-"&&D()==="]")&&(g=`\\${g}`),g==="]"&&(m.value==="["||m.value==="[^")&&(g=`\\${g}`),r.posix===!0&&g==="!"&&m.value==="["&&(g="^"),m.value+=g,fe({value:g});continue}if(f.quotes===1&&g!=='"'){g=me.escapeRegex(g),m.value+=g,fe({value:g});continue}if(g==='"'){f.quotes=f.quotes===1?0:1,r.keepQuotes===!0&&F({type:"text",value:g});continue}if(g==="("){pt("parens"),F({type:"paren",value:g});continue}if(g===")"){if(f.parens===0&&r.strictBrackets===!0)throw new SyntaxError(ze("opening","("));let R=W[W.length-1];if(R&&f.parens===R.parens+1){_a(W.pop());continue}F({type:"paren",value:g,output:f.parens?")":"\\)"}),be("parens");continue}if(g==="["){if(r.nobracket===!0||!ae().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(ze("closing","]"));g=`\\${g}`}else pt("brackets");F({type:"bracket",value:g});continue}if(g==="]"){if(r.nobracket===!0||m&&m.type==="bracket"&&m.value.length===1){F({type:"text",value:g,output:`\\${g}`});continue}if(f.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(ze("opening","["));F({type:"text",value:g,output:`\\${g}`});continue}be("brackets");let R=m.value.slice(1);if(m.posix!==!0&&R[0]==="^"&&!R.includes("/")&&(g=`/${g}`),m.value+=g,fe({value:g}),r.literalBrackets===!1||me.hasRegexChars(R))continue;let P=me.escapeRegex(m.value);if(f.output=f.output.slice(0,-m.value.length),r.literalBrackets===!0){f.output+=P,m.value=P;continue}m.value=`(${a}${P}|${m.value})`,f.output+=m.value;continue}if(g==="{"&&r.nobrace!==!0){pt("braces");let R={type:"brace",value:g,output:"(",outputIndex:f.output.length,tokensIndex:f.tokens.length};U.push(R),F(R);continue}if(g==="}"){let R=U[U.length-1];if(r.nobrace===!0||!R){F({type:"text",value:g,output:g});continue}let P=")";if(R.dots===!0){let V=o.slice(),se=[];for(let J=V.length-1;J>=0&&(o.pop(),V[J].type!=="brace");J--)V[J].type!=="dots"&&se.unshift(V[J].value);P=Nc(se,r),f.backtrack=!0}if(R.comma!==!0&&R.dots!==!0){let V=f.output.slice(0,R.outputIndex),se=f.tokens.slice(R.tokensIndex);R.value=R.output="\\{",g=P="\\}",f.output=V;for(let J of se)f.output+=J.output||J.value}F({type:"brace",value:g,output:P}),be("braces"),U.pop();continue}if(g==="|"){W.length>0&&W[W.length-1].conditions++,F({type:"text",value:g});continue}if(g===","){let R=g,P=U[U.length-1];P&&q[q.length-1]==="braces"&&(P.comma=!0,R="|"),F({type:"comma",value:g,output:R});continue}if(g==="/"){if(m.type==="dot"&&f.index===f.start+1){f.start=f.index+1,f.consumed="",f.output="",o.pop(),m=n;continue}F({type:"slash",value:g,output:c});continue}if(g==="."){if(f.braces>0&&m.type==="dot"){m.value==="."&&(m.output=d);let R=U[U.length-1];m.type="dots",m.output+=g,m.value+=g,R.dots=!0;continue}if(f.braces+f.parens===0&&m.type!=="bos"&&m.type!=="slash"){F({type:"text",value:g,output:d});continue}F({type:"dot",value:g,output:d});continue}if(g==="?"){if(!(m&&m.value==="(")&&r.noextglob!==!0&&D()==="("&&D(2)!=="?"){dt("qmark",g);continue}if(m&&m.type==="paren"){let P=D(),V=g;(m.value==="("&&!/[!=<:]/.test(P)||P==="<"&&!/<([!=]|\w+>)/.test(ae()))&&(V=`\\${g}`),F({type:"text",value:g,output:V});continue}if(r.dot!==!0&&(m.type==="slash"||m.type==="bos")){F({type:"qmark",value:g,output:N});continue}F({type:"qmark",value:g,output:S});continue}if(g==="!"){if(r.noextglob!==!0&&D()==="("&&(D(2)!=="?"||!/[!=<:]/.test(D(3)))){dt("negate",g);continue}if(r.nonegate!==!0&&f.index===0){Aa();continue}}if(g==="+"){if(r.noextglob!==!0&&D()==="("&&D(2)!=="?"){dt("plus",g);continue}if(m&&m.value==="("||r.regex===!1){F({type:"plus",value:g,output:u});continue}if(m&&(m.type==="bracket"||m.type==="paren"||m.type==="brace")||f.parens>0){F({type:"plus",value:g});continue}F({type:"plus",value:u});continue}if(g==="@"){if(r.noextglob!==!0&&D()==="("&&D(2)!=="?"){F({type:"at",extglob:!0,value:g,output:""});continue}F({type:"text",value:g});continue}if(g!=="*"){(g==="$"||g==="^")&&(g=`\\${g}`);let R=vc.exec(ae());R&&(g+=R[0],f.index+=R[0].length),F({type:"text",value:g});continue}if(m&&(m.type==="globstar"||m.star===!0)){m.type="star",m.star=!0,m.value+=g,m.output=v,f.backtrack=!0,f.globstar=!0,Q(g);continue}let x=ae();if(r.noextglob!==!0&&/^\([^?]/.test(x)){dt("star",g);continue}if(m.type==="star"){if(r.noglobstar===!0){Q(g);continue}let R=m.prev,P=R.prev,V=R.type==="slash"||R.type==="bos",se=P&&(P.type==="star"||P.type==="globstar");if(r.bash===!0&&(!V||x[0]&&x[0]!=="/")){F({type:"star",value:g,output:""});continue}let J=f.braces>0&&(R.type==="comma"||R.type==="brace"),Kt=W.length&&(R.type==="pipe"||R.type==="paren");if(!V&&R.type!=="paren"&&!J&&!Kt){F({type:"star",value:g,output:""});continue}for(;x.slice(0,3)==="/**";){let mt=t[f.index+4];if(mt&&mt!=="/")break;x=x.slice(3),Q("/**",3)}if(R.type==="bos"&&ee()){m.type="globstar",m.value+=g,m.output=L(r),f.output=m.output,f.globstar=!0,Q(g);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&!se&&ee()){f.output=f.output.slice(0,-(R.output+m.output).length),R.output=`(?:${R.output}`,m.type="globstar",m.output=L(r)+(r.strictSlashes?")":"|$)"),m.value+=g,f.globstar=!0,f.output+=R.output+m.output,Q(g);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&x[0]==="/"){let mt=x[1]!==void 0?"|$":"";f.output=f.output.slice(0,-(R.output+m.output).length),R.output=`(?:${R.output}`,m.type="globstar",m.output=`${L(r)}${c}|${c}${mt})`,m.value+=g,f.output+=R.output+m.output,f.globstar=!0,Q(g+B()),F({type:"slash",value:"/",output:""});continue}if(R.type==="bos"&&x[0]==="/"){m.type="globstar",m.value+=g,m.output=`(?:^|${c}|${L(r)}${c})`,f.output=m.output,f.globstar=!0,Q(g+B()),F({type:"slash",value:"/",output:""});continue}f.output=f.output.slice(0,-m.output.length),m.type="globstar",m.output=L(r),m.value+=g,f.output+=m.output,f.globstar=!0,Q(g);continue}let k={type:"star",value:g,output:v};if(r.bash===!0){k.output=".*?",(m.type==="bos"||m.type==="slash")&&(k.output=$+k.output),F(k);continue}if(m&&(m.type==="bracket"||m.type==="paren")&&r.regex===!0){k.output=g,F(k);continue}(f.index===f.start||m.type==="slash"||m.type==="dot")&&(m.type==="dot"?(f.output+=O,m.output+=O):r.dot===!0?(f.output+=b,m.output+=b):(f.output+=$,m.output+=$),D()!=="*"&&(f.output+=p,m.output+=p)),F(k)}for(;f.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(ze("closing","]"));f.output=me.escapeLast(f.output,"["),be("brackets")}for(;f.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(ze("closing",")"));f.output=me.escapeLast(f.output,"("),be("parens")}for(;f.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(ze("closing","}"));f.output=me.escapeLast(f.output,"{"),be("braces")}if(r.strictSlashes!==!0&&(m.type==="star"||m.type==="bracket")&&F({type:"maybe_slash",value:"",output:`${c}?`}),f.backtrack===!0){f.output="";for(let x of f.tokens)f.output+=x.output!=null?x.output:x.value,x.suffix&&(f.output+=x.suffix)}return f};Br.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength=="number"?Math.min(Bt,r.maxLength):Bt,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);t=Ao[t]||t;let{DOT_LITERAL:n,SLASH_LITERAL:o,ONE_CHAR:a,DOTS_SLASH:l,NO_DOT:h,NO_DOTS:d,NO_DOTS_SLASH:u,STAR:c,START_ANCHOR:p}=Mt.globChars(r.windows),_=r.dot?d:h,E=r.dot?u:h,O=r.capture?"":"?:",b={negated:!1,prefix:""},S=r.bash===!0?".*?":c;r.capture&&(S=`(${S})`);let N=$=>$.noglobstar===!0?S:`(${O}(?:(?!${p}${$.dot?l:n}).)*?)`,w=$=>{switch($){case"*":return`${_}${a}${S}`;case".*":return`${n}${a}${S}`;case"*.*":return`${_}${S}${n}${a}${S}`;case"*/*":return`${_}${S}${o}${a}${E}${S}`;case"**":return _+N(r);case"**/*":return`(?:${_}${N(r)}${o})?${E}${a}${S}`;case"**/*.*":return`(?:${_}${N(r)}${o})?${E}${S}${n}${a}${S}`;case"**/.*":return`(?:${_}${N(r)}${o})?${n}${a}${S}`;default:{let I=/^(.*?)\.(\w+)$/.exec($);if(!I)return;let v=w(I[1]);return v?v+n+I[2]:void 0}}},C=me.removePrefix(t,b),L=w(C);return L&&r.strictSlashes!==!0&&(L+=`${o}?`),L};_o.exports=Br});var To=A((Xp,yo)=>{"use strict";var Lc=Ro(),qr=wo(),xo=Ft(),Hc=ht(),Dc=t=>t&&typeof t=="object"&&!Array.isArray(t),Y=(t,e,r=!1)=>{if(Array.isArray(t)){let d=t.map(c=>Y(c,e,r));return c=>{for(let p of d){let _=p(c);if(_)return _}return!1}}let s=Dc(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!s)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},n=i.windows,o=s?Y.compileRe(t,e):Y.makeRe(t,e,!1,!0),a=o.state;delete o.state;let l=()=>!1;if(i.ignore){let d={...e,ignore:null,onMatch:null,onResult:null};l=Y(i.ignore,d,r)}let h=(d,u=!1)=>{let{isMatch:c,match:p,output:_}=Y.test(d,o,e,{glob:t,posix:n}),E={glob:t,state:a,regex:o,posix:n,input:d,output:_,match:p,isMatch:c};return typeof i.onResult=="function"&&i.onResult(E),c===!1?(E.isMatch=!1,u?E:!1):l(d)?(typeof i.onIgnore=="function"&&i.onIgnore(E),E.isMatch=!1,u?E:!1):(typeof i.onMatch=="function"&&i.onMatch(E),u?E:!0)};return r&&(h.state=a),h};Y.test=(t,e,r,{glob:s,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let n=r||{},o=n.format||(i?xo.toPosixSlashes:null),a=t===s,l=a&&o?o(t):t;return a===!1&&(l=o?o(t):t,a=l===s),(a===!1||n.capture===!0)&&(n.matchBase===!0||n.basename===!0?a=Y.matchBase(t,e,r,i):a=e.exec(l)),{isMatch:!!a,match:a,output:l}};Y.matchBase=(t,e,r)=>(e instanceof RegExp?e:Y.makeRe(e,r)).test(xo.basename(t));Y.isMatch=(t,e,r)=>Y(e,r)(t);Y.parse=(t,e)=>Array.isArray(t)?t.map(r=>Y.parse(r,e)):qr(t,{...e,fastpaths:!1});Y.scan=(t,e)=>Lc(t,e);Y.compileRe=(t,e,r=!1,s=!1)=>{if(r===!0)return t.output;let i=e||{},n=i.contains?"":"^",o=i.contains?"":"$",a=`${n}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let l=Y.toRegex(a,e);return s===!0&&(l.state=t),l};Y.makeRe=(t,e={},r=!1,s=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=qr.fastpaths(t,e)),i.output||(i=qr(t,e)),Y.compileRe(i,e,r,s)};Y.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Y.constants=Hc;yo.exports=Y});var $o=A((Yp,So)=>{"use strict";var bo=To(),Pc=()=>{if(typeof navigator<"u"&&navigator.platform){let t=navigator.platform.toLowerCase();return t==="win32"||t==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function Co(t,e,r=!1){return e&&(e.windows===null||e.windows===void 0)&&(e={...e,windows:Pc()}),bo(t,e,r)}Object.assign(Co,bo);So.exports=Co});var vo=A((Qp,Oo)=>{"use strict";var Ne=class t extends Error{constructor(e,r,s){super("[ParserError] "+e,r,s),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}},qt=class{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},ct=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new qt(this.parseStart)}parse(e){if(e.length===0||e.length==null)return;this._buf=String(e),this.ii=-1,this.char=-1;let r;for(;r===!1||this.nextChar();)r=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let e;do e=this.state.parser,this.runOne();while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(e){if(typeof e!="function")throw new Ne("Tried to set state to non-existent state: "+JSON.stringify(e));this.state.parser=e}goto(e){return this.next(e),this.runOne()}call(e,r){r&&this.next(r),this.stack.push(this.state),this.state=new qt(e)}callNow(e,r){return this.call(e,r),this.runOne()}return(e){if(this.stack.length===0)throw this.error(new Ne("Stack underflow"));e===void 0&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e}returnNow(e){return this.return(e),this.runOne()}consume(){if(this.char===1114112)throw this.error(new Ne("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e}parseStart(){throw new Ne("Must declare a parseStart method")}};ct.END=1114112;ct.Error=Ne;Oo.exports=ct});var No=A((Zp,Io)=>{"use strict";Io.exports=t=>{let e=new Date(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var Gt=A((Jp,Lo)=>{"use strict";Lo.exports=(t,e)=>{for(e=String(e);e.length<t;)e="0"+e;return e}});var Do=A((ed,Ho)=>{"use strict";var ke=Gt(),Gr=class extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){let e=`${this.getUTCFullYear()}-${ke(2,this.getUTCMonth()+1)}-${ke(2,this.getUTCDate())}`,r=`${ke(2,this.getUTCHours())}:${ke(2,this.getUTCMinutes())}:${ke(2,this.getUTCSeconds())}.${ke(3,this.getUTCMilliseconds())}`;return`${e}T${r}`}};Ho.exports=t=>{let e=new Gr(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var Fo=A((td,Uo)=>{"use strict";var Po=Gt(),Uc=global.Date,jr=class extends Uc{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${Po(2,this.getUTCMonth()+1)}-${Po(2,this.getUTCDate())}`}};Uo.exports=t=>{let e=new jr(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var Bo=A((rd,Mo)=>{"use strict";var jt=Gt(),Wr=class extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${jt(2,this.getUTCHours())}:${jt(2,this.getUTCMinutes())}:${jt(2,this.getUTCSeconds())}.${jt(3,this.getUTCMilliseconds())}`}};Mo.exports=t=>{let e=new Wr(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var qo=A((exports,module)=>{"use strict";module.exports=makeParserClass(vo());module.exports.makeParserClass=makeParserClass;var TomlError=class t extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,t),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=t=>{let e=new TomlError(t.message);return e.code=t.code,e.wrapped=t,e};module.exports.TomlError=TomlError;var createDateTime=No(),createDateTimeFloat=Do(),createDate=Fo(),createTime=Bo(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
|
|
10
|
+
`,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(t){return t>=CHAR_0&&t<=CHAR_9}function isHexit(t){return t>=CHAR_A&&t<=CHAR_F||t>=CHAR_a&&t<=CHAR_f||t>=CHAR_0&&t<=CHAR_9}function isBit(t){return t===CHAR_1||t===CHAR_0}function isOctit(t){return t>=CHAR_0&&t<=CHAR_7}function isAlphaNumQuoteHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_APOS||t===CHAR_QUOT||t===CHAR_LOWBAR||t===CHAR_HYPHEN}function isAlphaNumHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_LOWBAR||t===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(t,e){return hasOwnProperty.call(t,e)?!0:(e==="__proto__"&&defineProperty(t,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(t){return t===null||typeof t!="object"?!1:t[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(t){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:t}})}function isInlineList(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(t){return t===null||typeof t!="object"?!1:t[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(t){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(t){let e=Number(t);return Object.is(e,-0)&&(e=0),global.BigInt&&!Number.isSafeInteger(e)?new BoxedBigInt(t):Object.defineProperties(new Number(e),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${t}]`}})}function isInteger(t){return t===null||typeof t!="object"?!1:t[_type]===INTEGER}var FLOAT=Symbol("float");function Float(t){return Object.defineProperties(new Number(t),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${t}]`}})}function isFloat(t){return t===null||typeof t!="object"?!1:t[_type]===FLOAT}function tomlType(t){let e=typeof t;if(e==="object"){if(t===null)return"null";if(t instanceof Date)return"datetime";if(_type in t)switch(t[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return e}function makeParserClass(t){class e extends t{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===t.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===t.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===t.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(s){let i=this.ctx,n=s.key.pop();for(let o of s.key){if(hasKey(i,o)&&(!isTable(i[o])||i[o][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[o]=i[o]||Table()}if(hasKey(i,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(s.value)||isFloat(s.value)?i[n]=s.value.valueOf():i[n]=s.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(s){return this.state.resultTable?this.state.resultTable.push(s):this.state.resultTable=[s],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(s){return this.returnNow({key:this.state.resultTable,value:s})}parseComment(){do if(this.char===t.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(s){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,s)&&(!isTable(this.ctx[s])||this.ctx[s][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[s]=this.ctx[s]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,s))this.ctx=this.ctx[s]=Table();else if(isTable(this.ctx[s]))this.ctx=this.ctx[s];else if(isList(this.ctx[s]))this.ctx=this.ctx[s][this.ctx[s].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(s){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,s)||(this.ctx[s]=List()),isInlineList(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[s])){let i=Table();this.ctx[s].push(i),this.ctx=i}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,s))this.ctx=this.ctx[s]=Table();else{if(isInlineList(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[s]))this.ctx=this.ctx[s][this.ctx[s].length-1];else if(isTable(this.ctx[s]))this.ctx=this.ctx[s];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(s){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===t.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(s){return this.returnNow(s)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===t.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(s){return this.state.buf+=s,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let s="\\u00";return this.char<16&&(s+="0"),s+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${s} instead`))}recordMultiEscapeReplacement(s){return this.state.buf+=s,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(s){try{let i=parseInt(s,16);if(i>=SURROGATE_FIRST&&i<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(i))}catch(i){throw this.error(TomlError.wrap(i))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===t.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(s){if(this.state.resultArr){let i=this.state.resultArr[_contentType],n=tomlType(s);if(i!==n)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${i} and ${n}`))}else this.state.resultArr=InlineList(tomlType(s));return isFloat(s)||isInteger(s)?this.state.resultArr.push(s.valueOf()):this.state.resultArr.push(s),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(s){let i=this.state.resultTable,n=s.key.pop();for(let o of s.key){if(hasKey(i,o)&&(!isTable(i[o])||i[o][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[o]=i[o]||Table()}if(hasKey(i,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(s.value)||isFloat(s.value)?i[n]=s.value.valueOf():i[n]=s.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return e}});var jo=A((sd,Go)=>{"use strict";Go.exports=Fc;function Fc(t,e){if(t.pos==null||t.line==null)return t;let r=t.message;if(r+=` at row ${t.line+1}, col ${t.col+1}, pos ${t.pos}:
|
|
11
|
+
`,e&&e.split){let s=e.split(/\n/),i=String(Math.min(s.length,t.line+3)).length,n=" ";for(;n.length<i;)n+=" ";for(let o=Math.max(0,t.line-1);o<Math.min(s.length,t.line+2);++o){let a=String(o+1);if(a.length<i&&(a=" "+a),t.line===o){r+=a+"> "+s[o]+`
|
|
12
|
+
`,r+=n+" ";for(let l=0;l<t.col;++l)r+=" ";r+=`^
|
|
13
|
+
`}else r+=a+": "+s[o]+`
|
|
14
|
+
`}}return t.message=r+`
|
|
15
|
+
`,t}});var zo=A((id,Wo)=>{"use strict";Wo.exports=qc;var Mc=qo(),Bc=jo();function qc(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new Mc;try{return e.parse(t),e.finish()}catch(r){throw Bc(r,t)}}});function Xt({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}var aa=we(Yt(),1),la=we(Ns(),1),ha=we(er(),1),z=we(vn(),1),ua=we(Dn(),1),ca=we(Xn(),1);import{cwd as Gc,stdout as jc,argv as Wc,env as Wt,exit as ko}from"node:process";import{join as es,dirname as fa,basename as zr,resolve as zt}from"node:path";import{lstatSync as Vo,readFileSync as Ko,truncateSync as zc,writeFileSync as kc,accessSync as Vc}from"node:fs";var Ku=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],Xu={"1 day ago":"yesterday","1 week ago":"last week","1 month ago":"last month","1 year ago":"last year","in 1 day":"tomorrow","in 1 week":"next week","in 1 month":"next month","in 1 year":"next year"},Yu={sec:"second",min:"minute"};function Ht(t,{now:e,noAffix:r=!1,times:s=Ku,nowThreshold:i=2e3,nowString:n="now",aliases:o=!1,aliasesMap:a=Xu,longUnits:l=!1}={}){if(t=typeof t=="number"?t:Date.parse(t),e=e?typeof e=="number"?e:Date.parse(e):new Date,Number.isNaN(t))return"unknown";let h=!1,d=e-t;if(d<0&&(h=!0,d=Math.abs(d)),d<i)return n;let u,c;for(let _=0,E=s.length;_<E;_++){let O=s[_];if(!(d>=O[1])){u=Math.floor(d/O[0]),c=(l&&Yu[O[2]]||O[2])+(u>1?"s":"");break}}let p=`${h&&!r?"in ":""}${u} ${c}${!h&&!r?" ago":""}`;return o?a[p]??p:p}import Cr from"node:process";import Qu from"node:os";import Yn from"node:tty";function ce(t,e=globalThis.Deno?globalThis.Deno.args:Cr.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}var{env:X}=Cr,Dt;ce("no-color")||ce("no-colors")||ce("color=false")||ce("color=never")?Dt=0:(ce("color")||ce("colors")||ce("color=true")||ce("color=always"))&&(Dt=1);function Zu(){if("FORCE_COLOR"in X)return X.FORCE_COLOR==="true"?1:X.FORCE_COLOR==="false"?0:X.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(X.FORCE_COLOR,10),3)}function Ju(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function ec(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let s=Zu();s!==void 0&&(Dt=s);let i=r?Dt:s;if(i===0)return 0;if(r){if(ce("color=16m")||ce("color=full")||ce("color=truecolor"))return 3;if(ce("color=256"))return 2}if("TF_BUILD"in X&&"AGENT_NAME"in X)return 1;if(t&&!e&&i===void 0)return 0;let n=i||0;if(X.TERM==="dumb")return n;if(Cr.platform==="win32"){let o=Qu.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in X)return"GITHUB_ACTIONS"in X||"GITEA_ACTIONS"in X?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in X)||X.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if(X.COLORTERM==="truecolor"||X.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in X){let o=Number.parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:n}function Qn(t,e={}){let r=ec(t,{streamIsTTY:t&&t.isTTY,...e});return Ju(r)}var tc={stdout:Qn({isTTY:Yn.isatty(1)}),stderr:Qn({isTTY:Yn.isatty(2)})},Zn=tc;var Jn=!0;function eo(){Jn=!1}function Sr(t,e,r){return Jn?`\x1B[${e}m${t.join(" ")}\x1B[${r}m`:t.join(" ")}var $r=(...t)=>Sr(t,31,39),je=(...t)=>Sr(t,32,39);var Pt=(...t)=>Sr(t,35,39);var rc=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var Or=new Set(["__proto__","prototype","constructor"]),sc=new Set("0123456789");function ic(t){let e=[],r="",s="start",i=!1;for(let n of t)switch(n){case"\\":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=n),s="property",i=!i;break}case".":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd"){s="property";break}if(i){i=!1,r+=n;break}if(Or.has(r))return[];e.push(r),r="",s="property";break}case"[":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd"){s="index";break}if(i){i=!1,r+=n;break}if(s==="property"){if(Or.has(r))return[];e.push(r),r=""}s="index";break}case"]":{if(s==="index"){e.push(Number.parseInt(r,10)),r="",s="indexEnd";break}if(s==="indexEnd")throw new Error("Invalid character after an index")}default:{if(s==="index"&&!sc.has(n))throw new Error("Invalid character in an index");if(s==="indexEnd")throw new Error("Invalid character after an index");s==="start"&&(s="property"),i&&(i=!1,r+="\\"),r+=n}}switch(i&&(r+="\\"),s){case"property":{if(Or.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function nc(t,e){if(typeof e!="number"&&Array.isArray(t)){let r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function to(t,e,r){if(!rc(t)||typeof e!="string")return r===void 0?t:r;let s=ic(e);if(s.length===0)return r;for(let i=0;i<s.length;i++){let n=s[i];if(nc(t,n)?t=i===s.length-1?void 0:null:t=t[n],t==null){if(i!==s.length-1)return r;break}}return t===void 0?r:t}var vr=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},ro=t=>globalThis.DOMException===void 0?new vr(t):new DOMException(t),so=t=>{let e=t.reason===void 0?ro("This operation was aborted."):t.reason;return e instanceof Error?e:ro(e)};async function Ir(t,e,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:s=!0,signal:i}={}){return new Promise((n,o)=>{if(t[Symbol.iterator]===void 0&&t[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);let a=[],l=[],h=new Map,d=!1,u=!1,c=!1,p=0,_=0,E=t[Symbol.iterator]===void 0?t[Symbol.asyncIterator]():t[Symbol.iterator](),O=S=>{d=!0,u=!0,o(S)};i&&(i.aborted&&O(so(i)),i.addEventListener("abort",()=>{O(so(i))}));let b=async()=>{if(u)return;let S=await E.next(),N=_;if(_++,S.done){if(c=!0,p===0&&!u){if(!s&&l.length>0){O(new AggregateError(l));return}if(u=!0,h.size===0){n(a);return}let w=[];for(let[C,L]of a.entries())h.get(C)!==io&&w.push(L);n(w)}return}p++,(async()=>{try{let w=await S.value;if(u)return;let C=await e(w,N);C===io&&h.set(N,C),a[N]=C,p--,await b()}catch(w){if(s)O(w);else{l.push(w),p--;try{await b()}catch(C){O(C)}}}})()};(async()=>{for(let S=0;S<r;S++){try{await b()}catch(N){O(N);break}if(c||d)break}})()})}var io=Symbol("skip");async function Nr(t,e){return Ir(t,r=>r(),e)}function We(t,e){var r=0,s,i;e=e||{};function n(){var o=s,a=arguments.length,l,h;e:for(;o;){if(o.args.length!==arguments.length){o=o.next;continue}for(h=0;h<a;h++)if(o.args[h]!==arguments[h]){o=o.next;continue e}return o!==s&&(o===i&&(i=o.prev),o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=s,o.prev=null,s.prev=o,s=o),o.val}for(l=new Array(a),h=0;h<a;h++)l[h]=arguments[h];return o={args:l,val:t.apply(null,l)},s?(s.prev=o,o.next=s):i=o,r===e.maxSize?(i=i.prev,i.next=null):r++,s=o,o.val}return n.clear=function(){s=null,i=null,r=0},n}var Qr=we($o(),1),pa=96,_e="\0",Kc=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,Xc=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Zr=/^[0-9a-f]{7,}$/i,Xo=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,kt=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),Yc=We(ca.default.fromUrl),kr=We(la.default),Vt=We(t=>t.endsWith("/")?t.substring(0,t.length-1):t),Qc=new Set(["patch"]),Zc=new Set(["patch","minor"]),Jc=new Set(["patch","minor","major"]),da="16.0.0",M=(0,aa.default)(Wc.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types","githubapi","pypiapi"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",h:"help",i:"include",j:"json",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}});(M["no-color"]||!Zn.stdout)&&eo();var Ve=ft(He(M.greatest)),Vr=ft(He(M.prerelease)),Kr=ft(He(M.release)),Yo=ft(He(M.patch)),Qo=ft(He(M.minor)),Zo=He(M["allow-downgrade"]),ge=(0,ha.default)("npm",{registry:"https://registry.npmjs.org"}),Xr={npmrc:ge,recursive:!0},Jo=M.githubapi?Vt(M.githubapi):"https://api.github.com",ef=M.pypiapi?Vt(M.pypiapi):"https://pypi.org",ma=typeof M.sockets=="number"?parseInt(M.sockets):pa;function Le(t,e){for(let r of e instanceof Set?e:[])if(r.test(t))return!0;return!1}var tf=We((t,e)=>{let r=e[`${t}:registry`]||e.registry;return r.endsWith("/")?r:`${r}/`});function ga(t,e,r){let s=es(e,t);try{return Vc(s),s}catch{}let i=fa(e);return r&&s===r||i===e?null:ga(t,i,r)}function rf(t,e){if(t.startsWith("@")){let r=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],s=Vt(tf(r,ge));if(s!==e)try{let i=kr(s,Xr);if(i?.token)return[i,s]}catch{}return[kr(e,Xr),e]}else return[kr(e,Xr),e]}var Ea=We((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${da}`,...r&&{Authorization:`${e} ${r}`}}}));async function sf(t,e,r,s){let[i,n]=rf(t,r),a=(e==="resolutions"?gf(t):t).replace(/\//g,"%2f"),l=`${n}/${a}`;M.verbose&&console.error(`${Pt("fetch")} ${l}`);let h=await fetch(l,Ea(s,i?.type,i?.token));if(h?.ok)return M.verbose&&console.error(`${je("done")} ${l}`),[await h.json(),e,n,t];throw h?.status&&h?.statusText?new Error(`Received ${h.status} ${h.statusText} for ${t} from ${n}`):new Error(`Unable to fetch ${t} from ${n}`)}async function nf(t,e,r){let s=`${ef}/pypi/${t}/json`;M.verbose&&console.error(`${Pt("fetch")} ${s}`);let i=await fetch(s,Ea(r));if(i?.ok)return M.verbose&&console.error(`${je("done")} ${s}`),[await i.json(),e,null,t];throw i?.status&&i?.statusText?new Error(`Received ${i.status} ${i.statusText} for ${t} from PyPi`):new Error(`Unable to fetch ${t} from PyPi`)}function ea({repository:t,homepage:e,info:r},s,i){r&&(t=r.project_urls.repository||r.project_urls.Repository||r.project_urls.repo||r.project_urls.Repo||r.project_urls.source||r.project_urls.Source||r.project_urls["source code"]||r.project_urls["Source Code"]||r.project_urls.homepage||r.project_urls.Homepage||`https://pypi.org/project/${i}/`);let n;if(s==="https://npm.pkg.github.com")return`https://github.com/${i.replace(/^@/,"")}`;if(t){let o=typeof t=="string"?t:t.url,a=Yc(o),l=a?.browse?.();l&&(n=l),n&&t.directory&&a.treepath&&(n=`${n}/${a.treepath}/HEAD/${t.directory}`),!n&&t?.url&&/^https?:/.test(t.url)&&(n=t.url),!n&&o&&(n=o)}return n||e||""}function ta(t){M.json?console.info(JSON.stringify({message:t})):console.info(t),Ke()}function Ke(t){if(t){let e=t.stack||t.message;M.json?console.info(JSON.stringify({error:e})):console.info($r(e))}process.exit(t?1:0)}function of(t={}){for(let r of Object.keys(t))for(let s of Object.values(t[r]))"oldPrint"in s&&(s.old=s.oldPrint,delete s.oldPrint),"newPrint"in s&&(s.new=s.newPrint,delete s.newPrint),"oldOriginal"in s&&(s.old=s.oldOriginal,delete s.oldOriginal);let e=0;for(let r of Object.keys(t))e+=Object.keys(t[r]).length;if(M.json){let r={results:{}};for(let s of Object.keys(t))for(let[i,n]of Object.entries(t[s])){let[o,a]=i.split(_e);r.results[s]||(r.results[s]={}),r.results[s][o]||(r.results[s][o]={}),r.results[s][o][a]=n}console.info(JSON.stringify(r))}else e&&console.info(lf(t));return M["error-on-outdated"]?e?2:0:M["error-on-unchanged"]?e?0:2:0}async function af(t,e){let{platform:r}=await import("node:os"),s=r()==="win32";s&&zc(t,0),kc(t,e,s?{flag:"r+"}:void 0)}function ra(t,e,r){if(t===e)return t;let s=t.split(/\./),i=e.split(/\./),n=/^[0-9a-zA-Z-.]+$/,o="";for(let a=0;a<s.length;a++)if(s[a]!==i[a]){n.test(s[a])?o+=r(s.slice(a).join(".")):o+=s[a].split("").map(l=>n.test(l)?r(l):l).join("")+r(`.${s.slice(a+1).join(".")}`);break}else o+=`${s[a]}.`;return o}function lf(t){let e=[["NAME","OLD","NEW","AGE","INFO"]],r=new Set;for(let s of Object.keys(t))for(let[i,n]of Object.entries(t[s])){let o=i.split(_e)[1],a=`${s}|${o}`;r.has(a)||(r.add(a),e.push([o,ra(n.old,n.new,$r),ra(n.new,n.old,je),n.age||"",n.info]))}return(0,ua.default)(e,{hsep:" ",stringLength:s=>s.replace(Xt(),"").length})}function hf(t,e){let r=t;for(let s of Object.keys(e)){let i=s.split(_e)[1],n=e[s].oldOriginal||e[s].old,o=new RegExp(`"${kt(i)}": *"${kt(n)}"`,"g");r=r.replace(o,`"${i}": "${e[s].new}"`)}return r}function uf(t,e){let r=t;for(let s of Object.keys(e)){let i=s.split(_e)[1],n=e[s].oldOriginal||e[s].old,o=new RegExp(`${kt(i)} *= *"${kt(n)}"`,"g");r=r.replace(o,`${i} = "${e[s].new}"`)}return r}function cf(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Yr(t){let e=(0,z.parse)(t);return e?!!e.prerelease.length:!1}function Ra(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function ff(t){try{return(0,z.coerce)(t).version}catch{return null}}function pf(t,e,{range:r,semvers:s,usePre:i,useRel:n,useGreatest:o}={}){let a=ff(r),l=0;s=new Set(s),i=Ra(r)||i,i&&(s.add("prerelease"),s.has("patch")&&s.add("prepatch"),s.has("minor")&&s.add("preminor"),s.has("major")&&s.add("premajor"));for(let h of e){let d=(0,z.parse)(h);if(d.prerelease.length&&(!i||n))continue;let u=(0,z.diff)(a,d.version);if(!(!u||!s.has(u)))if(o||!("time"in t))(0,z.gte)((0,z.coerce)(d.version).version,a)&&(a=d.version);else{let c=new Date(t.time[h]).getTime();c>=0&&c>l&&(a=d.version,l=c)}}return a||null}function df(t,{mode:e,range:r,useGreatest:s,useRel:i,usePre:n,semvers:o}={}){if(r==="*"||r.includes("||"))return null;let a=Object.keys(e==="pypi"?t.releases:t.versions).filter(h=>(0,z.valid)(h)),l=pf(t,a,{range:r,semvers:o,usePre:n,useRel:i,useGreatest:s});if(s)return l;{let h,d;e==="pypi"?(d=t.info.version,h=(0,z.coerce)(t.info.version).version):h=t["dist-tags"].latest;let u=(0,z.coerce)(r).version,c=Ra(r),p=Yr(l),_=Yr(h),E=(0,z.gt)(l,u);if(!i&&n||c&&p||i&&!E&&c&&!p||c&&!p&&E)return l;if(c&&!p&&!E)return null;let O=(0,z.diff)(u,h);return O&&O!=="prerelease"&&!o.has(O.replace(/^pre/,""))||i&&Yr(h)?l:(0,z.lt)(h,u)&&!_?Zo===!0||Le(t.name,Zo)?h:null:d??h}}async function mf([t,e],{useGreatest:r}={}){let s=e.old.replace(Kc,""),[i,n,o,a]=Xc.exec(s)||[];if(!(!n||!o||!a))if(Zr.test(a)){let l={maxSockets:ma},h=Wt.UPDATES_GITHUB_API_TOKEN||Wt.GITHUB_API_TOKEN||Wt.GH_TOKEN||Wt.HOMEBREW_GITHUB_API_TOKEN;h&&(l.headers={Authorization:`Bearer ${h}`});let d=`${Jo}/repos/${n}/${o}/commits`;M.verbose&&console.error(`${Pt("fetch")} ${d}`);let u=await fetch(d,l);if(M.verbose&&u?.ok&&console.error(`${je("done")} ${d}`),!u||!u.ok)return;let c=await u.json(),{sha:p,commit:_}=c[0];if(!p||!p.length)return;let E=_?.committer?.date??_?.author?.date;if(p=p.substring(0,a.length),a!==p){let O=e.old.replace(a,p);return{key:t,newRange:O,user:n,repo:o,oldRef:a,newRef:p,newDate:E}}}else{let l=await fetch(`${Jo}/repos/${n}/${o}/git/refs/tags`);if(!l||!l.ok)return;let d=(await l.json()).map(c=>c.ref.replace(/^refs\/tags\//,"")),u=a.replace(/^v/,"");if(!(0,z.valid)(u))return;if(r){let c=a,p=a.replace(/^v/,"");for(let _ of d){let E=_.replace(/^v/,"");(0,z.valid)(E)&&(!c||(0,z.gt)(E,p))&&(c=_,p=E)}if((0,z.neq)(u,p))return{key:t,newRange:c,user:n,repo:o,oldRef:a,newRef:c}}else{let c=d[d.length-1],p=c.replace(/^v/,"");if(!(0,z.valid)(p))return;if((0,z.neq)(u,p))return{key:t,newRange:c,user:n,repo:o,oldRef:a,newRef:c}}}}function gf(t){let e=t.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function Ef(t){let e=t.match(Xo);return e?.length!==1?t:t.replace(Xo,(0,z.coerce)(e[0]))}function He(t){return t===void 0?!1:t===""?!0:typeof t=="string"?t.includes(",")?new Set(t.split(",")):new Set([t]):Array.isArray(t)?new Set(t):!1}function sa(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}async function ia(t=[]){return[...(await import("node:tls")).rootCertificates,...t]}function Jr(t,e){return e?/\/.+\//.test(t)?new RegExp(t.slice(1,-1)):Qr.default.makeRe(t):t instanceof RegExp?t:Qr.default.makeRe(t)}function ft(t){if(t instanceof Set){let e=new Set;for(let r of t)e.add(Jr(r,!0));return e}return t}function na(t,e){let r=new Set;for(let s of t||[])r.add(Jr(s,!0));for(let s of e||[])r.add(Jr(s,!1));return r}function oa(t,e,{include:r,exclude:s}){if(e==="pypi"&&t==="python")return!1;if(!r.size&&!s.size)return!0;for(let i of s)if(i.test(t))return!1;for(let i of r)if(i.test(t))return!0;return!r.size}function Rf(t){let e=new Set;if(t)for(let r of t){let s;try{s=Vo(r)}catch(i){throw new Error(`Unable to open ${r}: ${i.message}`)}if(s?.isFile())e.add(zt(r));else if(s?.isDirectory())for(let i of["package.json","pyproject.toml"]){let n=es(r,i),o;try{o=Vo(n)}catch{}o?.isFile()&&e.add(zt(n))}else throw new Error(`${r} is neither a file nor directory`)}else for(let r of["package.json","pyproject.toml"]){let s=Gc(),i=ga(r,s);i&&e.add(zt(i))}return e}async function Af(){for(let c of[process.stdout,process.stderr])c?._handle?.setBlocking?.(!0);let{help:t,version:e,file:r,types:s,update:i}=M;t&&(jc.write(`usage: updates [options]
|
|
16
|
+
|
|
17
|
+
Options:
|
|
18
|
+
-u, --update Update versions and write package file
|
|
19
|
+
-f, --file <path,...> File or directory to use, defaults to current directory
|
|
20
|
+
-i, --include <pkg,...> Include only given packages
|
|
21
|
+
-e, --exclude <pkg,...> Exclude given packages
|
|
22
|
+
-p, --prerelease [<pkg,...>] Consider prerelease versions
|
|
23
|
+
-R, --release [<pkg,...>] Only use release versions, may downgrade
|
|
24
|
+
-g, --greatest [<pkg,...>] Prefer greatest over latest version
|
|
25
|
+
-t, --types <type,...> Check only given dependency types
|
|
26
|
+
-P, --patch [<pkg,...>] Consider only up to semver-patch
|
|
27
|
+
-m, --minor [<pkg,...>] Consider only up to semver-minor
|
|
28
|
+
-d, --allow-downgrade [<pkg,...>] Allow version downgrades when using latest version
|
|
29
|
+
-E, --error-on-outdated Exit with code 2 when updates are available and 0 when not
|
|
30
|
+
-U, --error-on-unchanged Exit with code 0 when updates are available and 2 when not
|
|
31
|
+
-r, --registry <url> Override npm registry URL
|
|
32
|
+
-S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: ${pa}
|
|
33
|
+
-j, --json Output a JSON object
|
|
34
|
+
-n, --no-color Disable color output
|
|
35
|
+
-v, --version Print the version
|
|
36
|
+
-V, --verbose Print verbose output to stderr
|
|
37
|
+
-h, --help Print this help
|
|
38
|
+
|
|
39
|
+
Examples:
|
|
40
|
+
$ updates
|
|
41
|
+
$ updates -u
|
|
42
|
+
$ updates -e '@vitejs/*'
|
|
43
|
+
$ updates -e '/^react-(dom)?/'
|
|
44
|
+
$ updates -f package.json
|
|
45
|
+
$ updates -f pyproject.toml
|
|
46
|
+
`),ko(0)),e&&(console.info(da),ko(0));let n={},o={},a={},l={},h=0;for(let c of Rf(He(r))){let p=fa(zt(c)),_=zr(c),E;_==="pyproject.toml"?E="pypi":E="npm",l[E]=c,n[E]||(n[E]={});let O={};try{({default:O}=await Promise.any(["updates.config.js","updates.config.mjs",".config/updates.js",".config/updates.mjs"].map(f=>import(es(p,...f.split("/"))))))}catch{}let b,S;M.include&&M.include!==!0&&(b=(Array.isArray(M.include)?M.include:[M.include]).flatMap(f=>f.split(","))),M.exclude&&M.exclude!==!0&&(S=(Array.isArray(M.exclude)?M.exclude:[M.exclude]).flatMap(f=>f.split(",")));let N=na(b,O?.include),w=na(S,O?.exclude),C={};if(E==="npm"&&(ge["strict-ssl"]===!1&&(C.rejectUnauthorized=!1),"cafile"in ge&&(C.ca=ia(sa(Ko(ge.cafile,"utf8")))),"ca"in ge)){let f=Array.isArray(ge.ca)?ge.ca:[ge.ca];C.ca=ia(f.map(W=>sa(W)))}let L;s?L=Array.isArray(s)?s:s.split(","):"types"in O&&Array.isArray(O.types)?L=O.types:E==="npm"?L=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"]:L=["tool.poetry.dependencies","tool.poetry.dev-dependencies","tool.poetry.test-dependencies","tool.poetry.group.dev.dependencies","tool.poetry.group.test.dependencies"];let $;try{a[E]=Ko(c,"utf8")}catch(f){throw new Error(`Unable to open ${c}: ${f.message}`)}try{E==="npm"?$=JSON.parse(a[E]):$=(await Promise.resolve().then(()=>we(zo(),1))).default(a[E])}catch(f){throw new Error(`Error parsing ${c}: ${f.message}`)}for(let f of L){let W;E==="npm"?W=$[f]||{}:W=to($,f)||{};for(let[U,q]of Object.entries(W))(0,z.validRange)(q)&&oa(U,E,{include:N,exclude:w})?n[E][`${f}${_e}${U}`]={old:Ef(q),oldOriginal:q}:E==="npm"&&oa(U,E,{include:N,exclude:w})&&(o[`${f}${_e}${U}`]={old:q})}if(h+=Object.keys(n[E]).length+Object.keys(o).length,!h)continue;let I;E==="npm"&&(I=Vt(M.registry||O.registry||ge.registry));let v=await Nr(Object.keys(n[E]).map(f=>()=>{let[W,U]=f.split(_e);return E==="npm"?sf(U,W,I,C):nf(U,W,C)}),{concurrency:ma});for(let[f,W,U,q]of v){if(f?.error)throw new Error(f.error);let m=typeof Ve=="boolean"?Ve:Le(f.name,Ve),g=typeof Vr=="boolean"?Vr:Le(f.name,Vr),ee=typeof Kr=="boolean"?Kr:Le(f.name,Kr),D;Yo===!0||Le(f.name,Yo)?D=Qc:Qo===!0||Le(f.name,Qo)?D=Zc:D=Jc;let B=`${W}${_e}${q}`,ae=n[E][B].old,Q=df(f,{usePre:g,useRel:ee,useGreatest:m,semvers:D,range:ae,mode:E}),fe=cf(ae,Q);!Q||ae===fe?delete n[E][B]:(n[E][B].new=fe,E==="npm"?n[E][B].info=ea(f?.versions?.[Q],U,f.name):n[E][B].info=ea(f,U,f.info.name),f.time?.[Q]?n[E][B].age=Ht(f.time[Q],{noAffix:!0}):f.releases?.[Q]?.[0]?.upload_time_iso_8601&&(n[E][B].age=Ht(f.releases[Q][0].upload_time_iso_8601,{noAffix:!0})))}if(Object.keys(o).length){let f=await Promise.all(Object.entries(o).map(([W,U])=>{let q=W.split(_e)[1],m=typeof Ve=="boolean"?Ve:Le(q,Ve);return mf([W,U],{useGreatest:m})}));for(let W of(f||[]).filter(Boolean)){let{key:U,newRange:q,user:m,repo:g,oldRef:ee,newRef:D,newDate:B}=W;n[E][U]={old:o[U].old,new:q,oldPrint:Zr.test(ee)?ee.substring(0,7):ee,newPrint:Zr.test(D)?D.substring(0,7):D,info:`https://github.com/${m}/${g}`,...B?{age:Ht(B,{noAffix:!0})}:{}}}}}h===0&&(ta("No dependencies found, nothing to do."),Ke());let d=0;for(let c of Object.keys(n))d+=Object.keys(n[c]).length;d||(ta("All dependencies are up to date."),Ke());let u=of(n);if(i){for(let c of Object.keys(n))if(Object.keys(n[c]).length){try{let p=c==="npm"?hf:uf;await af(l[c],p(a[c],n[c]))}catch(p){throw new Error(`Error writing ${zr(l[c])}: ${p.message}`)}console.info(je(`\u2728 ${zr(l[c])} updated`))}}Ke(u)}Af().catch(Ke).then(Ke);
|
package/package.json
CHANGED
|
@@ -1,27 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "updates",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "16.0.0",
|
|
4
4
|
"description": "Flexible npm and poetry dependency update tool",
|
|
5
5
|
"author": "silverwind",
|
|
6
6
|
"repository": "silverwind/updates",
|
|
7
7
|
"license": "BSD-2-Clause",
|
|
8
|
-
"bin": "
|
|
8
|
+
"bin": "dist/updates.js",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"engines": {
|
|
11
11
|
"node": ">=18"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
|
-
"
|
|
14
|
+
"dist/updates.js"
|
|
15
15
|
],
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@iarna/toml": "2.2.5",
|
|
18
18
|
"ansi-regex": "6.0.1",
|
|
19
19
|
"dot-prop": "8.0.2",
|
|
20
|
-
"esbuild": "0.20.
|
|
20
|
+
"esbuild": "0.20.2",
|
|
21
21
|
"eslint": "8.57.0",
|
|
22
|
-
"eslint-config-silverwind": "82.0.
|
|
22
|
+
"eslint-config-silverwind": "82.0.5",
|
|
23
23
|
"execa": "8.0.1",
|
|
24
|
-
"fetch-enhanced": "12.0.1",
|
|
25
24
|
"glowie": "1.2.0",
|
|
26
25
|
"hosted-git-info": "7.0.1",
|
|
27
26
|
"memize": "2.1.0",
|
|
@@ -35,9 +34,8 @@
|
|
|
35
34
|
"supports-color": "9.4.0",
|
|
36
35
|
"text-table": "0.2.0",
|
|
37
36
|
"timerel": "5.5.0",
|
|
38
|
-
"undici": "6.7.1",
|
|
39
37
|
"versions": "12.0.1",
|
|
40
|
-
"vitest": "1.
|
|
41
|
-
"vitest-config-silverwind": "5.1.
|
|
38
|
+
"vitest": "1.4.0",
|
|
39
|
+
"vitest-config-silverwind": "5.1.5"
|
|
42
40
|
}
|
|
43
41
|
}
|
package/bin/updates.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import {createRequire} from 'module';const require = createRequire(import.meta.url);
|
|
3
|
-
var qa=Object.create;var us=Object.defineProperty;var Ba=Object.getOwnPropertyDescriptor;var Ga=Object.getOwnPropertyNames;var ja=Object.getPrototypeOf,za=Object.prototype.hasOwnProperty;var Ae=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var x=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Wa=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ga(e))!za.call(t,i)&&i!==r&&us(t,i,{get:()=>e[i],enumerable:!(s=Ba(e,i))||s.enumerable});return t};var de=(t,e,r)=>(r=t!=null?qa(ja(t)):{},Wa(e||!t||!t.__esModule?us(r,"default",{value:t,enumerable:!0}):r,t));var ds=x((Yf,ps)=>{"use strict";var Jt=Ae("https"),er=Ae("http"),{URL:fs}=Ae("url"),tr=class extends er.Agent{constructor(e){let{proxy:r,proxyRequestOptions:s,...i}=e;super(i),this.proxy=typeof r=="string"?new fs(r):r,this.proxyRequestOptions=s||{}}createConnection(e,r){let s={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let n=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");s.headers["proxy-authorization"]=`Basic ${n}`}this.proxy.protocol==="https:"&&(s.servername=this.proxy.hostname);let i=(this.proxy.protocol==="http:"?er:Jt).request(s);i.once("connect",(n,o,a)=>{i.removeAllListeners(),o.removeAllListeners(),n.statusCode===200?r(null,o):(o.destroy(),r(new Error(`Bad response: ${n.statusCode}`),null))}),i.once("timeout",()=>{i.destroy(new Error("Proxy timeout"))}),i.once("error",n=>{i.removeAllListeners(),r(n,null)}),i.end()}},rr=class extends Jt.Agent{constructor(e){let{proxy:r,proxyRequestOptions:s,...i}=e;super(i),this.proxy=typeof r=="string"?new fs(r):r,this.proxyRequestOptions=s||{}}createConnection(e,r){let s={...this.proxyRequestOptions,method:"CONNECT",host:this.proxy.hostname,port:this.proxy.port,path:`${e.host}:${e.port}`,setHost:!1,headers:{...this.proxyRequestOptions.headers,connection:this.keepAlive?"keep-alive":"close",host:`${e.host}:${e.port}`},agent:!1,timeout:e.timeout||0};if(this.proxy.username||this.proxy.password){let n=Buffer.from(`${decodeURIComponent(this.proxy.username||"")}:${decodeURIComponent(this.proxy.password||"")}`).toString("base64");s.headers["proxy-authorization"]=`Basic ${n}`}this.proxy.protocol==="https:"&&(s.servername=this.proxy.hostname);let i=(this.proxy.protocol==="http:"?er:Jt).request(s);i.once("connect",(n,o,a)=>{if(i.removeAllListeners(),o.removeAllListeners(),n.statusCode===200){let l=super.createConnection({...e,socket:o});r(null,l)}else o.destroy(),r(new Error(`Bad response: ${n.statusCode}`),null)}),i.once("timeout",()=>{i.destroy(new Error("Proxy timeout"))}),i.once("error",n=>{i.removeAllListeners(),r(n,null)}),i.end()}};ps.exports={HttpProxyAgent:tr,HttpsProxyAgent:rr}});var As=x(Es=>{"use strict";var ka=Ae("url").parse,Va={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},Ka=String.prototype.endsWith||function(t){return t.length<=this.length&&this.indexOf(t,this.length-t.length)!==-1};function Xa(t){var e=typeof t=="string"?ka(t):t||{},r=e.protocol,s=e.host,i=e.port;if(typeof s!="string"||!s||typeof r!="string"||(r=r.split(":",1)[0],s=s.replace(/:\d*$/,""),i=parseInt(i)||Va[r]||0,!Ya(s,i)))return"";var n=Pe("npm_config_"+r+"_proxy")||Pe(r+"_proxy")||Pe("npm_config_proxy")||Pe("all_proxy");return n&&n.indexOf("://")===-1&&(n=r+"://"+n),n}function Ya(t,e){var r=(Pe("npm_config_no_proxy")||Pe("no_proxy")).toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(s){if(!s)return!0;var i=s.match(/^(.+):(\d+)$/),n=i?i[1]:s,o=i?parseInt(i[2]):0;return o&&o!==e?!0:/^[.*]/.test(n)?(n.charAt(0)==="*"&&(n=n.slice(1)),!Ka.call(t,n)):t!==n}):!0}function Pe(t){return process.env[t.toLowerCase()]||process.env[t.toUpperCase()]||""}Es.getProxyForUrl=Xa});var or=x((np,_s)=>{"use strict";function el(t,e){var r=t;e.slice(0,-1).forEach(function(i){r=r[i]||{}});var s=e[e.length-1];return s in r}function ys(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function ws(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}_s.exports=function(t,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(y){r.bools[y]=!0});var s={};function i(y){return s[y].some(function(C){return r.bools[C]})}Object.keys(e.alias||{}).forEach(function(y){s[y]=[].concat(e.alias[y]),s[y].forEach(function(C){s[C]=[y].concat(s[y].filter(function(L){return C!==L}))})}),[].concat(e.string).filter(Boolean).forEach(function(y){r.strings[y]=!0,s[y]&&[].concat(s[y]).forEach(function(C){r.strings[C]=!0})});var n=e.default||{},o={_:[]};function a(y,C){return r.allBools&&/^--[^=]+$/.test(C)||r.strings[y]||r.bools[y]||s[y]}function l(y,C,L){for(var $=y,I=0;I<C.length-1;I++){var O=C[I];if(ws($,O))return;$[O]===void 0&&($[O]={}),($[O]===Object.prototype||$[O]===Number.prototype||$[O]===String.prototype)&&($[O]={}),$[O]===Array.prototype&&($[O]=[]),$=$[O]}var d=C[C.length-1];ws($,d)||(($===Object.prototype||$===Number.prototype||$===String.prototype)&&($={}),$===Array.prototype&&($=[]),$[d]===void 0||r.bools[d]||typeof $[d]=="boolean"?$[d]=L:Array.isArray($[d])?$[d].push(L):$[d]=[$[d],L])}function h(y,C,L){if(!(L&&r.unknownFn&&!a(y,L)&&r.unknownFn(L)===!1)){var $=!r.strings[y]&&ys(C)?Number(C):C;l(o,y.split("."),$),(s[y]||[]).forEach(function(I){l(o,I.split("."),$)})}}Object.keys(r.bools).forEach(function(y){h(y,n[y]===void 0?!1:n[y])});var p=[];t.indexOf("--")!==-1&&(p=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var u=0;u<t.length;u++){var c=t[u],f,A;if(/^--.+=/.test(c)){var E=c.match(/^--([^=]+)=([\s\S]*)$/);f=E[1];var v=E[2];r.bools[f]&&(v=v!=="false"),h(f,v,c)}else if(/^--no-.+/.test(c))f=c.match(/^--no-(.+)/)[1],h(f,!1,c);else if(/^--.+/.test(c))f=c.match(/^--(.+)/)[1],A=t[u+1],A!==void 0&&!/^(-|--)[^-]/.test(A)&&!r.bools[f]&&!r.allBools&&(!s[f]||!i(f))?(h(f,A,c),u+=1):/^(true|false)$/.test(A)?(h(f,A==="true",c),u+=1):h(f,r.strings[f]?"":!0,c);else if(/^-[^-]+/.test(c)){for(var b=c.slice(1,-1).split(""),S=!1,N=0;N<b.length;N++){if(A=c.slice(N+2),A==="-"){h(b[N],A,c);continue}if(/[A-Za-z]/.test(b[N])&&A[0]==="="){h(b[N],A.slice(1),c),S=!0;break}if(/[A-Za-z]/.test(b[N])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(A)){h(b[N],A,c),S=!0;break}if(b[N+1]&&b[N+1].match(/\W/)){h(b[N],c.slice(N+2),c),S=!0;break}else h(b[N],r.strings[b[N]]?"":!0,c)}f=c.slice(-1)[0],!S&&f!=="-"&&(t[u+1]&&!/^(-|--)[^-]/.test(t[u+1])&&!r.bools[f]&&(!s[f]||!i(f))?(h(f,t[u+1],c),u+=1):t[u+1]&&/^(true|false)$/.test(t[u+1])?(h(f,t[u+1]==="true",c),u+=1):h(f,r.strings[f]?"":!0,c))}else if((!r.unknownFn||r.unknownFn(c)!==!1)&&o._.push(r.strings._||!ys(c)?c:Number(c)),e.stopEarly){o._.push.apply(o._,t.slice(u+1));break}}return Object.keys(n).forEach(function(y){el(o,y.split("."))||(l(o,y.split("."),n[y]),(s[y]||[]).forEach(function(C){l(o,C.split("."),n[y])}))}),e["--"]?o["--"]=p.slice():p.forEach(function(y){o._.push(y)}),o}});var bs=x((op,Ts)=>{function tl(t){return Buffer.from(t,"base64").toString("utf8")}function rl(t){return Buffer.from(t,"utf8").toString("base64")}Ts.exports={decodeBase64:tl,encodeBase64:rl}});var vs=x(Se=>{Se.parse=Se.decode=sl;Se.stringify=Se.encode=Cs;Se.safe=Ue;Se.unsafe=Rt;var ar=typeof process<"u"&&process.platform==="win32"?`\r
|
|
4
|
-
`:`
|
|
5
|
-
`;function Cs(t,e){var r=[],s="";typeof e=="string"?e={section:e,whitespace:!1}:(e=e||{},e.whitespace=e.whitespace===!0);var i=e.whitespace?" = ":"=";return Object.keys(t).forEach(function(n,o,a){var l=t[n];l&&Array.isArray(l)?l.forEach(function(h){s+=Ue(n+"[]")+i+Ue(h)+`
|
|
6
|
-
`}):l&&typeof l=="object"?r.push(n):s+=Ue(n)+i+Ue(l)+ar}),e.section&&s.length&&(s="["+Ue(e.section)+"]"+ar+s),r.forEach(function(n,o,a){var l=Ss(n).join("\\."),h=(e.section?e.section+".":"")+l,p=Cs(t[n],{section:h,whitespace:e.whitespace});s.length&&p.length&&(s+=ar),s+=p}),s}function Ss(t){return t.replace(/\1/g,"LITERAL\\1LITERAL").replace(/\\\./g,"").split(/\./).map(function(e){return e.replace(/\1/g,"\\.").replace(/\2LITERAL\\1LITERAL\2/g,"")})}function sl(t){var e={},r=e,s=null,i=/^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i,n=t.split(/[\r\n]+/g);return n.forEach(function(o,a,l){if(!(!o||o.match(/^\s*[;#]/))){var h=o.match(i);if(h){if(h[1]!==void 0){if(s=Rt(h[1]),s==="__proto__"){r={};return}r=e[s]=e[s]||{};return}var p=Rt(h[2]);if(p!=="__proto__"){var u=h[3]?Rt(h[4]):!0;switch(u){case"true":case"false":case"null":u=JSON.parse(u)}if(p.length>2&&p.slice(-2)==="[]"){if(p=p.substring(0,p.length-2),p==="__proto__")return;r[p]?Array.isArray(r[p])||(r[p]=[r[p]]):r[p]=[]}Array.isArray(r[p])?r[p].push(u):r[p]=u}}}}),Object.keys(e).filter(function(o,a,l){if(!e[o]||typeof e[o]!="object"||Array.isArray(e[o]))return!1;var h=Ss(o),p=e,u=h.pop(),c=u.replace(/\\\./g,".");return h.forEach(function(f,A,E){f!=="__proto__"&&((!p[f]||typeof p[f]!="object")&&(p[f]={}),p=p[f])}),p===e&&c===u?!1:(p[c]=e[o],!0)}).forEach(function(o,a,l){delete e[o]}),e}function $s(t){return t.charAt(0)==='"'&&t.slice(-1)==='"'||t.charAt(0)==="'"&&t.slice(-1)==="'"}function Ue(t){return typeof t!="string"||t.match(/[=\r\n]/)||t.match(/^\[/)||t.length>1&&$s(t)||t!==t.trim()?JSON.stringify(t):t.replace(/;/g,"\\;").replace(/#/g,"\\#")}function Rt(t,e){if(t=(t||"").trim(),$s(t)){t.charAt(0)==="'"&&(t=t.substr(1,t.length-2));try{t=JSON.parse(t)}catch{}}else{for(var r=!1,s="",i=0,n=t.length;i<n;i++){var o=t.charAt(i);if(r)"\\;#".indexOf(o)!==-1?s+=o:s+="\\"+o,r=!1;else{if(";#".indexOf(o)!==-1)break;o==="\\"?r=!0:s+=o}}return r&&(s+="\\"),s.trim()}return t}});var Ns=x((lp,Is)=>{"use strict";var lr=1,Os=2;function il(){return""}function nl(t,e,r){return t.slice(e,r).replace(/\S/g," ")}Is.exports=function(t,e){e=e||{};for(var r,s,i=!1,n=!1,o=0,a="",l=e.whitespace===!1?il:nl,h=0;h<t.length;h++){if(r=t[h],s=t[h+1],!n&&r==='"'){var p=t[h-1]==="\\"&&t[h-2]!=="\\";p||(i=!i)}if(!i){if(!n&&r+s==="//")a+=t.slice(o,h),o=h,n=lr,h++;else if(n===lr&&r+s===`\r
|
|
7
|
-
`){h++,n=!1,a+=l(t,o,h),o=h;continue}else if(n===lr&&r===`
|
|
8
|
-
`)n=!1,a+=l(t,o,h),o=h;else if(!n&&r+s==="/*"){a+=t.slice(o,h),o=h,n=Os,h++;continue}else if(n===Os&&r+s==="*/"){h++,n=!1,a+=l(t,o,h+1),o=h+1;continue}}}return a+(n?l(t.substr(o)):t.substr(o))}});var Hs=x(Me=>{"use strict";var Ls=Ae("fs"),ol=vs(),Je=Ae("path"),al=Ns(),ll=Me.parse=function(t){return/^\s*{/.test(t)?JSON.parse(al(t)):ol.parse(t)},hl=Me.file=function(){var t=[].slice.call(arguments).filter(function(i){return i!=null});for(var e in t)if(typeof t[e]!="string")return;var r=Je.join.apply(null,t),s;try{return Ls.readFileSync(r,"utf-8")}catch{return}},hp=Me.json=function(){var t=hl.apply(null,arguments);return t?ll(t):null},cp=Me.env=function(t,e){e=e||process.env;var r={},s=t.length;for(var i in e)if(i.toLowerCase().indexOf(t.toLowerCase())===0){for(var n=i.substring(s).split("__"),o;(o=n.indexOf(""))>-1;)n.splice(o,1);var a=r;n.forEach(function(h,p){!h||typeof a!="object"||(p===n.length-1&&(a[h]=e[i]),a[h]===void 0&&(a[h]={}),a=a[h])})}return r},up=Me.find=function(){var t=Je.join.apply(null,[].slice.call(arguments));function e(r,s){var i=Je.join(r,s);try{return Ls.statSync(i),i}catch{if(Je.dirname(r)!==r)return e(Je.dirname(r),s)}}return e(process.cwd(),t)}});var qs=x((pp,Fs)=>{"use strict";function Ps(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function Us(t){if(t instanceof Buffer){var e=Buffer.alloc?Buffer.alloc(t.length):new Buffer(t.length);return t.copy(e),e}else{if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);throw new Error("Unexpected situation")}}function Ms(t){var e=[];return t.forEach(function(r,s){typeof r=="object"&&r!==null?Array.isArray(r)?e[s]=Ms(r):Ps(r)?e[s]=Us(r):e[s]=hr({},r):e[s]=r}),e}function Ds(t,e){return e==="__proto__"?void 0:t[e]}var hr=Fs.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var t=arguments[0],e=Array.prototype.slice.call(arguments,1),r,s,i;return e.forEach(function(n){typeof n!="object"||n===null||Array.isArray(n)||Object.keys(n).forEach(function(o){if(s=Ds(t,o),r=Ds(n,o),r!==t)if(typeof r!="object"||r===null){t[o]=r;return}else if(Array.isArray(r)){t[o]=Ms(r);return}else if(Ps(r)){t[o]=Us(r);return}else if(typeof s!="object"||s===null||Array.isArray(s)){t[o]=hr({},r);return}else{t[o]=hr(s,r);return}})}),t}});var cr=x((dp,js)=>{var et=Hs(),Fe=Ae("path").join,cl=qs(),Bs="/etc",Gs=process.platform==="win32",tt=Gs?process.env.USERPROFILE:process.env.HOME;js.exports=function(t,e,r,s){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=or()(process.argv.slice(2))),e=(typeof e=="string"?et.json(e):e)||{},s=s||et.parse;var i=et.env(t+"_"),n=[e],o=[];function a(l){if(!(o.indexOf(l)>=0)){var h=et.file(l);h&&(n.push(s(h)),o.push(l))}}return Gs||[Fe(Bs,t,"config"),Fe(Bs,t+"rc")].forEach(a),tt&&[Fe(tt,".config",t,"config"),Fe(tt,".config",t),Fe(tt,"."+t,"config"),Fe(tt,"."+t+"rc")].forEach(a),a(et.find("."+t+"rc")),i.config&&a(i.config),r.config&&a(r.config),cl.apply(null,n.concat([i,r,o.length?{configs:o,config:o[o.length-1]}:void 0]))}});var Qs=x((mp,Ys)=>{var ur=Ae("url"),Ks=bs(),ul=Ks.decodeBase64,fl=Ks.encodeBase64,zs=":_authToken",Ws=":_auth",ks=":username",Vs=":_password";Ys.exports=function(){var t,e;return arguments.length>=2?(t=arguments[0],e=arguments[1]):typeof arguments[0]=="string"?t=arguments[0]:e=arguments[0],e=e||{},e.npmrc=e.npmrc||cr()("npm",{registry:"https://registry.npmjs.org/"},{config:process.env.npm_config_userconfig||process.env.NPM_CONFIG_USERCONFIG}),t=t||e.npmrc.registry,Xs(t,e)||pl(e.npmrc)};function Xs(t,e){for(var r=ur.parse(t,!1,!0),s;s!=="/"&&r.pathname!==s;){s=r.pathname||"/";var i="//"+r.host+s.replace(/\/$/,""),n=ml(i,e.npmrc);if(n)return n;if(!e.recursive)return/\/$/.test(t)?void 0:Xs(ur.resolve(t,"."),e);r.pathname=ur.resolve(dl(s),"..")||"/"}}function pl(t){if(t._auth){var e=xt(t._auth);return{token:e,type:"Basic"}}}function dl(t){return t[t.length-1]==="/"?t:t+"/"}function ml(t,e){var r=gl(e[t+zs]||e[t+"/"+zs]);if(r)return r;var s=e[t+ks]||e[t+"/"+ks],i=e[t+Vs]||e[t+"/"+Vs],n=El(s,i);if(n)return n;var o=Al(e[t+Ws]||e[t+"/"+Ws]);if(o)return o}function xt(t){return t.replace(/^\$\{?([^}]*)\}?$/,function(e,r){return process.env[r]})}function gl(t){if(t){var e=xt(t);return{token:e,type:"Bearer"}}}function El(t,e){if(!(!t||!e)){var r=ul(xt(e)),s=fl(t+":"+r);return{token:s,type:"Basic",password:r,username:t}}}function Al(t){if(t){var e=xt(t);return{token:e,type:"Basic"}}}});var rt=x((gp,Zs)=>{var Rl="2.0.0",xl=Number.MAX_SAFE_INTEGER||9007199254740991,yl=16;Zs.exports={SEMVER_SPEC_VERSION:Rl,MAX_LENGTH:256,MAX_SAFE_INTEGER:xl,MAX_SAFE_COMPONENT_LENGTH:yl}});var st=x((Ep,Js)=>{var wl=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Js.exports=wl});var $e=x((_e,ei)=>{var{MAX_SAFE_COMPONENT_LENGTH:fr}=rt(),_l=st();_e=ei.exports={};var Tl=_e.re=[],_=_e.src=[],T=_e.t={},bl=0,H=(t,e,r)=>{let s=bl++;_l(t,s,e),T[t]=s,_[s]=e,Tl[s]=new RegExp(e,r?"g":void 0)};H("NUMERICIDENTIFIER","0|[1-9]\\d*");H("NUMERICIDENTIFIERLOOSE","[0-9]+");H("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");H("MAINVERSION",`(${_[T.NUMERICIDENTIFIER]})\\.(${_[T.NUMERICIDENTIFIER]})\\.(${_[T.NUMERICIDENTIFIER]})`);H("MAINVERSIONLOOSE",`(${_[T.NUMERICIDENTIFIERLOOSE]})\\.(${_[T.NUMERICIDENTIFIERLOOSE]})\\.(${_[T.NUMERICIDENTIFIERLOOSE]})`);H("PRERELEASEIDENTIFIER",`(?:${_[T.NUMERICIDENTIFIER]}|${_[T.NONNUMERICIDENTIFIER]})`);H("PRERELEASEIDENTIFIERLOOSE",`(?:${_[T.NUMERICIDENTIFIERLOOSE]}|${_[T.NONNUMERICIDENTIFIER]})`);H("PRERELEASE",`(?:-(${_[T.PRERELEASEIDENTIFIER]}(?:\\.${_[T.PRERELEASEIDENTIFIER]})*))`);H("PRERELEASELOOSE",`(?:-?(${_[T.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_[T.PRERELEASEIDENTIFIERLOOSE]})*))`);H("BUILDIDENTIFIER","[0-9A-Za-z-]+");H("BUILD",`(?:\\+(${_[T.BUILDIDENTIFIER]}(?:\\.${_[T.BUILDIDENTIFIER]})*))`);H("FULLPLAIN",`v?${_[T.MAINVERSION]}${_[T.PRERELEASE]}?${_[T.BUILD]}?`);H("FULL",`^${_[T.FULLPLAIN]}$`);H("LOOSEPLAIN",`[v=\\s]*${_[T.MAINVERSIONLOOSE]}${_[T.PRERELEASELOOSE]}?${_[T.BUILD]}?`);H("LOOSE",`^${_[T.LOOSEPLAIN]}$`);H("GTLT","((?:<|>)?=?)");H("XRANGEIDENTIFIERLOOSE",`${_[T.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);H("XRANGEIDENTIFIER",`${_[T.NUMERICIDENTIFIER]}|x|X|\\*`);H("XRANGEPLAIN",`[v=\\s]*(${_[T.XRANGEIDENTIFIER]})(?:\\.(${_[T.XRANGEIDENTIFIER]})(?:\\.(${_[T.XRANGEIDENTIFIER]})(?:${_[T.PRERELEASE]})?${_[T.BUILD]}?)?)?`);H("XRANGEPLAINLOOSE",`[v=\\s]*(${_[T.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[T.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[T.XRANGEIDENTIFIERLOOSE]})(?:${_[T.PRERELEASELOOSE]})?${_[T.BUILD]}?)?)?`);H("XRANGE",`^${_[T.GTLT]}\\s*${_[T.XRANGEPLAIN]}$`);H("XRANGELOOSE",`^${_[T.GTLT]}\\s*${_[T.XRANGEPLAINLOOSE]}$`);H("COERCE",`(^|[^\\d])(\\d{1,${fr}})(?:\\.(\\d{1,${fr}}))?(?:\\.(\\d{1,${fr}}))?(?:$|[^\\d])`);H("COERCERTL",_[T.COERCE],!0);H("LONETILDE","(?:~>?)");H("TILDETRIM",`(\\s*)${_[T.LONETILDE]}\\s+`,!0);_e.tildeTrimReplace="$1~";H("TILDE",`^${_[T.LONETILDE]}${_[T.XRANGEPLAIN]}$`);H("TILDELOOSE",`^${_[T.LONETILDE]}${_[T.XRANGEPLAINLOOSE]}$`);H("LONECARET","(?:\\^)");H("CARETTRIM",`(\\s*)${_[T.LONECARET]}\\s+`,!0);_e.caretTrimReplace="$1^";H("CARET",`^${_[T.LONECARET]}${_[T.XRANGEPLAIN]}$`);H("CARETLOOSE",`^${_[T.LONECARET]}${_[T.XRANGEPLAINLOOSE]}$`);H("COMPARATORLOOSE",`^${_[T.GTLT]}\\s*(${_[T.LOOSEPLAIN]})$|^$`);H("COMPARATOR",`^${_[T.GTLT]}\\s*(${_[T.FULLPLAIN]})$|^$`);H("COMPARATORTRIM",`(\\s*)${_[T.GTLT]}\\s*(${_[T.LOOSEPLAIN]}|${_[T.XRANGEPLAIN]})`,!0);_e.comparatorTrimReplace="$1$2$3";H("HYPHENRANGE",`^\\s*(${_[T.XRANGEPLAIN]})\\s+-\\s+(${_[T.XRANGEPLAIN]})\\s*$`);H("HYPHENRANGELOOSE",`^\\s*(${_[T.XRANGEPLAINLOOSE]})\\s+-\\s+(${_[T.XRANGEPLAINLOOSE]})\\s*$`);H("STAR","(<|>)?=?\\s*\\*");H("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");H("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var it=x((Ap,ti)=>{var Cl=["includePrerelease","loose","rtl"],Sl=t=>t?typeof t!="object"?{loose:!0}:Cl.filter(e=>t[e]).reduce((e,r)=>(e[r]=!0,e),{}):{};ti.exports=Sl});var pr=x((Rp,ii)=>{var ri=/^[0-9]+$/,si=(t,e)=>{let r=ri.test(t),s=ri.test(e);return r&&s&&(t=+t,e=+e),t===e?0:r&&!s?-1:s&&!r?1:t<e?-1:1},$l=(t,e)=>si(e,t);ii.exports={compareIdentifiers:si,rcompareIdentifiers:$l}});var re=x((xp,li)=>{var yt=st(),{MAX_LENGTH:ni,MAX_SAFE_INTEGER:wt}=rt(),{re:oi,t:ai}=$e(),vl=it(),{compareIdentifiers:qe}=pr(),dr=class t{constructor(e,r){if(r=vl(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>ni)throw new TypeError(`version is longer than ${ni} characters`);yt("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let s=e.trim().match(r.loose?oi[ai.LOOSE]:oi[ai.FULL]);if(!s)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>wt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>wt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>wt||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){let n=+i;if(n>=0&&n<wt)return n}return i}):this.prerelease=[],this.build=s[5]?s[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(yt("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),qe(this.major,e.major)||qe(this.minor,e.minor)||qe(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(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 r=0;do{let s=this.prerelease[r],i=e.prerelease[r];if(yt("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return qe(s,i)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let s=this.build[r],i=e.build[r];if(yt("prerelease compare",r,s,i),s===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(s===void 0)return-1;if(s===i)continue;return qe(s,i)}while(++r)}inc(e,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r),this.inc("pre",r);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r),this.inc("pre",r);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":if(this.prerelease.length===0)this.prerelease=[0];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);s===-1&&this.prerelease.push(0)}r&&(qe(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=[r,0]):this.prerelease=[r,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};li.exports=dr});var ve=x((yp,fi)=>{var{MAX_LENGTH:Ol}=rt(),{re:hi,t:ci}=$e(),ui=re(),Il=it(),Nl=(t,e)=>{if(e=Il(e),t instanceof ui)return t;if(typeof t!="string"||t.length>Ol||!(e.loose?hi[ci.LOOSE]:hi[ci.FULL]).test(t))return null;try{return new ui(t,e)}catch{return null}};fi.exports=Nl});var di=x((wp,pi)=>{var Ll=ve(),Hl=(t,e)=>{let r=Ll(t,e);return r?r.version:null};pi.exports=Hl});var gi=x((_p,mi)=>{var Dl=ve(),Pl=(t,e)=>{let r=Dl(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};mi.exports=Pl});var Ri=x((Tp,Ai)=>{var Ei=re(),Ul=(t,e,r,s)=>{typeof r=="string"&&(s=r,r=void 0);try{return new Ei(t instanceof Ei?t.version:t,r).inc(e,s).version}catch{return null}};Ai.exports=Ul});var he=x((bp,yi)=>{var xi=re(),Ml=(t,e,r)=>new xi(t,r).compare(new xi(e,r));yi.exports=Ml});var _t=x((Cp,wi)=>{var Fl=he(),ql=(t,e,r)=>Fl(t,e,r)===0;wi.exports=ql});var bi=x((Sp,Ti)=>{var _i=ve(),Bl=_t(),Gl=(t,e)=>{if(Bl(t,e))return null;{let r=_i(t),s=_i(e),i=r.prerelease.length||s.prerelease.length,n=i?"pre":"",o=i?"prerelease":"";for(let a in r)if((a==="major"||a==="minor"||a==="patch")&&r[a]!==s[a])return n+a;return o}};Ti.exports=Gl});var Si=x(($p,Ci)=>{var jl=re(),zl=(t,e)=>new jl(t,e).major;Ci.exports=zl});var vi=x((vp,$i)=>{var Wl=re(),kl=(t,e)=>new Wl(t,e).minor;$i.exports=kl});var Ii=x((Op,Oi)=>{var Vl=re(),Kl=(t,e)=>new Vl(t,e).patch;Oi.exports=Kl});var Li=x((Ip,Ni)=>{var Xl=ve(),Yl=(t,e)=>{let r=Xl(t,e);return r&&r.prerelease.length?r.prerelease:null};Ni.exports=Yl});var Di=x((Np,Hi)=>{var Ql=he(),Zl=(t,e,r)=>Ql(e,t,r);Hi.exports=Zl});var Ui=x((Lp,Pi)=>{var Jl=he(),eh=(t,e)=>Jl(t,e,!0);Pi.exports=eh});var Tt=x((Hp,Fi)=>{var Mi=re(),th=(t,e,r)=>{let s=new Mi(t,r),i=new Mi(e,r);return s.compare(i)||s.compareBuild(i)};Fi.exports=th});var Bi=x((Dp,qi)=>{var rh=Tt(),sh=(t,e)=>t.sort((r,s)=>rh(r,s,e));qi.exports=sh});var ji=x((Pp,Gi)=>{var ih=Tt(),nh=(t,e)=>t.sort((r,s)=>ih(s,r,e));Gi.exports=nh});var nt=x((Up,zi)=>{var oh=he(),ah=(t,e,r)=>oh(t,e,r)>0;zi.exports=ah});var bt=x((Mp,Wi)=>{var lh=he(),hh=(t,e,r)=>lh(t,e,r)<0;Wi.exports=hh});var mr=x((Fp,ki)=>{var ch=he(),uh=(t,e,r)=>ch(t,e,r)!==0;ki.exports=uh});var Ct=x((qp,Vi)=>{var fh=he(),ph=(t,e,r)=>fh(t,e,r)>=0;Vi.exports=ph});var St=x((Bp,Ki)=>{var dh=he(),mh=(t,e,r)=>dh(t,e,r)<=0;Ki.exports=mh});var gr=x((Gp,Xi)=>{var gh=_t(),Eh=mr(),Ah=nt(),Rh=Ct(),xh=bt(),yh=St(),wh=(t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return gh(t,r,s);case"!=":return Eh(t,r,s);case">":return Ah(t,r,s);case">=":return Rh(t,r,s);case"<":return xh(t,r,s);case"<=":return yh(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}};Xi.exports=wh});var Qi=x((jp,Yi)=>{var _h=re(),Th=ve(),{re:$t,t:vt}=$e(),bh=(t,e)=>{if(t instanceof _h)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match($t[vt.COERCE]);else{let s;for(;(s=$t[vt.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||s.index+s[0].length!==r.index+r[0].length)&&(r=s),$t[vt.COERCERTL].lastIndex=s.index+s[1].length+s[2].length;$t[vt.COERCERTL].lastIndex=-1}return r===null?null:Th(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};Yi.exports=bh});var Ji=x((zp,Zi)=>{"use strict";Zi.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var tn=x((Wp,en)=>{"use strict";en.exports=G;G.Node=Oe;G.create=G;function G(t){var e=this;if(e instanceof G||(e=new G),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,s=arguments.length;r<s;r++)e.push(arguments[r]);return e}G.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};G.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};G.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};G.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)Sh(this,arguments[t]);return this.length};G.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)$h(this,arguments[t]);return this.length};G.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};G.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};G.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,s=0;r!==null;s++)t.call(e,r.value,s,this),r=r.next};G.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,s=this.length-1;r!==null;s--)t.call(e,r.value,s,this),r=r.prev};G.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};G.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};G.prototype.map=function(t,e){e=e||this;for(var r=new G,s=this.head;s!==null;)r.push(t.call(e,s.value,this)),s=s.next;return r};G.prototype.mapReverse=function(t,e){e=e||this;for(var r=new G,s=this.tail;s!==null;)r.push(t.call(e,s.value,this)),s=s.prev;return r};G.prototype.reduce=function(t,e){var r,s=this.head;if(arguments.length>1)r=e;else if(this.head)s=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;s!==null;i++)r=t(r,s.value,i),s=s.next;return r};G.prototype.reduceReverse=function(t,e){var r,s=this.tail;if(arguments.length>1)r=e;else if(this.tail)s=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;s!==null;i--)r=t(r,s.value,i),s=s.prev;return r};G.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};G.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};G.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new G;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=0,i=this.head;i!==null&&s<t;s++)i=i.next;for(;i!==null&&s<e;s++,i=i.next)r.push(i.value);return r};G.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new G;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var s=this.length,i=this.tail;i!==null&&s>e;s--)i=i.prev;for(;i!==null&&s>t;s--,i=i.prev)r.push(i.value);return r};G.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var s=0,i=this.head;i!==null&&s<t;s++)i=i.next;for(var n=[],s=0;i&&s<e;s++)n.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var s=0;s<r.length;s++)i=Ch(this,i,r[s]);return n};G.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var s=r.prev;r.prev=r.next,r.next=s}return this.head=e,this.tail=t,this};function Ch(t,e,r){var s=e===t.head?new Oe(r,null,e,t):new Oe(r,e,e.next,t);return s.next===null&&(t.tail=s),s.prev===null&&(t.head=s),t.length++,s}function Sh(t,e){t.tail=new Oe(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function $h(t,e){t.head=new Oe(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function Oe(t,e,r,s){if(!(this instanceof Oe))return new Oe(t,e,r,s);this.list=s,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{Ji()(G)}catch{}});var an=x((kp,on)=>{"use strict";var vh=tn(),Ie=Symbol("max"),xe=Symbol("length"),Be=Symbol("lengthCalculator"),at=Symbol("allowStale"),Ne=Symbol("maxAge"),Re=Symbol("dispose"),rn=Symbol("noDisposeOnSet"),te=Symbol("lruList"),pe=Symbol("cache"),nn=Symbol("updateAgeOnGet"),Er=()=>1,Rr=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let r=this[Ie]=e.max||1/0,s=e.length||Er;if(this[Be]=typeof s!="function"?Er:s,this[at]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ne]=e.maxAge||0,this[Re]=e.dispose,this[rn]=e.noDisposeOnSet||!1,this[nn]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Ie]=e||1/0,ot(this)}get max(){return this[Ie]}set allowStale(e){this[at]=!!e}get allowStale(){return this[at]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Ne]=e,ot(this)}get maxAge(){return this[Ne]}set lengthCalculator(e){typeof e!="function"&&(e=Er),e!==this[Be]&&(this[Be]=e,this[xe]=0,this[te].forEach(r=>{r.length=this[Be](r.value,r.key),this[xe]+=r.length})),ot(this)}get lengthCalculator(){return this[Be]}get length(){return this[xe]}get itemCount(){return this[te].length}rforEach(e,r){r=r||this;for(let s=this[te].tail;s!==null;){let i=s.prev;sn(this,e,s,r),s=i}}forEach(e,r){r=r||this;for(let s=this[te].head;s!==null;){let i=s.next;sn(this,e,s,r),s=i}}keys(){return this[te].toArray().map(e=>e.key)}values(){return this[te].toArray().map(e=>e.value)}reset(){this[Re]&&this[te]&&this[te].length&&this[te].forEach(e=>this[Re](e.key,e.value)),this[pe]=new Map,this[te]=new vh,this[xe]=0}dump(){return this[te].map(e=>Ot(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[te]}set(e,r,s){if(s=s||this[Ne],s&&typeof s!="number")throw new TypeError("maxAge must be a number");let i=s?Date.now():0,n=this[Be](r,e);if(this[pe].has(e)){if(n>this[Ie])return Ge(this,this[pe].get(e)),!1;let l=this[pe].get(e).value;return this[Re]&&(this[rn]||this[Re](e,l.value)),l.now=i,l.maxAge=s,l.value=r,this[xe]+=n-l.length,l.length=n,this.get(e),ot(this),!0}let o=new xr(e,r,n,i,s);return o.length>this[Ie]?(this[Re]&&this[Re](e,r),!1):(this[xe]+=o.length,this[te].unshift(o),this[pe].set(e,this[te].head),ot(this),!0)}has(e){if(!this[pe].has(e))return!1;let r=this[pe].get(e).value;return!Ot(this,r)}get(e){return Ar(this,e,!0)}peek(e){return Ar(this,e,!1)}pop(){let e=this[te].tail;return e?(Ge(this,e),e.value):null}del(e){Ge(this,this[pe].get(e))}load(e){this.reset();let r=Date.now();for(let s=e.length-1;s>=0;s--){let i=e[s],n=i.e||0;if(n===0)this.set(i.k,i.v);else{let o=n-r;o>0&&this.set(i.k,i.v,o)}}}prune(){this[pe].forEach((e,r)=>Ar(this,r,!1))}},Ar=(t,e,r)=>{let s=t[pe].get(e);if(s){let i=s.value;if(Ot(t,i)){if(Ge(t,s),!t[at])return}else r&&(t[nn]&&(s.value.now=Date.now()),t[te].unshiftNode(s));return i.value}},Ot=(t,e)=>{if(!e||!e.maxAge&&!t[Ne])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Ne]&&r>t[Ne]},ot=t=>{if(t[xe]>t[Ie])for(let e=t[te].tail;t[xe]>t[Ie]&&e!==null;){let r=e.prev;Ge(t,e),e=r}},Ge=(t,e)=>{if(e){let r=e.value;t[Re]&&t[Re](r.key,r.value),t[xe]-=r.length,t[pe].delete(r.key),t[te].removeNode(e)}},xr=class{constructor(e,r,s,i,n){this.key=e,this.value=r,this.length=s,this.now=i,this.maxAge=n||0}},sn=(t,e,r,s)=>{let i=r.value;Ot(t,i)&&(Ge(t,r),t[at]||(i=void 0)),i&&e.call(s,i.value,i.key,t)};on.exports=Rr});var ce=x((Vp,un)=>{var yr=class t{constructor(e,r){if(r=Ih(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof wr)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e,this.set=e.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(i=>!hn(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&Ph(i[0])){this.set=[i];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let s=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=ln.get(s);if(i)return i;let n=this.options.loose,o=n?oe[ie.HYPHENRANGELOOSE]:oe[ie.HYPHENRANGE];e=e.replace(o,kh(this.options.includePrerelease)),K("hyphen replace",e),e=e.replace(oe[ie.COMPARATORTRIM],Lh),K("comparator trim",e),e=e.replace(oe[ie.TILDETRIM],Hh),e=e.replace(oe[ie.CARETTRIM],Dh),e=e.split(/\s+/).join(" ");let a=e.split(" ").map(u=>Uh(u,this.options)).join(" ").split(/\s+/).map(u=>Wh(u,this.options));n&&(a=a.filter(u=>(K("loose invalid filter",u,this.options),!!u.match(oe[ie.COMPARATORLOOSE])))),K("range list",a);let l=new Map,h=a.map(u=>new wr(u,this.options));for(let u of h){if(hn(u))return[u];l.set(u.value,u)}l.size>1&&l.has("")&&l.delete("");let p=[...l.values()];return ln.set(s,p),p}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>cn(s,r)&&e.set.some(i=>cn(i,r)&&s.every(n=>i.every(o=>n.intersects(o,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Nh(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Vh(this.set[r],e,this.options))return!0;return!1}};un.exports=yr;var Oh=an(),ln=new Oh({max:1e3}),Ih=it(),wr=lt(),K=st(),Nh=re(),{re:oe,t:ie,comparatorTrimReplace:Lh,tildeTrimReplace:Hh,caretTrimReplace:Dh}=$e(),hn=t=>t.value==="<0.0.0-0",Ph=t=>t.value==="",cn=(t,e)=>{let r=!0,s=t.slice(),i=s.pop();for(;r&&s.length;)r=s.every(n=>i.intersects(n,e)),i=s.pop();return r},Uh=(t,e)=>(K("comp",t,e),t=qh(t,e),K("caret",t),t=Mh(t,e),K("tildes",t),t=Gh(t,e),K("xrange",t),t=zh(t,e),K("stars",t),t),ne=t=>!t||t.toLowerCase()==="x"||t==="*",Mh=(t,e)=>t.trim().split(/\s+/).map(r=>Fh(r,e)).join(" "),Fh=(t,e)=>{let r=e.loose?oe[ie.TILDELOOSE]:oe[ie.TILDE];return t.replace(r,(s,i,n,o,a)=>{K("tilde",t,s,i,n,o,a);let l;return ne(i)?l="":ne(n)?l=`>=${i}.0.0 <${+i+1}.0.0-0`:ne(o)?l=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:a?(K("replaceTilde pr",a),l=`>=${i}.${n}.${o}-${a} <${i}.${+n+1}.0-0`):l=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,K("tilde return",l),l})},qh=(t,e)=>t.trim().split(/\s+/).map(r=>Bh(r,e)).join(" "),Bh=(t,e)=>{K("caret",t,e);let r=e.loose?oe[ie.CARETLOOSE]:oe[ie.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(i,n,o,a,l)=>{K("caret",t,i,n,o,a,l);let h;return ne(n)?h="":ne(o)?h=`>=${n}.0.0${s} <${+n+1}.0.0-0`:ne(a)?n==="0"?h=`>=${n}.${o}.0${s} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.0${s} <${+n+1}.0.0-0`:l?(K("replaceCaret pr",l),n==="0"?o==="0"?h=`>=${n}.${o}.${a}-${l} <${n}.${o}.${+a+1}-0`:h=`>=${n}.${o}.${a}-${l} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.${a}-${l} <${+n+1}.0.0-0`):(K("no pr"),n==="0"?o==="0"?h=`>=${n}.${o}.${a}${s} <${n}.${o}.${+a+1}-0`:h=`>=${n}.${o}.${a}${s} <${n}.${+o+1}.0-0`:h=`>=${n}.${o}.${a} <${+n+1}.0.0-0`),K("caret return",h),h})},Gh=(t,e)=>(K("replaceXRanges",t,e),t.split(/\s+/).map(r=>jh(r,e)).join(" ")),jh=(t,e)=>{t=t.trim();let r=e.loose?oe[ie.XRANGELOOSE]:oe[ie.XRANGE];return t.replace(r,(s,i,n,o,a,l)=>{K("xRange",t,s,i,n,o,a,l);let h=ne(n),p=h||ne(o),u=p||ne(a),c=u;return i==="="&&c&&(i=""),l=e.includePrerelease?"-0":"",h?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&c?(p&&(o=0),a=0,i===">"?(i=">=",p?(n=+n+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",p?n=+n+1:o=+o+1),i==="<"&&(l="-0"),s=`${i+n}.${o}.${a}${l}`):p?s=`>=${n}.0.0${l} <${+n+1}.0.0-0`:u&&(s=`>=${n}.${o}.0${l} <${n}.${+o+1}.0-0`),K("xRange return",s),s})},zh=(t,e)=>(K("replaceStars",t,e),t.trim().replace(oe[ie.STAR],"")),Wh=(t,e)=>(K("replaceGTE0",t,e),t.trim().replace(oe[e.includePrerelease?ie.GTE0PRE:ie.GTE0],"")),kh=t=>(e,r,s,i,n,o,a,l,h,p,u,c,f)=>(ne(s)?r="":ne(i)?r=`>=${s}.0.0${t?"-0":""}`:ne(n)?r=`>=${s}.${i}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,ne(h)?l="":ne(p)?l=`<${+h+1}.0.0-0`:ne(u)?l=`<${h}.${+p+1}.0-0`:c?l=`<=${h}.${p}.${u}-${c}`:t?l=`<${h}.${p}.${+u+1}-0`:l=`<=${l}`,`${r} ${l}`.trim()),Vh=(t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if(K(t[s].semver),t[s].semver!==wr.ANY&&t[s].semver.prerelease.length>0){let i=t[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0}});var lt=x((Kp,gn)=>{var ht=Symbol("SemVer ANY"),br=class t{static get ANY(){return ht}constructor(e,r){if(r=Kh(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}Tr("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===ht?this.value="":this.value=this.operator+this.semver.version,Tr("comp",this)}parse(e){let r=this.options.loose?fn[pn.COMPARATORLOOSE]:fn[pn.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new dn(s[2],this.options.loose):this.semver=ht}toString(){return this.value}test(e){if(Tr("Comparator.test",e,this.options.loose),this.semver===ht||e===ht)return!0;if(typeof e=="string")try{e=new dn(e,this.options)}catch{return!1}return _r(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");if((!r||typeof r!="object")&&(r={loose:!!r,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new mn(e.value,r).test(this.value);if(e.operator==="")return e.value===""?!0:new mn(this.value,r).test(e.semver);let s=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),i=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),n=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=_r(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=_r(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return s||i||n&&o||a||l}};gn.exports=br;var Kh=it(),{re:fn,t:pn}=$e(),_r=gr(),Tr=st(),dn=re(),mn=ce()});var ct=x((Xp,En)=>{var Xh=ce(),Yh=(t,e,r)=>{try{e=new Xh(e,r)}catch{return!1}return e.test(t)};En.exports=Yh});var Rn=x((Yp,An)=>{var Qh=ce(),Zh=(t,e)=>new Qh(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));An.exports=Zh});var yn=x((Qp,xn)=>{var Jh=re(),ec=ce(),tc=(t,e,r)=>{let s=null,i=null,n=null;try{n=new ec(e,r)}catch{return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===-1)&&(s=o,i=new Jh(s,r))}),s};xn.exports=tc});var _n=x((Zp,wn)=>{var rc=re(),sc=ce(),ic=(t,e,r)=>{let s=null,i=null,n=null;try{n=new sc(e,r)}catch{return null}return t.forEach(o=>{n.test(o)&&(!s||i.compare(o)===1)&&(s=o,i=new rc(s,r))}),s};wn.exports=ic});var Cn=x((Jp,bn)=>{var Cr=re(),nc=ce(),Tn=nt(),oc=(t,e)=>{t=new nc(t,e);let r=new Cr("0.0.0");if(t.test(r)||(r=new Cr("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let i=t.set[s],n=null;i.forEach(o=>{let a=new Cr(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!n||Tn(a,n))&&(n=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),n&&(!r||Tn(r,n))&&(r=n)}return r&&t.test(r)?r:null};bn.exports=oc});var $n=x((ed,Sn)=>{var ac=ce(),lc=(t,e)=>{try{return new ac(t,e).range||"*"}catch{return null}};Sn.exports=lc});var It=x((td,Nn)=>{var hc=re(),In=lt(),{ANY:cc}=In,uc=ce(),fc=ct(),vn=nt(),On=bt(),pc=St(),dc=Ct(),mc=(t,e,r,s)=>{t=new hc(t,s),e=new uc(e,s);let i,n,o,a,l;switch(r){case">":i=vn,n=pc,o=On,a=">",l=">=";break;case"<":i=On,n=dc,o=vn,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(fc(t,e,s))return!1;for(let h=0;h<e.set.length;++h){let p=e.set[h],u=null,c=null;if(p.forEach(f=>{f.semver===cc&&(f=new In(">=0.0.0")),u=u||f,c=c||f,i(f.semver,u.semver,s)?u=f:o(f.semver,c.semver,s)&&(c=f)}),u.operator===a||u.operator===l||(!c.operator||c.operator===a)&&n(t,c.semver))return!1;if(c.operator===l&&o(t,c.semver))return!1}return!0};Nn.exports=mc});var Hn=x((rd,Ln)=>{var gc=It(),Ec=(t,e,r)=>gc(t,e,">",r);Ln.exports=Ec});var Pn=x((sd,Dn)=>{var Ac=It(),Rc=(t,e,r)=>Ac(t,e,"<",r);Dn.exports=Rc});var Fn=x((id,Mn)=>{var Un=ce(),xc=(t,e,r)=>(t=new Un(t,r),e=new Un(e,r),t.intersects(e));Mn.exports=xc});var Bn=x((nd,qn)=>{var yc=ct(),wc=he();qn.exports=(t,e,r)=>{let s=[],i=null,n=null,o=t.sort((p,u)=>wc(p,u,r));for(let p of o)yc(p,e,r)?(n=p,i||(i=p)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let a=[];for(let[p,u]of s)p===u?a.push(p):!u&&p===o[0]?a.push("*"):u?p===o[0]?a.push(`<=${u}`):a.push(`${p} - ${u}`):a.push(`>=${p}`);let l=a.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return l.length<h.length?l:e}});var kn=x((od,Wn)=>{var Gn=ce(),Nt=lt(),{ANY:Sr}=Nt,ut=ct(),$r=he(),_c=(t,e,r={})=>{if(t===e)return!0;t=new Gn(t,r),e=new Gn(e,r);let s=!1;e:for(let i of t.set){for(let n of e.set){let o=Tc(i,n,r);if(s=s||o!==null,o)continue e}if(s)return!1}return!0},Tc=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Sr){if(e.length===1&&e[0].semver===Sr)return!0;r.includePrerelease?t=[new Nt(">=0.0.0-0")]:t=[new Nt(">=0.0.0")]}if(e.length===1&&e[0].semver===Sr){if(r.includePrerelease)return!0;e=[new Nt(">=0.0.0")]}let s=new Set,i,n;for(let f of t)f.operator===">"||f.operator===">="?i=jn(i,f,r):f.operator==="<"||f.operator==="<="?n=zn(n,f,r):s.add(f.semver);if(s.size>1)return null;let o;if(i&&n){if(o=$r(i.semver,n.semver,r),o>0)return null;if(o===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let f of s){if(i&&!ut(f,String(i),r)||n&&!ut(f,String(n),r))return null;for(let A of e)if(!ut(f,String(A),r))return!1;return!0}let a,l,h,p,u=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,c=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;u&&u.prerelease.length===1&&n.operator==="<"&&u.prerelease[0]===0&&(u=!1);for(let f of e){if(p=p||f.operator===">"||f.operator===">=",h=h||f.operator==="<"||f.operator==="<=",i){if(c&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===c.major&&f.semver.minor===c.minor&&f.semver.patch===c.patch&&(c=!1),f.operator===">"||f.operator===">="){if(a=jn(i,f,r),a===f&&a!==i)return!1}else if(i.operator===">="&&!ut(i.semver,String(f),r))return!1}if(n){if(u&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===u.major&&f.semver.minor===u.minor&&f.semver.patch===u.patch&&(u=!1),f.operator==="<"||f.operator==="<="){if(l=zn(n,f,r),l===f&&l!==n)return!1}else if(n.operator==="<="&&!ut(n.semver,String(f),r))return!1}if(!f.operator&&(n||i)&&o!==0)return!1}return!(i&&h&&!n&&o!==0||n&&p&&!i&&o!==0||c||u)},jn=(t,e,r)=>{if(!t)return e;let s=$r(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},zn=(t,e,r)=>{if(!t)return e;let s=$r(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Wn.exports=_c});var Xn=x((ad,Kn)=>{var vr=$e(),bc=rt(),Cc=re(),Vn=pr(),Sc=ve(),$c=di(),vc=gi(),Oc=Ri(),Ic=bi(),Nc=Si(),Lc=vi(),Hc=Ii(),Dc=Li(),Pc=he(),Uc=Di(),Mc=Ui(),Fc=Tt(),qc=Bi(),Bc=ji(),Gc=nt(),jc=bt(),zc=_t(),Wc=mr(),kc=Ct(),Vc=St(),Kc=gr(),Xc=Qi(),Yc=lt(),Qc=ce(),Zc=ct(),Jc=Rn(),eu=yn(),tu=_n(),ru=Cn(),su=$n(),iu=It(),nu=Hn(),ou=Pn(),au=Fn(),lu=Bn(),hu=kn();Kn.exports={parse:Sc,valid:$c,clean:vc,inc:Oc,diff:Ic,major:Nc,minor:Lc,patch:Hc,prerelease:Dc,compare:Pc,rcompare:Uc,compareLoose:Mc,compareBuild:Fc,sort:qc,rsort:Bc,gt:Gc,lt:jc,eq:zc,neq:Wc,gte:kc,lte:Vc,cmp:Kc,coerce:Xc,Comparator:Yc,Range:Qc,satisfies:Zc,toComparators:Jc,maxSatisfying:eu,minSatisfying:tu,minVersion:ru,validRange:su,outside:iu,gtr:nu,ltr:ou,intersects:au,simplifyRange:lu,subset:hu,SemVer:Cc,re:vr.re,src:vr.src,tokens:vr.t,SEMVER_SPEC_VERSION:bc.SEMVER_SPEC_VERSION,compareIdentifiers:Vn.compareIdentifiers,rcompareIdentifiers:Vn.rcompareIdentifiers}});var eo=x((ld,Jn)=>{Jn.exports=function(t,e){e||(e={});var r=e.hsep===void 0?" ":e.hsep,s=e.align||[],i=e.stringLength||function(l){return String(l).length},n=Qn(t,function(l,h){return Zn(h,function(p,u){var c=Yn(p);(!l[u]||c>l[u])&&(l[u]=c)}),l},[]),o=Lt(t,function(l){return Lt(l,function(h,p){var u=String(h);if(s[p]==="."){var c=Yn(u),f=n[p]+(/\./.test(u)?1:2)-(i(u)-c);return u+Array(f).join(" ")}else return u})}),a=Qn(o,function(l,h){return Zn(h,function(p,u){var c=i(p);(!l[u]||c>l[u])&&(l[u]=c)}),l},[]);return Lt(o,function(l){return Lt(l,function(h,p){var u=a[p]-i(h)||0,c=Array(Math.max(u+1,1)).join(" ");return s[p]==="r"||s[p]==="."?c+h:s[p]==="c"?Array(Math.ceil(u/2+1)).join(" ")+h+Array(Math.floor(u/2+1)).join(" "):h+c}).join(r).replace(/\s+$/,"")}).join(`
|
|
9
|
-
`)};function Yn(t){var e=/\.[^.]*$/.exec(t);return e?e.index+1:t.length}function Qn(t,e,r){if(t.reduce)return t.reduce(e,r);for(var s=0,i=arguments.length>=3?r:t[s++];s<t.length;s++)e(i,t[s],s);return i}function Zn(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e.call(t,t[r],r)}function Lt(t,e){if(t.map)return t.map(e);for(var r=[],s=0;s<t.length;s++)r.push(e.call(t,t[s],s));return r}});var no=x(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.LRUCache=void 0;var je=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ro=new Set,Or=typeof process=="object"&&process?process:{},so=(t,e,r,s)=>{typeof Or.emitWarning=="function"?Or.emitWarning(t,e,r,s):console.error(`[${r}] ${e}: ${t}`)},Ht=globalThis.AbortController,to=globalThis.AbortSignal;if(typeof Ht>"u"){to=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,i){this._onabort.push(i)}},Ht=class{constructor(){e()}signal=new to;abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let i of this.signal._onabort)i(s);this.signal.onabort?.(s)}}};let t=Or.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,so("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))}}var cu=t=>!ro.has(t),ud=Symbol("type"),Te=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),io=t=>Te(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?ze:null:null,ze=class extends Array{constructor(e){super(e),this.fill(0)}},Ir=class t{heap;length;static#s=!1;static create(e){let r=io(e);if(!r)return[];t.#s=!0;let s=new t(e,r);return t.#s=!1,s}constructor(e,r){if(!t.#s)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Nr=class t{#s;#r;#e;#f;#T;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#m;#i;#n;#t;#h;#p;#c;#l;#A;#u;#R;#x;#g;#y;#C;#d;static unsafeExposeInternals(e){return{starts:e.#x,ttls:e.#g,sizes:e.#R,keyMap:e.#i,keyList:e.#n,valList:e.#t,next:e.#h,prev:e.#p,get head(){return e.#c},get tail(){return e.#l},free:e.#A,isBackgroundFetch:r=>e.#o(r),backgroundFetch:(r,s,i,n)=>e.#N(r,s,i,n),moveToTail:r=>e.#v(r),indexes:r=>e.#w(r),rindexes:r=>e.#_(r),isStale:r=>e.#E(r)}}get max(){return this.#s}get maxSize(){return this.#r}get calculatedSize(){return this.#m}get size(){return this.#a}get fetchMethod(){return this.#T}get dispose(){return this.#e}get disposeAfter(){return this.#f}constructor(e){let{max:r=0,ttl:s,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:h,disposeAfter:p,noDisposeOnSet:u,noUpdateTTL:c,maxSize:f=0,maxEntrySize:A=0,sizeCalculation:E,fetchMethod:v,noDeleteOnFetchRejection:b,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:N,allowStaleOnFetchAbort:y,ignoreFetchAbort:C}=e;if(r!==0&&!Te(r))throw new TypeError("max option must be a nonnegative integer");let L=r?io(r):Array;if(!L)throw new Error("invalid max value: "+r);if(this.#s=r,this.#r=f,this.maxEntrySize=A||this.#r,this.sizeCalculation=E,this.sizeCalculation){if(!this.#r&&!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(v!==void 0&&typeof v!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#T=v,this.#C=!!v,this.#i=new Map,this.#n=new Array(r).fill(void 0),this.#t=new Array(r).fill(void 0),this.#h=new L(r),this.#p=new L(r),this.#c=0,this.#l=0,this.#A=Ir.create(r),this.#a=0,this.#m=0,typeof h=="function"&&(this.#e=h),typeof p=="function"?(this.#f=p,this.#u=[]):(this.#f=void 0,this.#u=void 0),this.#y=!!this.#e,this.#d=!!this.#f,this.noDisposeOnSet=!!u,this.noUpdateTTL=!!c,this.noDeleteOnFetchRejection=!!b,this.allowStaleOnFetchRejection=!!N,this.allowStaleOnFetchAbort=!!y,this.ignoreFetchAbort=!!C,this.maxEntrySize!==0){if(this.#r!==0&&!Te(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!Te(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#M()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=Te(i)||i===0?i:1,this.ttlAutopurge=!!n,this.ttl=s||0,this.ttl){if(!Te(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#s===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#s&&!this.#r){let $="LRU_CACHE_UNBOUNDED";cu($)&&(ro.add($),so("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",$,t))}}getRemainingTTL(e){return this.#i.has(e)?1/0:0}#L(){let e=new ze(this.#s),r=new ze(this.#s);this.#g=e,this.#x=r,this.#H=(n,o,a=je.now())=>{if(r[n]=o!==0?a:0,e[n]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#E(n)&&this.delete(this.#n[n])},o+1);l.unref&&l.unref()}},this.#S=n=>{r[n]=e[n]!==0?je.now():0},this.#b=(n,o)=>{if(e[o]){let a=e[o],l=r[o];if(!a||!l)return;n.ttl=a,n.start=l,n.now=s||i();let h=n.now-l;n.remainingTTL=a-h}};let s=0,i=()=>{let n=je.now();if(this.ttlResolution>0){s=n;let o=setTimeout(()=>s=0,this.ttlResolution);o.unref&&o.unref()}return n};this.getRemainingTTL=n=>{let o=this.#i.get(n);if(o===void 0)return 0;let a=e[o],l=r[o];if(!a||!l)return 1/0;let h=(s||i())-l;return a-h},this.#E=n=>{let o=r[n],a=e[n];return!!a&&!!o&&(s||i())-o>a}}#S=()=>{};#b=()=>{};#H=()=>{};#E=()=>!1;#M(){let e=new ze(this.#s);this.#m=0,this.#R=e,this.#$=r=>{this.#m-=e[r],e[r]=0},this.#D=(r,s,i,n)=>{if(this.#o(s))return 0;if(!Te(i))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(i=n(s,r),!Te(i))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 i},this.#O=(r,s,i)=>{if(e[r]=s,this.#r){let n=this.#r-e[r];for(;this.#m>n;)this.#I(!0)}this.#m+=e[r],i&&(i.entrySize=s,i.totalCalculatedSize=this.#m)}}#$=e=>{};#O=(e,r,s)=>{};#D=(e,r,s,i)=>{if(s||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#w({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#l;!(!this.#P(r)||((e||!this.#E(r))&&(yield r),r===this.#c));)r=this.#p[r]}*#_({allowStale:e=this.allowStale}={}){if(this.#a)for(let r=this.#c;!(!this.#P(r)||((e||!this.#E(r))&&(yield r),r===this.#l));)r=this.#h[r]}#P(e){return e!==void 0&&this.#i.get(this.#n[e])===e}*entries(){for(let e of this.#w())this.#t[e]!==void 0&&this.#n[e]!==void 0&&!this.#o(this.#t[e])&&(yield[this.#n[e],this.#t[e]])}*rentries(){for(let e of this.#_())this.#t[e]!==void 0&&this.#n[e]!==void 0&&!this.#o(this.#t[e])&&(yield[this.#n[e],this.#t[e]])}*keys(){for(let e of this.#w()){let r=this.#n[e];r!==void 0&&!this.#o(this.#t[e])&&(yield r)}}*rkeys(){for(let e of this.#_()){let r=this.#n[e];r!==void 0&&!this.#o(this.#t[e])&&(yield r)}}*values(){for(let e of this.#w())this.#t[e]!==void 0&&!this.#o(this.#t[e])&&(yield this.#t[e])}*rvalues(){for(let e of this.#_())this.#t[e]!==void 0&&!this.#o(this.#t[e])&&(yield this.#t[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,r={}){for(let s of this.#w()){let i=this.#t[s],n=this.#o(i)?i.__staleWhileFetching:i;if(n!==void 0&&e(n,this.#n[s],this))return this.get(this.#n[s],r)}}forEach(e,r=this){for(let s of this.#w()){let i=this.#t[s],n=this.#o(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,this.#n[s],this)}}rforEach(e,r=this){for(let s of this.#_()){let i=this.#t[s],n=this.#o(i)?i.__staleWhileFetching:i;n!==void 0&&e.call(r,n,this.#n[s],this)}}purgeStale(){let e=!1;for(let r of this.#_({allowStale:!0}))this.#E(r)&&(this.delete(this.#n[r]),e=!0);return e}info(e){let r=this.#i.get(e);if(r===void 0)return;let s=this.#t[r],i=this.#o(s)?s.__staleWhileFetching:s;if(i===void 0)return;let n={value:i};if(this.#g&&this.#x){let o=this.#g[r],a=this.#x[r];if(o&&a){let l=o-(je.now()-a);n.ttl=l,n.start=Date.now()}}return this.#R&&(n.size=this.#R[r]),n}dump(){let e=[];for(let r of this.#w({allowStale:!0})){let s=this.#n[r],i=this.#t[r],n=this.#o(i)?i.__staleWhileFetching:i;if(n===void 0||s===void 0)continue;let o={value:n};if(this.#g&&this.#x){o.ttl=this.#g[r];let a=je.now()-this.#x[r];o.start=Math.floor(Date.now()-a)}this.#R&&(o.size=this.#R[r]),e.unshift([s,o])}return e}load(e){this.clear();for(let[r,s]of e){if(s.start){let i=Date.now()-s.start;s.start=je.now()-i}this.set(r,s.value,s)}}set(e,r,s={}){if(r===void 0)return this.delete(e),this;let{ttl:i=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=s,{noUpdateTTL:h=this.noUpdateTTL}=s,p=this.#D(e,r,s.size||0,a);if(this.maxEntrySize&&p>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let u=this.#a===0?void 0:this.#i.get(e);if(u===void 0)u=this.#a===0?this.#l:this.#A.length!==0?this.#A.pop():this.#a===this.#s?this.#I(!1):this.#a,this.#n[u]=e,this.#t[u]=r,this.#i.set(e,u),this.#h[this.#l]=u,this.#p[u]=this.#l,this.#l=u,this.#a++,this.#O(u,p,l),l&&(l.set="add"),h=!1;else{this.#v(u);let c=this.#t[u];if(r!==c){if(this.#C&&this.#o(c)){c.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:f}=c;f!==void 0&&!o&&(this.#y&&this.#e?.(f,e,"set"),this.#d&&this.#u?.push([f,e,"set"]))}else o||(this.#y&&this.#e?.(c,e,"set"),this.#d&&this.#u?.push([c,e,"set"]));if(this.#$(u),this.#O(u,p,l),this.#t[u]=r,l){l.set="replace";let f=c&&this.#o(c)?c.__staleWhileFetching:c;f!==void 0&&(l.oldValue=f)}}else l&&(l.set="update")}if(i!==0&&!this.#g&&this.#L(),this.#g&&(h||this.#H(u,i,n),l&&this.#b(l,u)),!o&&this.#d&&this.#u){let c=this.#u,f;for(;f=c?.shift();)this.#f?.(...f)}return this}pop(){try{for(;this.#a;){let e=this.#t[this.#c];if(this.#I(!0),this.#o(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#d&&this.#u){let e=this.#u,r;for(;r=e?.shift();)this.#f?.(...r)}}}#I(e){let r=this.#c,s=this.#n[r],i=this.#t[r];return this.#C&&this.#o(i)?i.__abortController.abort(new Error("evicted")):(this.#y||this.#d)&&(this.#y&&this.#e?.(i,s,"evict"),this.#d&&this.#u?.push([i,s,"evict"])),this.#$(r),e&&(this.#n[r]=void 0,this.#t[r]=void 0,this.#A.push(r)),this.#a===1?(this.#c=this.#l=0,this.#A.length=0):this.#c=this.#h[r],this.#i.delete(s),this.#a--,r}has(e,r={}){let{updateAgeOnHas:s=this.updateAgeOnHas,status:i}=r,n=this.#i.get(e);if(n!==void 0){let o=this.#t[n];if(this.#o(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#E(n))i&&(i.has="stale",this.#b(i,n));else return s&&this.#S(n),i&&(i.has="hit",this.#b(i,n)),!0}else i&&(i.has="miss");return!1}peek(e,r={}){let{allowStale:s=this.allowStale}=r,i=this.#i.get(e);if(i===void 0||!s&&this.#E(i))return;let n=this.#t[i];return this.#o(n)?n.__staleWhileFetching:n}#N(e,r,s,i){let n=r===void 0?void 0:this.#t[r];if(this.#o(n))return n;let o=new Ht,{signal:a}=s;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:s,context:i},h=(E,v=!1)=>{let{aborted:b}=o.signal,S=s.ignoreFetchAbort&&E!==void 0;if(s.status&&(b&&!v?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,S&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),b&&!S&&!v)return u(o.signal.reason);let N=f;return this.#t[r]===f&&(E===void 0?N.__staleWhileFetching?this.#t[r]=N.__staleWhileFetching:this.delete(e):(s.status&&(s.status.fetchUpdated=!0),this.set(e,E,l.options))),E},p=E=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=E),u(E)),u=E=>{let{aborted:v}=o.signal,b=v&&s.allowStaleOnFetchAbort,S=b||s.allowStaleOnFetchRejection,N=S||s.noDeleteOnFetchRejection,y=f;if(this.#t[r]===f&&(!N||y.__staleWhileFetching===void 0?this.delete(e):b||(this.#t[r]=y.__staleWhileFetching)),S)return s.status&&y.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),y.__staleWhileFetching;if(y.__returned===y)throw E},c=(E,v)=>{let b=this.#T?.(e,n,l);b&&b instanceof Promise&&b.then(S=>E(S===void 0?void 0:S),v),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(E(void 0),s.allowStaleOnFetchAbort&&(E=S=>h(S,!0)))})};s.status&&(s.status.fetchDispatched=!0);let f=new Promise(c).then(h,p),A=Object.assign(f,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return r===void 0?(this.set(e,A,{...l.options,status:void 0}),r=this.#i.get(e)):this.#t[r]=A,A}#o(e){if(!this.#C)return!1;let r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Ht}async fetch(e,r={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:p=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:c=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:E,forceRefresh:v=!1,status:b,signal:S}=r;if(!this.#C)return b&&(b.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:b});let N={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:h,noUpdateTTL:p,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:c,allowStaleOnFetchAbort:A,ignoreFetchAbort:f,status:b,signal:S},y=this.#i.get(e);if(y===void 0){b&&(b.fetch="miss");let C=this.#N(e,y,N,E);return C.__returned=C}else{let C=this.#t[y];if(this.#o(C)){let d=s&&C.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",d&&(b.returnedStale=!0)),d?C.__staleWhileFetching:C.__returned=C}let L=this.#E(y);if(!v&&!L)return b&&(b.fetch="hit"),this.#v(y),i&&this.#S(y),b&&this.#b(b,y),C;let $=this.#N(e,y,N,E),O=$.__staleWhileFetching!==void 0&&s;return b&&(b.fetch=L?"stale":"refresh",O&&L&&(b.returnedStale=!0)),O?$.__staleWhileFetching:$.__returned=$}}get(e,r={}){let{allowStale:s=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=r,a=this.#i.get(e);if(a!==void 0){let l=this.#t[a],h=this.#o(l);return o&&this.#b(o,a),this.#E(a)?(o&&(o.get="stale"),h?(o&&s&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),s?l.__staleWhileFetching:void 0):(n||this.delete(e),o&&s&&(o.returnedStale=!0),s?l:void 0)):(o&&(o.get="hit"),h?l.__staleWhileFetching:(this.#v(a),i&&this.#S(a),l))}else o&&(o.get="miss")}#U(e,r){this.#p[r]=e,this.#h[e]=r}#v(e){e!==this.#l&&(e===this.#c?this.#c=this.#h[e]:this.#U(this.#p[e],this.#h[e]),this.#U(this.#l,e),this.#l=e)}delete(e){let r=!1;if(this.#a!==0){let s=this.#i.get(e);if(s!==void 0)if(r=!0,this.#a===1)this.clear();else{this.#$(s);let i=this.#t[s];if(this.#o(i)?i.__abortController.abort(new Error("deleted")):(this.#y||this.#d)&&(this.#y&&this.#e?.(i,e,"delete"),this.#d&&this.#u?.push([i,e,"delete"])),this.#i.delete(e),this.#n[s]=void 0,this.#t[s]=void 0,s===this.#l)this.#l=this.#p[s];else if(s===this.#c)this.#c=this.#h[s];else{let n=this.#p[s];this.#h[n]=this.#h[s];let o=this.#h[s];this.#p[o]=this.#p[s]}this.#a--,this.#A.push(s)}}if(this.#d&&this.#u?.length){let s=this.#u,i;for(;i=s?.shift();)this.#f?.(...i)}return r}clear(){for(let e of this.#_({allowStale:!0})){let r=this.#t[e];if(this.#o(r))r.__abortController.abort(new Error("deleted"));else{let s=this.#n[e];this.#y&&this.#e?.(r,s,"delete"),this.#d&&this.#u?.push([r,s,"delete"])}}if(this.#i.clear(),this.#t.fill(void 0),this.#n.fill(void 0),this.#g&&this.#x&&(this.#g.fill(0),this.#x.fill(0)),this.#R&&this.#R.fill(0),this.#c=0,this.#l=0,this.#A.length=0,this.#m=0,this.#a=0,this.#d&&this.#u){let e=this.#u,r;for(;r=e?.shift();)this.#f?.(...r)}}};Dt.LRUCache=Nr});var lo=x((pd,ao)=>{"use strict";var j=(...t)=>t.every(e=>e)?t.join(""):"",Z=t=>t?encodeURIComponent(t):"",oo=t=>t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-"),uu={sshtemplate:({domain:t,user:e,project:r,committish:s})=>`git@${t}:${e}/${r}.git${j("#",s)}`,sshurltemplate:({domain:t,user:e,project:r,committish:s})=>`git+ssh://git@${t}/${e}/${r}.git${j("#",s)}`,edittemplate:({domain:t,user:e,project:r,committish:s,editpath:i,path:n})=>`https://${t}/${e}/${r}${j("/",i,"/",Z(s||"HEAD"),"/",n)}`,browsetemplate:({domain:t,user:e,project:r,committish:s,treepath:i})=>`https://${t}/${e}/${r}${j("/",i,"/",Z(s))}`,browsetreetemplate:({domain:t,user:e,project:r,committish:s,treepath:i,path:n,fragment:o,hashformat:a})=>`https://${t}/${e}/${r}/${i}/${Z(s||"HEAD")}/${n}${j("#",a(o||""))}`,browseblobtemplate:({domain:t,user:e,project:r,committish:s,blobpath:i,path:n,fragment:o,hashformat:a})=>`https://${t}/${e}/${r}/${i}/${Z(s||"HEAD")}/${n}${j("#",a(o||""))}`,docstemplate:({domain:t,user:e,project:r,treepath:s,committish:i})=>`https://${t}/${e}/${r}${j("/",s,"/",Z(i))}#readme`,httpstemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git+https://${j(t,"@")}${e}/${r}/${s}.git${j("#",i)}`,filetemplate:({domain:t,user:e,project:r,committish:s,path:i})=>`https://${t}/${e}/${r}/raw/${Z(s||"HEAD")}/${i}`,shortcuttemplate:({type:t,user:e,project:r,committish:s})=>`${t}:${e}/${r}${j("#",s)}`,pathtemplate:({user:t,project:e,committish:r})=>`${t}/${e}${j("#",r)}`,bugstemplate:({domain:t,user:e,project:r})=>`https://${t}/${e}/${r}/issues`,hashformat:oo},be={};be.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:({auth:t,user:e,project:r,committish:s,path:i})=>`https://${j(t,"@")}raw.githubusercontent.com/${e}/${r}/${Z(s||"HEAD")}/${i}`,gittemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git://${j(t,"@")}${e}/${r}/${s}.git${j("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://codeload.${t}/${e}/${r}/tar.gz/${Z(s||"HEAD")}`,extract:t=>{let[,e,r,s,i]=t.pathname.split("/",5);if(!(s&&s!=="tree")&&(s||(i=t.hash.slice(1)),r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:i}}};be.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:({domain:t,user:e,project:r,committish:s,treepath:i,path:n,editpath:o})=>`https://${t}/${e}/${r}${j("/",i,"/",Z(s||"HEAD"),"/",n,o)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/get/${Z(s||"HEAD")}.tar.gz`,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(!["get"].includes(s)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};be.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git+https://${j(t,"@")}${e}/${r}/${s}.git${j("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/repository/archive.tar.gz?ref=${Z(s||"HEAD")}`,extract:t=>{let e=t.pathname.slice(1);if(e.includes("/-/")||e.includes("/archive.tar.gz"))return;let r=e.split("/"),s=r.pop();s.endsWith(".git")&&(s=s.slice(0,-4));let i=r.join("/");if(!(!i||!s))return{user:i,project:s,committish:t.hash.slice(1)}}};be.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:({domain:t,project:e,committish:r})=>`git@${t}:${e}.git${j("#",r)}`,sshurltemplate:({domain:t,project:e,committish:r})=>`git+ssh://git@${t}/${e}.git${j("#",r)}`,edittemplate:({domain:t,user:e,project:r,committish:s,editpath:i})=>`https://${t}/${e}/${r}${j("/",Z(s))}/${i}`,browsetemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${j("/",Z(r))}`,browsetreetemplate:({domain:t,project:e,committish:r,path:s,hashformat:i})=>`https://${t}/${e}${j("/",Z(r))}${j("#",i(s))}`,browseblobtemplate:({domain:t,project:e,committish:r,path:s,hashformat:i})=>`https://${t}/${e}${j("/",Z(r))}${j("#",i(s))}`,docstemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${j("/",Z(r))}`,httpstemplate:({domain:t,project:e,committish:r})=>`git+https://${t}/${e}.git${j("#",r)}`,filetemplate:({user:t,project:e,committish:r,path:s})=>`https://gist.githubusercontent.com/${t}/${e}/raw${j("/",Z(r))}/${s}`,shortcuttemplate:({type:t,project:e,committish:r})=>`${t}:${e}${j("#",r)}`,pathtemplate:({project:t,committish:e})=>`${t}${j("#",e)}`,bugstemplate:({domain:t,project:e})=>`https://${t}/${e}`,gittemplate:({domain:t,project:e,committish:r})=>`git://${t}/${e}.git${j("#",r)}`,tarballtemplate:({project:t,committish:e})=>`https://codeload.github.com/gist/${t}/tar.gz/${Z(e||"HEAD")}`,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(s!=="raw"){if(!r){if(!e)return;r=e,e=null}return r.endsWith(".git")&&(r=r.slice(0,-4)),{user:e,project:r,committish:t.hash.slice(1)}}},hashformat:function(t){return t&&"file-"+oo(t)}};be.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:({domain:t,user:e,project:r,committish:s,path:i})=>`https://${t}/${e}/${r}/blob/${Z(s)||"HEAD"}/${i}`,httpstemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}.git${j("#",s)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/archive/${Z(s)||"HEAD"}.tar.gz`,bugstemplate:({user:t,project:e})=>null,extract:t=>{let[,e,r,s]=t.pathname.split("/",4);if(!["archive"].includes(s)&&(r&&r.endsWith(".git")&&(r=r.slice(0,-4)),!(!e||!r)))return{user:e,project:r,committish:t.hash.slice(1)}}};for(let[t,e]of Object.entries(be))be[t]=Object.assign({},uu,e);ao.exports=be});var Hr=x((dd,co)=>{var fu=Ae("url"),Lr=(t,e,r)=>{let s=t.indexOf(r);return t.lastIndexOf(e,s>-1?s:1/0)},ho=t=>{try{return new fu.URL(t)}catch{}},pu=(t,e)=>{let r=t.indexOf(":"),s=t.slice(0,r+1);if(Object.prototype.hasOwnProperty.call(e,s))return t;let i=t.indexOf("@");return i>-1?i>r?`git+ssh://${t}`:t:t.indexOf("//")===r+1?t:`${t.slice(0,r+1)}//${t.slice(r+1)}`},du=t=>{let e=Lr(t,"@","#"),r=Lr(t,":","#");return r>e&&(t=t.slice(0,r)+"/"+t.slice(r+1)),Lr(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`git+ssh://${t}`),t};co.exports=(t,e)=>{let r=e?pu(t,e):t;return ho(r)||ho(du(r))}});var fo=x((md,uo)=>{"use strict";var mu=Hr(),gu=t=>{let e=t.indexOf("#"),r=t.indexOf("/"),s=t.indexOf("/",r+1),i=t.indexOf(":"),n=/\s/.exec(t),o=t.indexOf("@"),a=!n||e>-1&&n.index>e,l=o===-1||e>-1&&o>e,h=i===-1||e>-1&&i>e,p=s===-1||e>-1&&s>e,u=r>0,c=e>-1?t[e-1]!=="/":!t.endsWith("/"),f=!t.startsWith(".");return a&&u&&c&&f&&l&&h&&p};uo.exports=(t,e,{gitHosts:r,protocols:s})=>{if(!t)return;let i=gu(t)?`github:${t}`:t,n=mu(i,s);if(!n)return;let o=r.byShortcut[n.protocol],a=r.byDomain[n.hostname.startsWith("www.")?n.hostname.slice(4):n.hostname],l=o||a;if(!l)return;let h=r[o||a],p=null;s[n.protocol]?.auth&&(n.username||n.password)&&(p=`${n.username}${n.password?":"+n.password:""}`);let u=null,c=null,f=null,A=null;try{if(o){let E=n.pathname.startsWith("/")?n.pathname.slice(1):n.pathname,v=E.indexOf("@");v>-1&&(E=E.slice(v+1));let b=E.lastIndexOf("/");b>-1?(c=decodeURIComponent(E.slice(0,b)),c||(c=null),f=decodeURIComponent(E.slice(b+1))):f=decodeURIComponent(E),f.endsWith(".git")&&(f=f.slice(0,-4)),n.hash&&(u=decodeURIComponent(n.hash.slice(1))),A="shortcut"}else{if(!h.protocols.includes(n.protocol))return;let E=h.extract(n);if(!E)return;c=E.user&&decodeURIComponent(E.user),f=decodeURIComponent(E.project),u=decodeURIComponent(E.committish),A=s[n.protocol]?.name||n.protocol.slice(0,-1)}}catch(E){if(E instanceof URIError)return;throw E}return[l,c,p,f,u,A,e]}});var mo=x((gd,po)=>{"use strict";var{LRUCache:Eu}=no(),Au=lo(),Ru=fo(),xu=Hr(),Dr=new Eu({max:1e3}),Pt=class t{constructor(e,r,s,i,n,o,a={}){Object.assign(this,t.#s[e],{type:e,user:r,auth:s,project:i,committish:n,default:o,opts:a})}static#s={byShortcut:{},byDomain:{}};static#r={"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,r){t.#s[e]=r,t.#s.byDomain[r.domain]=e,t.#s.byShortcut[`${e}:`]=e,t.#r[`${e}:`]={name:e}}static fromUrl(e,r){if(typeof e!="string")return;let s=e+JSON.stringify(r||{});if(!Dr.has(s)){let i=Ru(e,r,{gitHosts:t.#s,protocols:t.#r});Dr.set(s,i?new t(...i):void 0)}return Dr.get(s)}static parseUrl(e){return xu(e)}#e(e,r){if(typeof e!="function")return null;let s={...this,...this.opts,...r};s.path||(s.path=""),s.path.startsWith("/")&&(s.path=s.path.slice(1)),s.noCommittish&&(s.committish=null);let i=e(s);return s.noGitPlus&&i.startsWith("git+")?i.slice(4):i}hash(){return this.committish?`#${this.committish}`:""}ssh(e){return this.#e(this.sshtemplate,e)}sshurl(e){return this.#e(this.sshurltemplate,e)}browse(e,...r){return typeof e!="string"?this.#e(this.browsetemplate,e):typeof r[0]!="string"?this.#e(this.browsetreetemplate,{...r[0],path:e}):this.#e(this.browsetreetemplate,{...r[1],fragment:r[0],path:e})}browseFile(e,...r){return typeof r[0]!="string"?this.#e(this.browseblobtemplate,{...r[0],path:e}):this.#e(this.browseblobtemplate,{...r[1],fragment:r[0],path:e})}docs(e){return this.#e(this.docstemplate,e)}bugs(e){return this.#e(this.bugstemplate,e)}https(e){return this.#e(this.httpstemplate,e)}git(e){return this.#e(this.gittemplate,e)}shortcut(e){return this.#e(this.shortcuttemplate,e)}path(e){return this.#e(this.pathtemplate,e)}tarball(e){return this.#e(this.tarballtemplate,{...e,noCommittish:!1})}file(e,r){return this.#e(this.filetemplate,{...r,path:e})}edit(e,r){return this.#e(this.edittemplate,{...r,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[t,e]of Object.entries(Au))Pt.addHost(t,e);po.exports=Pt});var ft=x(($d,vo)=>{"use strict";var me="\\\\/",bo=`[^${me}]`,ye="\\.",Lu="\\+",Hu="\\?",qt="\\/",Du="(?=.)",Co="[^/]",jr=`(?:${qt}|$)`,So=`(?:^|${qt})`,zr=`${ye}{1,2}${jr}`,Pu=`(?!${ye})`,Uu=`(?!${So}${zr})`,Mu=`(?!${ye}{0,1}${jr})`,Fu=`(?!${zr})`,qu=`[^.${qt}]`,Bu=`${Co}*?`,Gu="/",$o={DOT_LITERAL:ye,PLUS_LITERAL:Lu,QMARK_LITERAL:Hu,SLASH_LITERAL:qt,ONE_CHAR:Du,QMARK:Co,END_ANCHOR:jr,DOTS_SLASH:zr,NO_DOT:Pu,NO_DOTS:Uu,NO_DOT_SLASH:Mu,NO_DOTS_SLASH:Fu,QMARK_NO_DOT:qu,STAR:Bu,START_ANCHOR:So,SEP:Gu},ju={...$o,SLASH_LITERAL:`[${me}]`,QMARK:bo,STAR:`${bo}*?`,DOTS_SLASH:`${ye}{1,2}(?:[${me}]|$)`,NO_DOT:`(?!${ye})`,NO_DOTS:`(?!(?:^|[${me}])${ye}{1,2}(?:[${me}]|$))`,NO_DOT_SLASH:`(?!${ye}{0,1}(?:[${me}]|$))`,NO_DOTS_SLASH:`(?!${ye}{1,2}(?:[${me}]|$))`,QMARK_NO_DOT:`[^.${me}]`,START_ANCHOR:`(?:^|[${me}])`,END_ANCHOR:`(?:[${me}]|$)`,SEP:"\\"},zu={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};vo.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:zu,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?ju:$o}}});var Bt=x(le=>{"use strict";var{REGEX_BACKSLASH:Wu,REGEX_REMOVE_BACKSLASH:ku,REGEX_SPECIAL_CHARS:Vu,REGEX_SPECIAL_CHARS_GLOBAL:Ku}=ft();le.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);le.hasRegexChars=t=>Vu.test(t);le.isRegexChar=t=>t.length===1&&le.hasRegexChars(t);le.escapeRegex=t=>t.replace(Ku,"\\$1");le.toPosixSlashes=t=>t.replace(Wu,"/");le.removeBackslashes=t=>t.replace(ku,e=>e==="\\"?"":e);le.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]==="\\"?le.escapeLast(t,e,s-1):`${t.slice(0,s)}\\${t.slice(s)}`};le.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};le.wrapOutput=(t,e={},r={})=>{let s=r.contains?"":"^",i=r.contains?"":"$",n=`${s}(?:${t})${i}`;return e.negated===!0&&(n=`(?:^(?!${n}).*$)`),n};le.basename=(t,{windows:e}={})=>{let r=t.split(e?/[\\/]/:"/"),s=r[r.length-1];return s===""?r[r.length-2]:s}});var Uo=x((Od,Po)=>{"use strict";var Oo=Bt(),{CHAR_ASTERISK:Wr,CHAR_AT:Xu,CHAR_BACKWARD_SLASH:pt,CHAR_COMMA:Yu,CHAR_DOT:kr,CHAR_EXCLAMATION_MARK:Vr,CHAR_FORWARD_SLASH:Do,CHAR_LEFT_CURLY_BRACE:Kr,CHAR_LEFT_PARENTHESES:Xr,CHAR_LEFT_SQUARE_BRACKET:Qu,CHAR_PLUS:Zu,CHAR_QUESTION_MARK:Io,CHAR_RIGHT_CURLY_BRACE:Ju,CHAR_RIGHT_PARENTHESES:No,CHAR_RIGHT_SQUARE_BRACKET:ef}=ft(),Lo=t=>t===Do||t===pt,Ho=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},tf=(t,e)=>{let r=e||{},s=t.length-1,i=r.parts===!0||r.scanToEnd===!0,n=[],o=[],a=[],l=t,h=-1,p=0,u=0,c=!1,f=!1,A=!1,E=!1,v=!1,b=!1,S=!1,N=!1,y=!1,C=!1,L=0,$,I,O={value:"",depth:0,isGlob:!1},d=()=>h>=s,z=()=>l.charCodeAt(h+1),U=()=>($=I,l.charCodeAt(++h));for(;h<s;){I=U();let D;if(I===pt){S=O.backslashes=!0,I=U(),I===Kr&&(b=!0);continue}if(b===!0||I===Kr){for(L++;d()!==!0&&(I=U());){if(I===pt){S=O.backslashes=!0,U();continue}if(I===Kr){L++;continue}if(b!==!0&&I===kr&&(I=U())===kr){if(c=O.isBrace=!0,A=O.isGlob=!0,C=!0,i===!0)continue;break}if(b!==!0&&I===Yu){if(c=O.isBrace=!0,A=O.isGlob=!0,C=!0,i===!0)continue;break}if(I===Ju&&(L--,L===0)){b=!1,c=O.isBrace=!0,C=!0;break}}if(i===!0)continue;break}if(I===Do){if(n.push(h),o.push(O),O={value:"",depth:0,isGlob:!1},C===!0)continue;if($===kr&&h===p+1){p+=2;continue}u=h+1;continue}if(r.noext!==!0&&(I===Zu||I===Xu||I===Wr||I===Io||I===Vr)===!0&&z()===Xr){if(A=O.isGlob=!0,E=O.isExtglob=!0,C=!0,I===Vr&&h===p&&(y=!0),i===!0){for(;d()!==!0&&(I=U());){if(I===pt){S=O.backslashes=!0,I=U();continue}if(I===No){A=O.isGlob=!0,C=!0;break}}continue}break}if(I===Wr){if($===Wr&&(v=O.isGlobstar=!0),A=O.isGlob=!0,C=!0,i===!0)continue;break}if(I===Io){if(A=O.isGlob=!0,C=!0,i===!0)continue;break}if(I===Qu){for(;d()!==!0&&(D=U());){if(D===pt){S=O.backslashes=!0,U();continue}if(D===ef){f=O.isBracket=!0,A=O.isGlob=!0,C=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&I===Vr&&h===p){N=O.negated=!0,p++;continue}if(r.noparen!==!0&&I===Xr){if(A=O.isGlob=!0,i===!0){for(;d()!==!0&&(I=U());){if(I===Xr){S=O.backslashes=!0,I=U();continue}if(I===No){C=!0;break}}continue}break}if(A===!0){if(C=!0,i===!0)continue;break}}r.noext===!0&&(E=!1,A=!1);let B=l,m="",g="";p>0&&(m=l.slice(0,p),l=l.slice(p),u-=p),B&&A===!0&&u>0?(B=l.slice(0,u),g=l.slice(u)):A===!0?(B="",g=l):B=l,B&&B!==""&&B!=="/"&&B!==l&&Lo(B.charCodeAt(B.length-1))&&(B=B.slice(0,-1)),r.unescape===!0&&(g&&(g=Oo.removeBackslashes(g)),B&&S===!0&&(B=Oo.removeBackslashes(B)));let ee={prefix:m,input:t,start:p,base:B,glob:g,isBrace:c,isBracket:f,isGlob:A,isExtglob:E,isGlobstar:v,negated:N,negatedExtglob:y};if(r.tokens===!0&&(ee.maxDepth=0,Lo(I)||o.push(O),ee.tokens=o),r.parts===!0||r.tokens===!0){let D;for(let q=0;q<n.length;q++){let ae=D?D+1:p,Q=n[q],fe=t.slice(ae,Q);r.tokens&&(q===0&&p!==0?(o[q].isPrefix=!0,o[q].value=m):o[q].value=fe,Ho(o[q]),ee.maxDepth+=o[q].depth),(q!==0||fe!=="")&&a.push(fe),D=Q}if(D&&D+1<t.length){let q=t.slice(D+1);a.push(q),r.tokens&&(o[o.length-1].value=q,Ho(o[o.length-1]),ee.maxDepth+=o[o.length-1].depth)}ee.slashes=n,ee.parts=a}return ee};Po.exports=tf});var qo=x((Id,Fo)=>{"use strict";var Gt=ft(),ge=Bt(),{MAX_LENGTH:jt,POSIX_REGEX_SOURCE:rf,REGEX_NON_SPECIAL_CHARS:sf,REGEX_SPECIAL_CHARS_BACKREF:nf,REPLACEMENTS:Mo}=Gt,of=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(i=>ge.escapeRegex(i)).join("..")}return r},Ve=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Yr=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=Mo[t]||t;let r={...e},s=typeof r.maxLength=="number"?Math.min(jt,r.maxLength):jt,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);let n={type:"bos",value:"",output:r.prepend||""},o=[n],a=r.capture?"":"?:",l=Gt.globChars(r.windows),h=Gt.extglobChars(l),{DOT_LITERAL:p,PLUS_LITERAL:u,SLASH_LITERAL:c,ONE_CHAR:f,DOTS_SLASH:A,NO_DOT:E,NO_DOT_SLASH:v,NO_DOTS_SLASH:b,QMARK:S,QMARK_NO_DOT:N,STAR:y,START_ANCHOR:C}=l,L=w=>`(${a}(?:(?!${C}${w.dot?A:p}).)*?)`,$=r.dot?"":E,I=r.dot?S:N,O=r.bash===!0?L(r):y;r.capture&&(O=`(${O})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let d={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:o};t=ge.removePrefix(t,d),i=t.length;let z=[],U=[],B=[],m=n,g,ee=()=>d.index===i-1,D=d.peek=(w=1)=>t[d.index+w],q=d.advance=()=>t[++d.index]||"",ae=()=>t.slice(d.index+1),Q=(w="",k=0)=>{d.consumed+=w,d.index+=k},fe=w=>{d.output+=w.output!=null?w.output:w.value,Q(w.value)},Ma=()=>{let w=1;for(;D()==="!"&&(D(2)!=="("||D(3)==="?");)q(),d.start++,w++;return w%2===0?!1:(d.negated=!0,d.start++,!0)},gt=w=>{d[w]++,B.push(w)},Ce=w=>{d[w]--,B.pop()},M=w=>{if(m.type==="globstar"){let k=d.braces>0&&(w.type==="comma"||w.type==="brace"),R=w.extglob===!0||z.length&&(w.type==="pipe"||w.type==="paren");w.type!=="slash"&&w.type!=="paren"&&!k&&!R&&(d.output=d.output.slice(0,-m.output.length),m.type="star",m.value="*",m.output=O,d.output+=m.output)}if(z.length&&w.type!=="paren"&&(z[z.length-1].inner+=w.value),(w.value||w.output)&&fe(w),m&&m.type==="text"&&w.type==="text"){m.output=(m.output||m.value)+w.value,m.value+=w.value;return}w.prev=m,o.push(w),m=w},Et=(w,k)=>{let R={...h[k],conditions:1,inner:""};R.prev=m,R.parens=d.parens,R.output=d.output;let P=(r.capture?"(":"")+R.open;gt("parens"),M({type:w,value:k,output:d.output?"":f}),M({type:"paren",extglob:!0,value:q(),output:P}),z.push(R)},Fa=w=>{let k=w.close+(r.capture?")":""),R;if(w.type==="negate"){let P=O;if(w.inner&&w.inner.length>1&&w.inner.includes("/")&&(P=L(r)),(P!==O||ee()||/^\)+$/.test(ae()))&&(k=w.close=`)$))${P}`),w.inner.includes("*")&&(R=ae())&&/^\.[^\\/.]+$/.test(R)){let V=Yr(R,{...e,fastpaths:!1}).output;k=w.close=`)${V})${P})`}w.prev.type==="bos"&&(d.negatedExtglob=!0)}M({type:"paren",extglob:!0,value:g,output:k}),Ce("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let w=!1,k=t.replace(nf,(R,P,V,se,J,Qt)=>se==="\\"?(w=!0,R):se==="?"?P?P+se+(J?S.repeat(J.length):""):Qt===0?I+(J?S.repeat(J.length):""):S.repeat(V.length):se==="."?p.repeat(V.length):se==="*"?P?P+se+(J?O:""):O:P?R:`\\${R}`);return w===!0&&(r.unescape===!0?k=k.replace(/\\/g,""):k=k.replace(/\\+/g,R=>R.length%2===0?"\\\\":R?"\\":"")),k===t&&r.contains===!0?(d.output=t,d):(d.output=ge.wrapOutput(k,d,e),d)}for(;!ee();){if(g=q(),g==="\0")continue;if(g==="\\"){let R=D();if(R==="/"&&r.bash!==!0||R==="."||R===";")continue;if(!R){g+="\\",M({type:"text",value:g});continue}let P=/^\\+/.exec(ae()),V=0;if(P&&P[0].length>2&&(V=P[0].length,d.index+=V,V%2!==0&&(g+="\\")),r.unescape===!0?g=q():g+=q(),d.brackets===0){M({type:"text",value:g});continue}}if(d.brackets>0&&(g!=="]"||m.value==="["||m.value==="[^")){if(r.posix!==!1&&g===":"){let R=m.value.slice(1);if(R.includes("[")&&(m.posix=!0,R.includes(":"))){let P=m.value.lastIndexOf("["),V=m.value.slice(0,P),se=m.value.slice(P+2),J=rf[se];if(J){m.value=V+J,d.backtrack=!0,q(),!n.output&&o.indexOf(m)===1&&(n.output=f);continue}}}(g==="["&&D()!==":"||g==="-"&&D()==="]")&&(g=`\\${g}`),g==="]"&&(m.value==="["||m.value==="[^")&&(g=`\\${g}`),r.posix===!0&&g==="!"&&m.value==="["&&(g="^"),m.value+=g,fe({value:g});continue}if(d.quotes===1&&g!=='"'){g=ge.escapeRegex(g),m.value+=g,fe({value:g});continue}if(g==='"'){d.quotes=d.quotes===1?0:1,r.keepQuotes===!0&&M({type:"text",value:g});continue}if(g==="("){gt("parens"),M({type:"paren",value:g});continue}if(g===")"){if(d.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Ve("opening","("));let R=z[z.length-1];if(R&&d.parens===R.parens+1){Fa(z.pop());continue}M({type:"paren",value:g,output:d.parens?")":"\\)"}),Ce("parens");continue}if(g==="["){if(r.nobracket===!0||!ae().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Ve("closing","]"));g=`\\${g}`}else gt("brackets");M({type:"bracket",value:g});continue}if(g==="]"){if(r.nobracket===!0||m&&m.type==="bracket"&&m.value.length===1){M({type:"text",value:g,output:`\\${g}`});continue}if(d.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Ve("opening","["));M({type:"text",value:g,output:`\\${g}`});continue}Ce("brackets");let R=m.value.slice(1);if(m.posix!==!0&&R[0]==="^"&&!R.includes("/")&&(g=`/${g}`),m.value+=g,fe({value:g}),r.literalBrackets===!1||ge.hasRegexChars(R))continue;let P=ge.escapeRegex(m.value);if(d.output=d.output.slice(0,-m.value.length),r.literalBrackets===!0){d.output+=P,m.value=P;continue}m.value=`(${a}${P}|${m.value})`,d.output+=m.value;continue}if(g==="{"&&r.nobrace!==!0){gt("braces");let R={type:"brace",value:g,output:"(",outputIndex:d.output.length,tokensIndex:d.tokens.length};U.push(R),M(R);continue}if(g==="}"){let R=U[U.length-1];if(r.nobrace===!0||!R){M({type:"text",value:g,output:g});continue}let P=")";if(R.dots===!0){let V=o.slice(),se=[];for(let J=V.length-1;J>=0&&(o.pop(),V[J].type!=="brace");J--)V[J].type!=="dots"&&se.unshift(V[J].value);P=of(se,r),d.backtrack=!0}if(R.comma!==!0&&R.dots!==!0){let V=d.output.slice(0,R.outputIndex),se=d.tokens.slice(R.tokensIndex);R.value=R.output="\\{",g=P="\\}",d.output=V;for(let J of se)d.output+=J.output||J.value}M({type:"brace",value:g,output:P}),Ce("braces"),U.pop();continue}if(g==="|"){z.length>0&&z[z.length-1].conditions++,M({type:"text",value:g});continue}if(g===","){let R=g,P=U[U.length-1];P&&B[B.length-1]==="braces"&&(P.comma=!0,R="|"),M({type:"comma",value:g,output:R});continue}if(g==="/"){if(m.type==="dot"&&d.index===d.start+1){d.start=d.index+1,d.consumed="",d.output="",o.pop(),m=n;continue}M({type:"slash",value:g,output:c});continue}if(g==="."){if(d.braces>0&&m.type==="dot"){m.value==="."&&(m.output=p);let R=U[U.length-1];m.type="dots",m.output+=g,m.value+=g,R.dots=!0;continue}if(d.braces+d.parens===0&&m.type!=="bos"&&m.type!=="slash"){M({type:"text",value:g,output:p});continue}M({type:"dot",value:g,output:p});continue}if(g==="?"){if(!(m&&m.value==="(")&&r.noextglob!==!0&&D()==="("&&D(2)!=="?"){Et("qmark",g);continue}if(m&&m.type==="paren"){let P=D(),V=g;(m.value==="("&&!/[!=<:]/.test(P)||P==="<"&&!/<([!=]|\w+>)/.test(ae()))&&(V=`\\${g}`),M({type:"text",value:g,output:V});continue}if(r.dot!==!0&&(m.type==="slash"||m.type==="bos")){M({type:"qmark",value:g,output:N});continue}M({type:"qmark",value:g,output:S});continue}if(g==="!"){if(r.noextglob!==!0&&D()==="("&&(D(2)!=="?"||!/[!=<:]/.test(D(3)))){Et("negate",g);continue}if(r.nonegate!==!0&&d.index===0){Ma();continue}}if(g==="+"){if(r.noextglob!==!0&&D()==="("&&D(2)!=="?"){Et("plus",g);continue}if(m&&m.value==="("||r.regex===!1){M({type:"plus",value:g,output:u});continue}if(m&&(m.type==="bracket"||m.type==="paren"||m.type==="brace")||d.parens>0){M({type:"plus",value:g});continue}M({type:"plus",value:u});continue}if(g==="@"){if(r.noextglob!==!0&&D()==="("&&D(2)!=="?"){M({type:"at",extglob:!0,value:g,output:""});continue}M({type:"text",value:g});continue}if(g!=="*"){(g==="$"||g==="^")&&(g=`\\${g}`);let R=sf.exec(ae());R&&(g+=R[0],d.index+=R[0].length),M({type:"text",value:g});continue}if(m&&(m.type==="globstar"||m.star===!0)){m.type="star",m.star=!0,m.value+=g,m.output=O,d.backtrack=!0,d.globstar=!0,Q(g);continue}let w=ae();if(r.noextglob!==!0&&/^\([^?]/.test(w)){Et("star",g);continue}if(m.type==="star"){if(r.noglobstar===!0){Q(g);continue}let R=m.prev,P=R.prev,V=R.type==="slash"||R.type==="bos",se=P&&(P.type==="star"||P.type==="globstar");if(r.bash===!0&&(!V||w[0]&&w[0]!=="/")){M({type:"star",value:g,output:""});continue}let J=d.braces>0&&(R.type==="comma"||R.type==="brace"),Qt=z.length&&(R.type==="pipe"||R.type==="paren");if(!V&&R.type!=="paren"&&!J&&!Qt){M({type:"star",value:g,output:""});continue}for(;w.slice(0,3)==="/**";){let At=t[d.index+4];if(At&&At!=="/")break;w=w.slice(3),Q("/**",3)}if(R.type==="bos"&&ee()){m.type="globstar",m.value+=g,m.output=L(r),d.output=m.output,d.globstar=!0,Q(g);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&!se&&ee()){d.output=d.output.slice(0,-(R.output+m.output).length),R.output=`(?:${R.output}`,m.type="globstar",m.output=L(r)+(r.strictSlashes?")":"|$)"),m.value+=g,d.globstar=!0,d.output+=R.output+m.output,Q(g);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&w[0]==="/"){let At=w[1]!==void 0?"|$":"";d.output=d.output.slice(0,-(R.output+m.output).length),R.output=`(?:${R.output}`,m.type="globstar",m.output=`${L(r)}${c}|${c}${At})`,m.value+=g,d.output+=R.output+m.output,d.globstar=!0,Q(g+q()),M({type:"slash",value:"/",output:""});continue}if(R.type==="bos"&&w[0]==="/"){m.type="globstar",m.value+=g,m.output=`(?:^|${c}|${L(r)}${c})`,d.output=m.output,d.globstar=!0,Q(g+q()),M({type:"slash",value:"/",output:""});continue}d.output=d.output.slice(0,-m.output.length),m.type="globstar",m.output=L(r),m.value+=g,d.output+=m.output,d.globstar=!0,Q(g);continue}let k={type:"star",value:g,output:O};if(r.bash===!0){k.output=".*?",(m.type==="bos"||m.type==="slash")&&(k.output=$+k.output),M(k);continue}if(m&&(m.type==="bracket"||m.type==="paren")&&r.regex===!0){k.output=g,M(k);continue}(d.index===d.start||m.type==="slash"||m.type==="dot")&&(m.type==="dot"?(d.output+=v,m.output+=v):r.dot===!0?(d.output+=b,m.output+=b):(d.output+=$,m.output+=$),D()!=="*"&&(d.output+=f,m.output+=f)),M(k)}for(;d.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ve("closing","]"));d.output=ge.escapeLast(d.output,"["),Ce("brackets")}for(;d.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ve("closing",")"));d.output=ge.escapeLast(d.output,"("),Ce("parens")}for(;d.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ve("closing","}"));d.output=ge.escapeLast(d.output,"{"),Ce("braces")}if(r.strictSlashes!==!0&&(m.type==="star"||m.type==="bracket")&&M({type:"maybe_slash",value:"",output:`${c}?`}),d.backtrack===!0){d.output="";for(let w of d.tokens)d.output+=w.output!=null?w.output:w.value,w.suffix&&(d.output+=w.suffix)}return d};Yr.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength=="number"?Math.min(jt,r.maxLength):jt,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);t=Mo[t]||t;let{DOT_LITERAL:n,SLASH_LITERAL:o,ONE_CHAR:a,DOTS_SLASH:l,NO_DOT:h,NO_DOTS:p,NO_DOTS_SLASH:u,STAR:c,START_ANCHOR:f}=Gt.globChars(r.windows),A=r.dot?p:h,E=r.dot?u:h,v=r.capture?"":"?:",b={negated:!1,prefix:""},S=r.bash===!0?".*?":c;r.capture&&(S=`(${S})`);let N=$=>$.noglobstar===!0?S:`(${v}(?:(?!${f}${$.dot?l:n}).)*?)`,y=$=>{switch($){case"*":return`${A}${a}${S}`;case".*":return`${n}${a}${S}`;case"*.*":return`${A}${S}${n}${a}${S}`;case"*/*":return`${A}${S}${o}${a}${E}${S}`;case"**":return A+N(r);case"**/*":return`(?:${A}${N(r)}${o})?${E}${a}${S}`;case"**/*.*":return`(?:${A}${N(r)}${o})?${E}${S}${n}${a}${S}`;case"**/.*":return`(?:${A}${N(r)}${o})?${n}${a}${S}`;default:{let I=/^(.*?)\.(\w+)$/.exec($);if(!I)return;let O=y(I[1]);return O?O+n+I[2]:void 0}}},C=ge.removePrefix(t,b),L=y(C);return L&&r.strictSlashes!==!0&&(L+=`${o}?`),L};Fo.exports=Yr});var jo=x((Nd,Go)=>{"use strict";var af=Uo(),Qr=qo(),Bo=Bt(),lf=ft(),hf=t=>t&&typeof t=="object"&&!Array.isArray(t),Y=(t,e,r=!1)=>{if(Array.isArray(t)){let p=t.map(c=>Y(c,e,r));return c=>{for(let f of p){let A=f(c);if(A)return A}return!1}}let s=hf(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!s)throw new TypeError("Expected pattern to be a non-empty string");let i=e||{},n=i.windows,o=s?Y.compileRe(t,e):Y.makeRe(t,e,!1,!0),a=o.state;delete o.state;let l=()=>!1;if(i.ignore){let p={...e,ignore:null,onMatch:null,onResult:null};l=Y(i.ignore,p,r)}let h=(p,u=!1)=>{let{isMatch:c,match:f,output:A}=Y.test(p,o,e,{glob:t,posix:n}),E={glob:t,state:a,regex:o,posix:n,input:p,output:A,match:f,isMatch:c};return typeof i.onResult=="function"&&i.onResult(E),c===!1?(E.isMatch=!1,u?E:!1):l(p)?(typeof i.onIgnore=="function"&&i.onIgnore(E),E.isMatch=!1,u?E:!1):(typeof i.onMatch=="function"&&i.onMatch(E),u?E:!0)};return r&&(h.state=a),h};Y.test=(t,e,r,{glob:s,posix:i}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let n=r||{},o=n.format||(i?Bo.toPosixSlashes:null),a=t===s,l=a&&o?o(t):t;return a===!1&&(l=o?o(t):t,a=l===s),(a===!1||n.capture===!0)&&(n.matchBase===!0||n.basename===!0?a=Y.matchBase(t,e,r,i):a=e.exec(l)),{isMatch:!!a,match:a,output:l}};Y.matchBase=(t,e,r)=>(e instanceof RegExp?e:Y.makeRe(e,r)).test(Bo.basename(t));Y.isMatch=(t,e,r)=>Y(e,r)(t);Y.parse=(t,e)=>Array.isArray(t)?t.map(r=>Y.parse(r,e)):Qr(t,{...e,fastpaths:!1});Y.scan=(t,e)=>af(t,e);Y.compileRe=(t,e,r=!1,s=!1)=>{if(r===!0)return t.output;let i=e||{},n=i.contains?"":"^",o=i.contains?"":"$",a=`${n}(?:${t.output})${o}`;t&&t.negated===!0&&(a=`^(?!${a}).*$`);let l=Y.toRegex(a,e);return s===!0&&(l.state=t),l};Y.makeRe=(t,e={},r=!1,s=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(i.output=Qr.fastpaths(t,e)),i.output||(i=Qr(t,e)),Y.compileRe(i,e,r,s)};Y.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Y.constants=lf;Go.exports=Y});var Vo=x((Ld,ko)=>{"use strict";var zo=jo(),cf=()=>{if(typeof navigator<"u"&&navigator.platform){let t=navigator.platform.toLowerCase();return t==="win32"||t==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1};function Wo(t,e,r=!1){return e&&(e.windows===null||e.windows===void 0)&&(e={...e,windows:cf()}),zo(t,e,r)}Object.assign(Wo,zo);ko.exports=Wo});var Xo=x((Hd,Ko)=>{"use strict";var Le=class t extends Error{constructor(e,r,s){super("[ParserError] "+e,r,s),this.name="ParserError",this.code="ParserError",Error.captureStackTrace&&Error.captureStackTrace(this,t)}},zt=class{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},dt=class{constructor(){this.pos=0,this.col=0,this.line=0,this.obj={},this.ctx=this.obj,this.stack=[],this._buf="",this.char=null,this.ii=0,this.state=new zt(this.parseStart)}parse(e){if(e.length===0||e.length==null)return;this._buf=String(e),this.ii=-1,this.char=-1;let r;for(;r===!1||this.nextChar();)r=this.runOne();this._buf=null}nextChar(){return this.char===10&&(++this.line,this.col=-1),++this.ii,this.char=this._buf.codePointAt(this.ii),++this.pos,++this.col,this.haveBuffer()}haveBuffer(){return this.ii<this._buf.length}runOne(){return this.state.parser.call(this,this.state.returned)}finish(){this.char=1114112;let e;do e=this.state.parser,this.runOne();while(this.state.parser!==e);return this.ctx=null,this.state=null,this._buf=null,this.obj}next(e){if(typeof e!="function")throw new Le("Tried to set state to non-existent state: "+JSON.stringify(e));this.state.parser=e}goto(e){return this.next(e),this.runOne()}call(e,r){r&&this.next(r),this.stack.push(this.state),this.state=new zt(e)}callNow(e,r){return this.call(e,r),this.runOne()}return(e){if(this.stack.length===0)throw this.error(new Le("Stack underflow"));e===void 0&&(e=this.state.buf),this.state=this.stack.pop(),this.state.returned=e}returnNow(e){return this.return(e),this.runOne()}consume(){if(this.char===1114112)throw this.error(new Le("Unexpected end-of-buffer"));this.state.buf+=this._buf[this.ii]}error(e){return e.line=this.line,e.col=this.col,e.pos=this.pos,e}parseStart(){throw new Le("Must declare a parseStart method")}};dt.END=1114112;dt.Error=Le;Ko.exports=dt});var Qo=x((Dd,Yo)=>{"use strict";Yo.exports=t=>{let e=new Date(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var Wt=x((Pd,Zo)=>{"use strict";Zo.exports=(t,e)=>{for(e=String(e);e.length<t;)e="0"+e;return e}});var ea=x((Ud,Jo)=>{"use strict";var Ke=Wt(),Zr=class extends Date{constructor(e){super(e+"Z"),this.isFloating=!0}toISOString(){let e=`${this.getUTCFullYear()}-${Ke(2,this.getUTCMonth()+1)}-${Ke(2,this.getUTCDate())}`,r=`${Ke(2,this.getUTCHours())}:${Ke(2,this.getUTCMinutes())}:${Ke(2,this.getUTCSeconds())}.${Ke(3,this.getUTCMilliseconds())}`;return`${e}T${r}`}};Jo.exports=t=>{let e=new Zr(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var sa=x((Md,ra)=>{"use strict";var ta=Wt(),uf=global.Date,Jr=class extends uf{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${ta(2,this.getUTCMonth()+1)}-${ta(2,this.getUTCDate())}`}};ra.exports=t=>{let e=new Jr(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var na=x((Fd,ia)=>{"use strict";var kt=Wt(),es=class extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${kt(2,this.getUTCHours())}:${kt(2,this.getUTCMinutes())}:${kt(2,this.getUTCSeconds())}.${kt(3,this.getUTCMilliseconds())}`}};ia.exports=t=>{let e=new es(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var oa=x((exports,module)=>{"use strict";module.exports=makeParserClass(Xo());module.exports.makeParserClass=makeParserClass;var TomlError=class t extends Error{constructor(e){super(e),this.name="TomlError",Error.captureStackTrace&&Error.captureStackTrace(this,t),this.fromTOML=!0,this.wrapped=null}};TomlError.wrap=t=>{let e=new TomlError(t.message);return e.code=t.code,e.wrapped=t,e};module.exports.TomlError=TomlError;var createDateTime=Qo(),createDateTimeFloat=ea(),createDate=sa(),createTime=na(),CTRL_I=9,CTRL_J=10,CTRL_M=13,CTRL_CHAR_BOUNDARY=31,CHAR_SP=32,CHAR_QUOT=34,CHAR_NUM=35,CHAR_APOS=39,CHAR_PLUS=43,CHAR_COMMA=44,CHAR_HYPHEN=45,CHAR_PERIOD=46,CHAR_0=48,CHAR_1=49,CHAR_7=55,CHAR_9=57,CHAR_COLON=58,CHAR_EQUALS=61,CHAR_A=65,CHAR_E=69,CHAR_F=70,CHAR_T=84,CHAR_U=85,CHAR_Z=90,CHAR_LOWBAR=95,CHAR_a=97,CHAR_b=98,CHAR_e=101,CHAR_f=102,CHAR_i=105,CHAR_l=108,CHAR_n=110,CHAR_o=111,CHAR_r=114,CHAR_s=115,CHAR_t=116,CHAR_u=117,CHAR_x=120,CHAR_z=122,CHAR_LCUB=123,CHAR_RCUB=125,CHAR_LSQB=91,CHAR_BSOL=92,CHAR_RSQB=93,CHAR_DEL=127,SURROGATE_FIRST=55296,SURROGATE_LAST=57343,escapes={[CHAR_b]:"\b",[CHAR_t]:" ",[CHAR_n]:`
|
|
10
|
-
`,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(t){return t>=CHAR_0&&t<=CHAR_9}function isHexit(t){return t>=CHAR_A&&t<=CHAR_F||t>=CHAR_a&&t<=CHAR_f||t>=CHAR_0&&t<=CHAR_9}function isBit(t){return t===CHAR_1||t===CHAR_0}function isOctit(t){return t>=CHAR_0&&t<=CHAR_7}function isAlphaNumQuoteHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_APOS||t===CHAR_QUOT||t===CHAR_LOWBAR||t===CHAR_HYPHEN}function isAlphaNumHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_LOWBAR||t===CHAR_HYPHEN}var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(t,e){return hasOwnProperty.call(t,e)?!0:(e==="__proto__"&&defineProperty(t,"__proto__",descriptor),!1)}var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}function isInlineTable(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_TABLE}var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}function isTable(t){return t===null||typeof t!="object"?!1:t[_type]===TABLE}var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(t){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:t}})}function isInlineList(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_LIST}var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}function isList(t){return t===null||typeof t!="object"?!1:t[_type]===LIST}var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(t){}var _inspect=_custom||"inspect",BoxedBigInt=class{constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(t){let e=Number(t);return Object.is(e,-0)&&(e=0),global.BigInt&&!Number.isSafeInteger(e)?new BoxedBigInt(t):Object.defineProperties(new Number(e),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${t}]`}})}function isInteger(t){return t===null||typeof t!="object"?!1:t[_type]===INTEGER}var FLOAT=Symbol("float");function Float(t){return Object.defineProperties(new Number(t),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${t}]`}})}function isFloat(t){return t===null||typeof t!="object"?!1:t[_type]===FLOAT}function tomlType(t){let e=typeof t;if(e==="object"){if(t===null)return"null";if(t instanceof Date)return"datetime";if(_type in t)switch(t[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return e}function makeParserClass(t){class e extends t{constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===t.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===t.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===t.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(s){let i=this.ctx,n=s.key.pop();for(let o of s.key){if(hasKey(i,o)&&(!isTable(i[o])||i[o][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[o]=i[o]||Table()}if(hasKey(i,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(s.value)||isFloat(s.value)?i[n]=s.value.valueOf():i[n]=s.value,this.goto(this.parseWhitespaceToEOL)}parseAssign(){return this.callNow(this.parseKeyword,this.recordAssignKeyword)}recordAssignKeyword(s){return this.state.resultTable?this.state.resultTable.push(s):this.state.resultTable=[s],this.goto(this.parseAssignKeywordPreDot)}parseAssignKeywordPreDot(){if(this.char===CHAR_PERIOD)return this.next(this.parseAssignKeywordPostDot);if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.goto(this.parseAssignEqual)}parseAssignKeywordPostDot(){if(this.char!==CHAR_SP&&this.char!==CTRL_I)return this.callNow(this.parseKeyword,this.recordAssignKeyword)}parseAssignEqual(){if(this.char===CHAR_EQUALS)return this.next(this.parseAssignPreValue);throw this.error(new TomlError('Invalid character, expected "="'))}parseAssignPreValue(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseValue,this.recordAssignValue)}recordAssignValue(s){return this.returnNow({key:this.state.resultTable,value:s})}parseComment(){do if(this.char===t.END||this.char===CTRL_J)return this.return();while(this.nextChar())}parseTableOrList(){if(this.char===CHAR_LSQB)this.next(this.parseList);else return this.goto(this.parseTable)}parseTable(){return this.ctx=this.obj,this.goto(this.parseTableNext)}parseTableNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseTableMore)}parseTableMore(s){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,s)&&(!isTable(this.ctx[s])||this.ctx[s][_declared]))throw this.error(new TomlError("Can't redefine existing key"));return this.ctx=this.ctx[s]=this.ctx[s]||Table(),this.ctx[_declared]=!0,this.next(this.parseWhitespaceToEOL)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,s))this.ctx=this.ctx[s]=Table();else if(isTable(this.ctx[s]))this.ctx=this.ctx[s];else if(isList(this.ctx[s]))this.ctx=this.ctx[s][this.ctx[s].length-1];else throw this.error(new TomlError("Can't redefine existing key"));return this.next(this.parseTableNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseList(){return this.ctx=this.obj,this.goto(this.parseListNext)}parseListNext(){return this.char===CHAR_SP||this.char===CTRL_I?null:this.callNow(this.parseKeyword,this.parseListMore)}parseListMore(s){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CHAR_RSQB){if(hasKey(this.ctx,s)||(this.ctx[s]=List()),isInlineList(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline array"));if(isList(this.ctx[s])){let i=Table();this.ctx[s].push(i),this.ctx=i}else throw this.error(new TomlError("Can't redefine an existing key"));return this.next(this.parseListEnd)}else if(this.char===CHAR_PERIOD){if(!hasKey(this.ctx,s))this.ctx=this.ctx[s]=Table();else{if(isInlineList(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline array"));if(isInlineTable(this.ctx[s]))throw this.error(new TomlError("Can't extend an inline table"));if(isList(this.ctx[s]))this.ctx=this.ctx[s][this.ctx[s].length-1];else if(isTable(this.ctx[s]))this.ctx=this.ctx[s];else throw this.error(new TomlError("Can't redefine an existing key"))}return this.next(this.parseListNext)}else throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseListEnd(s){if(this.char===CHAR_RSQB)return this.next(this.parseWhitespaceToEOL);throw this.error(new TomlError("Unexpected character, expected whitespace, . or ]"))}parseValue(){if(this.char===t.END)throw this.error(new TomlError("Key without value"));if(this.char===CHAR_QUOT)return this.next(this.parseDoubleString);if(this.char===CHAR_APOS)return this.next(this.parseSingleString);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)return this.goto(this.parseNumberSign);if(this.char===CHAR_i)return this.next(this.parseInf);if(this.char===CHAR_n)return this.next(this.parseNan);if(isDigit(this.char))return this.goto(this.parseNumberOrDateTime);if(this.char===CHAR_t||this.char===CHAR_f)return this.goto(this.parseBoolean);if(this.char===CHAR_LSQB)return this.call(this.parseInlineList,this.recordValue);if(this.char===CHAR_LCUB)return this.call(this.parseInlineTable,this.recordValue);throw this.error(new TomlError("Unexpected character, expecting string, number, datetime, boolean, inline array or inline table"))}recordValue(s){return this.returnNow(s)}parseInf(){if(this.char===CHAR_n)return this.next(this.parseInf2);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseInf2(){if(this.char===CHAR_f)return this.state.buf==="-"?this.return(-1/0):this.return(1/0);throw this.error(new TomlError('Unexpected character, expected "inf", "+inf" or "-inf"'))}parseNan(){if(this.char===CHAR_a)return this.next(this.parseNan2);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseNan2(){if(this.char===CHAR_n)return this.return(NaN);throw this.error(new TomlError('Unexpected character, expected "nan"'))}parseKeyword(){return this.char===CHAR_QUOT?this.next(this.parseBasicString):this.char===CHAR_APOS?this.next(this.parseLiteralString):this.goto(this.parseBareKey)}parseBareKey(){do{if(this.char===t.END)throw this.error(new TomlError("Key ended without value"));if(isAlphaNumHyphen(this.char))this.consume();else{if(this.state.buf.length===0)throw this.error(new TomlError("Empty bare keys are not allowed"));return this.returnNow()}}while(this.nextChar())}parseSingleString(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiStringMaybe):this.goto(this.parseLiteralString)}parseLiteralString(){do{if(this.char===CHAR_APOS)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiStringMaybe(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiString):this.returnNow()}parseLiteralMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseLiteralMultiStringContent):this.goto(this.parseLiteralMultiStringContent)}parseLiteralMultiStringContent(){do{if(this.char===CHAR_APOS)return this.next(this.parseLiteralMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}parseLiteralMultiEnd(){return this.char===CHAR_APOS?this.next(this.parseLiteralMultiEnd2):(this.state.buf+="'",this.goto(this.parseLiteralMultiStringContent))}parseLiteralMultiEnd2(){return this.char===CHAR_APOS?this.return():(this.state.buf+="''",this.goto(this.parseLiteralMultiStringContent))}parseDoubleString(){return this.char===CHAR_QUOT?this.next(this.parseMultiStringMaybe):this.goto(this.parseBasicString)}parseBasicString(){do{if(this.char===CHAR_BSOL)return this.call(this.parseEscape,this.recordEscapeReplacement);if(this.char===CHAR_QUOT)return this.return();if(this.atEndOfLine())throw this.error(new TomlError("Unterminated string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}recordEscapeReplacement(s){return this.state.buf+=s,this.goto(this.parseBasicString)}parseMultiStringMaybe(){return this.char===CHAR_QUOT?this.next(this.parseMultiString):this.returnNow()}parseMultiString(){return this.char===CTRL_M?null:this.char===CTRL_J?this.next(this.parseMultiStringContent):this.goto(this.parseMultiStringContent)}parseMultiStringContent(){do{if(this.char===CHAR_BSOL)return this.call(this.parseMultiEscape,this.recordMultiEscapeReplacement);if(this.char===CHAR_QUOT)return this.next(this.parseMultiEnd);if(this.char===t.END)throw this.error(new TomlError("Unterminated multi-line string"));if(this.char===CHAR_DEL||this.char<=CTRL_CHAR_BOUNDARY&&this.char!==CTRL_I&&this.char!==CTRL_J&&this.char!==CTRL_M)throw this.errorControlCharInString();this.consume()}while(this.nextChar())}errorControlCharInString(){let s="\\u00";return this.char<16&&(s+="0"),s+=this.char.toString(16),this.error(new TomlError(`Control characters (codes < 0x1f and 0x7f) are not allowed in strings, use ${s} instead`))}recordMultiEscapeReplacement(s){return this.state.buf+=s,this.goto(this.parseMultiStringContent)}parseMultiEnd(){return this.char===CHAR_QUOT?this.next(this.parseMultiEnd2):(this.state.buf+='"',this.goto(this.parseMultiStringContent))}parseMultiEnd2(){return this.char===CHAR_QUOT?this.return():(this.state.buf+='""',this.goto(this.parseMultiStringContent))}parseMultiEscape(){return this.char===CTRL_M||this.char===CTRL_J?this.next(this.parseMultiTrim):this.char===CHAR_SP||this.char===CTRL_I?this.next(this.parsePreMultiTrim):this.goto(this.parseEscape)}parsePreMultiTrim(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===CTRL_M||this.char===CTRL_J)return this.next(this.parseMultiTrim);throw this.error(new TomlError("Can't escape whitespace"))}parseMultiTrim(){return this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M?null:this.returnNow()}parseEscape(){if(this.char in escapes)return this.return(escapes[this.char]);if(this.char===CHAR_u)return this.call(this.parseSmallUnicode,this.parseUnicodeReturn);if(this.char===CHAR_U)return this.call(this.parseLargeUnicode,this.parseUnicodeReturn);throw this.error(new TomlError("Unknown escape character: "+this.char))}parseUnicodeReturn(s){try{let i=parseInt(s,16);if(i>=SURROGATE_FIRST&&i<=SURROGATE_LAST)throw this.error(new TomlError("Invalid unicode, character in range 0xD800 - 0xDFFF is reserved"));return this.returnNow(String.fromCodePoint(i))}catch(i){throw this.error(TomlError.wrap(i))}}parseSmallUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=4)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseLargeUnicode(){if(isHexit(this.char)){if(this.consume(),this.state.buf.length>=8)return this.return()}else throw this.error(new TomlError("Invalid character in unicode sequence, expected hex"))}parseNumberSign(){return this.consume(),this.next(this.parseMaybeSignedInfOrNan)}parseMaybeSignedInfOrNan(){return this.char===CHAR_i?this.next(this.parseInf):this.char===CHAR_n?this.next(this.parseNan):this.callNow(this.parseNoUnder,this.parseNumberIntegerStart)}parseNumberIntegerStart(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberIntegerExponentOrDecimal)):this.goto(this.parseNumberInteger)}parseNumberIntegerExponentOrDecimal(){return this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Integer(this.state.buf))}parseNumberInteger(){if(isDigit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder);if(this.char===CHAR_E||this.char===CHAR_e)return this.consume(),this.next(this.parseNumberExponentSign);if(this.char===CHAR_PERIOD)return this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseNoUnder(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD||this.char===CHAR_E||this.char===CHAR_e)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNoUnderHexOctBinLiteral(){if(this.char===CHAR_LOWBAR||this.char===CHAR_PERIOD)throw this.error(new TomlError("Unexpected character, expected digit"));if(this.atEndOfWord())throw this.error(new TomlError("Incomplete number"));return this.returnNow()}parseNumberFloat(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberFloat);if(isDigit(this.char))this.consume();else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.returnNow(Float(this.state.buf))}parseNumberExponentSign(){if(isDigit(this.char))return this.goto(this.parseNumberExponent);if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.call(this.parseNoUnder,this.parseNumberExponent);else throw this.error(new TomlError("Unexpected character, expected -, + or digit"))}parseNumberExponent(){if(isDigit(this.char))this.consume();else return this.char===CHAR_LOWBAR?this.call(this.parseNoUnder):this.returnNow(Float(this.state.buf))}parseNumberOrDateTime(){return this.char===CHAR_0?(this.consume(),this.next(this.parseNumberBaseOrDateTime)):this.goto(this.parseNumberOrDateTimeOnly)}parseNumberOrDateTimeOnly(){if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnder,this.parseNumberInteger);if(isDigit(this.char))this.consume(),this.state.buf.length>4&&this.next(this.parseNumberInteger);else return this.char===CHAR_E||this.char===CHAR_e?(this.consume(),this.next(this.parseNumberExponentSign)):this.char===CHAR_PERIOD?(this.consume(),this.call(this.parseNoUnder,this.parseNumberFloat)):this.char===CHAR_HYPHEN?this.goto(this.parseDateTime):this.char===CHAR_COLON?this.goto(this.parseOnlyTimeHour):this.returnNow(Integer(this.state.buf))}parseDateTimeOnly(){if(this.state.buf.length<4){if(isDigit(this.char))return this.consume();if(this.char===CHAR_COLON)return this.goto(this.parseOnlyTimeHour);throw this.error(new TomlError("Expected digit while parsing year part of a date"))}else{if(this.char===CHAR_HYPHEN)return this.goto(this.parseDateTime);throw this.error(new TomlError("Expected hyphen (-) while parsing year part of date"))}}parseNumberBaseOrDateTime(){return this.char===CHAR_b?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerBin)):this.char===CHAR_o?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerOct)):this.char===CHAR_x?(this.consume(),this.call(this.parseNoUnderHexOctBinLiteral,this.parseIntegerHex)):this.char===CHAR_PERIOD?this.goto(this.parseNumberInteger):isDigit(this.char)?this.goto(this.parseDateTimeOnly):this.returnNow(Integer(this.state.buf))}parseIntegerHex(){if(isHexit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseIntegerOct(){if(isOctit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseIntegerBin(){if(isBit(this.char))this.consume();else{if(this.char===CHAR_LOWBAR)return this.call(this.parseNoUnderHexOctBinLiteral);{let s=Integer(this.state.buf);if(s.isNaN())throw this.error(new TomlError("Invalid number"));return this.returnNow(s)}}}parseDateTime(){if(this.state.buf.length<4)throw this.error(new TomlError("Years less than 1000 must be zero padded to four characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseDateMonth)}parseDateMonth(){if(this.char===CHAR_HYPHEN){if(this.state.buf.length<2)throw this.error(new TomlError("Months less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseDateDay)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseDateDay(){if(this.char===CHAR_T||this.char===CHAR_SP){if(this.state.buf.length<2)throw this.error(new TomlError("Days less than 10 must be zero padded to two characters"));return this.state.result+="-"+this.state.buf,this.state.buf="",this.next(this.parseStartTimeHour)}else{if(this.atEndOfWord())return this.returnNow(createDate(this.state.result+"-"+this.state.buf));if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}}parseStartTimeHour(){return this.atEndOfWord()?this.returnNow(createDate(this.state.result)):this.goto(this.parseTimeHour)}parseTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result+="T"+this.state.buf,this.state.buf="",this.next(this.parseTimeMin)}else if(isDigit(this.char))this.consume();else throw this.error(new TomlError("Incomplete datetime"))}parseTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeSec);throw this.error(new TomlError("Incomplete datetime"))}}parseTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseTimeZoneOrFraction)}else throw this.error(new TomlError("Incomplete datetime"))}parseOnlyTimeHour(){if(this.char===CHAR_COLON){if(this.state.buf.length<2)throw this.error(new TomlError("Hours less than 10 must be zero padded to two characters"));return this.state.result=this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeMin)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeMin(){if(this.state.buf.length<2&&isDigit(this.char))this.consume();else{if(this.state.buf.length===2&&this.char===CHAR_COLON)return this.state.result+=":"+this.state.buf,this.state.buf="",this.next(this.parseOnlyTimeSec);throw this.error(new TomlError("Incomplete time"))}}parseOnlyTimeSec(){if(isDigit(this.char)){if(this.consume(),this.state.buf.length===2)return this.next(this.parseOnlyTimeFractionMaybe)}else throw this.error(new TomlError("Incomplete time"))}parseOnlyTimeFractionMaybe(){if(this.state.result+=":"+this.state.buf,this.char===CHAR_PERIOD)this.state.buf="",this.next(this.parseOnlyTimeFraction);else return this.return(createTime(this.state.result))}parseOnlyTimeFraction(){if(isDigit(this.char))this.consume();else if(this.atEndOfWord()){if(this.state.buf.length===0)throw this.error(new TomlError("Expected digit in milliseconds"));return this.returnNow(createTime(this.state.result+"."+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}parseTimeZoneOrFraction(){if(this.char===CHAR_PERIOD)this.consume(),this.next(this.parseDateTimeFraction);else if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}parseDateTimeFraction(){if(isDigit(this.char))this.consume();else{if(this.state.buf.length===1)throw this.error(new TomlError("Expected digit in milliseconds"));if(this.char===CHAR_HYPHEN||this.char===CHAR_PLUS)this.consume(),this.next(this.parseTimeZoneHour);else{if(this.char===CHAR_Z)return this.consume(),this.return(createDateTime(this.state.result+this.state.buf));if(this.atEndOfWord())return this.returnNow(createDateTimeFloat(this.state.result+this.state.buf));throw this.error(new TomlError("Unexpected character in datetime, expected period (.), minus (-), plus (+) or Z"))}}}parseTimeZoneHour(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.next(this.parseTimeZoneSep)}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseTimeZoneSep(){if(this.char===CHAR_COLON)this.consume(),this.next(this.parseTimeZoneMin);else throw this.error(new TomlError("Unexpected character in datetime, expected colon"))}parseTimeZoneMin(){if(isDigit(this.char)){if(this.consume(),/\d\d$/.test(this.state.buf))return this.return(createDateTime(this.state.result+this.state.buf))}else throw this.error(new TomlError("Unexpected character in datetime, expected digit"))}parseBoolean(){if(this.char===CHAR_t)return this.consume(),this.next(this.parseTrue_r);if(this.char===CHAR_f)return this.consume(),this.next(this.parseFalse_a)}parseTrue_r(){if(this.char===CHAR_r)return this.consume(),this.next(this.parseTrue_u);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_u(){if(this.char===CHAR_u)return this.consume(),this.next(this.parseTrue_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseTrue_e(){if(this.char===CHAR_e)return this.return(!0);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_a(){if(this.char===CHAR_a)return this.consume(),this.next(this.parseFalse_l);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_l(){if(this.char===CHAR_l)return this.consume(),this.next(this.parseFalse_s);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_s(){if(this.char===CHAR_s)return this.consume(),this.next(this.parseFalse_e);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseFalse_e(){if(this.char===CHAR_e)return this.return(!1);throw this.error(new TomlError("Invalid boolean, expected true or false"))}parseInlineList(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===t.END)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_NUM?this.call(this.parseComment):this.char===CHAR_RSQB?this.return(this.state.resultArr||InlineList()):this.callNow(this.parseValue,this.recordInlineListValue)}recordInlineListValue(s){if(this.state.resultArr){let i=this.state.resultArr[_contentType],n=tomlType(s);if(i!==n)throw this.error(new TomlError(`Inline lists must be a single type, not a mix of ${i} and ${n}`))}else this.state.resultArr=InlineList(tomlType(s));return isFloat(s)||isInteger(s)?this.state.resultArr.push(s.valueOf()):this.state.resultArr.push(s),this.goto(this.parseInlineListNext)}parseInlineListNext(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M||this.char===CTRL_J)return null;if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CHAR_COMMA)return this.next(this.parseInlineList);if(this.char===CHAR_RSQB)return this.goto(this.parseInlineList);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}parseInlineTable(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));return this.char===CHAR_RCUB?this.return(this.state.resultTable||InlineTable()):(this.state.resultTable||(this.state.resultTable=InlineTable()),this.callNow(this.parseAssign,this.recordInlineTableValue))}recordInlineTableValue(s){let i=this.state.resultTable,n=s.key.pop();for(let o of s.key){if(hasKey(i,o)&&(!isTable(i[o])||i[o][_declared]))throw this.error(new TomlError("Can't redefine existing key"));i=i[o]=i[o]||Table()}if(hasKey(i,n))throw this.error(new TomlError("Can't redefine existing key"));return isInteger(s.value)||isFloat(s.value)?i[n]=s.value.valueOf():i[n]=s.value,this.goto(this.parseInlineTableNext)}parseInlineTableNext(){if(this.char===CHAR_SP||this.char===CTRL_I)return null;if(this.char===t.END||this.char===CHAR_NUM||this.char===CTRL_J||this.char===CTRL_M)throw this.error(new TomlError("Unterminated inline array"));if(this.char===CHAR_COMMA)return this.next(this.parseInlineTable);if(this.char===CHAR_RCUB)return this.goto(this.parseInlineTable);throw this.error(new TomlError("Invalid character, expected whitespace, comma (,) or close bracket (])"))}}return e}});var la=x((qd,aa)=>{"use strict";aa.exports=ff;function ff(t,e){if(t.pos==null||t.line==null)return t;let r=t.message;if(r+=` at row ${t.line+1}, col ${t.col+1}, pos ${t.pos}:
|
|
11
|
-
`,e&&e.split){let s=e.split(/\n/),i=String(Math.min(s.length,t.line+3)).length,n=" ";for(;n.length<i;)n+=" ";for(let o=Math.max(0,t.line-1);o<Math.min(s.length,t.line+2);++o){let a=String(o+1);if(a.length<i&&(a=" "+a),t.line===o){r+=a+"> "+s[o]+`
|
|
12
|
-
`,r+=n+" ";for(let l=0;l<t.col;++l)r+=" ";r+=`^
|
|
13
|
-
`}else r+=a+": "+s[o]+`
|
|
14
|
-
`}}return t.message=r+`
|
|
15
|
-
`,t}});var ca=x((Bd,ha)=>{"use strict";ha.exports=mf;var pf=oa(),df=la();function mf(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new pf;try{return e.parse(t),e.finish()}catch(r){throw df(r,t)}}});function Zt({onlyFirst:t=!1}={}){let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}var sr=de(ds(),1);var ms=sr.default.HttpProxyAgent,gs=sr.default.HttpsProxyAgent;var Ze=class extends Map{#s=0;#r=new Map;#e=new Map;#f;#T;#a;constructor(e={}){if(super(),!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if(typeof e.maxAge=="number"&&e.maxAge===0)throw new TypeError("`maxAge` must be a number greater than 0");this.#f=e.maxSize,this.#T=e.maxAge||Number.POSITIVE_INFINITY,this.#a=e.onEviction}get __oldCache(){return this.#e}#m(e){if(typeof this.#a=="function")for(let[r,s]of e)this.#a(r,s.value)}#i(e,r){return typeof r.expiry=="number"&&r.expiry<=Date.now()?(typeof this.#a=="function"&&this.#a(e,r.value),this.delete(e)):!1}#n(e,r){if(this.#i(e,r)===!1)return r.value}#t(e,r){return r.expiry?this.#n(e,r):r.value}#h(e,r){let s=r.get(e);return this.#t(e,s)}#p(e,r){this.#r.set(e,r),this.#s++,this.#s>=this.#f&&(this.#s=0,this.#m(this.#e),this.#e=this.#r,this.#r=new Map)}#c(e,r){this.#e.delete(e),this.#p(e,r)}*#l(){for(let e of this.#e){let[r,s]=e;this.#r.has(r)||this.#i(r,s)===!1&&(yield e)}for(let e of this.#r){let[r,s]=e;this.#i(r,s)===!1&&(yield e)}}get(e){if(this.#r.has(e)){let r=this.#r.get(e);return this.#t(e,r)}if(this.#e.has(e)){let r=this.#e.get(e);if(this.#i(e,r)===!1)return this.#c(e,r),r.value}}set(e,r,{maxAge:s=this.#T}={}){let i=typeof s=="number"&&s!==Number.POSITIVE_INFINITY?Date.now()+s:void 0;return this.#r.has(e)?this.#r.set(e,{value:r,expiry:i}):this.#p(e,{value:r,expiry:i}),this}has(e){return this.#r.has(e)?!this.#i(e,this.#r.get(e)):this.#e.has(e)?!this.#i(e,this.#e.get(e)):!1}peek(e){if(this.#r.has(e))return this.#h(e,this.#r);if(this.#e.has(e))return this.#h(e,this.#e)}delete(e){let r=this.#r.delete(e);return r&&this.#s--,this.#e.delete(e)||r}clear(){this.#r.clear(),this.#e.clear(),this.#s=0}resize(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");let r=[...this.#l()],s=r.length-e;s<0?(this.#r=new Map(r),this.#e=new Map,this.#s=r.length):(s>0&&this.#m(r.slice(0,s)),this.#e=new Map(r.slice(s)),this.#r=new Map,this.#s=0),this.#f=e}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.#r){let[r,s]=e;this.#i(r,s)===!1&&(yield[r,s.value])}for(let e of this.#e){let[r,s]=e;this.#r.has(r)||this.#i(r,s)===!1&&(yield[r,s.value])}}*entriesDescending(){let e=[...this.#r];for(let r=e.length-1;r>=0;--r){let s=e[r],[i,n]=s;this.#i(i,n)===!1&&(yield[i,n.value])}e=[...this.#e];for(let r=e.length-1;r>=0;--r){let s=e[r],[i,n]=s;this.#r.has(i)||this.#i(i,n)===!1&&(yield[i,n.value])}}*entriesAscending(){for(let[e,r]of this.#l())yield[e,r.value]}get size(){if(!this.#s)return this.#e.size;let e=0;for(let r of this.#e.keys())this.#r.has(r)||e++;return Math.min(this.#s+e,this.#f)}get maxSize(){return this.#f}entries(){return this.entriesAscending()}forEach(e,r=this){for(let[s,i]of this.entriesAscending())e.call(r,i,s,this)}get[Symbol.toStringTag](){return JSON.stringify([...this.entriesAscending()])}};var xs=de(As(),1);import{Agent as Qa}from"node:http";import{Agent as Za}from"node:https";var Ja={agentCacheSize:512},Rs={maxSockets:64,keepAlive:!1},ir=class t extends Error{constructor(e){super(e),this.name="TimeoutError",Error.captureStackTrace?.(this,t)}};function nr(t,e={}){if(!("undici"in e))throw new Error("The 'undici' option is required");let r={...Ja,...e},s=new Ze({maxSize:r.agentCacheSize});async function i(o,a={}){let{origin:l,protocol:h}=new URL(o),p=a?.noProxy?null:(0,xs.getProxyForUrl)(o),u=JSON.stringify({proxyUrl:p,origin:l,...a});if(s.has(u))return s.get(u);let c;if("noProxy"in a&&delete a.noProxy,e.undici){let{ProxyAgent:f,Agent:A}=await import("undici"),E={...a};"keepAlive"in E&&!("pipelining"in E)&&(E.pipelining=E.keepAlive?1:0),"keepAlive"in E&&delete E.keepAlive,"maxSockets"in E&&(E.connections=E.maxSockets,delete E.maxSockets),p?c=new f({...E,uri:p}):c=new A(E)}else{let f=h==="https:";p?c=new(f?gs:ms)({...a,proxy:p}):c=new(f?Za:Qa)(a)}return s.set(u,c),c}let n=(o,{timeout:a=0,agentOpts:l={},...h}={})=>new Promise(async(p,u)=>{if(!e.undici&&!("agent"in h)){let A=await i(o,{...Rs,...l});A&&(h.agent=A)}else if(e.undici&&!("dispatcher"in h)){let A=await i(o,{...Rs,...l});A&&(h.dispatcher=A)}let c,f;a&&(!("signal"in h)&&globalThis.AbortController&&(f=new AbortController,h.signal=f.signal),c=setTimeout(()=>{f?.abort?.();let A=new ir(`${h.method||"GET"} ${o} timed out after ${a}ms`);u(A)},a),c?.unref?.()),t(o,h).then(A=>{c&&clearTimeout(c),p(A)}).catch(A=>{if(c&&clearTimeout(c),A.name==="AbortError")return p(null);u(A)})});return n.clearCache=()=>{for(let o of s.values())"destroy"in o&&o.destroy();s.clear()},n}var Ca=de(or(),1),Sa=de(Qs(),1),$a=de(cr(),1),W=de(Xn(),1),va=de(eo(),1),Oa=de(mo(),1);import{cwd as gf,stdout as Ef,argv as Af,env as Vt,exit as ua,versions as Rf}from"node:process";import{join as cs,dirname as Ia,basename as ts,resolve as Kt}from"node:path";import{lstatSync as fa,readFileSync as pa,truncateSync as xf,writeFileSync as yf,accessSync as wf}from"node:fs";var yu=[[1e3,6e4,"sec"],[6e4,36e5,"min"],[36e5,864e5,"hour"],[864e5,6048e5,"day"],[6048e5,2628e6,"week"],[2628e6,31536e6,"month"],[31536e6,1/0,"year"]],wu={"1 day ago":"yesterday","1 week ago":"last week","1 month ago":"last month","1 year ago":"last year","in 1 day":"tomorrow","in 1 week":"next week","in 1 month":"next month","in 1 year":"next year"},_u={sec:"second",min:"minute"};function Ut(t,{now:e,noAffix:r=!1,times:s=yu,nowThreshold:i=2e3,nowString:n="now",aliases:o=!1,aliasesMap:a=wu,longUnits:l=!1}={}){if(t=typeof t=="number"?t:Date.parse(t),e=e?typeof e=="number"?e:Date.parse(e):new Date,Number.isNaN(t))return"unknown";let h=!1,p=e-t;if(p<0&&(h=!0,p=Math.abs(p)),p<i)return n;let u,c;for(let A=0,E=s.length;A<E;A++){let v=s[A];if(!(p>=v[1])){u=Math.floor(p/v[0]),c=(l&&_u[v[2]]||v[2])+(u>1?"s":"");break}}let f=`${h&&!r?"in ":""}${u} ${c}${!h&&!r?" ago":""}`;return o?a[f]??f:f}import Pr from"node:process";import Tu from"node:os";import go from"node:tty";function ue(t,e=globalThis.Deno?globalThis.Deno.args:Pr.argv){let r=t.startsWith("-")?"":t.length===1?"-":"--",s=e.indexOf(r+t),i=e.indexOf("--");return s!==-1&&(i===-1||s<i)}var{env:X}=Pr,Mt;ue("no-color")||ue("no-colors")||ue("color=false")||ue("color=never")?Mt=0:(ue("color")||ue("colors")||ue("color=true")||ue("color=always"))&&(Mt=1);function bu(){if("FORCE_COLOR"in X)return X.FORCE_COLOR==="true"?1:X.FORCE_COLOR==="false"?0:X.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(X.FORCE_COLOR,10),3)}function Cu(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function Su(t,{streamIsTTY:e,sniffFlags:r=!0}={}){let s=bu();s!==void 0&&(Mt=s);let i=r?Mt:s;if(i===0)return 0;if(r){if(ue("color=16m")||ue("color=full")||ue("color=truecolor"))return 3;if(ue("color=256"))return 2}if("TF_BUILD"in X&&"AGENT_NAME"in X)return 1;if(t&&!e&&i===void 0)return 0;let n=i||0;if(X.TERM==="dumb")return n;if(Pr.platform==="win32"){let o=Tu.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in X)return"GITHUB_ACTIONS"in X||"GITEA_ACTIONS"in X?3:["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in X)||X.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in X)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(X.TEAMCITY_VERSION)?1:0;if(X.COLORTERM==="truecolor"||X.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in X){let o=Number.parseInt((X.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(X.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(X.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(X.TERM)||"COLORTERM"in X?1:n}function Eo(t,e={}){let r=Su(t,{streamIsTTY:t&&t.isTTY,...e});return Cu(r)}var $u={stdout:Eo({isTTY:go.isatty(1)}),stderr:Eo({isTTY:go.isatty(2)})},Ao=$u;var Ro=!0;function xo(){Ro=!1}function Ur(t,e,r){return Ro?`\x1B[${e}m${t.join(" ")}\x1B[${r}m`:t.join(" ")}var Mr=(...t)=>Ur(t,31,39),We=(...t)=>Ur(t,32,39);var Ft=(...t)=>Ur(t,35,39);var vu=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var Fr=new Set(["__proto__","prototype","constructor"]),Ou=new Set("0123456789");function Iu(t){let e=[],r="",s="start",i=!1;for(let n of t)switch(n){case"\\":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd")throw new Error("Invalid character after an index");i&&(r+=n),s="property",i=!i;break}case".":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd"){s="property";break}if(i){i=!1,r+=n;break}if(Fr.has(r))return[];e.push(r),r="",s="property";break}case"[":{if(s==="index")throw new Error("Invalid character in an index");if(s==="indexEnd"){s="index";break}if(i){i=!1,r+=n;break}if(s==="property"){if(Fr.has(r))return[];e.push(r),r=""}s="index";break}case"]":{if(s==="index"){e.push(Number.parseInt(r,10)),r="",s="indexEnd";break}if(s==="indexEnd")throw new Error("Invalid character after an index")}default:{if(s==="index"&&!Ou.has(n))throw new Error("Invalid character in an index");if(s==="indexEnd")throw new Error("Invalid character after an index");s==="start"&&(s="property"),i&&(i=!1,r+="\\"),r+=n}}switch(i&&(r+="\\"),s){case"property":{if(Fr.has(r))return[];e.push(r);break}case"index":throw new Error("Index was not closed");case"start":{e.push("");break}}return e}function Nu(t,e){if(typeof e!="number"&&Array.isArray(t)){let r=Number.parseInt(e,10);return Number.isInteger(r)&&t[r]===t[e]}return!1}function yo(t,e,r){if(!vu(t)||typeof e!="string")return r===void 0?t:r;let s=Iu(e);if(s.length===0)return r;for(let i=0;i<s.length;i++){let n=s[i];if(Nu(t,n)?t=i===s.length-1?void 0:null:t=t[n],t==null){if(i!==s.length-1)return r;break}}return t===void 0?r:t}var qr=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},wo=t=>globalThis.DOMException===void 0?new qr(t):new DOMException(t),_o=t=>{let e=t.reason===void 0?wo("This operation was aborted."):t.reason;return e instanceof Error?e:wo(e)};async function Br(t,e,{concurrency:r=Number.POSITIVE_INFINITY,stopOnError:s=!0,signal:i}={}){return new Promise((n,o)=>{if(t[Symbol.iterator]===void 0&&t[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(r)||r===Number.POSITIVE_INFINITY)&&r>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${r}\` (${typeof r})`);let a=[],l=[],h=new Map,p=!1,u=!1,c=!1,f=0,A=0,E=t[Symbol.iterator]===void 0?t[Symbol.asyncIterator]():t[Symbol.iterator](),v=S=>{p=!0,u=!0,o(S)};i&&(i.aborted&&v(_o(i)),i.addEventListener("abort",()=>{v(_o(i))}));let b=async()=>{if(u)return;let S=await E.next(),N=A;if(A++,S.done){if(c=!0,f===0&&!u){if(!s&&l.length>0){v(new AggregateError(l));return}if(u=!0,h.size===0){n(a);return}let y=[];for(let[C,L]of a.entries())h.get(C)!==To&&y.push(L);n(y)}return}f++,(async()=>{try{let y=await S.value;if(u)return;let C=await e(y,N);C===To&&h.set(N,C),a[N]=C,f--,await b()}catch(y){if(s)v(y);else{l.push(y),f--;try{await b()}catch(C){v(C)}}}})()};(async()=>{for(let S=0;S<r;S++){try{await b()}catch(N){v(N);break}if(c||p)break}})()})}var To=Symbol("skip");async function Gr(t,e){return Br(t,r=>r(),e)}function ke(t,e){var r=0,s,i;e=e||{};function n(){var o=s,a=arguments.length,l,h;e:for(;o;){if(o.args.length!==arguments.length){o=o.next;continue}for(h=0;h<a;h++)if(o.args[h]!==arguments[h]){o=o.next;continue e}return o!==s&&(o===i&&(i=o.prev),o.prev.next=o.next,o.next&&(o.next.prev=o.prev),o.next=s,o.prev=null,s.prev=o,s=o),o.val}for(l=new Array(a),h=0;h<a;h++)l[h]=arguments[h];return o={args:l,val:t.apply(null,l)},s?(s.prev=o,o.next=s):i=o,r===e.maxSize?(i=i.prev,i.next=null):r++,s=o,o.val}return n.clear=function(){s=null,i=null,r=0},n}var as=de(Vo(),1),Qe;globalThis.fetch&&!Rf.node?Qe=globalThis.fetch:Qe=nr(globalThis.fetch,{undici:!0});var Na=96,we="\0",_f=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,Tf=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,ls=/^[0-9a-f]{7,}$/i,da=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Xt=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),bf=ke(Oa.default.fromUrl),rs=ke(Sa.default),Yt=ke(t=>t.endsWith("/")?t.substring(0,t.length-1):t),Cf=new Set(["patch"]),Sf=new Set(["patch","minor"]),$f=new Set(["patch","minor","major"]),La="15.3.0",F=(0,Ca.default)(Af.slice(2),{boolean:["E","error-on-outdated","U","error-on-unchanged","h","help","j","json","n","no-color","u","update","v","version","V","verbose"],string:["d","allow-downgrade","f","file","g","greatest","m","minor","P","patch","p","prerelease","R","release","r","registry","t","types","githubapi","pypiapi"],alias:{d:"allow-downgrade",E:"error-on-outdated",U:"error-on-unchanged",e:"exclude",f:"file",g:"greatest",h:"help",i:"include",j:"json",m:"minor",n:"no-color",P:"patch",p:"prerelease",r:"registry",R:"release",s:"semver",S:"sockets",t:"types",u:"update",v:"version",V:"verbose"}});(F["no-color"]||!Ao.stdout)&&xo();var Xe=mt(De(F.greatest)),ss=mt(De(F.prerelease)),is=mt(De(F.release)),ma=mt(De(F.patch)),ga=mt(De(F.minor)),Ea=De(F["allow-downgrade"]),Ee=(0,$a.default)("npm",{registry:"https://registry.npmjs.org"}),ns={npmrc:Ee,recursive:!0},Aa=F.githubapi?Yt(F.githubapi):"https://api.github.com",vf=F.pypiapi?Yt(F.pypiapi):"https://pypi.org",Ha=typeof F.sockets=="number"?parseInt(F.sockets):Na;function He(t,e){for(let r of e instanceof Set?e:[])if(r.test(t))return!0;return!1}var Of=ke((t,e)=>{let r=e[`${t}:registry`]||e.registry;return r.endsWith("/")?r:`${r}/`});function Da(t,e,r){let s=cs(e,t);try{return wf(s),s}catch{}let i=Ia(e);return r&&s===r||i===e?null:Da(t,i,r)}function If(t,e){if(t.startsWith("@")){let r=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],s=Yt(Of(r,Ee));if(s!==e)try{let i=rs(s,ns);if(i?.token)return[i,s]}catch{}return[rs(e,ns),e]}else return[rs(e,ns),e]}var Pa=ke((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${La}`,...r&&{Authorization:`${e} ${r}`}}}));async function Nf(t,e,r,s){let[i,n]=If(t,r),a=(e==="resolutions"?zf(t):t).replace(/\//g,"%2f"),l=`${n}/${a}`;F.verbose&&console.error(`${Ft("fetch")} ${l}`);let h=await Qe(l,Pa(s,i?.type,i?.token));if(h?.ok)return F.verbose&&console.error(`${We("done")} ${l}`),[await h.json(),e,n,t];throw h?.status&&h?.statusText?new Error(`Received ${h.status} ${h.statusText} for ${t} from ${n}`):new Error(`Unable to fetch ${t} from ${n}`)}async function Lf(t,e,r){let s=`${vf}/pypi/${t}/json`;F.verbose&&console.error(`${Ft("fetch")} ${s}`);let i=await Qe(s,Pa(r));if(i?.ok)return F.verbose&&console.error(`${We("done")} ${s}`),[await i.json(),e,null,t];throw i?.status&&i?.statusText?new Error(`Received ${i.status} ${i.statusText} for ${t} from PyPi`):new Error(`Unable to fetch ${t} from PyPi`)}function Ra({repository:t,homepage:e,info:r},s,i){r&&(t=r.project_urls.repository||r.project_urls.Repository||r.project_urls.repo||r.project_urls.Repo||r.project_urls.source||r.project_urls.Source||r.project_urls["source code"]||r.project_urls["Source Code"]||r.project_urls.homepage||r.project_urls.Homepage||`https://pypi.org/project/${i}/`);let n;if(s==="https://npm.pkg.github.com")return`https://github.com/${i.replace(/^@/,"")}`;if(t){let o=typeof t=="string"?t:t.url,a=bf(o),l=a?.browse?.();l&&(n=l),n&&t.directory&&a.treepath&&(n=`${n}/${a.treepath}/HEAD/${t.directory}`),!n&&t?.url&&/^https?:/.test(t.url)&&(n=t.url),!n&&o&&(n=o)}return n||e||""}function xa(t){F.json?console.info(JSON.stringify({message:t})):console.info(t),Ye()}function Ye(t){if(t){let e=t.stack||t.message;F.json?console.info(JSON.stringify({error:e})):console.info(Mr(e))}process.exit(t?1:0)}function Hf(t={}){for(let r of Object.keys(t))for(let s of Object.values(t[r]))"oldPrint"in s&&(s.old=s.oldPrint,delete s.oldPrint),"newPrint"in s&&(s.new=s.newPrint,delete s.newPrint),"oldOriginal"in s&&(s.old=s.oldOriginal,delete s.oldOriginal);let e=0;for(let r of Object.keys(t))e+=Object.keys(t[r]).length;if(F.json){let r={results:{}};for(let s of Object.keys(t))for(let[i,n]of Object.entries(t[s])){let[o,a]=i.split(we);r.results[s]||(r.results[s]={}),r.results[s][o]||(r.results[s][o]={}),r.results[s][o][a]=n}console.info(JSON.stringify(r))}else e&&console.info(Pf(t));return F["error-on-outdated"]?e?2:0:F["error-on-unchanged"]?e?0:2:0}async function Df(t,e){let{platform:r}=await import("node:os"),s=r()==="win32";s&&xf(t,0),yf(t,e,s?{flag:"r+"}:void 0)}function ya(t,e,r){if(t===e)return t;let s=t.split(/\./),i=e.split(/\./),n=/^[0-9a-zA-Z-.]+$/,o="";for(let a=0;a<s.length;a++)if(s[a]!==i[a]){n.test(s[a])?o+=r(s.slice(a).join(".")):o+=s[a].split("").map(l=>n.test(l)?r(l):l).join("")+r(`.${s.slice(a+1).join(".")}`);break}else o+=`${s[a]}.`;return o}function Pf(t){let e=[["NAME","OLD","NEW","AGE","INFO"]],r=new Set;for(let s of Object.keys(t))for(let[i,n]of Object.entries(t[s])){let o=i.split(we)[1],a=`${s}|${o}`;r.has(a)||(r.add(a),e.push([o,ya(n.old,n.new,Mr),ya(n.new,n.old,We),n.age||"",n.info]))}return(0,va.default)(e,{hsep:" ",stringLength:s=>s.replace(Zt(),"").length})}function Uf(t,e){let r=t;for(let s of Object.keys(e)){let i=s.split(we)[1],n=e[s].oldOriginal||e[s].old,o=new RegExp(`"${Xt(i)}": *"${Xt(n)}"`,"g");r=r.replace(o,`"${i}": "${e[s].new}"`)}return r}function Mf(t,e){let r=t;for(let s of Object.keys(e)){let i=s.split(we)[1],n=e[s].oldOriginal||e[s].old,o=new RegExp(`${Xt(i)} *= *"${Xt(n)}"`,"g");r=r.replace(o,`${i} = "${e[s].new}"`)}return r}function Ff(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function os(t){let e=(0,W.parse)(t);return e?!!e.prerelease.length:!1}function Ua(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function qf(t){try{return(0,W.coerce)(t).version}catch{return null}}function Bf(t,e,{range:r,semvers:s,usePre:i,useRel:n,useGreatest:o}={}){let a=qf(r),l=0;s=new Set(s),i=Ua(r)||i,i&&(s.add("prerelease"),s.has("patch")&&s.add("prepatch"),s.has("minor")&&s.add("preminor"),s.has("major")&&s.add("premajor"));for(let h of e){let p=(0,W.parse)(h);if(p.prerelease.length&&(!i||n))continue;let u=(0,W.diff)(a,p.version);if(!(!u||!s.has(u)))if(o||!("time"in t))(0,W.gte)((0,W.coerce)(p.version).version,a)&&(a=p.version);else{let c=new Date(t.time[h]).getTime();c>=0&&c>l&&(a=p.version,l=c)}}return a||null}function Gf(t,{mode:e,range:r,useGreatest:s,useRel:i,usePre:n,semvers:o}={}){if(r==="*"||r.includes("||"))return null;let a=Object.keys(e==="pypi"?t.releases:t.versions).filter(h=>(0,W.valid)(h)),l=Bf(t,a,{range:r,semvers:o,usePre:n,useRel:i,useGreatest:s});if(s)return l;{let h,p;e==="pypi"?(p=t.info.version,h=(0,W.coerce)(t.info.version).version):h=t["dist-tags"].latest;let u=(0,W.coerce)(r).version,c=Ua(r),f=os(l),A=os(h),E=(0,W.gt)(l,u);if(!i&&n||c&&f||i&&!E&&c&&!f||c&&!f&&E)return l;if(c&&!f&&!E)return null;let v=(0,W.diff)(u,h);return v&&v!=="prerelease"&&!o.has(v.replace(/^pre/,""))||i&&os(h)?l:(0,W.lt)(h,u)&&!A?Ea===!0||He(t.name,Ea)?h:null:p??h}}async function jf([t,e],{useGreatest:r}={}){let s=e.old.replace(_f,""),[i,n,o,a]=Tf.exec(s)||[];if(!(!n||!o||!a))if(ls.test(a)){let l={maxSockets:Ha},h=Vt.UPDATES_GITHUB_API_TOKEN||Vt.GITHUB_API_TOKEN||Vt.GH_TOKEN||Vt.HOMEBREW_GITHUB_API_TOKEN;h&&(l.headers={Authorization:`Bearer ${h}`});let p=`${Aa}/repos/${n}/${o}/commits`;F.verbose&&console.error(`${Ft("fetch")} ${p}`);let u=await Qe(p,l);if(F.verbose&&u?.ok&&console.error(`${We("done")} ${p}`),!u||!u.ok)return;let c=await u.json(),{sha:f,commit:A}=c[0];if(!f||!f.length)return;let E=A?.committer?.date??A?.author?.date;if(f=f.substring(0,a.length),a!==f){let v=e.old.replace(a,f);return{key:t,newRange:v,user:n,repo:o,oldRef:a,newRef:f,newDate:E}}}else{let l=await Qe(`${Aa}/repos/${n}/${o}/git/refs/tags`);if(!l||!l.ok)return;let p=(await l.json()).map(c=>c.ref.replace(/^refs\/tags\//,"")),u=a.replace(/^v/,"");if(!(0,W.valid)(u))return;if(r){let c=a,f=a.replace(/^v/,"");for(let A of p){let E=A.replace(/^v/,"");(0,W.valid)(E)&&(!c||(0,W.gt)(E,f))&&(c=A,f=E)}if((0,W.neq)(u,f))return{key:t,newRange:c,user:n,repo:o,oldRef:a,newRef:c}}else{let c=p[p.length-1],f=c.replace(/^v/,"");if(!(0,W.valid)(f))return;if((0,W.neq)(u,f))return{key:t,newRange:c,user:n,repo:o,oldRef:a,newRef:c}}}}function zf(t){let e=t.match(/(@[^/]+\/)?([^/]+)/g)||[];return e[e.length-1]}function Wf(t){let e=t.match(da);return e?.length!==1?t:t.replace(da,(0,W.coerce)(e[0]))}function De(t){return t===void 0?!1:t===""?!0:typeof t=="string"?t.includes(",")?new Set(t.split(",")):new Set([t]):Array.isArray(t)?new Set(t):!1}function wa(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}async function _a(t=[]){return[...(await import("node:tls")).rootCertificates,...t]}function hs(t,e){return e?/\/.+\//.test(t)?new RegExp(t.slice(1,-1)):as.default.makeRe(t):t instanceof RegExp?t:as.default.makeRe(t)}function mt(t){if(t instanceof Set){let e=new Set;for(let r of t)e.add(hs(r,!0));return e}return t}function Ta(t,e){let r=new Set;for(let s of t||[])r.add(hs(s,!0));for(let s of e||[])r.add(hs(s,!1));return r}function ba(t,e,{include:r,exclude:s}){if(e==="pypi"&&t==="python")return!1;if(!r.size&&!s.size)return!0;for(let i of s)if(i.test(t))return!1;for(let i of r)if(i.test(t))return!0;return!r.size}function kf(t){let e=new Set;if(t)for(let r of t){let s;try{s=fa(r)}catch(i){throw new Error(`Unable to open ${r}: ${i.message}`)}if(s?.isFile())e.add(Kt(r));else if(s?.isDirectory())for(let i of["package.json","pyproject.toml"]){let n=cs(r,i),o;try{o=fa(n)}catch{}o?.isFile()&&e.add(Kt(n))}else throw new Error(`${r} is neither a file nor directory`)}else for(let r of["package.json","pyproject.toml"]){let s=gf(),i=Da(r,s);i&&e.add(Kt(i))}return e}async function Vf(){for(let c of[process.stdout,process.stderr])c?._handle?.setBlocking?.(!0);let{help:t,version:e,file:r,types:s,update:i}=F;t&&(Ef.write(`usage: updates [options]
|
|
16
|
-
|
|
17
|
-
Options:
|
|
18
|
-
-u, --update Update versions and write package file
|
|
19
|
-
-f, --file <path,...> File or directory to use, defaults to current directory
|
|
20
|
-
-i, --include <pkg,...> Include only given packages
|
|
21
|
-
-e, --exclude <pkg,...> Exclude given packages
|
|
22
|
-
-p, --prerelease [<pkg,...>] Consider prerelease versions
|
|
23
|
-
-R, --release [<pkg,...>] Only use release versions, may downgrade
|
|
24
|
-
-g, --greatest [<pkg,...>] Prefer greatest over latest version
|
|
25
|
-
-t, --types <type,...> Check only given dependency types
|
|
26
|
-
-P, --patch [<pkg,...>] Consider only up to semver-patch
|
|
27
|
-
-m, --minor [<pkg,...>] Consider only up to semver-minor
|
|
28
|
-
-d, --allow-downgrade [<pkg,...>] Allow version downgrades when using latest version
|
|
29
|
-
-E, --error-on-outdated Exit with code 2 when updates are available and 0 when not
|
|
30
|
-
-U, --error-on-unchanged Exit with code 0 when updates are available and 2 when not
|
|
31
|
-
-r, --registry <url> Override npm registry URL
|
|
32
|
-
-S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: ${Na}
|
|
33
|
-
-j, --json Output a JSON object
|
|
34
|
-
-n, --no-color Disable color output
|
|
35
|
-
-v, --version Print the version
|
|
36
|
-
-V, --verbose Print verbose output to stderr
|
|
37
|
-
-h, --help Print this help
|
|
38
|
-
|
|
39
|
-
Examples:
|
|
40
|
-
$ updates
|
|
41
|
-
$ updates -u
|
|
42
|
-
$ updates -e '@vitejs/*'
|
|
43
|
-
$ updates -e '/^react-(dom)?/'
|
|
44
|
-
$ updates -f package.json
|
|
45
|
-
$ updates -f pyproject.toml
|
|
46
|
-
`),ua(0)),e&&(console.info(La),ua(0));let n={},o={},a={},l={},h=0;for(let c of kf(De(r))){let f=Ia(Kt(c)),A=ts(c),E;A==="pyproject.toml"?E="pypi":E="npm",l[E]=c,n[E]||(n[E]={});let v={};try{({default:v}=await Promise.any(["updates.config.js","updates.config.mjs",".config/updates.js",".config/updates.mjs"].map(d=>import(cs(f,...d.split("/"))))))}catch{}let b,S;F.include&&F.include!==!0&&(b=(Array.isArray(F.include)?F.include:[F.include]).flatMap(d=>d.split(","))),F.exclude&&F.exclude!==!0&&(S=(Array.isArray(F.exclude)?F.exclude:[F.exclude]).flatMap(d=>d.split(",")));let N=Ta(b,v?.include),y=Ta(S,v?.exclude),C={};if(E==="npm"&&(Ee["strict-ssl"]===!1&&(C.rejectUnauthorized=!1),"cafile"in Ee&&(C.ca=_a(wa(pa(Ee.cafile,"utf8")))),"ca"in Ee)){let d=Array.isArray(Ee.ca)?Ee.ca:[Ee.ca];C.ca=_a(d.map(z=>wa(z)))}let L;s?L=Array.isArray(s)?s:s.split(","):"types"in v&&Array.isArray(v.types)?L=v.types:E==="npm"?L=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"]:L=["tool.poetry.dependencies","tool.poetry.dev-dependencies","tool.poetry.test-dependencies","tool.poetry.group.dev.dependencies","tool.poetry.group.test.dependencies"];let $;try{a[E]=pa(c,"utf8")}catch(d){throw new Error(`Unable to open ${c}: ${d.message}`)}try{E==="npm"?$=JSON.parse(a[E]):$=(await Promise.resolve().then(()=>de(ca(),1))).default(a[E])}catch(d){throw new Error(`Error parsing ${c}: ${d.message}`)}for(let d of L){let z;E==="npm"?z=$[d]||{}:z=yo($,d)||{};for(let[U,B]of Object.entries(z))(0,W.validRange)(B)&&ba(U,E,{include:N,exclude:y})?n[E][`${d}${we}${U}`]={old:Wf(B),oldOriginal:B}:E==="npm"&&ba(U,E,{include:N,exclude:y})&&(o[`${d}${we}${U}`]={old:B})}if(h+=Object.keys(n[E]).length+Object.keys(o).length,!h)continue;let I;E==="npm"&&(I=Yt(F.registry||v.registry||Ee.registry));let O=await Gr(Object.keys(n[E]).map(d=>()=>{let[z,U]=d.split(we);return E==="npm"?Nf(U,z,I,C):Lf(U,z,C)}),{concurrency:Ha});for(let[d,z,U,B]of O){if(d?.error)throw new Error(d.error);let m=typeof Xe=="boolean"?Xe:He(d.name,Xe),g=typeof ss=="boolean"?ss:He(d.name,ss),ee=typeof is=="boolean"?is:He(d.name,is),D;ma===!0||He(d.name,ma)?D=Cf:ga===!0||He(d.name,ga)?D=Sf:D=$f;let q=`${z}${we}${B}`,ae=n[E][q].old,Q=Gf(d,{usePre:g,useRel:ee,useGreatest:m,semvers:D,range:ae,mode:E}),fe=Ff(ae,Q);!Q||ae===fe?delete n[E][q]:(n[E][q].new=fe,E==="npm"?n[E][q].info=Ra(d?.versions?.[Q],U,d.name):n[E][q].info=Ra(d,U,d.info.name),d.time?.[Q]?n[E][q].age=Ut(d.time[Q],{noAffix:!0}):d.releases?.[Q]?.[0]?.upload_time_iso_8601&&(n[E][q].age=Ut(d.releases[Q][0].upload_time_iso_8601,{noAffix:!0})))}if(Object.keys(o).length){let d=await Promise.all(Object.entries(o).map(([z,U])=>{let B=z.split(we)[1],m=typeof Xe=="boolean"?Xe:He(B,Xe);return jf([z,U],{useGreatest:m})}));for(let z of(d||[]).filter(Boolean)){let{key:U,newRange:B,user:m,repo:g,oldRef:ee,newRef:D,newDate:q}=z;n[E][U]={old:o[U].old,new:B,oldPrint:ls.test(ee)?ee.substring(0,7):ee,newPrint:ls.test(D)?D.substring(0,7):D,info:`https://github.com/${m}/${g}`,...q?{age:Ut(q,{noAffix:!0})}:{}}}}}h===0&&(xa("No dependencies found, nothing to do."),Ye());let p=0;for(let c of Object.keys(n))p+=Object.keys(n[c]).length;p||(xa("All dependencies are up to date."),Ye());let u=Hf(n);if(i){for(let c of Object.keys(n))if(Object.keys(n[c]).length){try{let f=c==="npm"?Uf:Mf;await Df(l[c],f(a[c],n[c]))}catch(f){throw new Error(`Error writing ${ts(l[c])}: ${f.message}`)}console.info(We(`\u2728 ${ts(l[c])} updated`))}}Ye(u)}Vf().catch(Ye).then(Ye);
|