updates 16.0.0 → 16.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +15 -5
  2. package/dist/updates.js +10 -10
  3. package/package.json +12 -12
package/README.md CHANGED
@@ -7,7 +7,7 @@
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`.
10
+ With Node.js:
11
11
 
12
12
  ```bash
13
13
  # check for updates
@@ -17,6 +17,16 @@ npx updates
17
17
  npx updates -u && npm i
18
18
  ```
19
19
 
20
+ With Bun:
21
+
22
+ ```bash
23
+ # check for updates
24
+ bunx updates
25
+
26
+ # update package.json and install new dependencies
27
+ bunx updates -u && bun i
28
+ ```
29
+
20
30
  ## Options
21
31
 
22
32
  See `--help`. Options that take multiple arguments can take them either via comma-separated value or by specifying the option multiple times.
@@ -47,10 +57,10 @@ export default {
47
57
 
48
58
  The config file can be placed in these locations, relative to `package.json`:
49
59
 
50
- - `updates.config.js`
51
- - `updates.config.mjs`
52
- - `.config/updates.js`
53
- - `.config/updates.mjs`
60
+ - `updates.config.{js,ts,mjs,mts}`
61
+ - `.config/updates.{js,ts,mjs,mts}`
62
+
63
+ For typescript, your runtime needs to support it either natively or via a node loader.
54
64
 
55
65
  ### Config File Options
56
66
 
package/dist/updates.js CHANGED
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
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
3
+ var wa=Object.create;var ts=Object.defineProperty;var ya=Object.getOwnPropertyDescriptor;var Ta=Object.getOwnPropertyNames;var xa=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 _=(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 Ta(e))!ba.call(t,i)&&i!==r&&ts(t,i,{get:()=>e[i],enumerable:!(s=ya(e,i))||s.enumerable});return t};var Te=(t,e,r)=>(r=t!=null?wa(xa(t)):{},Ca(e||!t||!t.__esModule?ts(r,"default",{value:t,enumerable:!0}):r,t));var Jt=_((wf,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(S){return r.bools[S]})}Object.keys(e.alias||{}).forEach(function(w){s[w]=[].concat(e.alias[w]),s[w].forEach(function(S){s[S]=[w].concat(s[w].filter(function(H){return S!==H}))})}),[].concat(e.string).filter(Boolean).forEach(function(w){r.strings[w]=!0,s[w]&&[].concat(s[w]).forEach(function(S){r.strings[S]=!0})});var n=e.default||{},o={_:[]};function a(w,S){return r.allBools&&/^--[^=]+$/.test(S)||r.strings[w]||r.bools[w]||s[w]}function l(w,S,H){for(var O=w,$=0;$<S.length-1;$++){var v=S[$];if(ss(O,v))return;O[v]===void 0&&(O[v]={}),(O[v]===Object.prototype||O[v]===Number.prototype||O[v]===String.prototype)&&(O[v]={}),O[v]===Array.prototype&&(O[v]=[]),O=O[v]}var g=S[S.length-1];ss(O,g)||((O===Object.prototype||O===Number.prototype||O===String.prototype)&&(O={}),O===Array.prototype&&(O=[]),O[g]===void 0||r.bools[g]||typeof O[g]=="boolean"?O[g]=H:Array.isArray(O[g])?O[g].push(H):O[g]=[O[g],H])}function h(w,S,H){if(!(H&&r.unknownFn&&!a(w,H)&&r.unknownFn(H)===!1)){var O=!r.strings[w]&&rs(S)?Number(S):S;l(o,w.split("."),O),(s[w]||[]).forEach(function($){l(o,$.split("."),O)})}}Object.keys(r.bools).forEach(function(w){h(w,n[w]===void 0?!1:n[w])});var c=[];t.indexOf("--")!==-1&&(c=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var u=0;u<t.length;u++){var d=t[u],p,A;if(/^--.+=/.test(d)){var y=d.match(/^--([^=]+)=([\s\S]*)$/);p=y[1];var I=y[2];r.bools[p]&&(I=I!=="false"),h(p,I,d)}else if(/^--no-.+/.test(d))p=d.match(/^--no-(.+)/)[1],h(p,!1,d);else if(/^--.+/.test(d))p=d.match(/^--(.+)/)[1],A=t[u+1],A!==void 0&&!/^(-|--)[^-]/.test(A)&&!r.bools[p]&&!r.allBools&&(!s[p]||!i(p))?(h(p,A,d),u+=1):/^(true|false)$/.test(A)?(h(p,A==="true",d),u+=1):h(p,r.strings[p]?"":!0,d);else if(/^-[^-]+/.test(d)){for(var E=d.slice(1,-1).split(""),C=!1,N=0;N<E.length;N++){if(A=d.slice(N+2),A==="-"){h(E[N],A,d);continue}if(/[A-Za-z]/.test(E[N])&&A[0]==="="){h(E[N],A.slice(1),d),C=!0;break}if(/[A-Za-z]/.test(E[N])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(A)){h(E[N],A,d),C=!0;break}if(E[N+1]&&E[N+1].match(/\W/)){h(E[N],d.slice(N+2),d),C=!0;break}else h(E[N],r.strings[E[N]]?"":!0,d)}p=d.slice(-1)[0],!C&&p!=="-"&&(t[u+1]&&!/^(-|--)[^-]/.test(t[u+1])&&!r.bools[p]&&(!s[p]||!i(p))?(h(p,t[u+1],d),u+=1):t[u+1]&&/^(true|false)$/.test(t[u+1])?(h(p,t[u+1]==="true",d),u+=1):h(p,r.strings[p]?"":!0,d))}else if((!r.unknownFn||r.unknownFn(d)!==!1)&&o._.push(r.strings._||!rs(d)?d:Number(d)),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(S){l(o,S.split("."),n[w])}))}),e["--"]?o["--"]=c.slice():c.forEach(function(w){o._.push(w)}),o}});var os=_((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=_(Se=>{Se.parse=Se.decode=va;Se.stringify=Se.encode=as;Se.safe=Pe;Se.unsafe=gt;var er=typeof process<"u"&&process.platform==="win32"?`\r
4
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}:
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+=Pe(n+"[]")+i+Pe(h)+`
6
+ `}):l&&typeof l=="object"?r.push(n):s+=Pe(n)+i+Pe(l)+er}),e.section&&s.length&&(s="["+Pe(e.section)+"]"+er+s),r.forEach(function(n,o,a){var l=ls(n).join("\\."),h=(e.section?e.section+".":"")+l,c=as(t[n],{section:h,whitespace:e.whitespace});s.length&&c.length&&(s+=er),s+=c}),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 c=gt(h[2]);if(c!=="__proto__"){var u=h[3]?gt(h[4]):!0;switch(u){case"true":case"false":case"null":u=JSON.parse(u)}if(c.length>2&&c.slice(-2)==="[]"){if(c=c.substring(0,c.length-2),c==="__proto__")return;r[c]?Array.isArray(r[c])||(r[c]=[r[c]]):r[c]=[]}Array.isArray(r[c])?r[c].push(u):r[c]=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),c=e,u=h.pop(),d=u.replace(/\\\./g,".");return h.forEach(function(p,A,y){p!=="__proto__"&&((!c[p]||typeof c[p]!="object")&&(c[p]={}),c=c[p])}),c===e&&d===u?!1:(c[d]=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 Pe(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=_((xf,fs)=>{"use strict";var tr=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 c=t[h-1]==="\\"&&t[h-2]!=="\\";c||(i=!i)}if(!i){if(!n&&r+s==="//")a+=t.slice(o,h),o=h,n=tr,h++;else if(n===tr&&r+s===`\r
7
+ `){h++,n=!1,a+=l(t,o,h),o=h;continue}else if(n===tr&&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=_(Ue=>{"use strict";var ds=Xe("fs"),La=us(),Ye=Xe("path"),Ha=ps(),Da=Ue.parse=function(t){return/^\s*{/.test(t)?JSON.parse(Ha(t)):La.parse(t)},Pa=Ue.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}},bf=Ue.json=function(){var t=Pa.apply(null,arguments);return t?Da(t):null},Cf=Ue.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,c){!h||typeof a!="object"||(c===n.length-1&&(a[h]=e[i]),a[h]===void 0&&(a[h]={}),a=a[h])})}return r},Sf=Ue.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=_((Of,_s)=>{"use strict";function Es(t){return t instanceof Buffer||t instanceof Date||t instanceof RegExp}function As(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 Rs(t){var e=[];return t.forEach(function(r,s){typeof r=="object"&&r!==null?Array.isArray(r)?e[s]=Rs(r):Es(r)?e[s]=As(r):e[s]=rr({},r):e[s]=r}),e}function gs(t,e){return e==="__proto__"?void 0:t[e]}var rr=_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]=Rs(r);return}else if(Es(r)){t[o]=As(r);return}else if(typeof s!="object"||s===null||Array.isArray(s)){t[o]=rr({},r);return}else{t[o]=rr(s,r);return}})}),t}});var sr=_((vf,xs)=>{var Qe=ms(),Fe=Xe("path").join,Ua=ws(),ys="/etc",Ts=process.platform==="win32",Ze=Ts?process.env.USERPROFILE:process.env.HOME;xs.exports=function(t,e,r,s){if(typeof t!="string")throw new Error("rc(name): name *must* be string");r||(r=Jt()(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 Ts||[Fe(ys,t,"config"),Fe(ys,t+"rc")].forEach(a),Ze&&[Fe(Ze,".config",t,"config"),Fe(Ze,".config",t),Fe(Ze,"."+t,"config"),Fe(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=_((If,Is)=>{var ir=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||sr()("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=ir.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(ir.resolve(t,"."),e);r.pathname=ir.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=_((Nf,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=_((Lf,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 $e=_((xe,Ds)=>{var{MAX_SAFE_COMPONENT_LENGTH:nr}=Je(),Ya=et();xe=Ds.exports={};var Qa=xe.re=[],x=xe.src=[],b=xe.t={},Za=0,L=(t,e,r)=>{let s=Za++;Ya(t,s,e),b[t]=s,x[s]=e,Qa[s]=new RegExp(e,r?"g":void 0)};L("NUMERICIDENTIFIER","0|[1-9]\\d*");L("NUMERICIDENTIFIERLOOSE","[0-9]+");L("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");L("MAINVERSION",`(${x[b.NUMERICIDENTIFIER]})\\.(${x[b.NUMERICIDENTIFIER]})\\.(${x[b.NUMERICIDENTIFIER]})`);L("MAINVERSIONLOOSE",`(${x[b.NUMERICIDENTIFIERLOOSE]})\\.(${x[b.NUMERICIDENTIFIERLOOSE]})\\.(${x[b.NUMERICIDENTIFIERLOOSE]})`);L("PRERELEASEIDENTIFIER",`(?:${x[b.NUMERICIDENTIFIER]}|${x[b.NONNUMERICIDENTIFIER]})`);L("PRERELEASEIDENTIFIERLOOSE",`(?:${x[b.NUMERICIDENTIFIERLOOSE]}|${x[b.NONNUMERICIDENTIFIER]})`);L("PRERELEASE",`(?:-(${x[b.PRERELEASEIDENTIFIER]}(?:\\.${x[b.PRERELEASEIDENTIFIER]})*))`);L("PRERELEASELOOSE",`(?:-?(${x[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${x[b.PRERELEASEIDENTIFIERLOOSE]})*))`);L("BUILDIDENTIFIER","[0-9A-Za-z-]+");L("BUILD",`(?:\\+(${x[b.BUILDIDENTIFIER]}(?:\\.${x[b.BUILDIDENTIFIER]})*))`);L("FULLPLAIN",`v?${x[b.MAINVERSION]}${x[b.PRERELEASE]}?${x[b.BUILD]}?`);L("FULL",`^${x[b.FULLPLAIN]}$`);L("LOOSEPLAIN",`[v=\\s]*${x[b.MAINVERSIONLOOSE]}${x[b.PRERELEASELOOSE]}?${x[b.BUILD]}?`);L("LOOSE",`^${x[b.LOOSEPLAIN]}$`);L("GTLT","((?:<|>)?=?)");L("XRANGEIDENTIFIERLOOSE",`${x[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);L("XRANGEIDENTIFIER",`${x[b.NUMERICIDENTIFIER]}|x|X|\\*`);L("XRANGEPLAIN",`[v=\\s]*(${x[b.XRANGEIDENTIFIER]})(?:\\.(${x[b.XRANGEIDENTIFIER]})(?:\\.(${x[b.XRANGEIDENTIFIER]})(?:${x[b.PRERELEASE]})?${x[b.BUILD]}?)?)?`);L("XRANGEPLAINLOOSE",`[v=\\s]*(${x[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${x[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${x[b.XRANGEIDENTIFIERLOOSE]})(?:${x[b.PRERELEASELOOSE]})?${x[b.BUILD]}?)?)?`);L("XRANGE",`^${x[b.GTLT]}\\s*${x[b.XRANGEPLAIN]}$`);L("XRANGELOOSE",`^${x[b.GTLT]}\\s*${x[b.XRANGEPLAINLOOSE]}$`);L("COERCE",`(^|[^\\d])(\\d{1,${nr}})(?:\\.(\\d{1,${nr}}))?(?:\\.(\\d{1,${nr}}))?(?:$|[^\\d])`);L("COERCERTL",x[b.COERCE],!0);L("LONETILDE","(?:~>?)");L("TILDETRIM",`(\\s*)${x[b.LONETILDE]}\\s+`,!0);xe.tildeTrimReplace="$1~";L("TILDE",`^${x[b.LONETILDE]}${x[b.XRANGEPLAIN]}$`);L("TILDELOOSE",`^${x[b.LONETILDE]}${x[b.XRANGEPLAINLOOSE]}$`);L("LONECARET","(?:\\^)");L("CARETTRIM",`(\\s*)${x[b.LONECARET]}\\s+`,!0);xe.caretTrimReplace="$1^";L("CARET",`^${x[b.LONECARET]}${x[b.XRANGEPLAIN]}$`);L("CARETLOOSE",`^${x[b.LONECARET]}${x[b.XRANGEPLAINLOOSE]}$`);L("COMPARATORLOOSE",`^${x[b.GTLT]}\\s*(${x[b.LOOSEPLAIN]})$|^$`);L("COMPARATOR",`^${x[b.GTLT]}\\s*(${x[b.FULLPLAIN]})$|^$`);L("COMPARATORTRIM",`(\\s*)${x[b.GTLT]}\\s*(${x[b.LOOSEPLAIN]}|${x[b.XRANGEPLAIN]})`,!0);xe.comparatorTrimReplace="$1$2$3";L("HYPHENRANGE",`^\\s*(${x[b.XRANGEPLAIN]})\\s+-\\s+(${x[b.XRANGEPLAIN]})\\s*$`);L("HYPHENRANGELOOSE",`^\\s*(${x[b.XRANGEPLAINLOOSE]})\\s+-\\s+(${x[b.XRANGEPLAINLOOSE]})\\s*$`);L("STAR","(<|>)?=?\\s*\\*");L("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");L("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var tt=_((Hf,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 or=_((Df,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 se=_((Pf,js)=>{var At=et(),{MAX_LENGTH:Bs,MAX_SAFE_INTEGER:Rt}=Je(),{re:qs,t:Gs}=$e(),rl=tt(),{compareIdentifiers:Me}=or(),ar=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`);At("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>Rt||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Rt||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Rt||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<Rt)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(At("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)),Me(this.major,e.major)||Me(this.minor,e.minor)||Me(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(At("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 Me(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(At("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 Me(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&&(Me(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=ar});var Oe=_((Uf,Vs)=>{var{MAX_LENGTH:sl}=Je(),{re:Ws,t:zs}=$e(),ks=se(),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=_((Ff,Ks)=>{var ol=Oe(),al=(t,e)=>{let r=ol(t,e);return r?r.version:null};Ks.exports=al});var Qs=_((Mf,Ys)=>{var ll=Oe(),hl=(t,e)=>{let r=ll(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};Ys.exports=hl});var ei=_((Bf,Js)=>{var Zs=se(),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 fe=_((qf,ri)=>{var ti=se(),cl=(t,e,r)=>new ti(t,r).compare(new ti(e,r));ri.exports=cl});var _t=_((Gf,si)=>{var fl=fe(),pl=(t,e,r)=>fl(t,e,r)===0;si.exports=pl});var oi=_((jf,ni)=>{var ii=Oe(),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=_((Wf,ai)=>{var gl=se(),El=(t,e)=>new gl(t,e).major;ai.exports=El});var ui=_((zf,hi)=>{var Al=se(),Rl=(t,e)=>new Al(t,e).minor;hi.exports=Rl});var fi=_((kf,ci)=>{var _l=se(),wl=(t,e)=>new _l(t,e).patch;ci.exports=wl});var di=_((Vf,pi)=>{var yl=Oe(),Tl=(t,e)=>{let r=yl(t,e);return r&&r.prerelease.length?r.prerelease:null};pi.exports=Tl});var gi=_((Kf,mi)=>{var xl=fe(),bl=(t,e,r)=>xl(e,t,r);mi.exports=bl});var Ai=_((Xf,Ei)=>{var Cl=fe(),Sl=(t,e)=>Cl(t,e,!0);Ei.exports=Sl});var wt=_((Yf,_i)=>{var Ri=se(),$l=(t,e,r)=>{let s=new Ri(t,r),i=new Ri(e,r);return s.compare(i)||s.compareBuild(i)};_i.exports=$l});var yi=_((Qf,wi)=>{var Ol=wt(),vl=(t,e)=>t.sort((r,s)=>Ol(r,s,e));wi.exports=vl});var xi=_((Zf,Ti)=>{var Il=wt(),Nl=(t,e)=>t.sort((r,s)=>Il(s,r,e));Ti.exports=Nl});var rt=_((Jf,bi)=>{var Ll=fe(),Hl=(t,e,r)=>Ll(t,e,r)>0;bi.exports=Hl});var yt=_((ep,Ci)=>{var Dl=fe(),Pl=(t,e,r)=>Dl(t,e,r)<0;Ci.exports=Pl});var lr=_((tp,Si)=>{var Ul=fe(),Fl=(t,e,r)=>Ul(t,e,r)!==0;Si.exports=Fl});var Tt=_((rp,$i)=>{var Ml=fe(),Bl=(t,e,r)=>Ml(t,e,r)>=0;$i.exports=Bl});var xt=_((sp,Oi)=>{var ql=fe(),Gl=(t,e,r)=>ql(t,e,r)<=0;Oi.exports=Gl});var hr=_((ip,vi)=>{var jl=_t(),Wl=lr(),zl=rt(),kl=Tt(),Vl=yt(),Kl=xt(),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=_((np,Ii)=>{var Yl=se(),Ql=Oe(),{re:bt,t:Ct}=$e(),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=_((op,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=_((ap,Di)=>{"use strict";Di.exports=F;F.Node=ve;F.create=F;function F(t){var e=this;if(e instanceof F||(e=new F),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}F.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};F.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++}};F.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++}};F.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)eh(this,arguments[t]);return this.length};F.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)th(this,arguments[t]);return this.length};F.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}};F.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}};F.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};F.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};F.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};F.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};F.prototype.map=function(t,e){e=e||this;for(var r=new F,s=this.head;s!==null;)r.push(t.call(e,s.value,this)),s=s.next;return r};F.prototype.mapReverse=function(t,e){e=e||this;for(var r=new F,s=this.tail;s!==null;)r.push(t.call(e,s.value,this)),s=s.prev;return r};F.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};F.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};F.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};F.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};F.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 F;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};F.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 F;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};F.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};F.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 ve(r,null,e,t):new ve(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 ve(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function th(t,e){t.head=new ve(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function ve(t,e,r,s){if(!(this instanceof ve))return new ve(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()(F)}catch{}});var qi=_((lp,Bi)=>{"use strict";var rh=Pi(),Ie=Symbol("max"),Re=Symbol("length"),Be=Symbol("lengthCalculator"),it=Symbol("allowStale"),Ne=Symbol("maxAge"),Ae=Symbol("dispose"),Ui=Symbol("noDisposeOnSet"),te=Symbol("lruList"),me=Symbol("cache"),Mi=Symbol("updateAgeOnGet"),ur=()=>1,fr=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||ur;if(this[Be]=typeof s!="function"?ur:s,this[it]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Ne]=e.maxAge||0,this[Ae]=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[Ie]=e||1/0,st(this)}get max(){return this[Ie]}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[Ne]=e,st(this)}get maxAge(){return this[Ne]}set lengthCalculator(e){typeof e!="function"&&(e=ur),e!==this[Be]&&(this[Be]=e,this[Re]=0,this[te].forEach(r=>{r.length=this[Be](r.value,r.key),this[Re]+=r.length})),st(this)}get lengthCalculator(){return this[Be]}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[Ae]&&this[te]&&this[te].length&&this[te].forEach(e=>this[Ae](e.key,e.value)),this[me]=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[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[me].has(e)){if(n>this[Ie])return qe(this,this[me].get(e)),!1;let l=this[me].get(e).value;return this[Ae]&&(this[Ui]||this[Ae](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 pr(e,r,n,i,s);return o.length>this[Ie]?(this[Ae]&&this[Ae](e,r),!1):(this[Re]+=o.length,this[te].unshift(o),this[me].set(e,this[te].head),st(this),!0)}has(e){if(!this[me].has(e))return!1;let r=this[me].get(e).value;return!St(this,r)}get(e){return cr(this,e,!0)}peek(e){return cr(this,e,!1)}pop(){let e=this[te].tail;return e?(qe(this,e),e.value):null}del(e){qe(this,this[me].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[me].forEach((e,r)=>cr(this,r,!1))}},cr=(t,e,r)=>{let s=t[me].get(e);if(s){let i=s.value;if(St(t,i)){if(qe(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[Ne])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Ne]&&r>t[Ne]},st=t=>{if(t[Re]>t[Ie])for(let e=t[te].tail;t[Re]>t[Ie]&&e!==null;){let r=e.prev;qe(t,e),e=r}},qe=(t,e)=>{if(e){let r=e.value;t[Ae]&&t[Ae](r.key,r.value),t[Re]-=r.length,t[me].delete(r.key),t[te].removeNode(e)}},pr=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)&&(qe(t,r),t[it]||(i=void 0)),i&&e.call(s,i.value,i.key,t)};Bi.exports=fr});var pe=_((hp,zi)=>{var dr=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 mr)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?le[oe.HYPHENRANGELOOSE]:le[oe.HYPHENRANGE];e=e.replace(o,Rh(this.options.includePrerelease)),K("hyphen replace",e),e=e.replace(le[oe.COMPARATORTRIM],oh),K("comparator trim",e),e=e.replace(le[oe.TILDETRIM],ah),e=e.replace(le[oe.CARETTRIM],lh),e=e.split(/\s+/).join(" ");let a=e.split(" ").map(u=>uh(u,this.options)).join(" ").split(/\s+/).map(u=>Ah(u,this.options));n&&(a=a.filter(u=>(K("loose invalid filter",u,this.options),!!u.match(le[oe.COMPARATORLOOSE])))),K("range list",a);let l=new Map,h=a.map(u=>new mr(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 c=[...l.values()];return Gi.set(s,c),c}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=dr;var sh=qi(),Gi=new sh({max:1e3}),ih=tt(),mr=nt(),K=et(),nh=se(),{re:le,t:oe,comparatorTrimReplace:oh,tildeTrimReplace:ah,caretTrimReplace:lh}=$e(),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),ae=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?le[oe.TILDELOOSE]:le[oe.TILDE];return t.replace(r,(s,i,n,o,a)=>{K("tilde",t,s,i,n,o,a);let l;return ae(i)?l="":ae(n)?l=`>=${i}.0.0 <${+i+1}.0.0-0`:ae(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?le[oe.CARETLOOSE]:le[oe.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 ae(n)?h="":ae(o)?h=`>=${n}.0.0${s} <${+n+1}.0.0-0`:ae(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?le[oe.XRANGELOOSE]:le[oe.XRANGE];return t.replace(r,(s,i,n,o,a,l)=>{K("xRange",t,s,i,n,o,a,l);let h=ae(n),c=h||ae(o),u=c||ae(a),d=u;return i==="="&&d&&(i=""),l=e.includePrerelease?"-0":"",h?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&d?(c&&(o=0),a=0,i===">"?(i=">=",c?(n=+n+1,o=0,a=0):(o=+o+1,a=0)):i==="<="&&(i="<",c?n=+n+1:o=+o+1),i==="<"&&(l="-0"),s=`${i+n}.${o}.${a}${l}`):c?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(le[oe.STAR],"")),Ah=(t,e)=>(K("replaceGTE0",t,e),t.trim().replace(le[e.includePrerelease?oe.GTE0PRE:oe.GTE0],"")),Rh=t=>(e,r,s,i,n,o,a,l,h,c,u,d,p)=>(ae(s)?r="":ae(i)?r=`>=${s}.0.0${t?"-0":""}`:ae(n)?r=`>=${s}.${i}.0${t?"-0":""}`:o?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,ae(h)?l="":ae(c)?l=`<${+h+1}.0.0-0`:ae(u)?l=`<${h}.${+c+1}.0-0`:d?l=`<=${h}.${c}.${u}-${d}`:t?l=`<${h}.${c}.${+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!==mr.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=_((up,Yi)=>{var ot=Symbol("SemVer ANY"),Ar=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}Er("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,Er("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(Er("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 gr(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=gr(this.semver,"<",e.semver,r)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=gr(this.semver,">",e.semver,r)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return s||i||n&&o||a||l}};Yi.exports=Ar;var wh=tt(),{re:ki,t:Vi}=$e(),gr=hr(),Er=et(),Ki=se(),Xi=pe()});var at=_((cp,Qi)=>{var yh=pe(),Th=(t,e,r)=>{try{e=new yh(e,r)}catch{return!1}return e.test(t)};Qi.exports=Th});var Ji=_((fp,Zi)=>{var xh=pe(),bh=(t,e)=>new xh(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" "));Zi.exports=bh});var tn=_((pp,en)=>{var Ch=se(),Sh=pe(),$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=_((dp,rn)=>{var Oh=se(),vh=pe(),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=_((mp,on)=>{var Rr=se(),Nh=pe(),nn=rt(),Lh=(t,e)=>{t=new Nh(t,e);let r=new Rr("0.0.0");if(t.test(r)||(r=new Rr("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 Rr(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=_((gp,ln)=>{var Hh=pe(),Dh=(t,e)=>{try{return new Hh(t,e).range||"*"}catch{return null}};ln.exports=Dh});var $t=_((Ep,pn)=>{var Ph=se(),fn=nt(),{ANY:Uh}=fn,Fh=pe(),Mh=at(),un=rt(),cn=yt(),Bh=xt(),qh=Tt(),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 c=e.set[h],u=null,d=null;if(c.forEach(p=>{p.semver===Uh&&(p=new fn(">=0.0.0")),u=u||p,d=d||p,i(p.semver,u.semver,s)?u=p:o(p.semver,d.semver,s)&&(d=p)}),u.operator===a||u.operator===l||(!d.operator||d.operator===a)&&n(t,d.semver))return!1;if(d.operator===l&&o(t,d.semver))return!1}return!0};pn.exports=Gh});var mn=_((Ap,dn)=>{var jh=$t(),Wh=(t,e,r)=>jh(t,e,">",r);dn.exports=Wh});var En=_((Rp,gn)=>{var zh=$t(),kh=(t,e,r)=>zh(t,e,"<",r);gn.exports=kh});var _n=_((_p,Rn)=>{var An=pe(),Vh=(t,e,r)=>(t=new An(t,r),e=new An(e,r),t.intersects(e));Rn.exports=Vh});var yn=_((wp,wn)=>{var Kh=at(),Xh=fe();wn.exports=(t,e,r)=>{let s=[],i=null,n=null,o=t.sort((c,u)=>Xh(c,u,r));for(let c of o)Kh(c,e,r)?(n=c,i||(i=c)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let a=[];for(let[c,u]of s)c===u?a.push(c):!u&&c===o[0]?a.push("*"):u?c===o[0]?a.push(`<=${u}`):a.push(`${c} - ${u}`):a.push(`>=${c}`);let l=a.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return l.length<h.length?l:e}});var Sn=_((yp,Cn)=>{var Tn=pe(),Ot=nt(),{ANY:_r}=Ot,lt=at(),wr=fe(),Yh=(t,e,r={})=>{if(t===e)return!0;t=new Tn(t,r),e=new Tn(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===_r){if(e.length===1&&e[0].semver===_r)return!0;r.includePrerelease?t=[new Ot(">=0.0.0-0")]:t=[new Ot(">=0.0.0")]}if(e.length===1&&e[0].semver===_r){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=xn(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=wr(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 A of e)if(!lt(p,String(A),r))return!1;return!0}let a,l,h,c,u=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,d=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(c=c||p.operator===">"||p.operator===">=",h=h||p.operator==="<"||p.operator==="<=",i){if(d&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===d.major&&p.semver.minor===d.minor&&p.semver.patch===d.patch&&(d=!1),p.operator===">"||p.operator===">="){if(a=xn(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&&c&&!i&&o!==0||d||u)},xn=(t,e,r)=>{if(!t)return e;let s=wr(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=wr(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t};Cn.exports=Yh});var vn=_((Tp,On)=>{var yr=$e(),Zh=Je(),Jh=se(),$n=or(),eu=Oe(),tu=Xs(),ru=Qs(),su=ei(),iu=oi(),nu=li(),ou=ui(),au=fi(),lu=di(),hu=fe(),uu=gi(),cu=Ai(),fu=wt(),pu=yi(),du=xi(),mu=rt(),gu=yt(),Eu=_t(),Au=lr(),Ru=Tt(),_u=xt(),wu=hr(),yu=Ni(),Tu=nt(),xu=pe(),bu=at(),Cu=Ji(),Su=tn(),$u=sn(),Ou=an(),vu=hn(),Iu=$t(),Nu=mn(),Lu=En(),Hu=_n(),Du=yn(),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:Au,gte:Ru,lte:_u,cmp:wu,coerce:yu,Comparator:Tu,Range:xu,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:yr.re,src:yr.src,tokens:yr.t,SEMVER_SPEC_VERSION:Zh.SEMVER_SPEC_VERSION,compareIdentifiers:$n.compareIdentifiers,rcompareIdentifiers:$n.rcompareIdentifiers}});var Dn=_((xp,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(c,u){var d=In(c);(!l[u]||d>l[u])&&(l[u]=d)}),l},[]),o=vt(t,function(l){return vt(l,function(h,c){var u=String(h);if(s[c]==="."){var d=In(u),p=n[c]+(/\./.test(u)?1:2)-(i(u)-d);return u+Array(p).join(" ")}else return u})}),a=Nn(o,function(l,h){return Ln(h,function(c,u){var d=i(c);(!l[u]||d>l[u])&&(l[u]=d)}),l},[]);return vt(o,function(l){return vt(l,function(h,c){var u=a[c]-i(h)||0,d=Array(Math.max(u+1,1)).join(" ");return s[c]==="r"||s[c]==="."?d+h:s[c]==="c"?Array(Math.ceil(u/2+1)).join(" ")+h+Array(Math.floor(u/2+1)).join(" "):h+d}).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=_(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.LRUCache=void 0;var Ge=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Un=new Set,Tr=typeof process=="object"&&process?process:{},Fn=(t,e,r,s)=>{typeof Tr.emitWarning=="function"?Tr.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=Tr.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),Sp=Symbol("type"),be=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Mn=t=>be(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?je:null:null,je=class extends Array{constructor(e){super(e),this.fill(0)}},xr=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]}},br=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;#A;#l;#R;#_;#d;#w;#b;#f;static unsafeExposeInternals(e){return{starts:e.#_,ttls:e.#d,sizes:e.#R,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.#A,isBackgroundFetch:r=>e.#r(r),backgroundFetch:(r,s,i,n)=>e.#N(r,s,i,n),moveToTail:r=>e.#$(r),indexes:r=>e.#y(r),rindexes:r=>e.#T(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:c,noDisposeOnSet:u,noUpdateTTL:d,maxSize:p=0,maxEntrySize:A=0,sizeCalculation:y,fetchMethod:I,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:C,allowStaleOnFetchRejection:N,allowStaleOnFetchAbort:w,ignoreFetchAbort:S}=e;if(r!==0&&!be(r))throw new TypeError("max option must be a nonnegative integer");let H=r?Mn(r):Array;if(!H)throw new Error("invalid max value: "+r);if(this.#i=r,this.#h=p,this.maxEntrySize=A||this.#h,this.sizeCalculation=y,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(I!==void 0&&typeof I!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#O=I,this.#b=!!I,this.#n=new Map,this.#s=new Array(r).fill(void 0),this.#e=new Array(r).fill(void 0),this.#c=new H(r),this.#p=new H(r),this.#u=0,this.#a=0,this.#A=xr.create(r),this.#o=0,this.#E=0,typeof h=="function"&&(this.#t=h),typeof c=="function"?(this.#g=c,this.#l=[]):(this.#g=void 0,this.#l=void 0),this.#w=!!this.#t,this.#f=!!this.#g,this.noDisposeOnSet=!!u,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!N,this.allowStaleOnFetchAbort=!!w,this.ignoreFetchAbort=!!S,this.maxEntrySize!==0){if(this.#h!==0&&!be(this.#h))throw new TypeError("maxSize must be a positive integer if specified");if(!be(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#F()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!C,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=be(i)||i===0?i:1,this.ttlAutopurge=!!n,this.ttl=s||0,this.ttl){if(!be(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 O="LRU_CACHE_UNBOUNDED";Uu(O)&&(Un.add(O),Fn("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",O,t))}}getRemainingTTL(e){return this.#n.has(e)?1/0:0}#L(){let e=new je(this.#i),r=new je(this.#i);this.#d=e,this.#_=r,this.#H=(n,o,a=Ge.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?Ge.now():0},this.#x=(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=Ge.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=()=>{};#x=()=>{};#H=()=>{};#m=()=>!1;#F(){let e=new je(this.#i);this.#E=0,this.#R=e,this.#S=r=>{this.#E-=e[r],e[r]=0},this.#D=(r,s,i,n)=>{if(this.#r(s))return 0;if(!be(i))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(i=n(s,r),!be(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};*#y({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]}*#T({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.#y())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.#T())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.#y()){let r=this.#s[e];r!==void 0&&!this.#r(this.#e[e])&&(yield r)}}*rkeys(){for(let e of this.#T()){let r=this.#s[e];r!==void 0&&!this.#r(this.#e[e])&&(yield r)}}*values(){for(let e of this.#y())this.#e[e]!==void 0&&!this.#r(this.#e[e])&&(yield this.#e[e])}*rvalues(){for(let e of this.#T())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.#y()){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.#y()){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.#T()){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.#T({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-(Ge.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.#y({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=Ge.now()-this.#_[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=Ge.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,c=this.#D(e,r,s.size||0,a);if(this.maxEntrySize&&c>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.#A.length!==0?this.#A.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,c,l),l&&(l.set="add"),h=!1;else{this.#$(u);let d=this.#e[u];if(r!==d){if(this.#b&&this.#r(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=d;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?.(d,e,"set"),this.#f&&this.#l?.push([d,e,"set"]));if(this.#S(u),this.#v(u,c,l),this.#e[u]=r,l){l.set="replace";let p=d&&this.#r(d)?d.__staleWhileFetching:d;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.#x(l,u)),!o&&this.#f&&this.#l){let d=this.#l,p;for(;p=d?.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.#A.push(r)),this.#o===1?(this.#u=this.#a=0,this.#A.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.#x(i,n));else return s&&this.#C(n),i&&(i.has="hit",this.#x(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=(y,I=!1)=>{let{aborted:E}=o.signal,C=s.ignoreFetchAbort&&y!==void 0;if(s.status&&(E&&!I?(s.status.fetchAborted=!0,s.status.fetchError=o.signal.reason,C&&(s.status.fetchAbortIgnored=!0)):s.status.fetchResolved=!0),E&&!C&&!I)return u(o.signal.reason);let N=p;return this.#e[r]===p&&(y===void 0?N.__staleWhileFetching?this.#e[r]=N.__staleWhileFetching:this.delete(e):(s.status&&(s.status.fetchUpdated=!0),this.set(e,y,l.options))),y},c=y=>(s.status&&(s.status.fetchRejected=!0,s.status.fetchError=y),u(y)),u=y=>{let{aborted:I}=o.signal,E=I&&s.allowStaleOnFetchAbort,C=E||s.allowStaleOnFetchRejection,N=C||s.noDeleteOnFetchRejection,w=p;if(this.#e[r]===p&&(!N||w.__staleWhileFetching===void 0?this.delete(e):E||(this.#e[r]=w.__staleWhileFetching)),C)return s.status&&w.__staleWhileFetching!==void 0&&(s.status.returnedStale=!0),w.__staleWhileFetching;if(w.__returned===w)throw y},d=(y,I)=>{let E=this.#O?.(e,n,l);E&&E instanceof Promise&&E.then(C=>y(C===void 0?void 0:C),I),o.signal.addEventListener("abort",()=>{(!s.ignoreFetchAbort||s.allowStaleOnFetchAbort)&&(y(void 0),s.allowStaleOnFetchAbort&&(y=C=>h(C,!0)))})};s.status&&(s.status.fetchDispatched=!0);let p=new Promise(d).then(h,c),A=Object.assign(p,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return r===void 0?(this.set(e,A,{...l.options,status:void 0}),r=this.#n.get(e)):this.#e[r]=A,A}#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:c=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:y,forceRefresh:I=!1,status:E,signal:C}=r;if(!this.#b)return E&&(E.fetch="get"),this.get(e,{allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:E});let N={allowStale:s,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:h,noUpdateTTL:c,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:A,ignoreFetchAbort:p,status:E,signal:C},w=this.#n.get(e);if(w===void 0){E&&(E.fetch="miss");let S=this.#N(e,w,N,y);return S.__returned=S}else{let S=this.#e[w];if(this.#r(S)){let g=s&&S.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",g&&(E.returnedStale=!0)),g?S.__staleWhileFetching:S.__returned=S}let H=this.#m(w);if(!I&&!H)return E&&(E.fetch="hit"),this.#$(w),i&&this.#C(w),E&&this.#x(E,w),S;let O=this.#N(e,w,N,y),v=O.__staleWhileFetching!==void 0&&s;return E&&(E.fetch=H?"stale":"refresh",v&&H&&(E.returnedStale=!0)),v?O.__staleWhileFetching:O.__returned=O}}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.#x(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.#A.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.#T({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.#R&&this.#R.fill(0),this.#u=0,this.#a=0,this.#A.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=br});var jn=_((Op,Gn)=>{"use strict";var M=(...t)=>t.every(e=>e)?t.join(""):"",Q=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${M("#",s)}`,sshurltemplate:({domain:t,user:e,project:r,committish:s})=>`git+ssh://git@${t}/${e}/${r}.git${M("#",s)}`,edittemplate:({domain:t,user:e,project:r,committish:s,editpath:i,path:n})=>`https://${t}/${e}/${r}${M("/",i,"/",Q(s||"HEAD"),"/",n)}`,browsetemplate:({domain:t,user:e,project:r,committish:s,treepath:i})=>`https://${t}/${e}/${r}${M("/",i,"/",Q(s))}`,browsetreetemplate:({domain:t,user:e,project:r,committish:s,treepath:i,path:n,fragment:o,hashformat:a})=>`https://${t}/${e}/${r}/${i}/${Q(s||"HEAD")}/${n}${M("#",a(o||""))}`,browseblobtemplate:({domain:t,user:e,project:r,committish:s,blobpath:i,path:n,fragment:o,hashformat:a})=>`https://${t}/${e}/${r}/${i}/${Q(s||"HEAD")}/${n}${M("#",a(o||""))}`,docstemplate:({domain:t,user:e,project:r,treepath:s,committish:i})=>`https://${t}/${e}/${r}${M("/",s,"/",Q(i))}#readme`,httpstemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git+https://${M(t,"@")}${e}/${r}/${s}.git${M("#",i)}`,filetemplate:({domain:t,user:e,project:r,committish:s,path:i})=>`https://${t}/${e}/${r}/raw/${Q(s||"HEAD")}/${i}`,shortcuttemplate:({type:t,user:e,project:r,committish:s})=>`${t}:${e}/${r}${M("#",s)}`,pathtemplate:({user:t,project:e,committish:r})=>`${t}/${e}${M("#",r)}`,bugstemplate:({domain:t,user:e,project:r})=>`https://${t}/${e}/${r}/issues`,hashformat:qn},Ce={};Ce.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://${M(t,"@")}raw.githubusercontent.com/${e}/${r}/${Q(s||"HEAD")}/${i}`,gittemplate:({auth:t,domain:e,user:r,project:s,committish:i})=>`git://${M(t,"@")}${e}/${r}/${s}.git${M("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://codeload.${t}/${e}/${r}/tar.gz/${Q(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}}};Ce.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}${M("/",i,"/",Q(s||"HEAD"),"/",n,o)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/get/${Q(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)}}};Ce.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://${M(t,"@")}${e}/${r}/${s}.git${M("#",i)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/repository/archive.tar.gz?ref=${Q(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)}}};Ce.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${M("#",r)}`,sshurltemplate:({domain:t,project:e,committish:r})=>`git+ssh://git@${t}/${e}.git${M("#",r)}`,edittemplate:({domain:t,user:e,project:r,committish:s,editpath:i})=>`https://${t}/${e}/${r}${M("/",Q(s))}/${i}`,browsetemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${M("/",Q(r))}`,browsetreetemplate:({domain:t,project:e,committish:r,path:s,hashformat:i})=>`https://${t}/${e}${M("/",Q(r))}${M("#",i(s))}`,browseblobtemplate:({domain:t,project:e,committish:r,path:s,hashformat:i})=>`https://${t}/${e}${M("/",Q(r))}${M("#",i(s))}`,docstemplate:({domain:t,project:e,committish:r})=>`https://${t}/${e}${M("/",Q(r))}`,httpstemplate:({domain:t,project:e,committish:r})=>`git+https://${t}/${e}.git${M("#",r)}`,filetemplate:({user:t,project:e,committish:r,path:s})=>`https://gist.githubusercontent.com/${t}/${e}/raw${M("/",Q(r))}/${s}`,shortcuttemplate:({type:t,project:e,committish:r})=>`${t}:${e}${M("#",r)}`,pathtemplate:({project:t,committish:e})=>`${t}${M("#",e)}`,bugstemplate:({domain:t,project:e})=>`https://${t}/${e}`,gittemplate:({domain:t,project:e,committish:r})=>`git://${t}/${e}.git${M("#",r)}`,tarballtemplate:({project:t,committish:e})=>`https://codeload.github.com/gist/${t}/tar.gz/${Q(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)}};Ce.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/${Q(s)||"HEAD"}/${i}`,httpstemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}.git${M("#",s)}`,tarballtemplate:({domain:t,user:e,project:r,committish:s})=>`https://${t}/${e}/${r}/archive/${Q(s)||"HEAD"}.tar.gz`,bugstemplate:()=>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(Ce))Ce[t]=Object.assign({},Fu,e);Gn.exports=Ce});var Sr=_((vp,zn)=>{var Mu=Xe("url"),Cr=(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=Cr(t,"@","#"),r=Cr(t,":","#");return r>e&&(t=t.slice(0,r)+"/"+t.slice(r+1)),Cr(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=_((Ip,kn)=>{"use strict";var Gu=Sr(),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,c=s===-1||e>-1&&s>e,u=r>0,d=e>-1?t[e-1]!=="/":!t.endsWith("/"),p=!t.startsWith(".");return a&&u&&d&&p&&l&&h&&c};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],c=null;s[n.protocol]?.auth&&(n.username||n.password)&&(c=`${n.username}${n.password?":"+n.password:""}`);let u=null,d=null,p=null,A=null;try{if(o){let y=n.pathname.startsWith("/")?n.pathname.slice(1):n.pathname,I=y.indexOf("@");I>-1&&(y=y.slice(I+1));let E=y.lastIndexOf("/");E>-1?(d=decodeURIComponent(y.slice(0,E)),d||(d=null),p=decodeURIComponent(y.slice(E+1))):p=decodeURIComponent(y),p.endsWith(".git")&&(p=p.slice(0,-4)),n.hash&&(u=decodeURIComponent(n.hash.slice(1))),A="shortcut"}else{if(!h.protocols.includes(n.protocol))return;let y=h.extract(n);if(!y)return;d=y.user&&decodeURIComponent(y.user),p=decodeURIComponent(y.project),u=decodeURIComponent(y.committish),A=s[n.protocol]?.name||n.protocol.slice(0,-1)}}catch(y){if(y instanceof URIError)return;throw y}return[l,d,c,p,u,A,e]}});var Xn=_((Np,Kn)=>{"use strict";var{LRUCache:Wu}=Bn(),zu=jn(),ku=Vn(),Vu=Sr(),$r=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(!$r.has(s)){let i=ku(e,r,{gitHosts:t.#i,protocols:t.#h});$r.set(s,i?new t(...i):void 0)}return $r.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=_((Wp,co)=>{"use strict";var ge="\\\\/",ao=`[^${ge}]`,_e="\\.",oc="\\+",ac="\\?",Mt="\\/",lc="(?=.)",lo="[^/]",Hr=`(?:${Mt}|$)`,ho=`(?:^|${Mt})`,Dr=`${_e}{1,2}${Hr}`,hc=`(?!${_e})`,uc=`(?!${ho}${Dr})`,cc=`(?!${_e}{0,1}${Hr})`,fc=`(?!${Dr})`,pc=`[^.${Mt}]`,dc=`${lo}*?`,mc="/",uo={DOT_LITERAL:_e,PLUS_LITERAL:oc,QMARK_LITERAL:ac,SLASH_LITERAL:Mt,ONE_CHAR:lc,QMARK:lo,END_ANCHOR:Hr,DOTS_SLASH:Dr,NO_DOT:hc,NO_DOTS:uc,NO_DOT_SLASH:cc,NO_DOTS_SLASH:fc,QMARK_NO_DOT:pc,STAR:dc,START_ANCHOR:ho,SEP:mc},gc={...uo,SLASH_LITERAL:`[${ge}]`,QMARK:ao,STAR:`${ao}*?`,DOTS_SLASH:`${_e}{1,2}(?:[${ge}]|$)`,NO_DOT:`(?!${_e})`,NO_DOTS:`(?!(?:^|[${ge}])${_e}{1,2}(?:[${ge}]|$))`,NO_DOT_SLASH:`(?!${_e}{0,1}(?:[${ge}]|$))`,NO_DOTS_SLASH:`(?!${_e}{1,2}(?:[${ge}]|$))`,QMARK_NO_DOT:`[^.${ge}]`,START_ANCHOR:`(?:^|[${ge}])`,END_ANCHOR:`(?:[${ge}]|$)`,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"};co.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:uo}}});var ut=_(he=>{"use strict";var{REGEX_BACKSLASH:Ac,REGEX_REMOVE_BACKSLASH:Rc,REGEX_SPECIAL_CHARS:_c,REGEX_SPECIAL_CHARS_GLOBAL:wc}=ht();he.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);he.hasRegexChars=t=>_c.test(t);he.isRegexChar=t=>t.length===1&&he.hasRegexChars(t);he.escapeRegex=t=>t.replace(wc,"\\$1");he.toPosixSlashes=t=>t.replace(Ac,"/");he.isWindows=()=>{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};he.removeBackslashes=t=>t.replace(Rc,e=>e==="\\"?"":e);he.escapeLast=(t,e,r)=>{let s=t.lastIndexOf(e,r);return s===-1?t:t[s-1]==="\\"?he.escapeLast(t,e,s-1):`${t.slice(0,s)}\\${t.slice(s)}`};he.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};he.wrapOutput=(t,e={},r={})=>{let s=r.contains?"":"^",i=r.contains?"":"$",n=`${s}(?:${t})${i}`;return e.negated===!0&&(n=`(?:^(?!${n}).*$)`),n};he.basename=(t,{windows:e}={})=>{let r=t.split(e?/[\\/]/:"/"),s=r[r.length-1];return s===""?r[r.length-2]:s}});var _o=_((kp,Ro)=>{"use strict";var fo=ut(),{CHAR_ASTERISK:Pr,CHAR_AT:yc,CHAR_BACKWARD_SLASH:ct,CHAR_COMMA:Tc,CHAR_DOT:Ur,CHAR_EXCLAMATION_MARK:Fr,CHAR_FORWARD_SLASH:Ao,CHAR_LEFT_CURLY_BRACE:Mr,CHAR_LEFT_PARENTHESES:Br,CHAR_LEFT_SQUARE_BRACKET:xc,CHAR_PLUS:bc,CHAR_QUESTION_MARK:po,CHAR_RIGHT_CURLY_BRACE:Cc,CHAR_RIGHT_PARENTHESES:mo,CHAR_RIGHT_SQUARE_BRACKET:Sc}=ht(),go=t=>t===Ao||t===ct,Eo=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,c=0,u=0,d=!1,p=!1,A=!1,y=!1,I=!1,E=!1,C=!1,N=!1,w=!1,S=!1,H=0,O,$,v={value:"",depth:0,isGlob:!1},g=()=>h>=s,Z=()=>l.charCodeAt(h+1),z=()=>(O=$,l.charCodeAt(++h));for(;h<s;){$=z();let D;if($===ct){C=v.backslashes=!0,$=z(),$===Mr&&(E=!0);continue}if(E===!0||$===Mr){for(H++;g()!==!0&&($=z());){if($===ct){C=v.backslashes=!0,z();continue}if($===Mr){H++;continue}if(E!==!0&&$===Ur&&($=z())===Ur){if(d=v.isBrace=!0,A=v.isGlob=!0,S=!0,i===!0)continue;break}if(E!==!0&&$===Tc){if(d=v.isBrace=!0,A=v.isGlob=!0,S=!0,i===!0)continue;break}if($===Cc&&(H--,H===0)){E=!1,d=v.isBrace=!0,S=!0;break}}if(i===!0)continue;break}if($===Ao){if(n.push(h),o.push(v),v={value:"",depth:0,isGlob:!1},S===!0)continue;if(O===Ur&&h===c+1){c+=2;continue}u=h+1;continue}if(r.noext!==!0&&($===bc||$===yc||$===Pr||$===po||$===Fr)===!0&&Z()===Br){if(A=v.isGlob=!0,y=v.isExtglob=!0,S=!0,$===Fr&&h===c&&(w=!0),i===!0){for(;g()!==!0&&($=z());){if($===ct){C=v.backslashes=!0,$=z();continue}if($===mo){A=v.isGlob=!0,S=!0;break}}continue}break}if($===Pr){if(O===Pr&&(I=v.isGlobstar=!0),A=v.isGlob=!0,S=!0,i===!0)continue;break}if($===po){if(A=v.isGlob=!0,S=!0,i===!0)continue;break}if($===xc){for(;g()!==!0&&(D=z());){if(D===ct){C=v.backslashes=!0,z();continue}if(D===Sc){p=v.isBracket=!0,A=v.isGlob=!0,S=!0;break}}if(i===!0)continue;break}if(r.nonegate!==!0&&$===Fr&&h===c){N=v.negated=!0,c++;continue}if(r.noparen!==!0&&$===Br){if(A=v.isGlob=!0,i===!0){for(;g()!==!0&&($=z());){if($===Br){C=v.backslashes=!0,$=z();continue}if($===mo){S=!0;break}}continue}break}if(A===!0){if(S=!0,i===!0)continue;break}}r.noext===!0&&(y=!1,A=!1);let k=l,f="",m="";c>0&&(f=l.slice(0,c),l=l.slice(c),u-=c),k&&A===!0&&u>0?(k=l.slice(0,u),m=l.slice(u)):A===!0?(k="",m=l):k=l,k&&k!==""&&k!=="/"&&k!==l&&go(k.charCodeAt(k.length-1))&&(k=k.slice(0,-1)),r.unescape===!0&&(m&&(m=fo.removeBackslashes(m)),k&&C===!0&&(k=fo.removeBackslashes(k)));let j={prefix:f,input:t,start:c,base:k,glob:m,isBrace:d,isBracket:p,isGlob:A,isExtglob:y,isGlobstar:I,negated:N,negatedExtglob:w};if(r.tokens===!0&&(j.maxDepth=0,go($)||o.push(v),j.tokens=o),r.parts===!0||r.tokens===!0){let D;for(let q=0;q<n.length;q++){let ue=D?D+1:c,ee=n[q],re=t.slice(ue,ee);r.tokens&&(q===0&&c!==0?(o[q].isPrefix=!0,o[q].value=f):o[q].value=re,Eo(o[q]),j.maxDepth+=o[q].depth),(q!==0||re!=="")&&a.push(re),D=ee}if(D&&D+1<t.length){let q=t.slice(D+1);a.push(q),r.tokens&&(o[o.length-1].value=q,Eo(o[o.length-1]),j.maxDepth+=o[o.length-1].depth)}j.slashes=n,j.parts=a}return j};Ro.exports=$c});var To=_((Vp,yo)=>{"use strict";var Bt=ht(),Ee=ut(),{MAX_LENGTH:qt,POSIX_REGEX_SOURCE:Oc,REGEX_NON_SPECIAL_CHARS:vc,REGEX_SPECIAL_CHARS_BACKREF:Ic,REPLACEMENTS:wo}=Bt,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=>Ee.escapeRegex(i)).join("..")}return r},ze=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,qr=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=wo[t]||t;let r={...e},s=typeof r.maxLength=="number"?Math.min(qt,r.maxLength):qt,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=Bt.globChars(r.windows),h=Bt.extglobChars(l),{DOT_LITERAL:c,PLUS_LITERAL:u,SLASH_LITERAL:d,ONE_CHAR:p,DOTS_SLASH:A,NO_DOT:y,NO_DOT_SLASH:I,NO_DOTS_SLASH:E,QMARK:C,QMARK_NO_DOT:N,STAR:w,START_ANCHOR:S}=l,H=T=>`(${a}(?:(?!${S}${T.dot?A:c}).)*?)`,O=r.dot?"":y,$=r.dot?C:N,v=r.bash===!0?H(r):w;r.capture&&(v=`(${v})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let g={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=Ee.removePrefix(t,g),i=t.length;let Z=[],z=[],k=[],f=n,m,j=()=>g.index===i-1,D=g.peek=(T=1)=>t[g.index+T],q=g.advance=()=>t[++g.index]||"",ue=()=>t.slice(g.index+1),ee=(T="",W=0)=>{g.consumed+=T,g.index+=W},re=T=>{g.output+=T.output!=null?T.output:T.value,ee(T.value)},ce=()=>{let T=1;for(;D()==="!"&&(D(2)!=="("||D(3)==="?");)q(),g.start++,T++;return T%2===0?!1:(g.negated=!0,g.start++,!0)},ye=T=>{g[T]++,k.push(T)},ie=T=>{g[T]--,k.pop()},P=T=>{if(f.type==="globstar"){let W=g.braces>0&&(T.type==="comma"||T.type==="brace"),R=T.extglob===!0||Z.length&&(T.type==="pipe"||T.type==="paren");T.type!=="slash"&&T.type!=="paren"&&!W&&!R&&(g.output=g.output.slice(0,-f.output.length),f.type="star",f.value="*",f.output=v,g.output+=f.output)}if(Z.length&&T.type!=="paren"&&(Z[Z.length-1].inner+=T.value),(T.value||T.output)&&re(T),f&&f.type==="text"&&T.type==="text"){f.output=(f.output||f.value)+T.value,f.value+=T.value;return}T.prev=f,o.push(T),f=T},dt=(T,W)=>{let R={...h[W],conditions:1,inner:""};R.prev=f,R.parens=g.parens,R.output=g.output;let U=(r.capture?"(":"")+R.open;ye("parens"),P({type:T,value:W,output:g.output?"":p}),P({type:"paren",extglob:!0,value:q(),output:U}),Z.push(R)},_a=T=>{let W=T.close+(r.capture?")":""),R;if(T.type==="negate"){let U=v;if(T.inner&&T.inner.length>1&&T.inner.includes("/")&&(U=H(r)),(U!==v||j()||/^\)+$/.test(ue()))&&(W=T.close=`)$))${U}`),T.inner.includes("*")&&(R=ue())&&/^\.[^\\/.]+$/.test(R)){let V=qr(R,{...e,fastpaths:!1}).output;W=T.close=`)${V})${U})`}T.prev.type==="bos"&&(g.negatedExtglob=!0)}P({type:"paren",extglob:!0,value:m,output:W}),ie("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let T=!1,W=t.replace(Ic,(R,U,V,ne,J,Qt)=>ne==="\\"?(T=!0,R):ne==="?"?U?U+ne+(J?C.repeat(J.length):""):Qt===0?$+(J?C.repeat(J.length):""):C.repeat(V.length):ne==="."?c.repeat(V.length):ne==="*"?U?U+ne+(J?v:""):v:U?R:`\\${R}`);return T===!0&&(r.unescape===!0?W=W.replace(/\\/g,""):W=W.replace(/\\+/g,R=>R.length%2===0?"\\\\":R?"\\":"")),W===t&&r.contains===!0?(g.output=t,g):(g.output=Ee.wrapOutput(W,g,e),g)}for(;!j();){if(m=q(),m==="\0")continue;if(m==="\\"){let R=D();if(R==="/"&&r.bash!==!0||R==="."||R===";")continue;if(!R){m+="\\",P({type:"text",value:m});continue}let U=/^\\+/.exec(ue()),V=0;if(U&&U[0].length>2&&(V=U[0].length,g.index+=V,V%2!==0&&(m+="\\")),r.unescape===!0?m=q():m+=q(),g.brackets===0){P({type:"text",value:m});continue}}if(g.brackets>0&&(m!=="]"||f.value==="["||f.value==="[^")){if(r.posix!==!1&&m===":"){let R=f.value.slice(1);if(R.includes("[")&&(f.posix=!0,R.includes(":"))){let U=f.value.lastIndexOf("["),V=f.value.slice(0,U),ne=f.value.slice(U+2),J=Oc[ne];if(J){f.value=V+J,g.backtrack=!0,q(),!n.output&&o.indexOf(f)===1&&(n.output=p);continue}}}(m==="["&&D()!==":"||m==="-"&&D()==="]")&&(m=`\\${m}`),m==="]"&&(f.value==="["||f.value==="[^")&&(m=`\\${m}`),r.posix===!0&&m==="!"&&f.value==="["&&(m="^"),f.value+=m,re({value:m});continue}if(g.quotes===1&&m!=='"'){m=Ee.escapeRegex(m),f.value+=m,re({value:m});continue}if(m==='"'){g.quotes=g.quotes===1?0:1,r.keepQuotes===!0&&P({type:"text",value:m});continue}if(m==="("){ye("parens"),P({type:"paren",value:m});continue}if(m===")"){if(g.parens===0&&r.strictBrackets===!0)throw new SyntaxError(ze("opening","("));let R=Z[Z.length-1];if(R&&g.parens===R.parens+1){_a(Z.pop());continue}P({type:"paren",value:m,output:g.parens?")":"\\)"}),ie("parens");continue}if(m==="["){if(r.nobracket===!0||!ue().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(ze("closing","]"));m=`\\${m}`}else ye("brackets");P({type:"bracket",value:m});continue}if(m==="]"){if(r.nobracket===!0||f&&f.type==="bracket"&&f.value.length===1){P({type:"text",value:m,output:`\\${m}`});continue}if(g.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(ze("opening","["));P({type:"text",value:m,output:`\\${m}`});continue}ie("brackets");let R=f.value.slice(1);if(f.posix!==!0&&R[0]==="^"&&!R.includes("/")&&(m=`/${m}`),f.value+=m,re({value:m}),r.literalBrackets===!1||Ee.hasRegexChars(R))continue;let U=Ee.escapeRegex(f.value);if(g.output=g.output.slice(0,-f.value.length),r.literalBrackets===!0){g.output+=U,f.value=U;continue}f.value=`(${a}${U}|${f.value})`,g.output+=f.value;continue}if(m==="{"&&r.nobrace!==!0){ye("braces");let R={type:"brace",value:m,output:"(",outputIndex:g.output.length,tokensIndex:g.tokens.length};z.push(R),P(R);continue}if(m==="}"){let R=z[z.length-1];if(r.nobrace===!0||!R){P({type:"text",value:m,output:m});continue}let U=")";if(R.dots===!0){let V=o.slice(),ne=[];for(let J=V.length-1;J>=0&&(o.pop(),V[J].type!=="brace");J--)V[J].type!=="dots"&&ne.unshift(V[J].value);U=Nc(ne,r),g.backtrack=!0}if(R.comma!==!0&&R.dots!==!0){let V=g.output.slice(0,R.outputIndex),ne=g.tokens.slice(R.tokensIndex);R.value=R.output="\\{",m=U="\\}",g.output=V;for(let J of ne)g.output+=J.output||J.value}P({type:"brace",value:m,output:U}),ie("braces"),z.pop();continue}if(m==="|"){Z.length>0&&Z[Z.length-1].conditions++,P({type:"text",value:m});continue}if(m===","){let R=m,U=z[z.length-1];U&&k[k.length-1]==="braces"&&(U.comma=!0,R="|"),P({type:"comma",value:m,output:R});continue}if(m==="/"){if(f.type==="dot"&&g.index===g.start+1){g.start=g.index+1,g.consumed="",g.output="",o.pop(),f=n;continue}P({type:"slash",value:m,output:d});continue}if(m==="."){if(g.braces>0&&f.type==="dot"){f.value==="."&&(f.output=c);let R=z[z.length-1];f.type="dots",f.output+=m,f.value+=m,R.dots=!0;continue}if(g.braces+g.parens===0&&f.type!=="bos"&&f.type!=="slash"){P({type:"text",value:m,output:c});continue}P({type:"dot",value:m,output:c});continue}if(m==="?"){if(!(f&&f.value==="(")&&r.noextglob!==!0&&D()==="("&&D(2)!=="?"){dt("qmark",m);continue}if(f&&f.type==="paren"){let U=D(),V=m;(f.value==="("&&!/[!=<:]/.test(U)||U==="<"&&!/<([!=]|\w+>)/.test(ue()))&&(V=`\\${m}`),P({type:"text",value:m,output:V});continue}if(r.dot!==!0&&(f.type==="slash"||f.type==="bos")){P({type:"qmark",value:m,output:N});continue}P({type:"qmark",value:m,output:C});continue}if(m==="!"){if(r.noextglob!==!0&&D()==="("&&(D(2)!=="?"||!/[!=<:]/.test(D(3)))){dt("negate",m);continue}if(r.nonegate!==!0&&g.index===0){ce();continue}}if(m==="+"){if(r.noextglob!==!0&&D()==="("&&D(2)!=="?"){dt("plus",m);continue}if(f&&f.value==="("||r.regex===!1){P({type:"plus",value:m,output:u});continue}if(f&&(f.type==="bracket"||f.type==="paren"||f.type==="brace")||g.parens>0){P({type:"plus",value:m});continue}P({type:"plus",value:u});continue}if(m==="@"){if(r.noextglob!==!0&&D()==="("&&D(2)!=="?"){P({type:"at",extglob:!0,value:m,output:""});continue}P({type:"text",value:m});continue}if(m!=="*"){(m==="$"||m==="^")&&(m=`\\${m}`);let R=vc.exec(ue());R&&(m+=R[0],g.index+=R[0].length),P({type:"text",value:m});continue}if(f&&(f.type==="globstar"||f.star===!0)){f.type="star",f.star=!0,f.value+=m,f.output=v,g.backtrack=!0,g.globstar=!0,ee(m);continue}let T=ue();if(r.noextglob!==!0&&/^\([^?]/.test(T)){dt("star",m);continue}if(f.type==="star"){if(r.noglobstar===!0){ee(m);continue}let R=f.prev,U=R.prev,V=R.type==="slash"||R.type==="bos",ne=U&&(U.type==="star"||U.type==="globstar");if(r.bash===!0&&(!V||T[0]&&T[0]!=="/")){P({type:"star",value:m,output:""});continue}let J=g.braces>0&&(R.type==="comma"||R.type==="brace"),Qt=Z.length&&(R.type==="pipe"||R.type==="paren");if(!V&&R.type!=="paren"&&!J&&!Qt){P({type:"star",value:m,output:""});continue}for(;T.slice(0,3)==="/**";){let mt=t[g.index+4];if(mt&&mt!=="/")break;T=T.slice(3),ee("/**",3)}if(R.type==="bos"&&j()){f.type="globstar",f.value+=m,f.output=H(r),g.output=f.output,g.globstar=!0,ee(m);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&!ne&&j()){g.output=g.output.slice(0,-(R.output+f.output).length),R.output=`(?:${R.output}`,f.type="globstar",f.output=H(r)+(r.strictSlashes?")":"|$)"),f.value+=m,g.globstar=!0,g.output+=R.output+f.output,ee(m);continue}if(R.type==="slash"&&R.prev.type!=="bos"&&T[0]==="/"){let mt=T[1]!==void 0?"|$":"";g.output=g.output.slice(0,-(R.output+f.output).length),R.output=`(?:${R.output}`,f.type="globstar",f.output=`${H(r)}${d}|${d}${mt})`,f.value+=m,g.output+=R.output+f.output,g.globstar=!0,ee(m+q()),P({type:"slash",value:"/",output:""});continue}if(R.type==="bos"&&T[0]==="/"){f.type="globstar",f.value+=m,f.output=`(?:^|${d}|${H(r)}${d})`,g.output=f.output,g.globstar=!0,ee(m+q()),P({type:"slash",value:"/",output:""});continue}g.output=g.output.slice(0,-f.output.length),f.type="globstar",f.output=H(r),f.value+=m,g.output+=f.output,g.globstar=!0,ee(m);continue}let W={type:"star",value:m,output:v};if(r.bash===!0){W.output=".*?",(f.type==="bos"||f.type==="slash")&&(W.output=O+W.output),P(W);continue}if(f&&(f.type==="bracket"||f.type==="paren")&&r.regex===!0){W.output=m,P(W);continue}(g.index===g.start||f.type==="slash"||f.type==="dot")&&(f.type==="dot"?(g.output+=I,f.output+=I):r.dot===!0?(g.output+=E,f.output+=E):(g.output+=O,f.output+=O),D()!=="*"&&(g.output+=p,f.output+=p)),P(W)}for(;g.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(ze("closing","]"));g.output=Ee.escapeLast(g.output,"["),ie("brackets")}for(;g.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(ze("closing",")"));g.output=Ee.escapeLast(g.output,"("),ie("parens")}for(;g.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(ze("closing","}"));g.output=Ee.escapeLast(g.output,"{"),ie("braces")}if(r.strictSlashes!==!0&&(f.type==="star"||f.type==="bracket")&&P({type:"maybe_slash",value:"",output:`${d}?`}),g.backtrack===!0){g.output="";for(let T of g.tokens)g.output+=T.output!=null?T.output:T.value,T.suffix&&(g.output+=T.suffix)}return g};qr.fastpaths=(t,e)=>{let r={...e},s=typeof r.maxLength=="number"?Math.min(qt,r.maxLength):qt,i=t.length;if(i>s)throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${s}`);t=wo[t]||t;let{DOT_LITERAL:n,SLASH_LITERAL:o,ONE_CHAR:a,DOTS_SLASH:l,NO_DOT:h,NO_DOTS:c,NO_DOTS_SLASH:u,STAR:d,START_ANCHOR:p}=Bt.globChars(r.windows),A=r.dot?c:h,y=r.dot?u:h,I=r.capture?"":"?:",E={negated:!1,prefix:""},C=r.bash===!0?".*?":d;r.capture&&(C=`(${C})`);let N=O=>O.noglobstar===!0?C:`(${I}(?:(?!${p}${O.dot?l:n}).)*?)`,w=O=>{switch(O){case"*":return`${A}${a}${C}`;case".*":return`${n}${a}${C}`;case"*.*":return`${A}${C}${n}${a}${C}`;case"*/*":return`${A}${C}${o}${a}${y}${C}`;case"**":return A+N(r);case"**/*":return`(?:${A}${N(r)}${o})?${y}${a}${C}`;case"**/*.*":return`(?:${A}${N(r)}${o})?${y}${C}${n}${a}${C}`;case"**/.*":return`(?:${A}${N(r)}${o})?${n}${a}${C}`;default:{let $=/^(.*?)\.(\w+)$/.exec(O);if(!$)return;let v=w($[1]);return v?v+n+$[2]:void 0}}},S=Ee.removePrefix(t,E),H=w(S);return H&&r.strictSlashes!==!0&&(H+=`${o}?`),H};yo.exports=qr});var Co=_((Kp,bo)=>{"use strict";var Lc=_o(),Gr=To(),xo=ut(),Hc=ht(),Dc=t=>t&&typeof t=="object"&&!Array.isArray(t),Y=(t,e,r=!1)=>{if(Array.isArray(t)){let c=t.map(d=>Y(d,e,r));return d=>{for(let p of c){let A=p(d);if(A)return A}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 c={...e,ignore:null,onMatch:null,onResult:null};l=Y(i.ignore,c,r)}let h=(c,u=!1)=>{let{isMatch:d,match:p,output:A}=Y.test(c,o,e,{glob:t,posix:n}),y={glob:t,state:a,regex:o,posix:n,input:c,output:A,match:p,isMatch:d};return typeof i.onResult=="function"&&i.onResult(y),d===!1?(y.isMatch=!1,u?y:!1):l(c)?(typeof i.onIgnore=="function"&&i.onIgnore(y),y.isMatch=!1,u?y:!1):(typeof i.onMatch=="function"&&i.onMatch(y),u?y:!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)):Gr(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=Gr.fastpaths(t,e)),i.output||(i=Gr(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;bo.exports=Y});var vo=_((Xp,Oo)=>{"use strict";var So=Co(),Pc=ut();function $o(t,e,r=!1){return e&&(e.windows===null||e.windows===void 0)&&(e={...e,windows:Pc.isWindows()}),So(t,e,r)}Object.assign($o,So);Oo.exports=$o});var No=_((Yp,Io)=>{"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)}},Gt=class{constructor(e){this.parser=e,this.buf="",this.returned=null,this.result=null,this.resultTable=null,this.resultArr=null}},ft=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 Gt(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 Gt(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")}};ft.END=1114112;ft.Error=Le;Io.exports=ft});var Ho=_((Qp,Lo)=>{"use strict";Lo.exports=t=>{let e=new Date(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var jt=_((Zp,Do)=>{"use strict";Do.exports=(t,e)=>{for(e=String(e);e.length<t;)e="0"+e;return e}});var Uo=_((Jp,Po)=>{"use strict";var ke=jt(),jr=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}`}};Po.exports=t=>{let e=new jr(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var Bo=_((ed,Mo)=>{"use strict";var Fo=jt(),Uc=global.Date,Wr=class extends Uc{constructor(e){super(e),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${Fo(2,this.getUTCMonth()+1)}-${Fo(2,this.getUTCDate())}`}};Mo.exports=t=>{let e=new Wr(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var Go=_((td,qo)=>{"use strict";var Wt=jt(),zr=class extends Date{constructor(e){super(`0000-01-01T${e}Z`),this.isTime=!0}toISOString(){return`${Wt(2,this.getUTCHours())}:${Wt(2,this.getUTCMinutes())}:${Wt(2,this.getUTCSeconds())}.${Wt(3,this.getUTCMilliseconds())}`}};qo.exports=t=>{let e=new zr(t);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}});var jo=_((exports,module)=>{"use strict";module.exports=makeParserClass(No());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=Ho(),createDateTimeFloat=Uo(),createDate=Bo(),createTime=Go(),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 zo=_((rd,Wo)=>{"use strict";Wo.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
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
12
  `,r+=n+" ";for(let l=0;l<t.col;++l)r+=" ";r+=`^
13
13
  `}else r+=a+": "+s[o]+`
14
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]
15
+ `,t}});var Vo=_((sd,ko)=>{"use strict";ko.exports=qc;var Mc=jo(),Bc=zo();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 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 la=Te(Jt(),1),ha=Te(Ns(),1),ua=Te(sr(),1),G=Te(vn(),1),ca=Te(Dn(),1),fa=Te(Xn(),1);import{cwd as Gc,stdout as jc,argv as Wc,env as zt,exit as Ko}from"node:process";import{join as Jr,dirname as pa,basename as Vt,resolve as Kt}from"node:path";import{lstatSync as Xo,readFileSync as Yo,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 Yn(t){return t instanceof Date?t.getTime():typeof t=="string"?Date.parse(t):t}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=Yn(t),e=e!==void 0?Yn(e):Date.now(),Number.isNaN(t))return"unknown";let h=!1,c=e-t;if(c<0&&(h=!0,c=Math.abs(c)),c<i)return n;let u,d;for(let A=0,y=s.length;A<y;A++){let I=s[A];if(!(c>=I[1])){u=Math.floor(c/I[0]),d=(l&&Yu[I[2]]||I[2])+(u>1?"s":"");break}}let p=`${h&&!r?"in ":""}${u} ${d}${!h&&!r?" ago":""}`;return o?a[p]??p:p}import Or from"node:process";import Qu from"node:os";import Qn from"node:tty";function de(t,e=globalThis.Deno?globalThis.Deno.args:Or.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}=Or,Dt;de("no-color")||de("no-colors")||de("color=false")||de("color=never")?Dt=0:(de("color")||de("colors")||de("color=true")||de("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(de("color=16m")||de("color=full")||de("color=truecolor"))return 3;if(de("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(Or.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 Zn(t,e={}){let r=ec(t,{streamIsTTY:t&&t.isTTY,...e});return Ju(r)}var tc={stdout:Zn({isTTY:Qn.isatty(1)}),stderr:Zn({isTTY:Qn.isatty(2)})},Jn=tc;var eo=!0;function to(){eo=!1}function vr(t,e,r){let s=t.join(" ");return eo?`\x1B[${e}m${s}\x1B[${r}m`:s}var Pt=(...t)=>vr(t,31,39),Ut=(...t)=>vr(t,32,39);var ro=(...t)=>vr(t,35,39);var rc=t=>{let e=typeof t;return t!==null&&(e==="object"||e==="function")};var Ir=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(Ir.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(Ir.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(Ir.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 so(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 Nr=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},io=t=>globalThis.DOMException===void 0?new Nr(t):new DOMException(t),no=t=>{let e=t.reason===void 0?io("This operation was aborted."):t.reason;return e instanceof Error?e:io(e)};async function Lr(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,c=!1,u=!1,d=!1,p=0,A=0,y=t[Symbol.iterator]===void 0?t[Symbol.asyncIterator]():t[Symbol.iterator](),I=C=>{c=!0,u=!0,o(C)};i&&(i.aborted&&I(no(i)),i.addEventListener("abort",()=>{I(no(i))}));let E=async()=>{if(u)return;let C=await y.next(),N=A;if(A++,C.done){if(d=!0,p===0&&!u){if(!s&&l.length>0){I(new AggregateError(l));return}if(u=!0,h.size===0){n(a);return}let w=[];for(let[S,H]of a.entries())h.get(S)!==oo&&w.push(H);n(w)}return}p++,(async()=>{try{let w=await C.value;if(u)return;let S=await e(w,N);S===oo&&h.set(N,S),a[N]=S,p--,await E()}catch(w){if(s)I(w);else{l.push(w),p--;try{await E()}catch(S){I(S)}}}})()};(async()=>{for(let C=0;C<r;C++){try{await E()}catch(N){I(N);break}if(d||c)break}})()})}var oo=Symbol("skip");async function Ft(t,e){return Lr(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 Yr=Te(vo(),1),Kc=/^.*?:\/\/(.*?@)?(github\.com[:/])/i,Xc=/^([^/]+)\/([^/#]+)?.*?\/([0-9a-f]+|v?[0-9]+\.[0-9]+\.[0-9]+)$/i,Qr=/^[0-9a-f]{7,}$/i,Qo=/[0-9]+(\.[0-9]+)?(\.[0-9]+)?/g,Xt=t=>t.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&"),Yc=We(fa.default.fromUrl),kr=We(ha.default),Yt=We(t=>t.endsWith("/")?t.substring(0,t.length-1):t),da="16.1.0",we="\0",B=(0,la.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"}});(B["no-color"]||!Jn.stdout)&&to();var Ve=pt(De(B.greatest)),Vr=pt(De(B.prerelease)),Kr=pt(De(B.release)),Zo=pt(De(B.patch)),Jo=pt(De(B.minor)),ea=De(B["allow-downgrade"]),ma=B.githubapi?Yt(B.githubapi):"https://api.github.com",Qc=B.pypiapi?Yt(B.pypiapi):"https://pypi.org",kt=t=>t.replace(/^v/,"");function He(t,e){for(let r of e instanceof Set?e:[])if(r.test(t))return!0;return!1}var Zc=We((t,e)=>{let r=e[`${t}:registry`]||e.registry;return r.endsWith("/")?r:`${r}/`});function ga(t,e){let r=Jr(e,t);try{return Vc(r),r}catch{}let s=pa(e);return s===e?null:ga(t,s)}function Jc(t,e,r,s){if(t.startsWith("@")){let i=(/@[a-z0-9][\w-.]+/.exec(t)||[])[0],n=Yt(Zc(i,s));if(n!==e)try{let o=kr(n,r);if(o?.token)return[o,n]}catch{}return[kr(e,r),e]}else return[kr(e,r),e]}var Ea=We((t,e,r)=>({...Object.keys(t).length&&{agentOpts:t},headers:{"user-agent":`updates/${da}`,...r&&{Authorization:`${e} ${r}`}}}));async function es(t,e){B.verbose&&console.error(`${ro("fetch")} ${t}`);let r=await fetch(t,e);return B.verbose&&console.error(`${r.ok?Ut("done"):Pt("error")} ${t}`),r}async function ef(t,e,r,s,i,n){let[o,a]=Jc(t,r,i,n),h=(e==="resolutions"?Vt(t):t).replace(/\//g,"%2f"),c=`${a}/${h}`,u=await es(c,Ea(s,o?.type,o?.token));if(u?.ok)return[await u.json(),e,a,t];throw u?.status&&u?.statusText?new Error(`Received ${u.status} ${u.statusText} for ${t} from ${a}`):new Error(`Unable to fetch ${t} from ${a}`)}async function tf(t,e,r){let s=`${Qc}/pypi/${t}/json`,i=await es(s,Ea(r));if(i?.ok)return[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 ta({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 ra(t){console.info(B.json?JSON.stringify({message:t}):t),Ke()}function Ke(t){if(t){let e=t.stack??t.message;console.info(B.json?JSON.stringify({error:e}):Pt(e))}process.exit(t?1:0)}function rf(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(B.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(nf(t));return B["error-on-outdated"]?e?2:0:B["error-on-unchanged"]?e?0:2:0}async function sf(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 sa(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 nf(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,sa(n.old,n.new,Pt),sa(n.new,n.old,Ut),n.age||"",n.info]))}return(0,ca.default)(e,{hsep:" ",stringLength:s=>s.replace(Zt(),"").length})}function of(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 af(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 lf(t,e){return t.replace(/[0-9]+\.[0-9]+\.[0-9]+(-.+)?/g,e)}function Xr(t){let e=(0,G.parse)(t);return e?!!e.prerelease.length:!1}function Aa(t){return/[0-9]+\.[0-9]+\.[0-9]+-.+/.test(t)}function hf(t){try{return(0,G.coerce)(t).version}catch{return null}}function uf(t,e,{range:r,semvers:s,usePre:i,useRel:n,useGreatest:o}={}){let a=hf(r),l=0;s=new Set(s),i=Aa(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 c=(0,G.parse)(h);if(c.prerelease.length&&(!i||n))continue;let u=(0,G.diff)(a,c.version);if(!(!u||!s.has(u)))if(o||!("time"in t))(0,G.gte)((0,G.coerce)(c.version).version,a)&&(a=c.version);else{let d=new Date(t.time[h]).getTime();d>=0&&d>l&&(a=c.version,l=d)}}return a||null}function cf(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,G.valid)(h)),l=uf(t,a,{range:r,semvers:o,usePre:n,useRel:i,useGreatest:s});if(s)return l;{let h,c;e==="pypi"?(c=t.info.version,h=(0,G.coerce)(t.info.version).version):h=t["dist-tags"].latest;let u=(0,G.coerce)(r).version,d=Aa(r),p=Xr(l),A=Xr(h),y=(0,G.gt)(l,u);if(!i&&n||d&&p||i&&!y&&d&&!p||d&&!p&&y)return l;if(d&&!p&&!y)return null;let I=(0,G.diff)(u,h);return I&&I!=="prerelease"&&!o.has(I.replace(/^pre/,""))||i&&Xr(h)?l:(0,G.lt)(h,u)&&!A?ea===!0||He(t.name,ea)?h:null:c??h}}function Ra(t){let e={},r=zt.UPDATES_GITHUB_API_TOKEN||zt.GITHUB_API_TOKEN||zt.GH_TOKEN||zt.HOMEBREW_GITHUB_API_TOKEN;return r&&(e.headers={Authorization:`Bearer ${r}`}),es(t,e)}async function ff(t,e){let r=`${ma}/repos/${t}/${e}/commits`,s=await Ra(r);if(!s||!s.ok)return;let i=await s.json(),{sha:n,commit:o}=i[0];return{hash:n,commit:o}}async function pf(t,e){let r=await Ra(`${ma}/repos/${t}/${e}/git/refs/tags`);return!r||!r.ok?void 0:(await r.json()).map(n=>n.ref.replace(/^refs\/tags\//,""))}function df(t,e,r){let s=kt(e);if((0,G.valid)(s))if(r){let i=e,n=kt(e);for(let o of t){let a=kt(o);(0,G.valid)(a)&&(!i||(0,G.gt)(a,n))&&(i=o,n=a)}if((0,G.neq)(s,n))return i}else{let i=t.at(-1),n=kt(i);if(!(0,G.valid)(n))return;if((0,G.neq)(s,n))return i}}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(Qr.test(a)){let{hash:l,commit:h}=await ff(n,o);if(!l?.length)return;let c=h?.committer?.date??h?.author?.date,u=l.substring(0,a.length);if(a!==u){let d=e.old.replace(a,u);return{key:t,newRange:d,user:n,repo:o,oldRef:a,newRef:u,newDate:c}}}else{let l=await pf(n,o),h=df(l,a,r);if(h)return{key:t,newRange:h,user:n,repo:o,oldRef:a,newRef:h}}}function gf(t){let e=t.match(Qo);return e?.length!==1?t:t.replace(Qo,(0,G.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 ia(t){return Array.from(t.matchAll(/(----BEGIN CERT[^]+?IFICATE----)/g),e=>e[0])}async function na(t=[]){return[...(await import("node:tls")).rootCertificates,...t]}function Zr(t,e){return e?/\/.+\//.test(t)?new RegExp(t.slice(1,-1)):Yr.default.makeRe(t):t instanceof RegExp?t:Yr.default.makeRe(t)}function pt(t){if(t instanceof Set){let e=new Set;for(let r of t)e.add(Zr(r,!0));return e}return t}function oa(t,e){let r=new Set;for(let s of t||[])r.add(Zr(s,!0));for(let s of e||[])r.add(Zr(s,!1));return r}function aa(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 Ef(t){let e=new Set;if(t)for(let r of t){let s;try{s=Xo(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=Jr(r,i),o;try{o=Xo(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=ga(r,Gc());s&&e.add(Kt(s))}return e}async function Af(){for(let A of[process.stdout,process.stderr])A?._handle?.setBlocking?.(!0);let t=96,e=typeof B.sockets=="number"?parseInt(B.sockets):t,{help:r,version:s,file:i,types:n,update:o}=B;r&&(jc.write(`usage: updates [options]
16
16
 
17
17
  Options:
18
18
  -u, --update Update versions and write package file
@@ -29,7 +29,7 @@ var wa=Object.create;var ts=Object.defineProperty;var xa=Object.getOwnPropertyDe
29
29
  -E, --error-on-outdated Exit with code 2 when updates are available and 0 when not
30
30
  -U, --error-on-unchanged Exit with code 0 when updates are available and 2 when not
31
31
  -r, --registry <url> Override npm registry URL
32
- -S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: ${pa}
32
+ -S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: ${t}
33
33
  -j, --json Output a JSON object
34
34
  -n, --no-color Disable color output
35
35
  -v, --version Print the version
@@ -43,4 +43,4 @@ var wa=Object.create;var ts=Object.defineProperty;var xa=Object.getOwnPropertyDe
43
43
  $ updates -e '/^react-(dom)?/'
44
44
  $ updates -f package.json
45
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);
46
+ `),Ko(0)),s&&(console.info(da),Ko(0));let a={},l={},h={},c={},u=0;for(let A of Ef(De(i))){let y=pa(Kt(A)),E=Vt(A)==="pyproject.toml"?"pypi":"npm";c[E]=A,a[E]||(a[E]={});let C={};try{({default:C}=await Promise.any(["updates.config.js","updates.config.ts","updates.config.mjs","updates.config.mts",".config/updates.js",".config/updates.ts",".config/updates.mjs",".config/updates.mts"].map(f=>import(Jr(y,...f.split("/"))))))}catch{}let N,w;B.include&&B.include!==!0&&(N=(Array.isArray(B.include)?B.include:[B.include]).flatMap(f=>f.split(","))),B.exclude&&B.exclude!==!0&&(w=(Array.isArray(B.exclude)?B.exclude:[B.exclude]).flatMap(f=>f.split(",")));let S=oa(N,C?.include),H=oa(w,C?.exclude),O={},$=(0,ua.default)("npm",{registry:"https://registry.npmjs.org"}),v={npmrc:$,recursive:!0};E==="npm"&&($["strict-ssl"]===!1&&(O.rejectUnauthorized=!1),$?.cafile&&(O.ca=na(ia(Yo($.cafile,"utf8")))),$?.ca&&(O.ca=na(Array.isArray($.ca)?$.ca:[$.ca].map(f=>ia(f)))));let g;n?g=Array.isArray(n)?n:n.split(","):"types"in C&&Array.isArray(C.types)?g=C.types:E==="npm"?g=["dependencies","devDependencies","optionalDependencies","peerDependencies","resolutions"]:g=["tool.poetry.dependencies","tool.poetry.dev-dependencies","tool.poetry.test-dependencies","tool.poetry.group.dev.dependencies","tool.poetry.group.test.dependencies"];let Z;try{h[E]=Yo(A,"utf8")}catch(f){throw new Error(`Unable to open ${A}: ${f.message}`)}try{E==="npm"?Z=JSON.parse(h[E]):Z=(await Promise.resolve().then(()=>Te(Vo(),1))).default(h[E])}catch(f){throw new Error(`Error parsing ${A}: ${f.message}`)}for(let f of g){let m;E==="npm"?m=Z[f]||{}:m=so(Z,f)||{};for(let[j,D]of Object.entries(m))(0,G.validRange)(D)&&aa(j,E,{include:S,exclude:H})?a[E][`${f}${we}${j}`]={old:gf(D),oldOriginal:D}:E==="npm"&&aa(j,E,{include:S,exclude:H})&&(l[`${f}${we}${j}`]={old:D})}if(u+=Object.keys(a[E]).length+Object.keys(l).length,!u)continue;let z;E==="npm"&&(z=Yt(B.registry||C.registry||$.registry));let k=await Ft(Object.keys(a[E]).map(f=>()=>{let[m,j]=f.split(we);return E==="npm"?ef(j,m,z,O,v,$):tf(j,m,O)}),{concurrency:e});for(let[f,m,j,D]of k){if(f?.error)throw new Error(f.error);let q=typeof Ve=="boolean"?Ve:He(f.name,Ve),ue=typeof Vr=="boolean"?Vr:He(f.name,Vr),ee=typeof Kr=="boolean"?Kr:He(f.name,Kr),re;Zo===!0||He(f.name,Zo)?re=new Set(["patch"]):Jo===!0||He(f.name,Jo)?re=new Set(["patch","minor"]):re=new Set(["patch","minor","major"]);let ce=`${m}${we}${D}`,ye=a[E][ce].old,ie=cf(f,{usePre:ue,useRel:ee,useGreatest:q,semvers:re,range:ye,mode:E}),P=lf(ye,ie);!ie||ye===P?delete a[E][ce]:(a[E][ce].new=P,E==="npm"?a[E][ce].info=ta(f?.versions?.[ie],j,f.name):a[E][ce].info=ta(f,j,f.info.name),f.time?.[ie]?a[E][ce].age=Ht(f.time[ie],{noAffix:!0}):f.releases?.[ie]?.[0]?.upload_time_iso_8601&&(a[E][ce].age=Ht(f.releases[ie][0].upload_time_iso_8601,{noAffix:!0})))}if(Object.keys(l).length){let f=await Ft(Object.entries(l).map(([m,j])=>()=>{let D=m.split(we)[1],q=typeof Ve=="boolean"?Ve:He(D,Ve);return mf([m,j],{useGreatest:q})}),{concurrency:e});for(let m of(f||[]).filter(Boolean)){let{key:j,newRange:D,user:q,repo:ue,oldRef:ee,newRef:re,newDate:ce}=m;a[E][j]={old:l[j].old,new:D,oldPrint:Qr.test(ee)?ee.substring(0,7):ee,newPrint:Qr.test(re)?re.substring(0,7):re,info:`https://github.com/${q}/${ue}`,...ce?{age:Ht(ce,{noAffix:!0})}:{}}}}}u===0&&(ra("No dependencies found, nothing to do."),Ke());let d=0;for(let A of Object.keys(a))d+=Object.keys(a[A]).length;d||(ra("All dependencies are up to date."),Ke());let p=rf(a);if(o){for(let A of Object.keys(a))if(Object.keys(a[A]).length){try{let y=A==="npm"?of:af;await sf(c[A],y(h[A],a[A]))}catch(y){throw new Error(`Error writing ${Vt(c[A])}: ${y.message}`)}console.info(Ut(`\u2728 ${Vt(c[A])} updated`))}}Ke(p)}Af().catch(Ke).then(Ke);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "updates",
3
- "version": "16.0.0",
3
+ "version": "16.1.0",
4
4
  "description": "Flexible npm and poetry dependency update tool",
5
5
  "author": "silverwind",
6
6
  "repository": "silverwind/updates",
@@ -16,26 +16,26 @@
16
16
  "devDependencies": {
17
17
  "@iarna/toml": "2.2.5",
18
18
  "ansi-regex": "6.0.1",
19
- "dot-prop": "8.0.2",
20
- "esbuild": "0.20.2",
19
+ "dot-prop": "9.0.0",
20
+ "esbuild": "0.21.3",
21
21
  "eslint": "8.57.0",
22
- "eslint-config-silverwind": "82.0.5",
23
- "execa": "8.0.1",
24
- "glowie": "1.2.0",
25
- "hosted-git-info": "7.0.1",
22
+ "eslint-config-silverwind": "85.1.2",
23
+ "execa": "9.1.0",
24
+ "glowie": "1.3.1",
25
+ "hosted-git-info": "7.0.2",
26
26
  "memize": "2.1.0",
27
27
  "minimist": "1.2.8",
28
28
  "p-all": "5.0.0",
29
- "picomatch": "4.0.1",
29
+ "picomatch": "4.0.2",
30
30
  "rc": "1.2.8",
31
31
  "registry-auth-token": "4.2.2",
32
- "restana": "4.9.7",
32
+ "restana": "4.9.9",
33
33
  "semver": "7.3.8",
34
34
  "supports-color": "9.4.0",
35
35
  "text-table": "0.2.0",
36
- "timerel": "5.5.0",
36
+ "timerel": "5.6.3",
37
37
  "versions": "12.0.1",
38
- "vitest": "1.4.0",
39
- "vitest-config-silverwind": "5.1.5"
38
+ "vitest": "1.6.0",
39
+ "vitest-config-silverwind": "9.0.6"
40
40
  }
41
41
  }