socket 2.0.9 → 2.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.
@@ -1,263 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";var qS=Object.create;var zu=Object.defineProperty;var KS=Object.getOwnPropertyDescriptor;var JS=Object.getOwnPropertyNames;var XS=Object.getPrototypeOf,ZS=Object.prototype.hasOwnProperty;var me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var YS=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of JS(t))!ZS.call(e,n)&&n!==i&&zu(e,n,{get:()=>t[n],enumerable:!(u=KS(t,n))||u.enumerable});return e};var _t=(e,t,i)=>(i=e!=null?qS(XS(e)):{},YS(t||!e||!e.__esModule?zu(i,"default",{value:e,enumerable:!0}):i,e));var Bt=me((jG,Xu)=>{var co=Object.defineProperty,QS=Object.getOwnPropertyDescriptor,eE=Object.getOwnPropertyNames,tE=Object.prototype.hasOwnProperty,rE=(e,t)=>{for(var i in t)co(e,i,{get:t[i],enumerable:!0})},sE=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of eE(t))!tE.call(e,n)&&n!==i&&co(e,n,{get:()=>t[n],enumerable:!(u=QS(t,n))||u.enumerable});return e},iE=e=>sE(co({},"__esModule",{value:!0}),e),Ju={};rE(Ju,{clearEnv:()=>lE,getEnvValue:()=>oE,hasOverride:()=>uE,resetEnv:()=>cE,setEnv:()=>aE,withEnv:()=>hE,withEnvSync:()=>pE});Xu.exports=iE(Ju);var nE=require("async_hooks"),Qs=new nE.AsyncLocalStorage,ar=new Map;function oE(e){let t=Qs.getStore();return t?.has(e)?t.get(e):ar.has(e)?ar.get(e):process.env[e]}function aE(e,t){ar.set(e,t)}function lE(e){ar.delete(e)}function cE(){ar.clear()}function uE(e){return Qs.getStore()?.has(e)||ar.has(e)}async function hE(e,t){let i=new Map(Object.entries(e));return await Qs.run(i,t)}function pE(e,t){let i=new Map(Object.entries(e));return Qs.run(i,t)}});var ho=me((MG,Yu)=>{var uo=Object.defineProperty,dE=Object.getOwnPropertyDescriptor,fE=Object.getOwnPropertyNames,gE=Object.prototype.hasOwnProperty,mE=(e,t)=>{for(var i in t)uo(e,i,{get:t[i],enumerable:!0})},yE=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of fE(t))!gE.call(e,n)&&n!==i&&uo(e,n,{get:()=>t[n],enumerable:!(u=dE(t,n))||u.enumerable});return e},vE=e=>yE(uo({},"__esModule",{value:!0}),e),Zu={};mE(Zu,{getHome:()=>EE});Yu.exports=vE(Zu);var SE=Bt();function EE(){return(0,SE.getEnvValue)("HOME")}});var fo=me((BG,eh)=>{var po=Object.defineProperty,bE=Object.getOwnPropertyDescriptor,wE=Object.getOwnPropertyNames,_E=Object.prototype.hasOwnProperty,OE=(e,t)=>{for(var i in t)po(e,i,{get:t[i],enumerable:!0})},RE=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of wE(t))!_E.call(e,n)&&n!==i&&po(e,n,{get:()=>t[n],enumerable:!(u=bE(t,n))||u.enumerable});return e},AE=e=>RE(po({},"__esModule",{value:!0}),e),Qu={};OE(Qu,{getAppdata:()=>CE,getComspec:()=>PE,getLocalappdata:()=>IE,getUserprofile:()=>TE});eh.exports=AE(Qu);var ei=Bt();function CE(){return(0,ei.getEnvValue)("APPDATA")}function IE(){return(0,ei.getEnvValue)("LOCALAPPDATA")}function TE(){return(0,ei.getEnvValue)("USERPROFILE")}function PE(){return(0,ei.getEnvValue)("COMSPEC")}});var sh=me((UG,rh)=>{var go=Object.defineProperty,xE=Object.getOwnPropertyDescriptor,NE=Object.getOwnPropertyNames,kE=Object.prototype.hasOwnProperty,LE=(e,t)=>{for(var i in t)go(e,i,{get:t[i],enumerable:!0})},DE=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of NE(t))!kE.call(e,n)&&n!==i&&go(e,n,{get:()=>t[n],enumerable:!(u=xE(t,n))||u.enumerable});return e},$E=e=>DE(go({},"__esModule",{value:!0}),e),th={};LE(th,{getXdgCacheHome:()=>jE,getXdgConfigHome:()=>ME,getXdgDataHome:()=>BE});rh.exports=$E(th);var mo=Bt();function jE(){return(0,mo.getEnvValue)("XDG_CACHE_HOME")}function ME(){return(0,mo.getEnvValue)("XDG_CONFIG_HOME")}function BE(){return(0,mo.getEnvValue)("XDG_DATA_HOME")}});var ti=me((FG,oh)=>{var yo=Object.defineProperty,UE=Object.getOwnPropertyDescriptor,FE=Object.getOwnPropertyNames,HE=Object.prototype.hasOwnProperty,GE=(e,t)=>{for(var i in t)yo(e,i,{get:t[i],enumerable:!0})},VE=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of FE(t))!HE.call(e,n)&&n!==i&&yo(e,n,{get:()=>t[n],enumerable:!(u=UE(t,n))||u.enumerable});return e},WE=e=>VE(yo({},"__esModule",{value:!0}),e),ih={};GE(ih,{DARWIN:()=>qE,S_IXGRP:()=>XE,S_IXOTH:()=>ZE,S_IXUSR:()=>JE,WIN32:()=>KE});oh.exports=WE(ih);var zE=require("os"),nh=(0,zE.platform)(),qE=nh==="darwin",KE=nh==="win32",JE=64,XE=8,ZE=1});var lr=me((HG,ch)=>{var So=Object.defineProperty,YE=Object.getOwnPropertyDescriptor,QE=Object.getOwnPropertyNames,eb=Object.prototype.hasOwnProperty,tb=(e,t)=>{for(var i in t)So(e,i,{get:t[i],enumerable:!0})},rb=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of QE(t))!eb.call(e,n)&&n!==i&&So(e,n,{get:()=>t[n],enumerable:!(u=YE(t,n))||u.enumerable});return e},sb=e=>rb(So({},"__esModule",{value:!0}),e),ah={};tb(ah,{getAbortController:()=>lh,getAbortSignal:()=>ib,getSpinner:()=>nb});ch.exports=sb(ah);var vo;function lh(){return vo===void 0&&(vo=new AbortController),vo}function ib(){return lh().signal}var ri;function nb(){if(ri===void 0)try{let{Spinner:e}=require("../lib/spinner");ri=e()??null}catch{ri=null}return ri??null}});var cr=me((GG,hh)=>{var wo=Object.defineProperty,ob=Object.getOwnPropertyDescriptor,ab=Object.getOwnPropertyNames,lb=Object.prototype.hasOwnProperty,cb=(e,t)=>{for(var i in t)wo(e,i,{get:t[i],enumerable:!0})},ub=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ab(t))!lb.call(e,n)&&n!==i&&wo(e,n,{get:()=>t[n],enumerable:!(u=ob(t,n))||u.enumerable});return e},hb=e=>ub(wo({},"__esModule",{value:!0}),e),uh={};cb(uh,{arrayChunk:()=>fb,arrayUnique:()=>gb,isArray:()=>mb,joinAnd:()=>yb,joinOr:()=>vb});hh.exports=hb(uh);var Eo;function pb(){return Eo===void 0&&(Eo=new Intl.ListFormat("en",{style:"long",type:"conjunction"})),Eo}var bo;function db(){return bo===void 0&&(bo=new Intl.ListFormat("en",{style:"long",type:"disjunction"})),bo}function fb(e,t){let i=t??2;if(i<=0)throw new Error("Chunk size must be greater than 0");let{length:u}=e,n=Math.min(u,i),l=[];for(let c=0;c<u;c+=n)l.push(e.slice(c,c+n));return l}function gb(e){return[...new Set(e)]}var mb=Array.isArray;function yb(e){return pb().format(e)}function vb(e){return db().format(e)}});var Oo=me((VG,dh)=>{var _o=Object.defineProperty,Sb=Object.getOwnPropertyDescriptor,Eb=Object.getOwnPropertyNames,bb=Object.prototype.hasOwnProperty,wb=(e,t)=>{for(var i in t)_o(e,i,{get:t[i],enumerable:!0})},_b=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Eb(t))!bb.call(e,n)&&n!==i&&_o(e,n,{get:()=>t[n],enumerable:!(u=Sb(t,n))||u.enumerable});return e},Ob=e=>_b(_o({},"__esModule",{value:!0}),e),ph={};wb(ph,{COLUMN_LIMIT:()=>kb,EMPTY_FILE:()=>Tb,EMPTY_VALUE:()=>Pb,LOOP_SENTINEL:()=>Ab,NODE_AUTH_TOKEN:()=>Lb,NODE_ENV:()=>Db,UNDEFINED_TOKEN:()=>xb,UNKNOWN_ERROR:()=>Cb,UNKNOWN_VALUE:()=>Ib,V:()=>Nb,kInternalsSymbol:()=>Rb});dh.exports=Ob(ph);var Rb=Symbol("@socketregistry.constants.internals"),Ab=1e6,Cb="Unknown error",Ib="<unknown>",Tb=`/* empty */
3
- `,Pb="<value>",xb=void 0,Nb="v",kb=80,Lb="NODE_AUTH_TOKEN",Db="NODE_ENV"});var mh=me(ur=>{"use strict";var $b=Object.defineProperty,at=(e,t)=>$b(e,"name",{value:t,configurable:!0});Object.defineProperty(ur,"__esModule",{value:!0});var fh=at(function(e){return function(t,i,u){return e(t,i,u)*u}},"castComparer"),Ao=at(function(e,t){if(e)throw Error("Invalid sort config: "+t)},"throwInvalidConfigErrorIfTrue"),gh=at(function(e){var t=e||{},i=t.asc,u=t.desc,n=i?1:-1,l=i||u;Ao(!l,"Expected `asc` or `desc` property"),Ao(i&&u,"Ambiguous object with `asc` and `desc` config properties");var c=e.comparer&&fh(e.comparer);return{order:n,sortBy:l,comparer:c}},"unpackObjectSorter"),jb=at(function(e){return at(function t(i,u,n,l,c,r,s){var o,a;if(typeof i=="string")o=r[i],a=s[i];else if(typeof i=="function")o=i(r),a=i(s);else{var h=gh(i);return t(h.sortBy,u,n,h.order,h.comparer||e,r,s)}var p=c(o,a,l);return(p===0||o==null&&a==null)&&u.length>n?t(u[n],u,n+1,l,c,r,s):p},"multiPropertySorter")},"multiPropertySorterProvider");function Co(e,t,i){if(e===void 0||e===!0)return function(l,c){return t(l,c,i)};if(typeof e=="string")return Ao(e.includes("."),"String syntax not allowed for nested properties."),function(l,c){return t(l[e],c[e],i)};if(typeof e=="function")return function(l,c){return t(e(l),e(c),i)};if(Array.isArray(e)){var u=jb(t);return function(l,c){return u(e[0],e,1,i,t,l,c)}}var n=gh(e);return Co(n.sortBy,n.comparer||t,n.order)}at(Co,"getSortStrategy");var Ro=at(function(e,t,i,u){var n;return Array.isArray(t)?(Array.isArray(i)&&i.length<2&&(n=i,i=n[0]),t.sort(Co(i,u,e))):t},"sortArray");function si(e){var t=fh(e.comparer);return function(i){var u=Array.isArray(i)&&!e.inPlaceSorting?i.slice():i;return{asc:at(function(n){return Ro(1,u,n,t)},"asc"),desc:at(function(n){return Ro(-1,u,n,t)},"desc"),by:at(function(n){return Ro(1,u,n,t)},"by")}}}at(si,"createNewSortInstance");var Io=at(function(e,t,i){return e==null?i:t==null?-i:typeof e!=typeof t?typeof e<typeof t?-1:1:e<t?-1:e>t?1:0},"defaultComparer"),Mb=si({comparer:Io}),Bb=si({comparer:Io,inPlaceSorting:!0});ur.createNewSortInstance=si;ur.defaultComparer=Io;ur.inPlaceSort=Bb;ur.sort=Mb});var Oh=me((zG,_h)=>{"use strict";var Ub=Object.defineProperty,Oe=(e,t)=>Ub(e,"name",{value:t,configurable:!0}),Ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ni=Ae((e,t)=>{"use strict";var i="2.0.0",u=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,l=250,c=["major","premajor","minor","preminor","patch","prepatch","prerelease"];t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:l,MAX_SAFE_INTEGER:u,RELEASE_TYPES:c,SEMVER_SPEC_VERSION:i,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}),oi=Ae((e,t)=>{"use strict";var i=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...u)=>{}:()=>{};t.exports=i}),es=Ae((e,t)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:u,MAX_LENGTH:n}=ni(),l=oi();e=t.exports={};var c=e.re=[],r=e.safeRe=[],s=e.src=[],o=e.safeSrc=[],a=e.t={},h=0,p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",n],[p,u]],m=Oe(f=>{for(let[y,v]of d)f=f.split(`${y}*`).join(`${y}{0,${v}}`).split(`${y}+`).join(`${y}{1,${v}}`);return f},"makeSafeRegex"),g=Oe((f,y,v)=>{let E=m(y),b=h++;l(f,b,y),a[f]=b,s[b]=y,o[b]=E,c[b]=new RegExp(y,v?"g":void 0),r[b]=new RegExp(E,v?"g":void 0)},"createToken");g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),g("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${s[a.NONNUMERICIDENTIFIER]}|${s[a.NUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NONNUMERICIDENTIFIER]}|${s[a.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${p}+`),g("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),g("FULL",`^${s[a.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),g("LOOSE",`^${s[a.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE",`${s[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${s[a.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),g("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),g("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),g("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),g("COERCE",`${s[a.COERCEPLAIN]}(?:$|[^\\d])`),g("COERCEFULL",s[a.COERCEPLAIN]+`(?:${s[a.PRERELEASE]})?(?:${s[a.BUILD]})?(?:$|[^\\d])`),g("COERCERTL",s[a.COERCE],!0),g("COERCERTLFULL",s[a.COERCEFULL],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",g("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),g("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",g("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}),xo=Ae((e,t)=>{"use strict";var i=Object.freeze({loose:!0}),u=Object.freeze({}),n=Oe(l=>l?typeof l!="object"?i:l:u,"parseOptions");t.exports=n}),Sh=Ae((e,t)=>{"use strict";var i=/^[0-9]+$/,u=Oe((l,c)=>{let r=i.test(l),s=i.test(c);return r&&s&&(l=+l,c=+c),l===c?0:r&&!s?-1:s&&!r?1:l<c?-1:1},"compareIdentifiers"),n=Oe((l,c)=>u(c,l),"rcompareIdentifiers");t.exports={compareIdentifiers:u,rcompareIdentifiers:n}}),qe=Ae((e,t)=>{"use strict";var i=oi(),{MAX_LENGTH:u,MAX_SAFE_INTEGER:n}=ni(),{safeRe:l,t:c}=es(),r=xo(),{compareIdentifiers:s}=Sh(),o=class Ot{static{Oe(this,"SemVer")}constructor(h,p){if(p=r(p),h instanceof Ot){if(h.loose===!!p.loose&&h.includePrerelease===!!p.includePrerelease)return h;h=h.version}else if(typeof h!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof h}".`);if(h.length>u)throw new TypeError(`version is longer than ${u} characters`);i("SemVer",h,p),this.options=p,this.loose=!!p.loose,this.includePrerelease=!!p.includePrerelease;let d=h.trim().match(p.loose?l[c.LOOSE]:l[c.FULL]);if(!d)throw new TypeError(`Invalid Version: ${h}`);if(this.raw=h,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(m=>{if(/^[0-9]+$/.test(m)){let g=+m;if(g>=0&&g<n)return g}return m}):this.prerelease=[],this.build=d[5]?d[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(h){if(i("SemVer.compare",this.version,this.options,h),!(h instanceof Ot)){if(typeof h=="string"&&h===this.version)return 0;h=new Ot(h,this.options)}return h.version===this.version?0:this.compareMain(h)||this.comparePre(h)}compareMain(h){return h instanceof Ot||(h=new Ot(h,this.options)),s(this.major,h.major)||s(this.minor,h.minor)||s(this.patch,h.patch)}comparePre(h){if(h instanceof Ot||(h=new Ot(h,this.options)),this.prerelease.length&&!h.prerelease.length)return-1;if(!this.prerelease.length&&h.prerelease.length)return 1;if(!this.prerelease.length&&!h.prerelease.length)return 0;let p=0;do{let d=this.prerelease[p],m=h.prerelease[p];if(i("prerelease compare",p,d,m),d===void 0&&m===void 0)return 0;if(m===void 0)return 1;if(d===void 0)return-1;if(d!==m)return s(d,m)}while(++p)}compareBuild(h){h instanceof Ot||(h=new Ot(h,this.options));let p=0;do{let d=this.build[p],m=h.build[p];if(i("build compare",p,d,m),d===void 0&&m===void 0)return 0;if(m===void 0)return 1;if(d===void 0)return-1;if(d!==m)return s(d,m)}while(++p)}inc(h,p,d){if(h.startsWith("pre")){if(!p&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(p){let m=`-${p}`.match(this.options.loose?l[c.PRERELEASELOOSE]:l[c.PRERELEASE]);if(!m||m[1]!==p)throw new Error(`invalid identifier: ${p}`)}}switch(h){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",p,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",p,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",p,d),this.inc("pre",p,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",p,d),this.inc("pre",p,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let m=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[m];else{let g=this.prerelease.length;for(;--g>=0;)typeof this.prerelease[g]=="number"&&(this.prerelease[g]++,g=-2);if(g===-1){if(p===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(m)}}if(p){let g=[p,m];d===!1&&(g=[p]),s(this.prerelease[0],p)===0?isNaN(this.prerelease[1])&&(this.prerelease=g):this.prerelease=g}break}default:throw new Error(`invalid increment argument: ${h}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};t.exports=o}),hr=Ae((e,t)=>{"use strict";var i=qe(),u=Oe((n,l,c=!1)=>{if(n instanceof i)return n;try{return new i(n,l)}catch(r){if(!c)return null;throw r}},"parse");t.exports=u}),Fb=Ae((e,t)=>{"use strict";var i=hr(),u=Oe((n,l)=>{let c=i(n,l);return c?c.version:null},"valid");t.exports=u}),Hb=Ae((e,t)=>{"use strict";var i=hr(),u=Oe((n,l)=>{let c=i(n.trim().replace(/^[=v]+/,""),l);return c?c.version:null},"clean");t.exports=u}),Gb=Ae((e,t)=>{"use strict";var i=qe(),u=Oe((n,l,c,r,s)=>{typeof c=="string"&&(s=r,r=c,c=void 0);try{return new i(n instanceof i?n.version:n,c).inc(l,r,s).version}catch{return null}},"inc");t.exports=u}),Vb=Ae((e,t)=>{"use strict";var i=hr(),u=Oe((n,l)=>{let c=i(n,null,!0),r=i(l,null,!0),s=c.compare(r);if(s===0)return null;let o=s>0,a=o?c:r,h=o?r:c,p=!!a.prerelease.length;if(h.prerelease.length&&!p){if(!h.patch&&!h.minor)return"major";if(h.compareMain(a)===0)return h.minor&&!h.patch?"minor":"patch"}let d=p?"pre":"";return c.major!==r.major?d+"major":c.minor!==r.minor?d+"minor":c.patch!==r.patch?d+"patch":"prerelease"},"diff");t.exports=u}),Wb=Ae((e,t)=>{"use strict";var i=qe(),u=Oe((n,l)=>new i(n,l).major,"major");t.exports=u}),zb=Ae((e,t)=>{"use strict";var i=qe(),u=Oe((n,l)=>new i(n,l).minor,"minor");t.exports=u}),qb=Ae((e,t)=>{"use strict";var i=qe(),u=Oe((n,l)=>new i(n,l).patch,"patch");t.exports=u}),Kb=Ae((e,t)=>{"use strict";var i=hr(),u=Oe((n,l)=>{let c=i(n,l);return c&&c.prerelease.length?c.prerelease:null},"prerelease");t.exports=u}),pt=Ae((e,t)=>{"use strict";var i=qe(),u=Oe((n,l,c)=>new i(n,c).compare(new i(l,c)),"compare");t.exports=u}),Jb=Ae((e,t)=>{"use strict";var i=pt(),u=Oe((n,l,c)=>i(l,n,c),"rcompare");t.exports=u}),Xb=Ae((e,t)=>{"use strict";var i=pt(),u=Oe((n,l)=>i(n,l,!0),"compareLoose");t.exports=u}),No=Ae((e,t)=>{"use strict";var i=qe(),u=Oe((n,l,c)=>{let r=new i(n,c),s=new i(l,c);return r.compare(s)||r.compareBuild(s)},"compareBuild");t.exports=u}),Zb=Ae((e,t)=>{"use strict";var i=No(),u=Oe((n,l)=>n.sort((c,r)=>i(c,r,l)),"sort");t.exports=u}),Yb=Ae((e,t)=>{"use strict";var i=No(),u=Oe((n,l)=>n.sort((c,r)=>i(r,c,l)),"rsort");t.exports=u}),ai=Ae((e,t)=>{"use strict";var i=pt(),u=Oe((n,l,c)=>i(n,l,c)>0,"gt");t.exports=u}),ko=Ae((e,t)=>{"use strict";var i=pt(),u=Oe((n,l,c)=>i(n,l,c)<0,"lt");t.exports=u}),Eh=Ae((e,t)=>{"use strict";var i=pt(),u=Oe((n,l,c)=>i(n,l,c)===0,"eq");t.exports=u}),bh=Ae((e,t)=>{"use strict";var i=pt(),u=Oe((n,l,c)=>i(n,l,c)!==0,"neq");t.exports=u}),Lo=Ae((e,t)=>{"use strict";var i=pt(),u=Oe((n,l,c)=>i(n,l,c)>=0,"gte");t.exports=u}),Do=Ae((e,t)=>{"use strict";var i=pt(),u=Oe((n,l,c)=>i(n,l,c)<=0,"lte");t.exports=u}),wh=Ae((e,t)=>{"use strict";var i=Eh(),u=bh(),n=ai(),l=Lo(),c=ko(),r=Do(),s=Oe((o,a,h,p)=>{switch(a){case"===":return typeof o=="object"&&(o=o.version),typeof h=="object"&&(h=h.version),o===h;case"!==":return typeof o=="object"&&(o=o.version),typeof h=="object"&&(h=h.version),o!==h;case"":case"=":case"==":return i(o,h,p);case"!=":return u(o,h,p);case">":return n(o,h,p);case">=":return l(o,h,p);case"<":return c(o,h,p);case"<=":return r(o,h,p);default:throw new TypeError(`Invalid operator: ${a}`)}},"cmp");t.exports=s}),Qb=Ae((e,t)=>{"use strict";var i=qe(),u=hr(),{safeRe:n,t:l}=es(),c=Oe((r,s)=>{if(r instanceof i)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;s=s||{};let o=null;if(!s.rtl)o=r.match(s.includePrerelease?n[l.COERCEFULL]:n[l.COERCE]);else{let g=s.includePrerelease?n[l.COERCERTLFULL]:n[l.COERCERTL],f;for(;(f=g.exec(r))&&(!o||o.index+o[0].length!==r.length);)(!o||f.index+f[0].length!==o.index+o[0].length)&&(o=f),g.lastIndex=f.index+f[1].length+f[2].length;g.lastIndex=-1}if(o===null)return null;let a=o[2],h=o[3]||"0",p=o[4]||"0",d=s.includePrerelease&&o[5]?`-${o[5]}`:"",m=s.includePrerelease&&o[6]?`+${o[6]}`:"";return u(`${a}.${h}.${p}${d}${m}`,s)},"coerce");t.exports=c}),ew=Ae((e,t)=>{"use strict";var i=class{static{Oe(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(u){let n=this.map.get(u);if(n!==void 0)return this.map.delete(u),this.map.set(u,n),n}delete(u){return this.map.delete(u)}set(u,n){if(!this.delete(u)&&n!==void 0){if(this.map.size>=this.max){let l=this.map.keys().next().value;this.delete(l)}this.map.set(u,n)}return this}};t.exports=i}),dt=Ae((e,t)=>{"use strict";var i=/\s+/g,u=class ii{static{Oe(this,"Range")}constructor(D,H){if(H=c(H),D instanceof ii)return D.loose===!!H.loose&&D.includePrerelease===!!H.includePrerelease?D:new ii(D.raw,H);if(D instanceof r)return this.raw=D.value,this.set=[[D]],this.formatted=void 0,this;if(this.options=H,this.loose=!!H.loose,this.includePrerelease=!!H.includePrerelease,this.raw=D.trim().replace(i," "),this.set=this.raw.split("||").map(G=>this.parseRange(G.trim())).filter(G=>G.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let G=this.set[0];if(this.set=this.set.filter(x=>!y(x[0])),this.set.length===0)this.set=[G];else if(this.set.length>1){for(let x of this.set)if(x.length===1&&v(x[0])){this.set=[x];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let D=0;D<this.set.length;D++){D>0&&(this.formatted+="||");let H=this.set[D];for(let G=0;G<H.length;G++)G>0&&(this.formatted+=" "),this.formatted+=H[G].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(D){let H=((this.options.includePrerelease&&g)|(this.options.loose&&f))+":"+D,G=l.get(H);if(G)return G;let x=this.options.loose,k=x?a[h.HYPHENRANGELOOSE]:a[h.HYPHENRANGE];D=D.replace(k,M(this.options.includePrerelease)),s("hyphen replace",D),D=D.replace(a[h.COMPARATORTRIM],p),s("comparator trim",D),D=D.replace(a[h.TILDETRIM],d),s("tilde trim",D),D=D.replace(a[h.CARETTRIM],m),s("caret trim",D);let T=D.split(" ").map(Y=>b(Y,this.options)).join(" ").split(/\s+/).map(Y=>N(Y,this.options));x&&(T=T.filter(Y=>(s("loose invalid filter",Y,this.options),!!Y.match(a[h.COMPARATORLOOSE])))),s("range list",T);let C=new Map,q=T.map(Y=>new r(Y,this.options));for(let Y of q){if(y(Y))return[Y];C.set(Y.value,Y)}C.size>1&&C.has("")&&C.delete("");let X=[...C.values()];return l.set(H,X),X}intersects(D,H){if(!(D instanceof ii))throw new TypeError("a Range is required");return this.set.some(G=>E(G,H)&&D.set.some(x=>E(x,H)&&G.every(k=>x.every(T=>k.intersects(T,H)))))}test(D){if(!D)return!1;if(typeof D=="string")try{D=new o(D,this.options)}catch{return!1}for(let H=0;H<this.set.length;H++)if(B(this.set[H],D,this.options))return!0;return!1}};t.exports=u;var n=ew(),l=new n,c=xo(),r=li(),s=oi(),o=qe(),{safeRe:a,t:h,comparatorTrimReplace:p,tildeTrimReplace:d,caretTrimReplace:m}=es(),{FLAG_INCLUDE_PRERELEASE:g,FLAG_LOOSE:f}=ni(),y=Oe(F=>F.value==="<0.0.0-0","isNullSet"),v=Oe(F=>F.value==="","isAny"),E=Oe((F,D)=>{let H=!0,G=F.slice(),x=G.pop();for(;H&&G.length;)H=G.every(k=>x.intersects(k,D)),x=G.pop();return H},"isSatisfiable"),b=Oe((F,D)=>(s("comp",F,D),F=A(F,D),s("caret",F),F=_(F,D),s("tildes",F),F=P(F,D),s("xrange",F),F=j(F,D),s("stars",F),F),"parseComparator"),w=Oe(F=>!F||F.toLowerCase()==="x"||F==="*","isX"),_=Oe((F,D)=>F.trim().split(/\s+/).map(H=>O(H,D)).join(" "),"replaceTildes"),O=Oe((F,D)=>{let H=D.loose?a[h.TILDELOOSE]:a[h.TILDE];return F.replace(H,(G,x,k,T,C)=>{s("tilde",F,G,x,k,T,C);let q;return w(x)?q="":w(k)?q=`>=${x}.0.0 <${+x+1}.0.0-0`:w(T)?q=`>=${x}.${k}.0 <${x}.${+k+1}.0-0`:C?(s("replaceTilde pr",C),q=`>=${x}.${k}.${T}-${C} <${x}.${+k+1}.0-0`):q=`>=${x}.${k}.${T} <${x}.${+k+1}.0-0`,s("tilde return",q),q})},"replaceTilde"),A=Oe((F,D)=>F.trim().split(/\s+/).map(H=>I(H,D)).join(" "),"replaceCarets"),I=Oe((F,D)=>{s("caret",F,D);let H=D.loose?a[h.CARETLOOSE]:a[h.CARET],G=D.includePrerelease?"-0":"";return F.replace(H,(x,k,T,C,q)=>{s("caret",F,x,k,T,C,q);let X;return w(k)?X="":w(T)?X=`>=${k}.0.0${G} <${+k+1}.0.0-0`:w(C)?k==="0"?X=`>=${k}.${T}.0${G} <${k}.${+T+1}.0-0`:X=`>=${k}.${T}.0${G} <${+k+1}.0.0-0`:q?(s("replaceCaret pr",q),k==="0"?T==="0"?X=`>=${k}.${T}.${C}-${q} <${k}.${T}.${+C+1}-0`:X=`>=${k}.${T}.${C}-${q} <${k}.${+T+1}.0-0`:X=`>=${k}.${T}.${C}-${q} <${+k+1}.0.0-0`):(s("no pr"),k==="0"?T==="0"?X=`>=${k}.${T}.${C}${G} <${k}.${T}.${+C+1}-0`:X=`>=${k}.${T}.${C}${G} <${k}.${+T+1}.0-0`:X=`>=${k}.${T}.${C} <${+k+1}.0.0-0`),s("caret return",X),X})},"replaceCaret"),P=Oe((F,D)=>(s("replaceXRanges",F,D),F.split(/\s+/).map(H=>L(H,D)).join(" ")),"replaceXRanges"),L=Oe((F,D)=>{F=F.trim();let H=D.loose?a[h.XRANGELOOSE]:a[h.XRANGE];return F.replace(H,(G,x,k,T,C,q)=>{s("xRange",F,G,x,k,T,C,q);let X=w(k),Y=X||w(T),$=Y||w(C),V=$;return x==="="&&V&&(x=""),q=D.includePrerelease?"-0":"",X?x===">"||x==="<"?G="<0.0.0-0":G="*":x&&V?(Y&&(T=0),C=0,x===">"?(x=">=",Y?(k=+k+1,T=0,C=0):(T=+T+1,C=0)):x==="<="&&(x="<",Y?k=+k+1:T=+T+1),x==="<"&&(q="-0"),G=`${x+k}.${T}.${C}${q}`):Y?G=`>=${k}.0.0${q} <${+k+1}.0.0-0`:$&&(G=`>=${k}.${T}.0${q} <${k}.${+T+1}.0-0`),s("xRange return",G),G})},"replaceXRange"),j=Oe((F,D)=>(s("replaceStars",F,D),F.trim().replace(a[h.STAR],"")),"replaceStars"),N=Oe((F,D)=>(s("replaceGTE0",F,D),F.trim().replace(a[D.includePrerelease?h.GTE0PRE:h.GTE0],"")),"replaceGTE0"),M=Oe(F=>(D,H,G,x,k,T,C,q,X,Y,$,V)=>(w(G)?H="":w(x)?H=`>=${G}.0.0${F?"-0":""}`:w(k)?H=`>=${G}.${x}.0${F?"-0":""}`:T?H=`>=${H}`:H=`>=${H}${F?"-0":""}`,w(X)?q="":w(Y)?q=`<${+X+1}.0.0-0`:w($)?q=`<${X}.${+Y+1}.0-0`:V?q=`<=${X}.${Y}.${$}-${V}`:F?q=`<${X}.${Y}.${+$+1}-0`:q=`<=${q}`,`${H} ${q}`.trim()),"hyphenReplace"),B=Oe((F,D,H)=>{for(let G=0;G<F.length;G++)if(!F[G].test(D))return!1;if(D.prerelease.length&&!H.includePrerelease){for(let G=0;G<F.length;G++)if(s(F[G].semver),F[G].semver!==r.ANY&&F[G].semver.prerelease.length>0){let x=F[G].semver;if(x.major===D.major&&x.minor===D.minor&&x.patch===D.patch)return!0}return!1}return!0},"testSet")}),li=Ae((e,t)=>{"use strict";var i=Symbol("SemVer ANY"),u=class Po{static{Oe(this,"Comparator")}static get ANY(){return i}constructor(p,d){if(d=n(d),p instanceof Po){if(p.loose===!!d.loose)return p;p=p.value}p=p.trim().split(/\s+/).join(" "),s("comparator",p,d),this.options=d,this.loose=!!d.loose,this.parse(p),this.semver===i?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(p){let d=this.options.loose?l[c.COMPARATORLOOSE]:l[c.COMPARATOR],m=p.match(d);if(!m)throw new TypeError(`Invalid comparator: ${p}`);this.operator=m[1]!==void 0?m[1]:"",this.operator==="="&&(this.operator=""),m[2]?this.semver=new o(m[2],this.options.loose):this.semver=i}toString(){return this.value}test(p){if(s("Comparator.test",p,this.options.loose),this.semver===i||p===i)return!0;if(typeof p=="string")try{p=new o(p,this.options)}catch{return!1}return r(p,this.operator,this.semver,this.options)}intersects(p,d){if(!(p instanceof Po))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new a(p.value,d).test(this.value):p.operator===""?p.value===""?!0:new a(this.value,d).test(p.semver):(d=n(d),d.includePrerelease&&(this.value==="<0.0.0-0"||p.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||p.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&p.operator.startsWith(">")||this.operator.startsWith("<")&&p.operator.startsWith("<")||this.semver.version===p.semver.version&&this.operator.includes("=")&&p.operator.includes("=")||r(this.semver,"<",p.semver,d)&&this.operator.startsWith(">")&&p.operator.startsWith("<")||r(this.semver,">",p.semver,d)&&this.operator.startsWith("<")&&p.operator.startsWith(">")))}};t.exports=u;var n=xo(),{safeRe:l,t:c}=es(),r=wh(),s=oi(),o=qe(),a=dt()}),ci=Ae((e,t)=>{"use strict";var i=dt(),u=Oe((n,l,c)=>{try{l=new i(l,c)}catch{return!1}return l.test(n)},"satisfies");t.exports=u}),tw=Ae((e,t)=>{"use strict";var i=dt(),u=Oe((n,l)=>new i(n,l).set.map(c=>c.map(r=>r.value).join(" ").trim().split(" ")),"toComparators");t.exports=u}),rw=Ae((e,t)=>{"use strict";var i=qe(),u=dt(),n=Oe((l,c,r)=>{let s=null,o=null,a=null;try{a=new u(c,r)}catch{return null}return l.forEach(h=>{a.test(h)&&(!s||o.compare(h)===-1)&&(s=h,o=new i(s,r))}),s},"maxSatisfying");t.exports=n}),sw=Ae((e,t)=>{"use strict";var i=qe(),u=dt(),n=Oe((l,c,r)=>{let s=null,o=null,a=null;try{a=new u(c,r)}catch{return null}return l.forEach(h=>{a.test(h)&&(!s||o.compare(h)===1)&&(s=h,o=new i(s,r))}),s},"minSatisfying");t.exports=n}),iw=Ae((e,t)=>{"use strict";var i=qe(),u=dt(),n=ai(),l=Oe((c,r)=>{c=new u(c,r);let s=new i("0.0.0");if(c.test(s)||(s=new i("0.0.0-0"),c.test(s)))return s;s=null;for(let o=0;o<c.set.length;++o){let a=c.set[o],h=null;a.forEach(p=>{let d=new i(p.semver.version);switch(p.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!h||n(d,h))&&(h=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${p.operator}`)}}),h&&(!s||n(s,h))&&(s=h)}return s&&c.test(s)?s:null},"minVersion");t.exports=l}),nw=Ae((e,t)=>{"use strict";var i=dt(),u=Oe((n,l)=>{try{return new i(n,l).range||"*"}catch{return null}},"validRange");t.exports=u}),$o=Ae((e,t)=>{"use strict";var i=qe(),u=li(),{ANY:n}=u,l=dt(),c=ci(),r=ai(),s=ko(),o=Do(),a=Lo(),h=Oe((p,d,m,g)=>{p=new i(p,g),d=new l(d,g);let f,y,v,E,b;switch(m){case">":f=r,y=o,v=s,E=">",b=">=";break;case"<":f=s,y=a,v=r,E="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(c(p,d,g))return!1;for(let w=0;w<d.set.length;++w){let _=d.set[w],O=null,A=null;if(_.forEach(I=>{I.semver===n&&(I=new u(">=0.0.0")),O=O||I,A=A||I,f(I.semver,O.semver,g)?O=I:v(I.semver,A.semver,g)&&(A=I)}),O.operator===E||O.operator===b||(!A.operator||A.operator===E)&&y(p,A.semver)||A.operator===b&&v(p,A.semver))return!1}return!0},"outside");t.exports=h}),ow=Ae((e,t)=>{"use strict";var i=$o(),u=Oe((n,l,c)=>i(n,l,">",c),"gtr");t.exports=u}),aw=Ae((e,t)=>{"use strict";var i=$o(),u=Oe((n,l,c)=>i(n,l,"<",c),"ltr");t.exports=u}),lw=Ae((e,t)=>{"use strict";var i=dt(),u=Oe((n,l,c)=>(n=new i(n,c),l=new i(l,c),n.intersects(l,c)),"intersects");t.exports=u}),cw=Ae((e,t)=>{"use strict";var i=ci(),u=pt();t.exports=(n,l,c)=>{let r=[],s=null,o=null,a=n.sort((m,g)=>u(m,g,c));for(let m of a)i(m,l,c)?(o=m,s||(s=m)):(o&&r.push([s,o]),o=null,s=null);s&&r.push([s,null]);let h=[];for(let[m,g]of r)m===g?h.push(m):!g&&m===a[0]?h.push("*"):g?m===a[0]?h.push(`<=${g}`):h.push(`${m} - ${g}`):h.push(`>=${m}`);let p=h.join(" || "),d=typeof l.raw=="string"?l.raw:String(l);return p.length<d.length?p:l}}),uw=Ae((e,t)=>{"use strict";var i=dt(),u=li(),{ANY:n}=u,l=ci(),c=pt(),r=Oe((d,m,g={})=>{if(d===m)return!0;d=new i(d,g),m=new i(m,g);let f=!1;e:for(let y of d.set){for(let v of m.set){let E=a(y,v,g);if(f=f||E!==null,E)continue e}if(f)return!1}return!0},"subset"),s=[new u(">=0.0.0-0")],o=[new u(">=0.0.0")],a=Oe((d,m,g)=>{if(d===m)return!0;if(d.length===1&&d[0].semver===n){if(m.length===1&&m[0].semver===n)return!0;g.includePrerelease?d=s:d=o}if(m.length===1&&m[0].semver===n){if(g.includePrerelease)return!0;m=o}let f=new Set,y,v;for(let P of d)P.operator===">"||P.operator===">="?y=h(y,P,g):P.operator==="<"||P.operator==="<="?v=p(v,P,g):f.add(P.semver);if(f.size>1)return null;let E;if(y&&v&&(E=c(y.semver,v.semver,g),E>0||E===0&&(y.operator!==">="||v.operator!=="<=")))return null;for(let P of f){if(y&&!l(P,String(y),g)||v&&!l(P,String(v),g))return null;for(let L of m)if(!l(P,String(L),g))return!1;return!0}let b,w,_,O,A=v&&!g.includePrerelease&&v.semver.prerelease.length?v.semver:!1,I=y&&!g.includePrerelease&&y.semver.prerelease.length?y.semver:!1;A&&A.prerelease.length===1&&v.operator==="<"&&A.prerelease[0]===0&&(A=!1);for(let P of m){if(O=O||P.operator===">"||P.operator===">=",_=_||P.operator==="<"||P.operator==="<=",y){if(I&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===I.major&&P.semver.minor===I.minor&&P.semver.patch===I.patch&&(I=!1),P.operator===">"||P.operator===">="){if(b=h(y,P,g),b===P&&b!==y)return!1}else if(y.operator===">="&&!l(y.semver,String(P),g))return!1}if(v){if(A&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===A.major&&P.semver.minor===A.minor&&P.semver.patch===A.patch&&(A=!1),P.operator==="<"||P.operator==="<="){if(w=p(v,P,g),w===P&&w!==v)return!1}else if(v.operator==="<="&&!l(v.semver,String(P),g))return!1}if(!P.operator&&(v||y)&&E!==0)return!1}return!(y&&_&&!v&&E!==0||v&&O&&!y&&E!==0||I||A)},"simpleSubset"),h=Oe((d,m,g)=>{if(!d)return m;let f=c(d.semver,m.semver,g);return f>0?d:f<0||m.operator===">"&&d.operator===">="?m:d},"higherGT"),p=Oe((d,m,g)=>{if(!d)return m;let f=c(d.semver,m.semver,g);return f<0?d:f>0||m.operator==="<"&&d.operator==="<="?m:d},"lowerLT");t.exports=r}),To=es(),yh=ni(),hw=qe(),vh=Sh(),pw=hr(),dw=Fb(),fw=Hb(),gw=Gb(),mw=Vb(),yw=Wb(),vw=zb(),Sw=qb(),Ew=Kb(),bw=pt(),ww=Jb(),_w=Xb(),Ow=No(),Rw=Zb(),Aw=Yb(),Cw=ai(),Iw=ko(),Tw=Eh(),Pw=bh(),xw=Lo(),Nw=Do(),kw=wh(),Lw=Qb(),Dw=li(),$w=dt(),jw=ci(),Mw=tw(),Bw=rw(),Uw=sw(),Fw=iw(),Hw=nw(),Gw=$o(),Vw=ow(),Ww=aw(),zw=lw(),qw=cw(),Kw=uw();_h.exports={parse:pw,valid:dw,clean:fw,inc:gw,diff:mw,major:yw,minor:vw,patch:Sw,prerelease:Ew,compare:bw,rcompare:ww,compareLoose:_w,compareBuild:Ow,sort:Rw,rsort:Aw,gt:Cw,lt:Iw,eq:Tw,neq:Pw,gte:xw,lte:Nw,cmp:kw,coerce:Lw,Comparator:Dw,Range:$w,satisfies:jw,toComparators:Mw,maxSatisfying:Bw,minSatisfying:Uw,minVersion:Fw,validRange:Hw,outside:Gw,gtr:Vw,ltr:Ww,intersects:zw,simplifyRange:qw,subset:Kw,SemVer:hw,re:To.re,src:To.src,tokens:To.t,SEMVER_SPEC_VERSION:yh.SEMVER_SPEC_VERSION,RELEASE_TYPES:yh.RELEASE_TYPES,compareIdentifiers:vh.compareIdentifiers,rcompareIdentifiers:vh.rcompareIdentifiers}});var Fo=me((KG,Ch)=>{var Uo=Object.defineProperty,Jw=Object.getOwnPropertyDescriptor,Xw=Object.getOwnPropertyNames,Zw=Object.prototype.hasOwnProperty,Yw=(e,t)=>{for(var i in t)Uo(e,i,{get:t[i],enumerable:!0})},Qw=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Xw(t))!Zw.call(e,n)&&n!==i&&Uo(e,n,{get:()=>t[n],enumerable:!(u=Jw(t,n))||u.enumerable});return e},e_=e=>Qw(Uo({},"__esModule",{value:!0}),e),Rh={};Yw(Rh,{compareSemver:()=>i_,compareStr:()=>s_,localeCompare:()=>t_,naturalCompare:()=>Ah,naturalSorter:()=>r_});Ch.exports=e_(Rh);var jo;function t_(e,t){return jo===void 0&&(jo=new Intl.Collator().compare),jo(e,t)}var Mo;function Ah(e,t){return Mo===void 0&&(Mo=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}).compare),Mo(e,t)}var Bo;function r_(e){return Bo===void 0&&(Bo=mh().createNewSortInstance({comparer:Ah})),Bo?.(e)}function s_(e,t){return e<t?-1:e>t?1:0}function i_(e,t){let i=Oh(),u=i.valid(e),n=i.valid(t);return!u&&!n?0:u?n?i.compare(e,t):1:-1}});var Zt=me((JG,Dh)=>{var Vo=Object.defineProperty,n_=Object.getOwnPropertyDescriptor,o_=Object.getOwnPropertyNames,a_=Object.prototype.hasOwnProperty,l_=(e,t)=>{for(var i in t)Vo(e,i,{get:t[i],enumerable:!0})},c_=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of o_(t))!a_.call(e,n)&&n!==i&&Vo(e,n,{get:()=>t[n],enumerable:!(u=n_(t,n))||u.enumerable});return e},u_=e=>c_(Vo({},"__esModule",{value:!0}),e),Ph={};l_(Ph,{createConstantsObject:()=>v_,createLazyGetter:()=>xh,defineGetter:()=>Nh,defineLazyGetter:()=>kh,defineLazyGetters:()=>Lh,entryKeyComparator:()=>Go,getKeys:()=>S_,getOwn:()=>E_,getOwnPropertyValues:()=>b_,hasKeys:()=>w_,hasOwn:()=>__,isObject:()=>pr,isObjectObject:()=>O_,merge:()=>C_,objectAssign:()=>R_,objectEntries:()=>zo,objectFreeze:()=>A_,toSortedObject:()=>ui,toSortedObjectFromEntries:()=>qo});Dh.exports=u_(Ph);var rs=Oo(),ts=cr(),h_=Fo(),Ih=Object.defineProperties,p_=Object.defineProperty,Ut=Object.freeze,d_=Object.fromEntries,Th=Object.getOwnPropertyDescriptors,f_=Object.getOwnPropertyNames,g_=Object.getPrototypeOf,hi=Object.hasOwn,m_=Object.keys,y_=Object.prototype,Ho=Object.setPrototypeOf,Wo=Reflect.ownKeys;function xh(e,t,i){let u=rs.UNDEFINED_TOKEN,{[e]:n}={[e](){return u===rs.UNDEFINED_TOKEN&&(i?.initialized?.add(e),u=t()),u}};return n}function v_(e,t){let i={__proto__:null,...t},u=Ut({__proto__:null,getters:i.getters?Ut(Ho(ui(i.getters),null)):void 0,internals:i.internals?Ut(Ho(ui(i.internals),null)):void 0,mixin:i.mixin?Ut(Ih({__proto__:null},Th(i.mixin))):void 0,props:e?Ut(Ho(ui(e),null)):void 0}),n=Ut({__proto__:null,initialized:new Set}),l=Lh({__proto__:null,[rs.kInternalsSymbol]:Ut({__proto__:null,get attributes(){return u},get lazyGetterStats(){return n},...u.internals}),kInternalsSymbol:rs.kInternalsSymbol,...u.props},u.getters,n);return u.mixin&&Ih(l,qo(zo(Th(u.mixin)).filter(c=>!hi(l,c[0])))),Ut(l)}function Nh(e,t,i){return p_(e,t,{get:i,enumerable:!1,configurable:!0}),e}function kh(e,t,i,u){return Nh(e,t,xh(t,i,u))}function Lh(e,t,i){if(t!==null&&typeof t=="object"){let u=Wo(t);for(let n=0,{length:l}=u;n<l;n+=1){let c=u[n];kh(e,c,t[c],i)}}return e}function Go(e,t){let i=e[0],u=t[0],n=typeof i=="string"?i:String(i),l=typeof u=="string"?u:String(u);return(0,h_.localeCompare)(n,l)}function S_(e){return pr(e)?m_(e):[]}function E_(e,t){if(e!=null)return hi(e,t)?e[t]:void 0}function b_(e){if(e==null)return[];let t=f_(e),{length:i}=t,u=Array(i);for(let n=0;n<i;n+=1)u[n]=e[t[n]];return u}function w_(e){if(e==null)return!1;for(let t in e)if(hi(e,t))return!0;return!1}function __(e,t){return e==null?!1:hi(e,t)}function pr(e){return e!==null&&typeof e=="object"}function O_(e){if(e===null||typeof e!="object"||(0,ts.isArray)(e))return!1;let t=g_(e);return t===null||t===y_}var R_=Object.assign;function zo(e){if(e==null)return[];let t=Wo(e),{length:i}=t,u=Array(i),n=e;for(let l=0;l<i;l+=1){let c=t[l];u[l]=[c,n[c]]}return u}var A_=Object.freeze;function C_(e,t){if(!pr(e)||!pr(t))return e;let i=[[e,t]],u=0,{length:n}=i;for(;u<n;){if(u===rs.LOOP_SENTINEL)throw new Error("Detected infinite loop in object crawl of merge");let{0:l,1:c}=i[u++];if(!c||!l)continue;let r=(0,ts.isArray)(c),s=(0,ts.isArray)(l);if(r||s)continue;let o=Wo(c);for(let a=0,{length:h}=o;a<h;a+=1){let p=o[a],d=c[p],m=l[p];(0,ts.isArray)(d)?l[p]=d:pr(d)&&pr(m)&&!(0,ts.isArray)(m)?i[n++]=[m,d]:l[p]=d}}return e}function ui(e){return qo(zo(e))}function qo(e){let t=[],i=[];for(let u of e)typeof u[0]=="symbol"?i.push(u):t.push(u);return!t.length&&!i.length?{}:d_([...i.sort(Go),...t.sort(Go)])}});var jh=me((XG,$h)=>{"use strict";var I_=Object.defineProperty,Ne=(e,t)=>I_(e,"name",{value:t,configurable:!0}),ss=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pi=ss((e,t)=>{"use strict";var i=require("path"),u="\\\\/",n=`[^${u}]`,l="\\.",c="\\+",r="\\?",s="\\/",o="(?=.)",a="[^/]",h=`(?:${s}|$)`,p=`(?:^|${s})`,d=`${l}{1,2}${h}`,m=`(?!${l})`,g=`(?!${p}${d})`,f=`(?!${l}{0,1}${h})`,y=`(?!${d})`,v=`[^.${s}]`,E=`${a}*?`,b={DOT_LITERAL:l,PLUS_LITERAL:c,QMARK_LITERAL:r,SLASH_LITERAL:s,ONE_CHAR:o,QMARK:a,END_ANCHOR:h,DOTS_SLASH:d,NO_DOT:m,NO_DOTS:g,NO_DOT_SLASH:f,NO_DOTS_SLASH:y,QMARK_NO_DOT:v,STAR:E,START_ANCHOR:p},w={...b,SLASH_LITERAL:`[${u}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${l}{1,2}(?:[${u}]|$)`,NO_DOT:`(?!${l})`,NO_DOTS:`(?!(?:^|[${u}])${l}{1,2}(?:[${u}]|$))`,NO_DOT_SLASH:`(?!${l}{0,1}(?:[${u}]|$))`,NO_DOTS_SLASH:`(?!${l}{1,2}(?:[${u}]|$))`,QMARK_NO_DOT:`[^.${u}]`,START_ANCHOR:`(?:^|[${u}])`,END_ANCHOR:`(?:[${u}]|$)`},_={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"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:_,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,SEP:i.sep,extglobChars(O){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${O.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(O){return O===!0?w:b}}}),Ko=ss(e=>{"use strict";var t=require("path"),i=process.platform==="win32",{REGEX_BACKSLASH:u,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:l,REGEX_SPECIAL_CHARS_GLOBAL:c}=pi();e.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),e.hasRegexChars=r=>l.test(r),e.isRegexChar=r=>r.length===1&&e.hasRegexChars(r),e.escapeRegex=r=>r.replace(c,"\\$1"),e.toPosixSlashes=r=>r.replace(u,"/"),e.removeBackslashes=r=>r.replace(n,s=>s==="\\"?"":s),e.supportsLookbehinds=()=>{let r=process.version.slice(1).split(".").map(Number);return r.length===3&&r[0]>=9||r[0]===8&&r[1]>=10},e.isWindows=r=>r&&typeof r.windows=="boolean"?r.windows:i===!0||t.sep==="\\",e.escapeLast=(r,s,o)=>{let a=r.lastIndexOf(s,o);return a===-1?r:r[a-1]==="\\"?e.escapeLast(r,s,a-1):`${r.slice(0,a)}\\${r.slice(a)}`},e.removePrefix=(r,s={})=>{let o=r;return o.startsWith("./")&&(o=o.slice(2),s.prefix="./"),o},e.wrapOutput=(r,s={},o={})=>{let a=o.contains?"":"^",h=o.contains?"":"$",p=`${a}(?:${r})${h}`;return s.negated===!0&&(p=`(?:^(?!${p}).*$)`),p}}),T_=ss((e,t)=>{"use strict";var i=Ko(),{CHAR_ASTERISK:u,CHAR_AT:n,CHAR_BACKWARD_SLASH:l,CHAR_COMMA:c,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:s,CHAR_FORWARD_SLASH:o,CHAR_LEFT_CURLY_BRACE:a,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:d,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:y}=pi(),v=Ne(w=>w===o||w===l,"isPathSeparator"),E=Ne(w=>{w.isPrefix!==!0&&(w.depth=w.isGlobstar?1/0:1)},"depth"),b=Ne((w,_)=>{let O=_||{},A=w.length-1,I=O.parts===!0||O.scanToEnd===!0,P=[],L=[],j=[],N=w,M=-1,B=0,F=0,D=!1,H=!1,G=!1,x=!1,k=!1,T=!1,C=!1,q=!1,X=!1,Y=!1,$=0,V,z,U={value:"",depth:0,isGlob:!1},K=Ne(()=>M>=A,"eos"),Z=Ne(()=>N.charCodeAt(M+1),"peek"),Q=Ne(()=>(V=z,N.charCodeAt(++M)),"advance");for(;M<A;){z=Q();let te;if(z===l){C=U.backslashes=!0,z=Q(),z===a&&(T=!0);continue}if(T===!0||z===a){for($++;K()!==!0&&(z=Q());){if(z===l){C=U.backslashes=!0,Q();continue}if(z===a){$++;continue}if(T!==!0&&z===r&&(z=Q())===r){if(D=U.isBrace=!0,G=U.isGlob=!0,Y=!0,I===!0)continue;break}if(T!==!0&&z===c){if(D=U.isBrace=!0,G=U.isGlob=!0,Y=!0,I===!0)continue;break}if(z===g&&($--,$===0)){T=!1,D=U.isBrace=!0,Y=!0;break}}if(I===!0)continue;break}if(z===o){if(P.push(M),L.push(U),U={value:"",depth:0,isGlob:!1},Y===!0)continue;if(V===r&&M===B+1){B+=2;continue}F=M+1;continue}if(O.noext!==!0&&(z===d||z===n||z===u||z===m||z===s)&&Z()===h){if(G=U.isGlob=!0,x=U.isExtglob=!0,Y=!0,z===s&&M===B&&(X=!0),I===!0){for(;K()!==!0&&(z=Q());){if(z===l){C=U.backslashes=!0,z=Q();continue}if(z===f){G=U.isGlob=!0,Y=!0;break}}continue}break}if(z===u){if(V===u&&(k=U.isGlobstar=!0),G=U.isGlob=!0,Y=!0,I===!0)continue;break}if(z===m){if(G=U.isGlob=!0,Y=!0,I===!0)continue;break}if(z===p){for(;K()!==!0&&(te=Q());){if(te===l){C=U.backslashes=!0,Q();continue}if(te===y){H=U.isBracket=!0,G=U.isGlob=!0,Y=!0;break}}if(I===!0)continue;break}if(O.nonegate!==!0&&z===s&&M===B){q=U.negated=!0,B++;continue}if(O.noparen!==!0&&z===h){if(G=U.isGlob=!0,I===!0){for(;K()!==!0&&(z=Q());){if(z===h){C=U.backslashes=!0,z=Q();continue}if(z===f){Y=!0;break}}continue}break}if(G===!0){if(Y=!0,I===!0)continue;break}}O.noext===!0&&(x=!1,G=!1);let R=N,W="",ee="";B>0&&(W=N.slice(0,B),N=N.slice(B),F-=B),R&&G===!0&&F>0?(R=N.slice(0,F),ee=N.slice(F)):G===!0?(R="",ee=N):R=N,R&&R!==""&&R!=="/"&&R!==N&&v(R.charCodeAt(R.length-1))&&(R=R.slice(0,-1)),O.unescape===!0&&(ee&&(ee=i.removeBackslashes(ee)),R&&C===!0&&(R=i.removeBackslashes(R)));let ne={prefix:W,input:w,start:B,base:R,glob:ee,isBrace:D,isBracket:H,isGlob:G,isExtglob:x,isGlobstar:k,negated:q,negatedExtglob:X};if(O.tokens===!0&&(ne.maxDepth=0,v(z)||L.push(U),ne.tokens=L),O.parts===!0||O.tokens===!0){let te;for(let le=0;le<P.length;le++){let pe=te?te+1:B,re=P[le],he=w.slice(pe,re);O.tokens&&(le===0&&B!==0?(L[le].isPrefix=!0,L[le].value=W):L[le].value=he,E(L[le]),ne.maxDepth+=L[le].depth),(le!==0||he!=="")&&j.push(he),te=re}if(te&&te+1<w.length){let le=w.slice(te+1);j.push(le),O.tokens&&(L[L.length-1].value=le,E(L[L.length-1]),ne.maxDepth+=L[L.length-1].depth)}ne.slashes=P,ne.parts=j}return ne},"scan");t.exports=b}),P_=ss((e,t)=>{"use strict";var i=pi(),u=Ko(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:l,REGEX_NON_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:s}=i,o=Ne((p,d)=>{if(typeof d.expandRange=="function")return d.expandRange(...p,d);p.sort();let m=`[${p.join("-")}]`;try{new RegExp(m)}catch{return p.map(g=>u.escapeRegex(g)).join("..")}return m},"expandRange"),a=Ne((p,d)=>`Missing ${p}: "${d}" - use "\\\\${d}" to match literal characters`,"syntaxError"),h=Ne((p,d)=>{if(typeof p!="string")throw new TypeError("Expected a string");p=s[p]||p;let m={...d},g=typeof m.maxLength=="number"?Math.min(n,m.maxLength):n,f=p.length;if(f>g)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${g}`);let y={type:"bos",value:"",output:m.prepend||""},v=[y],E=m.capture?"":"?:",b=u.isWindows(d),w=i.globChars(b),_=i.extglobChars(w),{DOT_LITERAL:O,PLUS_LITERAL:A,SLASH_LITERAL:I,ONE_CHAR:P,DOTS_SLASH:L,NO_DOT:j,NO_DOT_SLASH:N,NO_DOTS_SLASH:M,QMARK:B,QMARK_NO_DOT:F,STAR:D,START_ANCHOR:H}=w,G=Ne(re=>`(${E}(?:(?!${H}${re.dot?L:O}).)*?)`,"globstar"),x=m.dot?"":j,k=m.dot?B:F,T=m.bash===!0?G(m):D;m.capture&&(T=`(${T})`),typeof m.noext=="boolean"&&(m.noextglob=m.noext);let C={input:p,index:-1,start:0,dot:m.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:v};p=u.removePrefix(p,C),f=p.length;let q=[],X=[],Y=[],$=y,V,z=Ne(()=>C.index===f-1,"eos"),U=C.peek=(re=1)=>p[C.index+re],K=C.advance=()=>p[++C.index]||"",Z=Ne(()=>p.slice(C.index+1),"remaining"),Q=Ne((re="",he=0)=>{C.consumed+=re,C.index+=he},"consume"),R=Ne(re=>{C.output+=re.output!=null?re.output:re.value,Q(re.value)},"append"),W=Ne(()=>{let re=1;for(;U()==="!"&&(U(2)!=="("||U(3)==="?");)K(),C.start++,re++;return re%2===0?!1:(C.negated=!0,C.start++,!0)},"negate"),ee=Ne(re=>{C[re]++,Y.push(re)},"increment"),ne=Ne(re=>{C[re]--,Y.pop()},"decrement"),te=Ne(re=>{if($.type==="globstar"){let he=C.braces>0&&(re.type==="comma"||re.type==="brace"),ie=re.extglob===!0||q.length&&(re.type==="pipe"||re.type==="paren");re.type!=="slash"&&re.type!=="paren"&&!he&&!ie&&(C.output=C.output.slice(0,-$.output.length),$.type="star",$.value="*",$.output=T,C.output+=$.output)}if(q.length&&re.type!=="paren"&&(q[q.length-1].inner+=re.value),(re.value||re.output)&&R(re),$&&$.type==="text"&&re.type==="text"){$.value+=re.value,$.output=($.output||"")+re.value;return}re.prev=$,v.push(re),$=re},"push"),le=Ne((re,he)=>{let ie={..._[he],conditions:1,inner:""};ie.prev=$,ie.parens=C.parens,ie.output=C.output;let ce=(m.capture?"(":"")+ie.open;ee("parens"),te({type:re,value:he,output:C.output?"":P}),te({type:"paren",extglob:!0,value:K(),output:ce}),q.push(ie)},"extglobOpen"),pe=Ne(re=>{let he=re.close+(m.capture?")":""),ie;if(re.type==="negate"){let ce=T;if(re.inner&&re.inner.length>1&&re.inner.includes("/")&&(ce=G(m)),(ce!==T||z()||/^\)+$/.test(Z()))&&(he=re.close=`)$))${ce}`),re.inner.includes("*")&&(ie=Z())&&/^\.[^\\/.]+$/.test(ie)){let ge=h(ie,{...d,fastpaths:!1}).output;he=re.close=`)${ge})${ce})`}re.prev.type==="bos"&&(C.negatedExtglob=!0)}te({type:"paren",extglob:!0,value:V,output:he}),ne("parens")},"extglobClose");if(m.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(p)){let re=!1,he=p.replace(r,(ie,ce,ge,ye,ue,de)=>ye==="\\"?(re=!0,ie):ye==="?"?ce?ce+ye+(ue?B.repeat(ue.length):""):de===0?k+(ue?B.repeat(ue.length):""):B.repeat(ge.length):ye==="."?O.repeat(ge.length):ye==="*"?ce?ce+ye+(ue?T:""):T:ce?ie:`\\${ie}`);return re===!0&&(m.unescape===!0?he=he.replace(/\\/g,""):he=he.replace(/\\+/g,ie=>ie.length%2===0?"\\\\":ie?"\\":"")),he===p&&m.contains===!0?(C.output=p,C):(C.output=u.wrapOutput(he,C,d),C)}for(;!z();){if(V=K(),V==="\0")continue;if(V==="\\"){let ie=U();if(ie==="/"&&m.bash!==!0||ie==="."||ie===";")continue;if(!ie){V+="\\",te({type:"text",value:V});continue}let ce=/^\\+/.exec(Z()),ge=0;if(ce&&ce[0].length>2&&(ge=ce[0].length,C.index+=ge,ge%2!==0&&(V+="\\")),m.unescape===!0?V=K():V+=K(),C.brackets===0){te({type:"text",value:V});continue}}if(C.brackets>0&&(V!=="]"||$.value==="["||$.value==="[^")){if(m.posix!==!1&&V===":"){let ie=$.value.slice(1);if(ie.includes("[")&&($.posix=!0,ie.includes(":"))){let ce=$.value.lastIndexOf("["),ge=$.value.slice(0,ce),ye=$.value.slice(ce+2),ue=l[ye];if(ue){$.value=ge+ue,C.backtrack=!0,K(),!y.output&&v.indexOf($)===1&&(y.output=P);continue}}}(V==="["&&U()!==":"||V==="-"&&U()==="]")&&(V=`\\${V}`),V==="]"&&($.value==="["||$.value==="[^")&&(V=`\\${V}`),m.posix===!0&&V==="!"&&$.value==="["&&(V="^"),$.value+=V,R({value:V});continue}if(C.quotes===1&&V!=='"'){V=u.escapeRegex(V),$.value+=V,R({value:V});continue}if(V==='"'){C.quotes=C.quotes===1?0:1,m.keepQuotes===!0&&te({type:"text",value:V});continue}if(V==="("){ee("parens"),te({type:"paren",value:V});continue}if(V===")"){if(C.parens===0&&m.strictBrackets===!0)throw new SyntaxError(a("opening","("));let ie=q[q.length-1];if(ie&&C.parens===ie.parens+1){pe(q.pop());continue}te({type:"paren",value:V,output:C.parens?")":"\\)"}),ne("parens");continue}if(V==="["){if(m.nobracket===!0||!Z().includes("]")){if(m.nobracket!==!0&&m.strictBrackets===!0)throw new SyntaxError(a("closing","]"));V=`\\${V}`}else ee("brackets");te({type:"bracket",value:V});continue}if(V==="]"){if(m.nobracket===!0||$&&$.type==="bracket"&&$.value.length===1){te({type:"text",value:V,output:`\\${V}`});continue}if(C.brackets===0){if(m.strictBrackets===!0)throw new SyntaxError(a("opening","["));te({type:"text",value:V,output:`\\${V}`});continue}ne("brackets");let ie=$.value.slice(1);if($.posix!==!0&&ie[0]==="^"&&!ie.includes("/")&&(V=`/${V}`),$.value+=V,R({value:V}),m.literalBrackets===!1||u.hasRegexChars(ie))continue;let ce=u.escapeRegex($.value);if(C.output=C.output.slice(0,-$.value.length),m.literalBrackets===!0){C.output+=ce,$.value=ce;continue}$.value=`(${E}${ce}|${$.value})`,C.output+=$.value;continue}if(V==="{"&&m.nobrace!==!0){ee("braces");let ie={type:"brace",value:V,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};X.push(ie),te(ie);continue}if(V==="}"){let ie=X[X.length-1];if(m.nobrace===!0||!ie){te({type:"text",value:V,output:V});continue}let ce=")";if(ie.dots===!0){let ge=v.slice(),ye=[];for(let ue=ge.length-1;ue>=0&&(v.pop(),ge[ue].type!=="brace");ue--)ge[ue].type!=="dots"&&ye.unshift(ge[ue].value);ce=o(ye,m),C.backtrack=!0}if(ie.comma!==!0&&ie.dots!==!0){let ge=C.output.slice(0,ie.outputIndex),ye=C.tokens.slice(ie.tokensIndex);ie.value=ie.output="\\{",V=ce="\\}",C.output=ge;for(let ue of ye)C.output+=ue.output||ue.value}te({type:"brace",value:V,output:ce}),ne("braces"),X.pop();continue}if(V==="|"){q.length>0&&q[q.length-1].conditions++,te({type:"text",value:V});continue}if(V===","){let ie=V,ce=X[X.length-1];ce&&Y[Y.length-1]==="braces"&&(ce.comma=!0,ie="|"),te({type:"comma",value:V,output:ie});continue}if(V==="/"){if($.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",v.pop(),$=y;continue}te({type:"slash",value:V,output:I});continue}if(V==="."){if(C.braces>0&&$.type==="dot"){$.value==="."&&($.output=O);let ie=X[X.length-1];$.type="dots",$.output+=V,$.value+=V,ie.dots=!0;continue}if(C.braces+C.parens===0&&$.type!=="bos"&&$.type!=="slash"){te({type:"text",value:V,output:O});continue}te({type:"dot",value:V,output:O});continue}if(V==="?"){if(!($&&$.value==="(")&&m.noextglob!==!0&&U()==="("&&U(2)!=="?"){le("qmark",V);continue}if($&&$.type==="paren"){let ie=U(),ce=V;if(ie==="<"&&!u.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");($.value==="("&&!/[!=<:]/.test(ie)||ie==="<"&&!/<([!=]|\w+>)/.test(Z()))&&(ce=`\\${V}`),te({type:"text",value:V,output:ce});continue}if(m.dot!==!0&&($.type==="slash"||$.type==="bos")){te({type:"qmark",value:V,output:F});continue}te({type:"qmark",value:V,output:B});continue}if(V==="!"){if(m.noextglob!==!0&&U()==="("&&(U(2)!=="?"||!/[!=<:]/.test(U(3)))){le("negate",V);continue}if(m.nonegate!==!0&&C.index===0){W();continue}}if(V==="+"){if(m.noextglob!==!0&&U()==="("&&U(2)!=="?"){le("plus",V);continue}if($&&$.value==="("||m.regex===!1){te({type:"plus",value:V,output:A});continue}if($&&($.type==="bracket"||$.type==="paren"||$.type==="brace")||C.parens>0){te({type:"plus",value:V});continue}te({type:"plus",value:A});continue}if(V==="@"){if(m.noextglob!==!0&&U()==="("&&U(2)!=="?"){te({type:"at",extglob:!0,value:V,output:""});continue}te({type:"text",value:V});continue}if(V!=="*"){(V==="$"||V==="^")&&(V=`\\${V}`);let ie=c.exec(Z());ie&&(V+=ie[0],C.index+=ie[0].length),te({type:"text",value:V});continue}if($&&($.type==="globstar"||$.star===!0)){$.type="star",$.star=!0,$.value+=V,$.output=T,C.backtrack=!0,C.globstar=!0,Q(V);continue}let re=Z();if(m.noextglob!==!0&&/^\([^?]/.test(re)){le("star",V);continue}if($.type==="star"){if(m.noglobstar===!0){Q(V);continue}let ie=$.prev,ce=ie.prev,ge=ie.type==="slash"||ie.type==="bos",ye=ce&&(ce.type==="star"||ce.type==="globstar");if(m.bash===!0&&(!ge||re[0]&&re[0]!=="/")){te({type:"star",value:V,output:""});continue}let ue=C.braces>0&&(ie.type==="comma"||ie.type==="brace"),de=q.length&&(ie.type==="pipe"||ie.type==="paren");if(!ge&&ie.type!=="paren"&&!ue&&!de){te({type:"star",value:V,output:""});continue}for(;re.slice(0,3)==="/**";){let fe=p[C.index+4];if(fe&&fe!=="/")break;re=re.slice(3),Q("/**",3)}if(ie.type==="bos"&&z()){$.type="globstar",$.value+=V,$.output=G(m),C.output=$.output,C.globstar=!0,Q(V);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&!ye&&z()){C.output=C.output.slice(0,-(ie.output+$.output).length),ie.output=`(?:${ie.output}`,$.type="globstar",$.output=G(m)+(m.strictSlashes?")":"|$)"),$.value+=V,C.globstar=!0,C.output+=ie.output+$.output,Q(V);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&re[0]==="/"){let fe=re[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(ie.output+$.output).length),ie.output=`(?:${ie.output}`,$.type="globstar",$.output=`${G(m)}${I}|${I}${fe})`,$.value+=V,C.output+=ie.output+$.output,C.globstar=!0,Q(V+K()),te({type:"slash",value:"/",output:""});continue}if(ie.type==="bos"&&re[0]==="/"){$.type="globstar",$.value+=V,$.output=`(?:^|${I}|${G(m)}${I})`,C.output=$.output,C.globstar=!0,Q(V+K()),te({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-$.output.length),$.type="globstar",$.output=G(m),$.value+=V,C.output+=$.output,C.globstar=!0,Q(V);continue}let he={type:"star",value:V,output:T};if(m.bash===!0){he.output=".*?",($.type==="bos"||$.type==="slash")&&(he.output=x+he.output),te(he);continue}if($&&($.type==="bracket"||$.type==="paren")&&m.regex===!0){he.output=V,te(he);continue}(C.index===C.start||$.type==="slash"||$.type==="dot")&&($.type==="dot"?(C.output+=N,$.output+=N):m.dot===!0?(C.output+=M,$.output+=M):(C.output+=x,$.output+=x),U()!=="*"&&(C.output+=P,$.output+=P)),te(he)}for(;C.brackets>0;){if(m.strictBrackets===!0)throw new SyntaxError(a("closing","]"));C.output=u.escapeLast(C.output,"["),ne("brackets")}for(;C.parens>0;){if(m.strictBrackets===!0)throw new SyntaxError(a("closing",")"));C.output=u.escapeLast(C.output,"("),ne("parens")}for(;C.braces>0;){if(m.strictBrackets===!0)throw new SyntaxError(a("closing","}"));C.output=u.escapeLast(C.output,"{"),ne("braces")}if(m.strictSlashes!==!0&&($.type==="star"||$.type==="bracket")&&te({type:"maybe_slash",value:"",output:`${I}?`}),C.backtrack===!0){C.output="";for(let re of C.tokens)C.output+=re.output!=null?re.output:re.value,re.suffix&&(C.output+=re.suffix)}return C},"parse");h.fastpaths=(p,d)=>{let m={...d},g=typeof m.maxLength=="number"?Math.min(n,m.maxLength):n,f=p.length;if(f>g)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${g}`);p=s[p]||p;let y=u.isWindows(d),{DOT_LITERAL:v,SLASH_LITERAL:E,ONE_CHAR:b,DOTS_SLASH:w,NO_DOT:_,NO_DOTS:O,NO_DOTS_SLASH:A,STAR:I,START_ANCHOR:P}=i.globChars(y),L=m.dot?O:_,j=m.dot?A:_,N=m.capture?"":"?:",M={negated:!1,prefix:""},B=m.bash===!0?".*?":I;m.capture&&(B=`(${B})`);let F=Ne(x=>x.noglobstar===!0?B:`(${N}(?:(?!${P}${x.dot?w:v}).)*?)`,"globstar"),D=Ne(x=>{switch(x){case"*":return`${L}${b}${B}`;case".*":return`${v}${b}${B}`;case"*.*":return`${L}${B}${v}${b}${B}`;case"*/*":return`${L}${B}${E}${b}${j}${B}`;case"**":return L+F(m);case"**/*":return`(?:${L}${F(m)}${E})?${j}${b}${B}`;case"**/*.*":return`(?:${L}${F(m)}${E})?${j}${B}${v}${b}${B}`;case"**/.*":return`(?:${L}${F(m)}${E})?${v}${b}${B}`;default:{let k=/^(.*?)\.(\w+)$/.exec(x);if(!k)return;let T=D(k[1]);return T?T+v+k[2]:void 0}}},"create"),H=u.removePrefix(p,M),G=D(H);return G&&m.strictSlashes!==!0&&(G+=`${E}?`),G},t.exports=h}),x_=ss((e,t)=>{"use strict";var i=require("path"),u=T_(),n=P_(),l=Ko(),c=pi(),r=Ne(o=>o&&typeof o=="object"&&!Array.isArray(o),"isObject"),s=Ne((o,a,h=!1)=>{if(Array.isArray(o)){let E=o.map(b=>s(b,a,h));return Ne(b=>{for(let w of E){let _=w(b);if(_)return _}return!1},"arrayMatcher")}let p=r(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!p)throw new TypeError("Expected pattern to be a non-empty string");let d=a||{},m=l.isWindows(a),g=p?s.compileRe(o,a):s.makeRe(o,a,!1,!0),f=g.state;delete g.state;let y=Ne(()=>!1,"isIgnored");if(d.ignore){let E={...a,ignore:null,onMatch:null,onResult:null};y=s(d.ignore,E,h)}let v=Ne((E,b=!1)=>{let{isMatch:w,match:_,output:O}=s.test(E,g,a,{glob:o,posix:m}),A={glob:o,state:f,regex:g,posix:m,input:E,output:O,match:_,isMatch:w};return typeof d.onResult=="function"&&d.onResult(A),w===!1?(A.isMatch=!1,b?A:!1):y(E)?(typeof d.onIgnore=="function"&&d.onIgnore(A),A.isMatch=!1,b?A:!1):(typeof d.onMatch=="function"&&d.onMatch(A),b?A:!0)},"matcher");return h&&(v.state=f),v},"picomatch");s.test=(o,a,h,{glob:p,posix:d}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};let m=h||{},g=m.format||(d?l.toPosixSlashes:null),f=o===p,y=f&&g?g(o):o;return f===!1&&(y=g?g(o):o,f=y===p),(f===!1||m.capture===!0)&&(m.matchBase===!0||m.basename===!0?f=s.matchBase(o,a,h,d):f=a.exec(y)),{isMatch:!!f,match:f,output:y}},s.matchBase=(o,a,h,p=l.isWindows(h))=>(a instanceof RegExp?a:s.makeRe(a,h)).test(i.basename(o)),s.isMatch=(o,a,h)=>s(a,h)(o),s.parse=(o,a)=>Array.isArray(o)?o.map(h=>s.parse(h,a)):n(o,{...a,fastpaths:!1}),s.scan=(o,a)=>u(o,a),s.compileRe=(o,a,h=!1,p=!1)=>{if(h===!0)return o.output;let d=a||{},m=d.contains?"":"^",g=d.contains?"":"$",f=`${m}(?:${o.output})${g}`;o&&o.negated===!0&&(f=`^(?!${f}).*$`);let y=s.toRegex(f,a);return p===!0&&(y.state=o),y},s.makeRe=(o,a={},h=!1,p=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let d={negated:!1,fastpaths:!0};return a.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(d.output=n.fastpaths(o,a)),d.output||(d=n(o,a)),s.compileRe(d,a,h,p)},s.toRegex=(o,a)=>{try{let h=a||{};return new RegExp(o,h.flags||(h.nocase?"i":""))}catch(h){if(a&&a.debug===!0)throw h;return/$^/}},s.constants=c,t.exports=s});$h.exports=x_()});var qh=me((ZG,zh)=>{"use strict";var N_=Object.defineProperty,oe=(e,t)=>N_(e,"name",{value:t,configurable:!0}),Ee=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),k_=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.splitWhen=e.flatten=void 0;function t(u){return u.reduce((n,l)=>[].concat(n,l),[])}oe(t,"flatten"),e.flatten=t;function i(u,n){let l=[[]],c=0;for(let r of u)n(r)?(c++,l[c]=[]):l[c].push(r);return l}oe(i,"splitWhen"),e.splitWhen=i}),L_=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEnoentCodeError=void 0;function t(i){return i.code==="ENOENT"}oe(t,"isEnoentCodeError"),e.isEnoentCodeError=t}),D_=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDirentFromStats=void 0;var t=class{static{oe(this,"DirentFromStats")}constructor(u,n){this.name=u,this.isBlockDevice=n.isBlockDevice.bind(n),this.isCharacterDevice=n.isCharacterDevice.bind(n),this.isDirectory=n.isDirectory.bind(n),this.isFIFO=n.isFIFO.bind(n),this.isFile=n.isFile.bind(n),this.isSocket=n.isSocket.bind(n),this.isSymbolicLink=n.isSymbolicLink.bind(n)}};function i(u,n){return new t(u,n)}oe(i,"createDirentFromStats"),e.createDirentFromStats=i}),$_=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertPosixPathToPattern=e.convertWindowsPathToPattern=e.convertPathToPattern=e.escapePosixPath=e.escapeWindowsPath=e.escape=e.removeLeadingDotSegment=e.makeAbsolute=e.unixify=void 0;var t=require("os"),i=require("path"),u=t.platform()==="win32",n=2,l=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,c=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,r=/^\\\\([.?])/,s=/\\(?![!()+@[\]{}])/g;function o(f){return f.replace(/\\/g,"/")}oe(o,"unixify"),e.unixify=o;function a(f,y){return i.resolve(f,y)}oe(a,"makeAbsolute"),e.makeAbsolute=a;function h(f){if(f.charAt(0)==="."){let y=f.charAt(1);if(y==="/"||y==="\\")return f.slice(n)}return f}oe(h,"removeLeadingDotSegment"),e.removeLeadingDotSegment=h,e.escape=u?p:d;function p(f){return f.replace(c,"\\$2")}oe(p,"escapeWindowsPath"),e.escapeWindowsPath=p;function d(f){return f.replace(l,"\\$2")}oe(d,"escapePosixPath"),e.escapePosixPath=d,e.convertPathToPattern=u?m:g;function m(f){return p(f).replace(r,"//$1").replace(s,"/")}oe(m,"convertWindowsPathToPattern"),e.convertWindowsPathToPattern=m;function g(f){return d(f)}oe(g,"convertPosixPathToPattern"),e.convertPosixPathToPattern=g}),j_=Ee((e,t)=>{t.exports=oe(function(i){if(typeof i!="string"||i==="")return!1;for(var u;u=/(\\).|([@?!+*]\(.*\))/g.exec(i);){if(u[2])return!0;i=i.slice(u.index+u[0].length)}return!1},"isExtglob")}),M_=Ee((e,t)=>{var i=j_(),u={"{":"}","(":")","[":"]"},n=oe(function(c){if(c[0]==="!")return!0;for(var r=0,s=-2,o=-2,a=-2,h=-2,p=-2;r<c.length;){if(c[r]==="*"||c[r+1]==="?"&&/[\].+)]/.test(c[r])||o!==-1&&c[r]==="["&&c[r+1]!=="]"&&(o<r&&(o=c.indexOf("]",r)),o>r&&(p===-1||p>o||(p=c.indexOf("\\",r),p===-1||p>o)))||a!==-1&&c[r]==="{"&&c[r+1]!=="}"&&(a=c.indexOf("}",r),a>r&&(p=c.indexOf("\\",r),p===-1||p>a))||h!==-1&&c[r]==="("&&c[r+1]==="?"&&/[:!=]/.test(c[r+2])&&c[r+3]!==")"&&(h=c.indexOf(")",r),h>r&&(p=c.indexOf("\\",r),p===-1||p>h))||s!==-1&&c[r]==="("&&c[r+1]!=="|"&&(s<r&&(s=c.indexOf("|",r)),s!==-1&&c[s+1]!==")"&&(h=c.indexOf(")",s),h>s&&(p=c.indexOf("\\",s),p===-1||p>h))))return!0;if(c[r]==="\\"){var d=c[r+1];r+=2;var m=u[d];if(m){var g=c.indexOf(m,r);g!==-1&&(r=g+1)}if(c[r]==="!")return!0}else r++}return!1},"strictCheck"),l=oe(function(c){if(c[0]==="!")return!0;for(var r=0;r<c.length;){if(/[*?{}()[\]]/.test(c[r]))return!0;if(c[r]==="\\"){var s=c[r+1];r+=2;var o=u[s];if(o){var a=c.indexOf(o,r);a!==-1&&(r=a+1)}if(c[r]==="!")return!0}else r++}return!1},"relaxedCheck");t.exports=oe(function(c,r){if(typeof c!="string"||c==="")return!1;if(i(c))return!0;var s=n;return r&&r.strict===!1&&(s=l),s(c)},"isGlob")}),B_=Ee((e,t)=>{"use strict";var i=M_(),u=require("path").posix.dirname,n=require("os").platform()==="win32",l="/",c=/\\/g,r=/[\{\[].*[\}\]]$/,s=/(^|[^\\])([\{\[]|\([^\)]+$)/,o=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=oe(function(a,h){var p=Object.assign({flipBackslashes:!0},h);p.flipBackslashes&&n&&a.indexOf(l)<0&&(a=a.replace(c,l)),r.test(a)&&(a+=l),a+="a";do a=u(a);while(i(a)||s.test(a));return a.replace(o,"$1")},"globParent")}),Xo=Ee(e=>{"use strict";e.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1,e.find=(t,i)=>t.nodes.find(u=>u.type===i),e.exceedsLimit=(t,i,u=1,n)=>n===!1||!e.isInteger(t)||!e.isInteger(i)?!1:(Number(i)-Number(t))/Number(u)>=n,e.escapeNode=(t,i=0,u)=>{let n=t.nodes[i];n&&(u&&n.type===u||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)},e.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0),e.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1,e.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0,e.reduce=t=>t.reduce((i,u)=>(u.type==="text"&&i.push(u.value),u.type==="range"&&(u.type="text"),i),[]),e.flatten=(...t)=>{let i=[],u=oe(n=>{for(let l=0;l<n.length;l++){let c=n[l];if(Array.isArray(c)){u(c);continue}c!==void 0&&i.push(c)}return i},"flat");return u(t),i}}),Zo=Ee((e,t)=>{"use strict";var i=Xo();t.exports=(u,n={})=>{let l=oe((c,r={})=>{let s=n.escapeInvalid&&i.isInvalidBrace(r),o=c.invalid===!0&&n.escapeInvalid===!0,a="";if(c.value)return(s||o)&&i.isOpenOrClose(c)?"\\"+c.value:c.value;if(c.value)return c.value;if(c.nodes)for(let h of c.nodes)a+=l(h);return a},"stringify");return l(u)}}),U_=Ee((e,t)=>{"use strict";t.exports=function(i){return typeof i=="number"?i-i===0:typeof i=="string"&&i.trim()!==""?Number.isFinite?Number.isFinite(+i):isFinite(+i):!1}}),F_=Ee((e,t)=>{"use strict";var i=U_(),u=oe((v,E,b)=>{if(i(v)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(E===void 0||v===E)return String(v);if(i(E)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let w={relaxZeros:!0,...b};typeof w.strictZeros=="boolean"&&(w.relaxZeros=w.strictZeros===!1);let _=String(w.relaxZeros),O=String(w.shorthand),A=String(w.capture),I=String(w.wrap),P=v+":"+E+"="+_+O+A+I;if(u.cache.hasOwnProperty(P))return u.cache[P].result;let L=Math.min(v,E),j=Math.max(v,E);if(Math.abs(L-j)===1){let D=v+"|"+E;return w.capture?`(${D})`:w.wrap===!1?D:`(?:${D})`}let N=f(v)||f(E),M={min:v,max:E,a:L,b:j},B=[],F=[];if(N&&(M.isPadded=N,M.maxLen=String(M.max).length),L<0){let D=j<0?Math.abs(j):1;F=r(D,Math.abs(L),M,w),L=M.a=0}return j>=0&&(B=r(L,j,M,w)),M.negatives=F,M.positives=B,M.result=n(F,B,w),w.capture===!0?M.result=`(${M.result})`:w.wrap!==!1&&B.length+F.length>1&&(M.result=`(?:${M.result})`),u.cache[P]=M,M.result},"toRegexRange");function n(v,E,b){let w=s(v,E,"-",!1,b)||[],_=s(E,v,"",!1,b)||[],O=s(v,E,"-?",!0,b)||[];return w.concat(O).concat(_).join("|")}oe(n,"collatePatterns");function l(v,E){let b=1,w=1,_=p(v,b),O=new Set([E]);for(;v<=_&&_<=E;)O.add(_),b+=1,_=p(v,b);for(_=d(E+1,w)-1;v<_&&_<=E;)O.add(_),w+=1,_=d(E+1,w)-1;return O=[...O],O.sort(a),O}oe(l,"splitToRanges");function c(v,E,b){if(v===E)return{pattern:v,count:[],digits:0};let w=o(v,E),_=w.length,O="",A=0;for(let I=0;I<_;I++){let[P,L]=w[I];P===L?O+=P:P!=="0"||L!=="9"?O+=g(P,L,b):A++}return A&&(O+=b.shorthand===!0?"\\d":"[0-9]"),{pattern:O,count:[A],digits:_}}oe(c,"rangeToPattern");function r(v,E,b,w){let _=l(v,E),O=[],A=v,I;for(let P=0;P<_.length;P++){let L=_[P],j=c(String(A),String(L),w),N="";if(!b.isPadded&&I&&I.pattern===j.pattern){I.count.length>1&&I.count.pop(),I.count.push(j.count[0]),I.string=I.pattern+m(I.count),A=L+1;continue}b.isPadded&&(N=y(L,b,w)),j.string=N+j.pattern+m(j.count),O.push(j),A=L+1,I=j}return O}oe(r,"splitToPatterns");function s(v,E,b,w,_){let O=[];for(let A of v){let{string:I}=A;!w&&!h(E,"string",I)&&O.push(b+I),w&&h(E,"string",I)&&O.push(b+I)}return O}oe(s,"filterPatterns");function o(v,E){let b=[];for(let w=0;w<v.length;w++)b.push([v[w],E[w]]);return b}oe(o,"zip");function a(v,E){return v>E?1:E>v?-1:0}oe(a,"compare");function h(v,E,b){return v.some(w=>w[E]===b)}oe(h,"contains");function p(v,E){return Number(String(v).slice(0,-E)+"9".repeat(E))}oe(p,"countNines");function d(v,E){return v-v%Math.pow(10,E)}oe(d,"countZeros");function m(v){let[E=0,b=""]=v;return b||E>1?`{${E+(b?","+b:"")}}`:""}oe(m,"toQuantifier");function g(v,E,b){return`[${v}${E-v===1?"":"-"}${E}]`}oe(g,"toCharacterClass");function f(v){return/^-?(0+)\d/.test(v)}oe(f,"hasPadding");function y(v,E,b){if(!E.isPadded)return v;let w=Math.abs(E.maxLen-String(v).length),_=b.relaxZeros!==!1;switch(w){case 0:return"";case 1:return _?"0?":"0";case 2:return _?"0{0,2}":"00";default:return _?`0{0,${w}}`:`0{${w}}`}}oe(y,"padZeros"),u.cache={},u.clearCache=()=>u.cache={},t.exports=u}),Mh=Ee((e,t)=>{"use strict";var i=require("util"),u=F_(),n=oe(w=>w!==null&&typeof w=="object"&&!Array.isArray(w),"isObject"),l=oe(w=>_=>w===!0?Number(_):String(_),"transform"),c=oe(w=>typeof w=="number"||typeof w=="string"&&w!=="","isValidValue"),r=oe(w=>Number.isInteger(+w),"isNumber"),s=oe(w=>{let _=`${w}`,O=-1;if(_[0]==="-"&&(_=_.slice(1)),_==="0")return!1;for(;_[++O]==="0";);return O>0},"zeros"),o=oe((w,_,O)=>typeof w=="string"||typeof _=="string"?!0:O.stringify===!0,"stringify"),a=oe((w,_,O)=>{if(_>0){let A=w[0]==="-"?"-":"";A&&(w=w.slice(1)),w=A+w.padStart(A?_-1:_,"0")}return O===!1?String(w):w},"pad"),h=oe((w,_)=>{let O=w[0]==="-"?"-":"";for(O&&(w=w.slice(1),_--);w.length<_;)w="0"+w;return O?"-"+w:w},"toMaxLen"),p=oe((w,_,O)=>{w.negatives.sort((j,N)=>j<N?-1:j>N?1:0),w.positives.sort((j,N)=>j<N?-1:j>N?1:0);let A=_.capture?"":"?:",I="",P="",L;return w.positives.length&&(I=w.positives.map(j=>h(String(j),O)).join("|")),w.negatives.length&&(P=`-(${A}${w.negatives.map(j=>h(String(j),O)).join("|")})`),I&&P?L=`${I}|${P}`:L=I||P,_.wrap?`(${A}${L})`:L},"toSequence"),d=oe((w,_,O,A)=>{if(O)return u(w,_,{wrap:!1,...A});let I=String.fromCharCode(w);if(w===_)return I;let P=String.fromCharCode(_);return`[${I}-${P}]`},"toRange"),m=oe((w,_,O)=>{if(Array.isArray(w)){let A=O.wrap===!0,I=O.capture?"":"?:";return A?`(${I}${w.join("|")})`:w.join("|")}return u(w,_,O)},"toRegex"),g=oe((...w)=>new RangeError("Invalid range arguments: "+i.inspect(...w)),"rangeError"),f=oe((w,_,O)=>{if(O.strictRanges===!0)throw g([w,_]);return[]},"invalidRange"),y=oe((w,_)=>{if(_.strictRanges===!0)throw new TypeError(`Expected step "${w}" to be a number`);return[]},"invalidStep"),v=oe((w,_,O=1,A={})=>{let I=Number(w),P=Number(_);if(!Number.isInteger(I)||!Number.isInteger(P)){if(A.strictRanges===!0)throw g([w,_]);return[]}I===0&&(I=0),P===0&&(P=0);let L=I>P,j=String(w),N=String(_),M=String(O);O=Math.max(Math.abs(O),1);let B=s(j)||s(N)||s(M),F=B?Math.max(j.length,N.length,M.length):0,D=B===!1&&o(w,_,A)===!1,H=A.transform||l(D);if(A.toRegex&&O===1)return d(h(w,F),h(_,F),!0,A);let G={negatives:[],positives:[]},x=oe(C=>G[C<0?"negatives":"positives"].push(Math.abs(C)),"push"),k=[],T=0;for(;L?I>=P:I<=P;)A.toRegex===!0&&O>1?x(I):k.push(a(H(I,T),F,D)),I=L?I-O:I+O,T++;return A.toRegex===!0?O>1?p(G,A,F):m(k,null,{wrap:!1,...A}):k},"fillNumbers"),E=oe((w,_,O=1,A={})=>{if(!r(w)&&w.length>1||!r(_)&&_.length>1)return f(w,_,A);let I=A.transform||(D=>String.fromCharCode(D)),P=`${w}`.charCodeAt(0),L=`${_}`.charCodeAt(0),j=P>L,N=Math.min(P,L),M=Math.max(P,L);if(A.toRegex&&O===1)return d(N,M,!1,A);let B=[],F=0;for(;j?P>=L:P<=L;)B.push(I(P,F)),P=j?P-O:P+O,F++;return A.toRegex===!0?m(B,null,{wrap:!1,options:A}):B},"fillLetters"),b=oe((w,_,O,A={})=>{if(_==null&&c(w))return[w];if(!c(w)||!c(_))return f(w,_,A);if(typeof O=="function")return b(w,_,1,{transform:O});if(n(O))return b(w,_,0,O);let I={...A};return I.capture===!0&&(I.wrap=!0),O=O||I.step||1,r(O)?r(w)&&r(_)?v(w,_,O,I):E(w,_,Math.max(Math.abs(O),1),I):O!=null&&!n(O)?y(O,I):b(w,_,1,O)},"fill");t.exports=b}),H_=Ee((e,t)=>{"use strict";var i=Mh(),u=Xo(),n=oe((l,c={})=>{let r=oe((s,o={})=>{let a=u.isInvalidBrace(o),h=s.invalid===!0&&c.escapeInvalid===!0,p=a===!0||h===!0,d=c.escapeInvalid===!0?"\\":"",m="";if(s.isOpen===!0||s.isClose===!0)return d+s.value;if(s.type==="open")return p?d+s.value:"(";if(s.type==="close")return p?d+s.value:")";if(s.type==="comma")return s.prev.type==="comma"?"":p?s.value:"|";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let g=u.reduce(s.nodes),f=i(...g,{...c,wrap:!1,toRegex:!0,strictZeros:!0});if(f.length!==0)return g.length>1&&f.length>1?`(${f})`:f}if(s.nodes)for(let g of s.nodes)m+=r(g,s);return m},"walk");return r(l)},"compile");t.exports=n}),G_=Ee((e,t)=>{"use strict";var i=Mh(),u=Zo(),n=Xo(),l=oe((r="",s="",o=!1)=>{let a=[];if(r=[].concat(r),s=[].concat(s),!s.length)return r;if(!r.length)return o?n.flatten(s).map(h=>`{${h}}`):s;for(let h of r)if(Array.isArray(h))for(let p of h)a.push(l(p,s,o));else for(let p of s)o===!0&&typeof p=="string"&&(p=`{${p}}`),a.push(Array.isArray(p)?l(h,p,o):h+p);return n.flatten(a)},"append"),c=oe((r,s={})=>{let o=s.rangeLimit===void 0?1e3:s.rangeLimit,a=oe((h,p={})=>{h.queue=[];let d=p,m=p.queue;for(;d.type!=="brace"&&d.type!=="root"&&d.parent;)d=d.parent,m=d.queue;if(h.invalid||h.dollar){m.push(l(m.pop(),u(h,s)));return}if(h.type==="brace"&&h.invalid!==!0&&h.nodes.length===2){m.push(l(m.pop(),["{}"]));return}if(h.nodes&&h.ranges>0){let v=n.reduce(h.nodes);if(n.exceedsLimit(...v,s.step,o))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let E=i(...v,s);E.length===0&&(E=u(h,s)),m.push(l(m.pop(),E)),h.nodes=[];return}let g=n.encloseBrace(h),f=h.queue,y=h;for(;y.type!=="brace"&&y.type!=="root"&&y.parent;)y=y.parent,f=y.queue;for(let v=0;v<h.nodes.length;v++){let E=h.nodes[v];if(E.type==="comma"&&h.type==="brace"){v===1&&f.push(""),f.push("");continue}if(E.type==="close"){m.push(l(m.pop(),f,g));continue}if(E.value&&E.type!=="open"){f.push(l(f.pop(),E.value));continue}E.nodes&&a(E,h)}return f},"walk");return n.flatten(a(r))},"expand");t.exports=c}),V_=Ee((e,t)=>{"use strict";t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
4
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}}),W_=Ee((e,t)=>{"use strict";var i=Zo(),{MAX_LENGTH:u,CHAR_BACKSLASH:n,CHAR_BACKTICK:l,CHAR_COMMA:c,CHAR_DOT:r,CHAR_LEFT_PARENTHESES:s,CHAR_RIGHT_PARENTHESES:o,CHAR_LEFT_CURLY_BRACE:a,CHAR_RIGHT_CURLY_BRACE:h,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:m,CHAR_SINGLE_QUOTE:g,CHAR_NO_BREAK_SPACE:f,CHAR_ZERO_WIDTH_NOBREAK_SPACE:y}=V_(),v=oe((E,b={})=>{if(typeof E!="string")throw new TypeError("Expected a string");let w=b||{},_=typeof w.maxLength=="number"?Math.min(u,w.maxLength):u;if(E.length>_)throw new SyntaxError(`Input length (${E.length}), exceeds max characters (${_})`);let O={type:"root",input:E,nodes:[]},A=[O],I=O,P=O,L=0,j=E.length,N=0,M=0,B,F=oe(()=>E[N++],"advance"),D=oe(H=>{if(H.type==="text"&&P.type==="dot"&&(P.type="text"),P&&P.type==="text"&&H.type==="text"){P.value+=H.value;return}return I.nodes.push(H),H.parent=I,H.prev=P,P=H,H},"push");for(D({type:"bos"});N<j;)if(I=A[A.length-1],B=F(),!(B===y||B===f)){if(B===n){D({type:"text",value:(b.keepEscaping?B:"")+F()});continue}if(B===d){D({type:"text",value:"\\"+B});continue}if(B===p){L++;let H;for(;N<j&&(H=F());){if(B+=H,H===p){L++;continue}if(H===n){B+=F();continue}if(H===d&&(L--,L===0))break}D({type:"text",value:B});continue}if(B===s){I=D({type:"paren",nodes:[]}),A.push(I),D({type:"text",value:B});continue}if(B===o){if(I.type!=="paren"){D({type:"text",value:B});continue}I=A.pop(),D({type:"text",value:B}),I=A[A.length-1];continue}if(B===m||B===g||B===l){let H=B,G;for(b.keepQuotes!==!0&&(B="");N<j&&(G=F());){if(G===n){B+=G+F();continue}if(G===H){b.keepQuotes===!0&&(B+=G);break}B+=G}D({type:"text",value:B});continue}if(B===a){M++;let H={type:"brace",open:!0,close:!1,dollar:P.value&&P.value.slice(-1)==="$"||I.dollar===!0,depth:M,commas:0,ranges:0,nodes:[]};I=D(H),A.push(I),D({type:"open",value:B});continue}if(B===h){if(I.type!=="brace"){D({type:"text",value:B});continue}let H="close";I=A.pop(),I.close=!0,D({type:H,value:B}),M--,I=A[A.length-1];continue}if(B===c&&M>0){if(I.ranges>0){I.ranges=0;let H=I.nodes.shift();I.nodes=[H,{type:"text",value:i(I)}]}D({type:"comma",value:B}),I.commas++;continue}if(B===r&&M>0&&I.commas===0){let H=I.nodes;if(M===0||H.length===0){D({type:"text",value:B});continue}if(P.type==="dot"){if(I.range=[],P.value+=B,P.type="range",I.nodes.length!==3&&I.nodes.length!==5){I.invalid=!0,I.ranges=0,P.type="text";continue}I.ranges++,I.args=[];continue}if(P.type==="range"){H.pop();let G=H[H.length-1];G.value+=P.value+B,P=G,I.ranges--;continue}D({type:"dot",value:B});continue}D({type:"text",value:B})}do if(I=A.pop(),I.type!=="root"){I.nodes.forEach(x=>{x.nodes||(x.type==="open"&&(x.isOpen=!0),x.type==="close"&&(x.isClose=!0),x.nodes||(x.type="text"),x.invalid=!0)});let H=A[A.length-1],G=H.nodes.indexOf(I);H.nodes.splice(G,1,...I.nodes)}while(A.length>0);return D({type:"eos"}),O},"parse");t.exports=v}),z_=Ee((e,t)=>{"use strict";var i=Zo(),u=H_(),n=G_(),l=W_(),c=oe((r,s={})=>{let o=[];if(Array.isArray(r))for(let a of r){let h=c.create(a,s);Array.isArray(h)?o.push(...h):o.push(h)}else o=[].concat(c.create(r,s));return s&&s.expand===!0&&s.nodupes===!0&&(o=[...new Set(o)]),o},"braces");c.parse=(r,s={})=>l(r,s),c.stringify=(r,s={})=>i(typeof r=="string"?c.parse(r,s):r,s),c.compile=(r,s={})=>(typeof r=="string"&&(r=c.parse(r,s)),u(r,s)),c.expand=(r,s={})=>{typeof r=="string"&&(r=c.parse(r,s));let o=n(r,s);return s.noempty===!0&&(o=o.filter(Boolean)),s.nodupes===!0&&(o=[...new Set(o)]),o},c.create=(r,s={})=>r===""||r.length<3?[r]:s.expand!==!0?c.compile(r,s):c.expand(r,s),t.exports=c}),gi=Ee((e,t)=>{"use strict";var i=require("path"),u="\\\\/",n=`[^${u}]`,l="\\.",c="\\+",r="\\?",s="\\/",o="(?=.)",a="[^/]",h=`(?:${s}|$)`,p=`(?:^|${s})`,d=`${l}{1,2}${h}`,m=`(?!${l})`,g=`(?!${p}${d})`,f=`(?!${l}{0,1}${h})`,y=`(?!${d})`,v=`[^.${s}]`,E=`${a}*?`,b={DOT_LITERAL:l,PLUS_LITERAL:c,QMARK_LITERAL:r,SLASH_LITERAL:s,ONE_CHAR:o,QMARK:a,END_ANCHOR:h,DOTS_SLASH:d,NO_DOT:m,NO_DOTS:g,NO_DOT_SLASH:f,NO_DOTS_SLASH:y,QMARK_NO_DOT:v,STAR:E,START_ANCHOR:p},w={...b,SLASH_LITERAL:`[${u}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${l}{1,2}(?:[${u}]|$)`,NO_DOT:`(?!${l})`,NO_DOTS:`(?!(?:^|[${u}])${l}{1,2}(?:[${u}]|$))`,NO_DOT_SLASH:`(?!${l}{0,1}(?:[${u}]|$))`,NO_DOTS_SLASH:`(?!${l}{1,2}(?:[${u}]|$))`,QMARK_NO_DOT:`[^.${u}]`,START_ANCHOR:`(?:^|[${u}])`,END_ANCHOR:`(?:[${u}]|$)`},_={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"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:_,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,SEP:i.sep,extglobChars(O){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${O.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(O){return O===!0?w:b}}}),mi=Ee(e=>{"use strict";var t=require("path"),i=process.platform==="win32",{REGEX_BACKSLASH:u,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:l,REGEX_SPECIAL_CHARS_GLOBAL:c}=gi();e.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),e.hasRegexChars=r=>l.test(r),e.isRegexChar=r=>r.length===1&&e.hasRegexChars(r),e.escapeRegex=r=>r.replace(c,"\\$1"),e.toPosixSlashes=r=>r.replace(u,"/"),e.removeBackslashes=r=>r.replace(n,s=>s==="\\"?"":s),e.supportsLookbehinds=()=>{let r=process.version.slice(1).split(".").map(Number);return r.length===3&&r[0]>=9||r[0]===8&&r[1]>=10},e.isWindows=r=>r&&typeof r.windows=="boolean"?r.windows:i===!0||t.sep==="\\",e.escapeLast=(r,s,o)=>{let a=r.lastIndexOf(s,o);return a===-1?r:r[a-1]==="\\"?e.escapeLast(r,s,a-1):`${r.slice(0,a)}\\${r.slice(a)}`},e.removePrefix=(r,s={})=>{let o=r;return o.startsWith("./")&&(o=o.slice(2),s.prefix="./"),o},e.wrapOutput=(r,s={},o={})=>{let a=o.contains?"":"^",h=o.contains?"":"$",p=`${a}(?:${r})${h}`;return s.negated===!0&&(p=`(?:^(?!${p}).*$)`),p}}),q_=Ee((e,t)=>{"use strict";var i=mi(),{CHAR_ASTERISK:u,CHAR_AT:n,CHAR_BACKWARD_SLASH:l,CHAR_COMMA:c,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:s,CHAR_FORWARD_SLASH:o,CHAR_LEFT_CURLY_BRACE:a,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:d,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:y}=gi(),v=oe(w=>w===o||w===l,"isPathSeparator"),E=oe(w=>{w.isPrefix!==!0&&(w.depth=w.isGlobstar?1/0:1)},"depth"),b=oe((w,_)=>{let O=_||{},A=w.length-1,I=O.parts===!0||O.scanToEnd===!0,P=[],L=[],j=[],N=w,M=-1,B=0,F=0,D=!1,H=!1,G=!1,x=!1,k=!1,T=!1,C=!1,q=!1,X=!1,Y=!1,$=0,V,z,U={value:"",depth:0,isGlob:!1},K=oe(()=>M>=A,"eos"),Z=oe(()=>N.charCodeAt(M+1),"peek"),Q=oe(()=>(V=z,N.charCodeAt(++M)),"advance");for(;M<A;){z=Q();let te;if(z===l){C=U.backslashes=!0,z=Q(),z===a&&(T=!0);continue}if(T===!0||z===a){for($++;K()!==!0&&(z=Q());){if(z===l){C=U.backslashes=!0,Q();continue}if(z===a){$++;continue}if(T!==!0&&z===r&&(z=Q())===r){if(D=U.isBrace=!0,G=U.isGlob=!0,Y=!0,I===!0)continue;break}if(T!==!0&&z===c){if(D=U.isBrace=!0,G=U.isGlob=!0,Y=!0,I===!0)continue;break}if(z===g&&($--,$===0)){T=!1,D=U.isBrace=!0,Y=!0;break}}if(I===!0)continue;break}if(z===o){if(P.push(M),L.push(U),U={value:"",depth:0,isGlob:!1},Y===!0)continue;if(V===r&&M===B+1){B+=2;continue}F=M+1;continue}if(O.noext!==!0&&(z===d||z===n||z===u||z===m||z===s)&&Z()===h){if(G=U.isGlob=!0,x=U.isExtglob=!0,Y=!0,z===s&&M===B&&(X=!0),I===!0){for(;K()!==!0&&(z=Q());){if(z===l){C=U.backslashes=!0,z=Q();continue}if(z===f){G=U.isGlob=!0,Y=!0;break}}continue}break}if(z===u){if(V===u&&(k=U.isGlobstar=!0),G=U.isGlob=!0,Y=!0,I===!0)continue;break}if(z===m){if(G=U.isGlob=!0,Y=!0,I===!0)continue;break}if(z===p){for(;K()!==!0&&(te=Q());){if(te===l){C=U.backslashes=!0,Q();continue}if(te===y){H=U.isBracket=!0,G=U.isGlob=!0,Y=!0;break}}if(I===!0)continue;break}if(O.nonegate!==!0&&z===s&&M===B){q=U.negated=!0,B++;continue}if(O.noparen!==!0&&z===h){if(G=U.isGlob=!0,I===!0){for(;K()!==!0&&(z=Q());){if(z===h){C=U.backslashes=!0,z=Q();continue}if(z===f){Y=!0;break}}continue}break}if(G===!0){if(Y=!0,I===!0)continue;break}}O.noext===!0&&(x=!1,G=!1);let R=N,W="",ee="";B>0&&(W=N.slice(0,B),N=N.slice(B),F-=B),R&&G===!0&&F>0?(R=N.slice(0,F),ee=N.slice(F)):G===!0?(R="",ee=N):R=N,R&&R!==""&&R!=="/"&&R!==N&&v(R.charCodeAt(R.length-1))&&(R=R.slice(0,-1)),O.unescape===!0&&(ee&&(ee=i.removeBackslashes(ee)),R&&C===!0&&(R=i.removeBackslashes(R)));let ne={prefix:W,input:w,start:B,base:R,glob:ee,isBrace:D,isBracket:H,isGlob:G,isExtglob:x,isGlobstar:k,negated:q,negatedExtglob:X};if(O.tokens===!0&&(ne.maxDepth=0,v(z)||L.push(U),ne.tokens=L),O.parts===!0||O.tokens===!0){let te;for(let le=0;le<P.length;le++){let pe=te?te+1:B,re=P[le],he=w.slice(pe,re);O.tokens&&(le===0&&B!==0?(L[le].isPrefix=!0,L[le].value=W):L[le].value=he,E(L[le]),ne.maxDepth+=L[le].depth),(le!==0||he!=="")&&j.push(he),te=re}if(te&&te+1<w.length){let le=w.slice(te+1);j.push(le),O.tokens&&(L[L.length-1].value=le,E(L[L.length-1]),ne.maxDepth+=L[L.length-1].depth)}ne.slashes=P,ne.parts=j}return ne},"scan");t.exports=b}),K_=Ee((e,t)=>{"use strict";var i=gi(),u=mi(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:l,REGEX_NON_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:s}=i,o=oe((p,d)=>{if(typeof d.expandRange=="function")return d.expandRange(...p,d);p.sort();let m=`[${p.join("-")}]`;try{new RegExp(m)}catch{return p.map(g=>u.escapeRegex(g)).join("..")}return m},"expandRange"),a=oe((p,d)=>`Missing ${p}: "${d}" - use "\\\\${d}" to match literal characters`,"syntaxError"),h=oe((p,d)=>{if(typeof p!="string")throw new TypeError("Expected a string");p=s[p]||p;let m={...d},g=typeof m.maxLength=="number"?Math.min(n,m.maxLength):n,f=p.length;if(f>g)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${g}`);let y={type:"bos",value:"",output:m.prepend||""},v=[y],E=m.capture?"":"?:",b=u.isWindows(d),w=i.globChars(b),_=i.extglobChars(w),{DOT_LITERAL:O,PLUS_LITERAL:A,SLASH_LITERAL:I,ONE_CHAR:P,DOTS_SLASH:L,NO_DOT:j,NO_DOT_SLASH:N,NO_DOTS_SLASH:M,QMARK:B,QMARK_NO_DOT:F,STAR:D,START_ANCHOR:H}=w,G=oe(re=>`(${E}(?:(?!${H}${re.dot?L:O}).)*?)`,"globstar"),x=m.dot?"":j,k=m.dot?B:F,T=m.bash===!0?G(m):D;m.capture&&(T=`(${T})`),typeof m.noext=="boolean"&&(m.noextglob=m.noext);let C={input:p,index:-1,start:0,dot:m.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:v};p=u.removePrefix(p,C),f=p.length;let q=[],X=[],Y=[],$=y,V,z=oe(()=>C.index===f-1,"eos"),U=C.peek=(re=1)=>p[C.index+re],K=C.advance=()=>p[++C.index]||"",Z=oe(()=>p.slice(C.index+1),"remaining"),Q=oe((re="",he=0)=>{C.consumed+=re,C.index+=he},"consume"),R=oe(re=>{C.output+=re.output!=null?re.output:re.value,Q(re.value)},"append"),W=oe(()=>{let re=1;for(;U()==="!"&&(U(2)!=="("||U(3)==="?");)K(),C.start++,re++;return re%2===0?!1:(C.negated=!0,C.start++,!0)},"negate"),ee=oe(re=>{C[re]++,Y.push(re)},"increment"),ne=oe(re=>{C[re]--,Y.pop()},"decrement"),te=oe(re=>{if($.type==="globstar"){let he=C.braces>0&&(re.type==="comma"||re.type==="brace"),ie=re.extglob===!0||q.length&&(re.type==="pipe"||re.type==="paren");re.type!=="slash"&&re.type!=="paren"&&!he&&!ie&&(C.output=C.output.slice(0,-$.output.length),$.type="star",$.value="*",$.output=T,C.output+=$.output)}if(q.length&&re.type!=="paren"&&(q[q.length-1].inner+=re.value),(re.value||re.output)&&R(re),$&&$.type==="text"&&re.type==="text"){$.value+=re.value,$.output=($.output||"")+re.value;return}re.prev=$,v.push(re),$=re},"push"),le=oe((re,he)=>{let ie={..._[he],conditions:1,inner:""};ie.prev=$,ie.parens=C.parens,ie.output=C.output;let ce=(m.capture?"(":"")+ie.open;ee("parens"),te({type:re,value:he,output:C.output?"":P}),te({type:"paren",extglob:!0,value:K(),output:ce}),q.push(ie)},"extglobOpen"),pe=oe(re=>{let he=re.close+(m.capture?")":""),ie;if(re.type==="negate"){let ce=T;if(re.inner&&re.inner.length>1&&re.inner.includes("/")&&(ce=G(m)),(ce!==T||z()||/^\)+$/.test(Z()))&&(he=re.close=`)$))${ce}`),re.inner.includes("*")&&(ie=Z())&&/^\.[^\\/.]+$/.test(ie)){let ge=h(ie,{...d,fastpaths:!1}).output;he=re.close=`)${ge})${ce})`}re.prev.type==="bos"&&(C.negatedExtglob=!0)}te({type:"paren",extglob:!0,value:V,output:he}),ne("parens")},"extglobClose");if(m.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(p)){let re=!1,he=p.replace(r,(ie,ce,ge,ye,ue,de)=>ye==="\\"?(re=!0,ie):ye==="?"?ce?ce+ye+(ue?B.repeat(ue.length):""):de===0?k+(ue?B.repeat(ue.length):""):B.repeat(ge.length):ye==="."?O.repeat(ge.length):ye==="*"?ce?ce+ye+(ue?T:""):T:ce?ie:`\\${ie}`);return re===!0&&(m.unescape===!0?he=he.replace(/\\/g,""):he=he.replace(/\\+/g,ie=>ie.length%2===0?"\\\\":ie?"\\":"")),he===p&&m.contains===!0?(C.output=p,C):(C.output=u.wrapOutput(he,C,d),C)}for(;!z();){if(V=K(),V==="\0")continue;if(V==="\\"){let ie=U();if(ie==="/"&&m.bash!==!0||ie==="."||ie===";")continue;if(!ie){V+="\\",te({type:"text",value:V});continue}let ce=/^\\+/.exec(Z()),ge=0;if(ce&&ce[0].length>2&&(ge=ce[0].length,C.index+=ge,ge%2!==0&&(V+="\\")),m.unescape===!0?V=K():V+=K(),C.brackets===0){te({type:"text",value:V});continue}}if(C.brackets>0&&(V!=="]"||$.value==="["||$.value==="[^")){if(m.posix!==!1&&V===":"){let ie=$.value.slice(1);if(ie.includes("[")&&($.posix=!0,ie.includes(":"))){let ce=$.value.lastIndexOf("["),ge=$.value.slice(0,ce),ye=$.value.slice(ce+2),ue=l[ye];if(ue){$.value=ge+ue,C.backtrack=!0,K(),!y.output&&v.indexOf($)===1&&(y.output=P);continue}}}(V==="["&&U()!==":"||V==="-"&&U()==="]")&&(V=`\\${V}`),V==="]"&&($.value==="["||$.value==="[^")&&(V=`\\${V}`),m.posix===!0&&V==="!"&&$.value==="["&&(V="^"),$.value+=V,R({value:V});continue}if(C.quotes===1&&V!=='"'){V=u.escapeRegex(V),$.value+=V,R({value:V});continue}if(V==='"'){C.quotes=C.quotes===1?0:1,m.keepQuotes===!0&&te({type:"text",value:V});continue}if(V==="("){ee("parens"),te({type:"paren",value:V});continue}if(V===")"){if(C.parens===0&&m.strictBrackets===!0)throw new SyntaxError(a("opening","("));let ie=q[q.length-1];if(ie&&C.parens===ie.parens+1){pe(q.pop());continue}te({type:"paren",value:V,output:C.parens?")":"\\)"}),ne("parens");continue}if(V==="["){if(m.nobracket===!0||!Z().includes("]")){if(m.nobracket!==!0&&m.strictBrackets===!0)throw new SyntaxError(a("closing","]"));V=`\\${V}`}else ee("brackets");te({type:"bracket",value:V});continue}if(V==="]"){if(m.nobracket===!0||$&&$.type==="bracket"&&$.value.length===1){te({type:"text",value:V,output:`\\${V}`});continue}if(C.brackets===0){if(m.strictBrackets===!0)throw new SyntaxError(a("opening","["));te({type:"text",value:V,output:`\\${V}`});continue}ne("brackets");let ie=$.value.slice(1);if($.posix!==!0&&ie[0]==="^"&&!ie.includes("/")&&(V=`/${V}`),$.value+=V,R({value:V}),m.literalBrackets===!1||u.hasRegexChars(ie))continue;let ce=u.escapeRegex($.value);if(C.output=C.output.slice(0,-$.value.length),m.literalBrackets===!0){C.output+=ce,$.value=ce;continue}$.value=`(${E}${ce}|${$.value})`,C.output+=$.value;continue}if(V==="{"&&m.nobrace!==!0){ee("braces");let ie={type:"brace",value:V,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};X.push(ie),te(ie);continue}if(V==="}"){let ie=X[X.length-1];if(m.nobrace===!0||!ie){te({type:"text",value:V,output:V});continue}let ce=")";if(ie.dots===!0){let ge=v.slice(),ye=[];for(let ue=ge.length-1;ue>=0&&(v.pop(),ge[ue].type!=="brace");ue--)ge[ue].type!=="dots"&&ye.unshift(ge[ue].value);ce=o(ye,m),C.backtrack=!0}if(ie.comma!==!0&&ie.dots!==!0){let ge=C.output.slice(0,ie.outputIndex),ye=C.tokens.slice(ie.tokensIndex);ie.value=ie.output="\\{",V=ce="\\}",C.output=ge;for(let ue of ye)C.output+=ue.output||ue.value}te({type:"brace",value:V,output:ce}),ne("braces"),X.pop();continue}if(V==="|"){q.length>0&&q[q.length-1].conditions++,te({type:"text",value:V});continue}if(V===","){let ie=V,ce=X[X.length-1];ce&&Y[Y.length-1]==="braces"&&(ce.comma=!0,ie="|"),te({type:"comma",value:V,output:ie});continue}if(V==="/"){if($.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",v.pop(),$=y;continue}te({type:"slash",value:V,output:I});continue}if(V==="."){if(C.braces>0&&$.type==="dot"){$.value==="."&&($.output=O);let ie=X[X.length-1];$.type="dots",$.output+=V,$.value+=V,ie.dots=!0;continue}if(C.braces+C.parens===0&&$.type!=="bos"&&$.type!=="slash"){te({type:"text",value:V,output:O});continue}te({type:"dot",value:V,output:O});continue}if(V==="?"){if(!($&&$.value==="(")&&m.noextglob!==!0&&U()==="("&&U(2)!=="?"){le("qmark",V);continue}if($&&$.type==="paren"){let ie=U(),ce=V;if(ie==="<"&&!u.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");($.value==="("&&!/[!=<:]/.test(ie)||ie==="<"&&!/<([!=]|\w+>)/.test(Z()))&&(ce=`\\${V}`),te({type:"text",value:V,output:ce});continue}if(m.dot!==!0&&($.type==="slash"||$.type==="bos")){te({type:"qmark",value:V,output:F});continue}te({type:"qmark",value:V,output:B});continue}if(V==="!"){if(m.noextglob!==!0&&U()==="("&&(U(2)!=="?"||!/[!=<:]/.test(U(3)))){le("negate",V);continue}if(m.nonegate!==!0&&C.index===0){W();continue}}if(V==="+"){if(m.noextglob!==!0&&U()==="("&&U(2)!=="?"){le("plus",V);continue}if($&&$.value==="("||m.regex===!1){te({type:"plus",value:V,output:A});continue}if($&&($.type==="bracket"||$.type==="paren"||$.type==="brace")||C.parens>0){te({type:"plus",value:V});continue}te({type:"plus",value:A});continue}if(V==="@"){if(m.noextglob!==!0&&U()==="("&&U(2)!=="?"){te({type:"at",extglob:!0,value:V,output:""});continue}te({type:"text",value:V});continue}if(V!=="*"){(V==="$"||V==="^")&&(V=`\\${V}`);let ie=c.exec(Z());ie&&(V+=ie[0],C.index+=ie[0].length),te({type:"text",value:V});continue}if($&&($.type==="globstar"||$.star===!0)){$.type="star",$.star=!0,$.value+=V,$.output=T,C.backtrack=!0,C.globstar=!0,Q(V);continue}let re=Z();if(m.noextglob!==!0&&/^\([^?]/.test(re)){le("star",V);continue}if($.type==="star"){if(m.noglobstar===!0){Q(V);continue}let ie=$.prev,ce=ie.prev,ge=ie.type==="slash"||ie.type==="bos",ye=ce&&(ce.type==="star"||ce.type==="globstar");if(m.bash===!0&&(!ge||re[0]&&re[0]!=="/")){te({type:"star",value:V,output:""});continue}let ue=C.braces>0&&(ie.type==="comma"||ie.type==="brace"),de=q.length&&(ie.type==="pipe"||ie.type==="paren");if(!ge&&ie.type!=="paren"&&!ue&&!de){te({type:"star",value:V,output:""});continue}for(;re.slice(0,3)==="/**";){let fe=p[C.index+4];if(fe&&fe!=="/")break;re=re.slice(3),Q("/**",3)}if(ie.type==="bos"&&z()){$.type="globstar",$.value+=V,$.output=G(m),C.output=$.output,C.globstar=!0,Q(V);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&!ye&&z()){C.output=C.output.slice(0,-(ie.output+$.output).length),ie.output=`(?:${ie.output}`,$.type="globstar",$.output=G(m)+(m.strictSlashes?")":"|$)"),$.value+=V,C.globstar=!0,C.output+=ie.output+$.output,Q(V);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&re[0]==="/"){let fe=re[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(ie.output+$.output).length),ie.output=`(?:${ie.output}`,$.type="globstar",$.output=`${G(m)}${I}|${I}${fe})`,$.value+=V,C.output+=ie.output+$.output,C.globstar=!0,Q(V+K()),te({type:"slash",value:"/",output:""});continue}if(ie.type==="bos"&&re[0]==="/"){$.type="globstar",$.value+=V,$.output=`(?:^|${I}|${G(m)}${I})`,C.output=$.output,C.globstar=!0,Q(V+K()),te({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-$.output.length),$.type="globstar",$.output=G(m),$.value+=V,C.output+=$.output,C.globstar=!0,Q(V);continue}let he={type:"star",value:V,output:T};if(m.bash===!0){he.output=".*?",($.type==="bos"||$.type==="slash")&&(he.output=x+he.output),te(he);continue}if($&&($.type==="bracket"||$.type==="paren")&&m.regex===!0){he.output=V,te(he);continue}(C.index===C.start||$.type==="slash"||$.type==="dot")&&($.type==="dot"?(C.output+=N,$.output+=N):m.dot===!0?(C.output+=M,$.output+=M):(C.output+=x,$.output+=x),U()!=="*"&&(C.output+=P,$.output+=P)),te(he)}for(;C.brackets>0;){if(m.strictBrackets===!0)throw new SyntaxError(a("closing","]"));C.output=u.escapeLast(C.output,"["),ne("brackets")}for(;C.parens>0;){if(m.strictBrackets===!0)throw new SyntaxError(a("closing",")"));C.output=u.escapeLast(C.output,"("),ne("parens")}for(;C.braces>0;){if(m.strictBrackets===!0)throw new SyntaxError(a("closing","}"));C.output=u.escapeLast(C.output,"{"),ne("braces")}if(m.strictSlashes!==!0&&($.type==="star"||$.type==="bracket")&&te({type:"maybe_slash",value:"",output:`${I}?`}),C.backtrack===!0){C.output="";for(let re of C.tokens)C.output+=re.output!=null?re.output:re.value,re.suffix&&(C.output+=re.suffix)}return C},"parse");h.fastpaths=(p,d)=>{let m={...d},g=typeof m.maxLength=="number"?Math.min(n,m.maxLength):n,f=p.length;if(f>g)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${g}`);p=s[p]||p;let y=u.isWindows(d),{DOT_LITERAL:v,SLASH_LITERAL:E,ONE_CHAR:b,DOTS_SLASH:w,NO_DOT:_,NO_DOTS:O,NO_DOTS_SLASH:A,STAR:I,START_ANCHOR:P}=i.globChars(y),L=m.dot?O:_,j=m.dot?A:_,N=m.capture?"":"?:",M={negated:!1,prefix:""},B=m.bash===!0?".*?":I;m.capture&&(B=`(${B})`);let F=oe(x=>x.noglobstar===!0?B:`(${N}(?:(?!${P}${x.dot?w:v}).)*?)`,"globstar"),D=oe(x=>{switch(x){case"*":return`${L}${b}${B}`;case".*":return`${v}${b}${B}`;case"*.*":return`${L}${B}${v}${b}${B}`;case"*/*":return`${L}${B}${E}${b}${j}${B}`;case"**":return L+F(m);case"**/*":return`(?:${L}${F(m)}${E})?${j}${b}${B}`;case"**/*.*":return`(?:${L}${F(m)}${E})?${j}${B}${v}${b}${B}`;case"**/.*":return`(?:${L}${F(m)}${E})?${v}${b}${B}`;default:{let k=/^(.*?)\.(\w+)$/.exec(x);if(!k)return;let T=D(k[1]);return T?T+v+k[2]:void 0}}},"create"),H=u.removePrefix(p,M),G=D(H);return G&&m.strictSlashes!==!0&&(G+=`${E}?`),G},t.exports=h}),J_=Ee((e,t)=>{"use strict";var i=require("path"),u=q_(),n=K_(),l=mi(),c=gi(),r=oe(o=>o&&typeof o=="object"&&!Array.isArray(o),"isObject"),s=oe((o,a,h=!1)=>{if(Array.isArray(o)){let E=o.map(b=>s(b,a,h));return oe(b=>{for(let w of E){let _=w(b);if(_)return _}return!1},"arrayMatcher")}let p=r(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!p)throw new TypeError("Expected pattern to be a non-empty string");let d=a||{},m=l.isWindows(a),g=p?s.compileRe(o,a):s.makeRe(o,a,!1,!0),f=g.state;delete g.state;let y=oe(()=>!1,"isIgnored");if(d.ignore){let E={...a,ignore:null,onMatch:null,onResult:null};y=s(d.ignore,E,h)}let v=oe((E,b=!1)=>{let{isMatch:w,match:_,output:O}=s.test(E,g,a,{glob:o,posix:m}),A={glob:o,state:f,regex:g,posix:m,input:E,output:O,match:_,isMatch:w};return typeof d.onResult=="function"&&d.onResult(A),w===!1?(A.isMatch=!1,b?A:!1):y(E)?(typeof d.onIgnore=="function"&&d.onIgnore(A),A.isMatch=!1,b?A:!1):(typeof d.onMatch=="function"&&d.onMatch(A),b?A:!0)},"matcher");return h&&(v.state=f),v},"picomatch");s.test=(o,a,h,{glob:p,posix:d}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};let m=h||{},g=m.format||(d?l.toPosixSlashes:null),f=o===p,y=f&&g?g(o):o;return f===!1&&(y=g?g(o):o,f=y===p),(f===!1||m.capture===!0)&&(m.matchBase===!0||m.basename===!0?f=s.matchBase(o,a,h,d):f=a.exec(y)),{isMatch:!!f,match:f,output:y}},s.matchBase=(o,a,h,p=l.isWindows(h))=>(a instanceof RegExp?a:s.makeRe(a,h)).test(i.basename(o)),s.isMatch=(o,a,h)=>s(a,h)(o),s.parse=(o,a)=>Array.isArray(o)?o.map(h=>s.parse(h,a)):n(o,{...a,fastpaths:!1}),s.scan=(o,a)=>u(o,a),s.compileRe=(o,a,h=!1,p=!1)=>{if(h===!0)return o.output;let d=a||{},m=d.contains?"":"^",g=d.contains?"":"$",f=`${m}(?:${o.output})${g}`;o&&o.negated===!0&&(f=`^(?!${f}).*$`);let y=s.toRegex(f,a);return p===!0&&(y.state=o),y},s.makeRe=(o,a={},h=!1,p=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let d={negated:!1,fastpaths:!0};return a.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(d.output=n.fastpaths(o,a)),d.output||(d=n(o,a)),s.compileRe(d,a,h,p)},s.toRegex=(o,a)=>{try{let h=a||{};return new RegExp(o,h.flags||(h.nocase?"i":""))}catch(h){if(a&&a.debug===!0)throw h;return/$^/}},s.constants=c,t.exports=s}),X_=Ee((e,t)=>{"use strict";t.exports=J_()}),Z_=Ee((e,t)=>{"use strict";var i=require("util"),u=z_(),n=X_(),l=mi(),c=oe(o=>o===""||o==="./","isEmptyString"),r=oe(o=>{let a=o.indexOf("{");return a>-1&&o.indexOf("}",a)>-1},"hasBraces"),s=oe((o,a,h)=>{a=[].concat(a),o=[].concat(o);let p=new Set,d=new Set,m=new Set,g=0,f=oe(v=>{m.add(v.output),h&&h.onResult&&h.onResult(v)},"onResult");for(let v=0;v<a.length;v++){let E=n(String(a[v]),{...h,onResult:f},!0),b=E.state.negated||E.state.negatedExtglob;b&&g++;for(let w of o){let _=E(w,!0);(b?!_.isMatch:_.isMatch)&&(b?p.add(_.output):(p.delete(_.output),d.add(_.output)))}}let y=(g===a.length?[...m]:[...d]).filter(v=>!p.has(v));if(h&&y.length===0){if(h.failglob===!0)throw new Error(`No matches found for "${a.join(", ")}"`);if(h.nonull===!0||h.nullglob===!0)return h.unescape?a.map(v=>v.replace(/\\/g,"")):a}return y},"micromatch");s.match=s,s.matcher=(o,a)=>n(o,a),s.isMatch=(o,a,h)=>n(a,h)(o),s.any=s.isMatch,s.not=(o,a,h={})=>{a=[].concat(a).map(String);let p=new Set,d=[],m=oe(f=>{h.onResult&&h.onResult(f),d.push(f.output)},"onResult"),g=new Set(s(o,a,{...h,onResult:m}));for(let f of d)g.has(f)||p.add(f);return[...p]},s.contains=(o,a,h)=>{if(typeof o!="string")throw new TypeError(`Expected a string: "${i.inspect(o)}"`);if(Array.isArray(a))return a.some(p=>s.contains(o,p,h));if(typeof a=="string"){if(c(o)||c(a))return!1;if(o.includes(a)||o.startsWith("./")&&o.slice(2).includes(a))return!0}return s.isMatch(o,a,{...h,contains:!0})},s.matchKeys=(o,a,h)=>{if(!l.isObject(o))throw new TypeError("Expected the first argument to be an object");let p=s(Object.keys(o),a,h),d={};for(let m of p)d[m]=o[m];return d},s.some=(o,a,h)=>{let p=[].concat(o);for(let d of[].concat(a)){let m=n(String(d),h);if(p.some(g=>m(g)))return!0}return!1},s.every=(o,a,h)=>{let p=[].concat(o);for(let d of[].concat(a)){let m=n(String(d),h);if(!p.every(g=>m(g)))return!1}return!0},s.all=(o,a,h)=>{if(typeof o!="string")throw new TypeError(`Expected a string: "${i.inspect(o)}"`);return[].concat(a).every(p=>n(p,h)(o))},s.capture=(o,a,h)=>{let p=l.isWindows(h),d=n.makeRe(String(o),{...h,capture:!0}).exec(p?l.toPosixSlashes(a):a);if(d)return d.slice(1).map(m=>m===void 0?"":m)},s.makeRe=(...o)=>n.makeRe(...o),s.scan=(...o)=>n.scan(...o),s.parse=(o,a)=>{let h=[];for(let p of[].concat(o||[]))for(let d of u(String(p),a))h.push(n.parse(d,a));return h},s.braces=(o,a)=>{if(typeof o!="string")throw new TypeError("Expected a string");return a&&a.nobrace===!0||!r(o)?[o]:u(o,a)},s.braceExpand=(o,a)=>{if(typeof o!="string")throw new TypeError("Expected a string");return s.braces(o,{...a,expand:!0})},s.hasBraces=r,t.exports=s}),Y_=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAbsolute=e.partitionAbsoluteAndRelative=e.removeDuplicateSlashes=e.matchAny=e.convertPatternsToRe=e.makeRe=e.getPatternParts=e.expandBraceExpansion=e.expandPatternsWithBraceExpansion=e.isAffectDepthOfReadingPattern=e.endsWithSlashGlobStar=e.hasGlobStar=e.getBaseDirectory=e.isPatternRelatedToParentDirectory=e.getPatternsOutsideCurrentDirectory=e.getPatternsInsideCurrentDirectory=e.getPositivePatterns=e.getNegativePatterns=e.isPositivePattern=e.isNegativePattern=e.convertToNegativePattern=e.convertToPositivePattern=e.isDynamicPattern=e.isStaticPattern=void 0;var t=require("path"),i=B_(),u=Z_(),n="**",l="\\",c=/[*?]|^!/,r=/\[[^[]*]/,s=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,o=/[!*+?@]\([^(]*\)/,a=/,|\.\./,h=/(?!^)\/{2,}/g;function p(k,T={}){return!d(k,T)}oe(p,"isStaticPattern"),e.isStaticPattern=p;function d(k,T={}){return k===""?!1:!!(T.caseSensitiveMatch===!1||k.includes(l)||c.test(k)||r.test(k)||s.test(k)||T.extglob!==!1&&o.test(k)||T.braceExpansion!==!1&&m(k))}oe(d,"isDynamicPattern"),e.isDynamicPattern=d;function m(k){let T=k.indexOf("{");if(T===-1)return!1;let C=k.indexOf("}",T+1);if(C===-1)return!1;let q=k.slice(T,C);return a.test(q)}oe(m,"hasBraceExpansion");function g(k){return y(k)?k.slice(1):k}oe(g,"convertToPositivePattern"),e.convertToPositivePattern=g;function f(k){return"!"+k}oe(f,"convertToNegativePattern"),e.convertToNegativePattern=f;function y(k){return k.startsWith("!")&&k[1]!=="("}oe(y,"isNegativePattern"),e.isNegativePattern=y;function v(k){return!y(k)}oe(v,"isPositivePattern"),e.isPositivePattern=v;function E(k){return k.filter(y)}oe(E,"getNegativePatterns"),e.getNegativePatterns=E;function b(k){return k.filter(v)}oe(b,"getPositivePatterns"),e.getPositivePatterns=b;function w(k){return k.filter(T=>!O(T))}oe(w,"getPatternsInsideCurrentDirectory"),e.getPatternsInsideCurrentDirectory=w;function _(k){return k.filter(O)}oe(_,"getPatternsOutsideCurrentDirectory"),e.getPatternsOutsideCurrentDirectory=_;function O(k){return k.startsWith("..")||k.startsWith("./..")}oe(O,"isPatternRelatedToParentDirectory"),e.isPatternRelatedToParentDirectory=O;function A(k){return i(k,{flipBackslashes:!1})}oe(A,"getBaseDirectory"),e.getBaseDirectory=A;function I(k){return k.includes(n)}oe(I,"hasGlobStar"),e.hasGlobStar=I;function P(k){return k.endsWith("/"+n)}oe(P,"endsWithSlashGlobStar"),e.endsWithSlashGlobStar=P;function L(k){let T=t.basename(k);return P(k)||p(T)}oe(L,"isAffectDepthOfReadingPattern"),e.isAffectDepthOfReadingPattern=L;function j(k){return k.reduce((T,C)=>T.concat(N(C)),[])}oe(j,"expandPatternsWithBraceExpansion"),e.expandPatternsWithBraceExpansion=j;function N(k){let T=u.braces(k,{expand:!0,nodupes:!0,keepEscaping:!0});return T.sort((C,q)=>C.length-q.length),T.filter(C=>C!=="")}oe(N,"expandBraceExpansion"),e.expandBraceExpansion=N;function M(k,T){let{parts:C}=u.scan(k,Object.assign(Object.assign({},T),{parts:!0}));return C.length===0&&(C=[k]),C[0].startsWith("/")&&(C[0]=C[0].slice(1),C.unshift("")),C}oe(M,"getPatternParts"),e.getPatternParts=M;function B(k,T){return u.makeRe(k,T)}oe(B,"makeRe"),e.makeRe=B;function F(k,T){return k.map(C=>B(C,T))}oe(F,"convertPatternsToRe"),e.convertPatternsToRe=F;function D(k,T){return T.some(C=>C.test(k))}oe(D,"matchAny"),e.matchAny=D;function H(k){return k.replace(h,"/")}oe(H,"removeDuplicateSlashes"),e.removeDuplicateSlashes=H;function G(k){let T=[],C=[];for(let q of k)x(q)?T.push(q):C.push(q);return[T,C]}oe(G,"partitionAbsoluteAndRelative"),e.partitionAbsoluteAndRelative=G;function x(k){return t.isAbsolute(k)}oe(x,"isAbsolute"),e.isAbsolute=x}),Q_=Ee((e,t)=>{"use strict";var i=require("stream"),u=i.PassThrough,n=Array.prototype.slice;t.exports=l;function l(){let r=[],s=n.call(arguments),o=!1,a=s[s.length-1];a&&!Array.isArray(a)&&a.pipe==null?s.pop():a={};let h=a.end!==!1,p=a.pipeError===!0;a.objectMode==null&&(a.objectMode=!0),a.highWaterMark==null&&(a.highWaterMark=64*1024);let d=u(a);function m(){for(let y=0,v=arguments.length;y<v;y++)r.push(c(arguments[y],a));return g(),this}oe(m,"addStream");function g(){if(o)return;o=!0;let y=r.shift();if(!y){process.nextTick(f);return}Array.isArray(y)||(y=[y]);let v=y.length+1;function E(){--v>0||(o=!1,g())}oe(E,"next");function b(w){function _(){w.removeListener("merge2UnpipeEnd",_),w.removeListener("end",_),p&&w.removeListener("error",O),E()}oe(_,"onend");function O(A){d.emit("error",A)}if(oe(O,"onerror"),w._readableState.endEmitted)return E();w.on("merge2UnpipeEnd",_),w.on("end",_),p&&w.on("error",O),w.pipe(d,{end:!1}),w.resume()}oe(b,"pipe");for(let w=0;w<y.length;w++)b(y[w]);E()}oe(g,"mergeStream");function f(){o=!1,d.emit("queueDrain"),h&&d.end()}return oe(f,"endStream"),d.setMaxListeners(0),d.add=m,d.on("unpipe",function(y){y.emit("merge2UnpipeEnd")}),s.length&&m.apply(null,s),d}oe(l,"merge2");function c(r,s){if(Array.isArray(r))for(let o=0,a=r.length;o<a;o++)r[o]=c(r[o],s);else{if(!r._readableState&&r.pipe&&(r=r.pipe(u(s))),!r._readableState||!r.pause||!r.pipe)throw new Error("Only readable stream can be merged.");r.pause()}return r}oe(c,"pauseStreams")}),eO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;var t=Q_();function i(n){let l=t(n);return n.forEach(c=>{c.once("error",r=>l.emit("error",r))}),l.once("close",()=>u(n)),l.once("end",()=>u(n)),l}oe(i,"merge"),e.merge=i;function u(n){n.forEach(l=>l.emit("close"))}oe(u,"propagateCloseEventToSources")}),tO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEmpty=e.isString=void 0;function t(u){return typeof u=="string"}oe(t,"isString"),e.isString=t;function i(u){return u===""}oe(i,"isEmpty"),e.isEmpty=i}),Ft=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.string=e.stream=e.pattern=e.path=e.fs=e.errno=e.array=void 0;var t=k_();e.array=t;var i=L_();e.errno=i;var u=D_();e.fs=u;var n=$_();e.path=n;var l=Y_();e.pattern=l;var c=eO();e.stream=c;var r=tO();e.string=r}),rO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertPatternGroupToTask=e.convertPatternGroupsToTasks=e.groupPatternsByBaseDirectory=e.getNegativePatternsAsPositive=e.getPositivePatterns=e.convertPatternsToTasks=e.generate=void 0;var t=Ft();function i(a,h){let p=u(a,h),d=u(h.ignore,h),m=l(p),g=c(p,d),f=m.filter(b=>t.pattern.isStaticPattern(b,h)),y=m.filter(b=>t.pattern.isDynamicPattern(b,h)),v=n(f,g,!1),E=n(y,g,!0);return v.concat(E)}oe(i,"generate"),e.generate=i;function u(a,h){let p=a;return h.braceExpansion&&(p=t.pattern.expandPatternsWithBraceExpansion(p)),h.baseNameMatch&&(p=p.map(d=>d.includes("/")?d:`**/${d}`)),p.map(d=>t.pattern.removeDuplicateSlashes(d))}oe(u,"processPatterns");function n(a,h,p){let d=[],m=t.pattern.getPatternsOutsideCurrentDirectory(a),g=t.pattern.getPatternsInsideCurrentDirectory(a),f=r(m),y=r(g);return d.push(...s(f,h,p)),"."in y?d.push(o(".",g,h,p)):d.push(...s(y,h,p)),d}oe(n,"convertPatternsToTasks"),e.convertPatternsToTasks=n;function l(a){return t.pattern.getPositivePatterns(a)}oe(l,"getPositivePatterns"),e.getPositivePatterns=l;function c(a,h){return t.pattern.getNegativePatterns(a).concat(h).map(t.pattern.convertToPositivePattern)}oe(c,"getNegativePatternsAsPositive"),e.getNegativePatternsAsPositive=c;function r(a){let h={};return a.reduce((p,d)=>{let m=t.pattern.getBaseDirectory(d);return m in p?p[m].push(d):p[m]=[d],p},h)}oe(r,"groupPatternsByBaseDirectory"),e.groupPatternsByBaseDirectory=r;function s(a,h,p){return Object.keys(a).map(d=>o(d,a[d],h,p))}oe(s,"convertPatternGroupsToTasks"),e.convertPatternGroupsToTasks=s;function o(a,h,p,d){return{dynamic:d,positive:h,negative:p,base:a,patterns:[].concat(h,p.map(t.pattern.convertToNegativePattern))}}oe(o,"convertPatternGroupToTask"),e.convertPatternGroupToTask=o}),sO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.read=void 0;function t(n,l,c){l.fs.lstat(n,(r,s)=>{if(r!==null){i(c,r);return}if(!s.isSymbolicLink()||!l.followSymbolicLink){u(c,s);return}l.fs.stat(n,(o,a)=>{if(o!==null){if(l.throwErrorOnBrokenSymbolicLink){i(c,o);return}u(c,s);return}l.markSymbolicLink&&(a.isSymbolicLink=()=>!0),u(c,a)})})}oe(t,"read"),e.read=t;function i(n,l){n(l)}oe(i,"callFailureCallback");function u(n,l){n(null,l)}oe(u,"callSuccessCallback")}),iO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.read=void 0;function t(i,u){let n=u.fs.lstatSync(i);if(!n.isSymbolicLink()||!u.followSymbolicLink)return n;try{let l=u.fs.statSync(i);return u.markSymbolicLink&&(l.isSymbolicLink=()=>!0),l}catch(l){if(!u.throwErrorOnBrokenSymbolicLink)return n;throw l}}oe(t,"read"),e.read=t}),nO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;var t=require("fs");e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync};function i(u){return u===void 0?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),u)}oe(i,"createFileSystemAdapter"),e.createFileSystemAdapter=i}),oO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=nO(),i=class{static{oe(this,"Settings")}constructor(u={}){this._options=u,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=t.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(u,n){return u??n}};e.default=i}),dr=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.statSync=e.stat=e.Settings=void 0;var t=sO(),i=iO(),u=oO();e.Settings=u.default;function n(r,s,o){if(typeof s=="function"){t.read(r,c(),s);return}t.read(r,c(s),o)}oe(n,"stat"),e.stat=n;function l(r,s){let o=c(s);return i.read(r,o)}oe(l,"statSync"),e.statSync=l;function c(r={}){return r instanceof u.default?r:new u.default(r)}oe(c,"getSettings")}),aO=Ee((e,t)=>{var i;t.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(global):u=>(i||(i=Promise.resolve())).then(u).catch(n=>setTimeout(()=>{throw n},0))}),lO=Ee((e,t)=>{t.exports=u;var i=aO();function u(n,l){let c,r,s,o=!0;Array.isArray(n)?(c=[],r=n.length):(s=Object.keys(n),c={},r=s.length);function a(p){function d(){l&&l(p,c),l=null}oe(d,"end"),o?i(d):d()}oe(a,"done");function h(p,d,m){c[p]=m,(--r===0||d)&&a(d)}oe(h,"each"),r?s?s.forEach(function(p){n[p](function(d,m){h(p,d,m)})}):n.forEach(function(p,d){p(function(m,g){h(d,m,g)})}):a(null),o=!1}oe(u,"runParallel")}),Bh=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var t=process.versions.node.split(".");if(t[0]===void 0||t[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var i=Number.parseInt(t[0],10),u=Number.parseInt(t[1],10),n=10,l=10,c=i>n,r=i===n&&u>=l;e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=c||r}),cO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDirentFromStats=void 0;var t=class{static{oe(this,"DirentFromStats")}constructor(u,n){this.name=u,this.isBlockDevice=n.isBlockDevice.bind(n),this.isCharacterDevice=n.isCharacterDevice.bind(n),this.isDirectory=n.isDirectory.bind(n),this.isFIFO=n.isFIFO.bind(n),this.isFile=n.isFile.bind(n),this.isSocket=n.isSocket.bind(n),this.isSymbolicLink=n.isSymbolicLink.bind(n)}};function i(u,n){return new t(u,n)}oe(i,"createDirentFromStats"),e.createDirentFromStats=i}),Uh=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fs=void 0;var t=cO();e.fs=t}),Fh=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.joinPathSegments=void 0;function t(i,u,n){return i.endsWith(n)?i+u:i+n+u}oe(t,"joinPathSegments"),e.joinPathSegments=t}),uO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readdir=e.readdirWithFileTypes=e.read=void 0;var t=dr(),i=lO(),u=Bh(),n=Uh(),l=Fh();function c(p,d,m){if(!d.stats&&u.IS_SUPPORT_READDIR_WITH_FILE_TYPES){r(p,d,m);return}o(p,d,m)}oe(c,"read"),e.read=c;function r(p,d,m){d.fs.readdir(p,{withFileTypes:!0},(g,f)=>{if(g!==null){a(m,g);return}let y=f.map(E=>({dirent:E,name:E.name,path:l.joinPathSegments(p,E.name,d.pathSegmentSeparator)}));if(!d.followSymbolicLinks){h(m,y);return}let v=y.map(E=>s(E,d));i(v,(E,b)=>{if(E!==null){a(m,E);return}h(m,b)})})}oe(r,"readdirWithFileTypes"),e.readdirWithFileTypes=r;function s(p,d){return m=>{if(!p.dirent.isSymbolicLink()){m(null,p);return}d.fs.stat(p.path,(g,f)=>{if(g!==null){if(d.throwErrorOnBrokenSymbolicLink){m(g);return}m(null,p);return}p.dirent=n.fs.createDirentFromStats(p.name,f),m(null,p)})}}oe(s,"makeRplTaskEntry");function o(p,d,m){d.fs.readdir(p,(g,f)=>{if(g!==null){a(m,g);return}let y=f.map(v=>{let E=l.joinPathSegments(p,v,d.pathSegmentSeparator);return b=>{t.stat(E,d.fsStatSettings,(w,_)=>{if(w!==null){b(w);return}let O={name:v,path:E,dirent:n.fs.createDirentFromStats(v,_)};d.stats&&(O.stats=_),b(null,O)})}});i(y,(v,E)=>{if(v!==null){a(m,v);return}h(m,E)})})}oe(o,"readdir"),e.readdir=o;function a(p,d){p(d)}oe(a,"callFailureCallback");function h(p,d){p(null,d)}oe(h,"callSuccessCallback")}),hO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readdir=e.readdirWithFileTypes=e.read=void 0;var t=dr(),i=Bh(),u=Uh(),n=Fh();function l(s,o){return!o.stats&&i.IS_SUPPORT_READDIR_WITH_FILE_TYPES?c(s,o):r(s,o)}oe(l,"read"),e.read=l;function c(s,o){return o.fs.readdirSync(s,{withFileTypes:!0}).map(a=>{let h={dirent:a,name:a.name,path:n.joinPathSegments(s,a.name,o.pathSegmentSeparator)};if(h.dirent.isSymbolicLink()&&o.followSymbolicLinks)try{let p=o.fs.statSync(h.path);h.dirent=u.fs.createDirentFromStats(h.name,p)}catch(p){if(o.throwErrorOnBrokenSymbolicLink)throw p}return h})}oe(c,"readdirWithFileTypes"),e.readdirWithFileTypes=c;function r(s,o){return o.fs.readdirSync(s).map(a=>{let h=n.joinPathSegments(s,a,o.pathSegmentSeparator),p=t.statSync(h,o.fsStatSettings),d={name:a,path:h,dirent:u.fs.createDirentFromStats(a,p)};return o.stats&&(d.stats=p),d})}oe(r,"readdir"),e.readdir=r}),pO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;var t=require("fs");e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync};function i(u){return u===void 0?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),u)}oe(i,"createFileSystemAdapter"),e.createFileSystemAdapter=i}),dO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),i=dr(),u=pO(),n=class{static{oe(this,"Settings")}constructor(l={}){this._options=l,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=u.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new i.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(l,c){return l??c}};e.default=n}),Yo=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Settings=e.scandirSync=e.scandir=void 0;var t=uO(),i=hO(),u=dO();e.Settings=u.default;function n(r,s,o){if(typeof s=="function"){t.read(r,c(),s);return}t.read(r,c(s),o)}oe(n,"scandir"),e.scandir=n;function l(r,s){let o=c(s);return i.read(r,o)}oe(l,"scandirSync"),e.scandirSync=l;function c(r={}){return r instanceof u.default?r:new u.default(r)}oe(c,"getSettings")}),fO=Ee((e,t)=>{"use strict";function i(u){var n=new u,l=n;function c(){var s=n;return s.next?n=s.next:(n=new u,l=n),s.next=null,s}oe(c,"get");function r(s){l.next=s,l=s}return oe(r,"release"),{get:c,release:r}}oe(i,"reusify"),t.exports=i}),gO=Ee((e,t)=>{"use strict";var i=fO();function u(r,s,o){if(typeof r=="function"&&(o=s,s=r,r=null),!(o>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var a=i(l),h=null,p=null,d=0,m=null,g={push:_,drain:n,saturated:n,pause:y,paused:!1,get concurrency(){return o},set concurrency(j){if(!(j>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(o=j,!g.paused)for(;h&&d<o;)d++,A()},running:f,resume:b,idle:w,length:v,getQueue:E,unshift:O,empty:n,kill:I,killAndDrain:P,error:L};return g;function f(){return d}function y(){g.paused=!0}function v(){for(var j=h,N=0;j;)j=j.next,N++;return N}function E(){for(var j=h,N=[];j;)N.push(j.value),j=j.next;return N}function b(){if(g.paused){if(g.paused=!1,h===null){d++,A();return}for(;h&&d<o;)d++,A()}}function w(){return d===0&&g.length()===0}function _(j,N){var M=a.get();M.context=r,M.release=A,M.value=j,M.callback=N||n,M.errorHandler=m,d>=o||g.paused?p?(p.next=M,p=M):(h=M,p=M,g.saturated()):(d++,s.call(r,M.value,M.worked))}function O(j,N){var M=a.get();M.context=r,M.release=A,M.value=j,M.callback=N||n,M.errorHandler=m,d>=o||g.paused?h?(M.next=h,h=M):(h=M,p=M,g.saturated()):(d++,s.call(r,M.value,M.worked))}function A(j){j&&a.release(j);var N=h;N&&d<=o?g.paused?d--:(p===h&&(p=null),h=N.next,N.next=null,s.call(r,N.value,N.worked),p===null&&g.empty()):--d===0&&g.drain()}function I(){h=null,p=null,g.drain=n}function P(){h=null,p=null,g.drain(),g.drain=n}function L(j){m=j}}oe(u,"fastqueue");function n(){}oe(n,"noop");function l(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var r=this;this.worked=oe(function(s,o){var a=r.callback,h=r.errorHandler,p=r.value;r.value=null,r.callback=n,r.errorHandler&&h(s,p),a.call(r.context,s,o),r.release(r)},"worked")}oe(l,"Task");function c(r,s,o){typeof r=="function"&&(o=s,s=r,r=null);function a(y,v){s.call(this,y).then(function(E){v(null,E)},v)}oe(a,"asyncWrapper");var h=u(r,a,o),p=h.push,d=h.unshift;return h.push=m,h.unshift=g,h.drained=f,h;function m(y){var v=new Promise(function(E,b){p(y,function(w,_){if(w){b(w);return}E(_)})});return v.catch(n),v}function g(y){var v=new Promise(function(E,b){d(y,function(w,_){if(w){b(w);return}E(_)})});return v.catch(n),v}function f(){var y=new Promise(function(v){process.nextTick(function(){if(h.idle())v();else{var E=h.drain;h.drain=function(){typeof E=="function"&&E(),v(),h.drain=E}}})});return y}}oe(c,"queueAsPromised"),t.exports=u,t.exports.promise=c}),Qo=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.joinPathSegments=e.replacePathSegmentSeparator=e.isAppliedFilter=e.isFatalError=void 0;function t(l,c){return l.errorFilter===null?!0:!l.errorFilter(c)}oe(t,"isFatalError"),e.isFatalError=t;function i(l,c){return l===null||l(c)}oe(i,"isAppliedFilter"),e.isAppliedFilter=i;function u(l,c){return l.split(/[/\\]/).join(c)}oe(u,"replacePathSegmentSeparator"),e.replacePathSegmentSeparator=u;function n(l,c,r){return l===""?c:l.endsWith(r)?l+c:l+r+c}oe(n,"joinPathSegments"),e.joinPathSegments=n}),Hh=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Qo(),i=class{static{oe(this,"Reader")}constructor(u,n){this._root=u,this._settings=n,this._root=t.replacePathSegmentSeparator(u,n.pathSegmentSeparator)}};e.default=i}),Gh=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("events"),i=Yo(),u=gO(),n=Qo(),l=Hh(),c=class extends l.default{static{oe(this,"AsyncReader")}constructor(r,s){super(r,s),this._settings=s,this._scandir=i.scandir,this._emitter=new t.EventEmitter,this._queue=u(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(r){this._emitter.on("entry",r)}onError(r){this._emitter.once("error",r)}onEnd(r){this._emitter.once("end",r)}_pushToQueue(r,s){let o={directory:r,base:s};this._queue.push(o,a=>{a!==null&&this._handleError(a)})}_worker(r,s){this._scandir(r.directory,this._settings.fsScandirSettings,(o,a)=>{if(o!==null){s(o,void 0);return}for(let h of a)this._handleEntry(h,r.base);s(null,void 0)})}_handleError(r){this._isDestroyed||!n.isFatalError(this._settings,r)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",r))}_handleEntry(r,s){if(this._isDestroyed||this._isFatalError)return;let o=r.path;s!==void 0&&(r.path=n.joinPathSegments(s,r.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,r)&&this._emitEntry(r),r.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,r)&&this._pushToQueue(o,s===void 0?void 0:r.path)}_emitEntry(r){this._emitter.emit("entry",r)}};e.default=c}),mO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Gh(),i=class{static{oe(this,"AsyncProvider")}constructor(l,c){this._root=l,this._settings=c,this._reader=new t.default(this._root,this._settings),this._storage=[]}read(l){this._reader.onError(c=>{u(l,c)}),this._reader.onEntry(c=>{this._storage.push(c)}),this._reader.onEnd(()=>{n(l,this._storage)}),this._reader.read()}};e.default=i;function u(l,c){l(c)}oe(u,"callFailureCallback");function n(l,c){l(null,c)}oe(n,"callSuccessCallback")}),yO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("stream"),i=Gh(),u=class{static{oe(this,"StreamProvider")}constructor(n,l){this._root=n,this._settings=l,this._reader=new i.default(this._root,this._settings),this._stream=new t.Readable({objectMode:!0,read:oe(()=>{},"read"),destroy:oe(()=>{this._reader.isDestroyed||this._reader.destroy()},"destroy")})}read(){return this._reader.onError(n=>{this._stream.emit("error",n)}),this._reader.onEntry(n=>{this._stream.push(n)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};e.default=u}),vO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Yo(),i=Qo(),u=Hh(),n=class extends u.default{static{oe(this,"SyncReader")}constructor(){super(...arguments),this._scandir=t.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(l,c){this._queue.add({directory:l,base:c})}_handleQueue(){for(let l of this._queue.values())this._handleDirectory(l.directory,l.base)}_handleDirectory(l,c){try{let r=this._scandir(l,this._settings.fsScandirSettings);for(let s of r)this._handleEntry(s,c)}catch(r){this._handleError(r)}}_handleError(l){if(i.isFatalError(this._settings,l))throw l}_handleEntry(l,c){let r=l.path;c!==void 0&&(l.path=i.joinPathSegments(c,l.name,this._settings.pathSegmentSeparator)),i.isAppliedFilter(this._settings.entryFilter,l)&&this._pushToStorage(l),l.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,l)&&this._pushToQueue(r,c===void 0?void 0:l.path)}_pushToStorage(l){this._storage.push(l)}};e.default=n}),SO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=vO(),i=class{static{oe(this,"SyncProvider")}constructor(u,n){this._root=u,this._settings=n,this._reader=new t.default(this._root,this._settings)}read(){return this._reader.read()}};e.default=i}),EO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),i=Yo(),u=class{static{oe(this,"Settings")}constructor(n={}){this._options=n,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.fsScandirSettings=new i.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(n,l){return n??l}};e.default=u}),ea=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Settings=e.walkStream=e.walkSync=e.walk=void 0;var t=mO(),i=yO(),u=SO(),n=EO();e.Settings=n.default;function l(o,a,h){if(typeof a=="function"){new t.default(o,s()).read(a);return}new t.default(o,s(a)).read(h)}oe(l,"walk"),e.walk=l;function c(o,a){let h=s(a);return new u.default(o,h).read()}oe(c,"walkSync"),e.walkSync=c;function r(o,a){let h=s(a);return new i.default(o,h).read()}oe(r,"walkStream"),e.walkStream=r;function s(o={}){return o instanceof n.default?o:new n.default(o)}oe(s,"getSettings")}),ta=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),i=dr(),u=Ft(),n=class{static{oe(this,"Reader")}constructor(l){this._settings=l,this._fsStatSettings=new i.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(l){return t.resolve(this._settings.cwd,l)}_makeEntry(l,c){let r={name:c,path:c,dirent:u.fs.createDirentFromStats(c,l)};return this._settings.stats&&(r.stats=l),r}_isFatalError(l){return!u.errno.isEnoentCodeError(l)&&!this._settings.suppressErrors}};e.default=n}),Vh=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("stream"),i=dr(),u=ea(),n=ta(),l=class extends n.default{static{oe(this,"ReaderStream")}constructor(){super(...arguments),this._walkStream=u.walkStream,this._stat=i.stat}dynamic(c,r){return this._walkStream(c,r)}static(c,r){let s=c.map(this._getFullEntryPath,this),o=new t.PassThrough({objectMode:!0});o._write=(a,h,p)=>this._getEntry(s[a],c[a],r).then(d=>{d!==null&&r.entryFilter(d)&&o.push(d),a===s.length-1&&o.end(),p()}).catch(p);for(let a=0;a<s.length;a++)o.write(a);return o}_getEntry(c,r,s){return this._getStat(c).then(o=>this._makeEntry(o,r)).catch(o=>{if(s.errorFilter(o))return null;throw o})}_getStat(c){return new Promise((r,s)=>{this._stat(c,this._fsStatSettings,(o,a)=>o===null?r(a):s(o))})}};e.default=l}),bO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=ea(),i=ta(),u=Vh(),n=class extends i.default{static{oe(this,"ReaderAsync")}constructor(){super(...arguments),this._walkAsync=t.walk,this._readerStream=new u.default(this._settings)}dynamic(l,c){return new Promise((r,s)=>{this._walkAsync(l,c,(o,a)=>{o===null?r(a):s(o)})})}async static(l,c){let r=[],s=this._readerStream.static(l,c);return new Promise((o,a)=>{s.once("error",a),s.on("data",h=>r.push(h)),s.once("end",()=>o(r))})}};e.default=n}),wO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Ft(),i=class{static{oe(this,"Matcher")}constructor(u,n,l){this._patterns=u,this._settings=n,this._micromatchOptions=l,this._storage=[],this._fillStorage()}_fillStorage(){for(let u of this._patterns){let n=this._getPatternSegments(u),l=this._splitSegmentsIntoSections(n);this._storage.push({complete:l.length<=1,pattern:u,segments:n,sections:l})}}_getPatternSegments(u){return t.pattern.getPatternParts(u,this._micromatchOptions).map(n=>t.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:t.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(u){return t.array.splitWhen(u,n=>n.dynamic&&t.pattern.hasGlobStar(n.pattern))}};e.default=i}),_O=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=wO(),i=class extends t.default{static{oe(this,"PartialMatcher")}match(u){let n=u.split("/"),l=n.length,c=this._storage.filter(r=>!r.complete||r.segments.length>l);for(let r of c){let s=r.sections[0];if(!r.complete&&l>s.length||n.every((o,a)=>{let h=r.segments[a];return!!(h.dynamic&&h.patternRe.test(o)||!h.dynamic&&h.pattern===o)}))return!0}return!1}};e.default=i}),OO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Ft(),i=_O(),u=class{static{oe(this,"DeepFilter")}constructor(n,l){this._settings=n,this._micromatchOptions=l}getFilter(n,l,c){let r=this._getMatcher(l),s=this._getNegativePatternsRe(c);return o=>this._filter(n,o,r,s)}_getMatcher(n){return new i.default(n,this._settings,this._micromatchOptions)}_getNegativePatternsRe(n){let l=n.filter(t.pattern.isAffectDepthOfReadingPattern);return t.pattern.convertPatternsToRe(l,this._micromatchOptions)}_filter(n,l,c,r){if(this._isSkippedByDeep(n,l.path)||this._isSkippedSymbolicLink(l))return!1;let s=t.path.removeLeadingDotSegment(l.path);return this._isSkippedByPositivePatterns(s,c)?!1:this._isSkippedByNegativePatterns(s,r)}_isSkippedByDeep(n,l){return this._settings.deep===1/0?!1:this._getEntryLevel(n,l)>=this._settings.deep}_getEntryLevel(n,l){let c=l.split("/").length;if(n==="")return c;let r=n.split("/").length;return c-r}_isSkippedSymbolicLink(n){return!this._settings.followSymbolicLinks&&n.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(n,l){return!this._settings.baseNameMatch&&!l.match(n)}_isSkippedByNegativePatterns(n,l){return!t.pattern.matchAny(n,l)}};e.default=u}),RO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Ft(),i=class{static{oe(this,"EntryFilter")}constructor(u,n){this._settings=u,this._micromatchOptions=n,this.index=new Map}getFilter(u,n){let[l,c]=t.pattern.partitionAbsoluteAndRelative(n),r={positive:{all:t.pattern.convertPatternsToRe(u,this._micromatchOptions)},negative:{absolute:t.pattern.convertPatternsToRe(l,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:t.pattern.convertPatternsToRe(c,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return s=>this._filter(s,r)}_filter(u,n){let l=t.path.removeLeadingDotSegment(u.path);if(this._settings.unique&&this._isDuplicateEntry(l)||this._onlyFileFilter(u)||this._onlyDirectoryFilter(u))return!1;let c=this._isMatchToPatternsSet(l,n,u.dirent.isDirectory());return this._settings.unique&&c&&this._createIndexRecord(l),c}_isDuplicateEntry(u){return this.index.has(u)}_createIndexRecord(u){this.index.set(u,void 0)}_onlyFileFilter(u){return this._settings.onlyFiles&&!u.dirent.isFile()}_onlyDirectoryFilter(u){return this._settings.onlyDirectories&&!u.dirent.isDirectory()}_isMatchToPatternsSet(u,n,l){return!(!this._isMatchToPatterns(u,n.positive.all,l)||this._isMatchToPatterns(u,n.negative.relative,l)||this._isMatchToAbsoluteNegative(u,n.negative.absolute,l))}_isMatchToAbsoluteNegative(u,n,l){if(n.length===0)return!1;let c=t.path.makeAbsolute(this._settings.cwd,u);return this._isMatchToPatterns(c,n,l)}_isMatchToPatterns(u,n,l){if(n.length===0)return!1;let c=t.pattern.matchAny(u,n);return!c&&l?t.pattern.matchAny(u+"/",n):c}};e.default=i}),AO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Ft(),i=class{static{oe(this,"ErrorFilter")}constructor(u){this._settings=u}getFilter(){return u=>this._isNonFatalError(u)}_isNonFatalError(u){return t.errno.isEnoentCodeError(u)||this._settings.suppressErrors}};e.default=i}),CO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Ft(),i=class{static{oe(this,"EntryTransformer")}constructor(u){this._settings=u}getTransformer(){return u=>this._transform(u)}_transform(u){let n=u.path;return this._settings.absolute&&(n=t.path.makeAbsolute(this._settings.cwd,n),n=t.path.unixify(n)),this._settings.markDirectories&&u.dirent.isDirectory()&&(n+="/"),this._settings.objectMode?Object.assign(Object.assign({},u),{path:n}):n}};e.default=i}),ra=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),i=OO(),u=RO(),n=AO(),l=CO(),c=class{static{oe(this,"Provider")}constructor(r){this._settings=r,this.errorFilter=new n.default(this._settings),this.entryFilter=new u.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new i.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new l.default(this._settings)}_getRootDirectory(r){return t.resolve(this._settings.cwd,r.base)}_getReaderOptions(r){let s=r.base==="."?"":r.base;return{basePath:s,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(s,r.positive,r.negative),entryFilter:this.entryFilter.getFilter(r.positive,r.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};e.default=c}),IO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=bO(),i=ra(),u=class extends i.default{static{oe(this,"ProviderAsync")}constructor(){super(...arguments),this._reader=new t.default(this._settings)}async read(n){let l=this._getRootDirectory(n),c=this._getReaderOptions(n);return(await this.api(l,n,c)).map(r=>c.transform(r))}api(n,l,c){return l.dynamic?this._reader.dynamic(n,c):this._reader.static(l.patterns,c)}};e.default=u}),TO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("stream"),i=Vh(),u=ra(),n=class extends u.default{static{oe(this,"ProviderStream")}constructor(){super(...arguments),this._reader=new i.default(this._settings)}read(l){let c=this._getRootDirectory(l),r=this._getReaderOptions(l),s=this.api(c,l,r),o=new t.Readable({objectMode:!0,read:oe(()=>{},"read")});return s.once("error",a=>o.emit("error",a)).on("data",a=>o.emit("data",r.transform(a))).once("end",()=>o.emit("end")),o.once("close",()=>s.destroy()),o}api(l,c,r){return c.dynamic?this._reader.dynamic(l,r):this._reader.static(c.patterns,r)}};e.default=n}),PO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=dr(),i=ea(),u=ta(),n=class extends u.default{static{oe(this,"ReaderSync")}constructor(){super(...arguments),this._walkSync=i.walkSync,this._statSync=t.statSync}dynamic(l,c){return this._walkSync(l,c)}static(l,c){let r=[];for(let s of l){let o=this._getFullEntryPath(s),a=this._getEntry(o,s,c);a===null||!c.entryFilter(a)||r.push(a)}return r}_getEntry(l,c,r){try{let s=this._getStat(l);return this._makeEntry(s,c)}catch(s){if(r.errorFilter(s))return null;throw s}}_getStat(l){return this._statSync(l,this._fsStatSettings)}};e.default=n}),xO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=PO(),i=ra(),u=class extends i.default{static{oe(this,"ProviderSync")}constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(n){let l=this._getRootDirectory(n),c=this._getReaderOptions(n);return this.api(l,n,c).map(c.transform)}api(n,l,c){return l.dynamic?this._reader.dynamic(n,c):this._reader.static(l.patterns,c)}};e.default=u}),NO=Ee(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var t=require("fs"),i=require("os"),u=Math.max(i.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:t.lstat,lstatSync:t.lstatSync,stat:t.stat,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync};var n=class{static{oe(this,"Settings")}constructor(l={}){this._options=l,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,u),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(l,c){return l===void 0?c:l}_getFileSystemMethods(l={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),l)}};e.default=n}),Wh=rO(),kO=IO(),LO=TO(),DO=xO(),Jo=NO(),ct=Ft();async function di(e,t){lt(e);let i=fi(e,kO.default,t),u=await Promise.all(i);return ct.array.flatten(u)}oe(di,"FastGlob");(function(e){e.glob=e,e.globSync=t,e.globStream=i,e.async=e;function t(o,a){lt(o);let h=fi(o,DO.default,a);return ct.array.flatten(h)}oe(t,"sync"),e.sync=t;function i(o,a){lt(o);let h=fi(o,LO.default,a);return ct.stream.merge(h)}oe(i,"stream"),e.stream=i;function u(o,a){lt(o);let h=[].concat(o),p=new Jo.default(a);return Wh.generate(h,p)}oe(u,"generateTasks"),e.generateTasks=u;function n(o,a){lt(o);let h=new Jo.default(a);return ct.pattern.isDynamicPattern(o,h)}oe(n,"isDynamicPattern"),e.isDynamicPattern=n;function l(o){return lt(o),ct.path.escape(o)}oe(l,"escapePath"),e.escapePath=l;function c(o){return lt(o),ct.path.convertPathToPattern(o)}oe(c,"convertPathToPattern"),e.convertPathToPattern=c;let r;(function(o){function a(p){return lt(p),ct.path.escapePosixPath(p)}oe(a,"escapePath"),o.escapePath=a;function h(p){return lt(p),ct.path.convertPosixPathToPattern(p)}oe(h,"convertPathToPattern"),o.convertPathToPattern=h})(r=e.posix||(e.posix={}));let s;(function(o){function a(p){return lt(p),ct.path.escapeWindowsPath(p)}oe(a,"escapePath"),o.escapePath=a;function h(p){return lt(p),ct.path.convertWindowsPathToPattern(p)}oe(h,"convertPathToPattern"),o.convertPathToPattern=h})(s=e.win32||(e.win32={}))})(di||(di={}));function fi(e,t,i){let u=[].concat(e),n=new Jo.default(i),l=Wh.generate(u,n),c=new t(n);return l.map(c.read,c)}oe(fi,"getWorks");function lt(e){if(![].concat(e).every(t=>ct.string.isString(t)&&!ct.string.isEmpty(t)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}oe(lt,"assertPatternsInput");zh.exports=di;});var Yt=me((O3,Jh)=>{var sa=Object.defineProperty,$O=Object.getOwnPropertyDescriptor,jO=Object.getOwnPropertyNames,MO=Object.prototype.hasOwnProperty,BO=(e,t)=>{for(var i in t)sa(e,i,{get:t[i],enumerable:!0})},UO=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of jO(t))!MO.call(e,n)&&n!==i&&sa(e,n,{get:()=>t[n],enumerable:!(u=$O(t,n))||u.enumerable});return e},FO=e=>UO(sa({},"__esModule",{value:!0}),e),Kh={};BO(Kh,{CACHE_DIR:()=>iR,CACHE_TTL_DIR:()=>nR,CHANGELOG_MD:()=>KO,DOT_GITHUB:()=>rR,DOT_GIT_DIR:()=>tR,DOT_PACKAGE_LOCK_JSON:()=>QO,DOT_SOCKET_DIR:()=>sR,ESLINT_CONFIG_JS:()=>ZO,EXTENSIONS:()=>IR,EXTENSIONS_JSON:()=>XO,EXT_CJS:()=>lR,EXT_CMD:()=>cR,EXT_CTS:()=>uR,EXT_DTS:()=>hR,EXT_JS:()=>pR,EXT_JSON:()=>dR,EXT_LOCK:()=>fR,EXT_LOCKB:()=>gR,EXT_MD:()=>mR,EXT_MJS:()=>yR,EXT_MTS:()=>vR,EXT_PS1:()=>SR,EXT_YAML:()=>ER,EXT_YML:()=>bR,GITIGNORE:()=>YO,LICENSE:()=>VO,LICENSE_GLOB:()=>wR,LICENSE_GLOB_RECURSIVE:()=>_R,LICENSE_MD:()=>WO,LICENSE_ORIGINAL:()=>zO,LICENSE_ORIGINAL_GLOB:()=>OR,LICENSE_ORIGINAL_GLOB_RECURSIVE:()=>RR,MANIFEST_JSON:()=>JO,NODE_MODULES:()=>eR,NODE_MODULES_GLOB_RECURSIVE:()=>oR,PACKAGE_JSON:()=>HO,README_GLOB:()=>AR,README_GLOB_RECURSIVE:()=>CR,README_MD:()=>qO,ROLLUP_EXTERNAL_SUFFIX:()=>TR,SLASH_NODE_MODULES_SLASH:()=>aR,TSCONFIG_JSON:()=>GO});Jh.exports=FO(Kh);var HO="package.json",GO="tsconfig.json",VO="LICENSE",WO="LICENSE.md",zO="LICENSE.original",qO="README.md",KO="CHANGELOG.md",JO="manifest.json",XO="extensions.json",ZO="eslint.config.js",YO=".gitignore",QO=".package-lock.json",eR="node_modules",tR=".git",rR=".github",sR=".socket",iR="cache",nR="ttl",oR="**/node_modules",aR="/node_modules/",lR=".cjs",cR=".cmd",uR=".cts",hR=".d.ts",pR=".js",dR=".json",fR=".lock",gR=".lockb",mR=".md",yR=".mjs",vR=".mts",SR=".ps1",ER=".yaml",bR=".yml",wR="LICEN[CS]E{[.-]*,}",_R="**/LICEN[CS]E{[.-]*,}",OR="*.original{.*,}",RR="**/*.original{.*,}",AR="README{.*,}",CR="**/README{.*,}",IR="extensions",TR="__rollup_external"});var ep=me((R3,Qh)=>{var oa=Object.defineProperty,PR=Object.getOwnPropertyDescriptor,xR=Object.getOwnPropertyNames,NR=Object.prototype.hasOwnProperty,kR=(e,t)=>{for(var i in t)oa(e,i,{get:t[i],enumerable:!0})},LR=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of xR(t))!NR.call(e,n)&&n!==i&&oa(e,n,{get:()=>t[n],enumerable:!(u=PR(t,n))||u.enumerable});return e},DR=e=>LR(oa({},"__esModule",{value:!0}),e),Zh={};kR(Zh,{defaultIgnore:()=>Yh,getGlobMatcher:()=>UR,globStreamLicenses:()=>BR});Qh.exports=DR(Zh);var $R=Zt(),Yh=(0,$R.objectFreeze)(["**/.git","**/.npmrc","**/node_modules","**/.DS_Store","**/.gitignore","**/.hg","**/.lock-wscript","**/.npmignore","**/.svn","**/.wafpickle-*","**/.*.swp","**/._*/**","**/archived-packages/**","**/build/config.gypi","**/CVS","**/npm-debug.log","**/*.orig","**/.env","**/.eslintcache","**/.nvm","**/.tap","**/.vscode","**/*.tsbuildinfo","**/Thumbs.db","**/bower_components"]),ia;function jR(){return ia===void 0&&(ia=jh()),ia}var na;function MR(){if(na===void 0){let e=qh();na=e.default||e}return na}function BR(e,t){let{ignore:i,ignoreOriginals:u,recursive:n,...l}={__proto__:null,...t},c=[...Array.isArray(i)?i:Yh,"**/*.{cjs,cts,js,json,mjs,mts,ts}"];return u&&c.push(Yt().LICENSE_ORIGINAL_GLOB_RECURSIVE),MR().globStream([n?Yt().LICENSE_GLOB_RECURSIVE:Yt().LICENSE_GLOB],{__proto__:null,absolute:!0,caseSensitiveMatch:!1,cwd:e,...l,...c?{ignore:c}:{}})}var Xh=new Map;function UR(e,t){let i=Array.isArray(e)?e:[e],u=JSON.stringify({patterns:i,options:t}),n=Xh.get(u);if(n)return n;let l=i.filter(o=>!o.startsWith("!")),c=i.filter(o=>o.startsWith("!")).map(o=>o.slice(1)),r=jR(),s={dot:!0,nocase:!0,...t,...c.length>0?{ignore:c}:{}};return n=r(l.length>0?l:i,s),Xh.set(u,n),n}});var la=me((A3,rp)=>{var aa=Object.defineProperty,FR=Object.getOwnPropertyDescriptor,HR=Object.getOwnPropertyNames,GR=Object.prototype.hasOwnProperty,VR=(e,t)=>{for(var i in t)aa(e,i,{get:t[i],enumerable:!0})},WR=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of HR(t))!GR.call(e,n)&&n!==i&&aa(e,n,{get:()=>t[n],enumerable:!(u=FR(t,n))||u.enumerable});return e},zR=e=>WR(aa({},"__esModule",{value:!0}),e),tp={};VR(tp,{ANSI_BOLD:()=>KR,ANSI_DIM:()=>JR,ANSI_ITALIC:()=>XR,ANSI_RESET:()=>qR,ANSI_STRIKETHROUGH:()=>YR,ANSI_UNDERLINE:()=>ZR,ansiRegex:()=>eA,stripAnsi:()=>tA});rp.exports=zR(tp);var qR="\x1B[0m",KR="\x1B[1m",JR="\x1B[2m",XR="\x1B[3m",ZR="\x1B[4m",YR="\x1B[9m",QR=/\x1b\[[0-9;]*m/g;function eA(e){let{onlyFirst:t}=e??{},i="(?:\\u001B\\][\\s\\S]*?(?:\\u0007\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]";return new RegExp(i,t?void 0:"g")}function tA(e){return e.replace(QR,"")}});var lp=me((C3,ap)=>{var yi=Object.defineProperty,rA=Object.getOwnPropertyDescriptor,sA=Object.getOwnPropertyNames,iA=Object.prototype.hasOwnProperty,Ht=(e,t)=>yi(e,"name",{value:t,configurable:!0}),nA=(e,t)=>{for(var i in t)yi(e,i,{get:t[i],enumerable:!0})},oA=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of sA(t))!iA.call(e,n)&&n!==i&&yi(e,n,{get:()=>t[n],enumerable:!(u=rA(t,n))||u.enumerable});return e},aA=e=>oA(yi({},"__esModule",{value:!0}),e),sp={};nA(sp,{_isNarrowWidth:()=>lA,eastAsianWidth:()=>op,eastAsianWidthType:()=>np});ap.exports=aA(sp);function ca(e){return e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109}Ht(ca,"isAmbiguous");function vi(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}Ht(vi,"isFullWidth");function Si(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101631&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129673||e>=129679&&e<=129734||e>=129742&&e<=129756||e>=129759&&e<=129769||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}Ht(Si,"isWide");function ip(e){return ca(e)?"ambiguous":vi(e)?"fullwidth":e===8361||e>=65377&&e<=65470||e>=65474&&e<=65479||e>=65482&&e<=65487||e>=65490&&e<=65495||e>=65498&&e<=65500||e>=65512&&e<=65518?"halfwidth":e>=32&&e<=126||e===162||e===163||e===165||e===166||e===172||e===175||e>=10214&&e<=10221||e===10629||e===10630?"narrow":Si(e)?"wide":"neutral"}Ht(ip,"getCategory");function ua(e){if(!Number.isSafeInteger(e))throw new TypeError(`Expected a code point, got \`${typeof e}\`.`)}Ht(ua,"validate");function np(e){return ua(e),ip(e)}Ht(np,"eastAsianWidthType");function op(e,{ambiguousAsWide:t=!1}={}){return ua(e),vi(e)||Si(e)||t&&ca(e)?2:1}Ht(op,"eastAsianWidth");var lA=Ht(e=>!(vi(e)||Si(e)),"_isNarrowWidth")});var Qt=me((I3,pp)=>{var fa=Object.defineProperty,cA=Object.getOwnPropertyDescriptor,uA=Object.getOwnPropertyNames,hA=Object.prototype.hasOwnProperty,pA=(e,t)=>{for(var i in t)fa(e,i,{get:t[i],enumerable:!0})},dA=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of uA(t))!hA.call(e,n)&&n!==i&&fa(e,n,{get:()=>t[n],enumerable:!(u=cA(t,n))||u.enumerable});return e},fA=e=>dA(fa({},"__esModule",{value:!0}),e),up={};pA(up,{ansiRegex:()=>Ei.ansiRegex,applyLinePrefix:()=>gA,camelToKebab:()=>mA,centerText:()=>CA,fromCharCode:()=>hp,indentString:()=>yA,isBlankString:()=>vA,isNonEmptyString:()=>SA,repeatString:()=>AA,search:()=>EA,stringWidth:()=>_A,stripAnsi:()=>Ei.stripAnsi,stripBom:()=>bA,toKebabCase:()=>OA,trimNewlines:()=>RA});pp.exports=fA(up);var Ei=la(),cp=lp(),hp=String.fromCharCode;function gA(e,t){let{prefix:i=""}={__proto__:null,...t};return i.length?`${i}${e.includes(`
5
- `)?e.replace(/\n/g,`
6
- ${i}`):e}`:e}function mA(e){let{length:t}=e;if(!t)return"";let i="",u=0;for(;u<t;){let n=e[u];if(!n)break;let l=n.charCodeAt(0);if(l>=65&&l<=90)for(i.length>0&&(i+="-");u<t;){let c=e[u];if(!c)break;let r=c.charCodeAt(0);if(r>=65&&r<=90)i+=hp(r+32),u+=1;else break}else i+=n,u+=1}return i}function yA(e,t){let{count:i=1}={__proto__:null,...t};return e.replace(/^(?!\s*$)/gm," ".repeat(i))}function vA(e){return typeof e=="string"&&(!e.length||/^\s+$/.test(e))}function SA(e){return typeof e=="string"&&e.length>0}function EA(e,t,i){let{fromIndex:u=0}={__proto__:null,...i},{length:n}=e;if(u>=n)return-1;if(u===0)return e.search(t);let l=u<0?Math.max(n+u,0):u,c=e.slice(l).search(t);return c===-1?-1:c+l}function bA(e){return e.length>0&&e.charCodeAt(0)===65279?e.slice(1):e}var wA=new Intl.Segmenter,ha,pa,da;try{ha=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark}|\\p{Surrogate})+$","v"),pa=new RegExp("^[\\p{Default_Ignorable_Code_Point}\\p{Control}\\p{Format}\\p{Mark}\\p{Surrogate}]+","v"),da=new RegExp("^\\p{RGI_Emoji}$","v")}catch{ha=new RegExp("^(?:\\p{Default_Ignorable_Code_Point}|\\p{Control}|\\p{Mark})+$","u"),pa=/^[\p{Default_Ignorable_Code_Point}\p{Control}\p{Format}\p{Mark}]+/u,da=new RegExp("^\\p{Extended_Pictographic}$","u")}function _A(e){if(typeof e!="string"||!e.length)return 0;let t=(0,Ei.stripAnsi)(e);if(!t.length)return 0;let i=0,u={ambiguousAsWide:!1};for(let{segment:n}of wA.segment(t)){if(ha.test(n))continue;if(da.test(n)){i+=2;continue}let l=n.replace(pa,"").codePointAt(0);if(l!==void 0&&(i+=(0,cp.eastAsianWidth)(l,u),n.length>1))for(let c of n.slice(1)){let r=c.charCodeAt(0);if(r>=65280&&r<=65519){let s=c.codePointAt(0);s!==void 0&&(i+=(0,cp.eastAsianWidth)(s,u))}}}return i}function OA(e){return e.length?e.replace(/([a-z]+[0-9]*)([A-Z])/g,"$1-$2").replace(/_/g,"-").toLowerCase():e}function RA(e){let{length:t}=e;if(t===0)return e;let i=e.charCodeAt(0),u=i!==13&&i!==10;if(t===1)return u?e:"";let n=e.charCodeAt(t-1);if(u&&n!==13&&n!==10)return e;let l=0,c=t;for(;l<c;){let r=e.charCodeAt(l);if(r!==13&&r!==10)break;l+=1}for(;c>l;){let r=e.charCodeAt(c-1);if(r!==13&&r!==10)break;c-=1}return l===0&&c===t?e:e.slice(l,c)}function AA(e,t){return t<=0?"":e.repeat(t)}function CA(e,t){let i=(0,Ei.stripAnsi)(e).length;if(i>=t)return e;let u=t-i,n=Math.floor(u/2),l=u-n;return" ".repeat(n)+e+" ".repeat(l)}});var gp=me((T3,fp)=>{var ga=Object.defineProperty,IA=Object.getOwnPropertyDescriptor,TA=Object.getOwnPropertyNames,PA=Object.prototype.hasOwnProperty,xA=(e,t)=>{for(var i in t)ga(e,i,{get:t[i],enumerable:!0})},NA=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of TA(t))!PA.call(e,n)&&n!==i&&ga(e,n,{get:()=>t[n],enumerable:!(u=IA(t,n))||u.enumerable});return e},kA=e=>NA(ga({},"__esModule",{value:!0}),e),dp={};xA(dp,{isJsonPrimitive:()=>jA,jsonParse:()=>MA});fp.exports=kA(dp);var LA=Qt(),DA=JSON.parse;function $A(e){if(!e||typeof e!="object")return!1;let t=e;if(typeof t.length!="number"||typeof t.copy!="function"||typeof t.slice!="function"||typeof t.length=="number"&&t.length>0&&typeof t[0]!="number")return!1;let i=e.constructor;return!!(typeof i?.isBuffer=="function"&&i.isBuffer(e))}function jA(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"}function MA(e,t){let{filepath:i,reviver:u,throws:n}={__proto__:null,...t},l=n===void 0||!!n,c=$A(e)?e.toString("utf8"):e;try{return DA((0,LA.stripBom)(c),u)}catch(r){if(l){let s=r;throw s&&typeof i=="string"&&(s.message=`${i}: ${s.message}`),s}}}});var fr=me((P3,bp)=>{var ba=Object.defineProperty,BA=Object.getOwnPropertyDescriptor,UA=Object.getOwnPropertyNames,FA=Object.prototype.hasOwnProperty,HA=(e,t)=>{for(var i in t)ba(e,i,{get:t[i],enumerable:!0})},GA=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of UA(t))!FA.call(e,n)&&n!==i&&ba(e,n,{get:()=>t[n],enumerable:!(u=BA(t,n))||u.enumerable});return e},VA=e=>GA(ba({},"__esModule",{value:!0}),e),vp={};HA(vp,{isAbsolute:()=>wi,isNodeModules:()=>YA,isPath:()=>QA,isRelative:()=>eC,normalizePath:()=>wa,pathLikeToString:()=>Gt,relativeResolve:()=>iC,splitPath:()=>tC,trimLeadingDotSlash:()=>rC});bp.exports=VA(vp);var bi=ti(),mp=Qt(),Sp=92,WA=58,Ep=47,zA=97,qA=122,va=65,Sa=90,Ea=/[/\\]/,KA=/(?:^|[/\\])node_modules(?:[/\\]|$)/;function is(e){return e===Ep||e===Sp}function JA(e){return e>=va&&e<=Sa||e>=zA&&e<=qA}var ma;function XA(){return ma===void 0&&(ma=require("buffer")),ma}var ya;function ZA(){return ya===void 0&&(ya=require("url")),ya}function YA(e){let t=Gt(e);return KA.test(t)}function wi(e){let t=Gt(e),{length:i}=t;if(i===0)return!1;let u=t.charCodeAt(0);return!!(u===Ep||u===Sp||bi.WIN32&&i>2&&JA(u)&&t.charCodeAt(1)===WA&&is(t.charCodeAt(2)))}function QA(e){let t=Gt(e);if(typeof t!="string"||t.length===0||/^[a-z][a-z0-9+.-]+:/i.test(t))return!1;if(t==="."||t===".."||wi(t))return!0;if(t.includes("/")||t.includes("\\")){if(t.startsWith("@")&&!t.startsWith("@/")){let i=t.split("/");if(i.length<=2&&!i[1]?.includes("\\"))return!1}return!0}return!1}function eC(e){let t=Gt(e);return typeof t!="string"?!1:t.length===0?!0:!wi(t)}function wa(e){let t=Gt(e),{length:i}=t;if(i===0)return".";if(i<2)return i===1&&t.charCodeAt(0)===92?"/":t;let u=0,n=0,l="";if(i>4&&t.charCodeAt(3)===92){let h=t.charCodeAt(2);(h===63||h===46)&&t.charCodeAt(0)===92&&t.charCodeAt(1)===92&&(n=2,l="//")}if(n===0)if(i>2&&(t.charCodeAt(0)===92&&t.charCodeAt(1)===92&&t.charCodeAt(2)!==92||t.charCodeAt(0)===47&&t.charCodeAt(1)===47&&t.charCodeAt(2)!==47)){let h=-1,p=!1,d=2;for(;d<i&&(t.charCodeAt(d)===47||t.charCodeAt(d)===92);)d++;for(;d<i;){let m=t.charCodeAt(d);if(m===47||m===92){h=d;break}d++}if(h>2){for(d=h;d<i&&(t.charCodeAt(d)===47||t.charCodeAt(d)===92);)d++;d<i&&(p=!0)}if(h>2&&p)n=2,l="//";else{for(u=t.charCodeAt(n);u===47||u===92;)n+=1,u=t.charCodeAt(n);n&&(l="/")}}else{for(u=t.charCodeAt(n);u===47||u===92;)n+=1,u=t.charCodeAt(n);n&&(l="/")}let c=(0,mp.search)(t,Ea,{fromIndex:n});if(c===-1){let h=t.slice(n);return h==="."||h.length===0?l||".":h===".."?l?l.slice(0,-1)||"/":"..":l+h}let r="",s=0,o=0;for(;c!==-1;){let h=t.slice(n,c);if(h.length>0&&h!==".")if(h==="..")if(s>0){let p=r.lastIndexOf("/");if(p===-1)r="",s=0,o>0&&!l&&(r="..",o=1);else{let d=p+1;r.slice(d)===".."?(r=`${r}/${h}`,o+=1):(r=r.slice(0,p),s-=1)}}else l||(r=r+(r.length===0?"":"/")+h,o+=1);else r=r+(r.length===0?"":"/")+h,s+=1;for(n=c+1,u=t.charCodeAt(n);u===47||u===92;)n+=1,u=t.charCodeAt(n);c=(0,mp.search)(t,Ea,{fromIndex:n})}let a=t.slice(n);if(a.length>0&&a!==".")if(a==="..")if(s>0){let h=r.lastIndexOf("/");if(h===-1)r="",s=0,o>0&&!l&&(r="..",o=1);else{let p=h+1;r.slice(p)===".."?(r=`${r}/${a}`,o+=1):(r=r.slice(0,h),s-=1)}}else l||(r=r+(r.length===0?"":"/")+a,o+=1);else r=r+(r.length===0?"":"/")+a,s+=1;return r.length===0?l||".":l+r}function Gt(e){if(e==null)return"";if(typeof e=="string")return e;let{Buffer:t}=XA();if(t.isBuffer(e))return e.toString("utf8");let i=ZA();if(e instanceof URL)try{return i.fileURLToPath(e)}catch{let u=e.pathname,n=decodeURIComponent(u);if(bi.WIN32&&n.startsWith("/")){let l=n.charCodeAt(1)|32;if(!(n.length>=3&&l>=97&&l<=122&&n.charAt(2)===":"))return n}return n}return String(e)}function tC(e){let t=Gt(e);return t===""?[]:t.split(Ea)}function rC(e){let t=Gt(e);return t.startsWith("./")||t.startsWith(".\\")?t.slice(2):t}function yp(...e){let t="",i=!1;for(let u=e.length-1;u>=0&&!i;u-=1){let n=e[u];typeof n!="string"||n.length===0||(t=n+(t.length===0?"":`/${t}`),i=wi(n))}return i||(t=require("process").cwd()+(t.length===0?"":`/${t}`)),wa(t)}function sC(e,t){if(e===t)return"";let i=yp(e),u=yp(t);if(i===u)return"";if(bi.WIN32){let d=i.toLowerCase(),m=u.toLowerCase();if(d===m)return""}let n=1,l=i.length,c=l-n,r=1,s=u.length-r,o=c<s?c:s,a=-1,h=0;for(;h<o;h+=1){let d=i.charCodeAt(n+h),m=u.charCodeAt(r+h);if(bi.WIN32&&(d>=va&&d<=Sa&&(d+=32),m>=va&&m<=Sa&&(m+=32)),d!==m)break;is(i.charCodeAt(n+h))&&(a=h)}if(h===o){if(s>o){let d=u.charCodeAt(r+h);if(is(d))return u.slice(r+h+1);if(h===0)return u.slice(r+h)}else if(c>o){let d=i.charCodeAt(n+h);is(d)?a=h:h===0&&(a=0)}}let p="";for(h=n+a+1;h<=l;h+=1){let d=i.charCodeAt(h);(h===l||is(d))&&(p+=p.length===0?"..":"/..")}return p+u.slice(r+a)}function iC(e,t){let i=sC(e,t);return i===""?"":wa(i)}});var Oa=me((x3,Op)=>{var _a=Object.defineProperty,nC=Object.getOwnPropertyDescriptor,oC=Object.getOwnPropertyNames,aC=Object.prototype.hasOwnProperty,lC=(e,t)=>{for(var i in t)_a(e,i,{get:t[i],enumerable:!0})},cC=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of oC(t))!aC.call(e,n)&&n!==i&&_a(e,n,{get:()=>t[n],enumerable:!(u=nC(t,n))||u.enumerable});return e},uC=e=>cC(_a({},"__esModule",{value:!0}),e),wp={};lC(wp,{clearPath:()=>hC,getPathValue:()=>pC,hasOverride:()=>dC,invalidateCaches:()=>Oi,registerCacheInvalidation:()=>fC,resetPaths:()=>gC,setPath:()=>mC});Op.exports=uC(wp);var gr=new Map,_i=new Map,_p=[];function hC(e){gr.delete(e),Oi()}function pC(e,t){if(gr.has(e))return gr.get(e);if(_i.has(e))return _i.get(e);let i=t();return _i.set(e,i),i}function dC(e){return gr.has(e)}function Oi(){_i.clear();for(let e of _p)try{e()}catch{}}function fC(e){_p.push(e)}function gC(){gr.clear(),Oi()}function mC(e,t){gr.set(e,t),Oi()}});var Aa=me((N3,Ap)=>{var Ra=Object.defineProperty,yC=Object.getOwnPropertyDescriptor,vC=Object.getOwnPropertyNames,SC=Object.prototype.hasOwnProperty,EC=(e,t)=>{for(var i in t)Ra(e,i,{get:t[i],enumerable:!0})},bC=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of vC(t))!SC.call(e,n)&&n!==i&&Ra(e,n,{get:()=>t[n],enumerable:!(u=yC(t,n))||u.enumerable});return e},wC=e=>bC(Ra({},"__esModule",{value:!0}),e),Rp={};EC(Rp,{envAsBoolean:()=>_C,envAsNumber:()=>OC,envAsString:()=>RC});Ap.exports=wC(Rp);function _C(e){if(!e)return!1;let t=e.toLowerCase();return t==="true"||t==="1"||t==="yes"}function OC(e){if(!e)return 0;let t=Number(e);return Number.isNaN(t)?0:t}function RC(e){return e||""}});var Ia=me((k3,Ip)=>{var Ca=Object.defineProperty,AC=Object.getOwnPropertyDescriptor,CC=Object.getOwnPropertyNames,IC=Object.prototype.hasOwnProperty,TC=(e,t)=>{for(var i in t)Ca(e,i,{get:t[i],enumerable:!0})},PC=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of CC(t))!IC.call(e,n)&&n!==i&&Ca(e,n,{get:()=>t[n],enumerable:!(u=AC(t,n))||u.enumerable});return e},xC=e=>PC(Ca({},"__esModule",{value:!0}),e),Cp={};TC(Cp,{getSocketAcceptRisks:()=>NC,getSocketApiBaseUrl:()=>kC,getSocketApiProxy:()=>LC,getSocketApiTimeout:()=>DC,getSocketApiToken:()=>$C,getSocketCacacheDir:()=>jC,getSocketConfig:()=>MC,getSocketDebug:()=>BC,getSocketDlxDirEnv:()=>UC,getSocketHome:()=>FC,getSocketNoApiToken:()=>HC,getSocketNpmRegistry:()=>GC,getSocketOrgSlug:()=>VC,getSocketRegistryUrl:()=>WC,getSocketViewAllRisks:()=>zC});Ip.exports=xC(Cp);var Ri=Aa(),Ke=Bt();function NC(){return(0,Ri.envAsBoolean)((0,Ke.getEnvValue)("SOCKET_ACCEPT_RISKS"))}function kC(){return(0,Ke.getEnvValue)("SOCKET_API_BASE_URL")}function LC(){return(0,Ke.getEnvValue)("SOCKET_API_PROXY")}function DC(){return(0,Ri.envAsNumber)((0,Ke.getEnvValue)("SOCKET_API_TIMEOUT"))}function $C(){return(0,Ke.getEnvValue)("SOCKET_API_TOKEN")}function jC(){return(0,Ke.getEnvValue)("SOCKET_CACACHE_DIR")}function MC(){return(0,Ke.getEnvValue)("SOCKET_CONFIG")}function BC(){return(0,Ke.getEnvValue)("SOCKET_DEBUG")}function UC(){return(0,Ke.getEnvValue)("SOCKET_DLX_DIR")}function FC(){return(0,Ke.getEnvValue)("SOCKET_HOME")}function HC(){return(0,Ri.envAsBoolean)((0,Ke.getEnvValue)("SOCKET_NO_API_TOKEN"))}function GC(){return(0,Ke.getEnvValue)("SOCKET_NPM_REGISTRY")}function VC(){return(0,Ke.getEnvValue)("SOCKET_ORG_SLUG")}function WC(){return(0,Ke.getEnvValue)("SOCKET_REGISTRY_URL")}function zC(){return(0,Ri.envAsBoolean)((0,Ke.getEnvValue)("SOCKET_VIEW_ALL_RISKS"))}});var kt=me((L3,xp)=>{var Ta=Object.defineProperty,qC=Object.getOwnPropertyDescriptor,KC=Object.getOwnPropertyNames,JC=Object.prototype.hasOwnProperty,XC=(e,t)=>{for(var i in t)Ta(e,i,{get:t[i],enumerable:!0})},ZC=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of KC(t))!JC.call(e,n)&&n!==i&&Ta(e,n,{get:()=>t[n],enumerable:!(u=qC(t,n))||u.enumerable});return e},YC=e=>ZC(Ta({},"__esModule",{value:!0}),e),Tp={};XC(Tp,{CACHE_SOCKET_API_DIR:()=>b1,REGISTRY:()=>w1,REGISTRY_SCOPE_DELIMITER:()=>_1,SOCKET_API_BASE_URL:()=>QC,SOCKET_API_TOKENS_URL:()=>i1,SOCKET_APP_PREFIX:()=>S1,SOCKET_CLI_APP_NAME:()=>g1,SOCKET_CONTACT_URL:()=>r1,SOCKET_DASHBOARD_URL:()=>s1,SOCKET_DLX_APP_NAME:()=>m1,SOCKET_DOCS_URL:()=>a1,SOCKET_FIREWALL_APP_NAME:()=>y1,SOCKET_GITHUB_ORG:()=>h1,SOCKET_IPC_HANDSHAKE:()=>E1,SOCKET_OVERRIDE_SCOPE:()=>u1,SOCKET_PRICING_URL:()=>n1,SOCKET_PUBLIC_API_KEY:()=>Pp,SOCKET_PUBLIC_API_TOKEN:()=>e1,SOCKET_REGISTRY_APP_NAME:()=>v1,SOCKET_REGISTRY_NPM_ORG:()=>f1,SOCKET_REGISTRY_PACKAGE_NAME:()=>d1,SOCKET_REGISTRY_REPO_NAME:()=>p1,SOCKET_REGISTRY_SCOPE:()=>l1,SOCKET_SECURITY_SCOPE:()=>c1,SOCKET_STATUS_URL:()=>o1,SOCKET_WEBSITE_URL:()=>t1});xp.exports=YC(Tp);var QC="https://api.socket.dev/v0",Pp="sktsec_t_--RAN5U4ivauy4w37-6aoKyYPDt5ZbaT5JBVMqiwKo_api",e1=Pp,t1="https://socket.dev",r1="https://socket.dev/contact",s1="https://socket.dev/dashboard",i1="https://socket.dev/dashboard/settings/api-tokens",n1="https://socket.dev/pricing",o1="https://status.socket.dev",a1="https://docs.socket.dev",l1="@socketregistry",c1="@socketsecurity",u1="@socketoverride",h1="SocketDev",p1="socket-registry",d1="@socketsecurity/registry",f1="socketregistry",g1="socket",m1="dlx",y1="sfw",v1="registry",S1="_",E1="SOCKET_IPC_HANDSHAKE",b1="socket-api",w1="registry",_1="__"});var Lp=me((D3,kp)=>{var Pa=Object.defineProperty,O1=Object.getOwnPropertyDescriptor,R1=Object.getOwnPropertyNames,A1=Object.prototype.hasOwnProperty,C1=(e,t)=>{for(var i in t)Pa(e,i,{get:t[i],enumerable:!0})},I1=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of R1(t))!A1.call(e,n)&&n!==i&&Pa(e,n,{get:()=>t[n],enumerable:!(u=O1(t,n))||u.enumerable});return e},T1=e=>I1(Pa({},"__esModule",{value:!0}),e),Np={};C1(Np,{CACHE_GITHUB_DIR:()=>x1,GITHUB_API_BASE_URL:()=>P1});kp.exports=T1(Np);var P1="https://api.github.com",x1="github"});var Pi=me(($3,Vp)=>{var N1=Object.create,Ii=Object.defineProperty,k1=Object.getOwnPropertyDescriptor,L1=Object.getOwnPropertyNames,D1=Object.getPrototypeOf,$1=Object.prototype.hasOwnProperty,j1=(e,t)=>{for(var i in t)Ii(e,i,{get:t[i],enumerable:!0})},Dp=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of L1(t))!$1.call(e,n)&&n!==i&&Ii(e,n,{get:()=>t[n],enumerable:!(u=k1(t,n))||u.enumerable});return e},$p=(e,t,i)=>(i=e!=null?N1(D1(e)):{},Dp(t||!e||!e.__esModule?Ii(i,"default",{value:e,enumerable:!0}):i,e)),M1=e=>Dp(Ii({},"__esModule",{value:!0}),e),jp={};j1(jp,{getOsHomeDir:()=>Bp,getOsTmpDir:()=>F1,getSocketAppCacheDir:()=>Up,getSocketAppCacheTtlDir:()=>Fp,getSocketAppDir:()=>Ti,getSocketCacacheDir:()=>G1,getSocketCliDir:()=>W1,getSocketDlxDir:()=>V1,getSocketHomePath:()=>H1,getSocketRegistryDir:()=>z1,getSocketRegistryGithubCacheDir:()=>q1,getSocketUserDir:()=>os,getUserHomeDir:()=>Hp,invalidateCache:()=>Gp});Vp.exports=M1(jp);var Mp=$p(require("os")),er=$p(require("path")),B1=ho(),Ci=Ia(),U1=fo(),Lt=fr(),xa=Oa();function Bp(){return(0,xa.getPathValue)("homedir",()=>Mp.homedir())}function F1(){return(0,xa.getPathValue)("tmpdir",()=>Mp.tmpdir())}function H1(){return os()}var Ai;function os(){return Ai===void 0&&(Ai=(0,Lt.normalizePath)(er.join(Hp(),Yt().DOT_SOCKET_DIR))),Ai}function Ti(e){return(0,Lt.normalizePath)(er.join(os(),`${kt().SOCKET_APP_PREFIX}${e}`))}var ns;function G1(){return ns===void 0&&((0,Ci.getSocketCacacheDir)()?ns=(0,Lt.normalizePath)((0,Ci.getSocketCacacheDir)()):ns=(0,Lt.normalizePath)(er.join(os(),`${kt().SOCKET_APP_PREFIX}cacache`))),ns}function V1(){return(0,Ci.getSocketDlxDirEnv)()?(0,Lt.normalizePath)((0,Ci.getSocketDlxDirEnv)()):(0,Lt.normalizePath)(er.join(os(),`${kt().SOCKET_APP_PREFIX}${kt().SOCKET_DLX_APP_NAME}`))}function Up(e){return(0,Lt.normalizePath)(er.join(Ti(e),Yt().CACHE_DIR))}function Fp(e){return(0,Lt.normalizePath)(er.join(Up(e),Yt().CACHE_TTL_DIR))}function W1(){return Ti(kt().SOCKET_CLI_APP_NAME)}function z1(){return Ti(kt().SOCKET_REGISTRY_APP_NAME)}function q1(){return(0,Lt.normalizePath)(er.join(Fp(kt().SOCKET_REGISTRY_APP_NAME),Lp().CACHE_GITHUB_DIR))}function Hp(){let e=(0,B1.getHome)();return e||(0,U1.getUserprofile)()||Bp()}function Gp(){Ai=void 0,ns=void 0}(0,xa.registerCacheInvalidation)(Gp)});var Ka=me((X3,Bd)=>{var K1=Object.create,as=Object.defineProperty,J1=Object.getOwnPropertyDescriptor,X1=Object.getOwnPropertyNames,Z1=Object.getPrototypeOf,Y1=Object.prototype.hasOwnProperty,se=(e,t)=>as(e,"name",{value:t,configurable:!0}),Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Q1=(e,t)=>{for(var i in t)as(e,i,{get:t[i],enumerable:!0})},Yp=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of X1(t))!Y1.call(e,n)&&n!==i&&as(e,n,{get:()=>t[n],enumerable:!(u=J1(t,n))||u.enumerable});return e},je=(e,t,i)=>(i=e!=null?K1(Z1(e)):{},Yp(t||!e||!e.__esModule?as(i,"default",{value:e,enumerable:!0}):i,e)),eI=e=>Yp(as({},"__esModule",{value:!0}),e),tI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.splitWhen=e.flatten=void 0;function t(u){return u.reduce((n,l)=>[].concat(n,l),[])}se(t,"flatten"),e.flatten=t;function i(u,n){let l=[[]],c=0;for(let r of u)n(r)?(c++,l[c]=[]):l[c].push(r);return l}se(i,"splitWhen"),e.splitWhen=i}),rI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEnoentCodeError=void 0;function t(i){return i.code==="ENOENT"}se(t,"isEnoentCodeError"),e.isEnoentCodeError=t}),sI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDirentFromStats=void 0;var t=class{static{se(this,"DirentFromStats")}constructor(u,n){this.name=u,this.isBlockDevice=n.isBlockDevice.bind(n),this.isCharacterDevice=n.isCharacterDevice.bind(n),this.isDirectory=n.isDirectory.bind(n),this.isFIFO=n.isFIFO.bind(n),this.isFile=n.isFile.bind(n),this.isSocket=n.isSocket.bind(n),this.isSymbolicLink=n.isSymbolicLink.bind(n)}};function i(u,n){return new t(u,n)}se(i,"createDirentFromStats"),e.createDirentFromStats=i}),iI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertPosixPathToPattern=e.convertWindowsPathToPattern=e.convertPathToPattern=e.escapePosixPath=e.escapeWindowsPath=e.escape=e.removeLeadingDotSegment=e.makeAbsolute=e.unixify=void 0;var t=require("os"),i=require("path"),u=t.platform()==="win32",n=2,l=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g,c=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g,r=/^\\\\([.?])/,s=/\\(?![!()+@[\]{}])/g;function o(f){return f.replace(/\\/g,"/")}se(o,"unixify"),e.unixify=o;function a(f,y){return i.resolve(f,y)}se(a,"makeAbsolute"),e.makeAbsolute=a;function h(f){if(f.charAt(0)==="."){let y=f.charAt(1);if(y==="/"||y==="\\")return f.slice(n)}return f}se(h,"removeLeadingDotSegment"),e.removeLeadingDotSegment=h,e.escape=u?p:d;function p(f){return f.replace(c,"\\$2")}se(p,"escapeWindowsPath"),e.escapeWindowsPath=p;function d(f){return f.replace(l,"\\$2")}se(d,"escapePosixPath"),e.escapePosixPath=d,e.convertPathToPattern=u?m:g;function m(f){return p(f).replace(r,"//$1").replace(s,"/")}se(m,"convertWindowsPathToPattern"),e.convertWindowsPathToPattern=m;function g(f){return d(f)}se(g,"convertPosixPathToPattern"),e.convertPosixPathToPattern=g}),nI=Se((e,t)=>{t.exports=se(function(i){if(typeof i!="string"||i==="")return!1;for(var u;u=/(\\).|([@?!+*]\(.*\))/g.exec(i);){if(u[2])return!0;i=i.slice(u.index+u[0].length)}return!1},"isExtglob")}),Qp=Se((e,t)=>{var i=nI(),u={"{":"}","(":")","[":"]"},n=se(function(c){if(c[0]==="!")return!0;for(var r=0,s=-2,o=-2,a=-2,h=-2,p=-2;r<c.length;){if(c[r]==="*"||c[r+1]==="?"&&/[\].+)]/.test(c[r])||o!==-1&&c[r]==="["&&c[r+1]!=="]"&&(o<r&&(o=c.indexOf("]",r)),o>r&&(p===-1||p>o||(p=c.indexOf("\\",r),p===-1||p>o)))||a!==-1&&c[r]==="{"&&c[r+1]!=="}"&&(a=c.indexOf("}",r),a>r&&(p=c.indexOf("\\",r),p===-1||p>a))||h!==-1&&c[r]==="("&&c[r+1]==="?"&&/[:!=]/.test(c[r+2])&&c[r+3]!==")"&&(h=c.indexOf(")",r),h>r&&(p=c.indexOf("\\",r),p===-1||p>h))||s!==-1&&c[r]==="("&&c[r+1]!=="|"&&(s<r&&(s=c.indexOf("|",r)),s!==-1&&c[s+1]!==")"&&(h=c.indexOf(")",s),h>s&&(p=c.indexOf("\\",s),p===-1||p>h))))return!0;if(c[r]==="\\"){var d=c[r+1];r+=2;var m=u[d];if(m){var g=c.indexOf(m,r);g!==-1&&(r=g+1)}if(c[r]==="!")return!0}else r++}return!1},"strictCheck"),l=se(function(c){if(c[0]==="!")return!0;for(var r=0;r<c.length;){if(/[*?{}()[\]]/.test(c[r]))return!0;if(c[r]==="\\"){var s=c[r+1];r+=2;var o=u[s];if(o){var a=c.indexOf(o,r);a!==-1&&(r=a+1)}if(c[r]==="!")return!0}else r++}return!1},"relaxedCheck");t.exports=se(function(c,r){if(typeof c!="string"||c==="")return!1;if(i(c))return!0;var s=n;return r&&r.strict===!1&&(s=l),s(c)},"isGlob")}),oI=Se((e,t)=>{"use strict";var i=Qp(),u=require("path").posix.dirname,n=require("os").platform()==="win32",l="/",c=/\\/g,r=/[\{\[].*[\}\]]$/,s=/(^|[^\\])([\{\[]|\([^\)]+$)/,o=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=se(function(a,h){var p=Object.assign({flipBackslashes:!0},h);p.flipBackslashes&&n&&a.indexOf(l)<0&&(a=a.replace(c,l)),r.test(a)&&(a+=l),a+="a";do a=u(a);while(i(a)||s.test(a));return a.replace(o,"$1")},"globParent")}),Da=Se(e=>{"use strict";e.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1,e.find=(t,i)=>t.nodes.find(u=>u.type===i),e.exceedsLimit=(t,i,u=1,n)=>n===!1||!e.isInteger(t)||!e.isInteger(i)?!1:(Number(i)-Number(t))/Number(u)>=n,e.escapeNode=(t,i=0,u)=>{let n=t.nodes[i];n&&(u&&n.type===u||n.type==="open"||n.type==="close")&&n.escaped!==!0&&(n.value="\\"+n.value,n.escaped=!0)},e.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0),e.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1,e.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0,e.reduce=t=>t.reduce((i,u)=>(u.type==="text"&&i.push(u.value),u.type==="range"&&(u.type="text"),i),[]),e.flatten=(...t)=>{let i=[],u=se(n=>{for(let l=0;l<n.length;l++){let c=n[l];if(Array.isArray(c)){u(c);continue}c!==void 0&&i.push(c)}return i},"flat");return u(t),i}}),$a=Se((e,t)=>{"use strict";var i=Da();t.exports=(u,n={})=>{let l=se((c,r={})=>{let s=n.escapeInvalid&&i.isInvalidBrace(r),o=c.invalid===!0&&n.escapeInvalid===!0,a="";if(c.value)return(s||o)&&i.isOpenOrClose(c)?"\\"+c.value:c.value;if(c.value)return c.value;if(c.nodes)for(let h of c.nodes)a+=l(h);return a},"stringify");return l(u)}}),aI=Se((e,t)=>{"use strict";t.exports=function(i){return typeof i=="number"?i-i===0:typeof i=="string"&&i.trim()!==""?Number.isFinite?Number.isFinite(+i):isFinite(+i):!1}}),lI=Se((e,t)=>{"use strict";var i=aI(),u=se((v,E,b)=>{if(i(v)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(E===void 0||v===E)return String(v);if(i(E)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let w={relaxZeros:!0,...b};typeof w.strictZeros=="boolean"&&(w.relaxZeros=w.strictZeros===!1);let _=String(w.relaxZeros),O=String(w.shorthand),A=String(w.capture),I=String(w.wrap),P=v+":"+E+"="+_+O+A+I;if(u.cache.hasOwnProperty(P))return u.cache[P].result;let L=Math.min(v,E),j=Math.max(v,E);if(Math.abs(L-j)===1){let D=v+"|"+E;return w.capture?`(${D})`:w.wrap===!1?D:`(?:${D})`}let N=f(v)||f(E),M={min:v,max:E,a:L,b:j},B=[],F=[];if(N&&(M.isPadded=N,M.maxLen=String(M.max).length),L<0){let D=j<0?Math.abs(j):1;F=r(D,Math.abs(L),M,w),L=M.a=0}return j>=0&&(B=r(L,j,M,w)),M.negatives=F,M.positives=B,M.result=n(F,B,w),w.capture===!0?M.result=`(${M.result})`:w.wrap!==!1&&B.length+F.length>1&&(M.result=`(?:${M.result})`),u.cache[P]=M,M.result},"toRegexRange");function n(v,E,b){let w=s(v,E,"-",!1,b)||[],_=s(E,v,"",!1,b)||[],O=s(v,E,"-?",!0,b)||[];return w.concat(O).concat(_).join("|")}se(n,"collatePatterns");function l(v,E){let b=1,w=1,_=p(v,b),O=new Set([E]);for(;v<=_&&_<=E;)O.add(_),b+=1,_=p(v,b);for(_=d(E+1,w)-1;v<_&&_<=E;)O.add(_),w+=1,_=d(E+1,w)-1;return O=[...O],O.sort(a),O}se(l,"splitToRanges");function c(v,E,b){if(v===E)return{pattern:v,count:[],digits:0};let w=o(v,E),_=w.length,O="",A=0;for(let I=0;I<_;I++){let[P,L]=w[I];P===L?O+=P:P!=="0"||L!=="9"?O+=g(P,L,b):A++}return A&&(O+=b.shorthand===!0?"\\d":"[0-9]"),{pattern:O,count:[A],digits:_}}se(c,"rangeToPattern");function r(v,E,b,w){let _=l(v,E),O=[],A=v,I;for(let P=0;P<_.length;P++){let L=_[P],j=c(String(A),String(L),w),N="";if(!b.isPadded&&I&&I.pattern===j.pattern){I.count.length>1&&I.count.pop(),I.count.push(j.count[0]),I.string=I.pattern+m(I.count),A=L+1;continue}b.isPadded&&(N=y(L,b,w)),j.string=N+j.pattern+m(j.count),O.push(j),A=L+1,I=j}return O}se(r,"splitToPatterns");function s(v,E,b,w,_){let O=[];for(let A of v){let{string:I}=A;!w&&!h(E,"string",I)&&O.push(b+I),w&&h(E,"string",I)&&O.push(b+I)}return O}se(s,"filterPatterns");function o(v,E){let b=[];for(let w=0;w<v.length;w++)b.push([v[w],E[w]]);return b}se(o,"zip");function a(v,E){return v>E?1:E>v?-1:0}se(a,"compare");function h(v,E,b){return v.some(w=>w[E]===b)}se(h,"contains");function p(v,E){return Number(String(v).slice(0,-E)+"9".repeat(E))}se(p,"countNines");function d(v,E){return v-v%Math.pow(10,E)}se(d,"countZeros");function m(v){let[E=0,b=""]=v;return b||E>1?`{${E+(b?","+b:"")}}`:""}se(m,"toQuantifier");function g(v,E,b){return`[${v}${E-v===1?"":"-"}${E}]`}se(g,"toCharacterClass");function f(v){return/^-?(0+)\d/.test(v)}se(f,"hasPadding");function y(v,E,b){if(!E.isPadded)return v;let w=Math.abs(E.maxLen-String(v).length),_=b.relaxZeros!==!1;switch(w){case 0:return"";case 1:return _?"0?":"0";case 2:return _?"0{0,2}":"00";default:return _?`0{0,${w}}`:`0{${w}}`}}se(y,"padZeros"),u.cache={},u.clearCache=()=>u.cache={},t.exports=u}),ed=Se((e,t)=>{"use strict";var i=require("util"),u=lI(),n=se(w=>w!==null&&typeof w=="object"&&!Array.isArray(w),"isObject"),l=se(w=>_=>w===!0?Number(_):String(_),"transform"),c=se(w=>typeof w=="number"||typeof w=="string"&&w!=="","isValidValue"),r=se(w=>Number.isInteger(+w),"isNumber"),s=se(w=>{let _=`${w}`,O=-1;if(_[0]==="-"&&(_=_.slice(1)),_==="0")return!1;for(;_[++O]==="0";);return O>0},"zeros"),o=se((w,_,O)=>typeof w=="string"||typeof _=="string"?!0:O.stringify===!0,"stringify"),a=se((w,_,O)=>{if(_>0){let A=w[0]==="-"?"-":"";A&&(w=w.slice(1)),w=A+w.padStart(A?_-1:_,"0")}return O===!1?String(w):w},"pad"),h=se((w,_)=>{let O=w[0]==="-"?"-":"";for(O&&(w=w.slice(1),_--);w.length<_;)w="0"+w;return O?"-"+w:w},"toMaxLen"),p=se((w,_,O)=>{w.negatives.sort((j,N)=>j<N?-1:j>N?1:0),w.positives.sort((j,N)=>j<N?-1:j>N?1:0);let A=_.capture?"":"?:",I="",P="",L;return w.positives.length&&(I=w.positives.map(j=>h(String(j),O)).join("|")),w.negatives.length&&(P=`-(${A}${w.negatives.map(j=>h(String(j),O)).join("|")})`),I&&P?L=`${I}|${P}`:L=I||P,_.wrap?`(${A}${L})`:L},"toSequence"),d=se((w,_,O,A)=>{if(O)return u(w,_,{wrap:!1,...A});let I=String.fromCharCode(w);if(w===_)return I;let P=String.fromCharCode(_);return`[${I}-${P}]`},"toRange"),m=se((w,_,O)=>{if(Array.isArray(w)){let A=O.wrap===!0,I=O.capture?"":"?:";return A?`(${I}${w.join("|")})`:w.join("|")}return u(w,_,O)},"toRegex"),g=se((...w)=>new RangeError("Invalid range arguments: "+i.inspect(...w)),"rangeError"),f=se((w,_,O)=>{if(O.strictRanges===!0)throw g([w,_]);return[]},"invalidRange"),y=se((w,_)=>{if(_.strictRanges===!0)throw new TypeError(`Expected step "${w}" to be a number`);return[]},"invalidStep"),v=se((w,_,O=1,A={})=>{let I=Number(w),P=Number(_);if(!Number.isInteger(I)||!Number.isInteger(P)){if(A.strictRanges===!0)throw g([w,_]);return[]}I===0&&(I=0),P===0&&(P=0);let L=I>P,j=String(w),N=String(_),M=String(O);O=Math.max(Math.abs(O),1);let B=s(j)||s(N)||s(M),F=B?Math.max(j.length,N.length,M.length):0,D=B===!1&&o(w,_,A)===!1,H=A.transform||l(D);if(A.toRegex&&O===1)return d(h(w,F),h(_,F),!0,A);let G={negatives:[],positives:[]},x=se(C=>G[C<0?"negatives":"positives"].push(Math.abs(C)),"push"),k=[],T=0;for(;L?I>=P:I<=P;)A.toRegex===!0&&O>1?x(I):k.push(a(H(I,T),F,D)),I=L?I-O:I+O,T++;return A.toRegex===!0?O>1?p(G,A,F):m(k,null,{wrap:!1,...A}):k},"fillNumbers"),E=se((w,_,O=1,A={})=>{if(!r(w)&&w.length>1||!r(_)&&_.length>1)return f(w,_,A);let I=A.transform||(D=>String.fromCharCode(D)),P=`${w}`.charCodeAt(0),L=`${_}`.charCodeAt(0),j=P>L,N=Math.min(P,L),M=Math.max(P,L);if(A.toRegex&&O===1)return d(N,M,!1,A);let B=[],F=0;for(;j?P>=L:P<=L;)B.push(I(P,F)),P=j?P-O:P+O,F++;return A.toRegex===!0?m(B,null,{wrap:!1,options:A}):B},"fillLetters"),b=se((w,_,O,A={})=>{if(_==null&&c(w))return[w];if(!c(w)||!c(_))return f(w,_,A);if(typeof O=="function")return b(w,_,1,{transform:O});if(n(O))return b(w,_,0,O);let I={...A};return I.capture===!0&&(I.wrap=!0),O=O||I.step||1,r(O)?r(w)&&r(_)?v(w,_,O,I):E(w,_,Math.max(Math.abs(O),1),I):O!=null&&!n(O)?y(O,I):b(w,_,1,O)},"fill");t.exports=b}),cI=Se((e,t)=>{"use strict";var i=ed(),u=Da(),n=se((l,c={})=>{let r=se((s,o={})=>{let a=u.isInvalidBrace(o),h=s.invalid===!0&&c.escapeInvalid===!0,p=a===!0||h===!0,d=c.escapeInvalid===!0?"\\":"",m="";if(s.isOpen===!0||s.isClose===!0)return d+s.value;if(s.type==="open")return p?d+s.value:"(";if(s.type==="close")return p?d+s.value:")";if(s.type==="comma")return s.prev.type==="comma"?"":p?s.value:"|";if(s.value)return s.value;if(s.nodes&&s.ranges>0){let g=u.reduce(s.nodes),f=i(...g,{...c,wrap:!1,toRegex:!0,strictZeros:!0});if(f.length!==0)return g.length>1&&f.length>1?`(${f})`:f}if(s.nodes)for(let g of s.nodes)m+=r(g,s);return m},"walk");return r(l)},"compile");t.exports=n}),uI=Se((e,t)=>{"use strict";var i=ed(),u=$a(),n=Da(),l=se((r="",s="",o=!1)=>{let a=[];if(r=[].concat(r),s=[].concat(s),!s.length)return r;if(!r.length)return o?n.flatten(s).map(h=>`{${h}}`):s;for(let h of r)if(Array.isArray(h))for(let p of h)a.push(l(p,s,o));else for(let p of s)o===!0&&typeof p=="string"&&(p=`{${p}}`),a.push(Array.isArray(p)?l(h,p,o):h+p);return n.flatten(a)},"append"),c=se((r,s={})=>{let o=s.rangeLimit===void 0?1e3:s.rangeLimit,a=se((h,p={})=>{h.queue=[];let d=p,m=p.queue;for(;d.type!=="brace"&&d.type!=="root"&&d.parent;)d=d.parent,m=d.queue;if(h.invalid||h.dollar){m.push(l(m.pop(),u(h,s)));return}if(h.type==="brace"&&h.invalid!==!0&&h.nodes.length===2){m.push(l(m.pop(),["{}"]));return}if(h.nodes&&h.ranges>0){let v=n.reduce(h.nodes);if(n.exceedsLimit(...v,s.step,o))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let E=i(...v,s);E.length===0&&(E=u(h,s)),m.push(l(m.pop(),E)),h.nodes=[];return}let g=n.encloseBrace(h),f=h.queue,y=h;for(;y.type!=="brace"&&y.type!=="root"&&y.parent;)y=y.parent,f=y.queue;for(let v=0;v<h.nodes.length;v++){let E=h.nodes[v];if(E.type==="comma"&&h.type==="brace"){v===1&&f.push(""),f.push("");continue}if(E.type==="close"){m.push(l(m.pop(),f,g));continue}if(E.value&&E.type!=="open"){f.push(l(f.pop(),E.value));continue}E.nodes&&a(E,h)}return f},"walk");return n.flatten(a(r))},"expand");t.exports=c}),hI=Se((e,t)=>{"use strict";t.exports={MAX_LENGTH:1e4,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
7
- `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}}),pI=Se((e,t)=>{"use strict";var i=$a(),{MAX_LENGTH:u,CHAR_BACKSLASH:n,CHAR_BACKTICK:l,CHAR_COMMA:c,CHAR_DOT:r,CHAR_LEFT_PARENTHESES:s,CHAR_RIGHT_PARENTHESES:o,CHAR_LEFT_CURLY_BRACE:a,CHAR_RIGHT_CURLY_BRACE:h,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:m,CHAR_SINGLE_QUOTE:g,CHAR_NO_BREAK_SPACE:f,CHAR_ZERO_WIDTH_NOBREAK_SPACE:y}=hI(),v=se((E,b={})=>{if(typeof E!="string")throw new TypeError("Expected a string");let w=b||{},_=typeof w.maxLength=="number"?Math.min(u,w.maxLength):u;if(E.length>_)throw new SyntaxError(`Input length (${E.length}), exceeds max characters (${_})`);let O={type:"root",input:E,nodes:[]},A=[O],I=O,P=O,L=0,j=E.length,N=0,M=0,B,F=se(()=>E[N++],"advance"),D=se(H=>{if(H.type==="text"&&P.type==="dot"&&(P.type="text"),P&&P.type==="text"&&H.type==="text"){P.value+=H.value;return}return I.nodes.push(H),H.parent=I,H.prev=P,P=H,H},"push");for(D({type:"bos"});N<j;)if(I=A[A.length-1],B=F(),!(B===y||B===f)){if(B===n){D({type:"text",value:(b.keepEscaping?B:"")+F()});continue}if(B===d){D({type:"text",value:"\\"+B});continue}if(B===p){L++;let H;for(;N<j&&(H=F());){if(B+=H,H===p){L++;continue}if(H===n){B+=F();continue}if(H===d&&(L--,L===0))break}D({type:"text",value:B});continue}if(B===s){I=D({type:"paren",nodes:[]}),A.push(I),D({type:"text",value:B});continue}if(B===o){if(I.type!=="paren"){D({type:"text",value:B});continue}I=A.pop(),D({type:"text",value:B}),I=A[A.length-1];continue}if(B===m||B===g||B===l){let H=B,G;for(b.keepQuotes!==!0&&(B="");N<j&&(G=F());){if(G===n){B+=G+F();continue}if(G===H){b.keepQuotes===!0&&(B+=G);break}B+=G}D({type:"text",value:B});continue}if(B===a){M++;let H={type:"brace",open:!0,close:!1,dollar:P.value&&P.value.slice(-1)==="$"||I.dollar===!0,depth:M,commas:0,ranges:0,nodes:[]};I=D(H),A.push(I),D({type:"open",value:B});continue}if(B===h){if(I.type!=="brace"){D({type:"text",value:B});continue}let H="close";I=A.pop(),I.close=!0,D({type:H,value:B}),M--,I=A[A.length-1];continue}if(B===c&&M>0){if(I.ranges>0){I.ranges=0;let H=I.nodes.shift();I.nodes=[H,{type:"text",value:i(I)}]}D({type:"comma",value:B}),I.commas++;continue}if(B===r&&M>0&&I.commas===0){let H=I.nodes;if(M===0||H.length===0){D({type:"text",value:B});continue}if(P.type==="dot"){if(I.range=[],P.value+=B,P.type="range",I.nodes.length!==3&&I.nodes.length!==5){I.invalid=!0,I.ranges=0,P.type="text";continue}I.ranges++,I.args=[];continue}if(P.type==="range"){H.pop();let G=H[H.length-1];G.value+=P.value+B,P=G,I.ranges--;continue}D({type:"dot",value:B});continue}D({type:"text",value:B})}do if(I=A.pop(),I.type!=="root"){I.nodes.forEach(x=>{x.nodes||(x.type==="open"&&(x.isOpen=!0),x.type==="close"&&(x.isClose=!0),x.nodes||(x.type="text"),x.invalid=!0)});let H=A[A.length-1],G=H.nodes.indexOf(I);H.nodes.splice(G,1,...I.nodes)}while(A.length>0);return D({type:"eos"}),O},"parse");t.exports=v}),dI=Se((e,t)=>{"use strict";var i=$a(),u=cI(),n=uI(),l=pI(),c=se((r,s={})=>{let o=[];if(Array.isArray(r))for(let a of r){let h=c.create(a,s);Array.isArray(h)?o.push(...h):o.push(h)}else o=[].concat(c.create(r,s));return s&&s.expand===!0&&s.nodupes===!0&&(o=[...new Set(o)]),o},"braces");c.parse=(r,s={})=>l(r,s),c.stringify=(r,s={})=>i(typeof r=="string"?c.parse(r,s):r,s),c.compile=(r,s={})=>(typeof r=="string"&&(r=c.parse(r,s)),u(r,s)),c.expand=(r,s={})=>{typeof r=="string"&&(r=c.parse(r,s));let o=n(r,s);return s.noempty===!0&&(o=o.filter(Boolean)),s.nodupes===!0&&(o=[...new Set(o)]),o},c.create=(r,s={})=>r===""||r.length<3?[r]:s.expand!==!0?c.compile(r,s):c.expand(r,s),t.exports=c}),Ni=Se((e,t)=>{"use strict";var i=require("path"),u="\\\\/",n=`[^${u}]`,l="\\.",c="\\+",r="\\?",s="\\/",o="(?=.)",a="[^/]",h=`(?:${s}|$)`,p=`(?:^|${s})`,d=`${l}{1,2}${h}`,m=`(?!${l})`,g=`(?!${p}${d})`,f=`(?!${l}{0,1}${h})`,y=`(?!${d})`,v=`[^.${s}]`,E=`${a}*?`,b={DOT_LITERAL:l,PLUS_LITERAL:c,QMARK_LITERAL:r,SLASH_LITERAL:s,ONE_CHAR:o,QMARK:a,END_ANCHOR:h,DOTS_SLASH:d,NO_DOT:m,NO_DOTS:g,NO_DOT_SLASH:f,NO_DOTS_SLASH:y,QMARK_NO_DOT:v,STAR:E,START_ANCHOR:p},w={...b,SLASH_LITERAL:`[${u}]`,QMARK:n,STAR:`${n}*?`,DOTS_SLASH:`${l}{1,2}(?:[${u}]|$)`,NO_DOT:`(?!${l})`,NO_DOTS:`(?!(?:^|[${u}])${l}{1,2}(?:[${u}]|$))`,NO_DOT_SLASH:`(?!${l}{0,1}(?:[${u}]|$))`,NO_DOTS_SLASH:`(?!${l}{1,2}(?:[${u}]|$))`,QMARK_NO_DOT:`[^.${u}]`,START_ANCHOR:`(?:^|[${u}])`,END_ANCHOR:`(?:[${u}]|$)`},_={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"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:_,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,SEP:i.sep,extglobChars(O){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${O.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(O){return O===!0?w:b}}}),ki=Se(e=>{"use strict";var t=require("path"),i=process.platform==="win32",{REGEX_BACKSLASH:u,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:l,REGEX_SPECIAL_CHARS_GLOBAL:c}=Ni();e.isObject=r=>r!==null&&typeof r=="object"&&!Array.isArray(r),e.hasRegexChars=r=>l.test(r),e.isRegexChar=r=>r.length===1&&e.hasRegexChars(r),e.escapeRegex=r=>r.replace(c,"\\$1"),e.toPosixSlashes=r=>r.replace(u,"/"),e.removeBackslashes=r=>r.replace(n,s=>s==="\\"?"":s),e.supportsLookbehinds=()=>{let r=process.version.slice(1).split(".").map(Number);return r.length===3&&r[0]>=9||r[0]===8&&r[1]>=10},e.isWindows=r=>r&&typeof r.windows=="boolean"?r.windows:i===!0||t.sep==="\\",e.escapeLast=(r,s,o)=>{let a=r.lastIndexOf(s,o);return a===-1?r:r[a-1]==="\\"?e.escapeLast(r,s,a-1):`${r.slice(0,a)}\\${r.slice(a)}`},e.removePrefix=(r,s={})=>{let o=r;return o.startsWith("./")&&(o=o.slice(2),s.prefix="./"),o},e.wrapOutput=(r,s={},o={})=>{let a=o.contains?"":"^",h=o.contains?"":"$",p=`${a}(?:${r})${h}`;return s.negated===!0&&(p=`(?:^(?!${p}).*$)`),p}}),fI=Se((e,t)=>{"use strict";var i=ki(),{CHAR_ASTERISK:u,CHAR_AT:n,CHAR_BACKWARD_SLASH:l,CHAR_COMMA:c,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:s,CHAR_FORWARD_SLASH:o,CHAR_LEFT_CURLY_BRACE:a,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:p,CHAR_PLUS:d,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:g,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:y}=Ni(),v=se(w=>w===o||w===l,"isPathSeparator"),E=se(w=>{w.isPrefix!==!0&&(w.depth=w.isGlobstar?1/0:1)},"depth"),b=se((w,_)=>{let O=_||{},A=w.length-1,I=O.parts===!0||O.scanToEnd===!0,P=[],L=[],j=[],N=w,M=-1,B=0,F=0,D=!1,H=!1,G=!1,x=!1,k=!1,T=!1,C=!1,q=!1,X=!1,Y=!1,$=0,V,z,U={value:"",depth:0,isGlob:!1},K=se(()=>M>=A,"eos"),Z=se(()=>N.charCodeAt(M+1),"peek"),Q=se(()=>(V=z,N.charCodeAt(++M)),"advance");for(;M<A;){z=Q();let te;if(z===l){C=U.backslashes=!0,z=Q(),z===a&&(T=!0);continue}if(T===!0||z===a){for($++;K()!==!0&&(z=Q());){if(z===l){C=U.backslashes=!0,Q();continue}if(z===a){$++;continue}if(T!==!0&&z===r&&(z=Q())===r){if(D=U.isBrace=!0,G=U.isGlob=!0,Y=!0,I===!0)continue;break}if(T!==!0&&z===c){if(D=U.isBrace=!0,G=U.isGlob=!0,Y=!0,I===!0)continue;break}if(z===g&&($--,$===0)){T=!1,D=U.isBrace=!0,Y=!0;break}}if(I===!0)continue;break}if(z===o){if(P.push(M),L.push(U),U={value:"",depth:0,isGlob:!1},Y===!0)continue;if(V===r&&M===B+1){B+=2;continue}F=M+1;continue}if(O.noext!==!0&&(z===d||z===n||z===u||z===m||z===s)&&Z()===h){if(G=U.isGlob=!0,x=U.isExtglob=!0,Y=!0,z===s&&M===B&&(X=!0),I===!0){for(;K()!==!0&&(z=Q());){if(z===l){C=U.backslashes=!0,z=Q();continue}if(z===f){G=U.isGlob=!0,Y=!0;break}}continue}break}if(z===u){if(V===u&&(k=U.isGlobstar=!0),G=U.isGlob=!0,Y=!0,I===!0)continue;break}if(z===m){if(G=U.isGlob=!0,Y=!0,I===!0)continue;break}if(z===p){for(;K()!==!0&&(te=Q());){if(te===l){C=U.backslashes=!0,Q();continue}if(te===y){H=U.isBracket=!0,G=U.isGlob=!0,Y=!0;break}}if(I===!0)continue;break}if(O.nonegate!==!0&&z===s&&M===B){q=U.negated=!0,B++;continue}if(O.noparen!==!0&&z===h){if(G=U.isGlob=!0,I===!0){for(;K()!==!0&&(z=Q());){if(z===h){C=U.backslashes=!0,z=Q();continue}if(z===f){Y=!0;break}}continue}break}if(G===!0){if(Y=!0,I===!0)continue;break}}O.noext===!0&&(x=!1,G=!1);let R=N,W="",ee="";B>0&&(W=N.slice(0,B),N=N.slice(B),F-=B),R&&G===!0&&F>0?(R=N.slice(0,F),ee=N.slice(F)):G===!0?(R="",ee=N):R=N,R&&R!==""&&R!=="/"&&R!==N&&v(R.charCodeAt(R.length-1))&&(R=R.slice(0,-1)),O.unescape===!0&&(ee&&(ee=i.removeBackslashes(ee)),R&&C===!0&&(R=i.removeBackslashes(R)));let ne={prefix:W,input:w,start:B,base:R,glob:ee,isBrace:D,isBracket:H,isGlob:G,isExtglob:x,isGlobstar:k,negated:q,negatedExtglob:X};if(O.tokens===!0&&(ne.maxDepth=0,v(z)||L.push(U),ne.tokens=L),O.parts===!0||O.tokens===!0){let te;for(let le=0;le<P.length;le++){let pe=te?te+1:B,re=P[le],he=w.slice(pe,re);O.tokens&&(le===0&&B!==0?(L[le].isPrefix=!0,L[le].value=W):L[le].value=he,E(L[le]),ne.maxDepth+=L[le].depth),(le!==0||he!=="")&&j.push(he),te=re}if(te&&te+1<w.length){let le=w.slice(te+1);j.push(le),O.tokens&&(L[L.length-1].value=le,E(L[L.length-1]),ne.maxDepth+=L[L.length-1].depth)}ne.slashes=P,ne.parts=j}return ne},"scan");t.exports=b}),gI=Se((e,t)=>{"use strict";var i=Ni(),u=ki(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:l,REGEX_NON_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:s}=i,o=se((p,d)=>{if(typeof d.expandRange=="function")return d.expandRange(...p,d);p.sort();let m=`[${p.join("-")}]`;try{new RegExp(m)}catch{return p.map(g=>u.escapeRegex(g)).join("..")}return m},"expandRange"),a=se((p,d)=>`Missing ${p}: "${d}" - use "\\\\${d}" to match literal characters`,"syntaxError"),h=se((p,d)=>{if(typeof p!="string")throw new TypeError("Expected a string");p=s[p]||p;let m={...d},g=typeof m.maxLength=="number"?Math.min(n,m.maxLength):n,f=p.length;if(f>g)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${g}`);let y={type:"bos",value:"",output:m.prepend||""},v=[y],E=m.capture?"":"?:",b=u.isWindows(d),w=i.globChars(b),_=i.extglobChars(w),{DOT_LITERAL:O,PLUS_LITERAL:A,SLASH_LITERAL:I,ONE_CHAR:P,DOTS_SLASH:L,NO_DOT:j,NO_DOT_SLASH:N,NO_DOTS_SLASH:M,QMARK:B,QMARK_NO_DOT:F,STAR:D,START_ANCHOR:H}=w,G=se(re=>`(${E}(?:(?!${H}${re.dot?L:O}).)*?)`,"globstar"),x=m.dot?"":j,k=m.dot?B:F,T=m.bash===!0?G(m):D;m.capture&&(T=`(${T})`),typeof m.noext=="boolean"&&(m.noextglob=m.noext);let C={input:p,index:-1,start:0,dot:m.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:v};p=u.removePrefix(p,C),f=p.length;let q=[],X=[],Y=[],$=y,V,z=se(()=>C.index===f-1,"eos"),U=C.peek=(re=1)=>p[C.index+re],K=C.advance=()=>p[++C.index]||"",Z=se(()=>p.slice(C.index+1),"remaining"),Q=se((re="",he=0)=>{C.consumed+=re,C.index+=he},"consume"),R=se(re=>{C.output+=re.output!=null?re.output:re.value,Q(re.value)},"append"),W=se(()=>{let re=1;for(;U()==="!"&&(U(2)!=="("||U(3)==="?");)K(),C.start++,re++;return re%2===0?!1:(C.negated=!0,C.start++,!0)},"negate"),ee=se(re=>{C[re]++,Y.push(re)},"increment"),ne=se(re=>{C[re]--,Y.pop()},"decrement"),te=se(re=>{if($.type==="globstar"){let he=C.braces>0&&(re.type==="comma"||re.type==="brace"),ie=re.extglob===!0||q.length&&(re.type==="pipe"||re.type==="paren");re.type!=="slash"&&re.type!=="paren"&&!he&&!ie&&(C.output=C.output.slice(0,-$.output.length),$.type="star",$.value="*",$.output=T,C.output+=$.output)}if(q.length&&re.type!=="paren"&&(q[q.length-1].inner+=re.value),(re.value||re.output)&&R(re),$&&$.type==="text"&&re.type==="text"){$.value+=re.value,$.output=($.output||"")+re.value;return}re.prev=$,v.push(re),$=re},"push"),le=se((re,he)=>{let ie={..._[he],conditions:1,inner:""};ie.prev=$,ie.parens=C.parens,ie.output=C.output;let ce=(m.capture?"(":"")+ie.open;ee("parens"),te({type:re,value:he,output:C.output?"":P}),te({type:"paren",extglob:!0,value:K(),output:ce}),q.push(ie)},"extglobOpen"),pe=se(re=>{let he=re.close+(m.capture?")":""),ie;if(re.type==="negate"){let ce=T;if(re.inner&&re.inner.length>1&&re.inner.includes("/")&&(ce=G(m)),(ce!==T||z()||/^\)+$/.test(Z()))&&(he=re.close=`)$))${ce}`),re.inner.includes("*")&&(ie=Z())&&/^\.[^\\/.]+$/.test(ie)){let ge=h(ie,{...d,fastpaths:!1}).output;he=re.close=`)${ge})${ce})`}re.prev.type==="bos"&&(C.negatedExtglob=!0)}te({type:"paren",extglob:!0,value:V,output:he}),ne("parens")},"extglobClose");if(m.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(p)){let re=!1,he=p.replace(r,(ie,ce,ge,ye,ue,de)=>ye==="\\"?(re=!0,ie):ye==="?"?ce?ce+ye+(ue?B.repeat(ue.length):""):de===0?k+(ue?B.repeat(ue.length):""):B.repeat(ge.length):ye==="."?O.repeat(ge.length):ye==="*"?ce?ce+ye+(ue?T:""):T:ce?ie:`\\${ie}`);return re===!0&&(m.unescape===!0?he=he.replace(/\\/g,""):he=he.replace(/\\+/g,ie=>ie.length%2===0?"\\\\":ie?"\\":"")),he===p&&m.contains===!0?(C.output=p,C):(C.output=u.wrapOutput(he,C,d),C)}for(;!z();){if(V=K(),V==="\0")continue;if(V==="\\"){let ie=U();if(ie==="/"&&m.bash!==!0||ie==="."||ie===";")continue;if(!ie){V+="\\",te({type:"text",value:V});continue}let ce=/^\\+/.exec(Z()),ge=0;if(ce&&ce[0].length>2&&(ge=ce[0].length,C.index+=ge,ge%2!==0&&(V+="\\")),m.unescape===!0?V=K():V+=K(),C.brackets===0){te({type:"text",value:V});continue}}if(C.brackets>0&&(V!=="]"||$.value==="["||$.value==="[^")){if(m.posix!==!1&&V===":"){let ie=$.value.slice(1);if(ie.includes("[")&&($.posix=!0,ie.includes(":"))){let ce=$.value.lastIndexOf("["),ge=$.value.slice(0,ce),ye=$.value.slice(ce+2),ue=l[ye];if(ue){$.value=ge+ue,C.backtrack=!0,K(),!y.output&&v.indexOf($)===1&&(y.output=P);continue}}}(V==="["&&U()!==":"||V==="-"&&U()==="]")&&(V=`\\${V}`),V==="]"&&($.value==="["||$.value==="[^")&&(V=`\\${V}`),m.posix===!0&&V==="!"&&$.value==="["&&(V="^"),$.value+=V,R({value:V});continue}if(C.quotes===1&&V!=='"'){V=u.escapeRegex(V),$.value+=V,R({value:V});continue}if(V==='"'){C.quotes=C.quotes===1?0:1,m.keepQuotes===!0&&te({type:"text",value:V});continue}if(V==="("){ee("parens"),te({type:"paren",value:V});continue}if(V===")"){if(C.parens===0&&m.strictBrackets===!0)throw new SyntaxError(a("opening","("));let ie=q[q.length-1];if(ie&&C.parens===ie.parens+1){pe(q.pop());continue}te({type:"paren",value:V,output:C.parens?")":"\\)"}),ne("parens");continue}if(V==="["){if(m.nobracket===!0||!Z().includes("]")){if(m.nobracket!==!0&&m.strictBrackets===!0)throw new SyntaxError(a("closing","]"));V=`\\${V}`}else ee("brackets");te({type:"bracket",value:V});continue}if(V==="]"){if(m.nobracket===!0||$&&$.type==="bracket"&&$.value.length===1){te({type:"text",value:V,output:`\\${V}`});continue}if(C.brackets===0){if(m.strictBrackets===!0)throw new SyntaxError(a("opening","["));te({type:"text",value:V,output:`\\${V}`});continue}ne("brackets");let ie=$.value.slice(1);if($.posix!==!0&&ie[0]==="^"&&!ie.includes("/")&&(V=`/${V}`),$.value+=V,R({value:V}),m.literalBrackets===!1||u.hasRegexChars(ie))continue;let ce=u.escapeRegex($.value);if(C.output=C.output.slice(0,-$.value.length),m.literalBrackets===!0){C.output+=ce,$.value=ce;continue}$.value=`(${E}${ce}|${$.value})`,C.output+=$.value;continue}if(V==="{"&&m.nobrace!==!0){ee("braces");let ie={type:"brace",value:V,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};X.push(ie),te(ie);continue}if(V==="}"){let ie=X[X.length-1];if(m.nobrace===!0||!ie){te({type:"text",value:V,output:V});continue}let ce=")";if(ie.dots===!0){let ge=v.slice(),ye=[];for(let ue=ge.length-1;ue>=0&&(v.pop(),ge[ue].type!=="brace");ue--)ge[ue].type!=="dots"&&ye.unshift(ge[ue].value);ce=o(ye,m),C.backtrack=!0}if(ie.comma!==!0&&ie.dots!==!0){let ge=C.output.slice(0,ie.outputIndex),ye=C.tokens.slice(ie.tokensIndex);ie.value=ie.output="\\{",V=ce="\\}",C.output=ge;for(let ue of ye)C.output+=ue.output||ue.value}te({type:"brace",value:V,output:ce}),ne("braces"),X.pop();continue}if(V==="|"){q.length>0&&q[q.length-1].conditions++,te({type:"text",value:V});continue}if(V===","){let ie=V,ce=X[X.length-1];ce&&Y[Y.length-1]==="braces"&&(ce.comma=!0,ie="|"),te({type:"comma",value:V,output:ie});continue}if(V==="/"){if($.type==="dot"&&C.index===C.start+1){C.start=C.index+1,C.consumed="",C.output="",v.pop(),$=y;continue}te({type:"slash",value:V,output:I});continue}if(V==="."){if(C.braces>0&&$.type==="dot"){$.value==="."&&($.output=O);let ie=X[X.length-1];$.type="dots",$.output+=V,$.value+=V,ie.dots=!0;continue}if(C.braces+C.parens===0&&$.type!=="bos"&&$.type!=="slash"){te({type:"text",value:V,output:O});continue}te({type:"dot",value:V,output:O});continue}if(V==="?"){if(!($&&$.value==="(")&&m.noextglob!==!0&&U()==="("&&U(2)!=="?"){le("qmark",V);continue}if($&&$.type==="paren"){let ie=U(),ce=V;if(ie==="<"&&!u.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");($.value==="("&&!/[!=<:]/.test(ie)||ie==="<"&&!/<([!=]|\w+>)/.test(Z()))&&(ce=`\\${V}`),te({type:"text",value:V,output:ce});continue}if(m.dot!==!0&&($.type==="slash"||$.type==="bos")){te({type:"qmark",value:V,output:F});continue}te({type:"qmark",value:V,output:B});continue}if(V==="!"){if(m.noextglob!==!0&&U()==="("&&(U(2)!=="?"||!/[!=<:]/.test(U(3)))){le("negate",V);continue}if(m.nonegate!==!0&&C.index===0){W();continue}}if(V==="+"){if(m.noextglob!==!0&&U()==="("&&U(2)!=="?"){le("plus",V);continue}if($&&$.value==="("||m.regex===!1){te({type:"plus",value:V,output:A});continue}if($&&($.type==="bracket"||$.type==="paren"||$.type==="brace")||C.parens>0){te({type:"plus",value:V});continue}te({type:"plus",value:A});continue}if(V==="@"){if(m.noextglob!==!0&&U()==="("&&U(2)!=="?"){te({type:"at",extglob:!0,value:V,output:""});continue}te({type:"text",value:V});continue}if(V!=="*"){(V==="$"||V==="^")&&(V=`\\${V}`);let ie=c.exec(Z());ie&&(V+=ie[0],C.index+=ie[0].length),te({type:"text",value:V});continue}if($&&($.type==="globstar"||$.star===!0)){$.type="star",$.star=!0,$.value+=V,$.output=T,C.backtrack=!0,C.globstar=!0,Q(V);continue}let re=Z();if(m.noextglob!==!0&&/^\([^?]/.test(re)){le("star",V);continue}if($.type==="star"){if(m.noglobstar===!0){Q(V);continue}let ie=$.prev,ce=ie.prev,ge=ie.type==="slash"||ie.type==="bos",ye=ce&&(ce.type==="star"||ce.type==="globstar");if(m.bash===!0&&(!ge||re[0]&&re[0]!=="/")){te({type:"star",value:V,output:""});continue}let ue=C.braces>0&&(ie.type==="comma"||ie.type==="brace"),de=q.length&&(ie.type==="pipe"||ie.type==="paren");if(!ge&&ie.type!=="paren"&&!ue&&!de){te({type:"star",value:V,output:""});continue}for(;re.slice(0,3)==="/**";){let fe=p[C.index+4];if(fe&&fe!=="/")break;re=re.slice(3),Q("/**",3)}if(ie.type==="bos"&&z()){$.type="globstar",$.value+=V,$.output=G(m),C.output=$.output,C.globstar=!0,Q(V);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&!ye&&z()){C.output=C.output.slice(0,-(ie.output+$.output).length),ie.output=`(?:${ie.output}`,$.type="globstar",$.output=G(m)+(m.strictSlashes?")":"|$)"),$.value+=V,C.globstar=!0,C.output+=ie.output+$.output,Q(V);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&re[0]==="/"){let fe=re[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(ie.output+$.output).length),ie.output=`(?:${ie.output}`,$.type="globstar",$.output=`${G(m)}${I}|${I}${fe})`,$.value+=V,C.output+=ie.output+$.output,C.globstar=!0,Q(V+K()),te({type:"slash",value:"/",output:""});continue}if(ie.type==="bos"&&re[0]==="/"){$.type="globstar",$.value+=V,$.output=`(?:^|${I}|${G(m)}${I})`,C.output=$.output,C.globstar=!0,Q(V+K()),te({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-$.output.length),$.type="globstar",$.output=G(m),$.value+=V,C.output+=$.output,C.globstar=!0,Q(V);continue}let he={type:"star",value:V,output:T};if(m.bash===!0){he.output=".*?",($.type==="bos"||$.type==="slash")&&(he.output=x+he.output),te(he);continue}if($&&($.type==="bracket"||$.type==="paren")&&m.regex===!0){he.output=V,te(he);continue}(C.index===C.start||$.type==="slash"||$.type==="dot")&&($.type==="dot"?(C.output+=N,$.output+=N):m.dot===!0?(C.output+=M,$.output+=M):(C.output+=x,$.output+=x),U()!=="*"&&(C.output+=P,$.output+=P)),te(he)}for(;C.brackets>0;){if(m.strictBrackets===!0)throw new SyntaxError(a("closing","]"));C.output=u.escapeLast(C.output,"["),ne("brackets")}for(;C.parens>0;){if(m.strictBrackets===!0)throw new SyntaxError(a("closing",")"));C.output=u.escapeLast(C.output,"("),ne("parens")}for(;C.braces>0;){if(m.strictBrackets===!0)throw new SyntaxError(a("closing","}"));C.output=u.escapeLast(C.output,"{"),ne("braces")}if(m.strictSlashes!==!0&&($.type==="star"||$.type==="bracket")&&te({type:"maybe_slash",value:"",output:`${I}?`}),C.backtrack===!0){C.output="";for(let re of C.tokens)C.output+=re.output!=null?re.output:re.value,re.suffix&&(C.output+=re.suffix)}return C},"parse");h.fastpaths=(p,d)=>{let m={...d},g=typeof m.maxLength=="number"?Math.min(n,m.maxLength):n,f=p.length;if(f>g)throw new SyntaxError(`Input length: ${f}, exceeds maximum allowed length: ${g}`);p=s[p]||p;let y=u.isWindows(d),{DOT_LITERAL:v,SLASH_LITERAL:E,ONE_CHAR:b,DOTS_SLASH:w,NO_DOT:_,NO_DOTS:O,NO_DOTS_SLASH:A,STAR:I,START_ANCHOR:P}=i.globChars(y),L=m.dot?O:_,j=m.dot?A:_,N=m.capture?"":"?:",M={negated:!1,prefix:""},B=m.bash===!0?".*?":I;m.capture&&(B=`(${B})`);let F=se(x=>x.noglobstar===!0?B:`(${N}(?:(?!${P}${x.dot?w:v}).)*?)`,"globstar"),D=se(x=>{switch(x){case"*":return`${L}${b}${B}`;case".*":return`${v}${b}${B}`;case"*.*":return`${L}${B}${v}${b}${B}`;case"*/*":return`${L}${B}${E}${b}${j}${B}`;case"**":return L+F(m);case"**/*":return`(?:${L}${F(m)}${E})?${j}${b}${B}`;case"**/*.*":return`(?:${L}${F(m)}${E})?${j}${B}${v}${b}${B}`;case"**/.*":return`(?:${L}${F(m)}${E})?${v}${b}${B}`;default:{let k=/^(.*?)\.(\w+)$/.exec(x);if(!k)return;let T=D(k[1]);return T?T+v+k[2]:void 0}}},"create"),H=u.removePrefix(p,M),G=D(H);return G&&m.strictSlashes!==!0&&(G+=`${E}?`),G},t.exports=h}),mI=Se((e,t)=>{"use strict";var i=require("path"),u=fI(),n=gI(),l=ki(),c=Ni(),r=se(o=>o&&typeof o=="object"&&!Array.isArray(o),"isObject"),s=se((o,a,h=!1)=>{if(Array.isArray(o)){let E=o.map(b=>s(b,a,h));return se(b=>{for(let w of E){let _=w(b);if(_)return _}return!1},"arrayMatcher")}let p=r(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!p)throw new TypeError("Expected pattern to be a non-empty string");let d=a||{},m=l.isWindows(a),g=p?s.compileRe(o,a):s.makeRe(o,a,!1,!0),f=g.state;delete g.state;let y=se(()=>!1,"isIgnored");if(d.ignore){let E={...a,ignore:null,onMatch:null,onResult:null};y=s(d.ignore,E,h)}let v=se((E,b=!1)=>{let{isMatch:w,match:_,output:O}=s.test(E,g,a,{glob:o,posix:m}),A={glob:o,state:f,regex:g,posix:m,input:E,output:O,match:_,isMatch:w};return typeof d.onResult=="function"&&d.onResult(A),w===!1?(A.isMatch=!1,b?A:!1):y(E)?(typeof d.onIgnore=="function"&&d.onIgnore(A),A.isMatch=!1,b?A:!1):(typeof d.onMatch=="function"&&d.onMatch(A),b?A:!0)},"matcher");return h&&(v.state=f),v},"picomatch");s.test=(o,a,h,{glob:p,posix:d}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};let m=h||{},g=m.format||(d?l.toPosixSlashes:null),f=o===p,y=f&&g?g(o):o;return f===!1&&(y=g?g(o):o,f=y===p),(f===!1||m.capture===!0)&&(m.matchBase===!0||m.basename===!0?f=s.matchBase(o,a,h,d):f=a.exec(y)),{isMatch:!!f,match:f,output:y}},s.matchBase=(o,a,h,p=l.isWindows(h))=>(a instanceof RegExp?a:s.makeRe(a,h)).test(i.basename(o)),s.isMatch=(o,a,h)=>s(a,h)(o),s.parse=(o,a)=>Array.isArray(o)?o.map(h=>s.parse(h,a)):n(o,{...a,fastpaths:!1}),s.scan=(o,a)=>u(o,a),s.compileRe=(o,a,h=!1,p=!1)=>{if(h===!0)return o.output;let d=a||{},m=d.contains?"":"^",g=d.contains?"":"$",f=`${m}(?:${o.output})${g}`;o&&o.negated===!0&&(f=`^(?!${f}).*$`);let y=s.toRegex(f,a);return p===!0&&(y.state=o),y},s.makeRe=(o,a={},h=!1,p=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let d={negated:!1,fastpaths:!0};return a.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(d.output=n.fastpaths(o,a)),d.output||(d=n(o,a)),s.compileRe(d,a,h,p)},s.toRegex=(o,a)=>{try{let h=a||{};return new RegExp(o,h.flags||(h.nocase?"i":""))}catch(h){if(a&&a.debug===!0)throw h;return/$^/}},s.constants=c,t.exports=s}),yI=Se((e,t)=>{"use strict";t.exports=mI()}),vI=Se((e,t)=>{"use strict";var i=require("util"),u=dI(),n=yI(),l=ki(),c=se(o=>o===""||o==="./","isEmptyString"),r=se(o=>{let a=o.indexOf("{");return a>-1&&o.indexOf("}",a)>-1},"hasBraces"),s=se((o,a,h)=>{a=[].concat(a),o=[].concat(o);let p=new Set,d=new Set,m=new Set,g=0,f=se(v=>{m.add(v.output),h&&h.onResult&&h.onResult(v)},"onResult");for(let v=0;v<a.length;v++){let E=n(String(a[v]),{...h,onResult:f},!0),b=E.state.negated||E.state.negatedExtglob;b&&g++;for(let w of o){let _=E(w,!0);(b?!_.isMatch:_.isMatch)&&(b?p.add(_.output):(p.delete(_.output),d.add(_.output)))}}let y=(g===a.length?[...m]:[...d]).filter(v=>!p.has(v));if(h&&y.length===0){if(h.failglob===!0)throw new Error(`No matches found for "${a.join(", ")}"`);if(h.nonull===!0||h.nullglob===!0)return h.unescape?a.map(v=>v.replace(/\\/g,"")):a}return y},"micromatch");s.match=s,s.matcher=(o,a)=>n(o,a),s.isMatch=(o,a,h)=>n(a,h)(o),s.any=s.isMatch,s.not=(o,a,h={})=>{a=[].concat(a).map(String);let p=new Set,d=[],m=se(f=>{h.onResult&&h.onResult(f),d.push(f.output)},"onResult"),g=new Set(s(o,a,{...h,onResult:m}));for(let f of d)g.has(f)||p.add(f);return[...p]},s.contains=(o,a,h)=>{if(typeof o!="string")throw new TypeError(`Expected a string: "${i.inspect(o)}"`);if(Array.isArray(a))return a.some(p=>s.contains(o,p,h));if(typeof a=="string"){if(c(o)||c(a))return!1;if(o.includes(a)||o.startsWith("./")&&o.slice(2).includes(a))return!0}return s.isMatch(o,a,{...h,contains:!0})},s.matchKeys=(o,a,h)=>{if(!l.isObject(o))throw new TypeError("Expected the first argument to be an object");let p=s(Object.keys(o),a,h),d={};for(let m of p)d[m]=o[m];return d},s.some=(o,a,h)=>{let p=[].concat(o);for(let d of[].concat(a)){let m=n(String(d),h);if(p.some(g=>m(g)))return!0}return!1},s.every=(o,a,h)=>{let p=[].concat(o);for(let d of[].concat(a)){let m=n(String(d),h);if(!p.every(g=>m(g)))return!1}return!0},s.all=(o,a,h)=>{if(typeof o!="string")throw new TypeError(`Expected a string: "${i.inspect(o)}"`);return[].concat(a).every(p=>n(p,h)(o))},s.capture=(o,a,h)=>{let p=l.isWindows(h),d=n.makeRe(String(o),{...h,capture:!0}).exec(p?l.toPosixSlashes(a):a);if(d)return d.slice(1).map(m=>m===void 0?"":m)},s.makeRe=(...o)=>n.makeRe(...o),s.scan=(...o)=>n.scan(...o),s.parse=(o,a)=>{let h=[];for(let p of[].concat(o||[]))for(let d of u(String(p),a))h.push(n.parse(d,a));return h},s.braces=(o,a)=>{if(typeof o!="string")throw new TypeError("Expected a string");return a&&a.nobrace===!0||!r(o)?[o]:u(o,a)},s.braceExpand=(o,a)=>{if(typeof o!="string")throw new TypeError("Expected a string");return s.braces(o,{...a,expand:!0})},s.hasBraces=r,t.exports=s}),SI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isAbsolute=e.partitionAbsoluteAndRelative=e.removeDuplicateSlashes=e.matchAny=e.convertPatternsToRe=e.makeRe=e.getPatternParts=e.expandBraceExpansion=e.expandPatternsWithBraceExpansion=e.isAffectDepthOfReadingPattern=e.endsWithSlashGlobStar=e.hasGlobStar=e.getBaseDirectory=e.isPatternRelatedToParentDirectory=e.getPatternsOutsideCurrentDirectory=e.getPatternsInsideCurrentDirectory=e.getPositivePatterns=e.getNegativePatterns=e.isPositivePattern=e.isNegativePattern=e.convertToNegativePattern=e.convertToPositivePattern=e.isDynamicPattern=e.isStaticPattern=void 0;var t=require("path"),i=oI(),u=vI(),n="**",l="\\",c=/[*?]|^!/,r=/\[[^[]*]/,s=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,o=/[!*+?@]\([^(]*\)/,a=/,|\.\./,h=/(?!^)\/{2,}/g;function p(k,T={}){return!d(k,T)}se(p,"isStaticPattern"),e.isStaticPattern=p;function d(k,T={}){return k===""?!1:!!(T.caseSensitiveMatch===!1||k.includes(l)||c.test(k)||r.test(k)||s.test(k)||T.extglob!==!1&&o.test(k)||T.braceExpansion!==!1&&m(k))}se(d,"isDynamicPattern"),e.isDynamicPattern=d;function m(k){let T=k.indexOf("{");if(T===-1)return!1;let C=k.indexOf("}",T+1);if(C===-1)return!1;let q=k.slice(T,C);return a.test(q)}se(m,"hasBraceExpansion");function g(k){return y(k)?k.slice(1):k}se(g,"convertToPositivePattern"),e.convertToPositivePattern=g;function f(k){return"!"+k}se(f,"convertToNegativePattern"),e.convertToNegativePattern=f;function y(k){return k.startsWith("!")&&k[1]!=="("}se(y,"isNegativePattern"),e.isNegativePattern=y;function v(k){return!y(k)}se(v,"isPositivePattern"),e.isPositivePattern=v;function E(k){return k.filter(y)}se(E,"getNegativePatterns"),e.getNegativePatterns=E;function b(k){return k.filter(v)}se(b,"getPositivePatterns"),e.getPositivePatterns=b;function w(k){return k.filter(T=>!O(T))}se(w,"getPatternsInsideCurrentDirectory"),e.getPatternsInsideCurrentDirectory=w;function _(k){return k.filter(O)}se(_,"getPatternsOutsideCurrentDirectory"),e.getPatternsOutsideCurrentDirectory=_;function O(k){return k.startsWith("..")||k.startsWith("./..")}se(O,"isPatternRelatedToParentDirectory"),e.isPatternRelatedToParentDirectory=O;function A(k){return i(k,{flipBackslashes:!1})}se(A,"getBaseDirectory"),e.getBaseDirectory=A;function I(k){return k.includes(n)}se(I,"hasGlobStar"),e.hasGlobStar=I;function P(k){return k.endsWith("/"+n)}se(P,"endsWithSlashGlobStar"),e.endsWithSlashGlobStar=P;function L(k){let T=t.basename(k);return P(k)||p(T)}se(L,"isAffectDepthOfReadingPattern"),e.isAffectDepthOfReadingPattern=L;function j(k){return k.reduce((T,C)=>T.concat(N(C)),[])}se(j,"expandPatternsWithBraceExpansion"),e.expandPatternsWithBraceExpansion=j;function N(k){let T=u.braces(k,{expand:!0,nodupes:!0,keepEscaping:!0});return T.sort((C,q)=>C.length-q.length),T.filter(C=>C!=="")}se(N,"expandBraceExpansion"),e.expandBraceExpansion=N;function M(k,T){let{parts:C}=u.scan(k,Object.assign(Object.assign({},T),{parts:!0}));return C.length===0&&(C=[k]),C[0].startsWith("/")&&(C[0]=C[0].slice(1),C.unshift("")),C}se(M,"getPatternParts"),e.getPatternParts=M;function B(k,T){return u.makeRe(k,T)}se(B,"makeRe"),e.makeRe=B;function F(k,T){return k.map(C=>B(C,T))}se(F,"convertPatternsToRe"),e.convertPatternsToRe=F;function D(k,T){return T.some(C=>C.test(k))}se(D,"matchAny"),e.matchAny=D;function H(k){return k.replace(h,"/")}se(H,"removeDuplicateSlashes"),e.removeDuplicateSlashes=H;function G(k){let T=[],C=[];for(let q of k)x(q)?T.push(q):C.push(q);return[T,C]}se(G,"partitionAbsoluteAndRelative"),e.partitionAbsoluteAndRelative=G;function x(k){return t.isAbsolute(k)}se(x,"isAbsolute"),e.isAbsolute=x}),EI=Se((e,t)=>{"use strict";var i=require("stream"),u=i.PassThrough,n=Array.prototype.slice;t.exports=l;function l(){let r=[],s=n.call(arguments),o=!1,a=s[s.length-1];a&&!Array.isArray(a)&&a.pipe==null?s.pop():a={};let h=a.end!==!1,p=a.pipeError===!0;a.objectMode==null&&(a.objectMode=!0),a.highWaterMark==null&&(a.highWaterMark=64*1024);let d=u(a);function m(){for(let y=0,v=arguments.length;y<v;y++)r.push(c(arguments[y],a));return g(),this}se(m,"addStream");function g(){if(o)return;o=!0;let y=r.shift();if(!y){process.nextTick(f);return}Array.isArray(y)||(y=[y]);let v=y.length+1;function E(){--v>0||(o=!1,g())}se(E,"next");function b(w){function _(){w.removeListener("merge2UnpipeEnd",_),w.removeListener("end",_),p&&w.removeListener("error",O),E()}se(_,"onend");function O(A){d.emit("error",A)}if(se(O,"onerror"),w._readableState.endEmitted)return E();w.on("merge2UnpipeEnd",_),w.on("end",_),p&&w.on("error",O),w.pipe(d,{end:!1}),w.resume()}se(b,"pipe");for(let w=0;w<y.length;w++)b(y[w]);E()}se(g,"mergeStream");function f(){o=!1,d.emit("queueDrain"),h&&d.end()}return se(f,"endStream"),d.setMaxListeners(0),d.add=m,d.on("unpipe",function(y){y.emit("merge2UnpipeEnd")}),s.length&&m.apply(null,s),d}se(l,"merge2");function c(r,s){if(Array.isArray(r))for(let o=0,a=r.length;o<a;o++)r[o]=c(r[o],s);else{if(!r._readableState&&r.pipe&&(r=r.pipe(u(s))),!r._readableState||!r.pause||!r.pipe)throw new Error("Only readable stream can be merged.");r.pause()}return r}se(c,"pauseStreams")}),bI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;var t=EI();function i(n){let l=t(n);return n.forEach(c=>{c.once("error",r=>l.emit("error",r))}),l.once("close",()=>u(n)),l.once("end",()=>u(n)),l}se(i,"merge"),e.merge=i;function u(n){n.forEach(l=>l.emit("close"))}se(u,"propagateCloseEventToSources")}),wI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEmpty=e.isString=void 0;function t(u){return typeof u=="string"}se(t,"isString"),e.isString=t;function i(u){return u===""}se(i,"isEmpty"),e.isEmpty=i}),Vt=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.string=e.stream=e.pattern=e.path=e.fs=e.errno=e.array=void 0;var t=tI();e.array=t;var i=rI();e.errno=i;var u=sI();e.fs=u;var n=iI();e.path=n;var l=SI();e.pattern=l;var c=bI();e.stream=c;var r=wI();e.string=r}),_I=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertPatternGroupToTask=e.convertPatternGroupsToTasks=e.groupPatternsByBaseDirectory=e.getNegativePatternsAsPositive=e.getPositivePatterns=e.convertPatternsToTasks=e.generate=void 0;var t=Vt();function i(a,h){let p=u(a,h),d=u(h.ignore,h),m=l(p),g=c(p,d),f=m.filter(b=>t.pattern.isStaticPattern(b,h)),y=m.filter(b=>t.pattern.isDynamicPattern(b,h)),v=n(f,g,!1),E=n(y,g,!0);return v.concat(E)}se(i,"generate"),e.generate=i;function u(a,h){let p=a;return h.braceExpansion&&(p=t.pattern.expandPatternsWithBraceExpansion(p)),h.baseNameMatch&&(p=p.map(d=>d.includes("/")?d:`**/${d}`)),p.map(d=>t.pattern.removeDuplicateSlashes(d))}se(u,"processPatterns");function n(a,h,p){let d=[],m=t.pattern.getPatternsOutsideCurrentDirectory(a),g=t.pattern.getPatternsInsideCurrentDirectory(a),f=r(m),y=r(g);return d.push(...s(f,h,p)),"."in y?d.push(o(".",g,h,p)):d.push(...s(y,h,p)),d}se(n,"convertPatternsToTasks"),e.convertPatternsToTasks=n;function l(a){return t.pattern.getPositivePatterns(a)}se(l,"getPositivePatterns"),e.getPositivePatterns=l;function c(a,h){return t.pattern.getNegativePatterns(a).concat(h).map(t.pattern.convertToPositivePattern)}se(c,"getNegativePatternsAsPositive"),e.getNegativePatternsAsPositive=c;function r(a){let h={};return a.reduce((p,d)=>{let m=t.pattern.getBaseDirectory(d);return m in p?p[m].push(d):p[m]=[d],p},h)}se(r,"groupPatternsByBaseDirectory"),e.groupPatternsByBaseDirectory=r;function s(a,h,p){return Object.keys(a).map(d=>o(d,a[d],h,p))}se(s,"convertPatternGroupsToTasks"),e.convertPatternGroupsToTasks=s;function o(a,h,p,d){return{dynamic:d,positive:h,negative:p,base:a,patterns:[].concat(h,p.map(t.pattern.convertToNegativePattern))}}se(o,"convertPatternGroupToTask"),e.convertPatternGroupToTask=o}),OI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.read=void 0;function t(n,l,c){l.fs.lstat(n,(r,s)=>{if(r!==null){i(c,r);return}if(!s.isSymbolicLink()||!l.followSymbolicLink){u(c,s);return}l.fs.stat(n,(o,a)=>{if(o!==null){if(l.throwErrorOnBrokenSymbolicLink){i(c,o);return}u(c,s);return}l.markSymbolicLink&&(a.isSymbolicLink=()=>!0),u(c,a)})})}se(t,"read"),e.read=t;function i(n,l){n(l)}se(i,"callFailureCallback");function u(n,l){n(null,l)}se(u,"callSuccessCallback")}),RI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.read=void 0;function t(i,u){let n=u.fs.lstatSync(i);if(!n.isSymbolicLink()||!u.followSymbolicLink)return n;try{let l=u.fs.statSync(i);return u.markSymbolicLink&&(l.isSymbolicLink=()=>!0),l}catch(l){if(!u.throwErrorOnBrokenSymbolicLink)return n;throw l}}se(t,"read"),e.read=t}),AI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;var t=require("fs");e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync};function i(u){return u===void 0?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),u)}se(i,"createFileSystemAdapter"),e.createFileSystemAdapter=i}),CI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=AI(),i=class{static{se(this,"Settings")}constructor(u={}){this._options=u,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=t.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(u,n){return u??n}};e.default=i}),Sr=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.statSync=e.stat=e.Settings=void 0;var t=OI(),i=RI(),u=CI();e.Settings=u.default;function n(r,s,o){if(typeof s=="function"){t.read(r,c(),s);return}t.read(r,c(s),o)}se(n,"stat"),e.stat=n;function l(r,s){let o=c(s);return i.read(r,o)}se(l,"statSync"),e.statSync=l;function c(r={}){return r instanceof u.default?r:new u.default(r)}se(c,"getSettings")}),II=Se((e,t)=>{var i;t.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(global):u=>(i||(i=Promise.resolve())).then(u).catch(n=>setTimeout(()=>{throw n},0))}),TI=Se((e,t)=>{t.exports=u;var i=II();function u(n,l){let c,r,s,o=!0;Array.isArray(n)?(c=[],r=n.length):(s=Object.keys(n),c={},r=s.length);function a(p){function d(){l&&l(p,c),l=null}se(d,"end"),o?i(d):d()}se(a,"done");function h(p,d,m){c[p]=m,(--r===0||d)&&a(d)}se(h,"each"),r?s?s.forEach(function(p){n[p](function(d,m){h(p,d,m)})}):n.forEach(function(p,d){p(function(m,g){h(d,m,g)})}):a(null),o=!1}se(u,"runParallel")}),td=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var t=process.versions.node.split(".");if(t[0]===void 0||t[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var i=Number.parseInt(t[0],10),u=Number.parseInt(t[1],10),n=10,l=10,c=i>n,r=i===n&&u>=l;e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=c||r}),PI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDirentFromStats=void 0;var t=class{static{se(this,"DirentFromStats")}constructor(u,n){this.name=u,this.isBlockDevice=n.isBlockDevice.bind(n),this.isCharacterDevice=n.isCharacterDevice.bind(n),this.isDirectory=n.isDirectory.bind(n),this.isFIFO=n.isFIFO.bind(n),this.isFile=n.isFile.bind(n),this.isSocket=n.isSocket.bind(n),this.isSymbolicLink=n.isSymbolicLink.bind(n)}};function i(u,n){return new t(u,n)}se(i,"createDirentFromStats"),e.createDirentFromStats=i}),rd=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fs=void 0;var t=PI();e.fs=t}),sd=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.joinPathSegments=void 0;function t(i,u,n){return i.endsWith(n)?i+u:i+n+u}se(t,"joinPathSegments"),e.joinPathSegments=t}),xI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readdir=e.readdirWithFileTypes=e.read=void 0;var t=Sr(),i=TI(),u=td(),n=rd(),l=sd();function c(p,d,m){if(!d.stats&&u.IS_SUPPORT_READDIR_WITH_FILE_TYPES){r(p,d,m);return}o(p,d,m)}se(c,"read"),e.read=c;function r(p,d,m){d.fs.readdir(p,{withFileTypes:!0},(g,f)=>{if(g!==null){a(m,g);return}let y=f.map(E=>({dirent:E,name:E.name,path:l.joinPathSegments(p,E.name,d.pathSegmentSeparator)}));if(!d.followSymbolicLinks){h(m,y);return}let v=y.map(E=>s(E,d));i(v,(E,b)=>{if(E!==null){a(m,E);return}h(m,b)})})}se(r,"readdirWithFileTypes"),e.readdirWithFileTypes=r;function s(p,d){return m=>{if(!p.dirent.isSymbolicLink()){m(null,p);return}d.fs.stat(p.path,(g,f)=>{if(g!==null){if(d.throwErrorOnBrokenSymbolicLink){m(g);return}m(null,p);return}p.dirent=n.fs.createDirentFromStats(p.name,f),m(null,p)})}}se(s,"makeRplTaskEntry");function o(p,d,m){d.fs.readdir(p,(g,f)=>{if(g!==null){a(m,g);return}let y=f.map(v=>{let E=l.joinPathSegments(p,v,d.pathSegmentSeparator);return b=>{t.stat(E,d.fsStatSettings,(w,_)=>{if(w!==null){b(w);return}let O={name:v,path:E,dirent:n.fs.createDirentFromStats(v,_)};d.stats&&(O.stats=_),b(null,O)})}});i(y,(v,E)=>{if(v!==null){a(m,v);return}h(m,E)})})}se(o,"readdir"),e.readdir=o;function a(p,d){p(d)}se(a,"callFailureCallback");function h(p,d){p(null,d)}se(h,"callSuccessCallback")}),NI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readdir=e.readdirWithFileTypes=e.read=void 0;var t=Sr(),i=td(),u=rd(),n=sd();function l(s,o){return!o.stats&&i.IS_SUPPORT_READDIR_WITH_FILE_TYPES?c(s,o):r(s,o)}se(l,"read"),e.read=l;function c(s,o){return o.fs.readdirSync(s,{withFileTypes:!0}).map(a=>{let h={dirent:a,name:a.name,path:n.joinPathSegments(s,a.name,o.pathSegmentSeparator)};if(h.dirent.isSymbolicLink()&&o.followSymbolicLinks)try{let p=o.fs.statSync(h.path);h.dirent=u.fs.createDirentFromStats(h.name,p)}catch(p){if(o.throwErrorOnBrokenSymbolicLink)throw p}return h})}se(c,"readdirWithFileTypes"),e.readdirWithFileTypes=c;function r(s,o){return o.fs.readdirSync(s).map(a=>{let h=n.joinPathSegments(s,a,o.pathSegmentSeparator),p=t.statSync(h,o.fsStatSettings),d={name:a,path:h,dirent:u.fs.createDirentFromStats(a,p)};return o.stats&&(d.stats=p),d})}se(r,"readdir"),e.readdir=r}),kI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;var t=require("fs");e.FILE_SYSTEM_ADAPTER={lstat:t.lstat,stat:t.stat,lstatSync:t.lstatSync,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync};function i(u){return u===void 0?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),u)}se(i,"createFileSystemAdapter"),e.createFileSystemAdapter=i}),LI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),i=Sr(),u=kI(),n=class{static{se(this,"Settings")}constructor(l={}){this._options=l,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=u.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new i.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(l,c){return l??c}};e.default=n}),ja=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Settings=e.scandirSync=e.scandir=void 0;var t=xI(),i=NI(),u=LI();e.Settings=u.default;function n(r,s,o){if(typeof s=="function"){t.read(r,c(),s);return}t.read(r,c(s),o)}se(n,"scandir"),e.scandir=n;function l(r,s){let o=c(s);return i.read(r,o)}se(l,"scandirSync"),e.scandirSync=l;function c(r={}){return r instanceof u.default?r:new u.default(r)}se(c,"getSettings")}),DI=Se((e,t)=>{"use strict";function i(u){var n=new u,l=n;function c(){var s=n;return s.next?n=s.next:(n=new u,l=n),s.next=null,s}se(c,"get");function r(s){l.next=s,l=s}return se(r,"release"),{get:c,release:r}}se(i,"reusify"),t.exports=i}),$I=Se((e,t)=>{"use strict";var i=DI();function u(r,s,o){if(typeof r=="function"&&(o=s,s=r,r=null),!(o>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var a=i(l),h=null,p=null,d=0,m=null,g={push:_,drain:n,saturated:n,pause:y,paused:!1,get concurrency(){return o},set concurrency(j){if(!(j>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(o=j,!g.paused)for(;h&&d<o;)d++,A()},running:f,resume:b,idle:w,length:v,getQueue:E,unshift:O,empty:n,kill:I,killAndDrain:P,error:L};return g;function f(){return d}function y(){g.paused=!0}function v(){for(var j=h,N=0;j;)j=j.next,N++;return N}function E(){for(var j=h,N=[];j;)N.push(j.value),j=j.next;return N}function b(){if(g.paused){if(g.paused=!1,h===null){d++,A();return}for(;h&&d<o;)d++,A()}}function w(){return d===0&&g.length()===0}function _(j,N){var M=a.get();M.context=r,M.release=A,M.value=j,M.callback=N||n,M.errorHandler=m,d>=o||g.paused?p?(p.next=M,p=M):(h=M,p=M,g.saturated()):(d++,s.call(r,M.value,M.worked))}function O(j,N){var M=a.get();M.context=r,M.release=A,M.value=j,M.callback=N||n,M.errorHandler=m,d>=o||g.paused?h?(M.next=h,h=M):(h=M,p=M,g.saturated()):(d++,s.call(r,M.value,M.worked))}function A(j){j&&a.release(j);var N=h;N&&d<=o?g.paused?d--:(p===h&&(p=null),h=N.next,N.next=null,s.call(r,N.value,N.worked),p===null&&g.empty()):--d===0&&g.drain()}function I(){h=null,p=null,g.drain=n}function P(){h=null,p=null,g.drain(),g.drain=n}function L(j){m=j}}se(u,"fastqueue");function n(){}se(n,"noop");function l(){this.value=null,this.callback=n,this.next=null,this.release=n,this.context=null,this.errorHandler=null;var r=this;this.worked=se(function(s,o){var a=r.callback,h=r.errorHandler,p=r.value;r.value=null,r.callback=n,r.errorHandler&&h(s,p),a.call(r.context,s,o),r.release(r)},"worked")}se(l,"Task");function c(r,s,o){typeof r=="function"&&(o=s,s=r,r=null);function a(y,v){s.call(this,y).then(function(E){v(null,E)},v)}se(a,"asyncWrapper");var h=u(r,a,o),p=h.push,d=h.unshift;return h.push=m,h.unshift=g,h.drained=f,h;function m(y){var v=new Promise(function(E,b){p(y,function(w,_){if(w){b(w);return}E(_)})});return v.catch(n),v}function g(y){var v=new Promise(function(E,b){d(y,function(w,_){if(w){b(w);return}E(_)})});return v.catch(n),v}function f(){var y=new Promise(function(v){process.nextTick(function(){if(h.idle())v();else{var E=h.drain;h.drain=function(){typeof E=="function"&&E(),v(),h.drain=E}}})});return y}}se(c,"queueAsPromised"),t.exports=u,t.exports.promise=c}),Ma=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.joinPathSegments=e.replacePathSegmentSeparator=e.isAppliedFilter=e.isFatalError=void 0;function t(l,c){return l.errorFilter===null?!0:!l.errorFilter(c)}se(t,"isFatalError"),e.isFatalError=t;function i(l,c){return l===null||l(c)}se(i,"isAppliedFilter"),e.isAppliedFilter=i;function u(l,c){return l.split(/[/\\]/).join(c)}se(u,"replacePathSegmentSeparator"),e.replacePathSegmentSeparator=u;function n(l,c,r){return l===""?c:l.endsWith(r)?l+c:l+r+c}se(n,"joinPathSegments"),e.joinPathSegments=n}),id=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Ma(),i=class{static{se(this,"Reader")}constructor(u,n){this._root=u,this._settings=n,this._root=t.replacePathSegmentSeparator(u,n.pathSegmentSeparator)}};e.default=i}),nd=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("events"),i=ja(),u=$I(),n=Ma(),l=id(),c=class extends l.default{static{se(this,"AsyncReader")}constructor(r,s){super(r,s),this._settings=s,this._scandir=i.scandir,this._emitter=new t.EventEmitter,this._queue=u(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(r){this._emitter.on("entry",r)}onError(r){this._emitter.once("error",r)}onEnd(r){this._emitter.once("end",r)}_pushToQueue(r,s){let o={directory:r,base:s};this._queue.push(o,a=>{a!==null&&this._handleError(a)})}_worker(r,s){this._scandir(r.directory,this._settings.fsScandirSettings,(o,a)=>{if(o!==null){s(o,void 0);return}for(let h of a)this._handleEntry(h,r.base);s(null,void 0)})}_handleError(r){this._isDestroyed||!n.isFatalError(this._settings,r)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",r))}_handleEntry(r,s){if(this._isDestroyed||this._isFatalError)return;let o=r.path;s!==void 0&&(r.path=n.joinPathSegments(s,r.name,this._settings.pathSegmentSeparator)),n.isAppliedFilter(this._settings.entryFilter,r)&&this._emitEntry(r),r.dirent.isDirectory()&&n.isAppliedFilter(this._settings.deepFilter,r)&&this._pushToQueue(o,s===void 0?void 0:r.path)}_emitEntry(r){this._emitter.emit("entry",r)}};e.default=c}),jI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=nd(),i=class{static{se(this,"AsyncProvider")}constructor(l,c){this._root=l,this._settings=c,this._reader=new t.default(this._root,this._settings),this._storage=[]}read(l){this._reader.onError(c=>{u(l,c)}),this._reader.onEntry(c=>{this._storage.push(c)}),this._reader.onEnd(()=>{n(l,this._storage)}),this._reader.read()}};e.default=i;function u(l,c){l(c)}se(u,"callFailureCallback");function n(l,c){l(null,c)}se(n,"callSuccessCallback")}),MI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("stream"),i=nd(),u=class{static{se(this,"StreamProvider")}constructor(n,l){this._root=n,this._settings=l,this._reader=new i.default(this._root,this._settings),this._stream=new t.Readable({objectMode:!0,read:se(()=>{},"read"),destroy:se(()=>{this._reader.isDestroyed||this._reader.destroy()},"destroy")})}read(){return this._reader.onError(n=>{this._stream.emit("error",n)}),this._reader.onEntry(n=>{this._stream.push(n)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};e.default=u}),BI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=ja(),i=Ma(),u=id(),n=class extends u.default{static{se(this,"SyncReader")}constructor(){super(...arguments),this._scandir=t.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(l,c){this._queue.add({directory:l,base:c})}_handleQueue(){for(let l of this._queue.values())this._handleDirectory(l.directory,l.base)}_handleDirectory(l,c){try{let r=this._scandir(l,this._settings.fsScandirSettings);for(let s of r)this._handleEntry(s,c)}catch(r){this._handleError(r)}}_handleError(l){if(i.isFatalError(this._settings,l))throw l}_handleEntry(l,c){let r=l.path;c!==void 0&&(l.path=i.joinPathSegments(c,l.name,this._settings.pathSegmentSeparator)),i.isAppliedFilter(this._settings.entryFilter,l)&&this._pushToStorage(l),l.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,l)&&this._pushToQueue(r,c===void 0?void 0:l.path)}_pushToStorage(l){this._storage.push(l)}};e.default=n}),UI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=BI(),i=class{static{se(this,"SyncProvider")}constructor(u,n){this._root=u,this._settings=n,this._reader=new t.default(this._root,this._settings)}read(){return this._reader.read()}};e.default=i}),FI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),i=ja(),u=class{static{se(this,"Settings")}constructor(n={}){this._options=n,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,t.sep),this.fsScandirSettings=new i.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(n,l){return n??l}};e.default=u}),Ba=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Settings=e.walkStream=e.walkSync=e.walk=void 0;var t=jI(),i=MI(),u=UI(),n=FI();e.Settings=n.default;function l(o,a,h){if(typeof a=="function"){new t.default(o,s()).read(a);return}new t.default(o,s(a)).read(h)}se(l,"walk"),e.walk=l;function c(o,a){let h=s(a);return new u.default(o,h).read()}se(c,"walkSync"),e.walkSync=c;function r(o,a){let h=s(a);return new i.default(o,h).read()}se(r,"walkStream"),e.walkStream=r;function s(o={}){return o instanceof n.default?o:new n.default(o)}se(s,"getSettings")}),Ua=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),i=Sr(),u=Vt(),n=class{static{se(this,"Reader")}constructor(l){this._settings=l,this._fsStatSettings=new i.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(l){return t.resolve(this._settings.cwd,l)}_makeEntry(l,c){let r={name:c,path:c,dirent:u.fs.createDirentFromStats(c,l)};return this._settings.stats&&(r.stats=l),r}_isFatalError(l){return!u.errno.isEnoentCodeError(l)&&!this._settings.suppressErrors}};e.default=n}),od=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("stream"),i=Sr(),u=Ba(),n=Ua(),l=class extends n.default{static{se(this,"ReaderStream")}constructor(){super(...arguments),this._walkStream=u.walkStream,this._stat=i.stat}dynamic(c,r){return this._walkStream(c,r)}static(c,r){let s=c.map(this._getFullEntryPath,this),o=new t.PassThrough({objectMode:!0});o._write=(a,h,p)=>this._getEntry(s[a],c[a],r).then(d=>{d!==null&&r.entryFilter(d)&&o.push(d),a===s.length-1&&o.end(),p()}).catch(p);for(let a=0;a<s.length;a++)o.write(a);return o}_getEntry(c,r,s){return this._getStat(c).then(o=>this._makeEntry(o,r)).catch(o=>{if(s.errorFilter(o))return null;throw o})}_getStat(c){return new Promise((r,s)=>{this._stat(c,this._fsStatSettings,(o,a)=>o===null?r(a):s(o))})}};e.default=l}),HI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Ba(),i=Ua(),u=od(),n=class extends i.default{static{se(this,"ReaderAsync")}constructor(){super(...arguments),this._walkAsync=t.walk,this._readerStream=new u.default(this._settings)}dynamic(l,c){return new Promise((r,s)=>{this._walkAsync(l,c,(o,a)=>{o===null?r(a):s(o)})})}async static(l,c){let r=[],s=this._readerStream.static(l,c);return new Promise((o,a)=>{s.once("error",a),s.on("data",h=>r.push(h)),s.once("end",()=>o(r))})}};e.default=n}),GI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Vt(),i=class{static{se(this,"Matcher")}constructor(u,n,l){this._patterns=u,this._settings=n,this._micromatchOptions=l,this._storage=[],this._fillStorage()}_fillStorage(){for(let u of this._patterns){let n=this._getPatternSegments(u),l=this._splitSegmentsIntoSections(n);this._storage.push({complete:l.length<=1,pattern:u,segments:n,sections:l})}}_getPatternSegments(u){return t.pattern.getPatternParts(u,this._micromatchOptions).map(n=>t.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:t.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(u){return t.array.splitWhen(u,n=>n.dynamic&&t.pattern.hasGlobStar(n.pattern))}};e.default=i}),VI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=GI(),i=class extends t.default{static{se(this,"PartialMatcher")}match(u){let n=u.split("/"),l=n.length,c=this._storage.filter(r=>!r.complete||r.segments.length>l);for(let r of c){let s=r.sections[0];if(!r.complete&&l>s.length||n.every((o,a)=>{let h=r.segments[a];return!!(h.dynamic&&h.patternRe.test(o)||!h.dynamic&&h.pattern===o)}))return!0}return!1}};e.default=i}),WI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Vt(),i=VI(),u=class{static{se(this,"DeepFilter")}constructor(n,l){this._settings=n,this._micromatchOptions=l}getFilter(n,l,c){let r=this._getMatcher(l),s=this._getNegativePatternsRe(c);return o=>this._filter(n,o,r,s)}_getMatcher(n){return new i.default(n,this._settings,this._micromatchOptions)}_getNegativePatternsRe(n){let l=n.filter(t.pattern.isAffectDepthOfReadingPattern);return t.pattern.convertPatternsToRe(l,this._micromatchOptions)}_filter(n,l,c,r){if(this._isSkippedByDeep(n,l.path)||this._isSkippedSymbolicLink(l))return!1;let s=t.path.removeLeadingDotSegment(l.path);return this._isSkippedByPositivePatterns(s,c)?!1:this._isSkippedByNegativePatterns(s,r)}_isSkippedByDeep(n,l){return this._settings.deep===1/0?!1:this._getEntryLevel(n,l)>=this._settings.deep}_getEntryLevel(n,l){let c=l.split("/").length;if(n==="")return c;let r=n.split("/").length;return c-r}_isSkippedSymbolicLink(n){return!this._settings.followSymbolicLinks&&n.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(n,l){return!this._settings.baseNameMatch&&!l.match(n)}_isSkippedByNegativePatterns(n,l){return!t.pattern.matchAny(n,l)}};e.default=u}),zI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Vt(),i=class{static{se(this,"EntryFilter")}constructor(u,n){this._settings=u,this._micromatchOptions=n,this.index=new Map}getFilter(u,n){let[l,c]=t.pattern.partitionAbsoluteAndRelative(n),r={positive:{all:t.pattern.convertPatternsToRe(u,this._micromatchOptions)},negative:{absolute:t.pattern.convertPatternsToRe(l,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0})),relative:t.pattern.convertPatternsToRe(c,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}))}};return s=>this._filter(s,r)}_filter(u,n){let l=t.path.removeLeadingDotSegment(u.path);if(this._settings.unique&&this._isDuplicateEntry(l)||this._onlyFileFilter(u)||this._onlyDirectoryFilter(u))return!1;let c=this._isMatchToPatternsSet(l,n,u.dirent.isDirectory());return this._settings.unique&&c&&this._createIndexRecord(l),c}_isDuplicateEntry(u){return this.index.has(u)}_createIndexRecord(u){this.index.set(u,void 0)}_onlyFileFilter(u){return this._settings.onlyFiles&&!u.dirent.isFile()}_onlyDirectoryFilter(u){return this._settings.onlyDirectories&&!u.dirent.isDirectory()}_isMatchToPatternsSet(u,n,l){return!(!this._isMatchToPatterns(u,n.positive.all,l)||this._isMatchToPatterns(u,n.negative.relative,l)||this._isMatchToAbsoluteNegative(u,n.negative.absolute,l))}_isMatchToAbsoluteNegative(u,n,l){if(n.length===0)return!1;let c=t.path.makeAbsolute(this._settings.cwd,u);return this._isMatchToPatterns(c,n,l)}_isMatchToPatterns(u,n,l){if(n.length===0)return!1;let c=t.pattern.matchAny(u,n);return!c&&l?t.pattern.matchAny(u+"/",n):c}};e.default=i}),qI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Vt(),i=class{static{se(this,"ErrorFilter")}constructor(u){this._settings=u}getFilter(){return u=>this._isNonFatalError(u)}_isNonFatalError(u){return t.errno.isEnoentCodeError(u)||this._settings.suppressErrors}};e.default=i}),KI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Vt(),i=class{static{se(this,"EntryTransformer")}constructor(u){this._settings=u}getTransformer(){return u=>this._transform(u)}_transform(u){let n=u.path;return this._settings.absolute&&(n=t.path.makeAbsolute(this._settings.cwd,n),n=t.path.unixify(n)),this._settings.markDirectories&&u.dirent.isDirectory()&&(n+="/"),this._settings.objectMode?Object.assign(Object.assign({},u),{path:n}):n}};e.default=i}),Fa=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("path"),i=WI(),u=zI(),n=qI(),l=KI(),c=class{static{se(this,"Provider")}constructor(r){this._settings=r,this.errorFilter=new n.default(this._settings),this.entryFilter=new u.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new i.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new l.default(this._settings)}_getRootDirectory(r){return t.resolve(this._settings.cwd,r.base)}_getReaderOptions(r){let s=r.base==="."?"":r.base;return{basePath:s,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(s,r.positive,r.negative),entryFilter:this.entryFilter.getFilter(r.positive,r.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};e.default=c}),JI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=HI(),i=Fa(),u=class extends i.default{static{se(this,"ProviderAsync")}constructor(){super(...arguments),this._reader=new t.default(this._settings)}async read(n){let l=this._getRootDirectory(n),c=this._getReaderOptions(n);return(await this.api(l,n,c)).map(r=>c.transform(r))}api(n,l,c){return l.dynamic?this._reader.dynamic(n,c):this._reader.static(l.patterns,c)}};e.default=u}),XI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("stream"),i=od(),u=Fa(),n=class extends u.default{static{se(this,"ProviderStream")}constructor(){super(...arguments),this._reader=new i.default(this._settings)}read(l){let c=this._getRootDirectory(l),r=this._getReaderOptions(l),s=this.api(c,l,r),o=new t.Readable({objectMode:!0,read:se(()=>{},"read")});return s.once("error",a=>o.emit("error",a)).on("data",a=>o.emit("data",r.transform(a))).once("end",()=>o.emit("end")),o.once("close",()=>s.destroy()),o}api(l,c,r){return c.dynamic?this._reader.dynamic(l,r):this._reader.static(c.patterns,r)}};e.default=n}),ZI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=Sr(),i=Ba(),u=Ua(),n=class extends u.default{static{se(this,"ReaderSync")}constructor(){super(...arguments),this._walkSync=i.walkSync,this._statSync=t.statSync}dynamic(l,c){return this._walkSync(l,c)}static(l,c){let r=[];for(let s of l){let o=this._getFullEntryPath(s),a=this._getEntry(o,s,c);a===null||!c.entryFilter(a)||r.push(a)}return r}_getEntry(l,c,r){try{let s=this._getStat(l);return this._makeEntry(s,c)}catch(s){if(r.errorFilter(s))return null;throw s}}_getStat(l){return this._statSync(l,this._fsStatSettings)}};e.default=n}),YI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=ZI(),i=Fa(),u=class extends i.default{static{se(this,"ProviderSync")}constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(n){let l=this._getRootDirectory(n),c=this._getReaderOptions(n);return this.api(l,n,c).map(c.transform)}api(n,l,c){return l.dynamic?this._reader.dynamic(n,c):this._reader.static(l.patterns,c)}};e.default=u}),QI=Se(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var t=require("fs"),i=require("os"),u=Math.max(i.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:t.lstat,lstatSync:t.lstatSync,stat:t.stat,statSync:t.statSync,readdir:t.readdir,readdirSync:t.readdirSync};var n=class{static{se(this,"Settings")}constructor(l={}){this._options=l,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,u),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(l,c){return l===void 0?c:l}_getFileSystemMethods(l={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),l)}};e.default=n}),ad=Se((e,t)=>{"use strict";var i=_I(),u=JI(),n=XI(),l=YI(),c=QI(),r=Vt();async function s(h,p){a(h);let d=o(h,u.default,p),m=await Promise.all(d);return r.array.flatten(m)}se(s,"FastGlob"),function(h){h.glob=h,h.globSync=p,h.globStream=d,h.async=h;function p(b,w){a(b);let _=o(b,l.default,w);return r.array.flatten(_)}se(p,"sync"),h.sync=p;function d(b,w){a(b);let _=o(b,n.default,w);return r.stream.merge(_)}se(d,"stream"),h.stream=d;function m(b,w){a(b);let _=[].concat(b),O=new c.default(w);return i.generate(_,O)}se(m,"generateTasks"),h.generateTasks=m;function g(b,w){a(b);let _=new c.default(w);return r.pattern.isDynamicPattern(b,_)}se(g,"isDynamicPattern"),h.isDynamicPattern=g;function f(b){return a(b),r.path.escape(b)}se(f,"escapePath"),h.escapePath=f;function y(b){return a(b),r.path.convertPathToPattern(b)}se(y,"convertPathToPattern"),h.convertPathToPattern=y;let v;(function(b){function w(O){return a(O),r.path.escapePosixPath(O)}se(w,"escapePath"),b.escapePath=w;function _(O){return a(O),r.path.convertPosixPathToPattern(O)}se(_,"convertPathToPattern"),b.convertPathToPattern=_})(v=h.posix||(h.posix={}));let E;(function(b){function w(O){return a(O),r.path.escapeWindowsPath(O)}se(w,"escapePath"),b.escapePath=w;function _(O){return a(O),r.path.convertWindowsPathToPattern(O)}se(_,"convertPathToPattern"),b.convertPathToPattern=_})(E=h.win32||(h.win32={}))}(s||(s={}));function o(h,p,d){let m=[].concat(h),g=new c.default(d),f=i.generate(m,g),y=new p(g);return f.map(y.read,y)}se(o,"getWorks");function a(h){if(![].concat(h).every(p=>r.string.isString(p)&&!r.string.isEmpty(p)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}se(a,"assertPatternsInput"),t.exports=s}),eT=Se((e,t)=>{function i(Y){return Array.isArray(Y)?Y:[Y]}se(i,"makeArray");var u=void 0,n="",l=" ",c="\\",r=/^\s+$/,s=/(?:[^\\]|^)\\$/,o=/^\\!/,a=/^\\#/,h=/\r?\n/g,p=/^\.{0,2}\/|^\.{1,2}$/,d=/\/$/,m="/",g="node-ignore";typeof Symbol<"u"&&(g=Symbol.for("node-ignore"));var f=g,y=se((Y,$,V)=>(Object.defineProperty(Y,$,{value:V}),V),"define"),v=/([0-z])-([0-z])/g,E=se(()=>!1,"RETURN_FALSE"),b=se(Y=>Y.replace(v,($,V,z)=>V.charCodeAt(0)<=z.charCodeAt(0)?$:n),"sanitizeRange"),w=se(Y=>{let{length:$}=Y;return Y.slice(0,$-$%2)},"cleanRangeBackSlash"),_=[[/^\uFEFF/,()=>n],[/((?:\\\\)*?)(\\?\s+)$/,(Y,$,V)=>$+(V.indexOf("\\")===0?l:n)],[/(\\+?)\s/g,(Y,$)=>{let{length:V}=$;return $.slice(0,V-V%2)+l}],[/[\\$.|*+(){^]/g,Y=>`\\${Y}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,se(function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"},"startingReplacer")],[/\\\/\\\*\\\*(?=\\\/|$)/g,(Y,$,V)=>$+6<V.length?"(?:\\/[^\\/]+)*":"\\/.+"],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(Y,$,V)=>{let z=V.replace(/\\\*/g,"[^\\/]*");return $+z}],[/\\\\\\(?=[$.|*+(){^])/g,()=>c],[/\\\\/g,()=>c],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(Y,$,V,z,U)=>$===c?`\\[${V}${w(z)}${U}`:U==="]"&&z.length%2===0?`[${b(V)}${z}]`:"[]"],[/(?:[^*])$/,Y=>/\/$/.test(Y)?`${Y}$`:`${Y}(?=$|\\/$)`]],O=/(^|\\\/)?\\\*$/,A="regex",I="checkRegex",P="_",L={[A](Y,$){return`${$?`${$}[^/]+`:"[^/]*"}(?=$|\\/$)`},[I](Y,$){return`${$?`${$}[^/]*`:"[^/]*"}(?=$|\\/$)`}},j=se(Y=>_.reduce(($,[V,z])=>$.replace(V,z.bind(Y)),Y),"makeRegexPrefix"),N=se(Y=>typeof Y=="string","isString"),M=se(Y=>Y&&N(Y)&&!r.test(Y)&&!s.test(Y)&&Y.indexOf("#")!==0,"checkPattern"),B=se(Y=>Y.split(h).filter(Boolean),"splitPattern"),F=class{static{se(this,"IgnoreRule")}constructor(Y,$,V,z,U,K){this.pattern=Y,this.mark=$,this.negative=U,y(this,"body",V),y(this,"ignoreCase",z),y(this,"regexPrefix",K)}get regex(){let Y=P+A;return this[Y]?this[Y]:this._make(A,Y)}get checkRegex(){let Y=P+I;return this[Y]?this[Y]:this._make(I,Y)}_make(Y,$){let V=this.regexPrefix.replace(O,L[Y]),z=this.ignoreCase?new RegExp(V,"i"):new RegExp(V);return y(this,$,z)}},D=se(({pattern:Y,mark:$},V)=>{let z=!1,U=Y;U.indexOf("!")===0&&(z=!0,U=U.substr(1)),U=U.replace(o,"!").replace(a,"#");let K=j(U);return new F(Y,$,U,V,z,K)},"createRule"),H=class{static{se(this,"RuleManager")}constructor(Y){this._ignoreCase=Y,this._rules=[]}_add(Y){if(Y&&Y[f]){this._rules=this._rules.concat(Y._rules._rules),this._added=!0;return}if(N(Y)&&(Y={pattern:Y}),M(Y.pattern)){let $=D(Y,this._ignoreCase);this._added=!0,this._rules.push($)}}add(Y){return this._added=!1,i(N(Y)?B(Y):Y).forEach(this._add,this),this._added}test(Y,$,V){let z=!1,U=!1,K;this._rules.forEach(Q=>{let{negative:R}=Q;U===R&&z!==U||R&&!z&&!U&&!$||!Q[V].test(Y)||(z=!R,U=R,K=R?u:Q)});let Z={ignored:z,unignored:U};return K&&(Z.rule=K),Z}},G=se((Y,$)=>{throw new $(Y)},"throwError"),x=se((Y,$,V)=>N(Y)?Y?x.isNotRelative(Y)?V(`path should be a \`path.relative()\`d string, but got "${$}"`,RangeError):!0:V("path must not be empty",TypeError):V(`path must be a string, but got \`${$}\``,TypeError),"checkPath"),k=se(Y=>p.test(Y),"isNotRelative");x.isNotRelative=k,x.convert=Y=>Y;var T=class{static{se(this,"Ignore")}constructor({ignorecase:Y=!0,ignoreCase:$=Y,allowRelativePaths:V=!1}={}){y(this,f,!0),this._rules=new H($),this._strictPathCheck=!V,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}add(Y){return this._rules.add(Y)&&this._initCache(),this}addPattern(Y){return this.add(Y)}_test(Y,$,V,z){let U=Y&&x.convert(Y);return x(U,Y,this._strictPathCheck?G:E),this._t(U,$,V,z)}checkIgnore(Y){if(!d.test(Y))return this.test(Y);let $=Y.split(m).filter(Boolean);if($.pop(),$.length){let V=this._t($.join(m)+m,this._testCache,!0,$);if(V.ignored)return V}return this._rules.test(Y,!1,I)}_t(Y,$,V,z){if(Y in $)return $[Y];if(z||(z=Y.split(m).filter(Boolean)),z.pop(),!z.length)return $[Y]=this._rules.test(Y,V,A);let U=this._t(z.join(m)+m,$,V,z);return $[Y]=U.ignored?U:this._rules.test(Y,V,A)}ignores(Y){return this._test(Y,this._ignoreCache,!1).ignored}createFilter(){return Y=>!this.ignores(Y)}filter(Y){return i(Y).filter(this.createFilter())}test(Y){return this._test(Y,this._testCache,!0)}},C=se(Y=>new T(Y),"factory"),q=se(Y=>x(Y&&x.convert(Y),Y,E),"isPathValid"),X=se(()=>{let Y=se(V=>/^\\\\\?\\/.test(V)||/["<>|\u0000-\u001F]+/u.test(V)?V:V.replace(/\\/g,"/"),"makePosix");x.convert=Y;let $=/^[a-z]:\//i;x.isNotRelative=V=>$.test(V)||k(V)},"setupWindows");typeof process<"u"&&process.platform==="win32"&&X(),t.exports=C,C.default=C,t.exports.isPathValid=q,y(t.exports,Symbol.for("setupWindows"),X)}),ld={};Q1(ld,{deleteAsync:()=>jd,deleteSync:()=>Md});Bd.exports=eI(ld);var tT=je(require("fs"),1),rT=je(require("internal/fs/promises"),1),cd=je(require("path"),1),Ha=je(require("process"),1),ud=je(require("process"),1),sT=je(require("fs"),1),mr=je(require("path"),1),hd=require("events"),iT=require("stream"),pd=require("internal/streams/promises");function dd(e){if(!Array.isArray(e))throw new TypeError(`Expected an array, got \`${typeof e}\`.`);for(let n of e)ka(n);let t=e.some(({readableObjectMode:n})=>n),i=nT(e,t),u=new oT({objectMode:t,writableHighWaterMark:i,readableHighWaterMark:i});for(let n of e)u.add(n);return e.length===0&&md(u),u}se(dd,"mergeStreams");var nT=se((e,t)=>{if(e.length===0)return 16384;let i=e.filter(({readableObjectMode:u})=>u===t).map(({readableHighWaterMark:u})=>u);return Math.max(...i)},"getHighWaterMark"),oT=class extends iT.PassThrough{static{se(this,"MergedStream")}#e=new Set([]);#t=new Set([]);#r=new Set([]);#s;add(e){ka(e),!this.#e.has(e)&&(this.#e.add(e),this.#s??=aT(this,this.#e),uT({passThroughStream:this,stream:e,streams:this.#e,ended:this.#t,aborted:this.#r,onFinished:this.#s}),e.pipe(this,{end:!1}))}remove(e){return ka(e),this.#e.has(e)?(e.unpipe(this),!0):!1}},aT=se(async(e,t)=>{xi(e,Wp);let i=new AbortController;try{await Promise.race([lT(e,i),cT(e,t,i)])}finally{i.abort(),xi(e,-Wp)}},"onMergedStreamFinished"),lT=se(async(e,{signal:t})=>{await(0,pd.finished)(e,{signal:t,cleanup:!0})},"onMergedStreamEnd"),cT=se(async(e,t,{signal:i})=>{for await(let[u]of(0,hd.on)(e,"unpipe",{signal:i}))t.has(u)&&u.emit(gd)},"onInputStreamsUnpipe"),ka=se(e=>{if(typeof e?.pipe!="function")throw new TypeError(`Expected a readable stream, got: \`${typeof e}\`.`)},"validateStream"),uT=se(async({passThroughStream:e,stream:t,streams:i,ended:u,aborted:n,onFinished:l})=>{xi(e,zp);let c=new AbortController;try{await Promise.race([hT(l,t),pT({passThroughStream:e,stream:t,streams:i,ended:u,aborted:n,controller:c}),dT({stream:t,streams:i,ended:u,aborted:n,controller:c})])}finally{c.abort(),xi(e,-zp)}i.size===u.size+n.size&&(u.size===0&&n.size>0?La(e):md(e))},"endWhenStreamsDone"),fd=se(e=>e?.code==="ERR_STREAM_PREMATURE_CLOSE","isAbortError"),hT=se(async(e,t)=>{try{await e,La(t)}catch(i){fd(i)?La(t):yd(t,i)}},"afterMergedStreamFinished"),pT=se(async({passThroughStream:e,stream:t,streams:i,ended:u,aborted:n,controller:{signal:l}})=>{try{await(0,pd.finished)(t,{signal:l,cleanup:!0,readable:!0,writable:!1}),i.has(t)&&u.add(t)}catch(c){if(l.aborted||!i.has(t))return;fd(c)?n.add(t):yd(e,c)}},"onInputStreamEnd"),dT=se(async({stream:e,streams:t,ended:i,aborted:u,controller:{signal:n}})=>{await(0,hd.once)(e,gd,{signal:n}),t.delete(e),i.delete(e),u.delete(e)},"onInputStreamUnpipe"),gd=Symbol("unpipe"),md=se(e=>{e.writable&&e.end()},"endStream"),La=se(e=>{(e.readable||e.writable)&&e.destroy()},"abortStream"),yd=se((e,t)=>{e.destroyed||(e.once("error",fT),e.destroy(t))},"errorStream"),fT=se(()=>{},"noop"),xi=se((e,t)=>{let i=e.getMaxListeners();i!==0&&i!==Number.POSITIVE_INFINITY&&e.setMaxListeners(i+t)},"updateMaxListeners"),Wp=2,zp=1,ls=je(ad(),1),gT=je(require("fs"),1),mT=je(require("internal/fs/promises"),1);async function Li(e,t,i){if(typeof i!="string")throw new TypeError(`Expected a string, got ${typeof i}`);try{return(await mT.default[e](i))[t]()}catch(u){if(u.code==="ENOENT")return!1;throw u}}se(Li,"isType");function Di(e,t,i){if(typeof i!="string")throw new TypeError(`Expected a string, got ${typeof i}`);try{return gT.default[e](i)[t]()}catch(u){if(u.code==="ENOENT")return!1;throw u}}se(Di,"isTypeSync");var j3=Li.bind(void 0,"stat","isFile"),yT=Li.bind(void 0,"stat","isDirectory"),M3=Li.bind(void 0,"lstat","isSymbolicLink"),B3=Di.bind(void 0,"statSync","isFile"),vT=Di.bind(void 0,"statSync","isDirectory"),U3=Di.bind(void 0,"lstatSync","isSymbolicLink"),ST=require("util"),ET=require("internal/child_process"),F3=je(require("path"),1),bT=require("url"),H3=(0,ST.promisify)(ET.execFile);function $i(e){return e instanceof URL?(0,bT.fileURLToPath)(e):e}se($i,"toPath");var G3=10*1024*1024,wT=je(require("process"),1),_T=je(require("fs"),1),OT=je(require("internal/fs/promises"),1),yr=je(require("path"),1),vd=je(ad(),1),RT=je(eT(),1);function vr(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}se(vr,"slash");var Ga=se(e=>e[0]==="!","isNegativePattern"),AT=["**/node_modules","**/flow-typed","**/coverage","**/.git"],Sd={absolute:!0,dot:!0},CT="**/.gitignore",IT=se((e,t)=>Ga(e)?"!"+yr.default.posix.join(t,e.slice(1)):yr.default.posix.join(t,e),"applyBaseToPattern"),TT=se((e,t)=>{let i=vr(yr.default.relative(t,yr.default.dirname(e.filePath)));return e.content.split(/\r?\n/).filter(u=>u&&!u.startsWith("#")).map(u=>IT(u,i))},"parseIgnoreFile"),PT=se((e,t)=>{if(t=vr(t),yr.default.isAbsolute(e)){if(vr(e).startsWith(t))return yr.default.relative(t,e);throw new Error(`Path ${e} is not in cwd ${t}`)}return e},"toRelativePath"),Ed=se((e,t)=>{let i=e.flatMap(n=>TT(n,t)),u=(0,RT.default)().add(i);return n=>(n=$i(n),n=PT(n,t),n?u.ignores(vr(n)):!1)},"getIsIgnoredPredicate"),bd=se((e={})=>({cwd:$i(e.cwd)??wT.default.cwd(),suppressErrors:!!e.suppressErrors,deep:typeof e.deep=="number"?e.deep:Number.POSITIVE_INFINITY,ignore:[...e.ignore??[],...AT]}),"normalizeOptions"),xT=se(async(e,t)=>{let{cwd:i,suppressErrors:u,deep:n,ignore:l}=bd(t),c=await(0,vd.default)(e,{cwd:i,suppressErrors:u,deep:n,ignore:l,...Sd}),r=await Promise.all(c.map(async s=>({filePath:s,content:await OT.default.readFile(s,"utf8")})));return Ed(r,i)},"isIgnoredByIgnoreFiles"),NT=se((e,t)=>{let{cwd:i,suppressErrors:u,deep:n,ignore:l}=bd(t),c=vd.default.sync(e,{cwd:i,suppressErrors:u,deep:n,ignore:l,...Sd}).map(r=>({filePath:r,content:_T.default.readFileSync(r,"utf8")}));return Ed(c,i)},"isIgnoredByIgnoreFilesSync"),kT=se(e=>{if(e.some(t=>typeof t!="string"))throw new TypeError("Patterns must be a string or an array of strings")},"assertPatternsInput"),wd=se((e,t)=>{let i=Ga(e)?e.slice(1):e;return mr.default.isAbsolute(i)?i:mr.default.join(t,i)},"normalizePathForDirectoryGlob"),_d=se(({directoryPath:e,files:t,extensions:i})=>{let u=i?.length>0?`.${i.length>1?`{${i.join(",")}}`:i[0]}`:"";return t?t.map(n=>mr.default.posix.join(e,`**/${mr.default.extname(n)?n:`${n}${u}`}`)):[mr.default.posix.join(e,`**${u?`/*${u}`:""}`)]},"getDirectoryGlob"),qp=se(async(e,{cwd:t=ud.default.cwd(),files:i,extensions:u}={})=>(await Promise.all(e.map(async n=>await yT(wd(n,t))?_d({directoryPath:n,files:i,extensions:u}):n))).flat(),"directoryToGlob"),Kp=se((e,{cwd:t=ud.default.cwd(),files:i,extensions:u}={})=>e.flatMap(n=>vT(wd(n,t))?_d({directoryPath:n,files:i,extensions:u}):n),"directoryToGlobSync"),Va=se(e=>(e=[...new Set([e].flat())],kT(e),e),"toPatternsArray"),LT=se(e=>{if(!e)return;let t;try{t=sT.default.statSync(e)}catch{return}if(!t.isDirectory())throw new Error("The `cwd` option must be a path to a directory")},"checkCwdOption"),Od=se((e={})=>(e={...e,ignore:e.ignore??[],expandDirectories:e.expandDirectories??!0,cwd:$i(e.cwd)},LT(e.cwd),e),"normalizeOptions"),Rd=se(e=>async(t,i)=>e(Va(t),Od(i)),"normalizeArguments"),ji=se(e=>(t,i)=>e(Va(t),Od(i)),"normalizeArgumentsSync"),Ad=se(e=>{let{ignoreFiles:t,gitignore:i}=e,u=t?Va(t):[];return i&&u.push(CT),u},"getIgnoreFilesPatterns"),DT=se(async e=>{let t=Ad(e);return Id(t.length>0&&await xT(t,e))},"getFilter"),Cd=se(e=>{let t=Ad(e);return Id(t.length>0&&NT(t,e))},"getFilterSync"),Id=se(e=>{let t=new Set;return i=>{let u=mr.default.normalize(i.path??i);return t.has(u)||e&&e(u)?!1:(t.add(u),!0)}},"createFilterFunction"),Td=se((e,t)=>e.flat().filter(i=>t(i)),"unionFastGlobResults"),Pd=se((e,t)=>{let i=[];for(;e.length>0;){let u=e.findIndex(l=>Ga(l));if(u===-1){i.push({patterns:e,options:t});break}let n=e[u].slice(1);for(let l of i)l.options.ignore.push(n);u!==0&&i.push({patterns:e.slice(0,u),options:{...t,ignore:[...t.ignore,n]}}),e=e.slice(u+1)}return i},"convertNegativePatterns"),xd=se((e,t)=>({...t?{cwd:t}:{},...Array.isArray(e)?{files:e}:e}),"normalizeExpandDirectoriesOption"),Nd=se(async(e,t)=>{let i=Pd(e,t),{cwd:u,expandDirectories:n}=t;if(!n)return i;let l=xd(n,u);return Promise.all(i.map(async c=>{let{patterns:r,options:s}=c;return[r,s.ignore]=await Promise.all([qp(r,l),qp(s.ignore,{cwd:u})]),{patterns:r,options:s}}))},"generateTasks"),Wa=se((e,t)=>{let i=Pd(e,t),{cwd:u,expandDirectories:n}=t;if(!n)return i;let l=xd(n,u);return i.map(c=>{let{patterns:r,options:s}=c;return r=Kp(r,l),s.ignore=Kp(s.ignore,{cwd:u}),{patterns:r,options:s}})},"generateTasksSync"),$T=Rd(async(e,t)=>{let[i,u]=await Promise.all([Nd(e,t),DT(t)]),n=await Promise.all(i.map(l=>(0,ls.default)(l.patterns,l.options)));return Td(n,u)}),jT=ji((e,t)=>{let i=Wa(e,t),u=Cd(t),n=i.map(l=>ls.default.sync(l.patterns,l.options));return Td(n,u)}),V3=ji((e,t)=>{let i=Wa(e,t),u=Cd(t),n=i.map(l=>ls.default.stream(l.patterns,l.options));return dd(n).filter(l=>u(l))}),W3=ji((e,t)=>e.some(i=>ls.default.isDynamicPattern(i,t))),z3=Rd(Nd),q3=ji(Wa),{convertPathToPattern:K3}=ls.default,MT=je(Qp(),1),Jp=je(require("process"),1),BT=je(require("path"),1);function kd(e){let t=Jp.default.cwd();return e=BT.default.resolve(e),Jp.default.platform==="win32"&&(t=t.toLowerCase(),e=e.toLowerCase()),e===t}se(kd,"isPathCwd");var Na=je(require("path"),1);function Ld(e,t){let i=Na.default.relative(t,e);return!!(i&&i!==".."&&!i.startsWith(`..${Na.default.sep}`)&&i!==Na.default.resolve(e))}se(Ld,"isPathInside");async function Dd(e,t,{concurrency:i=Number.POSITIVE_INFINITY,stopOnError:u=!0,signal:n}={}){return new Promise((l,c)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(i)&&i>=1||i===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${i}\` (${typeof i})`);let r=[],s=[],o=new Map,a=!1,h=!1,p=!1,d=0,m=0,g=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),f=se(()=>{E(n.reason)},"signalListener"),y=se(()=>{n?.removeEventListener("abort",f)},"cleanup"),v=se(w=>{l(w),y()},"resolve"),E=se(w=>{a=!0,h=!0,c(w),y()},"reject");n&&(n.aborted&&E(n.reason),n.addEventListener("abort",f,{once:!0}));let b=se(async()=>{if(h)return;let w=await g.next(),_=m;if(m++,w.done){if(p=!0,d===0&&!h){if(!u&&s.length>0){E(new AggregateError(s));return}if(h=!0,o.size===0){v(r);return}let O=[];for(let[A,I]of r.entries())o.get(A)!==Xp&&O.push(I);v(O)}return}d++,(async()=>{try{let O=await w.value;if(h)return;let A=await t(O,_);A===Xp&&o.set(_,A),r[_]=A,d--,await b()}catch(O){if(u)E(O);else{s.push(O),d--;try{await b()}catch(A){E(A)}}}})()},"next");(async()=>{for(let w=0;w<i;w++){try{await b()}catch(_){E(_);break}if(p||a)break}})()})}se(Dd,"pMap");var Xp=Symbol("skip"),{toString:J3}=Object.prototype,Zp=class $d extends Error{static{se(this,"PresentableError")}constructor(t,{cause:i}={}){if(super(),t instanceof $d)return t;if(typeof t!="string")throw new TypeError("Message required.");this.name="PresentableError",this.message=t,this.cause=i}get isPresentable(){return!0}};function za(e,t){if(kd(e))throw new Zp("Cannot delete the current working directory. Can be overridden with the `force` option.");if(!Ld(e,t))throw new Zp("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option.")}se(za,"safeCheck");function qa(e){return e=Array.isArray(e)?e:[e],e=e.map(t=>Ha.default.platform==="win32"&&(0,MT.default)(t)===!1?vr(t):t),e}se(qa,"normalizePatterns");async function jd(e,{force:t,dryRun:i,cwd:u=Ha.default.cwd(),onProgress:n=se(()=>{},"onProgress"),...l}={}){l={expandDirectories:!1,onlyFiles:!1,followSymbolicLinks:!1,cwd:u,...l},e=qa(e);let c=(await $T(e,l)).sort((o,a)=>a.localeCompare(o));c.length===0&&n({totalCount:0,deletedCount:0,percent:1});let r=0,s=await Dd(c,se(async o=>(o=cd.default.resolve(u,o),t||za(o,u),i||await rT.default.rm(o,{recursive:!0,force:!0}),r+=1,n({totalCount:c.length,deletedCount:r,percent:r/c.length,path:o}),o),"mapper"),l);return s.sort((o,a)=>o.localeCompare(a)),s}se(jd,"deleteAsync");function Md(e,{force:t,dryRun:i,cwd:u=Ha.default.cwd(),...n}={}){n={expandDirectories:!1,onlyFiles:!1,followSymbolicLinks:!1,cwd:u,...n},e=qa(e);let l=jT(e,n).sort((c,r)=>r.localeCompare(c)).map(c=>(c=cd.default.resolve(u,c),t||za(c,u),i||tT.default.rmSync(c,{recursive:!0,force:!0}),c));return l.sort((c,r)=>c.localeCompare(r)),l}se(Md,"deleteSync");});var cs=me((CV,Zd)=>{var Za=Object.defineProperty,UT=Object.getOwnPropertyDescriptor,FT=Object.getOwnPropertyNames,HT=Object.prototype.hasOwnProperty,GT=(e,t)=>{for(var i in t)Za(e,i,{get:t[i],enumerable:!0})},VT=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of FT(t))!HT.call(e,n)&&n!==i&&Za(e,n,{get:()=>t[n],enumerable:!(u=UT(t,n))||u.enumerable});return e},WT=e=>VT(Za({},"__esModule",{value:!0}),e),Fd={};GT(Fd,{findUp:()=>XT,findUpSync:()=>ZT,invalidatePathCache:()=>Kd,isDir:()=>YT,isDirEmptySync:()=>zd,isDirSync:()=>QT,isSymLinkSync:()=>eP,readDirNames:()=>rP,readDirNamesSync:()=>sP,readFileBinary:()=>iP,readFileBinarySync:()=>oP,readFileUtf8:()=>nP,readFileUtf8Sync:()=>aP,readJson:()=>lP,readJsonSync:()=>cP,safeDelete:()=>uP,safeDeleteSync:()=>hP,safeReadFile:()=>pP,safeReadFileSync:()=>dP,safeStats:()=>Jd,safeStatsSync:()=>Xd,uniqueSync:()=>fP,validateFiles:()=>tP,writeJson:()=>gP,writeJsonSync:()=>mP});Zd.exports=WT(Fd);var zT=lr(),Bi=cr(),Ud=ep(),Hd=gp(),qT=Zt(),st=fr(),KT=Oa(),JT=Fo(),Ui=(0,zT.getAbortSignal)(),Gd=(0,qT.objectFreeze)({__proto__:null,force:!0,maxRetries:3,recursive:!0,retryDelay:200}),Ja;function Be(){return Ja===void 0&&(Ja=require("fs")),Ja}var Xa;function tr(){return Xa===void 0&&(Xa=require("path")),Xa}function Vd(e,t,i){let{ignore:u,includeEmpty:n=!0,sort:l=!0}={__proto__:null,...i},c=tr(),r=e.filter(s=>s.isDirectory()&&(n||!zd(c.join(t||s.parentPath,s.name),{ignore:u}))).map(s=>s.name);return l?r.sort(JT.naturalCompare):r}function Wd(e,t,i,u,n=2){let l=i?t:"";return`${JSON.stringify(e,u,n).replace(/\n/g,t)}${l}`}async function XT(e,t){let{cwd:i=process.cwd(),signal:u=Ui}={__proto__:null,...t},{onlyDirectories:n=!1,onlyFiles:l=!0}={__proto__:null,...t};n&&(l=!1),l&&(n=!1);let c=Be(),r=tr(),s=r.resolve(i),{root:o}=r.parse(s),a=(0,Bi.isArray)(e)?e:[e];for(;s&&s!==o;){for(let h of a){if(u?.aborted)return;let p=r.join(s,h);try{let d=await c.promises.stat(p);if(!n&&d.isFile()||!l&&d.isDirectory())return(0,st.normalizePath)(p)}catch{}}s=r.dirname(s)}}function ZT(e,t){let{cwd:i=process.cwd(),stopAt:u}={__proto__:null,...t},{onlyDirectories:n=!1,onlyFiles:l=!0}={__proto__:null,...t};n&&(l=!1),l&&(n=!1);let c=Be(),r=tr(),s=r.resolve(i),{root:o}=r.parse(s),a=u?r.resolve(u):void 0,h=(0,Bi.isArray)(e)?e:[e];for(;s&&s!==o;){if(a&&s===a){for(let p of h){let d=r.join(s,p);try{let m=c.statSync(d);if(!n&&m.isFile()||!l&&m.isDirectory())return(0,st.normalizePath)(d)}catch{}}return}for(let p of h){let d=r.join(s,p);try{let m=c.statSync(d);if(!n&&m.isFile()||!l&&m.isDirectory())return(0,st.normalizePath)(d)}catch{}}s=r.dirname(s)}}async function YT(e){return!!(await Jd(e))?.isDirectory()}function QT(e){return!!Xd(e)?.isDirectory()}function zd(e,t){let{ignore:i=Ud.defaultIgnore}={__proto__:null,...t},u=Be();try{let n=u.readdirSync(e),{length:l}=n;if(l===0)return!0;let c=(0,Ud.getGlobMatcher)(i,{cwd:(0,st.pathLikeToString)(e)}),r=0;for(let s=0;s<l;s+=1){let o=n[s];o&&c(o)&&(r+=1)}return r===l}catch{return!1}}function eP(e){let t=Be();try{return t.lstatSync(e).isSymbolicLink()}catch{}return!1}function tP(e){let t=Be(),i=[],u=[],{R_OK:n}=t.constants;for(let l of e)try{t.accessSync(l,n),i.push(l)}catch{u.push(l)}return{__proto__:null,validPaths:i,invalidPaths:u}}async function rP(e,t){let i=Be();try{return Vd(await i.promises.readdir(e,{__proto__:null,encoding:"utf8",withFileTypes:!0}),String(e),t)}catch{}return[]}function sP(e,t){let i=Be();try{return Vd(i.readdirSync(e,{__proto__:null,encoding:"utf8",withFileTypes:!0}),String(e),t)}catch{}return[]}async function iP(e,t){let i=typeof t=="string"?{encoding:t}:t;return await Be().promises.readFile(e,{signal:Ui,...i,encoding:null})}async function nP(e,t){let i=typeof t=="string"?{encoding:t}:t;return await Be().promises.readFile(e,{signal:Ui,...i,encoding:"utf8"})}function oP(e,t){let i=typeof t=="string"?{encoding:t}:t;return Be().readFileSync(e,{...i,encoding:null})}function aP(e,t){let i=typeof t=="string"?{encoding:t}:t;return Be().readFileSync(e,{...i,encoding:"utf8"})}async function lP(e,t){let i=typeof t=="string"?{encoding:t}:t,{reviver:u,throws:n,...l}={__proto__:null,...i},c=n===void 0||!!n,r=Be(),s="";try{s=await r.promises.readFile(e,{__proto__:null,encoding:"utf8",...l})}catch(o){if(c){let a=o.code;throw a==="ENOENT"?new Error(`JSON file not found: ${e}
8
- Ensure the file exists or create it with the expected structure.`,{cause:o}):a==="EACCES"||a==="EPERM"?new Error(`Permission denied reading JSON file: ${e}
9
- Check file permissions or run with appropriate access.`,{cause:o}):o}return}return(0,Hd.jsonParse)(s,{filepath:String(e),reviver:u,throws:c})}function cP(e,t){let i=typeof t=="string"?{encoding:t}:t,{reviver:u,throws:n,...l}={__proto__:null,...i},c=n===void 0||!!n,r=Be(),s="";try{s=r.readFileSync(e,{__proto__:null,encoding:"utf8",...l})}catch(o){if(c){let a=o.code;throw a==="ENOENT"?new Error(`JSON file not found: ${e}
10
- Ensure the file exists or create it with the expected structure.`,{cause:o}):a==="EACCES"||a==="EPERM"?new Error(`Permission denied reading JSON file: ${e}
11
- Check file permissions or run with appropriate access.`,{cause:o}):o}return}return(0,Hd.jsonParse)(s,{filepath:String(e),reviver:u,throws:c})}var Mi;function qd(){if(Mi===void 0){let e=tr(),{getOsTmpDir:t,getSocketCacacheDir:i,getSocketUserDir:u}=Pi();Mi=[e.resolve(t()),e.resolve(i()),e.resolve(u())]}return Mi}function Kd(){Mi=void 0}(0,KT.registerCacheInvalidation)(Kd);async function uP(e,t){let i=Ka(),{deleteAsync:u}=i,n={__proto__:null,...t},l=(0,Bi.isArray)(e)?e.map(st.pathLikeToString):[(0,st.pathLikeToString)(e)],c=n.force!==!1;if(!c&&l.length>0){let r=tr(),s=qd();l.every(o=>{let a=r.resolve(o);for(let h of s){let p=a.startsWith(h+r.sep)||a===h,d=r.relative(h,a).startsWith("..");if(p&&!d)return!0}return!1})&&(c=!0)}await u(l,{concurrency:n.maxRetries||Gd.maxRetries,dryRun:!1,force:c,onlyFiles:!1})}function hP(e,t){let i=Ka(),{deleteSync:u}=i,n={__proto__:null,...t},l=(0,Bi.isArray)(e)?e.map(st.pathLikeToString):[(0,st.pathLikeToString)(e)],c=n.force!==!1;if(!c&&l.length>0){let r=tr(),s=qd();l.every(o=>{let a=r.resolve(o);for(let h of s){let p=a.startsWith(h+r.sep)||a===h,d=r.relative(h,a).startsWith("..");if(p&&!d)return!0}return!1})&&(c=!0)}u(l,{concurrency:n.maxRetries||Gd.maxRetries,dryRun:!1,force:c,onlyFiles:!1})}async function pP(e,t){let i=typeof t=="string"?{encoding:t}:t,u=Be();try{return await u.promises.readFile(e,{signal:Ui,...i})}catch{}}async function Jd(e){let t=Be();try{return await t.promises.stat(e)}catch{}}function Xd(e,t){let i=typeof t=="string"?{encoding:t}:t,u=Be();try{return u.statSync(e,{__proto__:null,throwIfNoEntry:!1,...i})}catch{}}function dP(e,t){let i=typeof t=="string"?{encoding:t}:t,u=Be();try{return u.readFileSync(e,{__proto__:null,...i})}catch{}}function fP(e){let t=Be(),i=tr(),u=String(e);if(!t.existsSync(u))return(0,st.normalizePath)(u);let n=i.dirname(u),l=i.extname(u),c=i.basename(u,l),r=1,s;do s=i.join(n,`${c}-${r}${l}`),r++;while(t.existsSync(s));return(0,st.normalizePath)(s)}async function gP(e,t,i){let u=typeof i=="string"?{encoding:i}:i,{EOL:n,finalEOL:l,replacer:c,spaces:r,...s}={__proto__:null,...u},o=Be(),a=Wd(t,n||`
12
- `,l!==void 0?l:!0,c,r);await o.promises.writeFile(e,a,{encoding:"utf8",...s,__proto__:null})}function mP(e,t,i){let u=typeof i=="string"?{encoding:i}:i,{EOL:n,finalEOL:l,replacer:c,spaces:r,...s}={__proto__:null,...u},o=Be(),a=Wd(t,n||`
13
- `,l!==void 0?l:!0,c,r);o.writeFileSync(e,a,{encoding:"utf8",...s,__proto__:null})}});var rf=me((IV,tf)=>{"use strict";var yP=Object.defineProperty,$e=(e,t)=>yP(e,"name",{value:t,configurable:!0}),Er=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vP=Er(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=void 0;var t=require("fs"),i=require("internal/fs/promises"),u=$e(async(r,s={})=>{let{ignoreErrors:o=!1}=s;try{return l(await(0,i.stat)(r),s)}catch(a){let h=a;if(o||h.code==="EACCES")return!1;throw h}},"isexe");e.isexe=u;var n=$e((r,s={})=>{let{ignoreErrors:o=!1}=s;try{return l((0,t.statSync)(r),s)}catch(a){let h=a;if(o||h.code==="EACCES")return!1;throw h}},"sync");e.sync=n;var l=$e((r,s)=>r.isFile()&&c(r,s),"checkStat"),c=$e((r,s)=>{let o=s.uid??process.getuid?.(),a=s.groups??process.getgroups?.()??[],h=s.gid??process.getgid?.()??a[0];if(o===void 0||h===void 0)throw new Error("cannot get uid or gid");let p=new Set([h,...a]),d=r.mode,m=r.uid,g=r.gid,f=parseInt("100",8),y=parseInt("010",8),v=parseInt("001",8),E=f|y;return!!(d&v||d&y&&p.has(g)||d&f&&m===o||d&E&&o===0)},"checkMode")}),SP=Er(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=void 0;var t=require("fs"),i=require("internal/fs/promises"),u=$e(async(r,s={})=>{let{ignoreErrors:o=!1}=s;try{return c(await(0,i.stat)(r),r,s)}catch(a){let h=a;if(o||h.code==="EACCES")return!1;throw h}},"isexe");e.isexe=u;var n=$e((r,s={})=>{let{ignoreErrors:o=!1}=s;try{return c((0,t.statSync)(r),r,s)}catch(a){let h=a;if(o||h.code==="EACCES")return!1;throw h}},"sync");e.sync=n;var l=$e((r,s)=>{let{pathExt:o=process.env.PATHEXT||""}=s,a=o.split(";");if(a.indexOf("")!==-1)return!0;for(let h=0;h<a.length;h++){let p=a[h].toLowerCase(),d=r.substring(r.length-p.length).toLowerCase();if(p&&d===p)return!0}return!1},"checkPathExt"),c=$e((r,s,o)=>r.isFile()&&l(s,o),"checkStat")}),EP=Er(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),bP=Er(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(o,a,h,p){p===void 0&&(p=h);var d=Object.getOwnPropertyDescriptor(a,h);(!d||("get"in d?!a.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:$e(function(){return a[h]},"get")}),Object.defineProperty(o,p,d)}:function(o,a,h,p){p===void 0&&(p=h),o[p]=a[h]}),i=e&&e.__setModuleDefault||(Object.create?function(o,a){Object.defineProperty(o,"default",{enumerable:!0,value:a})}:function(o,a){o.default=a}),u=e&&e.__importStar||function(o){if(o&&o.__esModule)return o;var a={};if(o!=null)for(var h in o)h!=="default"&&Object.prototype.hasOwnProperty.call(o,h)&&t(a,o,h);return i(a,o),a},n=e&&e.__exportStar||function(o,a){for(var h in o)h!=="default"&&!Object.prototype.hasOwnProperty.call(a,h)&&t(a,o,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=e.posix=e.win32=void 0;var l=u(vP());e.posix=l;var c=u(SP());e.win32=c,n(EP(),e);var r=process.env._ISEXE_TEST_PLATFORM_||process.platform,s=r==="win32"?c:l;e.isexe=s.isexe,e.sync=s.sync}),wP=Er((e,t)=>{var{isexe:i,sync:u}=bP(),{join:n,delimiter:l,sep:c,posix:r}=require("path"),s=process.platform==="win32",o=new RegExp(`[${r.sep}${c===r.sep?"":c}]`.replace(/(\\)/g,"\\$1")),a=new RegExp(`^\\.${o.source}`),h=$e(f=>Object.assign(new Error(`not found: ${f}`),{code:"ENOENT"}),"getNotFoundError"),p=$e((f,{path:y=process.env.PATH,pathExt:v=process.env.PATHEXT,delimiter:E=l})=>{let b=f.match(o)?[""]:[...s?[process.cwd()]:[],...(y||"").split(E)];if(s){let w=v||[".EXE",".CMD",".BAT",".COM"].join(E),_=w.split(E).flatMap(O=>[O,O.toLowerCase()]);return f.includes(".")&&_[0]!==""&&_.unshift(""),{pathEnv:b,pathExt:_,pathExtExe:w}}return{pathEnv:b,pathExt:[""]}},"getPathInfo"),d=$e((f,y)=>{let v=/^".*"$/.test(f)?f.slice(1,-1):f;return(!v&&a.test(y)?y.slice(0,2):"")+n(v,y)},"getPathPart"),m=$e(async(f,y={})=>{let{pathEnv:v,pathExt:E,pathExtExe:b}=p(f,y),w=[];for(let _ of v){let O=d(_,f);for(let A of E){let I=O+A;if(await i(I,{pathExt:b,ignoreErrors:!0})){if(!y.all)return I;w.push(I)}}}if(y.all&&w.length)return w;if(y.nothrow)return null;throw h(f)},"which"),g=$e((f,y={})=>{let{pathEnv:v,pathExt:E,pathExtExe:b}=p(f,y),w=[];for(let _ of v){let O=d(_,f);for(let A of E){let I=O+A;if(u(I,{pathExt:b,ignoreErrors:!0})){if(!y.all)return I;w.push(I)}}}if(y.all&&w.length)return w;if(y.nothrow)return null;throw h(f)},"whichSync");t.exports=m,m.sync=g}),_P=Er((e,t)=>{"use strict";var i=$e((n,l)=>{if(!n.length)return'""';let c;if(!/[ \t\n\v"]/.test(n))c=n;else{c='"';for(let r=0;r<=n.length;++r){let s=0;for(;n[r]==="\\";)++r,++s;if(r===n.length){c+="\\".repeat(s*2);break}n[r]==='"'?(c+="\\".repeat(s*2+1),c+=n[r]):(c+="\\".repeat(s),c+=n[r])}c+='"'}return c=c.replace(/[ !%^&()<>|"]/g,"^$&"),l&&(c=c.replace(/[ !%^&()<>|"]/g,"^$&")),c},"cmd"),u=$e(n=>n.length?/[\t\n\r "#$&'()*;<>?\\`|~]/.test(n)?`'${n.replace(/'/g,"'\\''")}'`.replace(/^(?:'')+(?!$)/,"").replace(/\\'''/g,"\\'"):n:"''","sh");t.exports={cmd:i,sh:u}}),{spawn:OP}=require("internal/child_process"),RP=require("os"),AP=wP(),Yd=_P(),Qa=$e((e,t,i={},u={})=>{if(i.shell)return ef(e,t,i,u);let n,l,c=new Promise((d,m)=>{n=d,l=m}),r=new Error("command failed"),s=[],o=[],a=$e(d=>({cmd:e,args:t,...d,...IP(s,o,i),...u}),"getResult"),h=$e((d,m)=>{let g=a(m);l(Object.assign(d,g))},"rejectWithOpts"),p=OP(e,t,i);return c.stdin=p.stdin,c.process=p,p.on("error",h),p.stdout&&(p.stdout.on("data",d=>s.push(d)),p.stdout.on("error",h)),p.stderr&&(p.stderr.on("data",d=>o.push(d)),p.stderr.on("error",h)),p.on("close",(d,m)=>{d||m?h(r,{code:d,signal:m}):n(a({code:d,signal:m}))}),c},"promiseSpawn"),ef=$e((e,t,i,u)=>{let n=i.shell;n===!0&&(n=process.platform==="win32"?process.env.ComSpec||"cmd.exe":"sh");let l={...i,shell:!1},c=[],r=e;if(/(?:^|\\)cmd(?:\.exe)?$/i.test(n)){let s=!1,o="",a=!1;for(let p=0;p<e.length;++p){let d=e.charAt(p);if(d===" "&&!a)break;o+=d,(d==='"'||d==="'")&&(a=!a)}let h;try{h=AP.sync(o,{path:l.env&&Qd(l.env,"PATH")||process.env.PATH,pathext:l.env&&Qd(l.env,"PATHEXT")||process.env.PATHEXT}).toLowerCase()}catch{h=o.toLowerCase()}s=h.endsWith(".cmd")||h.endsWith(".bat");for(let p of t)r+=` ${Yd.cmd(p,s)}`;c.push("/d","/s","/c",r),l.windowsVerbatimArguments=!0}else{for(let s of t)r+=` ${Yd.sh(s)}`;c.push("-c",r)}return Qa(n,c,l,u)},"spawnWithShell"),CP=$e((e,t={},i={})=>{let u={...t,shell:!0},n=[].concat(e),l=process.platform;if(l==="linux"&&RP.release().toLowerCase().includes("microsoft")&&(l="wsl",!process.env.BROWSER))return Promise.reject(new Error("Set the BROWSER environment variable to your desired browser."));let c=u.command;return c||(l==="win32"?(u.shell=process.env.ComSpec,c='start ""'):l==="wsl"?c="sensible-browser":l==="darwin"?c="open":c="xdg-open"),ef(c,n,u,i)},"open");Qa.open=CP;var Ya=$e((e="pipe",t)=>e==="pipe"||e===null?!0:Array.isArray(e)?Ya(e[t],t):!1,"isPipe"),IP=$e((e,t,{stdioString:i=!0,stdio:u})=>{let n={stdout:null,stderr:null};return Ya(u,1)&&(n.stdout=Buffer.concat(e),i&&(n.stdout=n.stdout.toString().trim())),Ya(u,2)&&(n.stderr=Buffer.concat(t),i&&(n.stderr=n.stderr.toString().trim())),n},"stdioResult"),Qd=$e((e,t)=>{t=t.toLowerCase();for(let i of Object.keys(e).sort())if(i.toLowerCase()===t)return e[i]},"findInObject");tf.exports=Qa});var Fi=me((TV,cf)=>{var nl=Object.defineProperty,TP=Object.getOwnPropertyDescriptor,PP=Object.getOwnPropertyNames,xP=Object.prototype.hasOwnProperty,NP=(e,t)=>{for(var i in t)nl(e,i,{get:t[i],enumerable:!0})},kP=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of PP(t))!xP.call(e,n)&&n!==i&&nl(e,n,{get:()=>t[n],enumerable:!(u=TP(t,n))||u.enumerable});return e},LP=e=>kP(nl({},"__esModule",{value:!0}),e),nf={};NP(nf,{isSpawnError:()=>UP,isStdioType:()=>sl,spawn:()=>FP,spawnSync:()=>HP});cf.exports=LP(nf);var of=lr(),DP=cr(),us=Zt(),sf=Qt(),$P=(0,of.getAbortSignal)(),jP=(0,of.getSpinner)(),af=/\.(?:cmd|bat|ps1)$/i,el;function MP(){return el===void 0&&(el=require("internal/child_process")),el}var tl;function BP(){return tl===void 0&&(tl=rf()),tl}var rl;function lf(){return rl===void 0&&(rl=require("path")),rl}function UP(e){if(e===null||typeof e!="object")return!1;let t=e;return(0,us.hasOwn)(t,"code")&&typeof t.code<"u"||(0,us.hasOwn)(t,"errno")&&typeof t.errno<"u"||(0,us.hasOwn)(t,"syscall")&&typeof t.syscall=="string"}function sl(e,t){return arguments.length===1?typeof e=="string"&&["pipe","ignore","inherit","overlapped"].includes(e):e===t||e==null&&t==="pipe"||(0,DP.isArray)(e)&&e.length>2&&e[0]===t&&e[1]===t&&e[2]===t}function il(e){let t=e,{stderr:i,stdout:u}=t;return typeof u=="string"&&(t.stdout=(0,sf.stripAnsi)(u)),typeof i=="string"&&(t.stderr=(0,sf.stripAnsi)(i)),t}function FP(e,t,i,u){let n=(0,us.getOwn)(i,"shell"),l=process.platform==="win32",c=e;if(l&&n&&af.test(c)){let _=lf();c=_.basename(c,_.extname(c))}let{spinner:r=jP,stripAnsi:s=!0,...o}={__proto__:null,...i},a=r,{env:h,stdio:p,stdioString:d=!0}=o,m=!!a?.isSpinning&&!sl(p,"ignore")&&!sl(p,"pipe"),g=m;m&&a.stop();let f=BP(),y=h?{__proto__:null,...process.env,...h}:process.env,v={__proto__:null,cwd:typeof o.cwd=="string"?o.cwd:void 0,env:y,signal:$P,stdio:o.stdio,stdioString:d,shell:o.shell,timeout:o.timeout,uid:o.uid,gid:o.gid},E=f(c,t?[...t]:[],v,u),b=E,w;return s&&d?w=E.then(_=>{let O=il(_);return"code"in O&&(O.exitCode=O.code),O}).catch(_=>{throw il(_)}):w=E.then(_=>{if("code"in _){let O=_;return O.exitCode=_.code,O}return _}),g&&(w=w.finally(()=>{a.start()})),w.process=b.process,w.stdin=b.stdin,w}function HP(e,t,i){let u=(0,us.getOwn)(i,"shell"),n=process.platform==="win32",l=e;if(n&&u&&af.test(l)){let p=lf();l=p.basename(l,p.extname(l))}let{stripAnsi:c=!0,...r}={__proto__:null,...i},{stdioString:s=!0}=r,o={encoding:s?"utf8":"buffer",...r},a=o.encoding!=="buffer",h=MP().spawnSync(l,t,o);if(a){let{stderr:p,stdout:d}=h;d&&(h.stdout=d.toString().trim()),p&&(h.stderr=p.toString().trim())}return c&&a?il(h):h}});var Sf=me((PV,vf)=>{var GP=Object.defineProperty,et=(e,t)=>GP(e,"name",{value:t,configurable:!0}),Hi=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),VP=Hi(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=void 0;var t=require("fs"),i=require("internal/fs/promises"),u=et(async(r,s={})=>{let{ignoreErrors:o=!1}=s;try{return l(await(0,i.stat)(r),s)}catch(a){let h=a;if(o||h.code==="EACCES")return!1;throw h}},"isexe");e.isexe=u;var n=et((r,s={})=>{let{ignoreErrors:o=!1}=s;try{return l((0,t.statSync)(r),s)}catch(a){let h=a;if(o||h.code==="EACCES")return!1;throw h}},"sync");e.sync=n;var l=et((r,s)=>r.isFile()&&c(r,s),"checkStat"),c=et((r,s)=>{let o=s.uid??process.getuid?.(),a=s.groups??process.getgroups?.()??[],h=s.gid??process.getgid?.()??a[0];if(o===void 0||h===void 0)throw new Error("cannot get uid or gid");let p=new Set([h,...a]),d=r.mode,m=r.uid,g=r.gid,f=parseInt("100",8),y=parseInt("010",8),v=parseInt("001",8),E=f|y;return!!(d&v||d&y&&p.has(g)||d&f&&m===o||d&E&&o===0)},"checkMode")}),WP=Hi(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=void 0;var t=require("fs"),i=require("internal/fs/promises"),u=et(async(r,s={})=>{let{ignoreErrors:o=!1}=s;try{return c(await(0,i.stat)(r),r,s)}catch(a){let h=a;if(o||h.code==="EACCES")return!1;throw h}},"isexe");e.isexe=u;var n=et((r,s={})=>{let{ignoreErrors:o=!1}=s;try{return c((0,t.statSync)(r),r,s)}catch(a){let h=a;if(o||h.code==="EACCES")return!1;throw h}},"sync");e.sync=n;var l=et((r,s)=>{let{pathExt:o=process.env.PATHEXT||""}=s,a=o.split(";");if(a.indexOf("")!==-1)return!0;for(let h=0;h<a.length;h++){let p=a[h].toLowerCase(),d=r.substring(r.length-p.length).toLowerCase();if(p&&d===p)return!0}return!1},"checkPathExt"),c=et((r,s,o)=>r.isFile()&&l(s,o),"checkStat")}),zP=Hi(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),qP=Hi(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(o,a,h,p){p===void 0&&(p=h);var d=Object.getOwnPropertyDescriptor(a,h);(!d||("get"in d?!a.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:et(function(){return a[h]},"get")}),Object.defineProperty(o,p,d)}:function(o,a,h,p){p===void 0&&(p=h),o[p]=a[h]}),i=e&&e.__setModuleDefault||(Object.create?function(o,a){Object.defineProperty(o,"default",{enumerable:!0,value:a})}:function(o,a){o.default=a}),u=e&&e.__importStar||function(o){if(o&&o.__esModule)return o;var a={};if(o!=null)for(var h in o)h!=="default"&&Object.prototype.hasOwnProperty.call(o,h)&&t(a,o,h);return i(a,o),a},n=e&&e.__exportStar||function(o,a){for(var h in o)h!=="default"&&!Object.prototype.hasOwnProperty.call(a,h)&&t(a,o,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=e.posix=e.win32=void 0;var l=u(VP());e.posix=l;var c=u(WP());e.win32=c,n(zP(),e);var r=process.env._ISEXE_TEST_PLATFORM_||process.platform,s=r==="win32"?c:l;e.isexe=s.isexe,e.sync=s.sync}),{isexe:KP,sync:JP}=qP(),{join:XP,delimiter:ZP,sep:uf,posix:hf}=require("path"),pf=process.platform==="win32",df=new RegExp(`[${hf.sep}${uf===hf.sep?"":uf}]`.replace(/(\\)/g,"\\$1")),YP=new RegExp(`^\\.${df.source}`),ff=et(e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),"getNotFoundError"),gf=et((e,{path:t=process.env.PATH,pathExt:i=process.env.PATHEXT,delimiter:u=ZP})=>{let n=e.match(df)?[""]:[...pf?[process.cwd()]:[],...(t||"").split(u)];if(pf){let l=i||[".EXE",".CMD",".BAT",".COM"].join(u),c=l.split(u).flatMap(r=>[r,r.toLowerCase()]);return e.includes(".")&&c[0]!==""&&c.unshift(""),{pathEnv:n,pathExt:c,pathExtExe:l}}return{pathEnv:n,pathExt:[""]}},"getPathInfo"),mf=et((e,t)=>{let i=/^".*"$/.test(e)?e.slice(1,-1):e;return(!i&&YP.test(t)?t.slice(0,2):"")+XP(i,t)},"getPathPart"),yf=et(async(e,t={})=>{let{pathEnv:i,pathExt:u,pathExtExe:n}=gf(e,t),l=[];for(let c of i){let r=mf(c,e);for(let s of u){let o=r+s;if(await KP(o,{pathExt:n,ignoreErrors:!0})){if(!t.all)return o;l.push(o)}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw ff(e)},"which"),QP=et((e,t={})=>{let{pathEnv:i,pathExt:u,pathExtExe:n}=gf(e,t),l=[];for(let c of i){let r=mf(c,e);for(let s of u){let o=r+s;if(JP(o,{pathExt:n,ignoreErrors:!0})){if(!t.all)return o;l.push(o)}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw ff(e)},"whichSync");vf.exports=yf;yf.sync=QP});var Rf=me((xV,Of)=>{var ul=Object.defineProperty,ex=Object.getOwnPropertyDescriptor,tx=Object.getOwnPropertyNames,rx=Object.prototype.hasOwnProperty,sx=(e,t)=>{for(var i in t)ul(e,i,{get:t[i],enumerable:!0})},ix=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of tx(t))!rx.call(e,n)&&n!==i&&ul(e,n,{get:()=>t[n],enumerable:!(u=ex(t,n))||u.enumerable});return e},nx=e=>ix(ul({},"__esModule",{value:!0}),e),bf={};sx(bf,{execBin:()=>lx,findRealBin:()=>zi,findRealNpm:()=>ux,findRealPnpm:()=>hx,findRealYarn:()=>px,isShadowBinPath:()=>cl,resolveBinPathSync:()=>br,which:()=>cx,whichBin:()=>_f,whichBinSync:()=>dl,whichSync:()=>wf});Of.exports=nx(bf);var Vi=ho(),Gi=fo(),ox=sh(),hl=ti(),Ef=cs(),Wt=fr(),ax=Fi(),ol;function pl(){return ol===void 0&&(ol=require("fs")),ol}var al;function hs(){return al===void 0&&(al=require("path")),al}var ll;function Wi(){return ll===void 0&&(ll=Sf()),ll}async function lx(e,t,i){let u=(0,Wt.isPath)(e)?br(e):await _f(e);if(!u){let l=new Error(`Binary not found: ${e}
14
- Possible causes:
15
- - Binary "${e}" is not installed or not in PATH
16
- - Binary name is incorrect or misspelled
17
- - Installation directory is not in system PATH
18
- To resolve:
19
- 1. Verify "${e}" is installed: which ${e} (Unix) or where ${e} (Windows)
20
- 2. Install the binary if missing, ex: npm install -g ${e}
21
- 3. Check PATH environment variable includes the binary location`);throw l.code="ENOENT",l}let n=Array.isArray(u)?u[0]:u;return await(0,ax.spawn)(n,t??[],{shell:hl.WIN32,...i})}async function cx(e,t){return await Wi()(e,t)}function wf(e,t){return Wi().sync(e,t)}async function _f(e,t){let i=Wi(),u={nothrow:!0,...t},n=await i(e,u);if(u?.all){let l=Array.isArray(n)?n:typeof n=="string"?[n]:void 0;return l?.length?l.map(c=>br(c)):l}if(n)return br(n)}function dl(e,t){let i={nothrow:!0,...t},u=wf(e,i);if(i.all){let n=Array.isArray(u)?u:typeof u=="string"?[u]:void 0;return n?.length?n.map(l=>br(l)):n}if(u)return br(u)}function cl(e){return e?e.replace(/\\/g,"/").includes("node_modules/.bin"):!1}function zi(e,t=[]){let i=pl(),u=hs(),n=Wi();for(let c of t)if(i?.existsSync(c))return c;let l=n?.sync(e,{nothrow:!0});if(l){let c=u?.dirname(l);if(cl(c)){let r=n?.sync(e,{all:!0,nothrow:!0})||[],s=Array.isArray(r)?r:typeof r=="string"?[r]:[];for(let o of s){let a=u?.dirname(o);if(!cl(a))return o}}return l}}function ux(){let e=pl(),t=hs(),i=t?.dirname(process.execPath),u=t?.join(i,"npm");if(e?.existsSync(u))return u;let n=zi("npm",["/usr/local/bin/npm","/usr/bin/npm"]);if(n&&e?.existsSync(n))return n;let l=dl("npm",{nothrow:!0});return l&&typeof l=="string"&&e?.existsSync(l)?l:"npm"}function hx(){let e=hs(),t=hl.WIN32?[e?.join((0,Gi.getAppdata)(),"npm","pnpm.cmd"),e?.join((0,Gi.getAppdata)(),"npm","pnpm"),e?.join((0,Gi.getLocalappdata)(),"pnpm","pnpm.cmd"),e?.join((0,Gi.getLocalappdata)(),"pnpm","pnpm"),"C:\\Program Files\\nodejs\\pnpm.cmd","C:\\Program Files\\nodejs\\pnpm"].filter(Boolean):["/usr/local/bin/pnpm","/usr/bin/pnpm",e?.join((0,ox.getXdgDataHome)()||`${(0,Vi.getHome)()}/.local/share`,"pnpm/pnpm"),e?.join((0,Vi.getHome)(),".pnpm/pnpm")].filter(Boolean);return zi("pnpm",t)??""}function px(){let e=hs(),t=["/usr/local/bin/yarn","/usr/bin/yarn",e?.join((0,Vi.getHome)(),".yarn/bin/yarn"),e?.join((0,Vi.getHome)(),".config/yarn/global/node_modules/.bin/yarn")].filter(Boolean);return zi("yarn",t)??""}function br(e){let t=pl(),i=hs();if(!i?.isAbsolute(e))try{let r=dl(e);r&&(e=r)}catch{}if(e=(0,Wt.normalizePath)(e),e===".")return e;let u=i?.extname(e),n=u.toLowerCase(),l=i?.basename(e,u),c=l==="node"?-1:/(?<=\/)\.volta\//i.exec(e)?.index??-1;if(c!==-1){let r=e.slice(0,c),s=i?.join(r,"tools"),o=i?.join(s,"image"),a=i?.join(s,"user"),h=(0,Ef.readJsonSync)(i?.join(a,"platform.json"),{throws:!1}),p=h?.node?.runtime,d=h?.node?.npm,m="";if(l==="npm"||l==="npx"){if(d){let g=`bin/${l}-cli.js`;m=i?.join(o,`npm/${d}/${g}`),p&&!t?.existsSync(m)&&(m=i?.join(o,`node/${p}/lib/node_modules/npm/${g}`),t?.existsSync(m)||(m=""))}}else{let g=i?.join(a,"bin"),f=(0,Ef.readJsonSync)(i?.join(g,`${l}.json`),{throws:!1})?.package;f&&(m=i?.join(o,`packages/${f}/bin/${l}`),t?.existsSync(m)||(m=`${m}.cmd`,t?.existsSync(m)||(m="")))}if(m){try{return(0,Wt.normalizePath)(t?.realpathSync.native(m))}catch{}return m}}if(hl.WIN32){let r=n===""||n===".cmd"||n===".exe"||n===".ps1",s=l==="npm"||l==="npx",o=l==="pnpm"||l==="yarn";if(r&&s){let h=i?.join(i?.dirname(e),`node_modules/npm/bin/${l}-cli.js`);if(t?.existsSync(h)){try{return t?.realpathSync.native(h)}catch{}return h}}let a="";if(r&&n!==".exe"&&t?.existsSync(e)){let h=t?.readFileSync(e,"utf8");s?n===".cmd"?a=l==="npm"?/(?<="NPM_CLI_JS=%~dp0\\).*(?=")/.exec(h)?.[0]||"":/(?<="NPX_CLI_JS=%~dp0\\).*(?=")/.exec(h)?.[0]||"":n===""?a=l==="npm"?/(?<=NPM_CLI_JS="\$CLI_BASEDIR\/).*(?=")/.exec(h)?.[0]||"":/(?<=NPX_CLI_JS="\$CLI_BASEDIR\/).*(?=")/.exec(h)?.[0]||"":n===".ps1"&&(a=l==="npm"?/(?<=\$NPM_CLI_JS="\$PSScriptRoot\/).*(?=")/.exec(h)?.[0]||"":/(?<=\$NPX_CLI_JS="\$PSScriptRoot\/).*(?=")/.exec(h)?.[0]||""):o?n===".cmd"?(a=/(?<=node\s+")%~dp0\\([^"]+)(?="\s+%\*)/.exec(h)?.[1]||"",a||(a=/(?<="%~dp0\\[^"]*node[^"]*"\s+")%~dp0\\([^"]+)(?="\s+%\*)/.exec(h)?.[1]||""),a||(a=/(?<="%dp0%\\).*(?=" %\*\r\n)/.exec(h)?.[0]||"")):n===""?(a=/(?<="\$basedir\/)\.tools\/pnpm\/[^"]+(?="\s+"\$@")/.exec(h)?.[0]||"",a||(a=/(?<=exec\s+node\s+"\$basedir\/)\.tools\/pnpm\/[^"]+(?="\s+"\$@")/.exec(h)?.[0]||""),a||(a=/(?<="\$basedir\/).*(?=" "\$@"\n)/.exec(h)?.[0]||"")):n===".ps1"&&(a=/(?<="\$basedir\/).*(?=" $args\n)/.exec(h)?.[0]||""):n===".cmd"?a=/(?<="%dp0%\\).*(?=" %\*\r\n)/.exec(h)?.[0]||"":n===""?a=/(?<="$basedir\/).*(?=" "\$@"\n)/.exec(h)?.[0]||"":n===".ps1"&&(a=/(?<="\$basedir\/).*(?=" $args\n)/.exec(h)?.[0]||""),a&&(e=(0,Wt.normalizePath)(i?.resolve(i?.dirname(e),a)))}}else{let r=n==="",s=l==="pnpm"||l==="yarn",o=l==="npm"||l==="npx";if(s&&e.includes("/.bin/pnpm/bin/")){let a=e.indexOf("/.bin/pnpm");if(a!==-1){let h=e.slice(0,a+10);try{(t?.statSync(h)).isFile()&&(e=(0,Wt.normalizePath)(h),r=!i?.extname(e))}catch{}}}if(r&&(s||o)&&t?.existsSync(e)){let a=t?.readFileSync(e,"utf8"),h="";if(s){if(h=/(?<="\$basedir\/)\.tools\/[^"]+(?="\s+"\$@")/.exec(a)?.[0]||"",h||(h=/(?<="\$basedir\/)[^"]+(?="\s+"\$@")/.exec(a)?.[0]||""),!h){let p=/exec\s+node\s+"?\$basedir\/([^"]+)"?\s+"\$@"/.exec(a);p&&(h=p[1]||"")}h&&l==="pnpm"&&h.startsWith("pnpm/")&&(h=`../${h}`)}else o&&(h=l==="npm"?/(?<=NPM_CLI_JS="\$CLI_BASEDIR\/).*(?=")/.exec(a)?.[0]||"":/(?<=NPX_CLI_JS="\$CLI_BASEDIR\/).*(?=")/.exec(a)?.[0]||"");h&&(e=(0,Wt.normalizePath)(i?.resolve(i?.dirname(e),h)))}}try{let r=t?.realpathSync.native(e);return(0,Wt.normalizePath)(r)}catch{}return(0,Wt.normalizePath)(e)}});var If=me((NV,Cf)=>{var fl=Object.defineProperty,dx=Object.getOwnPropertyDescriptor,fx=Object.getOwnPropertyNames,gx=Object.prototype.hasOwnProperty,mx=(e,t)=>{for(var i in t)fl(e,i,{get:t[i],enumerable:!0})},yx=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of fx(t))!gx.call(e,n)&&n!==i&&fl(e,n,{get:()=>t[n],enumerable:!(u=dx(t,n))||u.enumerable});return e},vx=e=>yx(fl({},"__esModule",{value:!0}),e),Af={};mx(Af,{getNpmConfigRegistry:()=>Sx,getNpmConfigUserAgent:()=>Ex,getNpmLifecycleEvent:()=>bx,getNpmRegistry:()=>wx,getNpmToken:()=>_x});Cf.exports=vx(Af);var ps=Bt();function Sx(){return(0,ps.getEnvValue)("npm_config_registry")}function Ex(){return(0,ps.getEnvValue)("npm_config_user_agent")}function bx(){return(0,ps.getEnvValue)("npm_lifecycle_event")}function wx(){return(0,ps.getEnvValue)("NPM_REGISTRY")}function _x(){return(0,ps.getEnvValue)("NPM_TOKEN")}});var _c=me((kV,Um)=>{var Bf=Object.defineProperty,S=(e,t)=>Bf(e,"name",{value:t,configurable:!0}),Ox=(e,t)=>()=>(e&&(t=e(e=0)),t),J=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Rx=(e,t)=>{for(var i in t)Bf(e,i,{get:t[i],enumerable:!0})},Uf=J((e,t)=>{"use strict";var i=Symbol.for("indent"),u=Symbol.for("newline"),n=`
22
- `,l=" ",c=/^\uFEFF/,r=/^\s*[{[]((?:\r?\n)+)([\s\t]*)/,s=/^(?:\{\}|\[\])((?:\r?\n)+)?$/,o=/^Unexpected token '?(.)'?(,)? /i,a=S(y=>{let v=y.charCodeAt(0).toString(16).toUpperCase();return`0x${v.length%2?"0":""}${v}`},"hexify"),h=S(y=>String(y).replace(c,""),"stripBOM"),p=S((y,v,E=0)=>({message:`${y} while parsing ${v}`,position:E}),"makeParsedError"),d=S((y,v,E=20)=>{let b=y.message;if(!v)return p(b,"empty string");let w=b.match(o),_=b.match(/ position\s+(\d+)/i);w&&(b=b.replace(o,`Unexpected token ${JSON.stringify(w[1])} (${a(w[1])})$2 `));let O;if(_?O=+_[1]:b.match(/^Unexpected end of JSON.*/i)&&(O=v.length-1),O==null)return p(b,`'${v.slice(0,E*2)}'`);let A=O<=E?0:O-E,I=O+E>=v.length?v.length:O+E,P=`${A?"...":""}${v.slice(A,I)}${I===v.length?"":"..."}`;return p(b,`${v===P?"":"near "}${JSON.stringify(P)}`,O)},"parseError"),m=class extends SyntaxError{static{S(this,"JSONParseError")}constructor(y,v,E,b){let w=d(y,v,E);super(w.message),Object.assign(this,w),this.code="EJSONPARSE",this.systemError=y,Error.captureStackTrace(this,b||this.constructor)}get name(){return this.constructor.name}set name(y){}get[Symbol.toStringTag](){return this.constructor.name}},g=S((y,v)=>{let E=JSON.parse(y,v);if(E&&typeof E=="object"){let b=y.match(s)||y.match(r)||[null,"",""];E[u]=b[1]??n,E[i]=b[2]??l}return E},"parseJson"),f=S((y,v,E)=>{let b=h(y);try{return g(b,v)}catch(w){if(typeof y!="string"&&!Buffer.isBuffer(y)){let _=Array.isArray(y)&&y.length===0?"an empty array":String(y);throw Object.assign(new TypeError(`Cannot parse ${_}`),{code:"EJSONPARSE",systemError:w})}throw new m(w,b,E,f)}},"parseJsonError");t.exports=f,f.JSONParseError=m,f.noExceptions=(y,v)=>{try{return g(h(y),v)}catch{}}}),Ax=J((e,t)=>{var i=new Set(["dependencies","optionalDependencies","devDependencies","peerDependencies"]),u=S(l=>{for(let c of i)l&&l[c]&&(l[c]=Object.keys(l[c]).sort((r,s)=>r.localeCompare(s,"en")).reduce((r,s)=>(r[s]=l[c][s],r),{}));return l},"orderDeps"),n=S(({content:l,originalContent:c})=>{let r=u({...l});if(r.dependencies&&r.optionalDependencies)for(let p of Object.keys(r.optionalDependencies))delete r.dependencies[p];let s={...c};for(let p of i)r[p]&&(s[p]=r[p]),r[p]&&typeof r=="object"&&Object.keys(r[p]).length===0&&delete s[p];let{dependencies:o,peerDependencies:a}=c||{},{peerDependencies:h}=s;if(o&&a&&h)for(let p of Object.keys(a))o[p]!==void 0&&h[p]!==void 0&&(s.dependencies=s.dependencies||{},s.dependencies[p]=h[p]);return s},"updateDependencies");n.knownKeys=i,t.exports=n}),Cx=J((e,t)=>{var i=S(({content:u,originalContent:n={}})=>{let l=u.scripts;if(!l)return n;if(S(()=>Object.entries(l).some(([c,r])=>typeof c!="string"||typeof r!="string"),"hasInvalidScripts")())throw Object.assign(new TypeError("package.json scripts should be a key-value pair of strings."),{code:"ESCRIPTSINVALID"});return{...n,scripts:{...l}}},"updateScripts");t.exports=i}),Ix=J((e,t)=>{var i=S(({content:u,originalContent:n={}})=>{let l=u.workspaces;if(!l)return n;let c=S(()=>l.some(r=>typeof r!="string"),"hasInvalidWorkspaces");if(!l.length||c())throw Object.assign(new TypeError("workspaces should be an array of strings."),{code:"EWORKSPACESINVALID"});return{...n,workspaces:[...l]}},"updateWorkspaces");t.exports=i}),Ji=J((e,t)=>{"use strict";var i=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...u)=>{}:()=>{};t.exports=i}),Xi=J((e,t)=>{"use strict";var i="2.0.0",u=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,l=250,c=["major","premajor","minor","preminor","patch","prepatch","prerelease"];t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:l,MAX_SAFE_INTEGER:u,RELEASE_TYPES:c,SEMVER_SPEC_VERSION:i,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}),ms=J((e,t)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:u,MAX_LENGTH:n}=Xi(),l=Ji();e=t.exports={};var c=e.re=[],r=e.safeRe=[],s=e.src=[],o=e.safeSrc=[],a=e.t={},h=0,p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",n],[p,u]],m=S(f=>{for(let[y,v]of d)f=f.split(`${y}*`).join(`${y}{0,${v}}`).split(`${y}+`).join(`${y}{1,${v}}`);return f},"makeSafeRegex"),g=S((f,y,v)=>{let E=m(y),b=h++;l(f,b,y),a[f]=b,s[b]=y,o[b]=E,c[b]=new RegExp(y,v?"g":void 0),r[b]=new RegExp(E,v?"g":void 0)},"createToken");g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),g("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${s[a.NONNUMERICIDENTIFIER]}|${s[a.NUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NONNUMERICIDENTIFIER]}|${s[a.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${p}+`),g("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),g("FULL",`^${s[a.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),g("LOOSE",`^${s[a.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE",`${s[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${s[a.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),g("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),g("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),g("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),g("COERCE",`${s[a.COERCEPLAIN]}(?:$|[^\\d])`),g("COERCEFULL",s[a.COERCEPLAIN]+`(?:${s[a.PRERELEASE]})?(?:${s[a.BUILD]})?(?:$|[^\\d])`),g("COERCERTL",s[a.COERCE],!0),g("COERCERTLFULL",s[a.COERCEFULL],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",g("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),g("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",g("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}),Bl=J((e,t)=>{"use strict";var i=Object.freeze({loose:!0}),u=Object.freeze({}),n=S(l=>l?typeof l!="object"?i:l:u,"parseOptions");t.exports=n}),Ff=J((e,t)=>{"use strict";var i=/^[0-9]+$/,u=S((l,c)=>{let r=i.test(l),s=i.test(c);return r&&s&&(l=+l,c=+c),l===c?0:r&&!s?-1:s&&!r?1:l<c?-1:1},"compareIdentifiers"),n=S((l,c)=>u(c,l),"rcompareIdentifiers");t.exports={compareIdentifiers:u,rcompareIdentifiers:n}}),Je=J((e,t)=>{"use strict";var i=Ji(),{MAX_LENGTH:u,MAX_SAFE_INTEGER:n}=Xi(),{safeRe:l,t:c}=ms(),r=Bl(),{compareIdentifiers:s}=Ff(),o=class Rt{static{S(this,"SemVer")}constructor(h,p){if(p=r(p),h instanceof Rt){if(h.loose===!!p.loose&&h.includePrerelease===!!p.includePrerelease)return h;h=h.version}else if(typeof h!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof h}".`);if(h.length>u)throw new TypeError(`version is longer than ${u} characters`);i("SemVer",h,p),this.options=p,this.loose=!!p.loose,this.includePrerelease=!!p.includePrerelease;let d=h.trim().match(p.loose?l[c.LOOSE]:l[c.FULL]);if(!d)throw new TypeError(`Invalid Version: ${h}`);if(this.raw=h,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(m=>{if(/^[0-9]+$/.test(m)){let g=+m;if(g>=0&&g<n)return g}return m}):this.prerelease=[],this.build=d[5]?d[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(h){if(i("SemVer.compare",this.version,this.options,h),!(h instanceof Rt)){if(typeof h=="string"&&h===this.version)return 0;h=new Rt(h,this.options)}return h.version===this.version?0:this.compareMain(h)||this.comparePre(h)}compareMain(h){return h instanceof Rt||(h=new Rt(h,this.options)),s(this.major,h.major)||s(this.minor,h.minor)||s(this.patch,h.patch)}comparePre(h){if(h instanceof Rt||(h=new Rt(h,this.options)),this.prerelease.length&&!h.prerelease.length)return-1;if(!this.prerelease.length&&h.prerelease.length)return 1;if(!this.prerelease.length&&!h.prerelease.length)return 0;let p=0;do{let d=this.prerelease[p],m=h.prerelease[p];if(i("prerelease compare",p,d,m),d===void 0&&m===void 0)return 0;if(m===void 0)return 1;if(d===void 0)return-1;if(d!==m)return s(d,m)}while(++p)}compareBuild(h){h instanceof Rt||(h=new Rt(h,this.options));let p=0;do{let d=this.build[p],m=h.build[p];if(i("build compare",p,d,m),d===void 0&&m===void 0)return 0;if(m===void 0)return 1;if(d===void 0)return-1;if(d!==m)return s(d,m)}while(++p)}inc(h,p,d){if(h.startsWith("pre")){if(!p&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(p){let m=`-${p}`.match(this.options.loose?l[c.PRERELEASELOOSE]:l[c.PRERELEASE]);if(!m||m[1]!==p)throw new Error(`invalid identifier: ${p}`)}}switch(h){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",p,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",p,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",p,d),this.inc("pre",p,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",p,d),this.inc("pre",p,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let m=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[m];else{let g=this.prerelease.length;for(;--g>=0;)typeof this.prerelease[g]=="number"&&(this.prerelease[g]++,g=-2);if(g===-1){if(p===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(m)}}if(p){let g=[p,m];d===!1&&(g=[p]),s(this.prerelease[0],p)===0?isNaN(this.prerelease[1])&&(this.prerelease=g):this.prerelease=g}break}default:throw new Error(`invalid increment argument: ${h}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};t.exports=o}),Ar=J((e,t)=>{"use strict";var i=Je(),u=S((n,l,c=!1)=>{if(n instanceof i)return n;try{return new i(n,l)}catch(r){if(!c)return null;throw r}},"parse");t.exports=u}),Hf=J((e,t)=>{"use strict";var i=Ar(),u=S((n,l)=>{let c=i(n,l);return c?c.version:null},"valid");t.exports=u}),Gf=J((e,t)=>{"use strict";var i=Ar(),u=S((n,l)=>{let c=i(n.trim().replace(/^[=v]+/,""),l);return c?c.version:null},"clean");t.exports=u}),yt=J((e,t)=>{var i=Symbol("proc-log.meta");t.exports={META:i,output:{LEVELS:["standard","error","buffer","flush"],KEYS:{standard:"standard",error:"error",buffer:"buffer",flush:"flush"},standard:S(function(...u){return process.emit("output","standard",...u)},"standard"),error:S(function(...u){return process.emit("output","error",...u)},"error"),buffer:S(function(...u){return process.emit("output","buffer",...u)},"buffer"),flush:S(function(...u){return process.emit("output","flush",...u)},"flush")},log:{LEVELS:["notice","error","warn","info","verbose","http","silly","timing","pause","resume"],KEYS:{notice:"notice",error:"error",warn:"warn",info:"info",verbose:"verbose",http:"http",silly:"silly",timing:"timing",pause:"pause",resume:"resume"},error:S(function(...u){return process.emit("log","error",...u)},"error"),notice:S(function(...u){return process.emit("log","notice",...u)},"notice"),warn:S(function(...u){return process.emit("log","warn",...u)},"warn"),info:S(function(...u){return process.emit("log","info",...u)},"info"),verbose:S(function(...u){return process.emit("log","verbose",...u)},"verbose"),http:S(function(...u){return process.emit("log","http",...u)},"http"),silly:S(function(...u){return process.emit("log","silly",...u)},"silly"),timing:S(function(...u){return process.emit("log","timing",...u)},"timing"),pause:S(function(){return process.emit("log","pause")},"pause"),resume:S(function(){return process.emit("log","resume")},"resume")},time:{LEVELS:["start","end"],KEYS:{start:"start",end:"end"},start:S(function(u,n){process.emit("time","start",u);function l(){return process.emit("time","end",u)}if(S(l,"end"),typeof n=="function"){let c=n();return c&&c.finally?c.finally(l):(l(),c)}return l},"start"),end:S(function(u){return process.emit("time","end",u)},"end")},input:{LEVELS:["start","end","read"],KEYS:{start:"start",end:"end",read:"read"},start:S(function(u){process.emit("input","start");function n(){return process.emit("input","end")}if(S(n,"end"),typeof u=="function"){let l=u();return l&&l.finally?l.finally(n):(n(),l)}return n},"start"),end:S(function(){return process.emit("input","end")},"end"),read:S(function(...u){let n,l,c=new Promise((r,s)=>{n=r,l=s});return process.emit("input","read",n,l,...u),c},"read")}}}),Cr=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var t=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,i=new Set,u=typeof process=="object"&&process?process:{},n=S((m,g,f,y)=>{typeof u.emitWarning=="function"&&u.emitWarning(m,g,f,y)},"emitWarning"),l=globalThis.AbortController,c=globalThis.AbortSignal;if(typeof l>"u"){c=class{static{S(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(f,y){this._onabort.push(y)}},l=class{static{S(this,"AbortController")}constructor(){g()}signal=new c;abort(f){if(!this.signal.aborted){this.signal.reason=f,this.signal.aborted=!0;for(let y of this.signal._onabort)y(f);this.signal.onabort?.(f)}}};let m=u.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",g=S(()=>{m&&(m=!1,n("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",g))},"warnACPolyfill")}var r=S(m=>!i.has(m),"shouldWarn"),s=Symbol("type"),o=S(m=>m&&m===Math.floor(m)&&m>0&&isFinite(m),"isPosInt"),a=S(m=>o(m)?m<=Math.pow(2,8)?Uint8Array:m<=Math.pow(2,16)?Uint16Array:m<=Math.pow(2,32)?Uint32Array:m<=Number.MAX_SAFE_INTEGER?h:null:null,"getUintArray"),h=class extends Array{static{S(this,"ZeroArray")}constructor(m){super(m),this.fill(0)}},p=class ds{static{S(this,"Stack")}heap;length;static#e=!1;static create(g){let f=a(g);if(!f)return[];ds.#e=!0;let y=new ds(g,f);return ds.#e=!1,y}constructor(g,f){if(!ds.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new f(g),this.length=0}push(g){this.heap[this.length++]=g}pop(){return this.heap[--this.length]}},d=class Vf{static{S(this,"LRUCache")}#e;#t;#r;#s;#n;#c;#u;#h;get perf(){return this.#h}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#p;#a;#l;#i;#d;#y;#S;#f;#R;#v;#E;#b;#w;#_;#N;#O;#m;static unsafeExposeInternals(g){return{starts:g.#b,ttls:g.#w,sizes:g.#E,keyMap:g.#a,keyList:g.#l,valList:g.#i,next:g.#d,prev:g.#y,get head(){return g.#S},get tail(){return g.#f},free:g.#R,isBackgroundFetch:S(f=>g.#g(f),"isBackgroundFetch"),backgroundFetch:S((f,y,v,E)=>g.#j(f,y,v,E),"backgroundFetch"),moveToTail:S(f=>g.#F(f),"moveToTail"),indexes:S(f=>g.#P(f),"indexes"),rindexes:S(f=>g.#x(f),"rindexes"),isStale:S(f=>g.#C(f),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#p}get size(){return this.#o}get fetchMethod(){return this.#c}get memoMethod(){return this.#u}get dispose(){return this.#r}get onInsert(){return this.#s}get disposeAfter(){return this.#n}constructor(g){let{max:f=0,ttl:y,ttlResolution:v=1,ttlAutopurge:E,updateAgeOnGet:b,updateAgeOnHas:w,allowStale:_,dispose:O,onInsert:A,disposeAfter:I,noDisposeOnSet:P,noUpdateTTL:L,maxSize:j=0,maxEntrySize:N=0,sizeCalculation:M,fetchMethod:B,memoMethod:F,noDeleteOnFetchRejection:D,noDeleteOnStaleGet:H,allowStaleOnFetchRejection:G,allowStaleOnFetchAbort:x,ignoreFetchAbort:k,perf:T}=g;if(T!==void 0&&typeof T?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#h=T??t,f!==0&&!o(f))throw new TypeError("max option must be a nonnegative integer");let C=f?a(f):Array;if(!C)throw new Error("invalid max value: "+f);if(this.#e=f,this.#t=j,this.maxEntrySize=N||this.#t,this.sizeCalculation=M,this.sizeCalculation){if(!this.#t&&!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(F!==void 0&&typeof F!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#u=F,B!==void 0&&typeof B!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#c=B,this.#N=!!B,this.#a=new Map,this.#l=new Array(f).fill(void 0),this.#i=new Array(f).fill(void 0),this.#d=new C(f),this.#y=new C(f),this.#S=0,this.#f=0,this.#R=p.create(f),this.#o=0,this.#p=0,typeof O=="function"&&(this.#r=O),typeof A=="function"&&(this.#s=A),typeof I=="function"?(this.#n=I,this.#v=[]):(this.#n=void 0,this.#v=void 0),this.#_=!!this.#r,this.#m=!!this.#s,this.#O=!!this.#n,this.noDisposeOnSet=!!P,this.noUpdateTTL=!!L,this.noDeleteOnFetchRejection=!!D,this.allowStaleOnFetchRejection=!!G,this.allowStaleOnFetchAbort=!!x,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#t!==0&&!o(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!o(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H()}if(this.allowStale=!!_,this.noDeleteOnStaleGet=!!H,this.updateAgeOnGet=!!b,this.updateAgeOnHas=!!w,this.ttlResolution=o(v)||v===0?v:1,this.ttlAutopurge=!!E,this.ttl=y||0,this.ttl){if(!o(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let q="LRU_CACHE_UNBOUNDED";r(q)&&(i.add(q),n("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",q,Vf))}}getRemainingTTL(g){return this.#a.has(g)?1/0:0}#M(){let g=new h(this.#e),f=new h(this.#e);this.#w=g,this.#b=f,this.#B=(E,b,w=this.#h.now())=>{if(f[E]=b!==0?w:0,g[E]=b,b!==0&&this.ttlAutopurge){let _=setTimeout(()=>{this.#C(E)&&this.#L(this.#l[E],"expire")},b+1);_.unref&&_.unref()}},this.#I=E=>{f[E]=g[E]!==0?this.#h.now():0},this.#T=(E,b)=>{if(g[b]){let w=g[b],_=f[b];if(!w||!_)return;E.ttl=w,E.start=_,E.now=y||v();let O=E.now-_;E.remainingTTL=w-O}};let y=0,v=S(()=>{let E=this.#h.now();if(this.ttlResolution>0){y=E;let b=setTimeout(()=>y=0,this.ttlResolution);b.unref&&b.unref()}return E},"getNow");this.getRemainingTTL=E=>{let b=this.#a.get(E);if(b===void 0)return 0;let w=g[b],_=f[b];if(!w||!_)return 1/0;let O=(y||v())-_;return w-O},this.#C=E=>{let b=f[E],w=g[E];return!!w&&!!b&&(y||v())-b>w}}#I=S(()=>{},"#updateItemAge");#T=S(()=>{},"#statusTTL");#B=S(()=>{},"#setItemTTL");#C=S(()=>!1,"#isStale");#H(){let g=new h(this.#e);this.#p=0,this.#E=g,this.#k=f=>{this.#p-=g[f],g[f]=0},this.#U=(f,y,v,E)=>{if(this.#g(y))return 0;if(!o(v))if(E){if(typeof E!="function")throw new TypeError("sizeCalculation must be a function");if(v=E(y,f),!o(v))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 v},this.#D=(f,y,v)=>{if(g[f]=y,this.#t){let E=this.#t-g[f];for(;this.#p>E;)this.#$(!0)}this.#p+=g[f],v&&(v.entrySize=y,v.totalCalculatedSize=this.#p)}}#k=S(g=>{},"#removeItemSize");#D=S((g,f,y)=>{},"#addItemSize");#U=S((g,f,y,v)=>{if(y||v)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#P({allowStale:g=this.allowStale}={}){if(this.#o)for(let f=this.#f;!(!this.#A(f)||((g||!this.#C(f))&&(yield f),f===this.#S));)f=this.#y[f]}*#x({allowStale:g=this.allowStale}={}){if(this.#o)for(let f=this.#S;!(!this.#A(f)||((g||!this.#C(f))&&(yield f),f===this.#f));)f=this.#d[f]}#A(g){return g!==void 0&&this.#a.get(this.#l[g])===g}*entries(){for(let g of this.#P())this.#i[g]!==void 0&&this.#l[g]!==void 0&&!this.#g(this.#i[g])&&(yield[this.#l[g],this.#i[g]])}*rentries(){for(let g of this.#x())this.#i[g]!==void 0&&this.#l[g]!==void 0&&!this.#g(this.#i[g])&&(yield[this.#l[g],this.#i[g]])}*keys(){for(let g of this.#P()){let f=this.#l[g];f!==void 0&&!this.#g(this.#i[g])&&(yield f)}}*rkeys(){for(let g of this.#x()){let f=this.#l[g];f!==void 0&&!this.#g(this.#i[g])&&(yield f)}}*values(){for(let g of this.#P())this.#i[g]!==void 0&&!this.#g(this.#i[g])&&(yield this.#i[g])}*rvalues(){for(let g of this.#x())this.#i[g]!==void 0&&!this.#g(this.#i[g])&&(yield this.#i[g])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(g,f={}){for(let y of this.#P()){let v=this.#i[y],E=this.#g(v)?v.__staleWhileFetching:v;if(E!==void 0&&g(E,this.#l[y],this))return this.get(this.#l[y],f)}}forEach(g,f=this){for(let y of this.#P()){let v=this.#i[y],E=this.#g(v)?v.__staleWhileFetching:v;E!==void 0&&g.call(f,E,this.#l[y],this)}}rforEach(g,f=this){for(let y of this.#x()){let v=this.#i[y],E=this.#g(v)?v.__staleWhileFetching:v;E!==void 0&&g.call(f,E,this.#l[y],this)}}purgeStale(){let g=!1;for(let f of this.#x({allowStale:!0}))this.#C(f)&&(this.#L(this.#l[f],"expire"),g=!0);return g}info(g){let f=this.#a.get(g);if(f===void 0)return;let y=this.#i[f],v=this.#g(y)?y.__staleWhileFetching:y;if(v===void 0)return;let E={value:v};if(this.#w&&this.#b){let b=this.#w[f],w=this.#b[f];if(b&&w){let _=b-(this.#h.now()-w);E.ttl=_,E.start=Date.now()}}return this.#E&&(E.size=this.#E[f]),E}dump(){let g=[];for(let f of this.#P({allowStale:!0})){let y=this.#l[f],v=this.#i[f],E=this.#g(v)?v.__staleWhileFetching:v;if(E===void 0||y===void 0)continue;let b={value:E};if(this.#w&&this.#b){b.ttl=this.#w[f];let w=this.#h.now()-this.#b[f];b.start=Math.floor(Date.now()-w)}this.#E&&(b.size=this.#E[f]),g.unshift([y,b])}return g}load(g){this.clear();for(let[f,y]of g){if(y.start){let v=Date.now()-y.start;y.start=this.#h.now()-v}this.set(f,y.value,y)}}set(g,f,y={}){if(f===void 0)return this.delete(g),this;let{ttl:v=this.ttl,start:E,noDisposeOnSet:b=this.noDisposeOnSet,sizeCalculation:w=this.sizeCalculation,status:_}=y,{noUpdateTTL:O=this.noUpdateTTL}=y,A=this.#U(g,f,y.size||0,w);if(this.maxEntrySize&&A>this.maxEntrySize)return _&&(_.set="miss",_.maxEntrySizeExceeded=!0),this.#L(g,"set"),this;let I=this.#o===0?void 0:this.#a.get(g);if(I===void 0)I=this.#o===0?this.#f:this.#R.length!==0?this.#R.pop():this.#o===this.#e?this.#$(!1):this.#o,this.#l[I]=g,this.#i[I]=f,this.#a.set(g,I),this.#d[this.#f]=I,this.#y[I]=this.#f,this.#f=I,this.#o++,this.#D(I,A,_),_&&(_.set="add"),O=!1,this.#m&&this.#s?.(f,g,"add");else{this.#F(I);let P=this.#i[I];if(f!==P){if(this.#N&&this.#g(P)){P.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:L}=P;L!==void 0&&!b&&(this.#_&&this.#r?.(L,g,"set"),this.#O&&this.#v?.push([L,g,"set"]))}else b||(this.#_&&this.#r?.(P,g,"set"),this.#O&&this.#v?.push([P,g,"set"]));if(this.#k(I),this.#D(I,A,_),this.#i[I]=f,_){_.set="replace";let L=P&&this.#g(P)?P.__staleWhileFetching:P;L!==void 0&&(_.oldValue=L)}}else _&&(_.set="update");this.#m&&this.onInsert?.(f,g,f===P?"update":"replace")}if(v!==0&&!this.#w&&this.#M(),this.#w&&(O||this.#B(I,v,E),_&&this.#T(_,I)),!b&&this.#O&&this.#v){let P=this.#v,L;for(;L=P?.shift();)this.#n?.(...L)}return this}pop(){try{for(;this.#o;){let g=this.#i[this.#S];if(this.#$(!0),this.#g(g)){if(g.__staleWhileFetching)return g.__staleWhileFetching}else if(g!==void 0)return g}}finally{if(this.#O&&this.#v){let g=this.#v,f;for(;f=g?.shift();)this.#n?.(...f)}}}#$(g){let f=this.#S,y=this.#l[f],v=this.#i[f];return this.#N&&this.#g(v)?v.__abortController.abort(new Error("evicted")):(this.#_||this.#O)&&(this.#_&&this.#r?.(v,y,"evict"),this.#O&&this.#v?.push([v,y,"evict"])),this.#k(f),g&&(this.#l[f]=void 0,this.#i[f]=void 0,this.#R.push(f)),this.#o===1?(this.#S=this.#f=0,this.#R.length=0):this.#S=this.#d[f],this.#a.delete(y),this.#o--,f}has(g,f={}){let{updateAgeOnHas:y=this.updateAgeOnHas,status:v}=f,E=this.#a.get(g);if(E!==void 0){let b=this.#i[E];if(this.#g(b)&&b.__staleWhileFetching===void 0)return!1;if(this.#C(E))v&&(v.has="stale",this.#T(v,E));else return y&&this.#I(E),v&&(v.has="hit",this.#T(v,E)),!0}else v&&(v.has="miss");return!1}peek(g,f={}){let{allowStale:y=this.allowStale}=f,v=this.#a.get(g);if(v===void 0||!y&&this.#C(v))return;let E=this.#i[v];return this.#g(E)?E.__staleWhileFetching:E}#j(g,f,y,v){let E=f===void 0?void 0:this.#i[f];if(this.#g(E))return E;let b=new l,{signal:w}=y;w?.addEventListener("abort",()=>b.abort(w.reason),{signal:b.signal});let _={signal:b.signal,options:y,context:v},O=S((N,M=!1)=>{let{aborted:B}=b.signal,F=y.ignoreFetchAbort&&N!==void 0;if(y.status&&(B&&!M?(y.status.fetchAborted=!0,y.status.fetchError=b.signal.reason,F&&(y.status.fetchAbortIgnored=!0)):y.status.fetchResolved=!0),B&&!F&&!M)return I(b.signal.reason);let D=L,H=this.#i[f];return(H===L||F&&M&&H===void 0)&&(N===void 0?D.__staleWhileFetching!==void 0?this.#i[f]=D.__staleWhileFetching:this.#L(g,"fetch"):(y.status&&(y.status.fetchUpdated=!0),this.set(g,N,_.options))),N},"cb"),A=S(N=>(y.status&&(y.status.fetchRejected=!0,y.status.fetchError=N),I(N)),"eb"),I=S(N=>{let{aborted:M}=b.signal,B=M&&y.allowStaleOnFetchAbort,F=B||y.allowStaleOnFetchRejection,D=F||y.noDeleteOnFetchRejection,H=L;if(this.#i[f]===L&&(!D||H.__staleWhileFetching===void 0?this.#L(g,"fetch"):B||(this.#i[f]=H.__staleWhileFetching)),F)return y.status&&H.__staleWhileFetching!==void 0&&(y.status.returnedStale=!0),H.__staleWhileFetching;if(H.__returned===H)throw N},"fetchFail"),P=S((N,M)=>{let B=this.#c?.(g,E,_);B&&B instanceof Promise&&B.then(F=>N(F===void 0?void 0:F),M),b.signal.addEventListener("abort",()=>{(!y.ignoreFetchAbort||y.allowStaleOnFetchAbort)&&(N(void 0),y.allowStaleOnFetchAbort&&(N=S(F=>O(F,!0),"res")))})},"pcall");y.status&&(y.status.fetchDispatched=!0);let L=new Promise(P).then(O,A),j=Object.assign(L,{__abortController:b,__staleWhileFetching:E,__returned:void 0});return f===void 0?(this.set(g,j,{..._.options,status:void 0}),f=this.#a.get(g)):this.#i[f]=j,j}#g(g){if(!this.#N)return!1;let f=g;return!!f&&f instanceof Promise&&f.hasOwnProperty("__staleWhileFetching")&&f.__abortController instanceof l}async fetch(g,f={}){let{allowStale:y=this.allowStale,updateAgeOnGet:v=this.updateAgeOnGet,noDeleteOnStaleGet:E=this.noDeleteOnStaleGet,ttl:b=this.ttl,noDisposeOnSet:w=this.noDisposeOnSet,size:_=0,sizeCalculation:O=this.sizeCalculation,noUpdateTTL:A=this.noUpdateTTL,noDeleteOnFetchRejection:I=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:P=this.allowStaleOnFetchRejection,ignoreFetchAbort:L=this.ignoreFetchAbort,allowStaleOnFetchAbort:j=this.allowStaleOnFetchAbort,context:N,forceRefresh:M=!1,status:B,signal:F}=f;if(!this.#N)return B&&(B.fetch="get"),this.get(g,{allowStale:y,updateAgeOnGet:v,noDeleteOnStaleGet:E,status:B});let D={allowStale:y,updateAgeOnGet:v,noDeleteOnStaleGet:E,ttl:b,noDisposeOnSet:w,size:_,sizeCalculation:O,noUpdateTTL:A,noDeleteOnFetchRejection:I,allowStaleOnFetchRejection:P,allowStaleOnFetchAbort:j,ignoreFetchAbort:L,status:B,signal:F},H=this.#a.get(g);if(H===void 0){B&&(B.fetch="miss");let G=this.#j(g,H,D,N);return G.__returned=G}else{let G=this.#i[H];if(this.#g(G)){let C=y&&G.__staleWhileFetching!==void 0;return B&&(B.fetch="inflight",C&&(B.returnedStale=!0)),C?G.__staleWhileFetching:G.__returned=G}let x=this.#C(H);if(!M&&!x)return B&&(B.fetch="hit"),this.#F(H),v&&this.#I(H),B&&this.#T(B,H),G;let k=this.#j(g,H,D,N),T=k.__staleWhileFetching!==void 0&&y;return B&&(B.fetch=x?"stale":"refresh",T&&x&&(B.returnedStale=!0)),T?k.__staleWhileFetching:k.__returned=k}}async forceFetch(g,f={}){let y=await this.fetch(g,f);if(y===void 0)throw new Error("fetch() returned undefined");return y}memo(g,f={}){let y=this.#u;if(!y)throw new Error("no memoMethod provided to constructor");let{context:v,forceRefresh:E,...b}=f,w=this.get(g,b);if(!E&&w!==void 0)return w;let _=y(g,w,{options:b,context:v});return this.set(g,_,b),_}get(g,f={}){let{allowStale:y=this.allowStale,updateAgeOnGet:v=this.updateAgeOnGet,noDeleteOnStaleGet:E=this.noDeleteOnStaleGet,status:b}=f,w=this.#a.get(g);if(w!==void 0){let _=this.#i[w],O=this.#g(_);return b&&this.#T(b,w),this.#C(w)?(b&&(b.get="stale"),O?(b&&y&&_.__staleWhileFetching!==void 0&&(b.returnedStale=!0),y?_.__staleWhileFetching:void 0):(E||this.#L(g,"expire"),b&&y&&(b.returnedStale=!0),y?_:void 0)):(b&&(b.get="hit"),O?_.__staleWhileFetching:(this.#F(w),v&&this.#I(w),_))}else b&&(b.get="miss")}#G(g,f){this.#y[f]=g,this.#d[g]=f}#F(g){g!==this.#f&&(g===this.#S?this.#S=this.#d[g]:this.#G(this.#y[g],this.#d[g]),this.#G(this.#f,g),this.#f=g)}delete(g){return this.#L(g,"delete")}#L(g,f){let y=!1;if(this.#o!==0){let v=this.#a.get(g);if(v!==void 0)if(y=!0,this.#o===1)this.#V(f);else{this.#k(v);let E=this.#i[v];if(this.#g(E)?E.__abortController.abort(new Error("deleted")):(this.#_||this.#O)&&(this.#_&&this.#r?.(E,g,f),this.#O&&this.#v?.push([E,g,f])),this.#a.delete(g),this.#l[v]=void 0,this.#i[v]=void 0,v===this.#f)this.#f=this.#y[v];else if(v===this.#S)this.#S=this.#d[v];else{let b=this.#y[v];this.#d[b]=this.#d[v];let w=this.#d[v];this.#y[w]=this.#y[v]}this.#o--,this.#R.push(v)}}if(this.#O&&this.#v?.length){let v=this.#v,E;for(;E=v?.shift();)this.#n?.(...E)}return y}clear(){return this.#V("delete")}#V(g){for(let f of this.#x({allowStale:!0})){let y=this.#i[f];if(this.#g(y))y.__abortController.abort(new Error("deleted"));else{let v=this.#l[f];this.#_&&this.#r?.(y,v,g),this.#O&&this.#v?.push([y,v,g])}}if(this.#a.clear(),this.#i.fill(void 0),this.#l.fill(void 0),this.#w&&this.#b&&(this.#w.fill(0),this.#b.fill(0)),this.#E&&this.#E.fill(0),this.#S=0,this.#f=0,this.#R.length=0,this.#p=0,this.#o=0,this.#O&&this.#v){let f=this.#v,y;for(;y=f?.shift();)this.#n?.(...y)}}};e.LRUCache=d}),Tx=J((e,t)=>{"use strict";var i=S((...r)=>r.every(s=>s)?r.join(""):"","maybeJoin"),u=S(r=>r?encodeURIComponent(r):"","maybeEncode"),n=S(r=>r.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),"formatHashFragment"),l={sshtemplate:S(({domain:r,user:s,project:o,committish:a})=>`git@${r}:${s}/${o}.git${i("#",a)}`,"sshtemplate"),sshurltemplate:S(({domain:r,user:s,project:o,committish:a})=>`git+ssh://git@${r}/${s}/${o}.git${i("#",a)}`,"sshurltemplate"),edittemplate:S(({domain:r,user:s,project:o,committish:a,editpath:h,path:p})=>`https://${r}/${s}/${o}${i("/",h,"/",u(a||"HEAD"),"/",p)}`,"edittemplate"),browsetemplate:S(({domain:r,user:s,project:o,committish:a,treepath:h})=>`https://${r}/${s}/${o}${i("/",h,"/",u(a))}`,"browsetemplate"),browsetreetemplate:S(({domain:r,user:s,project:o,committish:a,treepath:h,path:p,fragment:d,hashformat:m})=>`https://${r}/${s}/${o}/${h}/${u(a||"HEAD")}/${p}${i("#",m(d||""))}`,"browsetreetemplate"),browseblobtemplate:S(({domain:r,user:s,project:o,committish:a,blobpath:h,path:p,fragment:d,hashformat:m})=>`https://${r}/${s}/${o}/${h}/${u(a||"HEAD")}/${p}${i("#",m(d||""))}`,"browseblobtemplate"),docstemplate:S(({domain:r,user:s,project:o,treepath:a,committish:h})=>`https://${r}/${s}/${o}${i("/",a,"/",u(h))}#readme`,"docstemplate"),httpstemplate:S(({auth:r,domain:s,user:o,project:a,committish:h})=>`git+https://${i(r,"@")}${s}/${o}/${a}.git${i("#",h)}`,"httpstemplate"),filetemplate:S(({domain:r,user:s,project:o,committish:a,path:h})=>`https://${r}/${s}/${o}/raw/${u(a||"HEAD")}/${h}`,"filetemplate"),shortcuttemplate:S(({type:r,user:s,project:o,committish:a})=>`${r}:${s}/${o}${i("#",a)}`,"shortcuttemplate"),pathtemplate:S(({user:r,project:s,committish:o})=>`${r}/${s}${i("#",o)}`,"pathtemplate"),bugstemplate:S(({domain:r,user:s,project:o})=>`https://${r}/${s}/${o}/issues`,"bugstemplate"),hashformat:n},c={};c.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:S(({auth:r,user:s,project:o,committish:a,path:h})=>`https://${i(r,"@")}raw.githubusercontent.com/${s}/${o}/${u(a||"HEAD")}/${h}`,"filetemplate"),gittemplate:S(({auth:r,domain:s,user:o,project:a,committish:h})=>`git://${i(r,"@")}${s}/${o}/${a}.git${i("#",h)}`,"gittemplate"),tarballtemplate:S(({domain:r,user:s,project:o,committish:a})=>`https://codeload.${r}/${s}/${o}/tar.gz/${u(a||"HEAD")}`,"tarballtemplate"),extract:S(r=>{let[,s,o,a,h]=r.pathname.split("/",5);if(!(a&&a!=="tree")&&(a||(h=r.hash.slice(1)),o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!s||!o)))return{user:s,project:o,committish:h}},"extract")},c.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:S(({domain:r,user:s,project:o,committish:a,treepath:h,path:p,editpath:d})=>`https://${r}/${s}/${o}${i("/",h,"/",u(a||"HEAD"),"/",p,d)}`,"edittemplate"),tarballtemplate:S(({domain:r,user:s,project:o,committish:a})=>`https://${r}/${s}/${o}/get/${u(a||"HEAD")}.tar.gz`,"tarballtemplate"),extract:S(r=>{let[,s,o,a]=r.pathname.split("/",4);if(!["get"].includes(a)&&(o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!s||!o)))return{user:s,project:o,committish:r.hash.slice(1)}},"extract")},c.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",tarballtemplate:S(({domain:r,user:s,project:o,committish:a})=>`https://${r}/${s}/${o}/repository/archive.tar.gz?ref=${u(a||"HEAD")}`,"tarballtemplate"),extract:S(r=>{let s=r.pathname.slice(1);if(s.includes("/-/")||s.includes("/archive.tar.gz"))return;let o=s.split("/"),a=o.pop();a.endsWith(".git")&&(a=a.slice(0,-4));let h=o.join("/");if(!(!h||!a))return{user:h,project:a,committish:r.hash.slice(1)}},"extract")},c.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:S(({domain:r,project:s,committish:o})=>`git@${r}:${s}.git${i("#",o)}`,"sshtemplate"),sshurltemplate:S(({domain:r,project:s,committish:o})=>`git+ssh://git@${r}/${s}.git${i("#",o)}`,"sshurltemplate"),edittemplate:S(({domain:r,user:s,project:o,committish:a,editpath:h})=>`https://${r}/${s}/${o}${i("/",u(a))}/${h}`,"edittemplate"),browsetemplate:S(({domain:r,project:s,committish:o})=>`https://${r}/${s}${i("/",u(o))}`,"browsetemplate"),browsetreetemplate:S(({domain:r,project:s,committish:o,path:a,hashformat:h})=>`https://${r}/${s}${i("/",u(o))}${i("#",h(a))}`,"browsetreetemplate"),browseblobtemplate:S(({domain:r,project:s,committish:o,path:a,hashformat:h})=>`https://${r}/${s}${i("/",u(o))}${i("#",h(a))}`,"browseblobtemplate"),docstemplate:S(({domain:r,project:s,committish:o})=>`https://${r}/${s}${i("/",u(o))}`,"docstemplate"),httpstemplate:S(({domain:r,project:s,committish:o})=>`git+https://${r}/${s}.git${i("#",o)}`,"httpstemplate"),filetemplate:S(({user:r,project:s,committish:o,path:a})=>`https://gist.githubusercontent.com/${r}/${s}/raw${i("/",u(o))}/${a}`,"filetemplate"),shortcuttemplate:S(({type:r,project:s,committish:o})=>`${r}:${s}${i("#",o)}`,"shortcuttemplate"),pathtemplate:S(({project:r,committish:s})=>`${r}${i("#",s)}`,"pathtemplate"),bugstemplate:S(({domain:r,project:s})=>`https://${r}/${s}`,"bugstemplate"),gittemplate:S(({domain:r,project:s,committish:o})=>`git://${r}/${s}.git${i("#",o)}`,"gittemplate"),tarballtemplate:S(({project:r,committish:s})=>`https://codeload.github.com/gist/${r}/tar.gz/${u(s||"HEAD")}`,"tarballtemplate"),extract:S(r=>{let[,s,o,a]=r.pathname.split("/",4);if(a!=="raw"){if(!o){if(!s)return;o=s,s=null}return o.endsWith(".git")&&(o=o.slice(0,-4)),{user:s,project:o,committish:r.hash.slice(1)}}},"extract"),hashformat:S(function(r){return r&&"file-"+n(r)},"hashformat")},c.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:S(({domain:r,user:s,project:o,committish:a,path:h})=>`https://${r}/${s}/${o}/blob/${u(a)||"HEAD"}/${h}`,"filetemplate"),httpstemplate:S(({domain:r,user:s,project:o,committish:a})=>`https://${r}/${s}/${o}.git${i("#",a)}`,"httpstemplate"),tarballtemplate:S(({domain:r,user:s,project:o,committish:a})=>`https://${r}/${s}/${o}/archive/${u(a)||"HEAD"}.tar.gz`,"tarballtemplate"),bugstemplate:S(()=>null,"bugstemplate"),extract:S(r=>{let[,s,o,a]=r.pathname.split("/",4);if(!["archive"].includes(a)&&(o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!s||!o)))return{user:s,project:o,committish:r.hash.slice(1)}},"extract")};for(let[r,s]of Object.entries(c))c[r]=Object.assign({},l,s);t.exports=c}),Wf=J((e,t)=>{var i=require("url"),u=S((r,s,o)=>{let a=r.indexOf(o);return r.lastIndexOf(s,a>-1?a:1/0)},"lastIndexOfBefore"),n=S(r=>{try{return new i.URL(r)}catch{}},"safeUrl"),l=S((r,s)=>{let o=r.indexOf(":"),a=r.slice(0,o+1);if(Object.prototype.hasOwnProperty.call(s,a)||r.substr(o,3)==="://")return r;let h=r.indexOf("@");return h>-1?h>o?`git+ssh://${r}`:r:`${r.slice(0,o+1)}//${r.slice(o+1)}`},"correctProtocol"),c=S(r=>{let s=u(r,"@","#"),o=u(r,":","#");return o>s&&(r=r.slice(0,o)+"/"+r.slice(o+1)),u(r,":","#")===-1&&r.indexOf("//")===-1&&(r=`git+ssh://${r}`),r},"correctUrl");t.exports=(r,s)=>{let o=s?l(r,s):r;return n(o)||n(c(o))}}),Px=J((e,t)=>{"use strict";var i=Wf(),u=S(n=>{let l=n.indexOf("#"),c=n.indexOf("/"),r=n.indexOf("/",c+1),s=n.indexOf(":"),o=/\s/.exec(n),a=n.indexOf("@"),h=!o||l>-1&&o.index>l,p=a===-1||l>-1&&a>l,d=s===-1||l>-1&&s>l,m=r===-1||l>-1&&r>l,g=c>0,f=l>-1?n[l-1]!=="/":!n.endsWith("/"),y=!n.startsWith(".");return h&&g&&f&&y&&p&&d&&m},"isGitHubShorthand");t.exports=(n,l,{gitHosts:c,protocols:r})=>{if(!n)return;let s=u(n)?`github:${n}`:n,o=i(s,r);if(!o)return;let a=c.byShortcut[o.protocol],h=c.byDomain[o.hostname.startsWith("www.")?o.hostname.slice(4):o.hostname],p=a||h;if(!p)return;let d=c[a||h],m=null;r[o.protocol]?.auth&&(o.username||o.password)&&(m=`${o.username}${o.password?":"+o.password:""}`);let g=null,f=null,y=null,v=null;try{if(a){let E=o.pathname.startsWith("/")?o.pathname.slice(1):o.pathname,b=E.indexOf("@");b>-1&&(E=E.slice(b+1));let w=E.lastIndexOf("/");w>-1?(f=decodeURIComponent(E.slice(0,w)),f||(f=null),y=decodeURIComponent(E.slice(w+1))):y=decodeURIComponent(E),y.endsWith(".git")&&(y=y.slice(0,-4)),o.hash&&(g=decodeURIComponent(o.hash.slice(1))),v="shortcut"}else{if(!d.protocols.includes(o.protocol))return;let E=d.extract(o);if(!E)return;f=E.user&&decodeURIComponent(E.user),y=decodeURIComponent(E.project),g=decodeURIComponent(E.committish),v=r[o.protocol]?.name||o.protocol.slice(0,-1)}}catch(E){if(E instanceof URIError)return;throw E}return[p,f,m,y,g,v,l]}}),Ul=J((e,t)=>{"use strict";var{LRUCache:i}=Cr(),u=Tx(),n=Px(),l=Wf(),c=new i({max:1e3});function r(o){try{let{protocol:a,hostname:h,pathname:p}=new URL(o);if(!h)return null;let d=/(?:git\+)http:$/.test(a)?"http:":"https:",m=p.replace(/\.git$/,"");return`${d}//${h}${m}`}catch{return null}}S(r,"unknownHostedUrl");var s=class ft{static{S(this,"GitHost")}constructor(a,h,p,d,m,g,f={}){Object.assign(this,ft.#e[a],{type:a,user:h,auth:p,project:d,committish:m,default:g,opts:f})}static#e={byShortcut:{},byDomain:{}};static#t={"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(a,h){ft.#e[a]=h,ft.#e.byDomain[h.domain]=a,ft.#e.byShortcut[`${a}:`]=a,ft.#t[`${a}:`]={name:a}}static fromUrl(a,h){if(typeof a!="string")return;let p=a+JSON.stringify(h||{});if(!c.has(p)){let d=n(a,h,{gitHosts:ft.#e,protocols:ft.#t});c.set(p,d?new ft(...d):void 0)}return c.get(p)}static fromManifest(a,h={}){if(!a||typeof a!="object")return;let p=a.repository,d=p&&(typeof p=="string"?p:typeof p=="object"&&typeof p.url=="string"?p.url:null);if(!d)throw new Error("no repository");let m=d&&ft.fromUrl(d.replace(/^git\+/,""),h)||null;if(m)return m;let g=r(d);return ft.fromUrl(g,h)||g}static parseUrl(a){return l(a)}#r(a,h){if(typeof a!="function")return null;let p={...this,...this.opts,...h};p.path||(p.path=""),p.path.startsWith("/")&&(p.path=p.path.slice(1)),p.noCommittish&&(p.committish=null);let d=a(p);return p.noGitPlus&&d.startsWith("git+")?d.slice(4):d}hash(){return this.committish?`#${this.committish}`:""}ssh(a){return this.#r(this.sshtemplate,a)}sshurl(a){return this.#r(this.sshurltemplate,a)}browse(a,...h){return typeof a!="string"?this.#r(this.browsetemplate,a):typeof h[0]!="string"?this.#r(this.browsetreetemplate,{...h[0],path:a}):this.#r(this.browsetreetemplate,{...h[1],fragment:h[0],path:a})}browseFile(a,...h){return typeof h[0]!="string"?this.#r(this.browseblobtemplate,{...h[0],path:a}):this.#r(this.browseblobtemplate,{...h[1],fragment:h[0],path:a})}docs(a){return this.#r(this.docstemplate,a)}bugs(a){return this.#r(this.bugstemplate,a)}https(a){return this.#r(this.httpstemplate,a)}git(a){return this.#r(this.gittemplate,a)}shortcut(a){return this.#r(this.shortcuttemplate,a)}path(a){return this.#r(this.pathtemplate,a)}tarball(a){return this.#r(this.tarballtemplate,{...a,noCommittish:!1})}file(a,h){return this.#r(this.filetemplate,{...h,path:a})}edit(a,h){return this.#r(this.edittemplate,{...h,path:a})}getDefaultRepresentation(){return this.default}toString(a){return this.default&&typeof this[this.default]=="function"?this[this.default](a):this.sshurl(a)}};for(let[o,a]of Object.entries(u))s.addHost(o,a);t.exports=s}),xx=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.range=e.balanced=void 0;var t=S((n,l,c)=>{let r=n instanceof RegExp?i(n,c):n,s=l instanceof RegExp?i(l,c):l,o=r!==null&&s!=null&&(0,e.range)(r,s,c);return o&&{start:o[0],end:o[1],pre:c.slice(0,o[0]),body:c.slice(o[0]+r.length,o[1]),post:c.slice(o[1]+s.length)}},"balanced");e.balanced=t;var i=S((n,l)=>{let c=l.match(n);return c?c[0]:null},"maybeMatch"),u=S((n,l,c)=>{let r,s,o,a,h,p=c.indexOf(n),d=c.indexOf(l,p+1),m=p;if(p>=0&&d>0){if(n===l)return[p,d];for(r=[],o=c.length;m>=0&&!h;){if(m===p)r.push(m),p=c.indexOf(n,m+1);else if(r.length===1){let g=r.pop();g!==void 0&&(h=[g,d])}else s=r.pop(),s!==void 0&&s<o&&(o=s,a=d),d=c.indexOf(l,m+1);m=p<d&&p>=0?p:d}r.length&&a!==void 0&&(h=[o,a])}return h},"range");e.range=u}),Nx=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.expand=w;var t=xx(),i="\0SLASH"+Math.random()+"\0",u="\0OPEN"+Math.random()+"\0",n="\0CLOSE"+Math.random()+"\0",l="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0",r=new RegExp(i,"g"),s=new RegExp(u,"g"),o=new RegExp(n,"g"),a=new RegExp(l,"g"),h=new RegExp(c,"g"),p=/\\\\/g,d=/\\{/g,m=/\\}/g,g=/\\,/g,f=/\\./g;function y(L){return isNaN(L)?L.charCodeAt(0):parseInt(L,10)}S(y,"numeric");function v(L){return L.replace(p,i).replace(d,u).replace(m,n).replace(g,l).replace(f,c)}S(v,"escapeBraces");function E(L){return L.replace(r,"\\").replace(s,"{").replace(o,"}").replace(a,",").replace(h,".")}S(E,"unescapeBraces");function b(L){if(!L)return[""];let j=[],N=(0,t.balanced)("{","}",L);if(!N)return L.split(",");let{pre:M,body:B,post:F}=N,D=M.split(",");D[D.length-1]+="{"+B+"}";let H=b(F);return F.length&&(D[D.length-1]+=H.shift(),D.push.apply(D,H)),j.push.apply(j,D),j}S(b,"parseCommaParts");function w(L){return L?(L.slice(0,2)==="{}"&&(L="\\{\\}"+L.slice(2)),P(v(L),!0).map(E)):[]}S(w,"expand");function _(L){return"{"+L+"}"}S(_,"embrace");function O(L){return/^-?0\d/.test(L)}S(O,"isPadded");function A(L,j){return L<=j}S(A,"lte");function I(L,j){return L>=j}S(I,"gte");function P(L,j){let N=[],M=(0,t.balanced)("{","}",L);if(!M)return[L];let B=M.pre,F=M.post.length?P(M.post,!1):[""];if(/\$$/.test(M.pre))for(let D=0;D<F.length;D++){let H=B+"{"+M.body+"}"+F[D];N.push(H)}else{let D=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(M.body),H=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(M.body),G=D||H,x=M.body.indexOf(",")>=0;if(!G&&!x)return M.post.match(/,(?!,).*\}/)?(L=M.pre+"{"+M.body+n+M.post,P(L)):[L];let k;if(G)k=M.body.split(/\.\./);else if(k=b(M.body),k.length===1&&k[0]!==void 0&&(k=P(k[0],!1).map(_),k.length===1))return F.map(C=>M.pre+k[0]+C);let T;if(G&&k[0]!==void 0&&k[1]!==void 0){let C=y(k[0]),q=y(k[1]),X=Math.max(k[0].length,k[1].length),Y=k.length===3&&k[2]!==void 0?Math.abs(y(k[2])):1,$=A;q<C&&(Y*=-1,$=I);let V=k.some(O);T=[];for(let z=C;$(z,q);z+=Y){let U;if(H)U=String.fromCharCode(z),U==="\\"&&(U="");else if(U=String(z),V){let K=X-U.length;if(K>0){let Z=new Array(K+1).join("0");z<0?U="-"+Z+U.slice(1):U=Z+U}}T.push(U)}}else{T=[];for(let C=0;C<k.length;C++)T.push.apply(T,P(k[C],!1))}for(let C=0;C<T.length;C++)for(let q=0;q<F.length;q++){let X=B+T[C]+F[q];(!j||G||X)&&N.push(X)}}return N}S(P,"expand_")}),kx=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertValidPattern=void 0;var t=1024*64,i=S(u=>{if(typeof u!="string")throw new TypeError("invalid pattern");if(u.length>t)throw new TypeError("pattern is too long")},"assertValidPattern");e.assertValidPattern=i}),Lx=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseClass=void 0;var t={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},i=S(c=>c.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),u=S(c=>c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),n=S(c=>c.join(""),"rangesToString"),l=S((c,r)=>{let s=r;if(c.charAt(s)!=="[")throw new Error("not in a brace expression");let o=[],a=[],h=s+1,p=!1,d=!1,m=!1,g=!1,f=s,y="";e:for(;h<c.length;){let b=c.charAt(h);if((b==="!"||b==="^")&&h===s+1){g=!0,h++;continue}if(b==="]"&&p&&!m){f=h+1;break}if(p=!0,b==="\\"&&!m){m=!0,h++;continue}if(b==="["&&!m){for(let[w,[_,O,A]]of Object.entries(t))if(c.startsWith(w,h)){if(y)return["$.",!1,c.length-s,!0];h+=w.length,A?a.push(_):o.push(_),d=d||O;continue e}}if(m=!1,y){b>y?o.push(i(y)+"-"+i(b)):b===y&&o.push(i(b)),y="",h++;continue}if(c.startsWith("-]",h+1)){o.push(i(b+"-")),h+=2;continue}if(c.startsWith("-",h+1)){y=b,h+=2;continue}o.push(i(b)),h++}if(f<h)return["",!1,0,!1];if(!o.length&&!a.length)return["$.",!1,c.length-s,!0];if(a.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!g){let b=o[0].length===2?o[0].slice(-1):o[0];return[u(b),!1,f-s,!1]}let v="["+(g?"^":"")+n(o)+"]",E="["+(g?"":"^")+n(a)+"]";return[o.length&&a.length?"("+v+"|"+E+")":o.length?v:E,d,f-s,!0]},"parseClass");e.parseClass=l}),gl=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=void 0;var t=S((i,{windowsPathsNoEscape:u=!1}={})=>u?i.replace(/\[([^\/\\])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");e.unescape=t}),Tf=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AST=void 0;var t=Lx(),i=gl(),u=new Set(["!","?","+","*","@"]),n=S(g=>u.has(g),"isExtglobType"),l="(?!(?:^|/)\\.\\.?(?:$|/))",c="(?!\\.)",r=new Set(["[","."]),s=new Set(["..","."]),o=new Set("().*{}+?[]^$\\!"),a=S(g=>g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),h="[^/]",p=h+"*?",d=h+"+?",m=class it{static{S(this,"AST")}type;#e;#t;#r=!1;#s=[];#n;#c;#u;#h=!1;#o;#p;#a=!1;constructor(f,y,v={}){this.type=f,f&&(this.#t=!0),this.#n=y,this.#e=this.#n?this.#n.#e:this,this.#o=this.#e===this?v:this.#e.#o,this.#u=this.#e===this?[]:this.#e.#u,f==="!"&&!this.#e.#h&&this.#u.push(this),this.#c=this.#n?this.#n.#s.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let f of this.#s)if(typeof f!="string"&&(f.type||f.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#p!==void 0?this.#p:this.type?this.#p=this.type+"("+this.#s.map(f=>String(f)).join("|")+")":this.#p=this.#s.map(f=>String(f)).join("")}#l(){if(this!==this.#e)throw new Error("should only call on root");if(this.#h)return this;this.toString(),this.#h=!0;let f;for(;f=this.#u.pop();){if(f.type!=="!")continue;let y=f,v=y.#n;for(;v;){for(let E=y.#c+1;!v.type&&E<v.#s.length;E++)for(let b of f.#s){if(typeof b=="string")throw new Error("string part in extglob AST??");b.copyIn(v.#s[E])}y=v,v=y.#n}}return this}push(...f){for(let y of f)if(y!==""){if(typeof y!="string"&&!(y instanceof it&&y.#n===this))throw new Error("invalid part: "+y);this.#s.push(y)}}toJSON(){let f=this.type===null?this.#s.slice().map(y=>typeof y=="string"?y:y.toJSON()):[this.type,...this.#s.map(y=>y.toJSON())];return this.isStart()&&!this.type&&f.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#h&&this.#n?.type==="!")&&f.push({}),f}isStart(){if(this.#e===this)return!0;if(!this.#n?.isStart())return!1;if(this.#c===0)return!0;let f=this.#n;for(let y=0;y<this.#c;y++){let v=f.#s[y];if(!(v instanceof it&&v.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#n?.type==="!")return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();let f=this.#n?this.#n.#s.length:0;return this.#c===f-1}copyIn(f){typeof f=="string"?this.push(f):this.push(f.clone(this))}clone(f){let y=new it(this.type,f);for(let v of this.#s)y.copyIn(v);return y}static#i(f,y,v,E){let b=!1,w=!1,_=-1,O=!1;if(y.type===null){let j=v,N="";for(;j<f.length;){let M=f.charAt(j++);if(b||M==="\\"){b=!b,N+=M;continue}if(w){j===_+1?(M==="^"||M==="!")&&(O=!0):M==="]"&&!(j===_+2&&O)&&(w=!1),N+=M;continue}else if(M==="["){w=!0,_=j,O=!1,N+=M;continue}if(!E.noext&&n(M)&&f.charAt(j)==="("){y.push(N),N="";let B=new it(M,y);j=it.#i(f,B,j,E),y.push(B);continue}N+=M}return y.push(N),j}let A=v+1,I=new it(null,y),P=[],L="";for(;A<f.length;){let j=f.charAt(A++);if(b||j==="\\"){b=!b,L+=j;continue}if(w){A===_+1?(j==="^"||j==="!")&&(O=!0):j==="]"&&!(A===_+2&&O)&&(w=!1),L+=j;continue}else if(j==="["){w=!0,_=A,O=!1,L+=j;continue}if(n(j)&&f.charAt(A)==="("){I.push(L),L="";let N=new it(j,I);I.push(N),A=it.#i(f,N,A,E);continue}if(j==="|"){I.push(L),L="",P.push(I),I=new it(null,y);continue}if(j===")")return L===""&&y.#s.length===0&&(y.#a=!0),I.push(L),L="",y.push(...P,I),A;L+=j}return y.type=null,y.#t=void 0,y.#s=[f.substring(v-1)],A}static fromGlob(f,y={}){let v=new it(null,void 0,y);return it.#i(f,v,0,y),v}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let f=this.toString(),[y,v,E,b]=this.toRegExpSource();if(!(E||this.#t||this.#o.nocase&&!this.#o.nocaseMagicOnly&&f.toUpperCase()!==f.toLowerCase()))return v;let w=(this.#o.nocase?"i":"")+(b?"u":"");return Object.assign(new RegExp(`^${y}$`,w),{_src:y,_glob:f})}get options(){return this.#o}toRegExpSource(f){let y=f??!!this.#o.dot;if(this.#e===this&&this.#l(),!this.type){let O=this.isStart()&&this.isEnd(),A=this.#s.map(L=>{let[j,N,M,B]=typeof L=="string"?it.#y(L,this.#t,O):L.toRegExpSource(f);return this.#t=this.#t||M,this.#r=this.#r||B,j}).join(""),I="";if(this.isStart()&&typeof this.#s[0]=="string"&&!(this.#s.length===1&&s.has(this.#s[0]))){let L=r,j=y&&L.has(A.charAt(0))||A.startsWith("\\.")&&L.has(A.charAt(2))||A.startsWith("\\.\\.")&&L.has(A.charAt(4)),N=!y&&!f&&L.has(A.charAt(0));I=j?l:N?c:""}let P="";return this.isEnd()&&this.#e.#h&&this.#n?.type==="!"&&(P="(?:$|\\/)"),[I+A+P,(0,i.unescape)(A),this.#t=!!this.#t,this.#r]}let v=this.type==="*"||this.type==="+",E=this.type==="!"?"(?:(?!(?:":"(?:",b=this.#d(y);if(this.isStart()&&this.isEnd()&&!b&&this.type!=="!"){let O=this.toString();return this.#s=[O],this.type=null,this.#t=void 0,[O,(0,i.unescape)(this.toString()),!1,!1]}let w=!v||f||y||!c?"":this.#d(!0);w===b&&(w=""),w&&(b=`(?:${b})(?:${w})*?`);let _="";if(this.type==="!"&&this.#a)_=(this.isStart()&&!y?c:"")+d;else{let O=this.type==="!"?"))"+(this.isStart()&&!y&&!f?c:"")+p+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&w?")":this.type==="*"&&w?")?":`)${this.type}`;_=E+b+O}return[_,(0,i.unescape)(b),this.#t=!!this.#t,this.#r]}#d(f){return this.#s.map(y=>{if(typeof y=="string")throw new Error("string type in extglob ast??");let[v,E,b,w]=y.toRegExpSource(f);return this.#r=this.#r||w,v}).filter(y=>!(this.isStart()&&this.isEnd())||!!y).join("|")}static#y(f,y,v=!1){let E=!1,b="",w=!1;for(let _=0;_<f.length;_++){let O=f.charAt(_);if(E){E=!1,b+=(o.has(O)?"\\":"")+O;continue}if(O==="\\"){_===f.length-1?b+="\\\\":E=!0;continue}if(O==="["){let[A,I,P,L]=(0,t.parseClass)(f,_);if(P){b+=A,w=w||I,_+=P-1,y=y||L;continue}}if(O==="*"){v&&f==="*"?b+=d:b+=p,y=!0;continue}if(O==="?"){b+=h,y=!0;continue}b+=a(O)}return[b,(0,i.unescape)(f),!!y,w]}};e.AST=m}),Pf=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.escape=void 0;var t=S((i,{windowsPathsNoEscape:u=!1}={})=>u?i.replace(/[?*()[\]]/g,"[$&]"):i.replace(/[?*()[\]\\]/g,"\\$&"),"escape");e.escape=t}),zt=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;var t=Nx(),i=kx(),u=Tf(),n=Pf(),l=gl(),c=S((z,U,K={})=>((0,i.assertValidPattern)(U),!K.nocomment&&U.charAt(0)==="#"?!1:new X(U,K).match(z)),"minimatch");e.minimatch=c;var r=/^\*+([^+@!?\*\[\(]*)$/,s=S(z=>U=>!U.startsWith(".")&&U.endsWith(z),"starDotExtTest"),o=S(z=>U=>U.endsWith(z),"starDotExtTestDot"),a=S(z=>(z=z.toLowerCase(),U=>!U.startsWith(".")&&U.toLowerCase().endsWith(z)),"starDotExtTestNocase"),h=S(z=>(z=z.toLowerCase(),U=>U.toLowerCase().endsWith(z)),"starDotExtTestNocaseDot"),p=/^\*+\.\*+$/,d=S(z=>!z.startsWith(".")&&z.includes("."),"starDotStarTest"),m=S(z=>z!=="."&&z!==".."&&z.includes("."),"starDotStarTestDot"),g=/^\.\*+$/,f=S(z=>z!=="."&&z!==".."&&z.startsWith("."),"dotStarTest"),y=/^\*+$/,v=S(z=>z.length!==0&&!z.startsWith("."),"starTest"),E=S(z=>z.length!==0&&z!=="."&&z!=="..","starTestDot"),b=/^\?+([^+@!?\*\[\(]*)?$/,w=S(([z,U=""])=>{let K=I([z]);return U?(U=U.toLowerCase(),Z=>K(Z)&&Z.toLowerCase().endsWith(U)):K},"qmarksTestNocase"),_=S(([z,U=""])=>{let K=P([z]);return U?(U=U.toLowerCase(),Z=>K(Z)&&Z.toLowerCase().endsWith(U)):K},"qmarksTestNocaseDot"),O=S(([z,U=""])=>{let K=P([z]);return U?Z=>K(Z)&&Z.endsWith(U):K},"qmarksTestDot"),A=S(([z,U=""])=>{let K=I([z]);return U?Z=>K(Z)&&Z.endsWith(U):K},"qmarksTest"),I=S(([z])=>{let U=z.length;return K=>K.length===U&&!K.startsWith(".")},"qmarksTestNoExt"),P=S(([z])=>{let U=z.length;return K=>K.length===U&&K!=="."&&K!==".."},"qmarksTestNoExtDot"),L=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",j={win32:{sep:"\\"},posix:{sep:"/"}};e.sep=L==="win32"?j.win32.sep:j.posix.sep,e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol("globstar **"),e.minimatch.GLOBSTAR=e.GLOBSTAR;var N="[^/]",M=N+"*?",B="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",F="(?:(?!(?:\\/|^)\\.).)*?",D=S((z,U={})=>K=>(0,e.minimatch)(K,z,U),"filter");e.filter=D,e.minimatch.filter=e.filter;var H=S((z,U={})=>Object.assign({},z,U),"ext"),G=S(z=>{if(!z||typeof z!="object"||!Object.keys(z).length)return e.minimatch;let U=e.minimatch;return Object.assign(S((K,Z,Q={})=>U(K,Z,H(z,Q)),"m"),{Minimatch:class extends U.Minimatch{static{S(this,"Minimatch")}constructor(K,Z={}){super(K,H(z,Z))}static defaults(K){return U.defaults(H(z,K)).Minimatch}},AST:class extends U.AST{static{S(this,"AST")}constructor(K,Z,Q={}){super(K,Z,H(z,Q))}static fromGlob(K,Z={}){return U.AST.fromGlob(K,H(z,Z))}},unescape:S((K,Z={})=>U.unescape(K,H(z,Z)),"unescape"),escape:S((K,Z={})=>U.escape(K,H(z,Z)),"escape"),filter:S((K,Z={})=>U.filter(K,H(z,Z)),"filter"),defaults:S(K=>U.defaults(H(z,K)),"defaults"),makeRe:S((K,Z={})=>U.makeRe(K,H(z,Z)),"makeRe"),braceExpand:S((K,Z={})=>U.braceExpand(K,H(z,Z)),"braceExpand"),match:S((K,Z,Q={})=>U.match(K,Z,H(z,Q)),"match"),sep:U.sep,GLOBSTAR:e.GLOBSTAR})},"defaults");e.defaults=G,e.minimatch.defaults=e.defaults;var x=S((z,U={})=>((0,i.assertValidPattern)(z),U.nobrace||!/\{(?:(?!\{).)*\}/.test(z)?[z]:(0,t.expand)(z)),"braceExpand");e.braceExpand=x,e.minimatch.braceExpand=e.braceExpand;var k=S((z,U={})=>new X(z,U).makeRe(),"makeRe");e.makeRe=k,e.minimatch.makeRe=e.makeRe;var T=S((z,U,K={})=>{let Z=new X(U,K);return z=z.filter(Q=>Z.match(Q)),Z.options.nonull&&!z.length&&z.push(U),z},"match");e.match=T,e.minimatch.match=e.match;var C=/[?*]|[+@!]\(.*?\)|\[|\]/,q=S(z=>z.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),X=class{static{S(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(z,U={}){(0,i.assertValidPattern)(z),U=U||{},this.options=U,this.pattern=z,this.platform=U.platform||L,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!U.windowsPathsNoEscape||U.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!U.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!U.nonegate,this.comment=!1,this.empty=!1,this.partial=!!U.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=U.windowsNoMagicRoot!==void 0?U.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let z of this.set)for(let U of z)if(typeof U!="string")return!0;return!1}debug(...z){}make(){let z=this.pattern,U=this.options;if(!U.nocomment&&z.charAt(0)==="#"){this.comment=!0;return}if(!z){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],U.debug&&(this.debug=(...Q)=>{}),this.debug(this.pattern,this.globSet);let K=this.globSet.map(Q=>this.slashSplit(Q));this.globParts=this.preprocess(K),this.debug(this.pattern,this.globParts);let Z=this.globParts.map((Q,R,W)=>{if(this.isWindows&&this.windowsNoMagicRoot){let ee=Q[0]===""&&Q[1]===""&&(Q[2]==="?"||!C.test(Q[2]))&&!C.test(Q[3]),ne=/^[a-z]:/i.test(Q[0]);if(ee)return[...Q.slice(0,4),...Q.slice(4).map(te=>this.parse(te))];if(ne)return[Q[0],...Q.slice(1).map(te=>this.parse(te))]}return Q.map(ee=>this.parse(ee))});if(this.debug(this.pattern,Z),this.set=Z.filter(Q=>Q.indexOf(!1)===-1),this.isWindows)for(let Q=0;Q<this.set.length;Q++){let R=this.set[Q];R[0]===""&&R[1]===""&&this.globParts[Q][2]==="?"&&typeof R[3]=="string"&&/^[a-z]:$/i.test(R[3])&&(R[2]="?")}this.debug(this.pattern,this.set)}preprocess(z){if(this.options.noglobstar)for(let K=0;K<z.length;K++)for(let Z=0;Z<z[K].length;Z++)z[K][Z]==="**"&&(z[K][Z]="*");let{optimizationLevel:U=1}=this.options;return U>=2?(z=this.firstPhasePreProcess(z),z=this.secondPhasePreProcess(z)):U>=1?z=this.levelOneOptimize(z):z=this.adjascentGlobstarOptimize(z),z}adjascentGlobstarOptimize(z){return z.map(U=>{let K=-1;for(;(K=U.indexOf("**",K+1))!==-1;){let Z=K;for(;U[Z+1]==="**";)Z++;Z!==K&&U.splice(K,Z-K)}return U})}levelOneOptimize(z){return z.map(U=>(U=U.reduce((K,Z)=>{let Q=K[K.length-1];return Z==="**"&&Q==="**"?K:Z===".."&&Q&&Q!==".."&&Q!=="."&&Q!=="**"?(K.pop(),K):(K.push(Z),K)},[]),U.length===0?[""]:U))}levelTwoFileOptimize(z){Array.isArray(z)||(z=this.slashSplit(z));let U=!1;do{if(U=!1,!this.preserveMultipleSlashes){for(let Z=1;Z<z.length-1;Z++){let Q=z[Z];Z===1&&Q===""&&z[0]===""||(Q==="."||Q==="")&&(U=!0,z.splice(Z,1),Z--)}z[0]==="."&&z.length===2&&(z[1]==="."||z[1]==="")&&(U=!0,z.pop())}let K=0;for(;(K=z.indexOf("..",K+1))!==-1;){let Z=z[K-1];Z&&Z!=="."&&Z!==".."&&Z!=="**"&&(U=!0,z.splice(K-1,2),K-=2)}}while(U);return z.length===0?[""]:z}firstPhasePreProcess(z){let U=!1;do{U=!1;for(let K of z){let Z=-1;for(;(Z=K.indexOf("**",Z+1))!==-1;){let R=Z;for(;K[R+1]==="**";)R++;R>Z&&K.splice(Z+1,R-Z);let W=K[Z+1],ee=K[Z+2],ne=K[Z+3];if(W!==".."||!ee||ee==="."||ee===".."||!ne||ne==="."||ne==="..")continue;U=!0,K.splice(Z,1);let te=K.slice(0);te[Z]="**",z.push(te),Z--}if(!this.preserveMultipleSlashes){for(let R=1;R<K.length-1;R++){let W=K[R];R===1&&W===""&&K[0]===""||(W==="."||W==="")&&(U=!0,K.splice(R,1),R--)}K[0]==="."&&K.length===2&&(K[1]==="."||K[1]==="")&&(U=!0,K.pop())}let Q=0;for(;(Q=K.indexOf("..",Q+1))!==-1;){let R=K[Q-1];if(R&&R!=="."&&R!==".."&&R!=="**"){U=!0;let W=Q===1&&K[Q+1]==="**"?["."]:[];K.splice(Q-1,2,...W),K.length===0&&K.push(""),Q-=2}}}}while(U);return z}secondPhasePreProcess(z){for(let U=0;U<z.length-1;U++)for(let K=U+1;K<z.length;K++){let Z=this.partsMatch(z[U],z[K],!this.preserveMultipleSlashes);if(Z){z[U]=[],z[K]=Z;break}}return z.filter(U=>U.length)}partsMatch(z,U,K=!1){let Z=0,Q=0,R=[],W="";for(;Z<z.length&&Q<U.length;)if(z[Z]===U[Q])R.push(W==="b"?U[Q]:z[Z]),Z++,Q++;else if(K&&z[Z]==="**"&&U[Q]===z[Z+1])R.push(z[Z]),Z++;else if(K&&U[Q]==="**"&&z[Z]===U[Q+1])R.push(U[Q]),Q++;else if(z[Z]==="*"&&U[Q]&&(this.options.dot||!U[Q].startsWith("."))&&U[Q]!=="**"){if(W==="b")return!1;W="a",R.push(z[Z]),Z++,Q++}else if(U[Q]==="*"&&z[Z]&&(this.options.dot||!z[Z].startsWith("."))&&z[Z]!=="**"){if(W==="a")return!1;W="b",R.push(U[Q]),Z++,Q++}else return!1;return z.length===U.length&&R}parseNegate(){if(this.nonegate)return;let z=this.pattern,U=!1,K=0;for(let Z=0;Z<z.length&&z.charAt(Z)==="!";Z++)U=!U,K++;K&&(this.pattern=z.slice(K)),this.negate=U}matchOne(z,U,K=!1){let Z=this.options;if(this.isWindows){let ie=typeof z[0]=="string"&&/^[a-z]:$/i.test(z[0]),ce=!ie&&z[0]===""&&z[1]===""&&z[2]==="?"&&/^[a-z]:$/i.test(z[3]),ge=typeof U[0]=="string"&&/^[a-z]:$/i.test(U[0]),ye=!ge&&U[0]===""&&U[1]===""&&U[2]==="?"&&typeof U[3]=="string"&&/^[a-z]:$/i.test(U[3]),ue=ce?3:ie?0:void 0,de=ye?3:ge?0:void 0;if(typeof ue=="number"&&typeof de=="number"){let[fe,ve]=[z[ue],U[de]];fe.toLowerCase()===ve.toLowerCase()&&(U[de]=fe,de>ue?U=U.slice(de):ue>de&&(z=z.slice(ue)))}}let{optimizationLevel:Q=1}=this.options;Q>=2&&(z=this.levelTwoFileOptimize(z)),this.debug("matchOne",this,{file:z,pattern:U}),this.debug("matchOne",z.length,U.length);for(var R=0,W=0,ee=z.length,ne=U.length;R<ee&&W<ne;R++,W++){this.debug("matchOne loop");var te=U[W],le=z[R];if(this.debug(U,te,le),te===!1)return!1;if(te===e.GLOBSTAR){this.debug("GLOBSTAR",[U,te,le]);var pe=R,re=W+1;if(re===ne){for(this.debug("** at the end");R<ee;R++)if(z[R]==="."||z[R]===".."||!Z.dot&&z[R].charAt(0)===".")return!1;return!0}for(;pe<ee;){var he=z[pe];if(this.debug(`
23
- globstar while`,z,pe,U,re,he),this.matchOne(z.slice(pe),U.slice(re),K))return this.debug("globstar found match!",pe,ee,he),!0;if(he==="."||he===".."||!Z.dot&&he.charAt(0)==="."){this.debug("dot detected!",z,pe,U,re);break}this.debug("globstar swallow a segment, and continue"),pe++}return!!(K&&(this.debug(`
24
- >>> no match, partial?`,z,pe,U,re),pe===ee))}let ie;if(typeof te=="string"?(ie=le===te,this.debug("string match",te,le,ie)):(ie=te.test(le),this.debug("pattern match",te,le,ie)),!ie)return!1}if(R===ee&&W===ne)return!0;if(R===ee)return K;if(W===ne)return R===ee-1&&z[R]==="";throw new Error("wtf?")}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(z){(0,i.assertValidPattern)(z);let U=this.options;if(z==="**")return e.GLOBSTAR;if(z==="")return"";let K,Z=null;(K=z.match(y))?Z=U.dot?E:v:(K=z.match(r))?Z=(U.nocase?U.dot?h:a:U.dot?o:s)(K[1]):(K=z.match(b))?Z=(U.nocase?U.dot?_:w:U.dot?O:A)(K):(K=z.match(p))?Z=U.dot?m:d:(K=z.match(g))&&(Z=f);let Q=u.AST.fromGlob(z,this.options).toMMPattern();return Z&&typeof Q=="object"&&Reflect.defineProperty(Q,"test",{value:Z}),Q}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let z=this.set;if(!z.length)return this.regexp=!1,this.regexp;let U=this.options,K=U.noglobstar?M:U.dot?B:F,Z=new Set(U.nocase?["i"]:[]),Q=z.map(ee=>{let ne=ee.map(te=>{if(te instanceof RegExp)for(let le of te.flags.split(""))Z.add(le);return typeof te=="string"?q(te):te===e.GLOBSTAR?e.GLOBSTAR:te._src});return ne.forEach((te,le)=>{let pe=ne[le+1],re=ne[le-1];te!==e.GLOBSTAR||re===e.GLOBSTAR||(re===void 0?pe!==void 0&&pe!==e.GLOBSTAR?ne[le+1]="(?:\\/|"+K+"\\/)?"+pe:ne[le]=K:pe===void 0?ne[le-1]=re+"(?:\\/|"+K+")?":pe!==e.GLOBSTAR&&(ne[le-1]=re+"(?:\\/|\\/"+K+"\\/)"+pe,ne[le+1]=e.GLOBSTAR))}),ne.filter(te=>te!==e.GLOBSTAR).join("/")}).join("|"),[R,W]=z.length>1?["(?:",")"]:["",""];Q="^"+R+Q+W+"$",this.negate&&(Q="^(?!"+Q+").+$");try{this.regexp=new RegExp(Q,[...Z].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(z){return this.preserveMultipleSlashes?z.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(z)?["",...z.split(/\/+/)]:z.split(/\/+/)}match(z,U=this.partial){if(this.debug("match",z,this.pattern),this.comment)return!1;if(this.empty)return z==="";if(z==="/"&&U)return!0;let K=this.options;this.isWindows&&(z=z.split("\\").join("/"));let Z=this.slashSplit(z);this.debug(this.pattern,"split",Z);let Q=this.set;this.debug(this.pattern,"set",Q);let R=Z[Z.length-1];if(!R)for(let W=Z.length-2;!R&&W>=0;W--)R=Z[W];for(let W=0;W<Q.length;W++){let ee=Q[W],ne=Z;if(K.matchBase&&ee.length===1&&(ne=[R]),this.matchOne(ne,ee,U))return K.flipNegate?!0:!this.negate}return K.flipNegate?!1:this.negate}static defaults(z){return e.minimatch.defaults(z).Minimatch}};e.Minimatch=X;var Y=Tf();Object.defineProperty(e,"AST",{enumerable:!0,get:S(function(){return Y.AST},"get")});var $=Pf();Object.defineProperty(e,"escape",{enumerable:!0,get:S(function(){return $.escape},"get")});var V=gl();Object.defineProperty(e,"unescape",{enumerable:!0,get:S(function(){return V.unescape},"get")}),e.minimatch.AST=u.AST,e.minimatch.Minimatch=X,e.minimatch.escape=n.escape,e.minimatch.unescape=l.unescape}),ke=J(e=>{"use strict";var t=e&&e.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(e,"__esModule",{value:!0}),e.Minipass=e.isWritable=e.isReadable=e.isStream=void 0;var i=typeof process=="object"&&process?process:{stdout:null,stderr:null},u=require("events"),n=t(require("stream")),l=require("string_decoder"),c=S(R=>!!R&&typeof R=="object"&&(R instanceof Q||R instanceof n.default||(0,e.isReadable)(R)||(0,e.isWritable)(R)),"isStream");e.isStream=c;var r=S(R=>!!R&&typeof R=="object"&&R instanceof u.EventEmitter&&typeof R.pipe=="function"&&R.pipe!==n.default.Writable.prototype.pipe,"isReadable");e.isReadable=r;var s=S(R=>!!R&&typeof R=="object"&&R instanceof u.EventEmitter&&typeof R.write=="function"&&typeof R.end=="function","isWritable");e.isWritable=s;var o=Symbol("EOF"),a=Symbol("maybeEmitEnd"),h=Symbol("emittedEnd"),p=Symbol("emittingEnd"),d=Symbol("emittedError"),m=Symbol("closed"),g=Symbol("read"),f=Symbol("flush"),y=Symbol("flushChunk"),v=Symbol("encoding"),E=Symbol("decoder"),b=Symbol("flowing"),w=Symbol("paused"),_=Symbol("resume"),O=Symbol("buffer"),A=Symbol("pipes"),I=Symbol("bufferLength"),P=Symbol("bufferPush"),L=Symbol("bufferShift"),j=Symbol("objectMode"),N=Symbol("destroyed"),M=Symbol("error"),B=Symbol("emitData"),F=Symbol("emitEnd"),D=Symbol("emitEnd2"),H=Symbol("async"),G=Symbol("abort"),x=Symbol("aborted"),k=Symbol("signal"),T=Symbol("dataListeners"),C=Symbol("discarded"),q=S(R=>Promise.resolve().then(R),"defer"),X=S(R=>R(),"nodefer"),Y=S(R=>R==="end"||R==="finish"||R==="prefinish","isEndish"),$=S(R=>R instanceof ArrayBuffer||!!R&&typeof R=="object"&&R.constructor&&R.constructor.name==="ArrayBuffer"&&R.byteLength>=0,"isArrayBufferLike"),V=S(R=>!Buffer.isBuffer(R)&&ArrayBuffer.isView(R),"isArrayBufferView"),z=class{static{S(this,"Pipe")}src;dest;opts;ondrain;constructor(R,W,ee){this.src=R,this.dest=W,this.opts=ee,this.ondrain=()=>R[_](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(R){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},U=class extends z{static{S(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(R,W,ee){super(R,W,ee),this.proxyErrors=ne=>W.emit("error",ne),R.on("error",this.proxyErrors)}},K=S(R=>!!R.objectMode,"isObjectModeOptions"),Z=S(R=>!R.objectMode&&!!R.encoding&&R.encoding!=="buffer","isEncodingOptions"),Q=class extends u.EventEmitter{static{S(this,"Minipass")}[b]=!1;[w]=!1;[A]=[];[O]=[];[j];[v];[H];[E];[o]=!1;[h]=!1;[p]=!1;[m]=!1;[d]=null;[I]=0;[N]=!1;[k];[x]=!1;[T]=0;[C]=!1;writable=!0;readable=!0;constructor(...R){let W=R[0]||{};if(super(),W.objectMode&&typeof W.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");K(W)?(this[j]=!0,this[v]=null):Z(W)?(this[v]=W.encoding,this[j]=!1):(this[j]=!1,this[v]=null),this[H]=!!W.async,this[E]=this[v]?new l.StringDecoder(this[v]):null,W&&W.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:S(()=>this[O],"get")}),W&&W.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:S(()=>this[A],"get")});let{signal:ee}=W;ee&&(this[k]=ee,ee.aborted?this[G]():ee.addEventListener("abort",()=>this[G]()))}get bufferLength(){return this[I]}get encoding(){return this[v]}set encoding(R){throw new Error("Encoding must be set at instantiation time")}setEncoding(R){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[j]}set objectMode(R){throw new Error("objectMode must be set at instantiation time")}get async(){return this[H]}set async(R){this[H]=this[H]||!!R}[G](){this[x]=!0,this.emit("abort",this[k]?.reason),this.destroy(this[k]?.reason)}get aborted(){return this[x]}set aborted(R){}write(R,W,ee){if(this[x])return!1;if(this[o])throw new Error("write after end");if(this[N])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof W=="function"&&(ee=W,W="utf8"),W||(W="utf8");let ne=this[H]?q:X;if(!this[j]&&!Buffer.isBuffer(R)){if(V(R))R=Buffer.from(R.buffer,R.byteOffset,R.byteLength);else if($(R))R=Buffer.from(R);else if(typeof R!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[j]?(this[b]&&this[I]!==0&&this[f](!0),this[b]?this.emit("data",R):this[P](R),this[I]!==0&&this.emit("readable"),ee&&ne(ee),this[b]):R.length?(typeof R=="string"&&!(W===this[v]&&!this[E]?.lastNeed)&&(R=Buffer.from(R,W)),Buffer.isBuffer(R)&&this[v]&&(R=this[E].write(R)),this[b]&&this[I]!==0&&this[f](!0),this[b]?this.emit("data",R):this[P](R),this[I]!==0&&this.emit("readable"),ee&&ne(ee),this[b]):(this[I]!==0&&this.emit("readable"),ee&&ne(ee),this[b])}read(R){if(this[N])return null;if(this[C]=!1,this[I]===0||R===0||R&&R>this[I])return this[a](),null;this[j]&&(R=null),this[O].length>1&&!this[j]&&(this[O]=[this[v]?this[O].join(""):Buffer.concat(this[O],this[I])]);let W=this[g](R||null,this[O][0]);return this[a](),W}[g](R,W){if(this[j])this[L]();else{let ee=W;R===ee.length||R===null?this[L]():typeof ee=="string"?(this[O][0]=ee.slice(R),W=ee.slice(0,R),this[I]-=R):(this[O][0]=ee.subarray(R),W=ee.subarray(0,R),this[I]-=R)}return this.emit("data",W),!this[O].length&&!this[o]&&this.emit("drain"),W}end(R,W,ee){return typeof R=="function"&&(ee=R,R=void 0),typeof W=="function"&&(ee=W,W="utf8"),R!==void 0&&this.write(R,W),ee&&this.once("end",ee),this[o]=!0,this.writable=!1,(this[b]||!this[w])&&this[a](),this}[_](){this[N]||(!this[T]&&!this[A].length&&(this[C]=!0),this[w]=!1,this[b]=!0,this.emit("resume"),this[O].length?this[f]():this[o]?this[a]():this.emit("drain"))}resume(){return this[_]()}pause(){this[b]=!1,this[w]=!0,this[C]=!1}get destroyed(){return this[N]}get flowing(){return this[b]}get paused(){return this[w]}[P](R){this[j]?this[I]+=1:this[I]+=R.length,this[O].push(R)}[L](){return this[j]?this[I]-=1:this[I]-=this[O][0].length,this[O].shift()}[f](R=!1){do;while(this[y](this[L]())&&this[O].length);!R&&!this[O].length&&!this[o]&&this.emit("drain")}[y](R){return this.emit("data",R),this[b]}pipe(R,W){if(this[N])return R;this[C]=!1;let ee=this[h];return W=W||{},R===i.stdout||R===i.stderr?W.end=!1:W.end=W.end!==!1,W.proxyErrors=!!W.proxyErrors,ee?W.end&&R.end():(this[A].push(W.proxyErrors?new U(this,R,W):new z(this,R,W)),this[H]?q(()=>this[_]()):this[_]()),R}unpipe(R){let W=this[A].find(ee=>ee.dest===R);W&&(this[A].length===1?(this[b]&&this[T]===0&&(this[b]=!1),this[A]=[]):this[A].splice(this[A].indexOf(W),1),W.unpipe())}addListener(R,W){return this.on(R,W)}on(R,W){let ee=super.on(R,W);if(R==="data")this[C]=!1,this[T]++,!this[A].length&&!this[b]&&this[_]();else if(R==="readable"&&this[I]!==0)super.emit("readable");else if(Y(R)&&this[h])super.emit(R),this.removeAllListeners(R);else if(R==="error"&&this[d]){let ne=W;this[H]?q(()=>ne.call(this,this[d])):ne.call(this,this[d])}return ee}removeListener(R,W){return this.off(R,W)}off(R,W){let ee=super.off(R,W);return R==="data"&&(this[T]=this.listeners("data").length,this[T]===0&&!this[C]&&!this[A].length&&(this[b]=!1)),ee}removeAllListeners(R){let W=super.removeAllListeners(R);return(R==="data"||R===void 0)&&(this[T]=0,!this[C]&&!this[A].length&&(this[b]=!1)),W}get emittedEnd(){return this[h]}[a](){!this[p]&&!this[h]&&!this[N]&&this[O].length===0&&this[o]&&(this[p]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[m]&&this.emit("close"),this[p]=!1)}emit(R,...W){let ee=W[0];if(R!=="error"&&R!=="close"&&R!==N&&this[N])return!1;if(R==="data")return!this[j]&&!ee?!1:this[H]?(q(()=>this[B](ee)),!0):this[B](ee);if(R==="end")return this[F]();if(R==="close"){if(this[m]=!0,!this[h]&&!this[N])return!1;let te=super.emit("close");return this.removeAllListeners("close"),te}else if(R==="error"){this[d]=ee,super.emit(M,ee);let te=!this[k]||this.listeners("error").length?super.emit("error",ee):!1;return this[a](),te}else if(R==="resume"){let te=super.emit("resume");return this[a](),te}else if(R==="finish"||R==="prefinish"){let te=super.emit(R);return this.removeAllListeners(R),te}let ne=super.emit(R,...W);return this[a](),ne}[B](R){for(let ee of this[A])ee.dest.write(R)===!1&&this.pause();let W=this[C]?!1:super.emit("data",R);return this[a](),W}[F](){return this[h]?!1:(this[h]=!0,this.readable=!1,this[H]?(q(()=>this[D]()),!0):this[D]())}[D](){if(this[E]){let W=this[E].end();if(W){for(let ee of this[A])ee.dest.write(W);this[C]||super.emit("data",W)}}for(let W of this[A])W.end();let R=super.emit("end");return this.removeAllListeners("end"),R}async collect(){let R=Object.assign([],{dataLength:0});this[j]||(R.dataLength=0);let W=this.promise();return this.on("data",ee=>{R.push(ee),this[j]||(R.dataLength+=ee.length)}),await W,R}async concat(){if(this[j])throw new Error("cannot concat in objectMode");let R=await this.collect();return this[v]?R.join(""):Buffer.concat(R,R.dataLength)}async promise(){return new Promise((R,W)=>{this.on(N,()=>W(new Error("stream destroyed"))),this.on("error",ee=>W(ee)),this.on("end",()=>R())})}[Symbol.asyncIterator](){this[C]=!1;let R=!1,W=S(async()=>(this.pause(),R=!0,{value:void 0,done:!0}),"stop");return{next:S(()=>{if(R)return W();let ee=this.read();if(ee!==null)return Promise.resolve({done:!1,value:ee});if(this[o])return W();let ne,te,le=S(ie=>{this.off("data",pe),this.off("end",re),this.off(N,he),W(),te(ie)},"onerr"),pe=S(ie=>{this.off("error",le),this.off("end",re),this.off(N,he),this.pause(),ne({value:ie,done:!!this[o]})},"ondata"),re=S(()=>{this.off("error",le),this.off("data",pe),this.off(N,he),W(),ne({done:!0,value:void 0})},"onend"),he=S(()=>le(new Error("stream destroyed")),"ondestroy");return new Promise((ie,ce)=>{te=ce,ne=ie,this.once(N,he),this.once("error",le),this.once("end",re),this.once("data",pe)})},"next"),throw:W,return:W,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[C]=!1;let R=!1,W=S(()=>(this.pause(),this.off(M,W),this.off(N,W),this.off("end",W),R=!0,{done:!0,value:void 0}),"stop"),ee=S(()=>{if(R)return W();let ne=this.read();return ne===null?W():{done:!1,value:ne}},"next");return this.once("end",W),this.once(M,W),this.once(N,W),{next:ee,throw:W,return:W,[Symbol.iterator](){return this}}}destroy(R){if(this[N])return R?this.emit("error",R):this.emit(N),this;this[N]=!0,this[C]=!0,this[O].length=0,this[I]=0;let W=this;return typeof W.close=="function"&&!this[m]&&W.close(),R?this.emit("error",R):this.emit(N),this}static get isStream(){return e.isStream}};e.Minipass=Q}),Dx=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(R,W,ee,ne){ne===void 0&&(ne=ee);var te=Object.getOwnPropertyDescriptor(W,ee);(!te||("get"in te?!W.__esModule:te.writable||te.configurable))&&(te={enumerable:!0,get:S(function(){return W[ee]},"get")}),Object.defineProperty(R,ne,te)}:function(R,W,ee,ne){ne===void 0&&(ne=ee),R[ne]=W[ee]}),i=e&&e.__setModuleDefault||(Object.create?function(R,W){Object.defineProperty(R,"default",{enumerable:!0,value:W})}:function(R,W){R.default=W}),u=e&&e.__importStar||function(R){if(R&&R.__esModule)return R;var W={};if(R!=null)for(var ee in R)ee!=="default"&&Object.prototype.hasOwnProperty.call(R,ee)&&t(W,R,ee);return i(W,R),W};Object.defineProperty(e,"__esModule",{value:!0}),e.PathScurry=e.Path=e.PathScurryDarwin=e.PathScurryPosix=e.PathScurryWin32=e.PathScurryBase=e.PathPosix=e.PathWin32=e.PathBase=e.ChildrenCache=e.ResolveCache=void 0;var n=Cr(),l=require("path"),c=require("url"),r=require("fs"),s=u(require("fs")),o=r.realpathSync.native,a=require("internal/fs/promises"),h=ke(),p={lstatSync:r.lstatSync,readdir:r.readdir,readdirSync:r.readdirSync,readlinkSync:r.readlinkSync,realpathSync:o,promises:{lstat:a.lstat,readdir:a.readdir,readlink:a.readlink,realpath:a.realpath}},d=S(R=>!R||R===p||R===s?p:{...p,...R,promises:{...p.promises,...R.promises||{}}},"fsFromOption"),m=/^\\\\\?\\([a-z]:)\\?$/i,g=S(R=>R.replace(/\//g,"\\").replace(m,"$1\\"),"uncToDrive"),f=/[\\\/]/,y=0,v=1,E=2,b=4,w=6,_=8,O=10,A=12,I=15,P=~I,L=16,j=32,N=64,M=128,B=256,F=512,D=N|M|F,H=1023,G=S(R=>R.isFile()?_:R.isDirectory()?b:R.isSymbolicLink()?O:R.isCharacterDevice()?E:R.isBlockDevice()?w:R.isSocket()?A:R.isFIFO()?v:y,"entToType"),x=new Map,k=S(R=>{let W=x.get(R);if(W)return W;let ee=R.normalize("NFKD");return x.set(R,ee),ee},"normalize"),T=new Map,C=S(R=>{let W=T.get(R);if(W)return W;let ee=k(R.toLowerCase());return T.set(R,ee),ee},"normalizeNocase"),q=class extends n.LRUCache{static{S(this,"ResolveCache")}constructor(){super({max:256})}};e.ResolveCache=q;var X=class extends n.LRUCache{static{S(this,"ChildrenCache")}constructor(R=16*1024){super({maxSize:R,sizeCalculation:S(W=>W.length+1,"sizeCalculation")})}};e.ChildrenCache=X;var Y=Symbol("PathScurry setAsCwd"),$=class{static{S(this,"PathBase")}name;root;roots;parent;nocase;isCWD=!1;#e;#t;get dev(){return this.#t}#r;get mode(){return this.#r}#s;get nlink(){return this.#s}#n;get uid(){return this.#n}#c;get gid(){return this.#c}#u;get rdev(){return this.#u}#h;get blksize(){return this.#h}#o;get ino(){return this.#o}#p;get size(){return this.#p}#a;get blocks(){return this.#a}#l;get atimeMs(){return this.#l}#i;get mtimeMs(){return this.#i}#d;get ctimeMs(){return this.#d}#y;get birthtimeMs(){return this.#y}#S;get atime(){return this.#S}#f;get mtime(){return this.#f}#R;get ctime(){return this.#R}#v;get birthtime(){return this.#v}#E;#b;#w;#_;#N;#O;#m;#M;#I;#T;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(R,W=y,ee,ne,te,le,pe){this.name=R,this.#E=te?C(R):k(R),this.#m=W&H,this.nocase=te,this.roots=ne,this.root=ee||this,this.#M=le,this.#w=pe.fullpath,this.#N=pe.relative,this.#O=pe.relativePosix,this.parent=pe.parent,this.parent?this.#e=this.parent.#e:this.#e=d(pe.fs)}depth(){return this.#b!==void 0?this.#b:this.parent?this.#b=this.parent.depth()+1:this.#b=0}childrenCache(){return this.#M}resolve(R){if(!R)return this;let W=this.getRootString(R),ee=R.substring(W.length).split(this.splitSep);return W?this.getRoot(W).#B(ee):this.#B(ee)}#B(R){let W=this;for(let ee of R)W=W.child(ee);return W}children(){let R=this.#M.get(this);if(R)return R;let W=Object.assign([],{provisional:0});return this.#M.set(this,W),this.#m&=~L,W}child(R,W){if(R===""||R===".")return this;if(R==="..")return this.parent||this;let ee=this.children(),ne=this.nocase?C(R):k(R);for(let re of ee)if(re.#E===ne)return re;let te=this.parent?this.sep:"",le=this.#w?this.#w+te+R:void 0,pe=this.newChild(R,y,{...W,parent:this,fullpath:le});return this.canReaddir()||(pe.#m|=M),ee.push(pe),pe}relative(){if(this.isCWD)return"";if(this.#N!==void 0)return this.#N;let R=this.name,W=this.parent;if(!W)return this.#N=this.name;let ee=W.relative();return ee+(!ee||!W.parent?"":this.sep)+R}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#O!==void 0)return this.#O;let R=this.name,W=this.parent;if(!W)return this.#O=this.fullpathPosix();let ee=W.relativePosix();return ee+(!ee||!W.parent?"":"/")+R}fullpath(){if(this.#w!==void 0)return this.#w;let R=this.name,W=this.parent;if(!W)return this.#w=this.name;let ee=W.fullpath()+(W.parent?this.sep:"")+R;return this.#w=ee}fullpathPosix(){if(this.#_!==void 0)return this.#_;if(this.sep==="/")return this.#_=this.fullpath();if(!this.parent){let ne=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(ne)?this.#_=`//?/${ne}`:this.#_=ne}let R=this.parent,W=R.fullpathPosix(),ee=W+(!W||!R.parent?"":"/")+this.name;return this.#_=ee}isUnknown(){return(this.#m&I)===y}isType(R){return this[`is${R}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#m&I)===_}isDirectory(){return(this.#m&I)===b}isCharacterDevice(){return(this.#m&I)===E}isBlockDevice(){return(this.#m&I)===w}isFIFO(){return(this.#m&I)===v}isSocket(){return(this.#m&I)===A}isSymbolicLink(){return(this.#m&O)===O}lstatCached(){return this.#m&j?this:void 0}readlinkCached(){return this.#I}realpathCached(){return this.#T}readdirCached(){let R=this.children();return R.slice(0,R.provisional)}canReadlink(){if(this.#I)return!0;if(!this.parent)return!1;let R=this.#m&I;return!(R!==y&&R!==O||this.#m&B||this.#m&M)}calledReaddir(){return!!(this.#m&L)}isENOENT(){return!!(this.#m&M)}isNamed(R){return this.nocase?this.#E===C(R):this.#E===k(R)}async readlink(){let R=this.#I;if(R)return R;if(this.canReadlink()&&this.parent)try{let W=await this.#e.promises.readlink(this.fullpath()),ee=(await this.parent.realpath())?.resolve(W);if(ee)return this.#I=ee}catch(W){this.#A(W.code);return}}readlinkSync(){let R=this.#I;if(R)return R;if(this.canReadlink()&&this.parent)try{let W=this.#e.readlinkSync(this.fullpath()),ee=this.parent.realpathSync()?.resolve(W);if(ee)return this.#I=ee}catch(W){this.#A(W.code);return}}#C(R){this.#m|=L;for(let W=R.provisional;W<R.length;W++){let ee=R[W];ee&&ee.#H()}}#H(){this.#m&M||(this.#m=(this.#m|M)&P,this.#k())}#k(){let R=this.children();R.provisional=0;for(let W of R)W.#H()}#D(){this.#m|=F,this.#U()}#U(){if(this.#m&N)return;let R=this.#m;(R&I)===b&&(R&=P),this.#m=R|N,this.#k()}#P(R=""){R==="ENOTDIR"||R==="EPERM"?this.#U():R==="ENOENT"?this.#H():this.children().provisional=0}#x(R=""){R==="ENOTDIR"?this.parent.#U():R==="ENOENT"&&this.#H()}#A(R=""){let W=this.#m;W|=B,R==="ENOENT"&&(W|=M),(R==="EINVAL"||R==="UNKNOWN")&&(W&=P),this.#m=W,R==="ENOTDIR"&&this.parent&&this.parent.#U()}#$(R,W){return this.#g(R,W)||this.#j(R,W)}#j(R,W){let ee=G(R),ne=this.newChild(R.name,ee,{parent:this}),te=ne.#m&I;return te!==b&&te!==O&&te!==y&&(ne.#m|=N),W.unshift(ne),W.provisional++,ne}#g(R,W){for(let ee=W.provisional;ee<W.length;ee++){let ne=W[ee];if((this.nocase?C(R.name):k(R.name))===ne.#E)return this.#G(R,ne,ee,W)}}#G(R,W,ee,ne){let te=W.name;return W.#m=W.#m&P|G(R),te!==R.name&&(W.name=R.name),ee!==ne.provisional&&(ee===ne.length-1?ne.pop():ne.splice(ee,1),ne.unshift(W)),ne.provisional++,W}async lstat(){if(!(this.#m&M))try{return this.#F(await this.#e.promises.lstat(this.fullpath())),this}catch(R){this.#x(R.code)}}lstatSync(){if(!(this.#m&M))try{return this.#F(this.#e.lstatSync(this.fullpath())),this}catch(R){this.#x(R.code)}}#F(R){let{atime:W,atimeMs:ee,birthtime:ne,birthtimeMs:te,blksize:le,blocks:pe,ctime:re,ctimeMs:he,dev:ie,gid:ce,ino:ge,mode:ye,mtime:ue,mtimeMs:de,nlink:fe,rdev:ve,size:be,uid:xe}=R;this.#S=W,this.#l=ee,this.#v=ne,this.#y=te,this.#h=le,this.#a=pe,this.#R=re,this.#d=he,this.#t=ie,this.#c=ce,this.#o=ge,this.#r=ye,this.#f=ue,this.#i=de,this.#s=fe,this.#u=ve,this.#p=be,this.#n=xe;let He=G(R);this.#m=this.#m&P|He|j,He!==y&&He!==b&&He!==O&&(this.#m|=N)}#L=[];#V=!1;#z(R){this.#V=!1;let W=this.#L.slice();this.#L.length=0,W.forEach(ee=>ee(null,R))}readdirCB(R,W=!1){if(!this.canReaddir()){W?R(null,[]):queueMicrotask(()=>R(null,[]));return}let ee=this.children();if(this.calledReaddir()){let te=ee.slice(0,ee.provisional);W?R(null,te):queueMicrotask(()=>R(null,te));return}if(this.#L.push(R),this.#V)return;this.#V=!0;let ne=this.fullpath();this.#e.readdir(ne,{withFileTypes:!0},(te,le)=>{if(te)this.#P(te.code),ee.provisional=0;else{for(let pe of le)this.#$(pe,ee);this.#C(ee)}this.#z(ee.slice(0,ee.provisional))})}#W;async readdir(){if(!this.canReaddir())return[];let R=this.children();if(this.calledReaddir())return R.slice(0,R.provisional);let W=this.fullpath();if(this.#W)await this.#W;else{let ee=S(()=>{},"resolve");this.#W=new Promise(ne=>ee=ne);try{for(let ne of await this.#e.promises.readdir(W,{withFileTypes:!0}))this.#$(ne,R);this.#C(R)}catch(ne){this.#P(ne.code),R.provisional=0}this.#W=void 0,ee()}return R.slice(0,R.provisional)}readdirSync(){if(!this.canReaddir())return[];let R=this.children();if(this.calledReaddir())return R.slice(0,R.provisional);let W=this.fullpath();try{for(let ee of this.#e.readdirSync(W,{withFileTypes:!0}))this.#$(ee,R);this.#C(R)}catch(ee){this.#P(ee.code),R.provisional=0}return R.slice(0,R.provisional)}canReaddir(){if(this.#m&D)return!1;let R=I&this.#m;return R===y||R===b||R===O}shouldWalk(R,W){return(this.#m&b)===b&&!(this.#m&D)&&!R.has(this)&&(!W||W(this))}async realpath(){if(this.#T)return this.#T;if(!((F|B|M)&this.#m))try{let R=await this.#e.promises.realpath(this.fullpath());return this.#T=this.resolve(R)}catch{this.#D()}}realpathSync(){if(this.#T)return this.#T;if(!((F|B|M)&this.#m))try{let R=this.#e.realpathSync(this.fullpath());return this.#T=this.resolve(R)}catch{this.#D()}}[Y](R){if(R===this)return;R.isCWD=!1,this.isCWD=!0;let W=new Set([]),ee=[],ne=this;for(;ne&&ne.parent;)W.add(ne),ne.#N=ee.join(this.sep),ne.#O=ee.join("/"),ne=ne.parent,ee.push("..");for(ne=R;ne&&ne.parent&&!W.has(ne);)ne.#N=void 0,ne.#O=void 0,ne=ne.parent}};e.PathBase=$;var V=class zf extends ${static{S(this,"PathWin32")}sep="\\";splitSep=f;constructor(W,ee=y,ne,te,le,pe,re){super(W,ee,ne,te,le,pe,re)}newChild(W,ee=y,ne={}){return new zf(W,ee,this.root,this.roots,this.nocase,this.childrenCache(),ne)}getRootString(W){return l.win32.parse(W).root}getRoot(W){if(W=g(W.toUpperCase()),W===this.root.name)return this.root;for(let[ee,ne]of Object.entries(this.roots))if(this.sameRoot(W,ee))return this.roots[W]=ne;return this.roots[W]=new K(W,this).root}sameRoot(W,ee=this.root.name){return W=W.toUpperCase().replace(/\//g,"\\").replace(m,"$1\\"),W===ee}};e.PathWin32=V;var z=class qf extends ${static{S(this,"PathPosix")}splitSep="/";sep="/";constructor(W,ee=y,ne,te,le,pe,re){super(W,ee,ne,te,le,pe,re)}getRootString(W){return W.startsWith("/")?"/":""}getRoot(W){return this.root}newChild(W,ee=y,ne={}){return new qf(W,ee,this.root,this.roots,this.nocase,this.childrenCache(),ne)}};e.PathPosix=z;var U=class{static{S(this,"PathScurryBase")}root;rootPath;roots;cwd;#e;#t;#r;nocase;#s;constructor(R=process.cwd(),W,ee,{nocase:ne,childrenCacheSize:te=16*1024,fs:le=p}={}){this.#s=d(le),(R instanceof URL||R.startsWith("file://"))&&(R=(0,c.fileURLToPath)(R));let pe=W.resolve(R);this.roots=Object.create(null),this.rootPath=this.parseRootPath(pe),this.#e=new q,this.#t=new q,this.#r=new X(te);let re=pe.substring(this.rootPath.length).split(ee);if(re.length===1&&!re[0]&&re.pop(),ne===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=ne,this.root=this.newRoot(this.#s),this.roots[this.rootPath]=this.root;let he=this.root,ie=re.length-1,ce=W.sep,ge=this.rootPath,ye=!1;for(let ue of re){let de=ie--;he=he.child(ue,{relative:new Array(de).fill("..").join(ce),relativePosix:new Array(de).fill("..").join("/"),fullpath:ge+=(ye?"":ce)+ue}),ye=!0}this.cwd=he}depth(R=this.cwd){return typeof R=="string"&&(R=this.cwd.resolve(R)),R.depth()}childrenCache(){return this.#r}resolve(...R){let W="";for(let te=R.length-1;te>=0;te--){let le=R[te];if(!(!le||le===".")&&(W=W?`${le}/${W}`:le,this.isAbsolute(le)))break}let ee=this.#e.get(W);if(ee!==void 0)return ee;let ne=this.cwd.resolve(W).fullpath();return this.#e.set(W,ne),ne}resolvePosix(...R){let W="";for(let te=R.length-1;te>=0;te--){let le=R[te];if(!(!le||le===".")&&(W=W?`${le}/${W}`:le,this.isAbsolute(le)))break}let ee=this.#t.get(W);if(ee!==void 0)return ee;let ne=this.cwd.resolve(W).fullpathPosix();return this.#t.set(W,ne),ne}relative(R=this.cwd){return typeof R=="string"&&(R=this.cwd.resolve(R)),R.relative()}relativePosix(R=this.cwd){return typeof R=="string"&&(R=this.cwd.resolve(R)),R.relativePosix()}basename(R=this.cwd){return typeof R=="string"&&(R=this.cwd.resolve(R)),R.name}dirname(R=this.cwd){return typeof R=="string"&&(R=this.cwd.resolve(R)),(R.parent||R).fullpath()}async readdir(R=this.cwd,W={withFileTypes:!0}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof $||(W=R,R=this.cwd);let{withFileTypes:ee}=W;if(R.canReaddir()){let ne=await R.readdir();return ee?ne:ne.map(te=>te.name)}else return[]}readdirSync(R=this.cwd,W={withFileTypes:!0}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof $||(W=R,R=this.cwd);let{withFileTypes:ee=!0}=W;return R.canReaddir()?ee?R.readdirSync():R.readdirSync().map(ne=>ne.name):[]}async lstat(R=this.cwd){return typeof R=="string"&&(R=this.cwd.resolve(R)),R.lstat()}lstatSync(R=this.cwd){return typeof R=="string"&&(R=this.cwd.resolve(R)),R.lstatSync()}async readlink(R=this.cwd,{withFileTypes:W}={withFileTypes:!1}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof $||(W=R.withFileTypes,R=this.cwd);let ee=await R.readlink();return W?ee:ee?.fullpath()}readlinkSync(R=this.cwd,{withFileTypes:W}={withFileTypes:!1}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof $||(W=R.withFileTypes,R=this.cwd);let ee=R.readlinkSync();return W?ee:ee?.fullpath()}async realpath(R=this.cwd,{withFileTypes:W}={withFileTypes:!1}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof $||(W=R.withFileTypes,R=this.cwd);let ee=await R.realpath();return W?ee:ee?.fullpath()}realpathSync(R=this.cwd,{withFileTypes:W}={withFileTypes:!1}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof $||(W=R.withFileTypes,R=this.cwd);let ee=R.realpathSync();return W?ee:ee?.fullpath()}async walk(R=this.cwd,W={}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof $||(W=R,R=this.cwd);let{withFileTypes:ee=!0,follow:ne=!1,filter:te,walkFilter:le}=W,pe=[];(!te||te(R))&&pe.push(ee?R:R.fullpath());let re=new Set,he=S((ce,ge)=>{re.add(ce),ce.readdirCB((ye,ue)=>{if(ye)return ge(ye);let de=ue.length;if(!de)return ge();let fe=S(()=>{--de===0&&ge()},"next");for(let ve of ue)(!te||te(ve))&&pe.push(ee?ve:ve.fullpath()),ne&&ve.isSymbolicLink()?ve.realpath().then(be=>be?.isUnknown()?be.lstat():be).then(be=>be?.shouldWalk(re,le)?he(be,fe):fe()):ve.shouldWalk(re,le)?he(ve,fe):fe()},!0)},"walk"),ie=R;return new Promise((ce,ge)=>{he(ie,ye=>{if(ye)return ge(ye);ce(pe)})})}walkSync(R=this.cwd,W={}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof $||(W=R,R=this.cwd);let{withFileTypes:ee=!0,follow:ne=!1,filter:te,walkFilter:le}=W,pe=[];(!te||te(R))&&pe.push(ee?R:R.fullpath());let re=new Set([R]);for(let he of re){let ie=he.readdirSync();for(let ce of ie){(!te||te(ce))&&pe.push(ee?ce:ce.fullpath());let ge=ce;if(ce.isSymbolicLink()){if(!(ne&&(ge=ce.realpathSync())))continue;ge.isUnknown()&&ge.lstatSync()}ge.shouldWalk(re,le)&&re.add(ge)}}return pe}[Symbol.asyncIterator](){return this.iterate()}iterate(R=this.cwd,W={}){return typeof R=="string"?R=this.cwd.resolve(R):R instanceof $||(W=R,R=this.cwd),this.stream(R,W)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(R=this.cwd,W={}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof $||(W=R,R=this.cwd);let{withFileTypes:ee=!0,follow:ne=!1,filter:te,walkFilter:le}=W;(!te||te(R))&&(yield ee?R:R.fullpath());let pe=new Set([R]);for(let re of pe){let he=re.readdirSync();for(let ie of he){(!te||te(ie))&&(yield ee?ie:ie.fullpath());let ce=ie;if(ie.isSymbolicLink()){if(!(ne&&(ce=ie.realpathSync())))continue;ce.isUnknown()&&ce.lstatSync()}ce.shouldWalk(pe,le)&&pe.add(ce)}}}stream(R=this.cwd,W={}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof $||(W=R,R=this.cwd);let{withFileTypes:ee=!0,follow:ne=!1,filter:te,walkFilter:le}=W,pe=new h.Minipass({objectMode:!0});(!te||te(R))&&pe.write(ee?R:R.fullpath());let re=new Set,he=[R],ie=0,ce=S(()=>{let ge=!1;for(;!ge;){let ye=he.shift();if(!ye){ie===0&&pe.end();return}ie++,re.add(ye);let ue=S((fe,ve,be=!1)=>{if(fe)return pe.emit("error",fe);if(ne&&!be){let xe=[];for(let He of ve)He.isSymbolicLink()&&xe.push(He.realpath().then(or=>or?.isUnknown()?or.lstat():or));if(xe.length){Promise.all(xe).then(()=>ue(null,ve,!0));return}}for(let xe of ve)xe&&(!te||te(xe))&&(pe.write(ee?xe:xe.fullpath())||(ge=!0));ie--;for(let xe of ve){let He=xe.realpathCached()||xe;He.shouldWalk(re,le)&&he.push(He)}ge&&!pe.flowing?pe.once("drain",ce):de||ce()},"onReaddir"),de=!0;ye.readdirCB(ue,!0),de=!1}},"process");return ce(),pe}streamSync(R=this.cwd,W={}){typeof R=="string"?R=this.cwd.resolve(R):R instanceof $||(W=R,R=this.cwd);let{withFileTypes:ee=!0,follow:ne=!1,filter:te,walkFilter:le}=W,pe=new h.Minipass({objectMode:!0}),re=new Set;(!te||te(R))&&pe.write(ee?R:R.fullpath());let he=[R],ie=0,ce=S(()=>{let ge=!1;for(;!ge;){let ye=he.shift();if(!ye){ie===0&&pe.end();return}ie++,re.add(ye);let ue=ye.readdirSync();for(let de of ue)(!te||te(de))&&(pe.write(ee?de:de.fullpath())||(ge=!0));ie--;for(let de of ue){let fe=de;if(de.isSymbolicLink()){if(!(ne&&(fe=de.realpathSync())))continue;fe.isUnknown()&&fe.lstatSync()}fe.shouldWalk(re,le)&&he.push(fe)}}ge&&!pe.flowing&&pe.once("drain",ce)},"process");return ce(),pe}chdir(R=this.cwd){let W=this.cwd;this.cwd=typeof R=="string"?this.cwd.resolve(R):R,this.cwd[Y](W)}};e.PathScurryBase=U;var K=class extends U{static{S(this,"PathScurryWin32")}sep="\\";constructor(R=process.cwd(),W={}){let{nocase:ee=!0}=W;super(R,l.win32,"\\",{...W,nocase:ee}),this.nocase=ee;for(let ne=this.cwd;ne;ne=ne.parent)ne.nocase=this.nocase}parseRootPath(R){return l.win32.parse(R).root.toUpperCase()}newRoot(R){return new V(this.rootPath,b,void 0,this.roots,this.nocase,this.childrenCache(),{fs:R})}isAbsolute(R){return R.startsWith("/")||R.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(R)}};e.PathScurryWin32=K;var Z=class extends U{static{S(this,"PathScurryPosix")}sep="/";constructor(R=process.cwd(),W={}){let{nocase:ee=!1}=W;super(R,l.posix,"/",{...W,nocase:ee}),this.nocase=ee}parseRootPath(R){return"/"}newRoot(R){return new z(this.rootPath,b,void 0,this.roots,this.nocase,this.childrenCache(),{fs:R})}isAbsolute(R){return R.startsWith("/")}};e.PathScurryPosix=Z;var Q=class extends Z{static{S(this,"PathScurryDarwin")}constructor(R=process.cwd(),W={}){let{nocase:ee=!0}=W;super(R,{...W,nocase:ee})}};e.PathScurryDarwin=Q,e.Path=process.platform==="win32"?V:z,e.PathScurry=process.platform==="win32"?K:process.platform==="darwin"?Q:Z}),Kf=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pattern=void 0;var t=zt(),i=S(l=>l.length>=1,"isPatternList"),u=S(l=>l.length>=1,"isGlobList"),n=class Jf{static{S(this,"Pattern")}#e;#t;#r;length;#s;#n;#c;#u;#h;#o;#p=!0;constructor(c,r,s,o){if(!i(c))throw new TypeError("empty pattern list");if(!u(r))throw new TypeError("empty glob list");if(r.length!==c.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=c.length,s<0||s>=this.length)throw new TypeError("index out of range");if(this.#e=c,this.#t=r,this.#r=s,this.#s=o,this.#r===0){if(this.isUNC()){let[a,h,p,d,...m]=this.#e,[g,f,y,v,...E]=this.#t;m[0]===""&&(m.shift(),E.shift());let b=[a,h,p,d,""].join("/"),w=[g,f,y,v,""].join("/");this.#e=[b,...m],this.#t=[w,...E],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[a,...h]=this.#e,[p,...d]=this.#t;h[0]===""&&(h.shift(),d.shift());let m=a+"/",g=p+"/";this.#e=[m,...h],this.#t=[g,...d],this.length=this.#e.length}}}pattern(){return this.#e[this.#r]}isString(){return typeof this.#e[this.#r]=="string"}isGlobstar(){return this.#e[this.#r]===t.GLOBSTAR}isRegExp(){return this.#e[this.#r]instanceof RegExp}globString(){return this.#c=this.#c||(this.#r===0?this.isAbsolute()?this.#t[0]+this.#t.slice(1).join("/"):this.#t.join("/"):this.#t.slice(this.#r).join("/"))}hasMore(){return this.length>this.#r+1}rest(){return this.#n!==void 0?this.#n:this.hasMore()?(this.#n=new Jf(this.#e,this.#t,this.#r+1,this.#s),this.#n.#o=this.#o,this.#n.#h=this.#h,this.#n.#u=this.#u,this.#n):this.#n=null}isUNC(){let c=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#s==="win32"&&this.#r===0&&c[0]===""&&c[1]===""&&typeof c[2]=="string"&&!!c[2]&&typeof c[3]=="string"&&!!c[3]}isDrive(){let c=this.#e;return this.#u!==void 0?this.#u:this.#u=this.#s==="win32"&&this.#r===0&&this.length>1&&typeof c[0]=="string"&&/^[a-z]:$/i.test(c[0])}isAbsolute(){let c=this.#e;return this.#o!==void 0?this.#o:this.#o=c[0]===""&&c.length>1||this.isDrive()||this.isUNC()}root(){let c=this.#e[0];return typeof c=="string"&&this.isAbsolute()&&this.#r===0?c:""}checkFollowGlobstar(){return!(this.#r===0||!this.isGlobstar()||!this.#p)}markFollowGlobstar(){return this.#r===0||!this.isGlobstar()||!this.#p?!1:(this.#p=!1,!0)}};e.Pattern=n}),Xf=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ignore=void 0;var t=zt(),i=Kf(),u=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",n=class{static{S(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(l,{nobrace:c,nocase:r,noext:s,noglobstar:o,platform:a=u}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=a,this.mmopts={dot:!0,nobrace:c,nocase:r,noext:s,noglobstar:o,optimizationLevel:2,platform:a,nocomment:!0,nonegate:!0};for(let h of l)this.add(h)}add(l){let c=new t.Minimatch(l,this.mmopts);for(let r=0;r<c.set.length;r++){let s=c.set[r],o=c.globParts[r];if(!s||!o)throw new Error("invalid pattern object");for(;s[0]==="."&&o[0]===".";)s.shift(),o.shift();let a=new i.Pattern(s,o,0,this.platform),h=new t.Minimatch(a.globString(),this.mmopts),p=o[o.length-1]==="**",d=a.isAbsolute();d?this.absolute.push(h):this.relative.push(h),p&&(d?this.absoluteChildren.push(h):this.relativeChildren.push(h))}}ignored(l){let c=l.fullpath(),r=`${c}/`,s=l.relative()||".",o=`${s}/`;for(let a of this.relative)if(a.match(s)||a.match(o))return!0;for(let a of this.absolute)if(a.match(c)||a.match(r))return!0;return!1}childrenIgnored(l){let c=l.fullpath()+"/",r=(l.relative()||".")+"/";for(let s of this.relativeChildren)if(s.match(r))return!0;for(let s of this.absoluteChildren)if(s.match(c))return!0;return!1}};e.Ignore=n}),$x=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Processor=e.SubWalks=e.MatchRecord=e.HasWalkedCache=void 0;var t=zt(),i=class Zf{static{S(this,"HasWalkedCache")}store;constructor(r=new Map){this.store=r}copy(){return new Zf(new Map(this.store))}hasWalked(r,s){return this.store.get(r.fullpath())?.has(s.globString())}storeWalked(r,s){let o=r.fullpath(),a=this.store.get(o);a?a.add(s.globString()):this.store.set(o,new Set([s.globString()]))}};e.HasWalkedCache=i;var u=class{static{S(this,"MatchRecord")}store=new Map;add(c,r,s){let o=(r?2:0)|(s?1:0),a=this.store.get(c);this.store.set(c,a===void 0?o:o&a)}entries(){return[...this.store.entries()].map(([c,r])=>[c,!!(r&2),!!(r&1)])}};e.MatchRecord=u;var n=class{static{S(this,"SubWalks")}store=new Map;add(c,r){if(!c.canReaddir())return;let s=this.store.get(c);s?s.find(o=>o.globString()===r.globString())||s.push(r):this.store.set(c,[r])}get(c){let r=this.store.get(c);if(!r)throw new Error("attempting to walk unknown path");return r}entries(){return this.keys().map(c=>[c,this.store.get(c)])}keys(){return[...this.store.keys()].filter(c=>c.canReaddir())}};e.SubWalks=n;var l=class Yf{static{S(this,"Processor")}hasWalkedCache;matches=new u;subwalks=new n;patterns;follow;dot;opts;constructor(r,s){this.opts=r,this.follow=!!r.follow,this.dot=!!r.dot,this.hasWalkedCache=s?s.copy():new i}processPatterns(r,s){this.patterns=s;let o=s.map(a=>[r,a]);for(let[a,h]of o){this.hasWalkedCache.storeWalked(a,h);let p=h.root(),d=h.isAbsolute()&&this.opts.absolute!==!1;if(p){a=a.resolve(p==="/"&&this.opts.root!==void 0?this.opts.root:p);let y=h.rest();if(y)h=y;else{this.matches.add(a,!0,!1);continue}}if(a.isENOENT())continue;let m,g,f=!1;for(;typeof(m=h.pattern())=="string"&&(g=h.rest());)a=a.resolve(m),h=g,f=!0;if(m=h.pattern(),g=h.rest(),f){if(this.hasWalkedCache.hasWalked(a,h))continue;this.hasWalkedCache.storeWalked(a,h)}if(typeof m=="string"){let y=m===".."||m===""||m===".";this.matches.add(a.resolve(m),d,y);continue}else if(m===t.GLOBSTAR){(!a.isSymbolicLink()||this.follow||h.checkFollowGlobstar())&&this.subwalks.add(a,h);let y=g?.pattern(),v=g?.rest();if(!g||(y===""||y===".")&&!v)this.matches.add(a,d,y===""||y===".");else if(y===".."){let E=a.parent||a;v?this.hasWalkedCache.hasWalked(E,v)||this.subwalks.add(E,v):this.matches.add(E,d,!0)}}else m instanceof RegExp&&this.subwalks.add(a,h)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new Yf(this.opts,this.hasWalkedCache)}filterEntries(r,s){let o=this.subwalks.get(r),a=this.child();for(let h of s)for(let p of o){let d=p.isAbsolute(),m=p.pattern(),g=p.rest();m===t.GLOBSTAR?a.testGlobstar(h,p,g,d):m instanceof RegExp?a.testRegExp(h,m,g,d):a.testString(h,m,g,d)}return a}testGlobstar(r,s,o,a){if((this.dot||!r.name.startsWith("."))&&(s.hasMore()||this.matches.add(r,a,!1),r.canReaddir()&&(this.follow||!r.isSymbolicLink()?this.subwalks.add(r,s):r.isSymbolicLink()&&(o&&s.checkFollowGlobstar()?this.subwalks.add(r,o):s.markFollowGlobstar()&&this.subwalks.add(r,s)))),o){let h=o.pattern();if(typeof h=="string"&&h!==".."&&h!==""&&h!==".")this.testString(r,h,o.rest(),a);else if(h===".."){let p=r.parent||r;this.subwalks.add(p,o)}else h instanceof RegExp&&this.testRegExp(r,h,o.rest(),a)}}testRegExp(r,s,o,a){s.test(r.name)&&(o?this.subwalks.add(r,o):this.matches.add(r,a,!1))}testString(r,s,o,a){r.isNamed(s)&&(o?this.subwalks.add(r,o):this.matches.add(r,a,!1))}};e.Processor=l}),jx=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobStream=e.GlobWalker=e.GlobUtil=void 0;var t=ke(),i=Xf(),u=$x(),n=S((s,o)=>typeof s=="string"?new i.Ignore([s],o):Array.isArray(s)?new i.Ignore(s,o):s,"makeIgnore"),l=class{static{S(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#t;#r;signal;maxDepth;includeChildMatches;constructor(s,o,a){if(this.patterns=s,this.path=o,this.opts=a,this.#r=!a.posix&&a.platform==="win32"?"\\":"/",this.includeChildMatches=a.includeChildMatches!==!1,(a.ignore||!this.includeChildMatches)&&(this.#t=n(a.ignore??[],a),!this.includeChildMatches&&typeof this.#t.add!="function")){let h="cannot ignore child matches, ignore lacks add() method.";throw new Error(h)}this.maxDepth=a.maxDepth||1/0,a.signal&&(this.signal=a.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#s(s){return this.seen.has(s)||!!this.#t?.ignored?.(s)}#n(s){return!!this.#t?.childrenIgnored?.(s)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let s;for(;!this.paused&&(s=this.#e.shift());)s()}onResume(s){this.signal?.aborted||(this.paused?this.#e.push(s):s())}async matchCheck(s,o){if(o&&this.opts.nodir)return;let a;if(this.opts.realpath){if(a=s.realpathCached()||await s.realpath(),!a)return;s=a}let h=s.isUnknown()||this.opts.stat?await s.lstat():s;if(this.opts.follow&&this.opts.nodir&&h?.isSymbolicLink()){let p=await h.realpath();p&&(p.isUnknown()||this.opts.stat)&&await p.lstat()}return this.matchCheckTest(h,o)}matchCheckTest(s,o){return s&&(this.maxDepth===1/0||s.depth()<=this.maxDepth)&&(!o||s.canReaddir())&&(!this.opts.nodir||!s.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!s.isSymbolicLink()||!s.realpathCached()?.isDirectory())&&!this.#s(s)?s:void 0}matchCheckSync(s,o){if(o&&this.opts.nodir)return;let a;if(this.opts.realpath){if(a=s.realpathCached()||s.realpathSync(),!a)return;s=a}let h=s.isUnknown()||this.opts.stat?s.lstatSync():s;if(this.opts.follow&&this.opts.nodir&&h?.isSymbolicLink()){let p=h.realpathSync();p&&(p?.isUnknown()||this.opts.stat)&&p.lstatSync()}return this.matchCheckTest(h,o)}matchFinish(s,o){if(this.#s(s))return;if(!this.includeChildMatches&&this.#t?.add){let p=`${s.relativePosix()}/**`;this.#t.add(p)}let a=this.opts.absolute===void 0?o:this.opts.absolute;this.seen.add(s);let h=this.opts.mark&&s.isDirectory()?this.#r:"";if(this.opts.withFileTypes)this.matchEmit(s);else if(a){let p=this.opts.posix?s.fullpathPosix():s.fullpath();this.matchEmit(p+h)}else{let p=this.opts.posix?s.relativePosix():s.relative(),d=this.opts.dotRelative&&!p.startsWith(".."+this.#r)?"."+this.#r:"";this.matchEmit(p?d+p+h:"."+h)}}async match(s,o,a){let h=await this.matchCheck(s,a);h&&this.matchFinish(h,o)}matchSync(s,o,a){let h=this.matchCheckSync(s,a);h&&this.matchFinish(h,o)}walkCB(s,o,a){this.signal?.aborted&&a(),this.walkCB2(s,o,new u.Processor(this.opts),a)}walkCB2(s,o,a,h){if(this.#n(s))return h();if(this.signal?.aborted&&h(),this.paused){this.onResume(()=>this.walkCB2(s,o,a,h));return}a.processPatterns(s,o);let p=1,d=S(()=>{--p===0&&h()},"next");for(let[m,g,f]of a.matches.entries())this.#s(m)||(p++,this.match(m,g,f).then(()=>d()));for(let m of a.subwalkTargets()){if(this.maxDepth!==1/0&&m.depth()>=this.maxDepth)continue;p++;let g=m.readdirCached();m.calledReaddir()?this.walkCB3(m,g,a,d):m.readdirCB((f,y)=>this.walkCB3(m,y,a,d),!0)}d()}walkCB3(s,o,a,h){a=a.filterEntries(s,o);let p=1,d=S(()=>{--p===0&&h()},"next");for(let[m,g,f]of a.matches.entries())this.#s(m)||(p++,this.match(m,g,f).then(()=>d()));for(let[m,g]of a.subwalks.entries())p++,this.walkCB2(m,g,a.child(),d);d()}walkCBSync(s,o,a){this.signal?.aborted&&a(),this.walkCB2Sync(s,o,new u.Processor(this.opts),a)}walkCB2Sync(s,o,a,h){if(this.#n(s))return h();if(this.signal?.aborted&&h(),this.paused){this.onResume(()=>this.walkCB2Sync(s,o,a,h));return}a.processPatterns(s,o);let p=1,d=S(()=>{--p===0&&h()},"next");for(let[m,g,f]of a.matches.entries())this.#s(m)||this.matchSync(m,g,f);for(let m of a.subwalkTargets()){if(this.maxDepth!==1/0&&m.depth()>=this.maxDepth)continue;p++;let g=m.readdirSync();this.walkCB3Sync(m,g,a,d)}d()}walkCB3Sync(s,o,a,h){a=a.filterEntries(s,o);let p=1,d=S(()=>{--p===0&&h()},"next");for(let[m,g,f]of a.matches.entries())this.#s(m)||this.matchSync(m,g,f);for(let[m,g]of a.subwalks.entries())p++,this.walkCB2Sync(m,g,a.child(),d);d()}};e.GlobUtil=l;var c=class extends l{static{S(this,"GlobWalker")}matches=new Set;constructor(s,o,a){super(s,o,a)}matchEmit(s){this.matches.add(s)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((s,o)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?o(this.signal.reason):s(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}};e.GlobWalker=c;var r=class extends l{static{S(this,"GlobStream")}results;constructor(s,o,a){super(s,o,a),this.results=new t.Minipass({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(s){this.results.write(s),this.results.flowing||this.pause()}stream(){let s=this.path;return s.isUnknown()?s.lstat().then(()=>{this.walkCB(s,this.patterns,()=>this.results.end())}):this.walkCB(s,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}};e.GlobStream=r}),xf=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Glob=void 0;var t=zt(),i=require("url"),u=Dx(),n=Kf(),l=jx(),c=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",r=class{static{S(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(s,o){if(!o)throw new TypeError("glob options required");if(this.withFileTypes=!!o.withFileTypes,this.signal=o.signal,this.follow=!!o.follow,this.dot=!!o.dot,this.dotRelative=!!o.dotRelative,this.nodir=!!o.nodir,this.mark=!!o.mark,o.cwd?(o.cwd instanceof URL||o.cwd.startsWith("file://"))&&(o.cwd=(0,i.fileURLToPath)(o.cwd)):this.cwd="",this.cwd=o.cwd||"",this.root=o.root,this.magicalBraces=!!o.magicalBraces,this.nobrace=!!o.nobrace,this.noext=!!o.noext,this.realpath=!!o.realpath,this.absolute=o.absolute,this.includeChildMatches=o.includeChildMatches!==!1,this.noglobstar=!!o.noglobstar,this.matchBase=!!o.matchBase,this.maxDepth=typeof o.maxDepth=="number"?o.maxDepth:1/0,this.stat=!!o.stat,this.ignore=o.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof s=="string"&&(s=[s]),this.windowsPathsNoEscape=!!o.windowsPathsNoEscape||o.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(s=s.map(g=>g.replace(/\\/g,"/"))),this.matchBase){if(o.noglobstar)throw new TypeError("base matching requires globstar");s=s.map(g=>g.includes("/")?g:`./**/${g}`)}if(this.pattern=s,this.platform=o.platform||c,this.opts={...o,platform:this.platform},o.scurry){if(this.scurry=o.scurry,o.nocase!==void 0&&o.nocase!==o.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let g=o.platform==="win32"?u.PathScurryWin32:o.platform==="darwin"?u.PathScurryDarwin:o.platform?u.PathScurryPosix:u.PathScurry;this.scurry=new g(this.cwd,{nocase:o.nocase,fs:o.fs})}this.nocase=this.scurry.nocase;let a=this.platform==="darwin"||this.platform==="win32",h={...o,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:a,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},p=this.pattern.map(g=>new t.Minimatch(g,h)),[d,m]=p.reduce((g,f)=>(g[0].push(...f.set),g[1].push(...f.globParts),g),[[],[]]);this.patterns=d.map((g,f)=>{let y=m[f];if(!y)throw new Error("invalid pattern object");return new n.Pattern(g,y,0,this.platform)})}async walk(){return[...await new l.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new l.GlobWalker(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new l.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new l.GlobStream(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}};e.Glob=r}),Nf=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasMagic=void 0;var t=zt(),i=S((u,n={})=>{Array.isArray(u)||(u=[u]);for(let l of u)if(new t.Minimatch(l,n).hasMagic())return!0;return!1},"hasMagic");e.hasMagic=i}),Qf=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.glob=e.sync=e.iterate=e.iterateSync=e.stream=e.streamSync=e.Ignore=e.hasMagic=e.Glob=e.unescape=e.escape=void 0,e.globStreamSync=s,e.globStream=o,e.globSync=a,e.globIterateSync=p,e.globIterate=d;var t=zt(),i=xf(),u=Nf(),n=zt();Object.defineProperty(e,"escape",{enumerable:!0,get:S(function(){return n.escape},"get")}),Object.defineProperty(e,"unescape",{enumerable:!0,get:S(function(){return n.unescape},"get")});var l=xf();Object.defineProperty(e,"Glob",{enumerable:!0,get:S(function(){return l.Glob},"get")});var c=Nf();Object.defineProperty(e,"hasMagic",{enumerable:!0,get:S(function(){return c.hasMagic},"get")});var r=Xf();Object.defineProperty(e,"Ignore",{enumerable:!0,get:S(function(){return r.Ignore},"get")});function s(m,g={}){return new i.Glob(m,g).streamSync()}S(s,"globStreamSync");function o(m,g={}){return new i.Glob(m,g).stream()}S(o,"globStream");function a(m,g={}){return new i.Glob(m,g).walkSync()}S(a,"globSync");async function h(m,g={}){return new i.Glob(m,g).walk()}S(h,"glob_");function p(m,g={}){return new i.Glob(m,g).iterateSync()}S(p,"globIterateSync");function d(m,g={}){return new i.Glob(m,g).iterate()}S(d,"globIterate"),e.streamSync=s,e.stream=Object.assign(o,{sync:s}),e.iterateSync=p,e.iterate=Object.assign(d,{sync:p}),e.sync=Object.assign(a,{stream:s,iterate:p}),e.glob=Object.assign(h,{glob:h,globSync:a,sync:e.sync,globStream:o,stream:e.stream,globStreamSync:s,streamSync:e.streamSync,globIterate:d,iterate:e.iterate,globIterateSync:p,iterateSync:e.iterateSync,Glob:i.Glob,hasMagic:u.hasMagic,escape:t.escape,unescape:t.unescape}),e.glob.glob=e.glob}),eg=J((e,t)=>{t.exports=["0BSD","3D-Slicer-1.0","AAL","ADSL","AFL-1.1","AFL-1.2","AFL-2.0","AFL-2.1","AFL-3.0","AGPL-1.0-only","AGPL-1.0-or-later","AGPL-3.0-only","AGPL-3.0-or-later","AMD-newlib","AMDPLPA","AML","AML-glslang","AMPAS","ANTLR-PD","ANTLR-PD-fallback","APAFML","APL-1.0","APSL-1.0","APSL-1.1","APSL-1.2","APSL-2.0","ASWF-Digital-Assets-1.0","ASWF-Digital-Assets-1.1","Abstyles","AdaCore-doc","Adobe-2006","Adobe-Display-PostScript","Adobe-Glyph","Adobe-Utopia","Afmparse","Aladdin","Apache-1.0","Apache-1.1","Apache-2.0","App-s2p","Arphic-1999","Artistic-1.0","Artistic-1.0-Perl","Artistic-1.0-cl8","Artistic-2.0","Artistic-dist","Aspell-RU","BSD-1-Clause","BSD-2-Clause","BSD-2-Clause-Darwin","BSD-2-Clause-Patent","BSD-2-Clause-Views","BSD-2-Clause-first-lines","BSD-2-Clause-pkgconf-disclaimer","BSD-3-Clause","BSD-3-Clause-Attribution","BSD-3-Clause-Clear","BSD-3-Clause-HP","BSD-3-Clause-LBNL","BSD-3-Clause-Modification","BSD-3-Clause-No-Military-License","BSD-3-Clause-No-Nuclear-License","BSD-3-Clause-No-Nuclear-License-2014","BSD-3-Clause-No-Nuclear-Warranty","BSD-3-Clause-Open-MPI","BSD-3-Clause-Sun","BSD-3-Clause-acpica","BSD-3-Clause-flex","BSD-4-Clause","BSD-4-Clause-Shortened","BSD-4-Clause-UC","BSD-4.3RENO","BSD-4.3TAHOE","BSD-Advertising-Acknowledgement","BSD-Attribution-HPND-disclaimer","BSD-Inferno-Nettverk","BSD-Protection","BSD-Source-Code","BSD-Source-beginning-file","BSD-Systemics","BSD-Systemics-W3Works","BSL-1.0","BUSL-1.1","Baekmuk","Bahyph","Barr","Beerware","BitTorrent-1.0","BitTorrent-1.1","Bitstream-Charter","Bitstream-Vera","BlueOak-1.0.0","Boehm-GC","Boehm-GC-without-fee","Borceux","Brian-Gladman-2-Clause","Brian-Gladman-3-Clause","C-UDA-1.0","CAL-1.0","CAL-1.0-Combined-Work-Exception","CATOSL-1.1","CC-BY-1.0","CC-BY-2.0","CC-BY-2.5","CC-BY-2.5-AU","CC-BY-3.0","CC-BY-3.0-AT","CC-BY-3.0-AU","CC-BY-3.0-DE","CC-BY-3.0-IGO","CC-BY-3.0-NL","CC-BY-3.0-US","CC-BY-4.0","CC-BY-NC-1.0","CC-BY-NC-2.0","CC-BY-NC-2.5","CC-BY-NC-3.0","CC-BY-NC-3.0-DE","CC-BY-NC-4.0","CC-BY-NC-ND-1.0","CC-BY-NC-ND-2.0","CC-BY-NC-ND-2.5","CC-BY-NC-ND-3.0","CC-BY-NC-ND-3.0-DE","CC-BY-NC-ND-3.0-IGO","CC-BY-NC-ND-4.0","CC-BY-NC-SA-1.0","CC-BY-NC-SA-2.0","CC-BY-NC-SA-2.0-DE","CC-BY-NC-SA-2.0-FR","CC-BY-NC-SA-2.0-UK","CC-BY-NC-SA-2.5","CC-BY-NC-SA-3.0","CC-BY-NC-SA-3.0-DE","CC-BY-NC-SA-3.0-IGO","CC-BY-NC-SA-4.0","CC-BY-ND-1.0","CC-BY-ND-2.0","CC-BY-ND-2.5","CC-BY-ND-3.0","CC-BY-ND-3.0-DE","CC-BY-ND-4.0","CC-BY-SA-1.0","CC-BY-SA-2.0","CC-BY-SA-2.0-UK","CC-BY-SA-2.1-JP","CC-BY-SA-2.5","CC-BY-SA-3.0","CC-BY-SA-3.0-AT","CC-BY-SA-3.0-DE","CC-BY-SA-3.0-IGO","CC-BY-SA-4.0","CC-PDDC","CC-PDM-1.0","CC-SA-1.0","CC0-1.0","CDDL-1.0","CDDL-1.1","CDL-1.0","CDLA-Permissive-1.0","CDLA-Permissive-2.0","CDLA-Sharing-1.0","CECILL-1.0","CECILL-1.1","CECILL-2.0","CECILL-2.1","CECILL-B","CECILL-C","CERN-OHL-1.1","CERN-OHL-1.2","CERN-OHL-P-2.0","CERN-OHL-S-2.0","CERN-OHL-W-2.0","CFITSIO","CMU-Mach","CMU-Mach-nodoc","CNRI-Jython","CNRI-Python","CNRI-Python-GPL-Compatible","COIL-1.0","CPAL-1.0","CPL-1.0","CPOL-1.02","CUA-OPL-1.0","Caldera","Caldera-no-preamble","Catharon","ClArtistic","Clips","Community-Spec-1.0","Condor-1.1","Cornell-Lossless-JPEG","Cronyx","Crossword","CryptoSwift","CrystalStacker","Cube","D-FSL-1.0","DEC-3-Clause","DL-DE-BY-2.0","DL-DE-ZERO-2.0","DOC","DRL-1.0","DRL-1.1","DSDP","DocBook-DTD","DocBook-Schema","DocBook-Stylesheet","DocBook-XML","Dotseqn","ECL-1.0","ECL-2.0","EFL-1.0","EFL-2.0","EPICS","EPL-1.0","EPL-2.0","EUDatagrid","EUPL-1.0","EUPL-1.1","EUPL-1.2","Elastic-2.0","Entessa","ErlPL-1.1","Eurosym","FBM","FDK-AAC","FSFAP","FSFAP-no-warranty-disclaimer","FSFUL","FSFULLR","FSFULLRSD","FSFULLRWD","FSL-1.1-ALv2","FSL-1.1-MIT","FTL","Fair","Ferguson-Twofish","Frameworx-1.0","FreeBSD-DOC","FreeImage","Furuseth","GCR-docs","GD","GFDL-1.1-invariants-only","GFDL-1.1-invariants-or-later","GFDL-1.1-no-invariants-only","GFDL-1.1-no-invariants-or-later","GFDL-1.1-only","GFDL-1.1-or-later","GFDL-1.2-invariants-only","GFDL-1.2-invariants-or-later","GFDL-1.2-no-invariants-only","GFDL-1.2-no-invariants-or-later","GFDL-1.2-only","GFDL-1.2-or-later","GFDL-1.3-invariants-only","GFDL-1.3-invariants-or-later","GFDL-1.3-no-invariants-only","GFDL-1.3-no-invariants-or-later","GFDL-1.3-only","GFDL-1.3-or-later","GL2PS","GLWTPL","GPL-1.0-only","GPL-1.0-or-later","GPL-2.0-only","GPL-2.0-or-later","GPL-3.0-only","GPL-3.0-or-later","Game-Programming-Gems","Giftware","Glide","Glulxe","Graphics-Gems","Gutmann","HDF5","HIDAPI","HP-1986","HP-1989","HPND","HPND-DEC","HPND-Fenneberg-Livingston","HPND-INRIA-IMAG","HPND-Intel","HPND-Kevlin-Henney","HPND-MIT-disclaimer","HPND-Markus-Kuhn","HPND-Netrek","HPND-Pbmplus","HPND-UC","HPND-UC-export-US","HPND-doc","HPND-doc-sell","HPND-export-US","HPND-export-US-acknowledgement","HPND-export-US-modify","HPND-export2-US","HPND-merchantability-variant","HPND-sell-MIT-disclaimer-xserver","HPND-sell-regexpr","HPND-sell-variant","HPND-sell-variant-MIT-disclaimer","HPND-sell-variant-MIT-disclaimer-rev","HTMLTIDY","HaskellReport","Hippocratic-2.1","IBM-pibs","ICU","IEC-Code-Components-EULA","IJG","IJG-short","IPA","IPL-1.0","ISC","ISC-Veillard","ImageMagick","Imlib2","Info-ZIP","Inner-Net-2.0","InnoSetup","Intel","Intel-ACPI","Interbase-1.0","JPL-image","JPNIC","JSON","Jam","JasPer-2.0","Kastrup","Kazlib","Knuth-CTAN","LAL-1.2","LAL-1.3","LGPL-2.0-only","LGPL-2.0-or-later","LGPL-2.1-only","LGPL-2.1-or-later","LGPL-3.0-only","LGPL-3.0-or-later","LGPLLR","LOOP","LPD-document","LPL-1.0","LPL-1.02","LPPL-1.0","LPPL-1.1","LPPL-1.2","LPPL-1.3a","LPPL-1.3c","LZMA-SDK-9.11-to-9.20","LZMA-SDK-9.22","Latex2e","Latex2e-translated-notice","Leptonica","LiLiQ-P-1.1","LiLiQ-R-1.1","LiLiQ-Rplus-1.1","Libpng","Linux-OpenIB","Linux-man-pages-1-para","Linux-man-pages-copyleft","Linux-man-pages-copyleft-2-para","Linux-man-pages-copyleft-var","Lucida-Bitmap-Fonts","MIPS","MIT","MIT-0","MIT-CMU","MIT-Click","MIT-Festival","MIT-Khronos-old","MIT-Modern-Variant","MIT-Wu","MIT-advertising","MIT-enna","MIT-feh","MIT-open-group","MIT-testregex","MITNFA","MMIXware","MPEG-SSG","MPL-1.0","MPL-1.1","MPL-2.0","MPL-2.0-no-copyleft-exception","MS-LPL","MS-PL","MS-RL","MTLL","Mackerras-3-Clause","Mackerras-3-Clause-acknowledgment","MakeIndex","Martin-Birgmeier","McPhee-slideshow","Minpack","MirOS","Motosoto","MulanPSL-1.0","MulanPSL-2.0","Multics","Mup","NAIST-2003","NASA-1.3","NBPL-1.0","NCBI-PD","NCGL-UK-2.0","NCL","NCSA","NGPL","NICTA-1.0","NIST-PD","NIST-PD-fallback","NIST-Software","NLOD-1.0","NLOD-2.0","NLPL","NOSL","NPL-1.0","NPL-1.1","NPOSL-3.0","NRL","NTIA-PD","NTP","NTP-0","Naumen","NetCDF","Newsletr","Nokia","Noweb","O-UDA-1.0","OAR","OCCT-PL","OCLC-2.0","ODC-By-1.0","ODbL-1.0","OFFIS","OFL-1.0","OFL-1.0-RFN","OFL-1.0-no-RFN","OFL-1.1","OFL-1.1-RFN","OFL-1.1-no-RFN","OGC-1.0","OGDL-Taiwan-1.0","OGL-Canada-2.0","OGL-UK-1.0","OGL-UK-2.0","OGL-UK-3.0","OGTSL","OLDAP-1.1","OLDAP-1.2","OLDAP-1.3","OLDAP-1.4","OLDAP-2.0","OLDAP-2.0.1","OLDAP-2.1","OLDAP-2.2","OLDAP-2.2.1","OLDAP-2.2.2","OLDAP-2.3","OLDAP-2.4","OLDAP-2.5","OLDAP-2.6","OLDAP-2.7","OLDAP-2.8","OLFL-1.3","OML","OPL-1.0","OPL-UK-3.0","OPUBL-1.0","OSET-PL-2.1","OSL-1.0","OSL-1.1","OSL-2.0","OSL-2.1","OSL-3.0","OpenPBS-2.3","OpenSSL","OpenSSL-standalone","OpenVision","PADL","PDDL-1.0","PHP-3.0","PHP-3.01","PPL","PSF-2.0","Parity-6.0.0","Parity-7.0.0","Pixar","Plexus","PolyForm-Noncommercial-1.0.0","PolyForm-Small-Business-1.0.0","PostgreSQL","Python-2.0","Python-2.0.1","QPL-1.0","QPL-1.0-INRIA-2004","Qhull","RHeCos-1.1","RPL-1.1","RPL-1.5","RPSL-1.0","RSA-MD","RSCPL","Rdisc","Ruby","Ruby-pty","SAX-PD","SAX-PD-2.0","SCEA","SGI-B-1.0","SGI-B-1.1","SGI-B-2.0","SGI-OpenGL","SGP4","SHL-0.5","SHL-0.51","SISSL","SISSL-1.2","SL","SMAIL-GPL","SMLNJ","SMPPL","SNIA","SOFA","SPL-1.0","SSH-OpenSSH","SSH-short","SSLeay-standalone","SSPL-1.0","SUL-1.0","SWL","Saxpath","SchemeReport","Sendmail","Sendmail-8.23","Sendmail-Open-Source-1.1","SimPL-2.0","Sleepycat","Soundex","Spencer-86","Spencer-94","Spencer-99","SugarCRM-1.1.3","Sun-PPP","Sun-PPP-2000","SunPro","Symlinks","TAPR-OHL-1.0","TCL","TCP-wrappers","TGPPL-1.0","TMate","TORQUE-1.1","TOSL","TPDL","TPL-1.0","TTWL","TTYP0","TU-Berlin-1.0","TU-Berlin-2.0","TermReadKey","ThirdEye","TrustedQSL","UCAR","UCL-1.0","UMich-Merit","UPL-1.0","URT-RLE","Ubuntu-font-1.0","Unicode-3.0","Unicode-DFS-2015","Unicode-DFS-2016","Unicode-TOU","UnixCrypt","Unlicense","Unlicense-libtelnet","Unlicense-libwhirlpool","VOSTROM","VSL-1.0","Vim","W3C","W3C-19980720","W3C-20150513","WTFPL","Watcom-1.0","Widget-Workshop","Wsuipa","X11","X11-distribute-modifications-variant","X11-swapped","XFree86-1.1","XSkat","Xdebug-1.03","Xerox","Xfig","Xnet","YPL-1.0","YPL-1.1","ZPL-1.1","ZPL-2.0","ZPL-2.1","Zed","Zeeff","Zend-2.0","Zimbra-1.3","Zimbra-1.4","Zlib","any-OSI","any-OSI-perl-modules","bcrypt-Solar-Designer","blessing","bzip2-1.0.6","check-cvs","checkmk","copyleft-next-0.3.0","copyleft-next-0.3.1","curl","cve-tou","diffmark","dtoa","dvipdfm","eGenix","etalab-2.0","fwlw","gSOAP-1.3b","generic-xts","gnuplot","gtkbook","hdparm","iMatix","jove","libpng-1.6.35","libpng-2.0","libselinux-1.0","libtiff","libutil-David-Nugent","lsof","magaz","mailprio","man2html","metamail","mpi-permissive","mpich2","mplus","ngrep","pkgconf","pnmstitch","psfrag","psutils","python-ldap","radvd","snprintf","softSurfer","ssh-keyscan","swrule","threeparttable","ulem","w3m","wwl","xinetd","xkeyboard-config-Zinoviev","xlock","xpp","xzoom","zlib-acknowledgement"]}),Mx=J((e,t)=>{t.exports=["AGPL-1.0","AGPL-3.0","BSD-2-Clause-FreeBSD","BSD-2-Clause-NetBSD","GFDL-1.1","GFDL-1.2","GFDL-1.3","GPL-1.0","GPL-2.0","GPL-2.0-with-GCC-exception","GPL-2.0-with-autoconf-exception","GPL-2.0-with-bison-exception","GPL-2.0-with-classpath-exception","GPL-2.0-with-font-exception","GPL-3.0","GPL-3.0-with-GCC-exception","GPL-3.0-with-autoconf-exception","LGPL-2.0","LGPL-2.1","LGPL-3.0","Net-SNMP","Nunit","StandardML-NJ","bzip2-1.0.5","eCos-2.0","wxWindows"]}),Bx=J((e,t)=>{t.exports=["389-exception","Asterisk-exception","Autoconf-exception-2.0","Autoconf-exception-3.0","Autoconf-exception-generic","Autoconf-exception-generic-3.0","Autoconf-exception-macro","Bison-exception-1.24","Bison-exception-2.2","Bootloader-exception","Classpath-exception-2.0","CLISP-exception-2.0","cryptsetup-OpenSSL-exception","DigiRule-FOSS-exception","eCos-exception-2.0","Fawkes-Runtime-exception","FLTK-exception","fmt-exception","Font-exception-2.0","freertos-exception-2.0","GCC-exception-2.0","GCC-exception-2.0-note","GCC-exception-3.1","Gmsh-exception","GNAT-exception","GNOME-examples-exception","GNU-compiler-exception","gnu-javamail-exception","GPL-3.0-interface-exception","GPL-3.0-linking-exception","GPL-3.0-linking-source-exception","GPL-CC-1.0","GStreamer-exception-2005","GStreamer-exception-2008","i2p-gpl-java-exception","KiCad-libraries-exception","LGPL-3.0-linking-exception","libpri-OpenH323-exception","Libtool-exception","Linux-syscall-note","LLGPL","LLVM-exception","LZMA-exception","mif-exception","OCaml-LGPL-linking-exception","OCCT-exception-1.0","OpenJDK-assembly-exception-1.0","openvpn-openssl-exception","PS-or-PDF-font-exception-20170817","QPL-1.0-INRIA-2004-exception","Qt-GPL-exception-1.0","Qt-LGPL-exception-1.1","Qwt-exception-1.0","SANE-exception","SHL-2.0","SHL-2.1","stunnel-exception","SWI-exception","Swift-exception","Texinfo-exception","u-boot-exception-2.0","UBDL-exception","Universal-FOSS-exception-1.0","vsftpd-openssl-exception","WxWindows-exception-3.1","x11vnc-openssl-exception"]}),Ux=J((e,t)=>{"use strict";var i=[].concat(eg()).concat(Mx()),u=Bx();t.exports=function(n){var l=0;function c(){return l<n.length}S(c,"hasMore");function r(v){if(v instanceof RegExp){var E=n.slice(l),b=E.match(v);if(b)return l+=b[0].length,b[0]}else if(n.indexOf(v,l)===l)return l+=v.length,v}S(r,"read");function s(){r(/[ ]*/)}S(s,"skipWhitespace");function o(){for(var v,E=["WITH","AND","OR","(",")",":","+"],b=0;b<E.length&&(v=r(E[b]),!v);b++);if(v==="+"&&l>1&&n[l-2]===" ")throw new Error("Space before `+`");return v&&{type:"OPERATOR",string:v}}S(o,"operator");function a(){return r(/[A-Za-z0-9-.]+/)}S(a,"idstring");function h(){var v=a();if(!v)throw new Error("Expected idstring at offset "+l);return v}S(h,"expectIdstring");function p(){if(r("DocumentRef-")){var v=h();return{type:"DOCUMENTREF",string:v}}}S(p,"documentRef");function d(){if(r("LicenseRef-")){var v=h();return{type:"LICENSEREF",string:v}}}S(d,"licenseRef");function m(){var v=l,E=a();if(i.indexOf(E)!==-1)return{type:"LICENSE",string:E};if(u.indexOf(E)!==-1)return{type:"EXCEPTION",string:E};l=v}S(m,"identifier");function g(){return o()||p()||d()||m()}S(g,"parseToken");for(var f=[];c()&&(s(),!!c());){var y=g();if(!y)throw new Error("Unexpected `"+n[l]+"` at offset "+l);f.push(y)}return f}}),Fx=J((e,t)=>{"use strict";t.exports=function(i){var u=0;function n(){return u<i.length}S(n,"hasMore");function l(){return n()?i[u]:null}S(l,"token");function c(){if(!n())throw new Error;u++}S(c,"next");function r(y){var v=l();if(v&&v.type==="OPERATOR"&&y===v.string)return c(),v.string}S(r,"parseOperator");function s(){if(r("WITH")){var y=l();if(y&&y.type==="EXCEPTION")return c(),y.string;throw new Error("Expected exception after `WITH`")}}S(s,"parseWith");function o(){var y=u,v="",E=l();if(E.type==="DOCUMENTREF"&&(c(),v+="DocumentRef-"+E.string+":",!r(":")))throw new Error("Expected `:` after `DocumentRef-...`");if(E=l(),E.type==="LICENSEREF")return c(),v+="LicenseRef-"+E.string,{license:v};u=y}S(o,"parseLicenseRef");function a(){var y=l();if(y&&y.type==="LICENSE"){c();var v={license:y.string};r("+")&&(v.plus=!0);var E=s();return E&&(v.exception=E),v}}S(a,"parseLicense");function h(){var y=r("(");if(y){var v=g();if(!r(")"))throw new Error("Expected `)`");return v}}S(h,"parseParenthesizedExpression");function p(){return h()||o()||a()}S(p,"parseAtom");function d(y,v){return S(function E(){var b=v();if(b){if(!r(y))return b;var w=E();if(!w)throw new Error("Expected expression");return{left:b,conjunction:y.toLowerCase(),right:w}}},"parseBinaryOp")}S(d,"makeBinaryOpParser");var m=d("AND",p),g=d("OR",m),f=g();if(!f||n())throw new Error("Syntax error");return f}}),tg=J((e,t)=>{"use strict";var i=Ux(),u=Fx();t.exports=function(n){return u(i(n))}}),Hx=J((e,t)=>{var i=tg(),u=eg();function n(E){try{return i(E),!0}catch{return!1}}S(n,"valid");function l(E,b){var w=b[0].length-E[0].length;return w!==0?w:E[0].toUpperCase().localeCompare(b[0].toUpperCase())}S(l,"sortTranspositions");var c=[["APGL","AGPL"],["Gpl","GPL"],["GLP","GPL"],["APL","Apache"],["ISD","ISC"],["GLP","GPL"],["IST","ISC"],["Claude","Clause"],[" or later","+"],[" International",""],["GNU","GPL"],["GUN","GPL"],["+",""],["GNU GPL","GPL"],["GNU LGPL","LGPL"],["GNU/GPL","GPL"],["GNU GLP","GPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL"],["GNU Lesser General Public License","LGPL"],["GNU LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["GNU Lesser General Public License","LGPL-2.1"],["LESSER GENERAL PUBLIC LICENSE","LGPL"],["Lesser General Public License","LGPL"],["LESSER GENERAL PUBLIC LICENSE","LGPL-2.1"],["Lesser General Public License","LGPL-2.1"],["GNU General Public License","GPL"],["Gnu public license","GPL"],["GNU Public License","GPL"],["GNU GENERAL PUBLIC LICENSE","GPL"],["MTI","MIT"],["Mozilla Public License","MPL"],["Universal Permissive License","UPL"],["WTH","WTF"],["WTFGPL","WTFPL"],["-License",""]].sort(l),r=0,s=1,o=[function(E){return E.toUpperCase()},function(E){return E.trim()},function(E){return E.replace(/\./g,"")},function(E){return E.replace(/\s+/g,"")},function(E){return E.replace(/\s+/g,"-")},function(E){return E.replace("v","-")},function(E){return E.replace(/,?\s*(\d)/,"-$1")},function(E){return E.replace(/,?\s*(\d)/,"-$1.0")},function(E){return E.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2")},function(E){return E.replace(/,?\s*(V\.|v\.|V|v|Version|version)\s*(\d)/,"-$2.0")},function(E){return E[0].toUpperCase()+E.slice(1)},function(E){return E.replace("/","-")},function(E){return E.replace(/\s*V\s*(\d)/,"-$1").replace(/(\d)$/,"$1.0")},function(E){return E.indexOf("3.0")!==-1?E+"-or-later":E+"-only"},function(E){return E+"only"},function(E){return E.replace(/(\d)$/,"-$1.0")},function(E){return E.replace(/(-| )?(\d)$/,"-$2-Clause")},function(E){return E.replace(/(-| )clause(-| )(\d)/,"-$3-Clause")},function(E){return E.replace(/\b(Modified|New|Revised)(-| )?BSD((-| )License)?/i,"BSD-3-Clause")},function(E){return E.replace(/\bSimplified(-| )?BSD((-| )License)?/i,"BSD-2-Clause")},function(E){return E.replace(/\b(Free|Net)(-| )?BSD((-| )License)?/i,"BSD-2-Clause-$1BSD")},function(E){return E.replace(/\bClear(-| )?BSD((-| )License)?/i,"BSD-3-Clause-Clear")},function(E){return E.replace(/\b(Old|Original)(-| )?BSD((-| )License)?/i,"BSD-4-Clause")},function(E){return"CC-"+E},function(E){return"CC-"+E+"-4.0"},function(E){return E.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")},function(E){return"CC-"+E.replace("Attribution","BY").replace("NonCommercial","NC").replace("NoDerivatives","ND").replace(/ (\d)/,"-$1").replace(/ ?International/,"")+"-4.0"}],a=u.map(function(E){var b=/^(.*)-\d+\.\d+$/.exec(E);return b?[b[0],b[1]]:[E,null]}).reduce(function(E,b){var w=b[1];return E[w]=E[w]||[],E[w].push(b[0]),E},{}),h=Object.keys(a).map(S(function(E){return[E,a[E]]},"makeEntries")).filter(S(function(E){return E[1].length===1&&E[0]!==null&&E[0]!=="APL"},"identifySoleVersions")).map(S(function(E){return[E[0],E[1][0]]},"createLastResorts"));a=void 0;var p=[["UNLI","Unlicense"],["WTF","WTFPL"],["2 CLAUSE","BSD-2-Clause"],["2-CLAUSE","BSD-2-Clause"],["3 CLAUSE","BSD-3-Clause"],["3-CLAUSE","BSD-3-Clause"],["AFFERO","AGPL-3.0-or-later"],["AGPL","AGPL-3.0-or-later"],["APACHE","Apache-2.0"],["ARTISTIC","Artistic-2.0"],["Affero","AGPL-3.0-or-later"],["BEER","Beerware"],["BOOST","BSL-1.0"],["BSD","BSD-2-Clause"],["CDDL","CDDL-1.1"],["ECLIPSE","EPL-1.0"],["FUCK","WTFPL"],["GNU","GPL-3.0-or-later"],["LGPL","LGPL-3.0-or-later"],["GPLV1","GPL-1.0-only"],["GPL-1","GPL-1.0-only"],["GPLV2","GPL-2.0-only"],["GPL-2","GPL-2.0-only"],["GPL","GPL-3.0-or-later"],["MIT +NO-FALSE-ATTRIBS","MITNFA"],["MIT","MIT"],["MPL","MPL-2.0"],["X11","X11"],["ZLIB","Zlib"]].concat(h).sort(l),d=0,m=1,g=S(function(E){for(var b=0;b<o.length;b++){var w=o[b](E).trim();if(w!==E&&n(w))return w}return null},"validTransformation"),f=S(function(E){for(var b=E.toUpperCase(),w=0;w<p.length;w++){var _=p[w];if(b.indexOf(_[d])>-1)return _[m]}return null},"validLastResort"),y=S(function(E,b){for(var w=0;w<c.length;w++){var _=c[w],O=_[r];if(E.indexOf(O)>-1){var A=E.replace(O,_[s]),I=b(A);if(I!==null)return I}}return null},"anyCorrection");t.exports=function(E,b){b=b||{};var w=b.upgrade===void 0?!0:!!b.upgrade;function _(P){return w?v(P):P}S(_,"postprocess");var O=typeof E=="string"&&E.trim().length!==0;if(!O)throw Error("Invalid argument. Expected non-empty string.");if(E=E.trim(),n(E))return _(E);var A=E.replace(/\+$/,"").trim();if(n(A))return _(A);var I=g(E);return I!==null||(I=y(E,function(P){return n(P)?P:g(P)}),I!==null)||(I=f(E),I!==null)||(I=y(E,f),I!==null)?_(I):null};function v(E){return["GPL-1.0","LGPL-1.0","AGPL-1.0","GPL-2.0","LGPL-2.0","AGPL-2.0","LGPL-2.1"].indexOf(E)!==-1?E+"-only":["GPL-1.0+","GPL-2.0+","GPL-3.0+","LGPL-2.0+","LGPL-2.1+","LGPL-3.0+","AGPL-1.0+","AGPL-3.0+"].indexOf(E)!==-1?E.replace(/\+$/,"-or-later"):["GPL-3.0","LGPL-3.0","AGPL-3.0"].indexOf(E)!==-1?E+"-or-later":E}S(v,"upgradeGPLs")}),Gx=J((e,t)=>{var i=tg(),u=Hx(),n='license should be a valid SPDX license expression (without "LicenseRef"), "UNLICENSED", or "SEE LICENSE IN <filename>"',l=/^SEE LICEN[CS]E IN (.+)$/;function c(s,o){return o.slice(0,s.length)===s}S(c,"startsWith");function r(s){if(s.hasOwnProperty("license")){var o=s.license;return c("LicenseRef",o)||c("DocumentRef",o)}else return r(s.left)||r(s.right)}S(r,"usesLicenseRef"),t.exports=function(s){var o;try{o=i(s)}catch{var a;if(s==="UNLICENSED"||s==="UNLICENCED")return{validForOldPackages:!0,validForNewPackages:!0,unlicensed:!0};if(a=l.exec(s))return{validForOldPackages:!0,validForNewPackages:!0,inFile:a[1]};var h={validForOldPackages:!1,validForNewPackages:!1,warnings:[n]};if(s.trim().length!==0){var p=u(s);p&&h.warnings.push('license is similar to the valid expression "'+p+'"')}return h}return r(o)?{validForNewPackages:!1,validForOldPackages:!1,spdx:!0,warnings:[n]}:{validForNewPackages:!0,validForOldPackages:!0,spdx:!0}}}),Vx=J((e,t)=>{var{URL:i}=require("url"),u=Ul(),n=Gx(),l={dependancies:"dependencies",dependecies:"dependencies",depdenencies:"dependencies",devEependencies:"devDependencies",depends:"dependencies","dev-dependencies":"devDependencies",devDependences:"devDependencies",devDepenencies:"devDependencies",devdependencies:"devDependencies",repostitory:"repository",repo:"repository",prefereGlobal:"preferGlobal",hompage:"homepage",hampage:"homepage",autohr:"author",autor:"author",contributers:"contributors",publicationConfig:"publishConfig",script:"scripts"},c=S(a=>a.includes("@")&&a.indexOf("@")<a.lastIndexOf("."),"isEmail");function r(a){let h=a.trim().split(`
25
- `),p=0;for(;h[p]?.trim().match(/^(#|$)/);)p++;let d=p+1;for(;d<h.length&&h[d].trim();)d++;return h.slice(p,d).join(" ").trim()}S(r,"extractDescription");function s(a){if(typeof a!="string"){let g=a.name||"",f=a.url||a.web,y=f?" ("+f+")":"",v=a.email||a.mail,E=v?" <"+v+">":"";a=g+E+y}let h=a.match(/^([^(<]+)/),p=a.match(/\(([^()]+)\)/),d=a.match(/<([^<>]+)>/),m={};return h?.[0].trim()&&(m.name=h[0].trim()),d&&(m.email=d[1]),p&&(m.url=p[1]),m}S(s,"stringifyPerson");function o(a,h){a.description&&typeof a.description!="string"&&(h?.push("'description' field should be a string"),delete a.description),a.readme&&!a.description&&a.readme!=="ERROR: No README data found!"&&(a.description=r(a.readme)),a.description===void 0&&delete a.description,a.description||h?.push("No description"),a.modules&&(h?.push("modules field is deprecated"),delete a.modules);let p=a.files;if(p&&!Array.isArray(p)?(h?.push("Invalid 'files' member"),delete a.files):a.files&&(a.files=a.files.filter(function(f){return!f||typeof f!="string"?(h?.push(`Invalid filename in 'files' list: ${f}`),!1):!0})),a.man&&typeof a.man=="string"&&(a.man=[a.man]),!a.bugs&&a.repository?.url){let f=u.fromUrl(a.repository.url);f&&f.bugs()&&(a.bugs={url:f.bugs()})}else if(a.bugs){if(typeof a.bugs=="string")c(a.bugs)?a.bugs={email:a.bugs}:i.canParse(a.bugs)?a.bugs={url:a.bugs}:h?.push("Bug string field must be url, email, or {email,url}");else{for(let y in a.bugs)["web","name"].includes(y)&&(h?.push(`bugs['${y}'] should probably be bugs['url'].`),a.bugs.url=a.bugs[y],delete a.bugs[y]);let f=a.bugs;a.bugs={},f.url&&(i.canParse(f.url)?a.bugs.url=f.url:h?.push("bugs.url field must be a string url. Deleted.")),f.email&&(typeof f.email=="string"&&c(f.email)?a.bugs.email=f.email:h?.push("bugs.email field must be a string email. Deleted."))}!a.bugs.email&&!a.bugs.url&&(delete a.bugs,h?.push("Normalized value of bugs field is an empty object. Deleted."))}typeof a.keywords=="string"&&(a.keywords=a.keywords.split(/,\s+/)),a.keywords&&!Array.isArray(a.keywords)?(delete a.keywords,h?.push("keywords should be an array of strings")):a.keywords&&(a.keywords=a.keywords.filter(function(f){return typeof f!="string"||!f?(h?.push("keywords should be an array of strings"),!1):!0}));let d="bundledDependencies",m="bundleDependencies";if(a[d]&&!a[m]&&(a[m]=a[d],delete a[d]),a[m]&&!Array.isArray(a[m])?(h?.push("Invalid 'bundleDependencies' list. Must be array of package names"),delete a[m]):a[m]&&(a[m]=a[m].filter(function(f){return!f||typeof f!="string"?(h?.push(`Invalid bundleDependencies member: ${f}`),!1):(a.dependencies||(a.dependencies={}),Object.prototype.hasOwnProperty.call(a.dependencies,f)||(h?.push(`Non-dependency in bundleDependencies: ${f}`),a.dependencies[f]="*"),!0)})),!a.homepage&&a.repository&&a.repository.url){let f=u.fromUrl(a.repository.url);f&&(a.homepage=f.docs())}a.homepage&&(typeof a.homepage!="string"?(h?.push("homepage field must be a string url. Deleted."),delete a.homepage):i.canParse(a.homepage)||(a.homepage="http://"+a.homepage)),a.readme||(h?.push("No README data"),a.readme="ERROR: No README data found!");let g=a.license||a.licence;g?typeof g!="string"||g.length<1||g.trim()===""?h?.push("license should be a valid SPDX license expression"):n(g).validForNewPackages||h?.push("license should be a valid SPDX license expression"):h?.push("No license field."),a.author&&(a.author=s(a.author)),["maintainers","contributors"].forEach(function(f){Array.isArray(a[f])&&(a[f]=a[f].map(s))});for(let f in l)Object.prototype.hasOwnProperty.call(a,f)&&h?.push(`${f} should probably be ${l[f]}.`)}S(o,"normalizeData"),t.exports={normalizeData:o}}),Wx=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=void 0;var t=require("fs"),i=require("internal/fs/promises"),u=S(async(r,s={})=>{let{ignoreErrors:o=!1}=s;try{return l(await(0,i.stat)(r),s)}catch(a){let h=a;if(o||h.code==="EACCES")return!1;throw h}},"isexe");e.isexe=u;var n=S((r,s={})=>{let{ignoreErrors:o=!1}=s;try{return l((0,t.statSync)(r),s)}catch(a){let h=a;if(o||h.code==="EACCES")return!1;throw h}},"sync");e.sync=n;var l=S((r,s)=>r.isFile()&&c(r,s),"checkStat"),c=S((r,s)=>{let o=s.uid??process.getuid?.(),a=s.groups??process.getgroups?.()??[],h=s.gid??process.getgid?.()??a[0];if(o===void 0||h===void 0)throw new Error("cannot get uid or gid");let p=new Set([h,...a]),d=r.mode,m=r.uid,g=r.gid,f=parseInt("100",8),y=parseInt("010",8),v=parseInt("001",8),E=f|y;return!!(d&v||d&y&&p.has(g)||d&f&&m===o||d&E&&o===0)},"checkMode")}),zx=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=void 0;var t=require("fs"),i=require("internal/fs/promises"),u=S(async(r,s={})=>{let{ignoreErrors:o=!1}=s;try{return c(await(0,i.stat)(r),r,s)}catch(a){let h=a;if(o||h.code==="EACCES")return!1;throw h}},"isexe");e.isexe=u;var n=S((r,s={})=>{let{ignoreErrors:o=!1}=s;try{return c((0,t.statSync)(r),r,s)}catch(a){let h=a;if(o||h.code==="EACCES")return!1;throw h}},"sync");e.sync=n;var l=S((r,s)=>{let{pathExt:o=process.env.PATHEXT||""}=s,a=o.split(";");if(a.indexOf("")!==-1)return!0;for(let h=0;h<a.length;h++){let p=a[h].toLowerCase(),d=r.substring(r.length-p.length).toLowerCase();if(p&&d===p)return!0}return!1},"checkPathExt"),c=S((r,s,o)=>r.isFile()&&l(s,o),"checkStat")}),qx=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Kx=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(o,a,h,p){p===void 0&&(p=h);var d=Object.getOwnPropertyDescriptor(a,h);(!d||("get"in d?!a.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:S(function(){return a[h]},"get")}),Object.defineProperty(o,p,d)}:function(o,a,h,p){p===void 0&&(p=h),o[p]=a[h]}),i=e&&e.__setModuleDefault||(Object.create?function(o,a){Object.defineProperty(o,"default",{enumerable:!0,value:a})}:function(o,a){o.default=a}),u=e&&e.__importStar||function(o){if(o&&o.__esModule)return o;var a={};if(o!=null)for(var h in o)h!=="default"&&Object.prototype.hasOwnProperty.call(o,h)&&t(a,o,h);return i(a,o),a},n=e&&e.__exportStar||function(o,a){for(var h in o)h!=="default"&&!Object.prototype.hasOwnProperty.call(a,h)&&t(a,o,h)};Object.defineProperty(e,"__esModule",{value:!0}),e.sync=e.isexe=e.posix=e.win32=void 0;var l=u(Wx());e.posix=l;var c=u(zx());e.win32=c,n(qx(),e);var r=process.env._ISEXE_TEST_PLATFORM_||process.platform,s=r==="win32"?c:l;e.isexe=s.isexe,e.sync=s.sync}),rg=J((e,t)=>{var{isexe:i,sync:u}=Kx(),{join:n,delimiter:l,sep:c,posix:r}=require("path"),s=process.platform==="win32",o=new RegExp(`[${r.sep}${c===r.sep?"":c}]`.replace(/(\\)/g,"\\$1")),a=new RegExp(`^\\.${o.source}`),h=S(f=>Object.assign(new Error(`not found: ${f}`),{code:"ENOENT"}),"getNotFoundError"),p=S((f,{path:y=process.env.PATH,pathExt:v=process.env.PATHEXT,delimiter:E=l})=>{let b=f.match(o)?[""]:[...s?[process.cwd()]:[],...(y||"").split(E)];if(s){let w=v||[".EXE",".CMD",".BAT",".COM"].join(E),_=w.split(E).flatMap(O=>[O,O.toLowerCase()]);return f.includes(".")&&_[0]!==""&&_.unshift(""),{pathEnv:b,pathExt:_,pathExtExe:w}}return{pathEnv:b,pathExt:[""]}},"getPathInfo"),d=S((f,y)=>{let v=/^".*"$/.test(f)?f.slice(1,-1):f;return(!v&&a.test(y)?y.slice(0,2):"")+n(v,y)},"getPathPart"),m=S(async(f,y={})=>{let{pathEnv:v,pathExt:E,pathExtExe:b}=p(f,y),w=[];for(let _ of v){let O=d(_,f);for(let A of E){let I=O+A;if(await i(I,{pathExt:b,ignoreErrors:!0})){if(!y.all)return I;w.push(I)}}}if(y.all&&w.length)return w;if(y.nothrow)return null;throw h(f)},"which"),g=S((f,y={})=>{let{pathEnv:v,pathExt:E,pathExtExe:b}=p(f,y),w=[];for(let _ of v){let O=d(_,f);for(let A of E){let I=O+A;if(u(I,{pathExt:b,ignoreErrors:!0})){if(!y.all)return I;w.push(I)}}}if(y.all&&w.length)return w;if(y.nothrow)return null;throw h(f)},"whichSync");t.exports=m,m.sync=g}),Jx=J((e,t)=>{"use strict";var i=S((n,l)=>{if(!n.length)return'""';let c;if(!/[ \t\n\v"]/.test(n))c=n;else{c='"';for(let r=0;r<=n.length;++r){let s=0;for(;n[r]==="\\";)++r,++s;if(r===n.length){c+="\\".repeat(s*2);break}n[r]==='"'?(c+="\\".repeat(s*2+1),c+=n[r]):(c+="\\".repeat(s),c+=n[r])}c+='"'}return c=c.replace(/[ !%^&()<>|"]/g,"^$&"),l&&(c=c.replace(/[ !%^&()<>|"]/g,"^$&")),c},"cmd"),u=S(n=>n.length?/[\t\n\r "#$&'()*;<>?\\`|~]/.test(n)?`'${n.replace(/'/g,"'\\''")}'`.replace(/^(?:'')+(?!$)/,"").replace(/\\'''/g,"\\'"):n:"''","sh");t.exports={cmd:i,sh:u}}),Fl=J((e,t)=>{"use strict";var{spawn:i}=require("internal/child_process"),u=require("os"),n=rg(),l=Jx(),c=S((p,d,m={},g={})=>{if(m.shell)return r(p,d,m,g);let f,y,v=new Promise((I,P)=>{f=I,y=P}),E=new Error("command failed"),b=[],w=[],_=S(I=>({cmd:p,args:d,...I,...a(b,w,m),...g}),"getResult"),O=S((I,P)=>{let L=_(P);y(Object.assign(I,L))},"rejectWithOpts"),A=i(p,d,m);return v.stdin=A.stdin,v.process=A,A.on("error",O),A.stdout&&(A.stdout.on("data",I=>b.push(I)),A.stdout.on("error",O)),A.stderr&&(A.stderr.on("data",I=>w.push(I)),A.stderr.on("error",O)),A.on("close",(I,P)=>{I||P?O(E,{code:I,signal:P}):f(_({code:I,signal:P}))}),v},"promiseSpawn"),r=S((p,d,m,g)=>{let f=m.shell;f===!0&&(f=process.platform==="win32"?process.env.ComSpec||"cmd.exe":"sh");let y={...m,shell:!1},v=[],E=p;if(/(?:^|\\)cmd(?:\.exe)?$/i.test(f)){let b=!1,w="",_=!1;for(let A=0;A<p.length;++A){let I=p.charAt(A);if(I===" "&&!_)break;w+=I,(I==='"'||I==="'")&&(_=!_)}let O;try{O=n.sync(w,{path:y.env&&h(y.env,"PATH")||process.env.PATH,pathext:y.env&&h(y.env,"PATHEXT")||process.env.PATHEXT}).toLowerCase()}catch{O=w.toLowerCase()}b=O.endsWith(".cmd")||O.endsWith(".bat");for(let A of d)E+=` ${l.cmd(A,b)}`;v.push("/d","/s","/c",E),y.windowsVerbatimArguments=!0}else{for(let b of d)E+=` ${l.sh(b)}`;v.push("-c",E)}return c(f,v,y,g)},"spawnWithShell"),s=S((p,d={},m={})=>{let g={...d,shell:!0},f=[].concat(p),y=process.platform;if(y==="linux"&&u.release().toLowerCase().includes("microsoft")&&(y="wsl",!process.env.BROWSER))return Promise.reject(new Error("Set the BROWSER environment variable to your desired browser."));let v=g.command;return v||(y==="win32"?(g.shell=process.env.ComSpec,v='start ""'):y==="wsl"?v="sensible-browser":y==="darwin"?v="open":v="xdg-open"),r(v,f,g,m)},"open");c.open=s;var o=S((p="pipe",d)=>p==="pipe"||p===null?!0:Array.isArray(p)?o(p[d],d):!1,"isPipe"),a=S((p,d,{stdioString:m=!0,stdio:g})=>{let f={stdout:null,stderr:null};return o(g,1)&&(f.stdout=Buffer.concat(p),m&&(f.stdout=f.stdout.toString().trim())),o(g,2)&&(f.stderr=Buffer.concat(d),m&&(f.stderr=f.stderr.toString().trim())),f},"stdioResult"),h=S((p,d)=>{d=d.toLowerCase();for(let m of Object.keys(p).sort())if(m.toLowerCase()===d)return p[m]},"findInObject");t.exports=c}),Xx=J((e,t)=>{"use strict";function i(n,l){for(let c in l)Object.defineProperty(n,c,{value:l[c],enumerable:!0,configurable:!0});return n}S(i,"assign");function u(n,l,c){if(!n||typeof n=="string")throw new TypeError("Please pass an Error to err-code");c||(c={}),typeof l=="object"&&(c=l,l=void 0),l!=null&&(c.code=l);try{return i(n,c)}catch{c.message=n.message,c.stack=n.stack;let r=S(function(){},"ErrClass");return r.prototype=Object.create(Object.getPrototypeOf(n)),i(new r,c)}}S(u,"createError"),t.exports=u}),Zx=J((e,t)=>{function i(u,n){typeof n=="boolean"&&(n={forever:n}),this._originalTimeouts=JSON.parse(JSON.stringify(u)),this._timeouts=u,this._options=n||{},this._maxRetryTime=n&&n.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}S(i,"RetryOperation"),t.exports=i,i.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts},i.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null},i.prototype.retry=function(u){if(this._timeout&&clearTimeout(this._timeout),!u)return!1;var n=new Date().getTime();if(u&&n-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(u);var l=this._timeouts.shift();if(l===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),l=this._timeouts.shift();else return!1;var c=this,r=setTimeout(function(){c._attempts++,c._operationTimeoutCb&&(c._timeout=setTimeout(function(){c._operationTimeoutCb(c._attempts)},c._operationTimeout),c._options.unref&&c._timeout.unref()),c._fn(c._attempts)},l);return this._options.unref&&r.unref(),!0},i.prototype.attempt=function(u,n){this._fn=u,n&&(n.timeout&&(this._operationTimeout=n.timeout),n.cb&&(this._operationTimeoutCb=n.cb));var l=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){l._operationTimeoutCb()},l._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},i.prototype.try=function(u){this.attempt(u)},i.prototype.start=function(u){this.attempt(u)},i.prototype.start=i.prototype.try,i.prototype.errors=function(){return this._errors},i.prototype.attempts=function(){return this._attempts},i.prototype.mainError=function(){if(this._errors.length===0)return null;for(var u={},n=null,l=0,c=0;c<this._errors.length;c++){var r=this._errors[c],s=r.message,o=(u[s]||0)+1;u[s]=o,o>=l&&(n=r,l=o)}return n}}),Yx=J(e=>{var t=Zx();e.operation=function(i){var u=e.timeouts(i);return new t(u,{forever:i&&i.forever,unref:i&&i.unref,maxRetryTime:i&&i.maxRetryTime})},e.timeouts=function(i){if(i instanceof Array)return[].concat(i);var u={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var n in i)u[n]=i[n];if(u.minTimeout>u.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var l=[],c=0;c<u.retries;c++)l.push(this.createTimeout(c,u));return i&&i.forever&&!l.length&&l.push(this.createTimeout(c,u)),l.sort(function(r,s){return r-s}),l},e.createTimeout=function(i,u){var n=u.randomize?Math.random()+1:1,l=Math.round(n*u.minTimeout*Math.pow(u.factor,i));return l=Math.min(l,u.maxTimeout),l},e.wrap=function(i,u,n){if(u instanceof Array&&(n=u,u=null),!n){n=[];for(var l in i)typeof i[l]=="function"&&n.push(l)}for(var c=0;c<n.length;c++){var r=n[c],s=i[r];i[r]=S(function(o){var a=e.operation(u),h=Array.prototype.slice.call(arguments,1),p=h.pop();h.push(function(d){a.retry(d)||(d&&(arguments[0]=a.mainError()),p.apply(this,arguments))}),a.attempt(function(){o.apply(i,h)})},"retryWrapper").bind(i,s),i[r].options=u}}}),Qx=J((e,t)=>{t.exports=Yx()}),Zi=J((e,t)=>{"use strict";var i=Xx(),u=Qx(),n=Object.prototype.hasOwnProperty;function l(r){return r&&r.code==="EPROMISERETRY"&&n.call(r,"retried")}S(l,"isRetryError");function c(r,s){var o,a;return typeof r=="object"&&typeof s=="function"&&(o=s,s=r,r=o),a=u.operation(s),new Promise(function(h,p){a.attempt(function(d){Promise.resolve().then(function(){return r(function(m){throw l(m)&&(m=m.retried),i(new Error("Retrying"),"EPROMISERETRY",{retried:m})},d)}).then(h,function(m){l(m)&&(m=m.retried,a.retry(m||new Error))||p(m)})})})}S(c,"promiseRetry"),t.exports=c}),sg=J((e,t)=>{var i=class extends Error{static{S(this,"GitError")}shouldRetry(){return!1}},u=class extends i{static{S(this,"GitConnectionError")}constructor(){super("A git connection error occurred")}shouldRetry(c){return c<3}},n=class extends i{static{S(this,"GitPathspecError")}constructor(){super("The git reference could not be found")}},l=class extends i{static{S(this,"GitUnknownError")}constructor(){super("An unknown git error occurred")}};t.exports={GitConnectionError:u,GitPathspecError:n,GitUnknownError:l}}),eN=J((e,t)=>{var{GitConnectionError:i,GitPathspecError:u,GitUnknownError:n}=sg(),l=new RegExp(["remote error: Internal Server Error","The remote end hung up unexpectedly","Connection timed out","Operation timed out","Failed to connect to .* Timed out","Connection reset by peer","SSL_ERROR_SYSCALL","The requested URL returned error: 503"].join("|")),c=/pathspec .* did not match any file\(s\) known to git/;function r(s){let o=s.stderr,a;return l.test(o)?a=new i(o):c.test(o)?a=new u(o):a=new n(o),Object.assign(a,s)}S(r,"makeError"),t.exports=r}),tN=J((e,t)=>{var{hasOwnProperty:i}=Object.prototype,u=S((o,a={})=>{typeof a=="string"&&(a={section:a}),a.align=a.align===!0,a.newline=a.newline===!0,a.sort=a.sort===!0,a.whitespace=a.whitespace===!0||a.align===!0,a.platform=a.platform||typeof process<"u"&&process.platform,a.bracketedArray=a.bracketedArray!==!1;let h=a.platform==="win32"?`\r
26
- `:`
27
- `,p=a.whitespace?" = ":"=",d=[],m=a.sort?Object.keys(o).sort():Object.keys(o),g=0;a.align&&(g=r(m.filter(v=>o[v]===null||Array.isArray(o[v])||typeof o[v]!="object").map(v=>Array.isArray(o[v])?`${v}[]`:v).concat([""]).reduce((v,E)=>r(v).length>=r(E).length?v:E)).length);let f="",y=a.bracketedArray?"[]":"";for(let v of m){let E=o[v];if(E&&Array.isArray(E))for(let b of E)f+=r(`${v}${y}`).padEnd(g," ")+p+r(b)+h;else E&&typeof E=="object"?d.push(v):f+=r(v).padEnd(g," ")+p+r(E)+h}a.section&&f.length&&(f="["+r(a.section)+"]"+(a.newline?h+h:h)+f);for(let v of d){let E=n(v,".").join("\\."),b=(a.section?a.section+".":"")+E,w=u(o[v],{...a,section:b});f.length&&w.length&&(f+=h),f+=w}return f},"encode");function n(o,a){var h=0,p=0,d=0,m=[];do if(d=o.indexOf(a,h),d!==-1){if(h=d+a.length,d>0&&o[d-1]==="\\")continue;m.push(o.slice(p,d)),p=d+a.length}while(d!==-1);return m.push(o.slice(p)),m}S(n,"splitSections");var l=S((o,a={})=>{a.bracketedArray=a.bracketedArray!==!1;let h=Object.create(null),p=h,d=null,m=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,g=o.split(/[\r\n]+/g),f={};for(let v of g){if(!v||v.match(/^\s*[;#]/)||v.match(/^\s*$/))continue;let E=v.match(m);if(!E)continue;if(E[1]!==void 0){if(d=s(E[1]),d==="__proto__"){p=Object.create(null);continue}p=h[d]=h[d]||Object.create(null);continue}let b=s(E[2]),w;a.bracketedArray?w=b.length>2&&b.slice(-2)==="[]":(f[b]=(f?.[b]||0)+1,w=f[b]>1);let _=w&&b.endsWith("[]")?b.slice(0,-2):b;if(_==="__proto__")continue;let O=E[3]?s(E[4]):!0,A=O==="true"||O==="false"||O==="null"?JSON.parse(O):O;w&&(i.call(p,_)?Array.isArray(p[_])||(p[_]=[p[_]]):p[_]=[]),Array.isArray(p[_])?p[_].push(A):p[_]=A}let y=[];for(let v of Object.keys(h)){if(!i.call(h,v)||typeof h[v]!="object"||Array.isArray(h[v]))continue;let E=n(v,".");p=h;let b=E.pop(),w=b.replace(/\\\./g,".");for(let _ of E)_!=="__proto__"&&((!i.call(p,_)||typeof p[_]!="object")&&(p[_]=Object.create(null)),p=p[_]);p===h&&w===b||(p[w]=h[v],y.push(v))}for(let v of y)delete h[v];return h},"decode"),c=S(o=>o.startsWith('"')&&o.endsWith('"')||o.startsWith("'")&&o.endsWith("'"),"isQuoted"),r=S(o=>typeof o!="string"||o.match(/[=\r\n]/)||o.match(/^\[/)||o.length>1&&c(o)||o!==o.trim()?JSON.stringify(o):o.split(";").join("\\;").split("#").join("\\#"),"safe"),s=S(o=>{if(o=(o||"").trim(),c(o)){o.charAt(0)==="'"&&(o=o.slice(1,-1));try{o=JSON.parse(o)}catch{}}else{let a=!1,h="";for(let p=0,d=o.length;p<d;p++){let m=o.charAt(p);if(a)"\\;#".indexOf(m)!==-1?h+=m:h+="\\"+m,a=!1;else{if(";#".indexOf(m)!==-1)break;m==="\\"?a=!0:h+=m}}return a&&(h+="\\"),h.trim()}return o},"unsafe");t.exports={parse:l,decode:l,stringify:u,encode:u,safe:r,unsafe:s}}),rN=J((e,t)=>{var i=require("fs"),u=require("os"),n=require("path"),l=tN(),c=n.join(u.homedir(),".gitconfig"),r=null,s=S(()=>{if(r===null)try{if(r={},i.existsSync(c)){let g=i.readFileSync(c,"utf-8");r=l.parse(g)}}catch{r={}}return r},"loadGitConfig"),o=S(()=>{let g=s();return{sshCommandSetInConfig:g?.core?.sshCommand!==void 0,askPassSetInConfig:g?.core?.askpass!==void 0}},"checkGitConfigs"),a=process.env.GIT_SSH_COMMAND!==void 0,h=process.env.GIT_ASKPASS!==void 0,{sshCommandSetInConfig:p,askPassSetInConfig:d}=o(),m={...h||d?{}:{GIT_ASKPASS:"echo"},...a||p?{}:{GIT_SSH_COMMAND:"ssh -oStrictHostKeyChecking=accept-new"}};t.exports=(g={})=>({stdioString:!0,...g,shell:!1,env:g.env||{...m,...process.env}}),t.exports.loadGitConfig=s}),sN=J((e,t)=>{var i=rg(),u;try{u=i.sync("git")}catch{}t.exports=(n={})=>n.git?n.git:!u||n.git===!1?Object.assign(new Error("No git binary found in $PATH"),{code:"ENOGIT"}):u}),Yi=J((e,t)=>{var i=Fl(),u=Zi(),{log:n}=yt(),l=eN(),c=rN();t.exports=(r,s={})=>{let o=sN()(s);if(o instanceof Error)return Promise.reject(o);let a=s.allowReplace||r[0]==="--no-replace-objects"?r:["--no-replace-objects",...r],h=s.retry;return h==null&&(h={retries:s.fetchRetries||2,factor:s.fetchRetryFactor||10,maxTimeout:s.fetchRetryMaxtimeout||6e4,minTimeout:s.fetchRetryMintimeout||1e3}),u((p,d)=>(d!==1&&n.silly("git",`Retrying git command: ${a.join(" ")} attempt # ${d}`),i(o,a,c(s)).catch(m=>{let g=l(m);if(!g.shouldRetry(d))throw g;p(g)})),h)}}),ig=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var t=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,i=new Set,u=typeof process=="object"&&process?process:{},n=S((m,g,f,y)=>{typeof u.emitWarning=="function"&&u.emitWarning(m,g,f,y)},"emitWarning"),l=globalThis.AbortController,c=globalThis.AbortSignal;if(typeof l>"u"){c=class{static{S(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(f,y){this._onabort.push(y)}},l=class{static{S(this,"AbortController")}constructor(){g()}signal=new c;abort(f){if(!this.signal.aborted){this.signal.reason=f,this.signal.aborted=!0;for(let y of this.signal._onabort)y(f);this.signal.onabort?.(f)}}};let m=u.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",g=S(()=>{m&&(m=!1,n("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",g))},"warnACPolyfill")}var r=S(m=>!i.has(m),"shouldWarn"),s=Symbol("type"),o=S(m=>m&&m===Math.floor(m)&&m>0&&isFinite(m),"isPosInt"),a=S(m=>o(m)?m<=Math.pow(2,8)?Uint8Array:m<=Math.pow(2,16)?Uint16Array:m<=Math.pow(2,32)?Uint32Array:m<=Number.MAX_SAFE_INTEGER?h:null:null,"getUintArray"),h=class extends Array{static{S(this,"ZeroArray")}constructor(m){super(m),this.fill(0)}},p=class fs{static{S(this,"Stack")}heap;length;static#e=!1;static create(g){let f=a(g);if(!f)return[];fs.#e=!0;let y=new fs(g,f);return fs.#e=!1,y}constructor(g,f){if(!fs.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new f(g),this.length=0}push(g){this.heap[this.length++]=g}pop(){return this.heap[--this.length]}},d=class ng{static{S(this,"LRUCache")}#e;#t;#r;#s;#n;#c;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#u;#h;#o;#p;#a;#l;#i;#d;#y;#S;#f;#R;#v;#E;#b;#w;#_;static unsafeExposeInternals(g){return{starts:g.#v,ttls:g.#E,sizes:g.#R,keyMap:g.#o,keyList:g.#p,valList:g.#a,next:g.#l,prev:g.#i,get head(){return g.#d},get tail(){return g.#y},free:g.#S,isBackgroundFetch:S(f=>g.#A(f),"isBackgroundFetch"),backgroundFetch:S((f,y,v,E)=>g.#x(f,y,v,E),"backgroundFetch"),moveToTail:S(f=>g.#j(f),"moveToTail"),indexes:S(f=>g.#k(f),"indexes"),rindexes:S(f=>g.#D(f),"rindexes"),isStale:S(f=>g.#I(f),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#h}get size(){return this.#u}get fetchMethod(){return this.#n}get memoMethod(){return this.#c}get dispose(){return this.#r}get disposeAfter(){return this.#s}constructor(g){let{max:f=0,ttl:y,ttlResolution:v=1,ttlAutopurge:E,updateAgeOnGet:b,updateAgeOnHas:w,allowStale:_,dispose:O,disposeAfter:A,noDisposeOnSet:I,noUpdateTTL:P,maxSize:L=0,maxEntrySize:j=0,sizeCalculation:N,fetchMethod:M,memoMethod:B,noDeleteOnFetchRejection:F,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:H,allowStaleOnFetchAbort:G,ignoreFetchAbort:x}=g;if(f!==0&&!o(f))throw new TypeError("max option must be a nonnegative integer");let k=f?a(f):Array;if(!k)throw new Error("invalid max value: "+f);if(this.#e=f,this.#t=L,this.maxEntrySize=j||this.#t,this.sizeCalculation=N,this.sizeCalculation){if(!this.#t&&!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(B!==void 0&&typeof B!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#c=B,M!==void 0&&typeof M!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#n=M,this.#w=!!M,this.#o=new Map,this.#p=new Array(f).fill(void 0),this.#a=new Array(f).fill(void 0),this.#l=new k(f),this.#i=new k(f),this.#d=0,this.#y=0,this.#S=p.create(f),this.#u=0,this.#h=0,typeof O=="function"&&(this.#r=O),typeof A=="function"?(this.#s=A,this.#f=[]):(this.#s=void 0,this.#f=void 0),this.#b=!!this.#r,this.#_=!!this.#s,this.noDisposeOnSet=!!I,this.noUpdateTTL=!!P,this.noDeleteOnFetchRejection=!!F,this.allowStaleOnFetchRejection=!!H,this.allowStaleOnFetchAbort=!!G,this.ignoreFetchAbort=!!x,this.maxEntrySize!==0){if(this.#t!==0&&!o(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!o(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#T()}if(this.allowStale=!!_,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!b,this.updateAgeOnHas=!!w,this.ttlResolution=o(v)||v===0?v:1,this.ttlAutopurge=!!E,this.ttl=y||0,this.ttl){if(!o(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#N()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let T="LRU_CACHE_UNBOUNDED";r(T)&&(i.add(T),n("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",T,ng))}}getRemainingTTL(g){return this.#o.has(g)?1/0:0}#N(){let g=new h(this.#e),f=new h(this.#e);this.#E=g,this.#v=f,this.#M=(E,b,w=t.now())=>{if(f[E]=b!==0?w:0,g[E]=b,b!==0&&this.ttlAutopurge){let _=setTimeout(()=>{this.#I(E)&&this.#g(this.#p[E],"expire")},b+1);_.unref&&_.unref()}},this.#O=E=>{f[E]=g[E]!==0?t.now():0},this.#m=(E,b)=>{if(g[b]){let w=g[b],_=f[b];if(!w||!_)return;E.ttl=w,E.start=_,E.now=y||v();let O=E.now-_;E.remainingTTL=w-O}};let y=0,v=S(()=>{let E=t.now();if(this.ttlResolution>0){y=E;let b=setTimeout(()=>y=0,this.ttlResolution);b.unref&&b.unref()}return E},"getNow");this.getRemainingTTL=E=>{let b=this.#o.get(E);if(b===void 0)return 0;let w=g[b],_=f[b];if(!w||!_)return 1/0;let O=(y||v())-_;return w-O},this.#I=E=>{let b=f[E],w=g[E];return!!w&&!!b&&(y||v())-b>w}}#O=S(()=>{},"#updateItemAge");#m=S(()=>{},"#statusTTL");#M=S(()=>{},"#setItemTTL");#I=S(()=>!1,"#isStale");#T(){let g=new h(this.#e);this.#h=0,this.#R=g,this.#B=f=>{this.#h-=g[f],g[f]=0},this.#H=(f,y,v,E)=>{if(this.#A(y))return 0;if(!o(v))if(E){if(typeof E!="function")throw new TypeError("sizeCalculation must be a function");if(v=E(y,f),!o(v))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 v},this.#C=(f,y,v)=>{if(g[f]=y,this.#t){let E=this.#t-g[f];for(;this.#h>E;)this.#P(!0)}this.#h+=g[f],v&&(v.entrySize=y,v.totalCalculatedSize=this.#h)}}#B=S(g=>{},"#removeItemSize");#C=S((g,f,y)=>{},"#addItemSize");#H=S((g,f,y,v)=>{if(y||v)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#k({allowStale:g=this.allowStale}={}){if(this.#u)for(let f=this.#y;!(!this.#U(f)||((g||!this.#I(f))&&(yield f),f===this.#d));)f=this.#i[f]}*#D({allowStale:g=this.allowStale}={}){if(this.#u)for(let f=this.#d;!(!this.#U(f)||((g||!this.#I(f))&&(yield f),f===this.#y));)f=this.#l[f]}#U(g){return g!==void 0&&this.#o.get(this.#p[g])===g}*entries(){for(let g of this.#k())this.#a[g]!==void 0&&this.#p[g]!==void 0&&!this.#A(this.#a[g])&&(yield[this.#p[g],this.#a[g]])}*rentries(){for(let g of this.#D())this.#a[g]!==void 0&&this.#p[g]!==void 0&&!this.#A(this.#a[g])&&(yield[this.#p[g],this.#a[g]])}*keys(){for(let g of this.#k()){let f=this.#p[g];f!==void 0&&!this.#A(this.#a[g])&&(yield f)}}*rkeys(){for(let g of this.#D()){let f=this.#p[g];f!==void 0&&!this.#A(this.#a[g])&&(yield f)}}*values(){for(let g of this.#k())this.#a[g]!==void 0&&!this.#A(this.#a[g])&&(yield this.#a[g])}*rvalues(){for(let g of this.#D())this.#a[g]!==void 0&&!this.#A(this.#a[g])&&(yield this.#a[g])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(g,f={}){for(let y of this.#k()){let v=this.#a[y],E=this.#A(v)?v.__staleWhileFetching:v;if(E!==void 0&&g(E,this.#p[y],this))return this.get(this.#p[y],f)}}forEach(g,f=this){for(let y of this.#k()){let v=this.#a[y],E=this.#A(v)?v.__staleWhileFetching:v;E!==void 0&&g.call(f,E,this.#p[y],this)}}rforEach(g,f=this){for(let y of this.#D()){let v=this.#a[y],E=this.#A(v)?v.__staleWhileFetching:v;E!==void 0&&g.call(f,E,this.#p[y],this)}}purgeStale(){let g=!1;for(let f of this.#D({allowStale:!0}))this.#I(f)&&(this.#g(this.#p[f],"expire"),g=!0);return g}info(g){let f=this.#o.get(g);if(f===void 0)return;let y=this.#a[f],v=this.#A(y)?y.__staleWhileFetching:y;if(v===void 0)return;let E={value:v};if(this.#E&&this.#v){let b=this.#E[f],w=this.#v[f];if(b&&w){let _=b-(t.now()-w);E.ttl=_,E.start=Date.now()}}return this.#R&&(E.size=this.#R[f]),E}dump(){let g=[];for(let f of this.#k({allowStale:!0})){let y=this.#p[f],v=this.#a[f],E=this.#A(v)?v.__staleWhileFetching:v;if(E===void 0||y===void 0)continue;let b={value:E};if(this.#E&&this.#v){b.ttl=this.#E[f];let w=t.now()-this.#v[f];b.start=Math.floor(Date.now()-w)}this.#R&&(b.size=this.#R[f]),g.unshift([y,b])}return g}load(g){this.clear();for(let[f,y]of g){if(y.start){let v=Date.now()-y.start;y.start=t.now()-v}this.set(f,y.value,y)}}set(g,f,y={}){if(f===void 0)return this.delete(g),this;let{ttl:v=this.ttl,start:E,noDisposeOnSet:b=this.noDisposeOnSet,sizeCalculation:w=this.sizeCalculation,status:_}=y,{noUpdateTTL:O=this.noUpdateTTL}=y,A=this.#H(g,f,y.size||0,w);if(this.maxEntrySize&&A>this.maxEntrySize)return _&&(_.set="miss",_.maxEntrySizeExceeded=!0),this.#g(g,"set"),this;let I=this.#u===0?void 0:this.#o.get(g);if(I===void 0)I=this.#u===0?this.#y:this.#S.length!==0?this.#S.pop():this.#u===this.#e?this.#P(!1):this.#u,this.#p[I]=g,this.#a[I]=f,this.#o.set(g,I),this.#l[this.#y]=I,this.#i[I]=this.#y,this.#y=I,this.#u++,this.#C(I,A,_),_&&(_.set="add"),O=!1;else{this.#j(I);let P=this.#a[I];if(f!==P){if(this.#w&&this.#A(P)){P.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:L}=P;L!==void 0&&!b&&(this.#b&&this.#r?.(L,g,"set"),this.#_&&this.#f?.push([L,g,"set"]))}else b||(this.#b&&this.#r?.(P,g,"set"),this.#_&&this.#f?.push([P,g,"set"]));if(this.#B(I),this.#C(I,A,_),this.#a[I]=f,_){_.set="replace";let L=P&&this.#A(P)?P.__staleWhileFetching:P;L!==void 0&&(_.oldValue=L)}}else _&&(_.set="update")}if(v!==0&&!this.#E&&this.#N(),this.#E&&(O||this.#M(I,v,E),_&&this.#m(_,I)),!b&&this.#_&&this.#f){let P=this.#f,L;for(;L=P?.shift();)this.#s?.(...L)}return this}pop(){try{for(;this.#u;){let g=this.#a[this.#d];if(this.#P(!0),this.#A(g)){if(g.__staleWhileFetching)return g.__staleWhileFetching}else if(g!==void 0)return g}}finally{if(this.#_&&this.#f){let g=this.#f,f;for(;f=g?.shift();)this.#s?.(...f)}}}#P(g){let f=this.#d,y=this.#p[f],v=this.#a[f];return this.#w&&this.#A(v)?v.__abortController.abort(new Error("evicted")):(this.#b||this.#_)&&(this.#b&&this.#r?.(v,y,"evict"),this.#_&&this.#f?.push([v,y,"evict"])),this.#B(f),g&&(this.#p[f]=void 0,this.#a[f]=void 0,this.#S.push(f)),this.#u===1?(this.#d=this.#y=0,this.#S.length=0):this.#d=this.#l[f],this.#o.delete(y),this.#u--,f}has(g,f={}){let{updateAgeOnHas:y=this.updateAgeOnHas,status:v}=f,E=this.#o.get(g);if(E!==void 0){let b=this.#a[E];if(this.#A(b)&&b.__staleWhileFetching===void 0)return!1;if(this.#I(E))v&&(v.has="stale",this.#m(v,E));else return y&&this.#O(E),v&&(v.has="hit",this.#m(v,E)),!0}else v&&(v.has="miss");return!1}peek(g,f={}){let{allowStale:y=this.allowStale}=f,v=this.#o.get(g);if(v===void 0||!y&&this.#I(v))return;let E=this.#a[v];return this.#A(E)?E.__staleWhileFetching:E}#x(g,f,y,v){let E=f===void 0?void 0:this.#a[f];if(this.#A(E))return E;let b=new l,{signal:w}=y;w?.addEventListener("abort",()=>b.abort(w.reason),{signal:b.signal});let _={signal:b.signal,options:y,context:v},O=S((N,M=!1)=>{let{aborted:B}=b.signal,F=y.ignoreFetchAbort&&N!==void 0;if(y.status&&(B&&!M?(y.status.fetchAborted=!0,y.status.fetchError=b.signal.reason,F&&(y.status.fetchAbortIgnored=!0)):y.status.fetchResolved=!0),B&&!F&&!M)return I(b.signal.reason);let D=L;return this.#a[f]===L&&(N===void 0?D.__staleWhileFetching?this.#a[f]=D.__staleWhileFetching:this.#g(g,"fetch"):(y.status&&(y.status.fetchUpdated=!0),this.set(g,N,_.options))),N},"cb"),A=S(N=>(y.status&&(y.status.fetchRejected=!0,y.status.fetchError=N),I(N)),"eb"),I=S(N=>{let{aborted:M}=b.signal,B=M&&y.allowStaleOnFetchAbort,F=B||y.allowStaleOnFetchRejection,D=F||y.noDeleteOnFetchRejection,H=L;if(this.#a[f]===L&&(!D||H.__staleWhileFetching===void 0?this.#g(g,"fetch"):B||(this.#a[f]=H.__staleWhileFetching)),F)return y.status&&H.__staleWhileFetching!==void 0&&(y.status.returnedStale=!0),H.__staleWhileFetching;if(H.__returned===H)throw N},"fetchFail"),P=S((N,M)=>{let B=this.#n?.(g,E,_);B&&B instanceof Promise&&B.then(F=>N(F===void 0?void 0:F),M),b.signal.addEventListener("abort",()=>{(!y.ignoreFetchAbort||y.allowStaleOnFetchAbort)&&(N(void 0),y.allowStaleOnFetchAbort&&(N=S(F=>O(F,!0),"res")))})},"pcall");y.status&&(y.status.fetchDispatched=!0);let L=new Promise(P).then(O,A),j=Object.assign(L,{__abortController:b,__staleWhileFetching:E,__returned:void 0});return f===void 0?(this.set(g,j,{..._.options,status:void 0}),f=this.#o.get(g)):this.#a[f]=j,j}#A(g){if(!this.#w)return!1;let f=g;return!!f&&f instanceof Promise&&f.hasOwnProperty("__staleWhileFetching")&&f.__abortController instanceof l}async fetch(g,f={}){let{allowStale:y=this.allowStale,updateAgeOnGet:v=this.updateAgeOnGet,noDeleteOnStaleGet:E=this.noDeleteOnStaleGet,ttl:b=this.ttl,noDisposeOnSet:w=this.noDisposeOnSet,size:_=0,sizeCalculation:O=this.sizeCalculation,noUpdateTTL:A=this.noUpdateTTL,noDeleteOnFetchRejection:I=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:P=this.allowStaleOnFetchRejection,ignoreFetchAbort:L=this.ignoreFetchAbort,allowStaleOnFetchAbort:j=this.allowStaleOnFetchAbort,context:N,forceRefresh:M=!1,status:B,signal:F}=f;if(!this.#w)return B&&(B.fetch="get"),this.get(g,{allowStale:y,updateAgeOnGet:v,noDeleteOnStaleGet:E,status:B});let D={allowStale:y,updateAgeOnGet:v,noDeleteOnStaleGet:E,ttl:b,noDisposeOnSet:w,size:_,sizeCalculation:O,noUpdateTTL:A,noDeleteOnFetchRejection:I,allowStaleOnFetchRejection:P,allowStaleOnFetchAbort:j,ignoreFetchAbort:L,status:B,signal:F},H=this.#o.get(g);if(H===void 0){B&&(B.fetch="miss");let G=this.#x(g,H,D,N);return G.__returned=G}else{let G=this.#a[H];if(this.#A(G)){let C=y&&G.__staleWhileFetching!==void 0;return B&&(B.fetch="inflight",C&&(B.returnedStale=!0)),C?G.__staleWhileFetching:G.__returned=G}let x=this.#I(H);if(!M&&!x)return B&&(B.fetch="hit"),this.#j(H),v&&this.#O(H),B&&this.#m(B,H),G;let k=this.#x(g,H,D,N),T=k.__staleWhileFetching!==void 0&&y;return B&&(B.fetch=x?"stale":"refresh",T&&x&&(B.returnedStale=!0)),T?k.__staleWhileFetching:k.__returned=k}}async forceFetch(g,f={}){let y=await this.fetch(g,f);if(y===void 0)throw new Error("fetch() returned undefined");return y}memo(g,f={}){let y=this.#c;if(!y)throw new Error("no memoMethod provided to constructor");let{context:v,forceRefresh:E,...b}=f,w=this.get(g,b);if(!E&&w!==void 0)return w;let _=y(g,w,{options:b,context:v});return this.set(g,_,b),_}get(g,f={}){let{allowStale:y=this.allowStale,updateAgeOnGet:v=this.updateAgeOnGet,noDeleteOnStaleGet:E=this.noDeleteOnStaleGet,status:b}=f,w=this.#o.get(g);if(w!==void 0){let _=this.#a[w],O=this.#A(_);return b&&this.#m(b,w),this.#I(w)?(b&&(b.get="stale"),O?(b&&y&&_.__staleWhileFetching!==void 0&&(b.returnedStale=!0),y?_.__staleWhileFetching:void 0):(E||this.#g(g,"expire"),b&&y&&(b.returnedStale=!0),y?_:void 0)):(b&&(b.get="hit"),O?_.__staleWhileFetching:(this.#j(w),v&&this.#O(w),_))}else b&&(b.get="miss")}#$(g,f){this.#i[f]=g,this.#l[g]=f}#j(g){g!==this.#y&&(g===this.#d?this.#d=this.#l[g]:this.#$(this.#i[g],this.#l[g]),this.#$(this.#y,g),this.#y=g)}delete(g){return this.#g(g,"delete")}#g(g,f){let y=!1;if(this.#u!==0){let v=this.#o.get(g);if(v!==void 0)if(y=!0,this.#u===1)this.#G(f);else{this.#B(v);let E=this.#a[v];if(this.#A(E)?E.__abortController.abort(new Error("deleted")):(this.#b||this.#_)&&(this.#b&&this.#r?.(E,g,f),this.#_&&this.#f?.push([E,g,f])),this.#o.delete(g),this.#p[v]=void 0,this.#a[v]=void 0,v===this.#y)this.#y=this.#i[v];else if(v===this.#d)this.#d=this.#l[v];else{let b=this.#i[v];this.#l[b]=this.#l[v];let w=this.#l[v];this.#i[w]=this.#i[v]}this.#u--,this.#S.push(v)}}if(this.#_&&this.#f?.length){let v=this.#f,E;for(;E=v?.shift();)this.#s?.(...E)}return y}clear(){return this.#G("delete")}#G(g){for(let f of this.#D({allowStale:!0})){let y=this.#a[f];if(this.#A(y))y.__abortController.abort(new Error("deleted"));else{let v=this.#p[f];this.#b&&this.#r?.(y,v,g),this.#_&&this.#f?.push([y,v,g])}}if(this.#o.clear(),this.#a.fill(void 0),this.#p.fill(void 0),this.#E&&this.#v&&(this.#E.fill(0),this.#v.fill(0)),this.#R&&this.#R.fill(0),this.#d=0,this.#y=0,this.#S.length=0,this.#h=0,this.#u=0,this.#_&&this.#f){let f=this.#f,y;for(;y=f?.shift();)this.#s?.(...y)}}};e.LRUCache=d}),iN=J((e,t)=>{"use strict";var i=Je(),u=S((n,l,c,r,s)=>{typeof c=="string"&&(s=r,r=c,c=void 0);try{return new i(n instanceof i?n.version:n,c).inc(l,r,s).version}catch{return null}},"inc");t.exports=u}),nN=J((e,t)=>{"use strict";var i=Ar(),u=S((n,l)=>{let c=i(n,null,!0),r=i(l,null,!0),s=c.compare(r);if(s===0)return null;let o=s>0,a=o?c:r,h=o?r:c,p=!!a.prerelease.length;if(h.prerelease.length&&!p){if(!h.patch&&!h.minor)return"major";if(h.compareMain(a)===0)return h.minor&&!h.patch?"minor":"patch"}let d=p?"pre":"";return c.major!==r.major?d+"major":c.minor!==r.minor?d+"minor":c.patch!==r.patch?d+"patch":"prerelease"},"diff");t.exports=u}),oN=J((e,t)=>{"use strict";var i=Je(),u=S((n,l)=>new i(n,l).major,"major");t.exports=u}),aN=J((e,t)=>{"use strict";var i=Je(),u=S((n,l)=>new i(n,l).minor,"minor");t.exports=u}),lN=J((e,t)=>{"use strict";var i=Je(),u=S((n,l)=>new i(n,l).patch,"patch");t.exports=u}),cN=J((e,t)=>{"use strict";var i=Ar(),u=S((n,l)=>{let c=i(n,l);return c&&c.prerelease.length?c.prerelease:null},"prerelease");t.exports=u}),vt=J((e,t)=>{"use strict";var i=Je(),u=S((n,l,c)=>new i(n,c).compare(new i(l,c)),"compare");t.exports=u}),uN=J((e,t)=>{"use strict";var i=vt(),u=S((n,l,c)=>i(l,n,c),"rcompare");t.exports=u}),hN=J((e,t)=>{"use strict";var i=vt(),u=S((n,l)=>i(n,l,!0),"compareLoose");t.exports=u}),Hl=J((e,t)=>{"use strict";var i=Je(),u=S((n,l,c)=>{let r=new i(n,c),s=new i(l,c);return r.compare(s)||r.compareBuild(s)},"compareBuild");t.exports=u}),pN=J((e,t)=>{"use strict";var i=Hl(),u=S((n,l)=>n.sort((c,r)=>i(c,r,l)),"sort");t.exports=u}),dN=J((e,t)=>{"use strict";var i=Hl(),u=S((n,l)=>n.sort((c,r)=>i(r,c,l)),"rsort");t.exports=u}),Qi=J((e,t)=>{"use strict";var i=vt(),u=S((n,l,c)=>i(n,l,c)>0,"gt");t.exports=u}),Gl=J((e,t)=>{"use strict";var i=vt(),u=S((n,l,c)=>i(n,l,c)<0,"lt");t.exports=u}),og=J((e,t)=>{"use strict";var i=vt(),u=S((n,l,c)=>i(n,l,c)===0,"eq");t.exports=u}),ag=J((e,t)=>{"use strict";var i=vt(),u=S((n,l,c)=>i(n,l,c)!==0,"neq");t.exports=u}),Vl=J((e,t)=>{"use strict";var i=vt(),u=S((n,l,c)=>i(n,l,c)>=0,"gte");t.exports=u}),Wl=J((e,t)=>{"use strict";var i=vt(),u=S((n,l,c)=>i(n,l,c)<=0,"lte");t.exports=u}),lg=J((e,t)=>{"use strict";var i=og(),u=ag(),n=Qi(),l=Vl(),c=Gl(),r=Wl(),s=S((o,a,h,p)=>{switch(a){case"===":return typeof o=="object"&&(o=o.version),typeof h=="object"&&(h=h.version),o===h;case"!==":return typeof o=="object"&&(o=o.version),typeof h=="object"&&(h=h.version),o!==h;case"":case"=":case"==":return i(o,h,p);case"!=":return u(o,h,p);case">":return n(o,h,p);case">=":return l(o,h,p);case"<":return c(o,h,p);case"<=":return r(o,h,p);default:throw new TypeError(`Invalid operator: ${a}`)}},"cmp");t.exports=s}),fN=J((e,t)=>{"use strict";var i=Je(),u=Ar(),{safeRe:n,t:l}=ms(),c=S((r,s)=>{if(r instanceof i)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;s=s||{};let o=null;if(!s.rtl)o=r.match(s.includePrerelease?n[l.COERCEFULL]:n[l.COERCE]);else{let g=s.includePrerelease?n[l.COERCERTLFULL]:n[l.COERCERTL],f;for(;(f=g.exec(r))&&(!o||o.index+o[0].length!==r.length);)(!o||f.index+f[0].length!==o.index+o[0].length)&&(o=f),g.lastIndex=f.index+f[1].length+f[2].length;g.lastIndex=-1}if(o===null)return null;let a=o[2],h=o[3]||"0",p=o[4]||"0",d=s.includePrerelease&&o[5]?`-${o[5]}`:"",m=s.includePrerelease&&o[6]?`+${o[6]}`:"";return u(`${a}.${h}.${p}${d}${m}`,s)},"coerce");t.exports=c}),gN=J((e,t)=>{"use strict";var i=class{static{S(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(u){let n=this.map.get(u);if(n!==void 0)return this.map.delete(u),this.map.set(u,n),n}delete(u){return this.map.delete(u)}set(u,n){if(!this.delete(u)&&n!==void 0){if(this.map.size>=this.max){let l=this.map.keys().next().value;this.delete(l)}this.map.set(u,n)}return this}};t.exports=i}),St=J((e,t)=>{"use strict";var i=/\s+/g,u=class qi{static{S(this,"Range")}constructor(D,H){if(H=c(H),D instanceof qi)return D.loose===!!H.loose&&D.includePrerelease===!!H.includePrerelease?D:new qi(D.raw,H);if(D instanceof r)return this.raw=D.value,this.set=[[D]],this.formatted=void 0,this;if(this.options=H,this.loose=!!H.loose,this.includePrerelease=!!H.includePrerelease,this.raw=D.trim().replace(i," "),this.set=this.raw.split("||").map(G=>this.parseRange(G.trim())).filter(G=>G.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let G=this.set[0];if(this.set=this.set.filter(x=>!y(x[0])),this.set.length===0)this.set=[G];else if(this.set.length>1){for(let x of this.set)if(x.length===1&&v(x[0])){this.set=[x];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let D=0;D<this.set.length;D++){D>0&&(this.formatted+="||");let H=this.set[D];for(let G=0;G<H.length;G++)G>0&&(this.formatted+=" "),this.formatted+=H[G].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(D){let H=((this.options.includePrerelease&&g)|(this.options.loose&&f))+":"+D,G=l.get(H);if(G)return G;let x=this.options.loose,k=x?a[h.HYPHENRANGELOOSE]:a[h.HYPHENRANGE];D=D.replace(k,M(this.options.includePrerelease)),s("hyphen replace",D),D=D.replace(a[h.COMPARATORTRIM],p),s("comparator trim",D),D=D.replace(a[h.TILDETRIM],d),s("tilde trim",D),D=D.replace(a[h.CARETTRIM],m),s("caret trim",D);let T=D.split(" ").map(Y=>b(Y,this.options)).join(" ").split(/\s+/).map(Y=>N(Y,this.options));x&&(T=T.filter(Y=>(s("loose invalid filter",Y,this.options),!!Y.match(a[h.COMPARATORLOOSE])))),s("range list",T);let C=new Map,q=T.map(Y=>new r(Y,this.options));for(let Y of q){if(y(Y))return[Y];C.set(Y.value,Y)}C.size>1&&C.has("")&&C.delete("");let X=[...C.values()];return l.set(H,X),X}intersects(D,H){if(!(D instanceof qi))throw new TypeError("a Range is required");return this.set.some(G=>E(G,H)&&D.set.some(x=>E(x,H)&&G.every(k=>x.every(T=>k.intersects(T,H)))))}test(D){if(!D)return!1;if(typeof D=="string")try{D=new o(D,this.options)}catch{return!1}for(let H=0;H<this.set.length;H++)if(B(this.set[H],D,this.options))return!0;return!1}};t.exports=u;var n=gN(),l=new n,c=Bl(),r=en(),s=Ji(),o=Je(),{safeRe:a,t:h,comparatorTrimReplace:p,tildeTrimReplace:d,caretTrimReplace:m}=ms(),{FLAG_INCLUDE_PRERELEASE:g,FLAG_LOOSE:f}=Xi(),y=S(F=>F.value==="<0.0.0-0","isNullSet"),v=S(F=>F.value==="","isAny"),E=S((F,D)=>{let H=!0,G=F.slice(),x=G.pop();for(;H&&G.length;)H=G.every(k=>x.intersects(k,D)),x=G.pop();return H},"isSatisfiable"),b=S((F,D)=>(s("comp",F,D),F=A(F,D),s("caret",F),F=_(F,D),s("tildes",F),F=P(F,D),s("xrange",F),F=j(F,D),s("stars",F),F),"parseComparator"),w=S(F=>!F||F.toLowerCase()==="x"||F==="*","isX"),_=S((F,D)=>F.trim().split(/\s+/).map(H=>O(H,D)).join(" "),"replaceTildes"),O=S((F,D)=>{let H=D.loose?a[h.TILDELOOSE]:a[h.TILDE];return F.replace(H,(G,x,k,T,C)=>{s("tilde",F,G,x,k,T,C);let q;return w(x)?q="":w(k)?q=`>=${x}.0.0 <${+x+1}.0.0-0`:w(T)?q=`>=${x}.${k}.0 <${x}.${+k+1}.0-0`:C?(s("replaceTilde pr",C),q=`>=${x}.${k}.${T}-${C} <${x}.${+k+1}.0-0`):q=`>=${x}.${k}.${T} <${x}.${+k+1}.0-0`,s("tilde return",q),q})},"replaceTilde"),A=S((F,D)=>F.trim().split(/\s+/).map(H=>I(H,D)).join(" "),"replaceCarets"),I=S((F,D)=>{s("caret",F,D);let H=D.loose?a[h.CARETLOOSE]:a[h.CARET],G=D.includePrerelease?"-0":"";return F.replace(H,(x,k,T,C,q)=>{s("caret",F,x,k,T,C,q);let X;return w(k)?X="":w(T)?X=`>=${k}.0.0${G} <${+k+1}.0.0-0`:w(C)?k==="0"?X=`>=${k}.${T}.0${G} <${k}.${+T+1}.0-0`:X=`>=${k}.${T}.0${G} <${+k+1}.0.0-0`:q?(s("replaceCaret pr",q),k==="0"?T==="0"?X=`>=${k}.${T}.${C}-${q} <${k}.${T}.${+C+1}-0`:X=`>=${k}.${T}.${C}-${q} <${k}.${+T+1}.0-0`:X=`>=${k}.${T}.${C}-${q} <${+k+1}.0.0-0`):(s("no pr"),k==="0"?T==="0"?X=`>=${k}.${T}.${C}${G} <${k}.${T}.${+C+1}-0`:X=`>=${k}.${T}.${C}${G} <${k}.${+T+1}.0-0`:X=`>=${k}.${T}.${C} <${+k+1}.0.0-0`),s("caret return",X),X})},"replaceCaret"),P=S((F,D)=>(s("replaceXRanges",F,D),F.split(/\s+/).map(H=>L(H,D)).join(" ")),"replaceXRanges"),L=S((F,D)=>{F=F.trim();let H=D.loose?a[h.XRANGELOOSE]:a[h.XRANGE];return F.replace(H,(G,x,k,T,C,q)=>{s("xRange",F,G,x,k,T,C,q);let X=w(k),Y=X||w(T),$=Y||w(C),V=$;return x==="="&&V&&(x=""),q=D.includePrerelease?"-0":"",X?x===">"||x==="<"?G="<0.0.0-0":G="*":x&&V?(Y&&(T=0),C=0,x===">"?(x=">=",Y?(k=+k+1,T=0,C=0):(T=+T+1,C=0)):x==="<="&&(x="<",Y?k=+k+1:T=+T+1),x==="<"&&(q="-0"),G=`${x+k}.${T}.${C}${q}`):Y?G=`>=${k}.0.0${q} <${+k+1}.0.0-0`:$&&(G=`>=${k}.${T}.0${q} <${k}.${+T+1}.0-0`),s("xRange return",G),G})},"replaceXRange"),j=S((F,D)=>(s("replaceStars",F,D),F.trim().replace(a[h.STAR],"")),"replaceStars"),N=S((F,D)=>(s("replaceGTE0",F,D),F.trim().replace(a[D.includePrerelease?h.GTE0PRE:h.GTE0],"")),"replaceGTE0"),M=S(F=>(D,H,G,x,k,T,C,q,X,Y,$,V)=>(w(G)?H="":w(x)?H=`>=${G}.0.0${F?"-0":""}`:w(k)?H=`>=${G}.${x}.0${F?"-0":""}`:T?H=`>=${H}`:H=`>=${H}${F?"-0":""}`,w(X)?q="":w(Y)?q=`<${+X+1}.0.0-0`:w($)?q=`<${X}.${+Y+1}.0-0`:V?q=`<=${X}.${Y}.${$}-${V}`:F?q=`<${X}.${Y}.${+$+1}-0`:q=`<=${q}`,`${H} ${q}`.trim()),"hyphenReplace"),B=S((F,D,H)=>{for(let G=0;G<F.length;G++)if(!F[G].test(D))return!1;if(D.prerelease.length&&!H.includePrerelease){for(let G=0;G<F.length;G++)if(s(F[G].semver),F[G].semver!==r.ANY&&F[G].semver.prerelease.length>0){let x=F[G].semver;if(x.major===D.major&&x.minor===D.minor&&x.patch===D.patch)return!0}return!1}return!0},"testSet")}),en=J((e,t)=>{"use strict";var i=Symbol("SemVer ANY"),u=class ml{static{S(this,"Comparator")}static get ANY(){return i}constructor(p,d){if(d=n(d),p instanceof ml){if(p.loose===!!d.loose)return p;p=p.value}p=p.trim().split(/\s+/).join(" "),s("comparator",p,d),this.options=d,this.loose=!!d.loose,this.parse(p),this.semver===i?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(p){let d=this.options.loose?l[c.COMPARATORLOOSE]:l[c.COMPARATOR],m=p.match(d);if(!m)throw new TypeError(`Invalid comparator: ${p}`);this.operator=m[1]!==void 0?m[1]:"",this.operator==="="&&(this.operator=""),m[2]?this.semver=new o(m[2],this.options.loose):this.semver=i}toString(){return this.value}test(p){if(s("Comparator.test",p,this.options.loose),this.semver===i||p===i)return!0;if(typeof p=="string")try{p=new o(p,this.options)}catch{return!1}return r(p,this.operator,this.semver,this.options)}intersects(p,d){if(!(p instanceof ml))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new a(p.value,d).test(this.value):p.operator===""?p.value===""?!0:new a(this.value,d).test(p.semver):(d=n(d),d.includePrerelease&&(this.value==="<0.0.0-0"||p.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||p.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&p.operator.startsWith(">")||this.operator.startsWith("<")&&p.operator.startsWith("<")||this.semver.version===p.semver.version&&this.operator.includes("=")&&p.operator.includes("=")||r(this.semver,"<",p.semver,d)&&this.operator.startsWith(">")&&p.operator.startsWith("<")||r(this.semver,">",p.semver,d)&&this.operator.startsWith("<")&&p.operator.startsWith(">")))}};t.exports=u;var n=Bl(),{safeRe:l,t:c}=ms(),r=lg(),s=Ji(),o=Je(),a=St()}),ys=J((e,t)=>{"use strict";var i=St(),u=S((n,l,c)=>{try{l=new i(l,c)}catch{return!1}return l.test(n)},"satisfies");t.exports=u}),mN=J((e,t)=>{"use strict";var i=St(),u=S((n,l)=>new i(n,l).set.map(c=>c.map(r=>r.value).join(" ").trim().split(" ")),"toComparators");t.exports=u}),yN=J((e,t)=>{"use strict";var i=Je(),u=St(),n=S((l,c,r)=>{let s=null,o=null,a=null;try{a=new u(c,r)}catch{return null}return l.forEach(h=>{a.test(h)&&(!s||o.compare(h)===-1)&&(s=h,o=new i(s,r))}),s},"maxSatisfying");t.exports=n}),vN=J((e,t)=>{"use strict";var i=Je(),u=St(),n=S((l,c,r)=>{let s=null,o=null,a=null;try{a=new u(c,r)}catch{return null}return l.forEach(h=>{a.test(h)&&(!s||o.compare(h)===1)&&(s=h,o=new i(s,r))}),s},"minSatisfying");t.exports=n}),SN=J((e,t)=>{"use strict";var i=Je(),u=St(),n=Qi(),l=S((c,r)=>{c=new u(c,r);let s=new i("0.0.0");if(c.test(s)||(s=new i("0.0.0-0"),c.test(s)))return s;s=null;for(let o=0;o<c.set.length;++o){let a=c.set[o],h=null;a.forEach(p=>{let d=new i(p.semver.version);switch(p.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!h||n(d,h))&&(h=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${p.operator}`)}}),h&&(!s||n(s,h))&&(s=h)}return s&&c.test(s)?s:null},"minVersion");t.exports=l}),cg=J((e,t)=>{"use strict";var i=St(),u=S((n,l)=>{try{return new i(n,l).range||"*"}catch{return null}},"validRange");t.exports=u}),zl=J((e,t)=>{"use strict";var i=Je(),u=en(),{ANY:n}=u,l=St(),c=ys(),r=Qi(),s=Gl(),o=Wl(),a=Vl(),h=S((p,d,m,g)=>{p=new i(p,g),d=new l(d,g);let f,y,v,E,b;switch(m){case">":f=r,y=o,v=s,E=">",b=">=";break;case"<":f=s,y=a,v=r,E="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(c(p,d,g))return!1;for(let w=0;w<d.set.length;++w){let _=d.set[w],O=null,A=null;if(_.forEach(I=>{I.semver===n&&(I=new u(">=0.0.0")),O=O||I,A=A||I,f(I.semver,O.semver,g)?O=I:v(I.semver,A.semver,g)&&(A=I)}),O.operator===E||O.operator===b||(!A.operator||A.operator===E)&&y(p,A.semver)||A.operator===b&&v(p,A.semver))return!1}return!0},"outside");t.exports=h}),EN=J((e,t)=>{"use strict";var i=zl(),u=S((n,l,c)=>i(n,l,">",c),"gtr");t.exports=u}),bN=J((e,t)=>{"use strict";var i=zl(),u=S((n,l,c)=>i(n,l,"<",c),"ltr");t.exports=u}),wN=J((e,t)=>{"use strict";var i=St(),u=S((n,l,c)=>(n=new i(n,c),l=new i(l,c),n.intersects(l,c)),"intersects");t.exports=u}),_N=J((e,t)=>{"use strict";var i=ys(),u=vt();t.exports=(n,l,c)=>{let r=[],s=null,o=null,a=n.sort((m,g)=>u(m,g,c));for(let m of a)i(m,l,c)?(o=m,s||(s=m)):(o&&r.push([s,o]),o=null,s=null);s&&r.push([s,null]);let h=[];for(let[m,g]of r)m===g?h.push(m):!g&&m===a[0]?h.push("*"):g?m===a[0]?h.push(`<=${g}`):h.push(`${m} - ${g}`):h.push(`>=${m}`);let p=h.join(" || "),d=typeof l.raw=="string"?l.raw:String(l);return p.length<d.length?p:l}}),ON=J((e,t)=>{"use strict";var i=St(),u=en(),{ANY:n}=u,l=ys(),c=vt(),r=S((d,m,g={})=>{if(d===m)return!0;d=new i(d,g),m=new i(m,g);let f=!1;e:for(let y of d.set){for(let v of m.set){let E=a(y,v,g);if(f=f||E!==null,E)continue e}if(f)return!1}return!0},"subset"),s=[new u(">=0.0.0-0")],o=[new u(">=0.0.0")],a=S((d,m,g)=>{if(d===m)return!0;if(d.length===1&&d[0].semver===n){if(m.length===1&&m[0].semver===n)return!0;g.includePrerelease?d=s:d=o}if(m.length===1&&m[0].semver===n){if(g.includePrerelease)return!0;m=o}let f=new Set,y,v;for(let P of d)P.operator===">"||P.operator===">="?y=h(y,P,g):P.operator==="<"||P.operator==="<="?v=p(v,P,g):f.add(P.semver);if(f.size>1)return null;let E;if(y&&v&&(E=c(y.semver,v.semver,g),E>0||E===0&&(y.operator!==">="||v.operator!=="<=")))return null;for(let P of f){if(y&&!l(P,String(y),g)||v&&!l(P,String(v),g))return null;for(let L of m)if(!l(P,String(L),g))return!1;return!0}let b,w,_,O,A=v&&!g.includePrerelease&&v.semver.prerelease.length?v.semver:!1,I=y&&!g.includePrerelease&&y.semver.prerelease.length?y.semver:!1;A&&A.prerelease.length===1&&v.operator==="<"&&A.prerelease[0]===0&&(A=!1);for(let P of m){if(O=O||P.operator===">"||P.operator===">=",_=_||P.operator==="<"||P.operator==="<=",y){if(I&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===I.major&&P.semver.minor===I.minor&&P.semver.patch===I.patch&&(I=!1),P.operator===">"||P.operator===">="){if(b=h(y,P,g),b===P&&b!==y)return!1}else if(y.operator===">="&&!l(y.semver,String(P),g))return!1}if(v){if(A&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===A.major&&P.semver.minor===A.minor&&P.semver.patch===A.patch&&(A=!1),P.operator==="<"||P.operator==="<="){if(w=p(v,P,g),w===P&&w!==v)return!1}else if(v.operator==="<="&&!l(v.semver,String(P),g))return!1}if(!P.operator&&(v||y)&&E!==0)return!1}return!(y&&_&&!v&&E!==0||v&&O&&!y&&E!==0||I||A)},"simpleSubset"),h=S((d,m,g)=>{if(!d)return m;let f=c(d.semver,m.semver,g);return f>0?d:f<0||m.operator===">"&&d.operator===">="?m:d},"higherGT"),p=S((d,m,g)=>{if(!d)return m;let f=c(d.semver,m.semver,g);return f<0?d:f>0||m.operator==="<"&&d.operator==="<="?m:d},"lowerLT");t.exports=r}),Ir=J((e,t)=>{"use strict";var i=ms(),u=Xi(),n=Je(),l=Ff(),c=Ar(),r=Hf(),s=Gf(),o=iN(),a=nN(),h=oN(),p=aN(),d=lN(),m=cN(),g=vt(),f=uN(),y=hN(),v=Hl(),E=pN(),b=dN(),w=Qi(),_=Gl(),O=og(),A=ag(),I=Vl(),P=Wl(),L=lg(),j=fN(),N=en(),M=St(),B=ys(),F=mN(),D=yN(),H=vN(),G=SN(),x=cg(),k=zl(),T=EN(),C=bN(),q=wN(),X=_N(),Y=ON();t.exports={parse:c,valid:r,clean:s,inc:o,diff:a,major:h,minor:p,patch:d,prerelease:m,compare:g,rcompare:f,compareLoose:y,compareBuild:v,sort:E,rsort:b,gt:w,lt:_,eq:O,neq:A,gte:I,lte:P,cmp:L,coerce:j,Comparator:N,Range:M,satisfies:B,toComparators:F,maxSatisfying:D,minSatisfying:H,minVersion:G,validRange:x,outside:k,gtr:T,ltr:C,intersects:q,simplifyRange:X,subset:Y,SemVer:n,re:i.re,src:i.src,tokens:i.t,SEMVER_SPEC_VERSION:u.SEMVER_SPEC_VERSION,RELEASE_TYPES:u.RELEASE_TYPES,compareIdentifiers:l.compareIdentifiers,rcompareIdentifiers:l.rcompareIdentifiers}}),RN=J((e,t)=>{var i=Ir();t.exports=a=>u(a.reduce(o,{versions:{},"dist-tags":{},refs:{},shas:{}}));var u=S(a=>c(n(l(a))),"finish"),n=S(a=>(Object.keys(a.refs).forEach(h=>{let p=a.refs[h];a.shas[p.sha]?a.shas[p.sha].push(h):a.shas[p.sha]=[h]}),a),"shaList"),l=S(a=>(Object.keys(a.refs).filter(h=>h.endsWith("^{}")).forEach(h=>{let p=a.refs[h],d=a.refs[h.replace(/\^\{\}$/,"")];d&&(d.sha=p.sha,delete a.refs[h])}),a),"peelTags"),c=S(a=>{let h=a.refs.HEAD||{};return Object.keys(a.versions).forEach(p=>{let d=a.versions[p];a.refs.latest&&d.sha===a.refs.latest.sha?a["dist-tags"].latest=p:d.sha===h.sha&&(a["dist-tags"].HEAD=p,a.refs.latest||(a["dist-tags"].latest=p))}),a},"distTags"),r=S(a=>a.startsWith("refs/tags/")?"tag":a.startsWith("refs/heads/")?"branch":a.startsWith("refs/pull/")?"pull":a==="HEAD"?"head":"other","refType"),s=S(a=>{let h=a.trim().split(/\s+/,2);if(h.length<2)return null;let p=h[0].trim(),d=h[1].trim(),m=r(d);if(m==="tag"){let g=d.slice(10);return{sha:p,ref:g,rawRef:d,type:m}}if(m==="branch"){let g=d.slice(11);return{sha:p,ref:g,rawRef:d,type:m}}if(m==="pull"){let g=d.slice(5).replace(/\/head$/,"");return{sha:p,ref:g,rawRef:d,type:m}}return m==="head"?{sha:p,ref:"HEAD",rawRef:d,type:m}:{sha:p,ref:d,rawRef:d,type:m}},"lineToRevDoc"),o=S((a,h)=>{let p=s(h);if(!p)return a;if(a.refs[p.ref]=p,a.refs[p.rawRef]=p,p.type==="tag"){let d=!p.ref.endsWith("^{}")&&p.ref.match(/v?(\d+\.\d+\.\d+(?:[-+].+)?)$/);d&&i.valid(d[1],!0)&&(a.versions[i.clean(d[1],!0)]=p)}return a},"linesToRevsReducer")}),ug=J((e,t)=>{var i=Yi(),{LRUCache:u}=ig(),n=RN(),l=new u({max:100,ttl:300*1e3});t.exports=async(c,r={})=>{if(!r.noGitRevCache){let a=l.get(c);if(a)return a}let{stdout:s}=await i(["ls-remote",c],r),o=n(s.trim().split(`
28
- `));return l.set(c,o),o}}),AN=J(e=>{var t=S(i=>(i.fakePlatform||process.platform)==="win32","isWindows");e.isWindows=t}),CN=J((e,t)=>{"use strict";var i=S((...r)=>r.every(s=>s)?r.join(""):"","maybeJoin"),u=S(r=>r?encodeURIComponent(r):"","maybeEncode"),n=S(r=>r.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),"formatHashFragment"),l={sshtemplate:S(({domain:r,user:s,project:o,committish:a})=>`git@${r}:${s}/${o}.git${i("#",a)}`,"sshtemplate"),sshurltemplate:S(({domain:r,user:s,project:o,committish:a})=>`git+ssh://git@${r}/${s}/${o}.git${i("#",a)}`,"sshurltemplate"),edittemplate:S(({domain:r,user:s,project:o,committish:a,editpath:h,path:p})=>`https://${r}/${s}/${o}${i("/",h,"/",u(a||"HEAD"),"/",p)}`,"edittemplate"),browsetemplate:S(({domain:r,user:s,project:o,committish:a,treepath:h})=>`https://${r}/${s}/${o}${i("/",h,"/",u(a))}`,"browsetemplate"),browsetreetemplate:S(({domain:r,user:s,project:o,committish:a,treepath:h,path:p,fragment:d,hashformat:m})=>`https://${r}/${s}/${o}/${h}/${u(a||"HEAD")}/${p}${i("#",m(d||""))}`,"browsetreetemplate"),browseblobtemplate:S(({domain:r,user:s,project:o,committish:a,blobpath:h,path:p,fragment:d,hashformat:m})=>`https://${r}/${s}/${o}/${h}/${u(a||"HEAD")}/${p}${i("#",m(d||""))}`,"browseblobtemplate"),docstemplate:S(({domain:r,user:s,project:o,treepath:a,committish:h})=>`https://${r}/${s}/${o}${i("/",a,"/",u(h))}#readme`,"docstemplate"),httpstemplate:S(({auth:r,domain:s,user:o,project:a,committish:h})=>`git+https://${i(r,"@")}${s}/${o}/${a}.git${i("#",h)}`,"httpstemplate"),filetemplate:S(({domain:r,user:s,project:o,committish:a,path:h})=>`https://${r}/${s}/${o}/raw/${u(a||"HEAD")}/${h}`,"filetemplate"),shortcuttemplate:S(({type:r,user:s,project:o,committish:a})=>`${r}:${s}/${o}${i("#",a)}`,"shortcuttemplate"),pathtemplate:S(({user:r,project:s,committish:o})=>`${r}/${s}${i("#",o)}`,"pathtemplate"),bugstemplate:S(({domain:r,user:s,project:o})=>`https://${r}/${s}/${o}/issues`,"bugstemplate"),hashformat:n},c={};c.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:S(({auth:r,user:s,project:o,committish:a,path:h})=>`https://${i(r,"@")}raw.githubusercontent.com/${s}/${o}/${u(a||"HEAD")}/${h}`,"filetemplate"),gittemplate:S(({auth:r,domain:s,user:o,project:a,committish:h})=>`git://${i(r,"@")}${s}/${o}/${a}.git${i("#",h)}`,"gittemplate"),tarballtemplate:S(({domain:r,user:s,project:o,committish:a})=>`https://codeload.${r}/${s}/${o}/tar.gz/${u(a||"HEAD")}`,"tarballtemplate"),extract:S(r=>{let[,s,o,a,h]=r.pathname.split("/",5);if(!(a&&a!=="tree")&&(a||(h=r.hash.slice(1)),o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!s||!o)))return{user:s,project:o,committish:h}},"extract")},c.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:S(({domain:r,user:s,project:o,committish:a,treepath:h,path:p,editpath:d})=>`https://${r}/${s}/${o}${i("/",h,"/",u(a||"HEAD"),"/",p,d)}`,"edittemplate"),tarballtemplate:S(({domain:r,user:s,project:o,committish:a})=>`https://${r}/${s}/${o}/get/${u(a||"HEAD")}.tar.gz`,"tarballtemplate"),extract:S(r=>{let[,s,o,a]=r.pathname.split("/",4);if(!["get"].includes(a)&&(o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!s||!o)))return{user:s,project:o,committish:r.hash.slice(1)}},"extract")},c.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",httpstemplate:S(({auth:r,domain:s,user:o,project:a,committish:h})=>`git+https://${i(r,"@")}${s}/${o}/${a}.git${i("#",h)}`,"httpstemplate"),tarballtemplate:S(({domain:r,user:s,project:o,committish:a})=>`https://${r}/${s}/${o}/repository/archive.tar.gz?ref=${u(a||"HEAD")}`,"tarballtemplate"),extract:S(r=>{let s=r.pathname.slice(1);if(s.includes("/-/")||s.includes("/archive.tar.gz"))return;let o=s.split("/"),a=o.pop();a.endsWith(".git")&&(a=a.slice(0,-4));let h=o.join("/");if(!(!h||!a))return{user:h,project:a,committish:r.hash.slice(1)}},"extract")},c.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:S(({domain:r,project:s,committish:o})=>`git@${r}:${s}.git${i("#",o)}`,"sshtemplate"),sshurltemplate:S(({domain:r,project:s,committish:o})=>`git+ssh://git@${r}/${s}.git${i("#",o)}`,"sshurltemplate"),edittemplate:S(({domain:r,user:s,project:o,committish:a,editpath:h})=>`https://${r}/${s}/${o}${i("/",u(a))}/${h}`,"edittemplate"),browsetemplate:S(({domain:r,project:s,committish:o})=>`https://${r}/${s}${i("/",u(o))}`,"browsetemplate"),browsetreetemplate:S(({domain:r,project:s,committish:o,path:a,hashformat:h})=>`https://${r}/${s}${i("/",u(o))}${i("#",h(a))}`,"browsetreetemplate"),browseblobtemplate:S(({domain:r,project:s,committish:o,path:a,hashformat:h})=>`https://${r}/${s}${i("/",u(o))}${i("#",h(a))}`,"browseblobtemplate"),docstemplate:S(({domain:r,project:s,committish:o})=>`https://${r}/${s}${i("/",u(o))}`,"docstemplate"),httpstemplate:S(({domain:r,project:s,committish:o})=>`git+https://${r}/${s}.git${i("#",o)}`,"httpstemplate"),filetemplate:S(({user:r,project:s,committish:o,path:a})=>`https://gist.githubusercontent.com/${r}/${s}/raw${i("/",u(o))}/${a}`,"filetemplate"),shortcuttemplate:S(({type:r,project:s,committish:o})=>`${r}:${s}${i("#",o)}`,"shortcuttemplate"),pathtemplate:S(({project:r,committish:s})=>`${r}${i("#",s)}`,"pathtemplate"),bugstemplate:S(({domain:r,project:s})=>`https://${r}/${s}`,"bugstemplate"),gittemplate:S(({domain:r,project:s,committish:o})=>`git://${r}/${s}.git${i("#",o)}`,"gittemplate"),tarballtemplate:S(({project:r,committish:s})=>`https://codeload.github.com/gist/${r}/tar.gz/${u(s||"HEAD")}`,"tarballtemplate"),extract:S(r=>{let[,s,o,a]=r.pathname.split("/",4);if(a!=="raw"){if(!o){if(!s)return;o=s,s=null}return o.endsWith(".git")&&(o=o.slice(0,-4)),{user:s,project:o,committish:r.hash.slice(1)}}},"extract"),hashformat:S(function(r){return r&&"file-"+n(r)},"hashformat")},c.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:S(({domain:r,user:s,project:o,committish:a,path:h})=>`https://${r}/${s}/${o}/blob/${u(a)||"HEAD"}/${h}`,"filetemplate"),httpstemplate:S(({domain:r,user:s,project:o,committish:a})=>`https://${r}/${s}/${o}.git${i("#",a)}`,"httpstemplate"),tarballtemplate:S(({domain:r,user:s,project:o,committish:a})=>`https://${r}/${s}/${o}/archive/${u(a)||"HEAD"}.tar.gz`,"tarballtemplate"),bugstemplate:S(()=>null,"bugstemplate"),extract:S(r=>{let[,s,o,a]=r.pathname.split("/",4);if(!["archive"].includes(a)&&(o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!s||!o)))return{user:s,project:o,committish:r.hash.slice(1)}},"extract")};for(let[r,s]of Object.entries(c))c[r]=Object.assign({},l,s);t.exports=c}),hg=J((e,t)=>{var i=require("url"),u=S((r,s,o)=>{let a=r.indexOf(o);return r.lastIndexOf(s,a>-1?a:1/0)},"lastIndexOfBefore"),n=S(r=>{try{return new i.URL(r)}catch{}},"safeUrl"),l=S((r,s)=>{let o=r.indexOf(":"),a=r.slice(0,o+1);if(Object.prototype.hasOwnProperty.call(s,a))return r;let h=r.indexOf("@");return h>-1?h>o?`git+ssh://${r}`:r:r.indexOf("//")===o+1?r:`${r.slice(0,o+1)}//${r.slice(o+1)}`},"correctProtocol"),c=S(r=>{let s=u(r,"@","#"),o=u(r,":","#");return o>s&&(r=r.slice(0,o)+"/"+r.slice(o+1)),u(r,":","#")===-1&&r.indexOf("//")===-1&&(r=`git+ssh://${r}`),r},"correctUrl");t.exports=(r,s)=>{let o=s?l(r,s):r;return n(o)||n(c(o))}}),IN=J((e,t)=>{"use strict";var i=hg(),u=S(n=>{let l=n.indexOf("#"),c=n.indexOf("/"),r=n.indexOf("/",c+1),s=n.indexOf(":"),o=/\s/.exec(n),a=n.indexOf("@"),h=!o||l>-1&&o.index>l,p=a===-1||l>-1&&a>l,d=s===-1||l>-1&&s>l,m=r===-1||l>-1&&r>l,g=c>0,f=l>-1?n[l-1]!=="/":!n.endsWith("/"),y=!n.startsWith(".");return h&&g&&f&&y&&p&&d&&m},"isGitHubShorthand");t.exports=(n,l,{gitHosts:c,protocols:r})=>{if(!n)return;let s=u(n)?`github:${n}`:n,o=i(s,r);if(!o)return;let a=c.byShortcut[o.protocol],h=c.byDomain[o.hostname.startsWith("www.")?o.hostname.slice(4):o.hostname],p=a||h;if(!p)return;let d=c[a||h],m=null;r[o.protocol]?.auth&&(o.username||o.password)&&(m=`${o.username}${o.password?":"+o.password:""}`);let g=null,f=null,y=null,v=null;try{if(a){let E=o.pathname.startsWith("/")?o.pathname.slice(1):o.pathname,b=E.indexOf("@");b>-1&&(E=E.slice(b+1));let w=E.lastIndexOf("/");w>-1?(f=decodeURIComponent(E.slice(0,w)),f||(f=null),y=decodeURIComponent(E.slice(w+1))):y=decodeURIComponent(E),y.endsWith(".git")&&(y=y.slice(0,-4)),o.hash&&(g=decodeURIComponent(o.hash.slice(1))),v="shortcut"}else{if(!d.protocols.includes(o.protocol))return;let E=d.extract(o);if(!E)return;f=E.user&&decodeURIComponent(E.user),y=decodeURIComponent(E.project),g=decodeURIComponent(E.committish),v=r[o.protocol]?.name||o.protocol.slice(0,-1)}}catch(E){if(E instanceof URIError)return;throw E}return[p,f,m,y,g,v,l]}}),TN=J((e,t)=>{"use strict";var{LRUCache:i}=ig(),u=CN(),n=IN(),l=hg(),c=new i({max:1e3});function r(o){try{let{protocol:a,hostname:h,pathname:p}=new URL(o);if(!h)return null;let d=/(?:git\+)http:$/.test(a)?"http:":"https:",m=p.replace(/\.git$/,"");return`${d}//${h}${m}`}catch{return null}}S(r,"unknownHostedUrl");var s=class gt{static{S(this,"GitHost")}constructor(a,h,p,d,m,g,f={}){Object.assign(this,gt.#e[a],{type:a,user:h,auth:p,project:d,committish:m,default:g,opts:f})}static#e={byShortcut:{},byDomain:{}};static#t={"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(a,h){gt.#e[a]=h,gt.#e.byDomain[h.domain]=a,gt.#e.byShortcut[`${a}:`]=a,gt.#t[`${a}:`]={name:a}}static fromUrl(a,h){if(typeof a!="string")return;let p=a+JSON.stringify(h||{});if(!c.has(p)){let d=n(a,h,{gitHosts:gt.#e,protocols:gt.#t});c.set(p,d?new gt(...d):void 0)}return c.get(p)}static fromManifest(a,h={}){if(!a||typeof a!="object")return;let p=a.repository,d=p&&(typeof p=="string"?p:typeof p=="object"&&typeof p.url=="string"?p.url:null);if(!d)throw new Error("no repository");let m=d&&gt.fromUrl(d.replace(/^git\+/,""),h)||null;if(m)return m;let g=r(d);return gt.fromUrl(g,h)||g}static parseUrl(a){return l(a)}#r(a,h){if(typeof a!="function")return null;let p={...this,...this.opts,...h};p.path||(p.path=""),p.path.startsWith("/")&&(p.path=p.path.slice(1)),p.noCommittish&&(p.committish=null);let d=a(p);return p.noGitPlus&&d.startsWith("git+")?d.slice(4):d}hash(){return this.committish?`#${this.committish}`:""}ssh(a){return this.#r(this.sshtemplate,a)}sshurl(a){return this.#r(this.sshurltemplate,a)}browse(a,...h){return typeof a!="string"?this.#r(this.browsetemplate,a):typeof h[0]!="string"?this.#r(this.browsetreetemplate,{...h[0],path:a}):this.#r(this.browsetreetemplate,{...h[1],fragment:h[0],path:a})}browseFile(a,...h){return typeof h[0]!="string"?this.#r(this.browseblobtemplate,{...h[0],path:a}):this.#r(this.browseblobtemplate,{...h[1],fragment:h[0],path:a})}docs(a){return this.#r(this.docstemplate,a)}bugs(a){return this.#r(this.bugstemplate,a)}https(a){return this.#r(this.httpstemplate,a)}git(a){return this.#r(this.gittemplate,a)}shortcut(a){return this.#r(this.shortcuttemplate,a)}path(a){return this.#r(this.pathtemplate,a)}tarball(a){return this.#r(this.tarballtemplate,{...a,noCommittish:!1})}file(a,h){return this.#r(this.filetemplate,{...h,path:a})}edit(a,h){return this.#r(this.edittemplate,{...h,path:a})}getDefaultRepresentation(){return this.default}toString(a){return this.default&&typeof this[this.default]=="function"?this[this.default](a):this.sshurl(a)}};for(let[o,a]of Object.entries(u))s.addHost(o,a);t.exports=s}),pg=J((e,t)=>{"use strict";var{builtinModules:i}=require("module"),u=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),n=["node_modules","favicon.ico"];function l(r){var s=[],o=[];if(r===null)return o.push("name cannot be null"),c(s,o);if(r===void 0)return o.push("name cannot be undefined"),c(s,o);if(typeof r!="string")return o.push("name must be a string"),c(s,o);if(r.length||o.push("name length must be greater than zero"),r.startsWith(".")&&o.push("name cannot start with a period"),r.match(/^_/)&&o.push("name cannot start with an underscore"),r.trim()!==r&&o.push("name cannot contain leading or trailing spaces"),n.forEach(function(d){r.toLowerCase()===d&&o.push(d+" is not a valid package name")}),i.includes(r.toLowerCase())&&s.push(r+" is a core module name"),r.length>214&&s.push("name can no longer contain more than 214 characters"),r.toLowerCase()!==r&&s.push("name can no longer contain capital letters"),/[~'!()*]/.test(r.split("/").slice(-1)[0])&&s.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(r)!==r){var a=r.match(u);if(a){var h=a[1],p=a[2];if(p.startsWith(".")&&o.push("name cannot start with a period"),encodeURIComponent(h)===h&&encodeURIComponent(p)===p)return c(s,o)}o.push("name can only contain URL-friendly characters")}return c(s,o)}S(l,"validate");var c=S(function(r,s){var o={validForNewPackages:s.length===0&&r.length===0,validForOldPackages:s.length===0,warnings:r,errors:s};return o.warnings.length||delete o.warnings,o.errors.length||delete o.errors,o},"done");t.exports=l}),PN=J((e,t)=>{"use strict";var i=process.platform==="win32",{URL:u}=require("url"),n=i?require("path"):require("path"),{homedir:l}=require("os"),c=TN(),r=Ir(),s=pg(),{log:o}=yt(),a=i?/\\|[/]/:/[/]/,h=/^(?:git[+])?[a-z]+:/i,p=/^[^@]+@[^:.]+\.[^:]+:.+$/i,d=/[.](?:tgz|tar.gz|tar)$/i,m=/:[0-9]+(\/|$)/i,g=/^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/,f=/^(?:[.]|~[/]|[/]|[a-zA-Z]:)/,y="https://registry.npmjs.org";function v(x,k){let T,C;if(typeof x=="object")return x instanceof P&&(!k||k===x.where)?x:x.name&&x.rawSpec?v.resolve(x.name,x.rawSpec,k||x.where):v(x.raw,k||x.where);let q=x.indexOf("@",1),X=q>0?x.slice(0,q):x;return h.test(x)?C=x:p.test(x)?C=`git+ssh://${x}`:!X.startsWith("@")&&(a.test(X)||d.test(X))?C=x:q>0?(T=X,C=x.slice(q+1)||"*"):s(x).validForOldPackages?(T=x,C="*"):C=x,w(T,C,k,x)}S(v,"npa");function E(x){return x?x.toLowerCase().startsWith("file:")?!0:i?g.test(x):f.test(x):!1}S(E,"isFileSpec");function b(x){return x?x.toLowerCase().startsWith("npm:"):!1}S(b,"isAliasSpec");function w(x,k,T,C){let q=new P({raw:C,name:x,rawSpec:k,fromArgument:C!=null});if(x&&(q.name=x),T||(T=process.cwd()),E(k))return M(q,T);if(b(k))return H(q,T);let X=c.fromUrl(k,{noGitPlus:!0,noCommittish:!0});return X?B(q,X):k&&h.test(k)?D(q):k&&(a.test(k)||d.test(k))?M(q,T):G(q)}S(w,"resolve");function _(x,k=y){let T=v(x);if(T.type!=="version")throw I(T.type,T.raw);let C="pkg:npm/"+T.name.replace(/^@/,"%40")+"@"+T.rawSpec;return k!==y&&(C+="?repository_url="+k),C}S(_,"toPurl");function O(x,k,T){let C=new Error(`Invalid package name "${x}" of package "${T}": ${k.errors.join("; ")}.`);return C.code="EINVALIDPACKAGENAME",C}S(O,"invalidPackageName");function A(x,k){let T=new Error(`Invalid tag name "${x}" of package "${k}": Tags may not have any characters that encodeURIComponent encodes.`);return T.code="EINVALIDTAGNAME",T}S(A,"invalidTagName");function I(x,k){let T=new Error(`Invalid type "${x}" of package "${k}": Purl can only be generated for "version" types.`);return T.code="EINVALIDPURLTYPE",T}S(I,"invalidPurlType");var P=class{static{S(this,"Result")}constructor(x){this.type=x.type,this.registry=x.registry,this.where=x.where,x.raw==null?this.raw=x.name?`${x.name}@${x.rawSpec}`:x.rawSpec:this.raw=x.raw,this.name=void 0,this.escapedName=void 0,this.scope=void 0,this.rawSpec=x.rawSpec||"",this.saveSpec=x.saveSpec,this.fetchSpec=x.fetchSpec,x.name&&this.setName(x.name),this.gitRange=x.gitRange,this.gitCommittish=x.gitCommittish,this.gitSubdir=x.gitSubdir,this.hosted=x.hosted}setName(x){let k=s(x);if(!k.validForOldPackages)throw O(x,k,this.raw);return this.name=x,this.scope=x[0]==="@"?x.slice(0,x.indexOf("/")):void 0,this.escapedName=x.replace("/","%2f"),this}toString(){let x=[];this.name!=null&&this.name!==""&&x.push(this.name);let k=this.saveSpec||this.fetchSpec||this.rawSpec;return k!=null&&k!==""&&x.push(k),x.length?x.join("@"):this.raw}toJSON(){let x=Object.assign({},this);return delete x.hosted,x}};function L(x,k){if(!k){x.gitCommittish=null;return}for(let T of k.split("::")){if(!T.includes(":")){if(x.gitRange)throw new Error("cannot override existing semver range with a committish");if(x.gitCommittish)throw new Error("cannot override existing committish with a second committish");x.gitCommittish=T;continue}let[C,q]=T.split(":");if(C==="semver"){if(x.gitCommittish)throw new Error("cannot override existing committish with a semver range");if(x.gitRange)throw new Error("cannot override existing semver range with a second semver range");x.gitRange=decodeURIComponent(q);continue}if(C==="path"){if(x.gitSubdir)throw new Error("cannot override existing path with a second path");x.gitSubdir=`/${q}`;continue}o.warn("npm-package-arg",`ignoring unknown key "${C}"`)}}S(L,"setGitAttrs");var j=new Map([["\0","%00"],[" ","%09"],[`
29
- `,"%0A"],["\r","%0D"],[" ","%20"],['"',"%22"],["#","%23"],["%","%25"],["?","%3F"],["[","%5B"],["\\",i?"/":"%5C"],["]","%5D"],["^","%5E"],["|","%7C"],["~","%7E"]]);function N(x){let k="";for(let T=0;T<x.length;T++)k=`${k}${j.get(x[T])??x[T]}`;return k.startsWith("file:")?k:`file:${k}`}S(N,"pathToFileURL");function M(x,k){x.type=d.test(x.rawSpec)?"file":"directory",x.where=k;let T=N(x.rawSpec);T.startsWith("file:/")&&(/^file:\/\/[^/]/.test(T)&&(T=`file:/${T.slice(5)}`),/^\/{1,3}\.\.?(\/|$)/.test(T.slice(5))&&(T=T.replace(/^file:\/{1,3}/,"file:")));let C,q;try{C=new u(T,`${N(n.resolve(k))}/`),q=new u(T)}catch($){let V=new Error("Invalid file: URL, must comply with RFC 8089");throw Object.assign(V,{raw:x.rawSpec,spec:x,where:k,originalError:$})}let X=decodeURIComponent(q.pathname),Y=decodeURIComponent(C.pathname);return i&&(X=X.replace(/^\/+([a-z]:\/)/i,"$1"),Y=Y.replace(/^\/+([a-z]:\/)/i,"$1")),/^\/~(\/|$)/.test(X)?(x.saveSpec=`file:${X.substr(1)}`,Y=n.resolve(l(),X.substr(3))):n.isAbsolute(T.slice(5))?x.saveSpec=`file:${n.resolve(Y)}`:x.saveSpec=`file:${n.relative(k,Y)}`,x.fetchSpec=n.resolve(k,Y),x.saveSpec=x.saveSpec.split("\\").join("/"),x.saveSpec.startsWith("file://")&&(x.saveSpec=`file:/${x.saveSpec.slice(7)}`),x}S(M,"fromFile");function B(x,k){return x.type="git",x.hosted=k,x.saveSpec=k.toString({noGitPlus:!1,noCommittish:!1}),x.fetchSpec=k.getDefaultRepresentation()==="shortcut"?null:k.toString(),L(x,k.committish),x}S(B,"fromHostedGit");function F(x,k){let T=new Error(`Unsupported URL Type "${x}": ${k}`);return T.code="EUNSUPPORTEDPROTOCOL",T}S(F,"unsupportedURLType");function D(x){let k=x.rawSpec;if(x.saveSpec=k,k.startsWith("git+ssh:")){let C=k.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i);if(C&&!C[1].match(m))return x.type="git",L(x,C[2]),x.fetchSpec=C[1],x}else k.startsWith("git+file://")&&(k=k.replace(/\\/g,"/"));let T=new u(k);switch(T.protocol){case"git:":case"git+http:":case"git+https:":case"git+rsync:":case"git+ftp:":case"git+file:":case"git+ssh:":x.type="git",L(x,T.hash.slice(1)),T.protocol==="git+file:"&&/^git\+file:\/\/[a-z]:/i.test(k)?x.fetchSpec=`git+file://${T.host.toLowerCase()}:${T.pathname}`:(T.hash="",x.fetchSpec=T.toString()),x.fetchSpec.startsWith("git+")&&(x.fetchSpec=x.fetchSpec.slice(4));break;case"http:":case"https:":x.type="remote",x.fetchSpec=x.saveSpec;break;default:throw F(T.protocol,k)}return x}S(D,"fromURL");function H(x,k){let T=v(x.rawSpec.substr(4),k);if(T.type==="alias")throw new Error("nested aliases not supported");if(!T.registry)throw new Error("aliases only work for registry deps");if(!T.name)throw new Error("aliases must have a name");return x.subSpec=T,x.registry=!0,x.type="alias",x.saveSpec=null,x.fetchSpec=null,x}S(H,"fromAlias");function G(x){x.registry=!0;let k=x.rawSpec.trim();x.saveSpec=null,x.fetchSpec=k;let T=r.valid(k,!0),C=r.validRange(k,!0);if(T)x.type="version";else if(C)x.type="range";else{if(encodeURIComponent(k)!==k)throw A(k,x.raw);x.type="tag"}return x}S(G,"fromRegistry"),t.exports=v,t.exports.resolve=w,t.exports.toPurl=_,t.exports.Result=P}),xN=J((e,t)=>{var i=require("process"),u=require("os"),n=require("fs");function l(m){return m.includes("libc.musl-")||m.includes("ld-musl-")}S(l,"isMusl");function c(){return i.platform}S(c,"os");function r(){return i.arch}S(r,"cpu");var s="/usr/bin/ldd";function o(){try{let m=n.readFileSync(s,"utf-8");return m.includes("musl")?"musl":m.includes("GNU C Library")?"glibc":null}catch{return}}S(o,"getFamilyFromFilesystem");function a(){let m=i.report.excludeNetwork;i.report.excludeNetwork=!0;let g=i.report.getReport();return i.report.excludeNetwork=m,g.header?.glibcVersionRuntime?h="glibc":Array.isArray(g.sharedObjects)&&g.sharedObjects.some(l)?h="musl":h=null,h}S(a,"getFamilyFromReport");var h;function p(m){if(m==="linux")return h===void 0&&(h=o(),h===void 0&&(h=a())),h}S(p,"libc");function d(m={}){let g=m.os||c();return{cpu:{name:m.cpu||r()},libc:{name:m.libc||p(g)},os:{name:g,version:m.osVersion||u.release()},packageManager:{name:"npm",version:m.npmVersion},runtime:{name:"node",version:m.nodeVersion||i.version}}}S(d,"devEngines"),t.exports={cpu:r,libc:p,os:c,devEngines:d}}),NN=J((e,t)=>{var i=ys(),u=cg(),n=["ignore","warn","error","download"],l=["name","version","onFail"],c=["packageManager","runtime","cpu","libc","os"];function r(o,a,h){let{engine:p}=h;if(typeof o!="object"||o===null||Array.isArray(o))throw new Error(`Invalid non-object value for "${p}"`);let d=Object.keys(o);for(let m of d)if(!l.includes(m))throw new Error(`Invalid property "${m}" for "${p}"`);if(!d.includes("name"))throw new Error(`Missing "name" property for "${p}"`);if(typeof o.name!="string")throw new Error(`Invalid non-string value for "name" within "${p}"`);if(typeof a.name!="string"||a.name==="")throw new Error(`Unable to determine "name" for "${p}"`);if(d.includes("onFail")){if(typeof o.onFail!="string")throw new Error(`Invalid non-string value for "onFail" within "${p}"`);if(!n.includes(o.onFail))throw new Error(`Invalid onFail value "${o.onFail}" for "${p}"`)}if(o.name!==a.name)return new Error(`Invalid name "${o.name}" does not match "${a.name}" for "${p}"`);if(d.includes("version")){if(typeof o.version!="string")throw new Error(`Invalid non-string value for "version" within "${p}"`);if(typeof a.version!="string"||a.version==="")throw new Error(`Unable to determine "version" for "${p}" "${o.name}"`);if(u(o.version)){if(!i(a.version,o.version,h.semver))return new Error(`Invalid semver version "${o.version}" does not match "${a.version}" for "${p}"`)}else if(o.version!==a.version)return new Error(`Invalid version "${o.version}" does not match "${a.version}" for "${p}"`)}}S(r,"checkDependency");function s(o,a={},h={}){if(typeof o!="object"||o===null||Array.isArray(o))throw new Error('Invalid non-object value for "devEngines"');let p=[];for(let d of Object.keys(o)){if(!c.includes(d))throw new Error(`Invalid property "devEngines.${d}"`);let m=o[d],g=[m].flat(),f=a[d]||{};if(g.length===0)continue;let y=[];for(let v of g){let E=r(v,f,{...h,engine:d});E&&y.push(E)}if(y.length===g.length){let v=g[g.length-1].onFail||"error";v==="download"&&(v="error");let E=Object.assign(new Error(`Invalid devEngines.${d}`),{errors:y,engine:d,isWarn:v==="warn",isError:v==="error",current:f,required:m});p.push(E)}}return p}S(s,"checkDevEngines"),t.exports={checkDevEngines:s}}),kN=J((e,t)=>{var i=Ir(),u=xN(),{checkDevEngines:n}=NN(),l=S((s,o,a,h=!1)=>{let p=h?null:a,d=s.engines,m={includePrerelease:!0};if(!d)return;let g=p&&d.node&&!i.satisfies(p,d.node,m),f=o&&d.npm&&!i.satisfies(o,d.npm,m);if(g||f)throw Object.assign(new Error("Unsupported engine"),{pkgid:s._id,current:{node:a,npm:o},required:d,code:"EBADENGINE"})},"checkEngine"),c=S((s,o=!1,a={})=>{if(o)return;let h=a.os||u.os(),p=a.cpu||u.cpu(),d=a.libc||u.libc(h),m=s.os?r(h,s.os):!0,g=s.cpu?r(p,s.cpu):!0,f=s.libc?r(d,s.libc):!0;if(s.libc&&!d&&(f=!1),!m||!g||!f)throw Object.assign(new Error("Unsupported platform"),{pkgid:s._id,current:{os:h,cpu:p,libc:d},required:{os:s.os,cpu:s.cpu,libc:s.libc},code:"EBADPLATFORM"})},"checkPlatform"),r=S((s,o)=>{if(typeof o=="string"&&(o=[o]),o.length===1&&o[0]==="any")return!0;let a=0,h=!1;for(let p of o){let d=p.charAt(0)==="!",m=d?p.slice(1):p;if(d){if(a++,s===m)return!1}else h=h||s===m}return h||a===o.length},"checkList");t.exports={checkEngine:l,checkPlatform:c,checkDevEngines:n,currentEnv:u}}),ql=J((e,t)=>{var{join:i,basename:u}=require("path"),n=S(o=>o.bin?typeof o.bin=="string"?l(o):Array.isArray(o.bin)?c(o):typeof o.bin=="object"?s(o):r(o):r(o),"normalize"),l=S(o=>o.name?(o.bin={[o.name]:o.bin},s(o)):r(o),"normalizeString"),c=S(o=>(o.bin=o.bin.reduce((a,h)=>(a[u(h)]=h,a),{}),s(o)),"normalizeArray"),r=S(o=>(delete o.bin,o),"removeBin"),s=S(o=>{let a=o.bin,h={},p=!1;return Object.keys(a).forEach(d=>{let m=i("/",u(d.replace(/\\|:/g,"/"))).slice(1);if(typeof a[d]!="string"||!m)return;let g=i("/",a[d].replace(/\\/g,"/")).replace(/\\/g,"/").slice(1);g&&(h[m]=g,p=!0)}),p?o.bin=h:delete o.bin,o},"normalizeObject");t.exports=n}),Kl=J((e,t)=>{"use strict";var i=PN(),u=Ir(),{checkEngine:n}=kN(),l=ql(),c=S((p,d,m)=>{try{return n(p,d,m),!0}catch{return!1}},"engineOk"),r=S((p,d,m)=>!p||!p[d]||Date.parse(p[d])<=m,"isBefore"),s={includePrerelease:!0,loose:!0},o=S((p,d)=>d&&u.satisfies(p,d,s),"shouldAvoid"),a=S((p,d)=>p&&o(p.version,d)?{...p,_shouldAvoid:!0}:p,"decorateAvoid"),h=S((p,d,m)=>{let{defaultTag:g="latest",before:f=null,nodeVersion:y=process.version,npmVersion:v=null,includeStaged:E=!1,avoid:b=null,avoidStrict:w=!1}=m,{name:_,time:O}=p,A=p.versions||{};if(w){let G={...m,avoidStrict:!1},x=h(p,d,G);if(!x||!x._shouldAvoid)return x;let k=h(p,`^${x.version}`,G);if(!k||!k._shouldAvoid)return{...k,_outsideDependencyRange:!0,_isSemVerMajor:!1};let T=h(p,"*",G);if(!T||!T._shouldAvoid)return{...T,_outsideDependencyRange:!0,_isSemVerMajor:!0};throw Object.assign(new Error(`No avoidable versions for ${_}`),{code:"ETARGET",name:_,wanted:d,avoid:b,before:f,versions:Object.keys(A)})}let I=E&&p.stagedVersions&&p.stagedVersions.versions||{},P=p.policyRestrictions&&p.policyRestrictions.versions||{},L=f&&O?+new Date(f):1/0,j=i.resolve(_,d||g).type,N=p["dist-tags"]||{};if(j!=="tag"&&j!=="version"&&j!=="range")throw new Error("Only tag, version, and range are supported");if(d&&j==="tag"){let G=N[d];return r(O,G,L)?a(A[G]||I[G]||P[G],b):h(p,`<=${G}`,m)}if(d&&j==="version"){let G=u.clean(d,{loose:!0}),x=A[G]||I[G]||P[G];return r(O,G,L)?a(x,b):null}let M=j==="range"?d:"*",B=N[g];if(B&&(M==="*"||u.satisfies(B,M,{loose:!0}))&&!P[B]&&!o(B,b)){let G=A[B];if(G&&r(O,B,L)&&c(G,v,y)&&!G.deprecated&&!I[B])return G}let F=Object.entries(A).concat(Object.entries(I)).concat(Object.entries(P)).filter(([G])=>r(O,G,L));if(!F.length)throw Object.assign(new Error(`No versions available for ${_}`),{code:"ENOVERSIONS",name:_,type:j,wanted:d,before:f,versions:Object.keys(A)});let D={loose:!0},H=F.filter(([G])=>u.satisfies(G,M,{loose:!0})).sort((G,x)=>{let[k,T]=G,[C,q]=x,X=!o(k,b),Y=!o(C,b),$=!P[k],V=!P[C],z=!I[k],U=!I[C],K=!T.deprecated,Z=!q.deprecated,Q=c(T,v,y),R=c(q,v,y);return Y-X||V-$||U-z||(Z&&R)-(K&&Q)||R-Q||Z-K||u.rcompare(k,C,D)});return a(H[0]&&H[0][1],b)},"pickManifest");t.exports=(p,d,m={})=>{let g=h(p,d,m),f=g&&l(g),y=p.policyRestrictions,v=y&&y.versions||{};if(f&&!v[f.version])return f;let{before:E=null,defaultTag:b="latest"}=m,w=E?new Date(E).toLocaleString():"",{name:_}=p,O=`${_}@${d}`+(E?` with a date before ${w}`:""),A=f&&!!v[f.version],I=A?y.message:"",P=A?`Could not download ${O} due to policy violations:
30
- ${I}`:`No matching version found for ${O}.`,L=A?"E403":"ETARGET";throw Object.assign(new Error(P),{code:L,type:i.resolve(p.name,d).type,wanted:d,versions:Object.keys(p.versions??{}),name:_,distTags:p["dist-tags"],defaultTag:b})}}),LN=J((e,t)=>{var i=new Set(["github.com","gist.github.com","gitlab.com","bitbucket.com","bitbucket.org"]),{parse:u}=require("url"),n=require("path"),l=ug(),c=Yi(),{isWindows:r}=AN(),s=Kl(),o=require("internal/fs/promises");t.exports=(E,b="HEAD",w=null,_={})=>l(E,_).then(O=>p(E,O,b,d(O,b,_),w||h(E,_.cwd),_));var a=S((E,b)=>b.gitShallow===!1||b.gitShallow?b.gitShallow:i.has(u(E).host),"maybeShallow"),h=S((E,b=process.cwd())=>n.resolve(b,n.basename(E.replace(/[/\\]?\.git$/,""))),"defaultTarget"),p=S((E,b,w,_,O,A)=>_?_.sha===b.refs.HEAD.sha?f(E,_,O,A):_.type==="tag"||_.type==="branch"?g(E,_,O,A):m(E,_,O,A):v(E,w,O,A),"clone"),d=S((E,b,w)=>{let{spec:_={}}=w;return b=_.gitCommittish||b,E?_.gitRange?s(E,_.gitRange,w):b?E.refs[b]?E.refs[b]:E.shas[b]?E.refs[E.shas[b][0]]:null:E.refs.HEAD:null},"resolveRef"),m=S((E,b,w,_)=>{let O=a(E,_),A=["fetch","origin",b.rawRef].concat(O?["--depth=1"]:[]),I=S(P=>c(P,{..._,cwd:w}),"git");return o.mkdir(w,{recursive:!0}).then(()=>I(["init"])).then(()=>r(_)?I(["config","--local","--add","core.longpaths","true"]):null).then(()=>I(["remote","add","origin",E])).then(()=>I(A)).then(()=>I(["checkout",b.sha])).then(()=>y(w,_)).then(()=>b.sha)},"other"),g=S((E,b,w,_)=>{let O=["clone","-b",b.ref,E,w,"--recurse-submodules"];return a(E,_)&&O.push("--depth=1"),r(_)&&O.push("--config","core.longpaths=true"),c(O,_).then(()=>b.sha)},"branch"),f=S((E,b,w,_)=>{let O=["clone",E,w,"--recurse-submodules"];return a(E,_)&&O.push("--depth=1"),r(_)&&O.push("--config","core.longpaths=true"),c(O,_).then(()=>b.sha)},"plain"),y=S(async(E,b)=>await o.stat(`${E}/.gitmodules`).then(()=>!0).catch(()=>!1)?c(["submodule","update","-q","--init","--recursive"],{...b,cwd:E}):null,"updateSubmodules"),v=S((E,b,w,_)=>{let O=r(_)?["--config","core.longpaths=true"]:[],A=["clone","--mirror","-q",E,w+"/.git"],I=S(P=>c(P,{..._,cwd:w}),"git");return o.mkdir(w,{recursive:!0}).then(()=>I(A.concat(O))).then(()=>I(["init"])).then(()=>I(["checkout",b])).then(()=>y(w,_)).then(()=>I(["rev-parse","--revs-only","HEAD"])).then(({stdout:P})=>P.trim())},"unresolved")}),dg=J((e,t)=>{var{stat:i}=require("internal/fs/promises");t.exports=({cwd:u=process.cwd()}={})=>i(u+"/.git").then(()=>!0,()=>!1)}),DN=J((e,t)=>{var i=dg(),{dirname:u}=require("path");t.exports=async({cwd:n=process.cwd(),root:l}={})=>{for(;;){if(await i({cwd:n}))return n;let c=u(n);if(n===l||n===c)return null;n=c}}}),$N=J((e,t)=>{var i=Yi();t.exports=(u={})=>i(["status","--porcelain=v1","-uno"],u).then(n=>!n.stdout.trim().split(/\r?\n+/).map(l=>l.trim()).filter(l=>l).length)}),fg=J((e,t)=>{t.exports={clone:LN(),revs:ug(),spawn:Yi(),is:dg(),find:DN(),isClean:$N(),errors:sg()}}),jN=J((e,t)=>{var i=Hf(),u=Gf(),n=require("internal/fs/promises"),l=require("path"),{log:c}=yt(),r=require("module"),s;function o(){return s||(s=Ul()),s}S(o,"lazyHostedGitInfo");var a;function h(){return a||(a=Qf().glob),a}S(h,"lazyLoadGlob");function p(_,O){if(_.bin&&(typeof _.bin=="string"&&_.name?(O?.push('"bin" was converted to an object'),_.bin={[_.name]:_.bin}):Array.isArray(_.bin)&&(O?.push('"bin" was converted to an object'),_.bin=_.bin.reduce((A,I)=>(A[l.basename(I)]=I,A),{})),typeof _.bin=="object")){for(let A in _.bin){if(typeof _.bin[A]!="string"){delete _.bin[A],O?.push(`removed invalid "bin[${A}]"`);continue}let I=l.basename(y(A));if(!I){delete _.bin[A],O?.push(`removed invalid "bin[${A}]"`);continue}let P=y(_.bin[A]);if(!P){delete _.bin[A],O?.push(`removed invalid "bin[${A}]"`);continue}I!==A&&(delete _.bin[A],O?.push(`"bin[${A}]" was renamed to "bin[${I}]"`)),P!==_.bin[A]&&O?.push(`"bin[${I}]" script name ${P} was invalid and removed`),_.bin[I]=P}return Object.keys(_.bin).length===0&&(O?.push('empty "bin" was removed'),delete _.bin),_}delete _.bin}S(p,"normalizePackageBin");function d(_,O){if(_.man){let A=[];for(let I of Array.isArray(_.man)?_.man:[_.man])typeof I!="string"?O?.push(`removed invalid "man [${I}]"`):A.push(y(I));if(!A.length)O?.push('empty "man" was removed');else return _.man=A,_}delete _.man}S(d,"normalizePackageMan");function m(_){return!_.match(/[/@\s+%:]/)&&_===encodeURIComponent(_)}S(m,"isCorrectlyEncodedName");function g(_){if(_.charAt(0)!=="@")return!1;let O=_.slice(1).split("/");return O.length!==2?!1:O[0]&&O[1]&&O[0]===encodeURIComponent(O[0])&&O[1]===encodeURIComponent(O[1])}S(g,"isValidScopedPackageName");function f(_){return _.replace(/\\|:/g,"/")}S(f,"unixifyPath");function y(_){let O=f(l.join(".",l.join("/",f(_))));return O.startsWith("./")?"":O}S(y,"secureAndUnixifyPath");function v(_,{strict:O,steps:A,changes:I,allowLegacyCase:P}){let L=_.content,j=`${L.name??""}@${L.version??""}`;if(A.includes("fixName")||A.includes("fixNameField")||A.includes("normalizeData"))if(!L.name&&!O)I?.push('Missing "name" field was set to an empty string'),L.name="";else{if(typeof L.name!="string")throw new Error("name field must be a string.");if(!O){let N=L.name.trim();L.name!==N&&(I?.push('Whitespace was trimmed from "name"'),L.name=N)}if(L.name.startsWith(".")||!(g(L.name)||m(L.name))||O&&!P&&L.name!==L.name.toLowerCase()||L.name.toLowerCase()==="node_modules"||L.name.toLowerCase()==="favicon.ico")throw new Error("Invalid name: "+JSON.stringify(L.name))}if(A.includes("fixName")&&r.builtinModules.includes(L.name)&&c.warn("package-json",j,`Package name "${L.name}" conflicts with a Node.js built-in module name`),A.includes("fixVersionField")||A.includes("normalizeData")){let N=!O;if(!L.version)L.version="";else{if(!i(L.version,N))throw new Error(`Invalid version: "${L.version}"`);let M=u(L.version,N);M!==L.version&&(I?.push(`"version" was cleaned and set to "${M}"`),L.version=M)}}if(A.includes("_attributes"))for(let N in L)N.startsWith("_")&&(I?.push(`"${N}" was removed`),delete _.content[N]);if(A.includes("_id")&&L.name&&L.version&&(I?.push(`"_id" was set to ${j}`),L._id=j),A.includes("bundledDependencies")&&(L.bundleDependencies===void 0&&L.bundledDependencies!==void 0&&(L.bundleDependencies=L.bundledDependencies,I?.push('Deleted incorrect "bundledDependencies"')),delete L.bundledDependencies),A.includes("bundleDependencies")){let N=L.bundleDependencies;N===!1&&!A.includes("bundleDependenciesDeleteFalse")?(I?.push('"bundleDependencies" was changed from "false" to "[]"'),L.bundleDependencies=[]):N===!0?(I?.push('"bundleDependencies" was auto-populated from "dependencies"'),L.bundleDependencies=Object.keys(L.dependencies||{})):N&&typeof N=="object"?Array.isArray(N)||(I?.push('"bundleDependencies" was changed from an object to an array'),L.bundleDependencies=Object.keys(N)):"bundleDependencies"in L&&(I?.push('"bundleDependencies" was removed'),delete L.bundleDependencies)}if(A.includes("optionalDedupe")&&L.dependencies&&L.optionalDependencies&&typeof L.optionalDependencies=="object"){for(let N in L.optionalDependencies)I?.push(`optionalDependencies."${N}" was removed`),delete L.dependencies[N];Object.keys(L.dependencies).length||(I?.push('Empty "optionalDependencies" was removed'),delete L.dependencies)}if((A.includes("scripts")||A.includes("scriptpath"))&&L.scripts!==void 0){let N=/^(\.[/\\])?node_modules[/\\].bin[\\/]/;if(typeof L.scripts=="object")for(let M in L.scripts)typeof L.scripts[M]!="string"?(delete L.scripts[M],I?.push(`Invalid scripts."${M}" was removed`)):A.includes("scriptpath")&&N.test(L.scripts[M])&&(L.scripts[M]=L.scripts[M].replace(N,""),I?.push(`scripts entry "${M}" was fixed to remove node_modules/.bin reference`));else I?.push('Removed invalid "scripts"'),delete L.scripts}if(A.includes("funding")&&L.funding&&typeof L.funding=="string"&&(L.funding={url:L.funding},I?.push('"funding" was changed to an object with a url attribute')),(A.includes("fixRepositoryField")||A.includes("normalizeData"))&&(L.repositories&&(I?.push(`"repository" was set to the first entry in "repositories" (${L.repository})`),L.repository=L.repositories[0]),L.repository&&(typeof L.repository=="string"&&(I?.push('"repository" was changed from a string to an object'),L.repository={type:"git",url:L.repository}),L.repository.url))){let N=o().fromUrl(L.repository.url),M;N&&(N.getDefaultRepresentation()==="shortcut"?M=N.https():M=N.toString(),M!==L.repository.url&&(I?.push(`"repository.url" was normalized to "${M}"`),L.repository.url=M))}if(A.includes("fixDependencies")||A.includes("normalizeData")){for(let N of["dependencies","devDependencies","optionalDependencies"])if(L[N]){let M=!0;if(typeof L[N]=="string"&&(I?.push(`"${N}" was converted from a string into an object`),L[N]=L[N].trim().split(/[\n\r\s\t ,]+/),M=!1),Array.isArray(L[N])){M&&I?.push(`"${N}" was converted from an array into an object`);let B={};for(let F of L[N])if(typeof F=="string"){let D=F.trim().split(/(:?[@\s><=])/),H=D.shift(),G=D.join("").replace(/^@/,"").trim();B[H]=G}L[N]=B}}for(let N of["dependencies","devDependencies"])if(N in L)if(!L[N]||typeof L[N]!="object")I?.push(`Removed invalid "${N}"`),delete L[N];else for(let M in L[N]){typeof L[N][M]!="string"&&(I?.push(`Removed invalid "${N}.${M}"`),delete L[N][M]);let B=o().fromUrl(L[N][M])?.toString();B&&B!==L[N][M]&&(I?.push(`Normalized git reference to "${N}.${M}"`),L[N][M]=B.toString())}}if(A.includes("normalizeData")){let{normalizeData:N}=Vx();N(L,I)}}S(v,"syncSteps");async function E(_,{steps:O,root:A,changes:I}){let P=_.content,L=P.scripts||{},j=`${P.name??""}@${P.version??""}`;if(O.includes("gypfile")&&!L.install&&!L.preinstall&&P.gypfile!==!1&&(await h()("*.gyp",{cwd:_.path})).length&&(L.install="node-gyp rebuild",P.scripts=L,P.gypfile=!0,I?.push('"scripts.install" was set to "node-gyp rebuild"'),I?.push('"gypfile" was set to "true"')),O.includes("serverjs")&&!L.start)try{await n.access(l.join(_.path,"server.js")),L.start="node server.js",P.scripts=L,I?.push('"scripts.start" was set to "node server.js"')}catch{}if(O.includes("authors")&&!P.contributors)try{let N=(await n.readFile(l.join(_.path,"AUTHORS"),"utf8")).split(/\r?\n/g).map(M=>M.replace(/^\s*#.*$/,"").trim()).filter(M=>M);P.contributors=N,I?.push('"contributors" was auto-populated with the contents of the "AUTHORS" file')}catch{}if(O.includes("readme")&&!P.readme){let N=/\.m?a?r?k?d?o?w?n?$/i,M=await h()("{README,README.*}",{cwd:_.path,nocase:!0,mark:!0}),B;for(let F of M)if(!F.endsWith(l.sep)){if(F.match(N)){B=F;break}F.endsWith("README")&&(B=F)}if(B){let F=await n.readFile(l.join(_.path,B),"utf8");P.readme=F,P.readmeFilename=B,I?.push(`"readme" was set to the contents of ${B}`),I?.push(`"readmeFilename" was set to ${B}`)}P.readme||(P.readme="ERROR: No README data found!")}if(O.includes("mans")){if(P.directories?.man&&!P.man){let N=y(P.directories.man),M=l.resolve(_.path,N),B=await h()("**/*.[0-9]",{cwd:M});P.man=B.map(F=>l.relative(_.path,l.join(M,F)).split(l.sep).join("/"))}d(P,I)}if(O.includes("binDir")&&P.directories?.bin&&!P.bin){let N=y(P.directories.bin),M=await h()("**",{cwd:l.resolve(_.path,N)});P.bin=M.reduce((B,F)=>{if(F&&!F.startsWith(".")){let D=l.basename(F);B[D]=`${N}/${y(F)}`}return B},{})}else(O.includes("bin")||O.includes("binDir")||O.includes("binRefs"))&&p(P,I);if(O.includes("gitHead")&&!P.gitHead){let N=await fg().find({cwd:_.path,root:A}),M;if(N)try{M=await n.readFile(l.resolve(N,".git/HEAD"),"utf8")}catch{}let B;if(M)if(M.startsWith("ref: ")){let F=M.replace(/^ref: /,"").trim(),D=l.resolve(N,".git",F);try{B=await n.readFile(D,"utf8"),B=B.replace(/^ref: /,"").trim()}catch{}if(!B){let H=l.resolve(N,".git/packed-refs");try{let G=await n.readFile(H,"utf8");if(G){G=G.split(`
31
- `);for(let x=0;x<G.length;x++){let k=G[x].match(/^([0-9a-f]{40}) (.+)$/);if(k&&k[2].trim()===F){B=k[1];break}}}}catch{}}}else B=M.trim();B&&(P.gitHead=B)}if(O.includes("fillTypes")){let N=P.main||"index.js";if(typeof N!="string")throw new TypeError('The "main" attribute must be of type string.');let M=`./${l.join(l.dirname(N),l.basename(N,l.extname(N)))}.d.ts`;if(!("types"in P||"typings"in P))try{await n.access(l.join(_.path,M)),P.types=M.split(l.sep).join("/")}catch{}}if(O.includes("binRefs")&&P.bin instanceof Object)for(let N in P.bin)try{await n.access(l.resolve(_.path,P.bin[N]))}catch{c.warn("package-json",j,`No bin file found at ${P.bin[N]}`)}}S(E,"asyncSteps");async function b(_,O){if(!_.content)throw new Error("Can not normalize without content");await E(_,O),v(_,O)}S(b,"normalize");function w(_,O){v(_,O)}S(w,"syncNormalize"),t.exports={normalize:b,syncNormalize:w}}),MN=J((e,t)=>{var{readFile:i}=require("internal/fs/promises"),u=Uf();async function n(r){try{return await i(r,"utf8")}catch(s){throw s.message=`Could not read package.json: ${s}`,s}}S(n,"read");function l(r){try{return u(r)}catch(s){throw s.message=`Invalid package.json: ${s}`,s}}S(l,"parse");async function c(r){let s=await n(r);return l(s)}S(c,"readPackage"),t.exports={read:n,parse:l,readPackage:c}}),BN=J((e,t)=>{function i(u){let{name:n,version:l,private:c,description:r,keywords:s,homepage:o,bugs:a,repository:h,funding:p,license:d,author:m,maintainers:g,contributors:f,type:y,imports:v,exports:E,main:b,browser:w,types:_,bin:O,man:A,directories:I,files:P,workspaces:L,scripts:j,config:N,dependencies:M,devDependencies:B,peerDependencies:F,peerDependenciesMeta:D,optionalDependencies:H,bundledDependencies:G,bundleDependencies:x,engines:k,os:T,cpu:C,publishConfig:q,devEngines:X,licenses:Y,overrides:$,...V}=u;return{...typeof n<"u"?{name:n}:{},...typeof l<"u"?{version:l}:{},...typeof c<"u"?{private:c}:{},...typeof r<"u"?{description:r}:{},...typeof s<"u"?{keywords:s}:{},...typeof o<"u"?{homepage:o}:{},...typeof a<"u"?{bugs:a}:{},...typeof h<"u"?{repository:h}:{},...typeof p<"u"?{funding:p}:{},...typeof d<"u"?{license:d}:{},...typeof m<"u"?{author:m}:{},...typeof g<"u"?{maintainers:g}:{},...typeof f<"u"?{contributors:f}:{},...typeof y<"u"?{type:y}:{},...typeof v<"u"?{imports:v}:{},...typeof E<"u"?{exports:E}:{},...typeof b<"u"?{main:b}:{},...typeof w<"u"?{browser:w}:{},...typeof _<"u"?{types:_}:{},...typeof O<"u"?{bin:O}:{},...typeof A<"u"?{man:A}:{},...typeof I<"u"?{directories:I}:{},...typeof P<"u"?{files:P}:{},...typeof L<"u"?{workspaces:L}:{},...typeof j<"u"?{scripts:j}:{},...typeof N<"u"?{config:N}:{},...typeof M<"u"?{dependencies:M}:{},...typeof B<"u"?{devDependencies:B}:{},...typeof F<"u"?{peerDependencies:F}:{},...typeof D<"u"?{peerDependenciesMeta:D}:{},...typeof H<"u"?{optionalDependencies:H}:{},...typeof G<"u"?{bundledDependencies:G}:{},...typeof x<"u"?{bundleDependencies:x}:{},...typeof k<"u"?{engines:k}:{},...typeof T<"u"?{os:T}:{},...typeof C<"u"?{cpu:C}:{},...typeof q<"u"?{publishConfig:q}:{},...typeof X<"u"?{devEngines:X}:{},...typeof Y<"u"?{licenses:Y}:{},...typeof $<"u"?{overrides:$}:{},...V}}S(i,"packageSort"),t.exports={packageSort:i}}),Jl=J((e,t)=>{var{readFile:i,writeFile:u}=require("internal/fs/promises"),{resolve:n}=require("path"),l=Uf(),c=Ax(),r=Cx(),s=Ix(),{normalize:o,syncNormalize:a}=jN(),{read:h,parse:p}=MN(),{packageSort:d}=BN(),m=new Set([c,r,s]),g=new Set([...c.knownKeys,"scripts","workspaces"]),f=class wr{static{S(this,"PackageJson")}static fixSteps=Object.freeze(["binRefs","bundleDependencies","fixName","fixVersionField","fixRepositoryField","fixDependencies","devDependencies","scriptpath"]);static normalizeSteps=Object.freeze(["_id","_attributes","bundledDependencies","bundleDependencies","optionalDedupe","scripts","funding","bin","binDir"]);static prepareSteps=Object.freeze(["_id","_attributes","bundledDependencies","bundleDependencies","bundleDependenciesDeleteFalse","gypfile","serverjs","scriptpath","authors","readme","mans","binDir","gitHead","fillTypes","normalizeData","binRefs"]);static async create(v,E={}){let b=new wr;return await b.create(v),E.data?b.update(E.data):b}static async load(v,E={}){let b=new wr;if(!E.create)return b.load(v);try{return await b.load(v)}catch(w){if(!w.message.startsWith("Could not read package.json"))throw w;return await b.create(v)}}static async fix(v,E){let b=new wr;return await b.load(v,!0),b.fix(E)}static async prepare(v,E){let b=new wr;return await b.load(v,!0),b.prepare(E)}static async normalize(v,E){let b=new wr;return await b.load(v),b.normalize(E)}#e;#t;#r="";#s=!0;async load(v,E){this.#e=v;let b;try{this.#r=await h(this.filename)}catch(w){if(!E)throw w;b=w}if(b){let w=n(this.path,"index.js"),_;try{_=await i(w,"utf8")}catch{throw b}try{this.fromComment(_)}catch{throw b}return this.#s=!1,this}return this.fromJSON(this.#r)}fromJSON(v){return this.#t=p(v),this}fromContent(v){if(!v||typeof v!="object")throw new Error("Content data must be an object");return this.#t=v,this.#s=!1,this}fromComment(v){if(v=v.split(/^\/\*\*package(?:\s|$)/m),v.length<2)throw new Error("File has no package in comments");if(v=v[1],v=v.split(/\*\*\/$/m),v.length<2)throw new Error("File has no package in comments");return v=v[0],v=v.replace(/^\s*\*/mg,""),this.#t=l(v),this}get content(){return this.#t}get path(){return this.#e}get filename(){if(this.path)return n(this.path,"package.json")}create(v){return this.#e=v,this.#t={},this}update(v){if(!this.content)throw new Error("Can not update without content. Please `load` or `create`");for(let E of m)this.#t=E({content:v,originalContent:this.content});for(let[E,b]of Object.entries(v))g.has(E)||(this.content[E]=b);return this}async save({sort:v}={}){if(!this.#s)throw new Error("No package.json to save to");let{[Symbol.for("indent")]:E,[Symbol.for("newline")]:b,...w}=this.content,_=E===void 0?" ":E,O=b===void 0?`
32
- `:b,A=v?d(w):w,I=`${JSON.stringify(A,null,_)}
33
- `.replace(/\n/g,O);if(I.trim()!==this.#r.trim()){let P=await u(this.filename,I);return this.#r=I,P}}syncNormalize(v={}){return v.steps=this.constructor.normalizeSteps.filter(E=>E!=="_attributes"),a(this,v),this}async normalize(v={}){return v.steps||(v.steps=this.constructor.normalizeSteps),await o(this,v),this}async prepare(v={}){return v.steps||(v.steps=this.constructor.prepareSteps),await o(this,v),this}async fix(v={}){return v.steps=this.constructor.fixSteps,await o(this,v),this}};t.exports=f}),gg=J((e,t)=>{var{Minipass:i}=ke(),u=Symbol("_data"),n=Symbol("_length"),l=class extends i{static{S(this,"Collect")}constructor(r){super(r),this[u]=[],this[n]=0}write(r,s,o){typeof s=="function"&&(o=s,s="utf8"),s||(s="utf8");let a=Buffer.isBuffer(r)?r:Buffer.from(r,s);return this[u].push(a),this[n]+=a.length,o&&o(),!0}end(r,s,o){typeof r=="function"&&(o=r,r=null),typeof s=="function"&&(o=s,s="utf8"),r&&this.write(r,s);let a=Buffer.concat(this[u],this[n]);return super.write(a),super.end(o)}};t.exports=l;var c=class extends i{static{S(this,"CollectPassThrough")}constructor(r){super(r),this[u]=[],this[n]=0}write(r,s,o){typeof s=="function"&&(o=s,s="utf8"),s||(s="utf8");let a=Buffer.isBuffer(r)?r:Buffer.from(r,s);return this[u].push(a),this[n]+=a.length,super.write(r,s,o)}end(r,s,o){typeof r=="function"&&(o=r,r=null),typeof s=="function"&&(o=s,s="utf8"),r&&this.write(r,s);let a=Buffer.concat(this[u],this[n]);return this.emit("collect",a),super.end(o)}};t.exports.PassThrough=c}),Xl=J((e,t)=>{"use strict";var i=typeof process=="object"&&process?process:{stdout:null,stderr:null},u=require("events"),n=require("stream"),l=require("string_decoder").StringDecoder,c=Symbol("EOF"),r=Symbol("maybeEmitEnd"),s=Symbol("emittedEnd"),o=Symbol("emittingEnd"),a=Symbol("emittedError"),h=Symbol("closed"),p=Symbol("read"),d=Symbol("flush"),m=Symbol("flushChunk"),g=Symbol("encoding"),f=Symbol("decoder"),y=Symbol("flowing"),v=Symbol("paused"),E=Symbol("resume"),b=Symbol("bufferLength"),w=Symbol("bufferPush"),_=Symbol("bufferShift"),O=Symbol("objectMode"),A=Symbol("destroyed"),I=Symbol("emitData"),P=Symbol("emitEnd"),L=Symbol("emitEnd2"),j=Symbol("async"),N=S(T=>Promise.resolve().then(T),"defer"),M=global._MP_NO_ITERATOR_SYMBOLS_!=="1",B=M&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),F=M&&Symbol.iterator||Symbol("iterator not implemented"),D=S(T=>T==="end"||T==="finish"||T==="prefinish","isEndish"),H=S(T=>T instanceof ArrayBuffer||typeof T=="object"&&T.constructor&&T.constructor.name==="ArrayBuffer"&&T.byteLength>=0,"isArrayBuffer"),G=S(T=>!Buffer.isBuffer(T)&&ArrayBuffer.isView(T),"isArrayBufferView"),x=class{static{S(this,"Pipe")}constructor(T,C,q){this.src=T,this.dest=C,this.opts=q,this.ondrain=()=>T[E](),C.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},k=class extends x{static{S(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(T,C,q){super(T,C,q),this.proxyErrors=X=>C.emit("error",X),T.on("error",this.proxyErrors)}};t.exports=class mg extends n{static{S(this,"Minipass")}constructor(C){super(),this[y]=!1,this[v]=!1,this.pipes=[],this.buffer=[],this[O]=C&&C.objectMode||!1,this[O]?this[g]=null:this[g]=C&&C.encoding||null,this[g]==="buffer"&&(this[g]=null),this[j]=C&&!!C.async||!1,this[f]=this[g]?new l(this[g]):null,this[c]=!1,this[s]=!1,this[o]=!1,this[h]=!1,this[a]=null,this.writable=!0,this.readable=!0,this[b]=0,this[A]=!1}get bufferLength(){return this[b]}get encoding(){return this[g]}set encoding(C){if(this[O])throw new Error("cannot set encoding in objectMode");if(this[g]&&C!==this[g]&&(this[f]&&this[f].lastNeed||this[b]))throw new Error("cannot change encoding");this[g]!==C&&(this[f]=C?new l(C):null,this.buffer.length&&(this.buffer=this.buffer.map(q=>this[f].write(q)))),this[g]=C}setEncoding(C){this.encoding=C}get objectMode(){return this[O]}set objectMode(C){this[O]=this[O]||!!C}get async(){return this[j]}set async(C){this[j]=this[j]||!!C}write(C,q,X){if(this[c])throw new Error("write after end");if(this[A])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof q=="function"&&(X=q,q="utf8"),q||(q="utf8");let Y=this[j]?N:$=>$();return!this[O]&&!Buffer.isBuffer(C)&&(G(C)?C=Buffer.from(C.buffer,C.byteOffset,C.byteLength):H(C)?C=Buffer.from(C):typeof C!="string"&&(this.objectMode=!0)),this[O]?(this.flowing&&this[b]!==0&&this[d](!0),this.flowing?this.emit("data",C):this[w](C),this[b]!==0&&this.emit("readable"),X&&Y(X),this.flowing):C.length?(typeof C=="string"&&!(q===this[g]&&!this[f].lastNeed)&&(C=Buffer.from(C,q)),Buffer.isBuffer(C)&&this[g]&&(C=this[f].write(C)),this.flowing&&this[b]!==0&&this[d](!0),this.flowing?this.emit("data",C):this[w](C),this[b]!==0&&this.emit("readable"),X&&Y(X),this.flowing):(this[b]!==0&&this.emit("readable"),X&&Y(X),this.flowing)}read(C){if(this[A])return null;if(this[b]===0||C===0||C>this[b])return this[r](),null;this[O]&&(C=null),this.buffer.length>1&&!this[O]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[b])]);let q=this[p](C||null,this.buffer[0]);return this[r](),q}[p](C,q){return C===q.length||C===null?this[_]():(this.buffer[0]=q.slice(C),q=q.slice(0,C),this[b]-=C),this.emit("data",q),!this.buffer.length&&!this[c]&&this.emit("drain"),q}end(C,q,X){return typeof C=="function"&&(X=C,C=null),typeof q=="function"&&(X=q,q="utf8"),C&&this.write(C,q),X&&this.once("end",X),this[c]=!0,this.writable=!1,(this.flowing||!this[v])&&this[r](),this}[E](){this[A]||(this[v]=!1,this[y]=!0,this.emit("resume"),this.buffer.length?this[d]():this[c]?this[r]():this.emit("drain"))}resume(){return this[E]()}pause(){this[y]=!1,this[v]=!0}get destroyed(){return this[A]}get flowing(){return this[y]}get paused(){return this[v]}[w](C){this[O]?this[b]+=1:this[b]+=C.length,this.buffer.push(C)}[_](){return this.buffer.length&&(this[O]?this[b]-=1:this[b]-=this.buffer[0].length),this.buffer.shift()}[d](C){do;while(this[m](this[_]()));!C&&!this.buffer.length&&!this[c]&&this.emit("drain")}[m](C){return C?(this.emit("data",C),this.flowing):!1}pipe(C,q){if(this[A])return;let X=this[s];return q=q||{},C===i.stdout||C===i.stderr?q.end=!1:q.end=q.end!==!1,q.proxyErrors=!!q.proxyErrors,X?q.end&&C.end():(this.pipes.push(q.proxyErrors?new k(this,C,q):new x(this,C,q)),this[j]?N(()=>this[E]()):this[E]()),C}unpipe(C){let q=this.pipes.find(X=>X.dest===C);q&&(this.pipes.splice(this.pipes.indexOf(q),1),q.unpipe())}addListener(C,q){return this.on(C,q)}on(C,q){let X=super.on(C,q);return C==="data"&&!this.pipes.length&&!this.flowing?this[E]():C==="readable"&&this[b]!==0?super.emit("readable"):D(C)&&this[s]?(super.emit(C),this.removeAllListeners(C)):C==="error"&&this[a]&&(this[j]?N(()=>q.call(this,this[a])):q.call(this,this[a])),X}get emittedEnd(){return this[s]}[r](){!this[o]&&!this[s]&&!this[A]&&this.buffer.length===0&&this[c]&&(this[o]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[h]&&this.emit("close"),this[o]=!1)}emit(C,q,...X){if(C!=="error"&&C!=="close"&&C!==A&&this[A])return;if(C==="data")return q?this[j]?N(()=>this[I](q)):this[I](q):!1;if(C==="end")return this[P]();if(C==="close"){if(this[h]=!0,!this[s]&&!this[A])return;let $=super.emit("close");return this.removeAllListeners("close"),$}else if(C==="error"){this[a]=q;let $=super.emit("error",q);return this[r](),$}else if(C==="resume"){let $=super.emit("resume");return this[r](),$}else if(C==="finish"||C==="prefinish"){let $=super.emit(C);return this.removeAllListeners(C),$}let Y=super.emit(C,q,...X);return this[r](),Y}[I](C){for(let X of this.pipes)X.dest.write(C)===!1&&this.pause();let q=super.emit("data",C);return this[r](),q}[P](){this[s]||(this[s]=!0,this.readable=!1,this[j]?N(()=>this[L]()):this[L]())}[L](){if(this[f]){let q=this[f].end();if(q){for(let X of this.pipes)X.dest.write(q);super.emit("data",q)}}for(let q of this.pipes)q.end();let C=super.emit("end");return this.removeAllListeners("end"),C}collect(){let C=[];this[O]||(C.dataLength=0);let q=this.promise();return this.on("data",X=>{C.push(X),this[O]||(C.dataLength+=X.length)}),q.then(()=>C)}concat(){return this[O]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(C=>this[O]?Promise.reject(new Error("cannot concat in objectMode")):this[g]?C.join(""):Buffer.concat(C,C.dataLength))}promise(){return new Promise((C,q)=>{this.on(A,()=>q(new Error("stream destroyed"))),this.on("error",X=>q(X)),this.on("end",()=>C())})}[B](){return{next:S(()=>{let C=this.read();if(C!==null)return Promise.resolve({done:!1,value:C});if(this[c])return Promise.resolve({done:!0});let q=null,X=null,Y=S(U=>{this.removeListener("data",$),this.removeListener("end",V),X(U)},"onerr"),$=S(U=>{this.removeListener("error",Y),this.removeListener("end",V),this.pause(),q({value:U,done:!!this[c]})},"ondata"),V=S(()=>{this.removeListener("error",Y),this.removeListener("data",$),q({done:!0})},"onend"),z=S(()=>Y(new Error("stream destroyed")),"ondestroy");return new Promise((U,K)=>{X=K,q=U,this.once(A,z),this.once("error",Y),this.once("end",V),this.once("data",$)})},"next")}}[F](){return{next:S(()=>{let C=this.read();return{value:C,done:C===null}},"next")}}destroy(C){return this[A]?(C?this.emit("error",C):this.emit(A),this):(this[A]=!0,this.buffer.length=0,this[b]=0,typeof this.close=="function"&&!this[h]&&this.close(),C?this.emit("error",C):this.emit(A),this)}static isStream(C){return!!C&&(C instanceof mg||C instanceof n||C instanceof u&&(typeof C.pipe=="function"||typeof C.write=="function"&&typeof C.end=="function"))}}}),vs=J((e,t)=>{var i=Xl(),u=require("events"),n=S(f=>f&&f instanceof u&&(typeof f.pipe=="function"||typeof f.write=="function"&&typeof f.end=="function"),"isStream"),l=Symbol("_head"),c=Symbol("_tail"),r=Symbol("_linkStreams"),s=Symbol("_setHead"),o=Symbol("_setTail"),a=Symbol("_onError"),h=Symbol("_onData"),p=Symbol("_onEnd"),d=Symbol("_onDrain"),m=Symbol("_streams"),g=class extends i{static{S(this,"Pipeline")}constructor(f,...y){n(f)&&(y.unshift(f),f={}),super(f),this[m]=[],y.length&&this.push(...y)}[r](f){return f.reduce((y,v)=>(y.on("error",E=>v.emit("error",E)),y.pipe(v),v))}push(...f){this[m].push(...f),this[c]&&f.unshift(this[c]);let y=this[r](f);this[o](y),this[l]||this[s](f[0])}unshift(...f){this[m].unshift(...f),this[l]&&f.push(this[l]);let y=this[r](f);this[s](f[0]),this[c]||this[o](y)}destroy(f){return this[m].forEach(y=>typeof y.destroy=="function"&&y.destroy()),super.destroy(f)}[o](f){this[c]=f,f.on("error",y=>this[a](f,y)),f.on("data",y=>this[h](f,y)),f.on("end",()=>this[p](f)),f.on("finish",()=>this[p](f))}[a](f,y){f===this[c]&&this.emit("error",y)}[h](f,y){f===this[c]&&super.write(y)}[p](f){f===this[c]&&super.end()}pause(){return super.pause(),this[c]&&this[c].pause&&this[c].pause()}emit(f,...y){return f==="resume"&&this[c]&&this[c].resume&&this[c].resume(),super.emit(f,...y)}[s](f){this[l]=f,f.on("drain",()=>this[d](f))}[d](f){f===this[l]&&this.emit("drain")}write(f,y,v){return this[l].write(f,y,v)&&(this.flowing||this.buffer.length===0)}end(f,y,v){return this[l].end(f,y,v),this}};t.exports=g}),Dt=J((e,t)=>{"use strict";var i=require("crypto"),{Minipass:u}=ke(),n=["sha512","sha384","sha256"],l=["sha512"],c=/^[a-z0-9+/]+(?:=?=?)$/i,r=/^([a-z0-9]+)-([^?]+)([?\S*]*)$/,s=/^([a-z0-9]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)?$/,o=/^[\x21-\x7E]+$/,a=S(j=>j?.length?`?${j.join("?")}`:"","getOptString"),h=class extends u{static{S(this,"IntegrityStream")}#e;#t;#r;constructor(j){super(),this.size=0,this.opts=j,this.#s(),j?.algorithms?this.algorithms=[...j.algorithms]:this.algorithms=[...l],this.algorithm!==null&&!this.algorithms.includes(this.algorithm)&&this.algorithms.push(this.algorithm),this.hashes=this.algorithms.map(i.createHash)}#s(){this.sri=this.opts?.integrity?g(this.opts?.integrity,this.opts):null,this.expectedSize=this.opts?.size,this.sri?this.sri.isHash?(this.goodSri=!0,this.algorithm=this.sri.algorithm):(this.goodSri=!this.sri.isEmpty(),this.algorithm=this.sri.pickAlgorithm(this.opts)):this.algorithm=null,this.digests=this.goodSri?this.sri[this.algorithm]:null,this.optString=a(this.opts?.options)}on(j,N){return j==="size"&&this.#t?N(this.#t):j==="integrity"&&this.#e?N(this.#e):j==="verified"&&this.#r?N(this.#r):super.on(j,N)}emit(j,N){return j==="end"&&this.#n(),super.emit(j,N)}write(j){return this.size+=j.length,this.hashes.forEach(N=>N.update(j)),super.write(j)}#n(){this.goodSri||this.#s();let j=g(this.hashes.map((M,B)=>`${this.algorithms[B]}-${M.digest("base64")}${this.optString}`).join(" "),this.opts),N=this.goodSri&&j.match(this.sri,this.opts);if(typeof this.expectedSize=="number"&&this.size!==this.expectedSize){let M=new Error(`stream size mismatch when checking ${this.sri}.
34
- Wanted: ${this.expectedSize}
35
- Found: ${this.size}`);M.code="EBADSIZE",M.found=this.size,M.expected=this.expectedSize,M.sri=this.sri,this.emit("error",M)}else if(this.sri&&!N){let M=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${j}. (${this.size} bytes)`);M.code="EINTEGRITY",M.found=j,M.expected=this.digests,M.algorithm=this.algorithm,M.sri=this.sri,this.emit("error",M)}else this.#t=this.size,this.emit("size",this.size),this.#e=j,this.emit("integrity",j),N&&(this.#r=N,this.emit("verified",N))}},p=class{static{S(this,"Hash")}get isHash(){return!0}constructor(j,N){let M=N?.strict;this.source=j.trim(),this.digest="",this.algorithm="",this.options=[];let B=this.source.match(M?s:r);if(!B||M&&!n.includes(B[1]))return;this.algorithm=B[1],this.digest=B[2];let F=B[3];F&&(this.options=F.slice(1).split("?"))}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}match(j,N){let M=g(j,N);if(!M)return!1;if(M.isIntegrity){let B=M.pickAlgorithm(N,[this.algorithm]);return B&&M[B].find(D=>D.digest===this.digest)||!1}return M.digest===this.digest?M:!1}toString(j){return j?.strict&&!(n.includes(this.algorithm)&&this.digest.match(c)&&this.options.every(N=>N.match(o)))?"":`${this.algorithm}-${this.digest}${a(this.options)}`}};function d(j,N,M,B){let F=j!=="",D=!1,H="",G=B.length-1;for(let k=0;k<G;k++){let T=p.prototype.toString.call(B[k],M);T&&(D=!0,H+=T,H+=N)}let x=p.prototype.toString.call(B[G],M);return x&&(D=!0,H+=x),F&&D?j+N+H:j+H}S(d,"integrityHashToString");var m=class{static{S(this,"Integrity")}get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(j){let N=j?.sep||" ",M="";if(j?.strict){N=N.replace(/\S+/g," ");for(let B of n)this[B]&&(M=d(M,N,j,this[B]))}else for(let B of Object.keys(this))M=d(M,N,j,this[B]);return M}concat(j,N){let M=typeof j=="string"?j:y(j,N);return g(`${this.toString(N)} ${M}`,N)}hexDigest(){return g(this,{single:!0}).hexDigest()}merge(j,N){let M=g(j,N);for(let B in M)if(this[B]){if(!this[B].find(F=>M[B].find(D=>F.digest===D.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[B]=M[B]}match(j,N){let M=g(j,N);if(!M)return!1;let B=M.pickAlgorithm(N,Object.keys(this));return!!B&&this[B]&&M[B]&&this[B].find(F=>M[B].find(D=>F.digest===D.digest))||!1}pickAlgorithm(j,N){let M=j?.pickAlgorithm||L,B=Object.keys(this).filter(F=>N?.length?N.includes(F):!0);return B.length?B.reduce((F,D)=>M(F,D)||F):null}};t.exports.parse=g;function g(j,N){if(!j)return null;if(typeof j=="string")return f(j,N);if(j.algorithm&&j.digest){let M=new m;return M[j.algorithm]=[j],f(y(M,N),N)}else return f(y(j,N),N)}S(g,"parse");function f(j,N){if(N?.single)return new p(j,N);let M=j.trim().split(/\s+/).reduce((B,F)=>{let D=new p(F,N);if(D.algorithm&&D.digest){let H=D.algorithm;B[H]||(B[H]=[]),B[H].push(D)}return B},new m);return M.isEmpty()?null:M}S(f,"_parse"),t.exports.stringify=y;function y(j,N){return j.algorithm&&j.digest?p.prototype.toString.call(j,N):typeof j=="string"?y(g(j,N),N):m.prototype.toString.call(j,N)}S(y,"stringify"),t.exports.fromHex=v;function v(j,N,M){let B=a(M?.options);return g(`${N}-${Buffer.from(j,"hex").toString("base64")}${B}`,M)}S(v,"fromHex"),t.exports.fromData=E;function E(j,N){let M=N?.algorithms||[...l],B=a(N?.options);return M.reduce((F,D)=>{let H=i.createHash(D).update(j).digest("base64"),G=new p(`${D}-${H}${B}`,N);if(G.algorithm&&G.digest){let x=G.algorithm;F[x]||(F[x]=[]),F[x].push(G)}return F},new m)}S(E,"fromData"),t.exports.fromStream=b;function b(j,N){let M=O(N);return new Promise((B,F)=>{j.pipe(M),j.on("error",F),M.on("error",F);let D;M.on("integrity",H=>{D=H}),M.on("end",()=>B(D)),M.resume()})}S(b,"fromStream"),t.exports.checkData=w;function w(j,N,M){if(N=g(N,M),!N||!Object.keys(N).length){if(M?.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let B=N.pickAlgorithm(M),F=i.createHash(B).update(j).digest("base64"),D=g({algorithm:B,digest:F}),H=D.match(N,M);if(M=M||{},H||!M.error)return H;if(typeof M.size=="number"&&j.length!==M.size){let G=new Error(`data size mismatch when checking ${N}.
36
- Wanted: ${M.size}
37
- Found: ${j.length}`);throw G.code="EBADSIZE",G.found=j.length,G.expected=M.size,G.sri=N,G}else{let G=new Error(`Integrity checksum failed when using ${B}: Wanted ${N}, but got ${D}. (${j.length} bytes)`);throw G.code="EINTEGRITY",G.found=D,G.expected=N,G.algorithm=B,G.sri=N,G}}S(w,"checkData"),t.exports.checkStream=_;function _(j,N,M){if(M=M||Object.create(null),M.integrity=N,N=g(N,M),!N||!Object.keys(N).length)return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}));let B=O(M);return new Promise((F,D)=>{j.pipe(B),j.on("error",D),B.on("error",D);let H;B.on("verified",G=>{H=G}),B.on("end",()=>F(H)),B.resume()})}S(_,"checkStream"),t.exports.integrityStream=O;function O(j=Object.create(null)){return new h(j)}S(O,"integrityStream"),t.exports.create=A;function A(j){let N=j?.algorithms||[...l],M=a(j?.options),B=N.map(i.createHash);return{update:S(function(F,D){return B.forEach(H=>H.update(F,D)),this},"update"),digest:S(function(){return N.reduce((F,D)=>{let H=B.shift().digest("base64"),G=new p(`${D}-${H}${M}`,j);if(G.algorithm&&G.digest){let x=G.algorithm;F[x]||(F[x]=[]),F[x].push(G)}return F},new m)},"digest")}}S(A,"createIntegrity");var I=i.getHashes(),P=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(j=>I.includes(j));function L(j,N){return P.indexOf(j.toLowerCase())>=P.indexOf(N.toLowerCase())?j:N}S(L,"getPrioritizedHash")}),UN=J((e,t)=>{(function(){var i;function u(n,l){var c=this instanceof u?this:i;if(c.reset(l),typeof n=="string"&&n.length>0&&c.hash(n),c!==this)return c}S(u,"MurmurHash3"),u.prototype.hash=function(n){var l,c,r,s,o;switch(o=n.length,this.len+=o,c=this.k1,r=0,this.rem){case 0:c^=o>r?n.charCodeAt(r++)&65535:0;case 1:c^=o>r?(n.charCodeAt(r++)&65535)<<8:0;case 2:c^=o>r?(n.charCodeAt(r++)&65535)<<16:0;case 3:c^=o>r?(n.charCodeAt(r)&255)<<24:0,c^=o>r?(n.charCodeAt(r++)&65280)>>8:0}if(this.rem=o+this.rem&3,o-=this.rem,o>0){for(l=this.h1;c=c*11601+(c&65535)*3432906752&4294967295,c=c<<15|c>>>17,c=c*13715+(c&65535)*461832192&4294967295,l^=c,l=l<<13|l>>>19,l=l*5+3864292196&4294967295,!(r>=o);)c=n.charCodeAt(r++)&65535^(n.charCodeAt(r++)&65535)<<8^(n.charCodeAt(r++)&65535)<<16,s=n.charCodeAt(r++),c^=(s&255)<<24^(s&65280)>>8;switch(c=0,this.rem){case 3:c^=(n.charCodeAt(r+2)&65535)<<16;case 2:c^=(n.charCodeAt(r+1)&65535)<<8;case 1:c^=n.charCodeAt(r)&65535}this.h1=l}return this.k1=c,this},u.prototype.result=function(){var n,l;return n=this.k1,l=this.h1,n>0&&(n=n*11601+(n&65535)*3432906752&4294967295,n=n<<15|n>>>17,n=n*13715+(n&65535)*461832192&4294967295,l^=n),l^=this.len,l^=l>>>16,l=l*51819+(l&65535)*2246770688&4294967295,l^=l>>>13,l=l*44597+(l&65535)*3266445312&4294967295,l^=l>>>16,l>>>0},u.prototype.reset=function(n){return this.h1=typeof n=="number"?n:0,this.rem=this.k1=this.len=0,this},i=new u,typeof t<"u"?t.exports=u:this.MurmurHash3=u})()}),FN=J((e,t)=>{"use strict";var i=UN();t.exports=function(u){if(u){var n=new i(u);return("00000000"+n.result().toString(16)).slice(-8)}else return(Math.random().toString(16)+"0000000").slice(2,10)}}),yg=J((e,t)=>{var i=require("path"),u=FN();t.exports=function(n,l,c){return i.join(n,(l?l+"-":"")+u(c))}}),vg=J((e,t)=>{t.exports={name:"cacache",version:"20.0.1","cache-version":{content:"2",index:"5"},description:"Fast, fault-tolerant, cross-platform, disk-based, data-agnostic, content-addressable cache.",main:"lib/index.js",files:["bin/","lib/"],scripts:{test:"tap",snap:"tap",coverage:"tap","test-docker":'docker run -it --rm --name pacotest -v "$PWD":/tmp -w /tmp node:latest npm test',lint:"npm run eslint",npmclilint:"npmcli-lint",lintfix:"npm run eslint -- --fix",postsnap:"npm run lintfix --",postlint:"template-oss-check",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},repository:{type:"git",url:"git+https://github.com/npm/cacache.git"},keywords:["cache","caching","content-addressable","sri","sri hash","subresource integrity","cache","storage","store","file store","filesystem","disk cache","disk storage"],license:"ISC",dependencies:{"@npmcli/fs":"^4.0.0","fs-minipass":"^3.0.0",glob:"^11.0.3","lru-cache":"^11.1.0",minipass:"^7.0.3","minipass-collect":"^2.0.1","minipass-flush":"^1.0.5","minipass-pipeline":"^1.2.4","p-map":"^7.0.2",ssri:"^12.0.0","unique-filename":"^4.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",tap:"^16.0.0"},engines:{node:"^20.17.0 || >=22.9.0"},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",windowsCI:!1,version:"4.25.0",publish:"true"},author:"GitHub Inc.",tap:{"nyc-arg":["--exclude","tap-snapshots/**"]}}}),Sg=J((e,t)=>{"use strict";t.exports=i;function i(u){return[u.slice(0,2),u.slice(2,4),u.slice(4)]}S(i,"hashToSegments")}),Ss=J((e,t)=>{"use strict";var i=vg()["cache-version"].content,u=Sg(),n=require("path"),l=Dt();t.exports=c;function c(s,o){let a=l.parse(o,{single:!0});return n.join(r(s),a.algorithm,...u(a.hexDigest()))}S(c,"contentPath"),t.exports.contentDir=r;function r(s){return n.join(s,`content-v${i}`)}S(r,"contentDir")}),Eg=J((e,t)=>{var i=S((u,{copy:n,wrap:l})=>{let c={};if(u&&typeof u=="object")for(let r of n)u[r]!==void 0&&(c[r]=u[r]);else c[l]=u;return c},"getOptions");t.exports=i}),HN=J((e,t)=>{var i=Ir(),u=S(n=>i.satisfies(process.version,n,{includePrerelease:!0}),"satisfies");t.exports={satisfies:u}}),GN=J((e,t)=>{"use strict";var{inspect:i}=require("util"),u=class{static{S(this,"SystemError")}constructor(l,c,r){let s=`${c}: ${r.syscall} returned ${r.code} (${r.message})`;r.path!==void 0&&(s+=` ${r.path}`),r.dest!==void 0&&(s+=` => ${r.dest}`),this.code=l,Object.defineProperties(this,{name:{value:"SystemError",enumerable:!1,writable:!0,configurable:!0},message:{value:s,enumerable:!1,writable:!0,configurable:!0},info:{value:r,enumerable:!0,configurable:!0,writable:!1},errno:{get(){return r.errno},set(o){r.errno=o},enumerable:!0,configurable:!0},syscall:{get(){return r.syscall},set(o){r.syscall=o},enumerable:!0,configurable:!0}}),r.path!==void 0&&Object.defineProperty(this,"path",{get(){return r.path},set(o){r.path=o},enumerable:!0,configurable:!0}),r.dest!==void 0&&Object.defineProperty(this,"dest",{get(){return r.dest},set(o){r.dest=o},enumerable:!0,configurable:!0})}toString(){return`${this.name} [${this.code}]: ${this.message}`}[Symbol.for("nodejs.util.inspect.custom")](l,c){return i(this,{...c,getters:!0,customInspect:!1})}};function n(l,c){t.exports[l]=class extends u{static{S(this,"NodeError")}constructor(r){super(l,c,r)}}}S(n,"E"),n("ERR_FS_CP_DIR_TO_NON_DIR","Cannot overwrite directory with non-directory"),n("ERR_FS_CP_EEXIST","Target already exists"),n("ERR_FS_CP_EINVAL","Invalid src or dest"),n("ERR_FS_CP_FIFO_PIPE","Cannot copy a FIFO pipe"),n("ERR_FS_CP_NON_DIR_TO_DIR","Cannot overwrite non-directory with directory"),n("ERR_FS_CP_SOCKET","Cannot copy a socket file"),n("ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY","Cannot overwrite symlink in subdirectory of self"),n("ERR_FS_CP_UNKNOWN","Cannot copy an unknown file type"),n("ERR_FS_EISDIR","Path is a directory"),t.exports.ERR_INVALID_ARG_TYPE=class extends Error{static{S(this,"ERR_INVALID_ARG_TYPE")}constructor(l,c,r){super(),this.code="ERR_INVALID_ARG_TYPE",this.message=`The ${l} argument must be ${c}. Received ${typeof r}`}}}),VN=J((e,t)=>{"use strict";var{ERR_FS_CP_DIR_TO_NON_DIR:i,ERR_FS_CP_EEXIST:u,ERR_FS_CP_EINVAL:n,ERR_FS_CP_FIFO_PIPE:l,ERR_FS_CP_NON_DIR_TO_DIR:c,ERR_FS_CP_SOCKET:r,ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY:s,ERR_FS_CP_UNKNOWN:o,ERR_FS_EISDIR:a,ERR_INVALID_ARG_TYPE:h}=GN(),{constants:{errno:{EEXIST:p,EISDIR:d,EINVAL:m,ENOTDIR:g}}}=require("os"),{chmod:f,copyFile:y,lstat:v,mkdir:E,readdir:b,readlink:w,stat:_,symlink:O,unlink:A,utimes:I}=require("internal/fs/promises"),{dirname:P,isAbsolute:L,join:j,parse:N,resolve:M,sep:B,toNamespacedPath:F}=require("path"),{fileURLToPath:D}=require("url"),H={dereference:!1,errorOnExist:!1,filter:void 0,force:!0,preserveTimestamps:!1,recursive:!1};async function G(ue,de,fe){if(fe!=null&&typeof fe!="object")throw new h("options",["Object"],fe);return k(F(x(ue)),F(x(de)),{...H,...fe})}S(G,"cp");function x(ue){return ue!=null&&ue.href&&ue.origin?D(ue):ue}S(x,"getValidatedPath");async function k(ue,de,fe){fe.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning("Using the preserveTimestamps option in 32-bit node is not recommended","TimestampPrecisionWarning");let ve=await T(ue,de,fe),{srcStat:be,destStat:xe}=ve;return await $(ue,be,de),fe.filter?U(X,xe,ue,de,fe):X(xe,ue,de,fe)}S(k,"cpFn");async function T(ue,de,fe){let{0:ve,1:be}=await q(ue,de,fe);if(be){if(C(ve,be))throw new n({message:"src and dest cannot be the same",path:de,syscall:"cp",errno:m});if(ve.isDirectory()&&!be.isDirectory())throw new i({message:`cannot overwrite directory ${ue} with non-directory ${de}`,path:de,syscall:"cp",errno:d});if(!ve.isDirectory()&&be.isDirectory())throw new c({message:`cannot overwrite non-directory ${ue} with directory ${de}`,path:de,syscall:"cp",errno:g})}if(ve.isDirectory()&&z(ue,de))throw new n({message:`cannot copy ${ue} to a subdirectory of self ${de}`,path:de,syscall:"cp",errno:m});return{srcStat:ve,destStat:be}}S(T,"checkPaths");function C(ue,de){return de.ino&&de.dev&&de.ino===ue.ino&&de.dev===ue.dev}S(C,"areIdentical");function q(ue,de,fe){let ve=fe.dereference?be=>_(be,{bigint:!0}):be=>v(be,{bigint:!0});return Promise.all([ve(ue),ve(de).catch(be=>{if(be.code==="ENOENT")return null;throw be})])}S(q,"getStats");async function X(ue,de,fe,ve){let be=P(fe);return await Y(be)||await E(be,{recursive:!0}),Z(ue,de,fe,ve)}S(X,"checkParentDir");function Y(ue){return _(ue).then(()=>!0,de=>de.code==="ENOENT"?!1:Promise.reject(de))}S(Y,"pathExists");async function $(ue,de,fe){let ve=M(P(ue)),be=M(P(fe));if(be===ve||be===N(be).root)return;let xe;try{xe=await _(be,{bigint:!0})}catch(He){if(He.code==="ENOENT")return;throw He}if(C(de,xe))throw new n({message:`cannot copy ${ue} to a subdirectory of self ${fe}`,path:fe,syscall:"cp",errno:m});return $(ue,de,be)}S($,"checkParentPaths");var V=S(ue=>M(ue).split(B).filter(Boolean),"normalizePathToArray");function z(ue,de){let fe=V(ue),ve=V(de);return fe.every((be,xe)=>ve[xe]===be)}S(z,"isSrcSubdir");async function U(ue,de,fe,ve,be,xe){if(await be.filter(fe,ve))return ue(de,fe,ve,be,xe)}S(U,"handleFilter");function K(ue,de,fe,ve){return ve.filter?U(Z,ue,de,fe,ve):Z(ue,de,fe,ve)}S(K,"startCopy");async function Z(ue,de,fe,ve){let be=await(ve.dereference?_:v)(de);if(be.isDirectory()&&ve.recursive)return he(be,ue,de,fe,ve);if(be.isDirectory())throw new a({message:`${de} is a directory (not copied)`,path:de,syscall:"cp",errno:m});if(be.isFile()||be.isCharacterDevice()||be.isBlockDevice())return Q(be,ue,de,fe,ve);if(be.isSymbolicLink())return ge(ue,de,fe);throw be.isSocket()?new r({message:`cannot copy a socket file: ${fe}`,path:fe,syscall:"cp",errno:m}):be.isFIFO()?new l({message:`cannot copy a FIFO pipe: ${fe}`,path:fe,syscall:"cp",errno:m}):new o({message:`cannot copy an unknown file type: ${fe}`,path:fe,syscall:"cp",errno:m})}S(Z,"getStatsForCopy");function Q(ue,de,fe,ve,be){return de?R(ue,fe,ve,be):W(ue,fe,ve,be)}S(Q,"onFile");async function R(ue,de,fe,ve){if(ve.force)return await A(fe),W(ue,de,fe,ve);if(ve.errorOnExist)throw new u({message:`${fe} already exists`,path:fe,syscall:"cp",errno:p})}S(R,"mayCopyFile");async function W(ue,de,fe,ve){return await y(de,fe),ve.preserveTimestamps?ee(ue.mode,de,fe):pe(fe,ue.mode)}S(W,"_copyFile");async function ee(ue,de,fe){return ne(ue)&&await te(fe,ue),le(ue,de,fe)}S(ee,"handleTimestampsAndMode");function ne(ue){return(ue&128)===0}S(ne,"fileIsNotWritable");function te(ue,de){return pe(ue,de|128)}S(te,"makeFileWritable");async function le(ue,de,fe){return await re(de,fe),pe(fe,ue)}S(le,"setDestTimestampsAndMode");function pe(ue,de){return f(ue,de)}S(pe,"setDestMode");async function re(ue,de){let fe=await _(ue);return I(de,fe.atime,fe.mtime)}S(re,"setDestTimestamps");function he(ue,de,fe,ve,be){return de?ce(fe,ve,be):ie(ue.mode,fe,ve,be)}S(he,"onDir");async function ie(ue,de,fe,ve){return await E(fe),await ce(de,fe,ve),pe(fe,ue)}S(ie,"mkDirAndCopy");async function ce(ue,de,fe){let ve=await b(ue);for(let be=0;be<ve.length;be++){let xe=ve[be],He=j(ue,xe),or=j(de,xe),{destStat:zS}=await T(He,or,fe);await K(zS,He,or,fe)}}S(ce,"copyDir");async function ge(ue,de,fe){let ve=await w(de);if(L(ve)||(ve=M(P(de),ve)),!ue)return O(ve,fe);let be;try{be=await w(fe)}catch(xe){if(xe.code==="EINVAL"||xe.code==="UNKNOWN")return O(ve,fe);throw xe}if(L(be)||(be=M(P(fe),be)),z(ve,be))throw new n({message:`cannot copy ${ve} to a subdirectory of self ${be}`,path:fe,syscall:"cp",errno:m});if((await _(de)).isDirectory()&&z(be,ve))throw new s({message:`cannot overwrite ${be} with ${ve}`,path:fe,syscall:"cp",errno:m});return ye(ve,fe)}S(ge,"onLink");async function ye(ue,de){return await A(de),O(ue,de)}S(ye,"copyLink"),t.exports=G}),WN=J((e,t)=>{var i=require("internal/fs/promises"),u=Eg(),n=HN(),l=VN(),c=n.satisfies(">=16.7.0"),r=S(async(s,o,a)=>{let h=u(a,{copy:["dereference","errorOnExist","filter","force","preserveTimestamps","recursive"]});return c?i.cp(s,o,h):l(s,o,h)},"cp");t.exports=r}),zN=J((e,t)=>{var{join:i,sep:u}=require("path"),n=Eg(),{mkdir:l,mkdtemp:c,rm:r}=require("internal/fs/promises"),s=S(async(o,a,h)=>{let p=n(h,{copy:["tmpPrefix"]});await l(o,{recursive:!0});let d=await c(i(`${o}${u}`,p.tmpPrefix||"")),m,g;try{g=await a(d)}catch(f){m=f}try{await r(d,{force:!0,recursive:!0})}catch{}if(m)throw m;return g},"withTempDir");t.exports=s}),qN=J((e,t)=>{var{readdir:i}=require("internal/fs/promises"),{join:u}=require("path"),n=S(async l=>{let c=[];for(let r of await i(l))if(r.startsWith("@"))for(let s of await i(u(l,r)))c.push(u(r,s));else c.push(r);return c},"readdirScoped");t.exports=n}),KN=J((e,t)=>{var{dirname:i,join:u,resolve:n,relative:l,isAbsolute:c}=require("path"),r=require("internal/fs/promises"),s=S(async a=>{try{return await r.access(a),!0}catch(h){return h.code!=="ENOENT"}},"pathExists"),o=S(async(a,h,p={},d=!0,m=[])=>{if(!a||!h)throw new TypeError("`source` and `destination` file required");if(p={overwrite:!0,...p},!p.overwrite&&await s(h))throw new Error(`The destination file exists: ${h}`);await r.mkdir(i(h),{recursive:!0});try{await r.rename(a,h)}catch(g){if(g.code==="EXDEV"||g.code==="EPERM"){let f=await r.lstat(a);if(f.isDirectory()){let y=await r.readdir(a);await Promise.all(y.map(v=>o(u(a,v),u(h,v),p,!1,m)))}else f.isSymbolicLink()?m.push({source:a,destination:h}):await r.copyFile(a,h)}else throw g}d&&(await Promise.all(m.map(async({source:g,destination:f})=>{let y=await r.readlink(g);c(y)&&(y=n(f,l(g,y)));let v="file";try{v=await r.stat(n(i(g),y)),v.isDirectory()&&(v="junction")}catch{}await r.symlink(y,f,v)})),await r.rm(a,{recursive:!0,force:!0}))},"moveFile");t.exports=o}),Zl=J((e,t)=>{"use strict";var i=WN(),u=zN(),n=qN(),l=KN();t.exports={cp:i,withTempDir:u,readdirScoped:n,moveFile:l}}),Ki={};Rx(Ki,{default:()=>bg,pMapIterable:()=>wg,pMapSkip:()=>Rr});async function bg(e,t,{concurrency:i=Number.POSITIVE_INFINITY,stopOnError:u=!0,signal:n}={}){return new Promise((l,c)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(i)&&i>=1||i===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${i}\` (${typeof i})`);let r=[],s=[],o=new Map,a=!1,h=!1,p=!1,d=0,m=0,g=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),f=S(()=>{E(n.reason)},"signalListener"),y=S(()=>{n?.removeEventListener("abort",f)},"cleanup"),v=S(w=>{l(w),y()},"resolve"),E=S(w=>{a=!0,h=!0,c(w),y()},"reject");n&&(n.aborted&&E(n.reason),n.addEventListener("abort",f,{once:!0}));let b=S(async()=>{if(h)return;let w=await g.next(),_=m;if(m++,w.done){if(p=!0,d===0&&!h){if(!u&&s.length>0){E(new AggregateError(s));return}if(h=!0,o.size===0){v(r);return}let O=[];for(let[A,I]of r.entries())o.get(A)!==Rr&&O.push(I);v(O)}return}d++,(async()=>{try{let O=await w.value;if(h)return;let A=await t(O,_);A===Rr&&o.set(_,A),r[_]=A,d--,await b()}catch(O){if(u)E(O);else{s.push(O),d--;try{await b()}catch(A){E(A)}}}})()},"next");(async()=>{for(let w=0;w<i;w++){try{await b()}catch(_){E(_);break}if(p||a)break}})()})}function wg(e,t,{concurrency:i=Number.POSITIVE_INFINITY,backpressure:u=i}={}){if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(i)&&i>=1||i===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${i}\` (${typeof i})`);if(!(Number.isSafeInteger(u)&&u>=i||u===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${i}) and up or \`Infinity\`, got \`${u}\` (${typeof u})`);return{async*[Symbol.asyncIterator](){let n=e[Symbol.asyncIterator]===void 0?e[Symbol.iterator]():e[Symbol.asyncIterator](),l=[],c=0,r=!1,s=0;function o(){if(r||!(c<i&&l.length<u))return;let a=(async()=>{let{done:h,value:p}=await n.next();if(h)return{done:!0};c++,o();try{let d=await t(await p,s++);if(c--,d===Rr){let m=l.indexOf(a);m>0&&l.splice(m,1)}return o(),{done:!1,value:d}}catch(d){return r=!0,{error:d}}})();l.push(a)}for(S(o,"trySpawn"),o();l.length>0;){let{error:a,done:h,value:p}=await l[0];if(l.shift(),a)throw a;if(h)return;o(),p!==Rr&&(yield p)}}}}var Rr,yl=Ox(()=>{S(bg,"pMap"),S(wg,"pMapIterable"),Rr=Symbol("skip")}),Es=J((e,t)=>{"use strict";var i=require("crypto"),{appendFile:u,mkdir:n,readFile:l,readdir:c,rm:r,writeFile:s}=require("internal/fs/promises"),{Minipass:o}=ke(),a=require("path"),h=Dt(),p=yg(),d=Ss(),m=Sg(),g=vg()["cache-version"].index,{moveFile:f}=Zl(),y=5;t.exports.NotFoundError=class extends Error{static{S(this,"NotFoundError")}constructor(D,H){super(`No cache entry for ${H} found in ${D}`),this.code="ENOENT",this.cache=D,this.key=H}},t.exports.compact=v;async function v(D,H,G,x={}){let k=L(D,H),T=await A(k),C=[];for(let z=T.length-1;z>=0;--z){let U=T[z];if(U.integrity===null&&!x.validateEntry)break;(!x.validateEntry||x.validateEntry(U)===!0)&&(C.length===0||!C.find(K=>G(K,U)))&&C.unshift(U)}let q=`
38
- `+C.map(z=>{let U=JSON.stringify(z);return`${N(U)} ${U}`}).join(`
39
- `),X=S(async()=>{let z=p(a.join(D,"tmp"),x.tmpPrefix);return await n(a.dirname(z),{recursive:!0}),{target:z,moved:!1}},"setup"),Y=S(async z=>{if(!z.moved)return r(z.target,{recursive:!0,force:!0})},"teardown"),$=S(async z=>{await s(z.target,q,{flag:"wx"}),await n(a.dirname(k),{recursive:!0}),await f(z.target,k),z.moved=!0},"write"),V=await X();try{await $(V)}finally{await Y(V)}return C.reverse().map(z=>B(D,z,!0))}S(v,"compact"),t.exports.insert=E;async function E(D,H,G,x={}){let{metadata:k,size:T,time:C}=x,q=L(D,H),X={key:H,integrity:G&&h.stringify(G),time:C||Date.now(),size:T,metadata:k};try{await n(a.dirname(q),{recursive:!0});let Y=JSON.stringify(X);await u(q,`
40
- ${N(Y)} ${Y}`)}catch(Y){if(Y.code==="ENOENT")return;throw Y}return B(D,X)}S(E,"insert"),t.exports.find=b;async function b(D,H){let G=L(D,H);try{return(await A(G)).reduce((x,k)=>k&&k.key===H?B(D,k):x,null)}catch(x){if(x.code==="ENOENT")return null;throw x}}S(b,"find"),t.exports.delete=w;function w(D,H,G={}){if(!G.removeFully)return E(D,H,null,G);let x=L(D,H);return r(x,{recursive:!0,force:!0})}S(w,"del"),t.exports.lsStream=_;function _(D){let H=P(D),G=new o({objectMode:!0});return Promise.resolve().then(async()=>{let{default:x}=await Promise.resolve().then(()=>(yl(),Ki)),k=await F(H);return await x(k,async T=>{let C=a.join(H,T),q=await F(C);await x(q,async X=>{let Y=a.join(C,X),$=await F(Y);await x($,async V=>{let z=a.join(Y,V);try{let U=(await A(z)).reduce((K,Z)=>(K.set(Z.key,Z),K),new Map);for(let K of U.values()){let Z=B(D,K);Z&&G.write(Z)}}catch(U){if(U.code==="ENOENT")return;throw U}},{concurrency:y})},{concurrency:y})},{concurrency:y}),G.end(),G}).catch(x=>G.emit("error",x)),G}S(_,"lsStream"),t.exports.ls=O;async function O(D){return(await _(D).collect()).reduce((H,G)=>(H[G.key]=G,H),{})}S(O,"ls"),t.exports.bucketEntries=A;async function A(D,H){let G=await l(D,"utf8");return I(G,H)}S(A,"bucketEntries");function I(D){let H=[];return D.split(`
41
- `).forEach(G=>{if(!G)return;let x=G.split(" ");if(!x[1]||N(x[1])!==x[0])return;let k;try{k=JSON.parse(x[1])}catch{}k&&H.push(k)}),H}S(I,"_bucketEntries"),t.exports.bucketDir=P;function P(D){return a.join(D,`index-v${g}`)}S(P,"bucketDir"),t.exports.bucketPath=L;function L(D,H){let G=j(H);return a.join.apply(a,[P(D)].concat(m(G)))}S(L,"bucketPath"),t.exports.hashKey=j;function j(D){return M(D,"sha256")}S(j,"hashKey"),t.exports.hashEntry=N;function N(D){return M(D,"sha1")}S(N,"hashEntry");function M(D,H){return i.createHash(H).update(D).digest("hex")}S(M,"hash");function B(D,H,G){return!H.integrity&&!G?null:{key:H.key,integrity:H.integrity,path:H.integrity?d(D,H.integrity):void 0,size:H.size,time:H.time,metadata:H.metadata}}S(B,"formatEntry");function F(D){return c(D).catch(H=>{if(H.code==="ENOENT"||H.code==="ENOTDIR")return[];throw H})}S(F,"readdirOrEmpty")}),tn=J((e,t)=>{"use strict";var{LRUCache:i}=Cr(),u=new i({max:500,maxSize:50*1024*1024,ttl:180*1e3,sizeCalculation:S((h,p)=>p.startsWith("key:")?h.data.length:h.length,"sizeCalculation")});t.exports.clearMemoized=n;function n(){let h={};return u.forEach((p,d)=>{h[d]=p}),u.clear(),h}S(n,"clearMemoized"),t.exports.put=l;function l(h,p,d,m){a(m).set(`key:${h}:${p.key}`,{entry:p,data:d}),c(h,p.integrity,d,m)}S(l,"put"),t.exports.put.byDigest=c;function c(h,p,d,m){a(m).set(`digest:${h}:${p}`,d)}S(c,"putDigest"),t.exports.get=r;function r(h,p,d){return a(d).get(`key:${h}:${p}`)}S(r,"get"),t.exports.get.byDigest=s;function s(h,p,d){return a(d).get(`digest:${h}:${p}`)}S(s,"getDigest");var o=class{static{S(this,"ObjProxy")}constructor(h){this.obj=h}get(h){return this.obj[h]}set(h,p){this.obj[h]=p}};function a(h){return!h||!h.memoize?u:h.memoize.get&&h.memoize.set?h.memoize:typeof h.memoize=="object"?new o(h.memoize):u}S(a,"pickMem")}),bs=J(e=>{"use strict";var{Minipass:t}=ke(),i=require("events").EventEmitter,u=require("fs"),n=u.writev,l=Symbol("_autoClose"),c=Symbol("_close"),r=Symbol("_ended"),s=Symbol("_fd"),o=Symbol("_finished"),a=Symbol("_flags"),h=Symbol("_flush"),p=Symbol("_handleChunk"),d=Symbol("_makeBuf"),m=Symbol("_mode"),g=Symbol("_needDrain"),f=Symbol("_onerror"),y=Symbol("_onopen"),v=Symbol("_onread"),E=Symbol("_onwrite"),b=Symbol("_open"),w=Symbol("_path"),_=Symbol("_pos"),O=Symbol("_queue"),A=Symbol("_read"),I=Symbol("_readSize"),P=Symbol("_reading"),L=Symbol("_remain"),j=Symbol("_size"),N=Symbol("_write"),M=Symbol("_writing"),B=Symbol("_defaultFlag"),F=Symbol("_errored"),D=class extends t{static{S(this,"ReadStream")}constructor(k,T){if(T=T||{},super(T),this.readable=!0,this.writable=!1,typeof k!="string")throw new TypeError("path must be a string");this[F]=!1,this[s]=typeof T.fd=="number"?T.fd:null,this[w]=k,this[I]=T.readSize||16*1024*1024,this[P]=!1,this[j]=typeof T.size=="number"?T.size:1/0,this[L]=this[j],this[l]=typeof T.autoClose=="boolean"?T.autoClose:!0,typeof this[s]=="number"?this[A]():this[b]()}get fd(){return this[s]}get path(){return this[w]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[b](){u.open(this[w],"r",(k,T)=>this[y](k,T))}[y](k,T){k?this[f](k):(this[s]=T,this.emit("open",T),this[A]())}[d](){return Buffer.allocUnsafe(Math.min(this[I],this[L]))}[A](){if(!this[P]){this[P]=!0;let k=this[d]();if(k.length===0)return process.nextTick(()=>this[v](null,0,k));u.read(this[s],k,0,k.length,null,(T,C,q)=>this[v](T,C,q))}}[v](k,T,C){this[P]=!1,k?this[f](k):this[p](T,C)&&this[A]()}[c](){if(this[l]&&typeof this[s]=="number"){let k=this[s];this[s]=null,u.close(k,T=>T?this.emit("error",T):this.emit("close"))}}[f](k){this[P]=!0,this[c](),this.emit("error",k)}[p](k,T){let C=!1;return this[L]-=k,k>0&&(C=super.write(k<T.length?T.slice(0,k):T)),(k===0||this[L]<=0)&&(C=!1,this[c](),super.end()),C}emit(k,T){switch(k){case"prefinish":case"finish":break;case"drain":typeof this[s]=="number"&&this[A]();break;case"error":return this[F]?void 0:(this[F]=!0,super.emit(k,T));default:return super.emit(k,T)}}},H=class extends D{static{S(this,"ReadStreamSync")}[b](){let k=!0;try{this[y](null,u.openSync(this[w],"r")),k=!1}finally{k&&this[c]()}}[A](){let k=!0;try{if(!this[P]){this[P]=!0;do{let T=this[d](),C=T.length===0?0:u.readSync(this[s],T,0,T.length,null);if(!this[p](C,T))break}while(!0);this[P]=!1}k=!1}finally{k&&this[c]()}}[c](){if(this[l]&&typeof this[s]=="number"){let k=this[s];this[s]=null,u.closeSync(k),this.emit("close")}}},G=class extends i{static{S(this,"WriteStream")}constructor(k,T){T=T||{},super(T),this.readable=!1,this.writable=!0,this[F]=!1,this[M]=!1,this[r]=!1,this[g]=!1,this[O]=[],this[w]=k,this[s]=typeof T.fd=="number"?T.fd:null,this[m]=T.mode===void 0?438:T.mode,this[_]=typeof T.start=="number"?T.start:null,this[l]=typeof T.autoClose=="boolean"?T.autoClose:!0;let C=this[_]!==null?"r+":"w";this[B]=T.flags===void 0,this[a]=this[B]?C:T.flags,this[s]===null&&this[b]()}emit(k,T){if(k==="error"){if(this[F])return;this[F]=!0}return super.emit(k,T)}get fd(){return this[s]}get path(){return this[w]}[f](k){this[c](),this[M]=!0,this.emit("error",k)}[b](){u.open(this[w],this[a],this[m],(k,T)=>this[y](k,T))}[y](k,T){this[B]&&this[a]==="r+"&&k&&k.code==="ENOENT"?(this[a]="w",this[b]()):k?this[f](k):(this[s]=T,this.emit("open",T),this[M]||this[h]())}end(k,T){return k&&this.write(k,T),this[r]=!0,!this[M]&&!this[O].length&&typeof this[s]=="number"&&this[E](null,0),this}write(k,T){return typeof k=="string"&&(k=Buffer.from(k,T)),this[r]?(this.emit("error",new Error("write() after end()")),!1):this[s]===null||this[M]||this[O].length?(this[O].push(k),this[g]=!0,!1):(this[M]=!0,this[N](k),!0)}[N](k){u.write(this[s],k,0,k.length,this[_],(T,C)=>this[E](T,C))}[E](k,T){k?this[f](k):(this[_]!==null&&(this[_]+=T),this[O].length?this[h]():(this[M]=!1,this[r]&&!this[o]?(this[o]=!0,this[c](),this.emit("finish")):this[g]&&(this[g]=!1,this.emit("drain"))))}[h](){if(this[O].length===0)this[r]&&this[E](null,0);else if(this[O].length===1)this[N](this[O].pop());else{let k=this[O];this[O]=[],n(this[s],k,this[_],(T,C)=>this[E](T,C))}}[c](){if(this[l]&&typeof this[s]=="number"){let k=this[s];this[s]=null,u.close(k,T=>T?this.emit("error",T):this.emit("close"))}}},x=class extends G{static{S(this,"WriteStreamSync")}[b](){let k;if(this[B]&&this[a]==="r+")try{k=u.openSync(this[w],this[a],this[m])}catch(T){if(T.code==="ENOENT")return this[a]="w",this[b]();throw T}else k=u.openSync(this[w],this[a],this[m]);this[y](null,k)}[c](){if(this[l]&&typeof this[s]=="number"){let k=this[s];this[s]=null,u.closeSync(k),this.emit("close")}}[N](k){let T=!0;try{this[E](null,u.writeSync(this[s],k,0,k.length,this[_])),T=!1}finally{if(T)try{this[c]()}catch{}}}};e.ReadStream=D,e.ReadStreamSync=H,e.WriteStream=G,e.WriteStreamSync=x}),_g=J((e,t)=>{"use strict";var i=require("internal/fs/promises"),u=bs(),n=Dt(),l=Ss(),c=vs();t.exports=s;var r=64*1024*1024;async function s(f,y,v={}){let{size:E}=v,{stat:b,cpath:w,sri:_}=await d(f,y,async(A,I)=>({stat:E?{size:E}:await i.stat(A),cpath:A,sri:I}));if(b.size>r)return o(w,b.size,_,new c).concat();let O=await i.readFile(w,{encoding:null});if(b.size!==O.length)throw m(b.size,O.length);if(!n.checkData(O,_))throw g(_,w);return O}S(s,"read");var o=S((f,y,v,E)=>(E.push(new u.ReadStream(f,{size:y,readSize:r}),n.integrityStream({integrity:v,size:y})),E),"readPipeline");t.exports.stream=a,t.exports.readStream=a;function a(f,y,v={}){let{size:E}=v,b=new c;return Promise.resolve().then(async()=>{let{stat:w,cpath:_,sri:O}=await d(f,y,async(A,I)=>({stat:E?{size:E}:await i.stat(A),cpath:A,sri:I}));return o(_,w.size,O,b)}).catch(w=>b.emit("error",w)),b}S(a,"readStream"),t.exports.copy=h;function h(f,y,v){return d(f,y,E=>i.copyFile(E,v))}S(h,"copy"),t.exports.hasContent=p;async function p(f,y){if(!y)return!1;try{return await d(f,y,async(v,E)=>{let b=await i.stat(v);return{size:b.size,sri:E,stat:b}})}catch(v){if(v.code==="ENOENT")return!1;if(v.code==="EPERM"){if(process.platform!=="win32")throw v;return!1}}}S(p,"hasContent");async function d(f,y,v){let E=n.parse(y),b=E.pickAlgorithm(),w=E[b];if(w.length<=1){let _=l(f,w[0]);return v(_,w[0])}else{let _=await Promise.all(w.map(async I=>{try{return await d(f,I,v)}catch(P){return P.code==="ENOENT"?Object.assign(new Error("No matching content found for "+E.toString()),{code:"ENOENT"}):P}})),O=_.find(I=>!(I instanceof Error));if(O)return O;throw _.find(I=>I.code==="ENOENT")||_.find(I=>I instanceof Error)}}S(d,"withContentSri");function m(f,y){let v=new Error(`Bad data size: expected inserted data to be ${f} bytes, but got ${y} instead`);return v.expected=f,v.found=y,v.code="EBADSIZE",v}S(m,"sizeError");function g(f,y){let v=new Error(`Integrity verification failed for ${f} (${y})`);return v.code="EINTEGRITY",v.sri=f,v.path=y,v}S(g,"integrityError")}),JN=J((e,t)=>{"use strict";var i=gg(),{Minipass:u}=ke(),n=vs(),l=Es(),c=tn(),r=_g();async function s(f,y,v={}){let{integrity:E,memoize:b,size:w}=v,_=c.get(f,y,v);if(_&&b!==!1)return{metadata:_.entry.metadata,data:_.data,integrity:_.entry.integrity,size:_.entry.size};let O=await l.find(f,y,v);if(!O)throw new l.NotFoundError(f,y);let A=await r(f,O.integrity,{integrity:E,size:w});return b&&c.put(f,O,A,v),{data:A,metadata:O.metadata,size:O.size,integrity:O.integrity}}S(s,"getData"),t.exports=s;async function o(f,y,v={}){let{integrity:E,memoize:b,size:w}=v,_=c.get.byDigest(f,y,v);if(_&&b!==!1)return _;let O=await r(f,y,{integrity:E,size:w});return b&&c.put.byDigest(f,y,O,v),O}S(o,"getDataByDigest"),t.exports.byDigest=o;var a=S(f=>{let y=new u;return y.on("newListener",function(v,E){v==="metadata"&&E(f.entry.metadata),v==="integrity"&&E(f.entry.integrity),v==="size"&&E(f.entry.size)}),y.end(f.data),y},"getMemoizedStream");function h(f,y,v={}){let{memoize:E,size:b}=v,w=c.get(f,y,v);if(w&&E!==!1)return a(w);let _=new n;return Promise.resolve().then(async()=>{let O=await l.find(f,y);if(!O)throw new l.NotFoundError(f,y);_.emit("metadata",O.metadata),_.emit("integrity",O.integrity),_.emit("size",O.size),_.on("newListener",function(I,P){I==="metadata"&&P(O.metadata),I==="integrity"&&P(O.integrity),I==="size"&&P(O.size)});let A=r.readStream(f,O.integrity,{...v,size:typeof b!="number"?O.size:b});if(E){let I=new i.PassThrough;I.on("collect",P=>c.put(f,O,P,v)),_.unshift(I)}return _.unshift(A),_}).catch(O=>_.emit("error",O)),_}S(h,"getStream"),t.exports.stream=h;function p(f,y,v={}){let{memoize:E}=v,b=c.get.byDigest(f,y,v);if(b&&E!==!1){let w=new u;return w.end(b),w}else{let w=r.readStream(f,y,v);if(!E)return w;let _=new i.PassThrough;return _.on("collect",O=>c.put.byDigest(f,y,O,v)),new n(w,_)}}S(p,"getStreamDigest"),t.exports.stream.byDigest=p;function d(f,y,v={}){let{memoize:E}=v,b=c.get(f,y,v);return b&&E!==!1?Promise.resolve(b.entry):l.find(f,y)}S(d,"info"),t.exports.info=d;async function m(f,y,v,E={}){let b=await l.find(f,y,E);if(!b)throw new l.NotFoundError(f,y);return await r.copy(f,b.integrity,v,E),{metadata:b.metadata,size:b.size,integrity:b.integrity}}S(m,"copy"),t.exports.copy=m;async function g(f,y,v,E={}){return await r.copy(f,y,v,E),y}S(g,"copyByDigest"),t.exports.copy.byDigest=g,t.exports.hasContent=r.hasContent}),Yl=J((e,t)=>{var i=Xl(),u=Symbol("_flush"),n=Symbol("_flushed"),l=Symbol("_flushing"),c=class extends i{static{S(this,"Flush")}constructor(r={}){if(typeof r=="function"&&(r={flush:r}),super(r),typeof r.flush!="function"&&typeof this.flush!="function")throw new TypeError("must provide flush function in options");this[u]=r.flush||this.flush}emit(r,...s){if(r!=="end"&&r!=="finish"||this[n])return super.emit(r,...s);if(this[l])return;this[l]=!0;let o=S(h=>{this[n]=!0,h?super.emit("error",h):super.emit("end")},"afterFlush"),a=this[u](o);a&&a.then&&a.then(()=>o(),h=>o(h))}};t.exports=c}),XN=J((e,t)=>{"use strict";var i=require("events"),u=Ss(),n=require("internal/fs/promises"),{moveFile:l}=Zl(),{Minipass:c}=ke(),r=vs(),s=Yl(),o=require("path"),a=Dt(),h=yg(),p=bs();t.exports=m;var d=new Map;async function m(O,A,I={}){let{algorithms:P,size:L,integrity:j}=I;if(typeof L=="number"&&A.length!==L)throw w(L,A.length);let N=a.fromData(A,P?{algorithms:P}:{});if(j&&!a.checkData(A,j,I))throw _(j,N);for(let M in N){let B=await E(O,I),F=N[M].toString();try{await n.writeFile(B.target,A,{flag:"wx"}),await b(B,O,F,I)}finally{B.moved||await n.rm(B.target,{recursive:!0,force:!0})}}return{integrity:N,size:A.length}}S(m,"write"),t.exports.stream=f;var g=class extends s{static{S(this,"CacacheWriteStream")}constructor(O,A){super(),this.opts=A,this.cache=O,this.inputStream=new c,this.inputStream.on("error",I=>this.emit("error",I)),this.inputStream.on("drain",()=>this.emit("drain")),this.handleContentP=null}write(O,A,I){return this.handleContentP||(this.handleContentP=y(this.inputStream,this.cache,this.opts),this.handleContentP.catch(P=>this.emit("error",P))),this.inputStream.write(O,A,I)}flush(O){this.inputStream.end(()=>{if(!this.handleContentP){let A=new Error("Cache input stream was empty");return A.code="ENODATA",Promise.reject(A).catch(O)}this.handleContentP.then(A=>{A.integrity&&this.emit("integrity",A.integrity),A.size!==null&&this.emit("size",A.size),O()},A=>O(A))})}};function f(O,A={}){return new g(O,A)}S(f,"writeStream");async function y(O,A,I){let P=await E(A,I);try{let L=await v(O,A,P.target,I);return await b(P,A,L.integrity,I),L}finally{P.moved||await n.rm(P.target,{recursive:!0,force:!0})}}S(y,"handleContent");async function v(O,A,I,P){let L=new p.WriteStream(I,{flags:"wx"});if(P.integrityEmitter){let[B,F]=await Promise.all([i.once(P.integrityEmitter,"integrity").then(D=>D[0]),i.once(P.integrityEmitter,"size").then(D=>D[0]),new r(O,L).promise()]);return{integrity:B,size:F}}let j,N,M=a.integrityStream({integrity:P.integrity,algorithms:P.algorithms,size:P.size});return M.on("integrity",B=>{j=B}),M.on("size",B=>{N=B}),await new r(O,M,L).promise(),{integrity:j,size:N}}S(v,"pipeToTmp");async function E(O,A){let I=h(o.join(O,"tmp"),A.tmpPrefix);return await n.mkdir(o.dirname(I),{recursive:!0}),{target:I,moved:!1}}S(E,"makeTmp");async function b(O,A,I){let P=u(A,I),L=o.dirname(P);return d.has(P)||d.set(P,n.mkdir(L,{recursive:!0}).then(async()=>(await l(O.target,P,{overwrite:!1}),O.moved=!0,O.moved)).catch(j=>{if(!j.message.startsWith("The destination file exists"))throw Object.assign(j,{code:"EEXIST"})}).finally(()=>{d.delete(P)})),d.get(P)}S(b,"moveToDestination");function w(O,A){let I=new Error(`Bad data size: expected inserted data to be ${O} bytes, but got ${A} instead`);return I.expected=O,I.found=A,I.code="EBADSIZE",I}S(w,"sizeError");function _(O,A){let I=new Error(`Integrity check failed:
42
- Wanted: ${O}
43
- Found: ${A}`);return I.code="EINTEGRITY",I.expected=O,I.found=A,I}S(_,"checksumError")}),ZN=J((e,t)=>{"use strict";var i=Es(),u=tn(),n=XN(),l=Yl(),{PassThrough:c}=gg(),r=vs(),s=S(h=>({algorithms:["sha512"],...h}),"putOpts");t.exports=o;async function o(h,p,d,m={}){let{memoize:g}=m;m=s(m);let f=await n(h,d,m),y=await i.insert(h,p,f.integrity,{...m,size:f.size});return g&&u.put(h,y,d,m),f.integrity}S(o,"putData"),t.exports.stream=a;function a(h,p,d={}){let{memoize:m}=d;d=s(d);let g,f,y,v,E=new r;if(m){let w=new c().on("collect",_=>{v=_});E.push(w)}let b=n.stream(h,d).on("integrity",w=>{g=w}).on("size",w=>{f=w}).on("error",w=>{y=w});return E.push(b),E.push(new l({async flush(){if(!y){let w=await i.insert(h,p,g,{...d,size:f});m&&v&&u.put(h,w,v,d),E.emit("integrity",g),E.emit("size",f)}}})),E}S(a,"putStream")}),Og=J((e,t)=>{"use strict";var{glob:i}=Qf(),u=require("path"),n=S(l=>l.split(u.win32.sep).join(u.posix.sep),"globify");t.exports=(l,c)=>i(n(l),c)}),YN=J((e,t)=>{"use strict";var i=require("internal/fs/promises"),u=Ss(),{hasContent:n}=_g();t.exports=l;async function l(c,r){let s=await n(c,r);return s&&s.sri?(await i.rm(u(c,s.sri),{recursive:!0,force:!0}),!0):!1}S(l,"rm")}),QN=J((e,t)=>{"use strict";var{rm:i}=require("internal/fs/promises"),u=Og(),n=Es(),l=tn(),c=require("path"),r=YN();t.exports=s,t.exports.entry=s;function s(h,p,d){return l.clearMemoized(),n.delete(h,p,d)}S(s,"entry"),t.exports.content=o;function o(h,p){return l.clearMemoized(),r(h,p)}S(o,"content"),t.exports.all=a;async function a(h){l.clearMemoized();let p=await u(c.join(h,"*(content-*|index-*)"),{silent:!0,nosort:!0});return Promise.all(p.map(d=>i(d,{recursive:!0,force:!0})))}S(a,"all")}),ek=J((e,t)=>{"use strict";var{mkdir:i,readFile:u,rm:n,stat:l,truncate:c,writeFile:r}=require("internal/fs/promises"),s=Ss(),o=bs(),a=Og(),h=Es(),p=require("path"),d=Dt(),m=S((L,j)=>Object.prototype.hasOwnProperty.call(L,j),"hasOwnProperty"),g=S(L=>({concurrency:20,log:{silly(){}},...L}),"verifyOpts");t.exports=f;async function f(L,j){j=g(j),j.log.silly("verify","verifying cache at",L);let N=[y,E,b,_,A,I,v],M={};for(let B of N){let F=B.name,D=new Date,H=await B(L,j);H&&Object.keys(H).forEach(x=>{M[x]=H[x]});let G=new Date;M.runTime||(M.runTime={}),M.runTime[F]=G-D}return M.runTime.total=M.endTime-M.startTime,j.log.silly("verify","verification finished for",L,"in",`${M.runTime.total}ms`),M}S(f,"verify");async function y(){return{startTime:new Date}}S(y,"markStartTime");async function v(){return{endTime:new Date}}S(v,"markEndTime");async function E(L,j){return j.log.silly("verify","fixing cache permissions"),await i(L,{recursive:!0}),null}S(E,"fixPerms");async function b(L,j){j.log.silly("verify","garbage collecting content");let{default:N}=await Promise.resolve().then(()=>(yl(),Ki)),M=h.lsStream(L),B=new Set;M.on("data",G=>{if(j.filter&&!j.filter(G))return;let x=d.parse(G.integrity);for(let k in x)B.add(x[k].toString())}),await new Promise((G,x)=>{M.on("end",G).on("error",x)});let F=s.contentDir(L),D=await a(p.join(F,"**"),{follow:!1,nodir:!0,nosort:!0}),H={verifiedContent:0,reclaimedCount:0,reclaimedSize:0,badContentCount:0,keptSize:0};return await N(D,async G=>{let x=G.split(/[/\\]/),k=x.slice(x.length-3).join(""),T=x[x.length-4],C=d.fromHex(k,T);if(B.has(C.toString())){let q=await w(G,C);q.valid?(H.verifiedContent++,H.keptSize+=q.size):(H.reclaimedCount++,H.badContentCount++,H.reclaimedSize+=q.size)}else{H.reclaimedCount++;let q=await l(G);await n(G,{recursive:!0,force:!0}),H.reclaimedSize+=q.size}return H},{concurrency:j.concurrency}),H}S(b,"garbageCollect");async function w(L,j){let N={};try{let{size:M}=await l(L);N.size=M,N.valid=!0,await d.checkStream(new o.ReadStream(L),j)}catch(M){if(M.code==="ENOENT")return{size:0,valid:!1};if(M.code!=="EINTEGRITY")throw M;await n(L,{recursive:!0,force:!0}),N.valid=!1}return N}S(w,"verifyContent");async function _(L,j){j.log.silly("verify","rebuilding index");let{default:N}=await Promise.resolve().then(()=>(yl(),Ki)),M=await h.ls(L),B={missingContent:0,rejectedEntries:0,totalEntries:0},F={};for(let D in M)if(m(M,D)){let H=h.hashKey(D),G=M[D],x=j.filter&&!j.filter(G);x&&B.rejectedEntries++,F[H]&&!x?F[H].push(G):F[H]&&x||(x?(F[H]=[],F[H]._path=h.bucketPath(L,D)):(F[H]=[G],F[H]._path=h.bucketPath(L,D)))}return await N(Object.keys(F),D=>O(L,F[D],B,j),{concurrency:j.concurrency}),B}S(_,"rebuildIndex");async function O(L,j,N){await c(j._path);for(let M of j){let B=s(L,M.integrity);try{await l(B),await h.insert(L,M.key,M.integrity,{metadata:M.metadata,size:M.size,time:M.time}),N.totalEntries++}catch(F){if(F.code==="ENOENT")N.rejectedEntries++,N.missingContent++;else throw F}}}S(O,"rebuildBucket");function A(L,j){return j.log.silly("verify","cleaning tmp directory"),n(p.join(L,"tmp"),{recursive:!0,force:!0})}S(A,"cleanTmp");async function I(L,j){let N=p.join(L,"_lastverified");return j.log.silly("verify","writing verifile to "+N),r(N,`${Date.now()}`)}S(I,"writeVerifile"),t.exports.lastRun=P;async function P(L){let j=await u(p.join(L,"_lastverified"),{encoding:"utf8"});return new Date(+j)}S(P,"lastRun")}),tk=J((e,t)=>{"use strict";var{withTempDir:i}=Zl(),u=require("internal/fs/promises"),n=require("path");t.exports.mkdir=l;async function l(r,s={}){let{tmpPrefix:o}=s,a=n.join(r,"tmp");await u.mkdir(a,{recursive:!0,owner:"inherit"});let h=`${a}${n.sep}${o||""}`;return u.mkdtemp(h,{owner:"inherit"})}S(l,"mktmpdir"),t.exports.withTmp=c;function c(r,s,o){return o||(o=s,s={}),i(n.join(r,"tmp"),o,s)}S(c,"withTmp")}),rn=J((e,t)=>{"use strict";var i=JN(),u=ZN(),n=QN(),l=ek(),{clearMemoized:c}=tn(),r=tk(),s=Es();t.exports.index={},t.exports.index.compact=s.compact,t.exports.index.insert=s.insert,t.exports.ls=s.ls,t.exports.ls.stream=s.lsStream,t.exports.get=i,t.exports.get.byDigest=i.byDigest,t.exports.get.stream=i.stream,t.exports.get.stream.byDigest=i.stream.byDigest,t.exports.get.copy=i.copy,t.exports.get.copy.byDigest=i.copy.byDigest,t.exports.get.info=i.info,t.exports.get.hasContent=i.hasContent,t.exports.put=u,t.exports.put.stream=u.stream,t.exports.rm=n.entry,t.exports.rm.all=n.all,t.exports.rm.entry=t.exports.rm,t.exports.rm.content=n.content,t.exports.clearMemoized=c,t.exports.tmp={},t.exports.tmp.mkdir=r.mkdir,t.exports.tmp.withTmp=r.withTmp,t.exports.verify=l,t.exports.verify.lastRun=l.lastRun}),rk=J((e,t)=>{"use strict";var i=require("fs"),u=require("path"),n=require("events").EventEmitter,l=ql(),c=class Rg extends n{static{S(this,"BundleWalker")}constructor(d){if(d=d||{},super(d),this.path=u.resolve(d.path||process.cwd()),this.parent=d.parent||null,this.parent){if(this.result=this.parent.result,!this.parent.parent){let m=u.basename(this.path),g=u.basename(u.dirname(this.path));this.result.add(/^@/.test(g)?g+"/"+m:m)}this.root=this.parent.root,this.packageJsonCache=this.parent.packageJsonCache}else this.result=new Set,this.root=this.path,this.packageJsonCache=d.packageJsonCache||new Map;this.seen=new Set,this.didDone=!1,this.children=0,this.node_modules=[],this.package=null,this.bundle=null}addListener(d,m){return this.on(d,m)}on(d,m){let g=super.on(d,m);return d==="done"&&this.didDone&&this.emit("done",this.result),g}done(){if(!this.didDone)if(this.didDone=!0,this.parent)this.emit("done");else{let d=Array.from(this.result);this.result=d,this.emit("done",d)}}start(){let d=u.resolve(this.path,"package.json");return this.packageJsonCache.has(d)?this.onPackage(this.packageJsonCache.get(d)):this.readPackageJson(d),this}readPackageJson(d){i.readFile(d,(m,g)=>m?this.done():this.onPackageJson(d,g))}onPackageJson(d,m){try{this.package=l(JSON.parse(m+""))}catch{return this.done()}this.packageJsonCache.set(d,this.package),this.onPackage(this.package)}allDepsBundled(d){return Object.keys(d.dependencies||{}).concat(Object.keys(d.optionalDependencies||{}))}onPackage(d){let m=this.parent?this.allDepsBundled(d):d.bundleDependencies||d.bundledDependencies||[],g=Array.from(new Set(Array.isArray(m)?m:m===!0?this.allDepsBundled(d):Object.keys(m)));if(!g.length)return this.done();this.bundle=g,this.readModules()}readModules(){s(this.path+"/node_modules",(d,m)=>d?this.onReaddir([]):this.onReaddir(m))}onReaddir(d){this.node_modules=d,this.bundle.forEach(m=>this.childDep(m)),this.children===0&&this.done()}childDep(d){this.node_modules.indexOf(d)!==-1?this.seen.has(d)||(this.seen.add(d),this.child(d)):this.parent&&this.parent.childDep(d)}child(d){let m=this.path+"/node_modules/"+d;this.children+=1;let g=new Rg({path:m,parent:this});g.on("done",()=>{--this.children===0&&this.done()}),g.start()}},r=class Ag extends c{static{S(this,"BundleWalkerSync")}start(){return super.start(),this.done(),this}readPackageJson(d){try{this.onPackageJson(d,i.readFileSync(d))}catch{}return this}readModules(){try{this.onReaddir(o(this.path+"/node_modules"))}catch{this.onReaddir([])}}child(d){new Ag({path:this.path+"/node_modules/"+d,parent:this}).start()}},s=S((p,d)=>{i.readdir(p,(m,g)=>{if(m)d(m);else{let f=g.filter(y=>/^@/.test(y));if(!f.length)d(null,g);else{let y=g.filter(E=>!/^@/.test(E)),v=f.length;f.forEach(E=>{i.readdir(p+"/"+E,(b,w)=>{b||!w.length?y.push(E):y.push.apply(y,w.map(_=>E+"/"+_)),--v===0&&d(null,y)})})}}})},"readdirNodeModules"),o=S(p=>{let d=i.readdirSync(p),m=d.filter(f=>!/^@/.test(f)),g=d.filter(f=>/^@/.test(f)).map(f=>{try{let y=i.readdirSync(p+"/"+f);return y.length?y.map(v=>f+"/"+v):[f]}catch{return[f]}}).reduce((f,y)=>f.concat(y),[]);return m.concat(g)},"readdirNodeModulesSync"),a=S((p,d)=>{let m=new Promise((g,f)=>{new c(p).on("done",g).on("error",f).start()});return d?m.then(g=>d(null,g),d):m},"walk"),h=S(p=>new r(p).start().result,"walkSync");t.exports=a,a.sync=h,a.BundleWalker=c,a.BundleWalkerSync=r}),sk=J((e,t)=>{var i=rk(),{readFile:u,readdir:n,stat:l}=require("internal/fs/promises"),{resolve:c,basename:r,dirname:s}=require("path"),o=ql(),a=S(({path:m,packageJsonCache:g})=>g.has(m)?Promise.resolve(g.get(m)):u(m).then(f=>{let y=o(JSON.parse(f));return g.set(m,y),y}).catch(()=>null),"readPackage"),h=Symbol("package data has been normalized"),p=S(({path:m,packageJsonCache:g})=>a({path:m,packageJsonCache:g}).then(f=>{if(!f||f[h])return f;f.bundledDependencies&&!f.bundleDependencies&&(f.bundleDependencies=f.bundledDependencies,delete f.bundledDependencies);let y=f.bundleDependencies;return y===!0&&(f.bundleDependencies=[...Object.keys(f.dependencies||{}),...Object.keys(f.optionalDependencies||{})]),typeof y=="object"&&!Array.isArray(y)&&(f.bundleDependencies=Object.keys(y)),f[h]=!0,f}),"rpj"),d=S(async({path:m,depth:g=1,currentDepth:f=0,pkg:y=null,result:v=null,packageJsonCache:E=null})=>{if(v||(v=new Set),E||(E=new Map),y===!0)return p({path:m+"/package.json",packageJsonCache:E}).then(O=>d({path:m,depth:g,currentDepth:f,pkg:O,result:v,packageJsonCache:E}));if(y&&y.bin){let O=s(m),A=r(O),I=/^@.+/.test(A)?s(O):O,P=[];Object.keys(y.bin).forEach(L=>{let j=c(I,".bin",L);P.push(j,j+".cmd",j+".ps1")}),(await Promise.all(P.map(L=>l(L).then(()=>L).catch(()=>null)))).filter(L=>L).forEach(L=>v.add(L))}if(f>=g)return v.add(m),v;let[b,w]=await Promise.all([n(m,{withFileTypes:!0}),f===0&&y&&y.bundleDependencies?i({path:m,packageJsonCache:E}):null]).catch(()=>[]);if(!b)return v;if(!b.length&&!w&&f!==0)return v.add(m),v;let _=[];for(let O of b){let A=c(m,O.name);if(O.isDirectory()===!1){v.add(A);continue}if(f!==0||O.name!=="node_modules"){f<g-1?_.push(d({path:A,packageJsonCache:E,depth:g,currentDepth:f+1,result:v})):v.add(A);continue}}return w&&_.push(...w.map(O=>{let A=c(m,"node_modules",O);return d({path:A,packageJsonCache:E,pkg:!0,depth:g,currentDepth:f+1,result:v})})),_.length&&await Promise.all(_),v},"pkgContents");t.exports=({path:m,...g})=>d({path:c(m),...g,pkg:!0}).then(f=>[...f])}),ws=J((e,t)=>{"use strict";var i=process.platform==="win32",{URL:u}=require("url"),n=i?require("path"):require("path"),{homedir:l}=require("os"),c=Ul(),r=Ir(),s=pg(),{log:o}=yt(),a=i?/\\|[/]/:/[/]/,h=/^(?:git[+])?[a-z]+:/i,p=/^[^@]+@[^:.]+\.[^:]+:.+$/i,d=/[.](?:tgz|tar.gz|tar)$/i,m=/:[0-9]+(\/|$)/i,g=/^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/,f=/^(?:[.]|~[/]|[/]|[a-zA-Z]:)/,y="https://registry.npmjs.org";function v(x,k){let T,C;if(typeof x=="object")return x instanceof P&&(!k||k===x.where)?x:x.name&&x.rawSpec?v.resolve(x.name,x.rawSpec,k||x.where):v(x.raw,k||x.where);let q=x.indexOf("@",1),X=q>0?x.slice(0,q):x;return h.test(x)?C=x:p.test(x)?C=`git+ssh://${x}`:!X.startsWith("@")&&(a.test(X)||d.test(X))?C=x:q>0?(T=X,C=x.slice(q+1)||"*"):s(x).validForOldPackages?(T=x,C="*"):C=x,w(T,C,k,x)}S(v,"npa");function E(x){return x?x.toLowerCase().startsWith("file:")?!0:i?g.test(x):f.test(x):!1}S(E,"isFileSpec");function b(x){return x?x.toLowerCase().startsWith("npm:"):!1}S(b,"isAliasSpec");function w(x,k,T,C){let q=new P({raw:C,name:x,rawSpec:k,fromArgument:C!=null});if(x&&(q.name=x),T||(T=process.cwd()),E(k))return M(q,T);if(b(k))return H(q,T);let X=c.fromUrl(k,{noGitPlus:!0,noCommittish:!0});return X?B(q,X):k&&h.test(k)?D(q):k&&(a.test(k)||d.test(k))?M(q,T):G(q)}S(w,"resolve");function _(x,k=y){let T=v(x);if(T.type!=="version")throw I(T.type,T.raw);let C="pkg:npm/"+T.name.replace(/^@/,"%40")+"@"+T.rawSpec;return k!==y&&(C+="?repository_url="+k),C}S(_,"toPurl");function O(x,k,T){let C=new Error(`Invalid package name "${x}" of package "${T}": ${k.errors.join("; ")}.`);return C.code="EINVALIDPACKAGENAME",C}S(O,"invalidPackageName");function A(x,k){let T=new Error(`Invalid tag name "${x}" of package "${k}": Tags may not have any characters that encodeURIComponent encodes.`);return T.code="EINVALIDTAGNAME",T}S(A,"invalidTagName");function I(x,k){let T=new Error(`Invalid type "${x}" of package "${k}": Purl can only be generated for "version" types.`);return T.code="EINVALIDPURLTYPE",T}S(I,"invalidPurlType");var P=class{static{S(this,"Result")}constructor(x){this.type=x.type,this.registry=x.registry,this.where=x.where,x.raw==null?this.raw=x.name?`${x.name}@${x.rawSpec}`:x.rawSpec:this.raw=x.raw,this.name=void 0,this.escapedName=void 0,this.scope=void 0,this.rawSpec=x.rawSpec||"",this.saveSpec=x.saveSpec,this.fetchSpec=x.fetchSpec,x.name&&this.setName(x.name),this.gitRange=x.gitRange,this.gitCommittish=x.gitCommittish,this.gitSubdir=x.gitSubdir,this.hosted=x.hosted}setName(x){let k=s(x);if(!k.validForOldPackages)throw O(x,k,this.raw);return this.name=x,this.scope=x[0]==="@"?x.slice(0,x.indexOf("/")):void 0,this.escapedName=x.replace("/","%2f"),this}toString(){let x=[];this.name!=null&&this.name!==""&&x.push(this.name);let k=this.saveSpec||this.fetchSpec||this.rawSpec;return k!=null&&k!==""&&x.push(k),x.length?x.join("@"):this.raw}toJSON(){let x=Object.assign({},this);return delete x.hosted,x}};function L(x,k){if(!k){x.gitCommittish=null;return}for(let T of k.split("::")){if(!T.includes(":")){if(x.gitRange)throw new Error("cannot override existing semver range with a committish");if(x.gitCommittish)throw new Error("cannot override existing committish with a second committish");x.gitCommittish=T;continue}let[C,q]=T.split(":");if(C==="semver"){if(x.gitCommittish)throw new Error("cannot override existing committish with a semver range");if(x.gitRange)throw new Error("cannot override existing semver range with a second semver range");x.gitRange=decodeURIComponent(q);continue}if(C==="path"){if(x.gitSubdir)throw new Error("cannot override existing path with a second path");x.gitSubdir=`/${q}`;continue}o.warn("npm-package-arg",`ignoring unknown key "${C}"`)}}S(L,"setGitAttrs");var j=new Map([["\0","%00"],[" ","%09"],[`
44
- `,"%0A"],["\r","%0D"],[" ","%20"],['"',"%22"],["#","%23"],["%","%25"],["?","%3F"],["[","%5B"],["\\",i?"/":"%5C"],["]","%5D"],["^","%5E"],["|","%7C"],["~","%7E"]]);function N(x){let k="";for(let T=0;T<x.length;T++)k=`${k}${j.get(x[T])??x[T]}`;return k.startsWith("file:")?k:`file:${k}`}S(N,"pathToFileURL");function M(x,k){x.type=d.test(x.rawSpec)?"file":"directory",x.where=k;let T=N(x.rawSpec);T.startsWith("file:/")&&(/^file:\/\/[^/]/.test(T)&&(T=`file:/${T.slice(5)}`),/^\/{1,3}\.\.?(\/|$)/.test(T.slice(5))&&(T=T.replace(/^file:\/{1,3}/,"file:")));let C,q;try{C=new u(T,`${N(n.resolve(k))}/`),q=new u(T)}catch($){let V=new Error("Invalid file: URL, must comply with RFC 8089");throw Object.assign(V,{raw:x.rawSpec,spec:x,where:k,originalError:$})}let X=decodeURIComponent(q.pathname),Y=decodeURIComponent(C.pathname);return i&&(X=X.replace(/^\/+([a-z]:\/)/i,"$1"),Y=Y.replace(/^\/+([a-z]:\/)/i,"$1")),/^\/~(\/|$)/.test(X)?(x.saveSpec=`file:${X.substr(1)}`,Y=n.resolve(l(),X.substr(3))):n.isAbsolute(T.slice(5))?x.saveSpec=`file:${n.resolve(Y)}`:x.saveSpec=`file:${n.relative(k,Y)}`,x.fetchSpec=n.resolve(k,Y),x.saveSpec=x.saveSpec.split("\\").join("/"),x.saveSpec.startsWith("file://")&&(x.saveSpec=`file:/${x.saveSpec.slice(7)}`),x}S(M,"fromFile");function B(x,k){return x.type="git",x.hosted=k,x.saveSpec=k.toString({noGitPlus:!1,noCommittish:!1}),x.fetchSpec=k.getDefaultRepresentation()==="shortcut"?null:k.toString(),L(x,k.committish),x}S(B,"fromHostedGit");function F(x,k){let T=new Error(`Unsupported URL Type "${x}": ${k}`);return T.code="EUNSUPPORTEDPROTOCOL",T}S(F,"unsupportedURLType");function D(x){let k=x.rawSpec;if(x.saveSpec=k,k.startsWith("git+ssh:")){let C=k.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i);if(C&&!C[1].match(m))return x.type="git",L(x,C[2]),x.fetchSpec=C[1],x}else k.startsWith("git+file://")&&(k=k.replace(/\\/g,"/"));let T=new u(k);switch(T.protocol){case"git:":case"git+http:":case"git+https:":case"git+rsync:":case"git+ftp:":case"git+file:":case"git+ssh:":x.type="git",L(x,T.hash.slice(1)),T.protocol==="git+file:"&&/^git\+file:\/\/[a-z]:/i.test(k)?x.fetchSpec=`git+file://${T.host.toLowerCase()}:${T.pathname}`:(T.hash="",x.fetchSpec=T.toString()),x.fetchSpec.startsWith("git+")&&(x.fetchSpec=x.fetchSpec.slice(4));break;case"http:":case"https:":x.type="remote",x.fetchSpec=x.saveSpec;break;default:throw F(T.protocol,k)}return x}S(D,"fromURL");function H(x,k){let T=v(x.rawSpec.substr(4),k);if(T.type==="alias")throw new Error("nested aliases not supported");if(!T.registry)throw new Error("aliases only work for registry deps");if(!T.name)throw new Error("aliases must have a name");return x.subSpec=T,x.registry=!0,x.type="alias",x.saveSpec=null,x.fetchSpec=null,x}S(H,"fromAlias");function G(x){x.registry=!0;let k=x.rawSpec.trim();x.saveSpec=null,x.fetchSpec=k;let T=r.valid(k,!0),C=r.validRange(k,!0);if(T)x.type="version";else if(C)x.type="range";else{if(encodeURIComponent(k)!==k)throw A(k,x.raw);x.type="tag"}return x}S(G,"fromRegistry"),t.exports=v,t.exports.resolve=w,t.exports.toPurl=_,t.exports.Result=P}),_s=J(e=>{"use strict";var t=e&&e.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(e,"__esModule",{value:!0}),e.WriteStreamSync=e.WriteStream=e.ReadStreamSync=e.ReadStream=void 0;var i=t(require("events")),u=t(require("fs")),n=ke(),l=u.default.writev,c=Symbol("_autoClose"),r=Symbol("_close"),s=Symbol("_ended"),o=Symbol("_fd"),a=Symbol("_finished"),h=Symbol("_flags"),p=Symbol("_flush"),d=Symbol("_handleChunk"),m=Symbol("_makeBuf"),g=Symbol("_mode"),f=Symbol("_needDrain"),y=Symbol("_onerror"),v=Symbol("_onopen"),E=Symbol("_onread"),b=Symbol("_onwrite"),w=Symbol("_open"),_=Symbol("_path"),O=Symbol("_pos"),A=Symbol("_queue"),I=Symbol("_read"),P=Symbol("_readSize"),L=Symbol("_reading"),j=Symbol("_remain"),N=Symbol("_size"),M=Symbol("_write"),B=Symbol("_writing"),F=Symbol("_defaultFlag"),D=Symbol("_errored"),H=class extends n.Minipass{static{S(this,"ReadStream")}[D]=!1;[o];[_];[P];[L]=!1;[N];[j];[c];constructor(T,C){if(C=C||{},super(C),this.readable=!0,this.writable=!1,typeof T!="string")throw new TypeError("path must be a string");this[D]=!1,this[o]=typeof C.fd=="number"?C.fd:void 0,this[_]=T,this[P]=C.readSize||16*1024*1024,this[L]=!1,this[N]=typeof C.size=="number"?C.size:1/0,this[j]=this[N],this[c]=typeof C.autoClose=="boolean"?C.autoClose:!0,typeof this[o]=="number"?this[I]():this[w]()}get fd(){return this[o]}get path(){return this[_]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[w](){u.default.open(this[_],"r",(T,C)=>this[v](T,C))}[v](T,C){T?this[y](T):(this[o]=C,this.emit("open",C),this[I]())}[m](){return Buffer.allocUnsafe(Math.min(this[P],this[j]))}[I](){if(!this[L]){this[L]=!0;let T=this[m]();if(T.length===0)return process.nextTick(()=>this[E](null,0,T));u.default.read(this[o],T,0,T.length,null,(C,q,X)=>this[E](C,q,X))}}[E](T,C,q){this[L]=!1,T?this[y](T):this[d](C,q)&&this[I]()}[r](){if(this[c]&&typeof this[o]=="number"){let T=this[o];this[o]=void 0,u.default.close(T,C=>C?this.emit("error",C):this.emit("close"))}}[y](T){this[L]=!0,this[r](),this.emit("error",T)}[d](T,C){let q=!1;return this[j]-=T,T>0&&(q=super.write(T<C.length?C.subarray(0,T):C)),(T===0||this[j]<=0)&&(q=!1,this[r](),super.end()),q}emit(T,...C){switch(T){case"prefinish":case"finish":return!1;case"drain":return typeof this[o]=="number"&&this[I](),!1;case"error":return this[D]?!1:(this[D]=!0,super.emit(T,...C));default:return super.emit(T,...C)}}};e.ReadStream=H;var G=class extends H{static{S(this,"ReadStreamSync")}[w](){let T=!0;try{this[v](null,u.default.openSync(this[_],"r")),T=!1}finally{T&&this[r]()}}[I](){let T=!0;try{if(!this[L]){this[L]=!0;do{let C=this[m](),q=C.length===0?0:u.default.readSync(this[o],C,0,C.length,null);if(!this[d](q,C))break}while(!0);this[L]=!1}T=!1}finally{T&&this[r]()}}[r](){if(this[c]&&typeof this[o]=="number"){let T=this[o];this[o]=void 0,u.default.closeSync(T),this.emit("close")}}};e.ReadStreamSync=G;var x=class extends i.default{static{S(this,"WriteStream")}readable=!1;writable=!0;[D]=!1;[B]=!1;[s]=!1;[A]=[];[f]=!1;[_];[g];[c];[o];[F];[h];[a]=!1;[O];constructor(T,C){C=C||{},super(C),this[_]=T,this[o]=typeof C.fd=="number"?C.fd:void 0,this[g]=C.mode===void 0?438:C.mode,this[O]=typeof C.start=="number"?C.start:void 0,this[c]=typeof C.autoClose=="boolean"?C.autoClose:!0;let q=this[O]!==void 0?"r+":"w";this[F]=C.flags===void 0,this[h]=C.flags===void 0?q:C.flags,this[o]===void 0&&this[w]()}emit(T,...C){if(T==="error"){if(this[D])return!1;this[D]=!0}return super.emit(T,...C)}get fd(){return this[o]}get path(){return this[_]}[y](T){this[r](),this[B]=!0,this.emit("error",T)}[w](){u.default.open(this[_],this[h],this[g],(T,C)=>this[v](T,C))}[v](T,C){this[F]&&this[h]==="r+"&&T&&T.code==="ENOENT"?(this[h]="w",this[w]()):T?this[y](T):(this[o]=C,this.emit("open",C),this[B]||this[p]())}end(T,C){return T&&this.write(T,C),this[s]=!0,!this[B]&&!this[A].length&&typeof this[o]=="number"&&this[b](null,0),this}write(T,C){return typeof T=="string"&&(T=Buffer.from(T,C)),this[s]?(this.emit("error",new Error("write() after end()")),!1):this[o]===void 0||this[B]||this[A].length?(this[A].push(T),this[f]=!0,!1):(this[B]=!0,this[M](T),!0)}[M](T){u.default.write(this[o],T,0,T.length,this[O],(C,q)=>this[b](C,q))}[b](T,C){T?this[y](T):(this[O]!==void 0&&typeof C=="number"&&(this[O]+=C),this[A].length?this[p]():(this[B]=!1,this[s]&&!this[a]?(this[a]=!0,this[r](),this.emit("finish")):this[f]&&(this[f]=!1,this.emit("drain"))))}[p](){if(this[A].length===0)this[s]&&this[b](null,0);else if(this[A].length===1)this[M](this[A].pop());else{let T=this[A];this[A]=[],l(this[o],T,this[O],(C,q)=>this[b](C,q))}}[r](){if(this[c]&&typeof this[o]=="number"){let T=this[o];this[o]=void 0,u.default.close(T,C=>C?this.emit("error",C):this.emit("close"))}}};e.WriteStream=x;var k=class extends x{static{S(this,"WriteStreamSync")}[w](){let T;if(this[F]&&this[h]==="r+")try{T=u.default.openSync(this[_],this[h],this[g])}catch(C){if(C?.code==="ENOENT")return this[h]="w",this[w]();throw C}else T=u.default.openSync(this[_],this[h],this[g]);this[v](null,T)}[r](){if(this[c]&&typeof this[o]=="number"){let T=this[o];this[o]=void 0,u.default.closeSync(T),this.emit("close")}}[M](T){let C=!0;try{this[b](null,u.default.writeSync(this[o],T,0,T.length,this[O])),C=!1}finally{if(C)try{this[r]()}catch{}}}};e.WriteStreamSync=k}),Ql=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dealias=e.isNoFile=e.isFile=e.isAsync=e.isSync=e.isAsyncNoFile=e.isSyncNoFile=e.isAsyncFile=e.isSyncFile=void 0;var t=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"],["onentry","onReadEntry"]]),i=S(p=>!!p.sync&&!!p.file,"isSyncFile");e.isSyncFile=i;var u=S(p=>!p.sync&&!!p.file,"isAsyncFile");e.isAsyncFile=u;var n=S(p=>!!p.sync&&!p.file,"isSyncNoFile");e.isSyncNoFile=n;var l=S(p=>!p.sync&&!p.file,"isAsyncNoFile");e.isAsyncNoFile=l;var c=S(p=>!!p.sync,"isSync");e.isSync=c;var r=S(p=>!p.sync,"isAsync");e.isAsync=r;var s=S(p=>!!p.file,"isFile");e.isFile=s;var o=S(p=>!p.file,"isNoFile");e.isNoFile=o;var a=S(p=>t.get(p)||p,"dealiasKey"),h=S((p={})=>{if(!p)return{};let d={};for(let[m,g]of Object.entries(p)){let f=a(m);d[f]=g}return d.chmod===void 0&&d.noChmod===!1&&(d.chmod=!0),delete d.noChmod,d},"dealias");e.dealias=h}),Os=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makeCommand=void 0;var t=Ql(),i=S((u,n,l,c,r)=>Object.assign((s=[],o,a)=>{Array.isArray(s)&&(o=s,s={}),typeof o=="function"&&(a=o,o=void 0),o?o=Array.from(o):o=[];let h=(0,t.dealias)(s);if(r?.(h,o),(0,t.isSyncFile)(h)){if(typeof a=="function")throw new TypeError("callback not supported for sync tar functions");return u(h,o)}else if((0,t.isAsyncFile)(h)){let p=n(h,o),d=a||void 0;return d?p.then(()=>d(),d):p}else if((0,t.isSyncNoFile)(h)){if(typeof a=="function")throw new TypeError("callback not supported for sync tar functions");return l(h,o)}else if((0,t.isAsyncNoFile)(h)){if(typeof a=="function")throw new TypeError("callback only supported with file option");return c(h,o)}else throw new Error("impossible options??")},{syncFile:u,asyncFile:n,syncNoFile:l,asyncNoFile:c,validate:r}),"makeCommand");e.makeCommand=i}),kf=J(e=>{"use strict";var t=e&&e.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(e,"__esModule",{value:!0}),e.constants=void 0;var i=t(require("zlib")),u=i.default.constants||{ZLIB_VERNUM:4736};e.constants=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},u))}),sn=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(D,H,G,x){x===void 0&&(x=G);var k=Object.getOwnPropertyDescriptor(H,G);(!k||("get"in k?!H.__esModule:k.writable||k.configurable))&&(k={enumerable:!0,get:S(function(){return H[G]},"get")}),Object.defineProperty(D,x,k)}:function(D,H,G,x){x===void 0&&(x=G),D[x]=H[G]}),i=e&&e.__setModuleDefault||(Object.create?function(D,H){Object.defineProperty(D,"default",{enumerable:!0,value:H})}:function(D,H){D.default=H}),u=e&&e.__importStar||function(){var D=S(function(H){return D=Object.getOwnPropertyNames||function(G){var x=[];for(var k in G)Object.prototype.hasOwnProperty.call(G,k)&&(x[x.length]=k);return x},D(H)},"ownKeys");return function(H){if(H&&H.__esModule)return H;var G={};if(H!=null)for(var x=D(H),k=0;k<x.length;k++)x[k]!=="default"&&t(G,H,x[k]);return i(G,H),G}}(),n=e&&e.__importDefault||function(D){return D&&D.__esModule?D:{default:D}};Object.defineProperty(e,"__esModule",{value:!0}),e.ZstdDecompress=e.ZstdCompress=e.BrotliDecompress=e.BrotliCompress=e.Unzip=e.InflateRaw=e.DeflateRaw=e.Gunzip=e.Gzip=e.Inflate=e.Deflate=e.Zlib=e.ZlibError=e.constants=void 0;var l=n(require("assert")),c=require("buffer"),r=ke(),s=u(require("zlib")),o=kf(),a=kf();Object.defineProperty(e,"constants",{enumerable:!0,get:S(function(){return a.constants},"get")});var h=c.Buffer.concat,p=Object.getOwnPropertyDescriptor(c.Buffer,"concat"),d=S(D=>D,"noop"),m=p?.writable===!0||p?.set!==void 0?D=>{c.Buffer.concat=D?d:h}:D=>{},g=Symbol("_superWrite"),f=class extends Error{static{S(this,"ZlibError")}code;errno;constructor(D,H){super("zlib: "+D.message,{cause:D}),this.code=D.code,this.errno=D.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+D.message,Error.captureStackTrace(this,H??this.constructor)}get name(){return"ZlibError"}};e.ZlibError=f;var y=Symbol("flushFlag"),v=class extends r.Minipass{static{S(this,"ZlibBase")}#e=!1;#t=!1;#r;#s;#n;#c;#u;get sawError(){return this.#e}get handle(){return this.#c}get flushFlag(){return this.#r}constructor(D,H){if(!D||typeof D!="object")throw new TypeError("invalid options for ZlibBase constructor");if(super(D),this.#r=D.flush??0,this.#s=D.finishFlush??0,this.#n=D.fullFlushFlag??0,typeof s[H]!="function")throw new TypeError("Compression method not supported: "+H);try{this.#c=new s[H](D)}catch(G){throw new f(G,this.constructor)}this.#u=G=>{this.#e||(this.#e=!0,this.close(),this.emit("error",G))},this.#c?.on("error",G=>this.#u(new f(G))),this.once("end",()=>this.close)}close(){this.#c&&(this.#c.close(),this.#c=void 0,this.emit("close"))}reset(){if(!this.#e)return(0,l.default)(this.#c,"zlib binding closed"),this.#c.reset?.()}flush(D){this.ended||(typeof D!="number"&&(D=this.#n),this.write(Object.assign(c.Buffer.alloc(0),{[y]:D})))}end(D,H,G){return typeof D=="function"&&(G=D,H=void 0,D=void 0),typeof H=="function"&&(G=H,H=void 0),D&&(H?this.write(D,H):this.write(D)),this.flush(this.#s),this.#t=!0,super.end(G)}get ended(){return this.#t}[g](D){return super.write(D)}write(D,H,G){if(typeof H=="function"&&(G=H,H="utf8"),typeof D=="string"&&(D=c.Buffer.from(D,H)),this.#e)return;(0,l.default)(this.#c,"zlib binding closed");let x=this.#c._handle,k=x.close;x.close=()=>{};let T=this.#c.close;this.#c.close=()=>{},m(!0);let C;try{let X=typeof D[y]=="number"?D[y]:this.#r;C=this.#c._processChunk(D,X),m(!1)}catch(X){m(!1),this.#u(new f(X,this.write))}finally{this.#c&&(this.#c._handle=x,x.close=k,this.#c.close=T,this.#c.removeAllListeners("error"))}this.#c&&this.#c.on("error",X=>this.#u(new f(X,this.write)));let q;if(C)if(Array.isArray(C)&&C.length>0){let X=C[0];q=this[g](c.Buffer.from(X));for(let Y=1;Y<C.length;Y++)q=this[g](C[Y])}else q=this[g](c.Buffer.from(C));return G&&G(),q}},E=class extends v{static{S(this,"Zlib")}#e;#t;constructor(D,H){D=D||{},D.flush=D.flush||o.constants.Z_NO_FLUSH,D.finishFlush=D.finishFlush||o.constants.Z_FINISH,D.fullFlushFlag=o.constants.Z_FULL_FLUSH,super(D,H),this.#e=D.level,this.#t=D.strategy}params(D,H){if(!this.sawError){if(!this.handle)throw new Error("cannot switch params when binding is closed");if(!this.handle.params)throw new Error("not supported in this implementation");if(this.#e!==D||this.#t!==H){this.flush(o.constants.Z_SYNC_FLUSH),(0,l.default)(this.handle,"zlib binding closed");let G=this.handle.flush;this.handle.flush=(x,k)=>{typeof x=="function"&&(k=x,x=this.flushFlag),this.flush(x),k?.()};try{this.handle.params(D,H)}finally{this.handle.flush=G}this.handle&&(this.#e=D,this.#t=H)}}}};e.Zlib=E;var b=class extends E{static{S(this,"Deflate")}constructor(D){super(D,"Deflate")}};e.Deflate=b;var w=class extends E{static{S(this,"Inflate")}constructor(D){super(D,"Inflate")}};e.Inflate=w;var _=class extends E{static{S(this,"Gzip")}#e;constructor(D){super(D,"Gzip"),this.#e=D&&!!D.portable}[g](D){return this.#e?(this.#e=!1,D[9]=255,super[g](D)):super[g](D)}};e.Gzip=_;var O=class extends E{static{S(this,"Gunzip")}constructor(D){super(D,"Gunzip")}};e.Gunzip=O;var A=class extends E{static{S(this,"DeflateRaw")}constructor(D){super(D,"DeflateRaw")}};e.DeflateRaw=A;var I=class extends E{static{S(this,"InflateRaw")}constructor(D){super(D,"InflateRaw")}};e.InflateRaw=I;var P=class extends E{static{S(this,"Unzip")}constructor(D){super(D,"Unzip")}};e.Unzip=P;var L=class extends v{static{S(this,"Brotli")}constructor(D,H){D=D||{},D.flush=D.flush||o.constants.BROTLI_OPERATION_PROCESS,D.finishFlush=D.finishFlush||o.constants.BROTLI_OPERATION_FINISH,D.fullFlushFlag=o.constants.BROTLI_OPERATION_FLUSH,super(D,H)}},j=class extends L{static{S(this,"BrotliCompress")}constructor(D){super(D,"BrotliCompress")}};e.BrotliCompress=j;var N=class extends L{static{S(this,"BrotliDecompress")}constructor(D){super(D,"BrotliDecompress")}};e.BrotliDecompress=N;var M=class extends v{static{S(this,"Zstd")}constructor(D,H){D=D||{},D.flush=D.flush||o.constants.ZSTD_e_continue,D.finishFlush=D.finishFlush||o.constants.ZSTD_e_end,D.fullFlushFlag=o.constants.ZSTD_e_flush,super(D,H)}},B=class extends M{static{S(this,"ZstdCompress")}constructor(D){super(D,"ZstdCompress")}};e.ZstdCompress=B;var F=class extends M{static{S(this,"ZstdDecompress")}constructor(D){super(D,"ZstdDecompress")}};e.ZstdDecompress=F}),ik=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parse=e.encode=void 0;var t=S((o,a)=>{if(Number.isSafeInteger(o))o<0?u(o,a):i(o,a);else throw Error("cannot encode number outside of javascript safe integer range");return a},"encode");e.encode=t;var i=S((o,a)=>{a[0]=128;for(var h=a.length;h>1;h--)a[h-1]=o&255,o=Math.floor(o/256)},"encodePositive"),u=S((o,a)=>{a[0]=255;var h=!1;o=o*-1;for(var p=a.length;p>1;p--){var d=o&255;o=Math.floor(o/256),h?a[p-1]=r(d):d===0?a[p-1]=0:(h=!0,a[p-1]=s(d))}},"encodeNegative"),n=S(o=>{let a=o[0],h=a===128?c(o.subarray(1,o.length)):a===255?l(o):null;if(h===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(h))throw Error("parsed number outside of javascript safe integer range");return h},"parse");e.parse=n;var l=S(o=>{for(var a=o.length,h=0,p=!1,d=a-1;d>-1;d--){var m=Number(o[d]),g;p?g=r(m):m===0?g=m:(p=!0,g=s(m)),g!==0&&(h-=g*Math.pow(256,a-d-1))}return h},"twos"),c=S(o=>{for(var a=o.length,h=0,p=a-1;p>-1;p--){var d=Number(o[p]);d!==0&&(h+=d*Math.pow(256,a-p-1))}return h},"pos"),r=S(o=>(255^o)&255,"onesComp"),s=S(o=>(255^o)+1&255,"twosComp")}),Cg=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.code=e.name=e.isName=e.isCode=void 0;var t=S(u=>e.name.has(u),"isCode");e.isCode=t;var i=S(u=>e.code.has(u),"isName");e.isName=i,e.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),e.code=new Map(Array.from(e.name).map(u=>[u[1],u[0]]))}),Rs=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(O,A,I,P){P===void 0&&(P=I);var L=Object.getOwnPropertyDescriptor(A,I);(!L||("get"in L?!A.__esModule:L.writable||L.configurable))&&(L={enumerable:!0,get:S(function(){return A[I]},"get")}),Object.defineProperty(O,P,L)}:function(O,A,I,P){P===void 0&&(P=I),O[P]=A[I]}),i=e&&e.__setModuleDefault||(Object.create?function(O,A){Object.defineProperty(O,"default",{enumerable:!0,value:A})}:function(O,A){O.default=A}),u=e&&e.__importStar||function(O){if(O&&O.__esModule)return O;var A={};if(O!=null)for(var I in O)I!=="default"&&Object.prototype.hasOwnProperty.call(O,I)&&t(A,O,I);return i(A,O),A};Object.defineProperty(e,"__esModule",{value:!0}),e.Header=void 0;var n=require("path"),l=u(ik()),c=u(Cg()),r=class{static{S(this,"Header")}cksumValid=!1;needPax=!1;nullBlock=!1;block;path;mode;uid;gid;size;cksum;#e="Unsupported";linkpath;uname;gname;devmaj=0;devmin=0;atime;ctime;mtime;charset;comment;constructor(O,A=0,I,P){Buffer.isBuffer(O)?this.decode(O,A||0,I,P):O&&this.#t(O)}decode(O,A,I,P){if(A||(A=0),!O||!(O.length>=A+512))throw new Error("need 512 bytes for header");this.path=o(O,A,100),this.mode=p(O,A+100,8),this.uid=p(O,A+108,8),this.gid=p(O,A+116,8),this.size=p(O,A+124,12),this.mtime=a(O,A+136,12),this.cksum=p(O,A+148,12),P&&this.#t(P,!0),I&&this.#t(I);let L=o(O,A+156,1);if(c.isCode(L)&&(this.#e=L||"0"),this.#e==="0"&&this.path.slice(-1)==="/"&&(this.#e="5"),this.#e==="5"&&(this.size=0),this.linkpath=o(O,A+157,100),O.subarray(A+257,A+265).toString()==="ustar\x0000")if(this.uname=o(O,A+265,32),this.gname=o(O,A+297,32),this.devmaj=p(O,A+329,8)??0,this.devmin=p(O,A+337,8)??0,O[A+475]!==0){let N=o(O,A+345,155);this.path=N+"/"+this.path}else{let N=o(O,A+345,130);N&&(this.path=N+"/"+this.path),this.atime=a(O,A+476,12),this.ctime=a(O,A+488,12)}let j=256;for(let N=A;N<A+148;N++)j+=O[N];for(let N=A+156;N<A+512;N++)j+=O[N];this.cksumValid=j===this.cksum,this.cksum===void 0&&j===256&&(this.nullBlock=!0)}#t(O,A=!1){Object.assign(this,Object.fromEntries(Object.entries(O).filter(([I,P])=>!(P==null||I==="path"&&A||I==="linkpath"&&A||I==="global"))))}encode(O,A=0){if(O||(O=this.block=Buffer.alloc(512)),this.#e==="Unsupported"&&(this.#e="0"),!(O.length>=A+512))throw new Error("need 512 bytes for header");let I=this.ctime||this.atime?130:155,P=s(this.path||"",I),L=P[0],j=P[1];this.needPax=!!P[2],this.needPax=_(O,A,100,L)||this.needPax,this.needPax=f(O,A+100,8,this.mode)||this.needPax,this.needPax=f(O,A+108,8,this.uid)||this.needPax,this.needPax=f(O,A+116,8,this.gid)||this.needPax,this.needPax=f(O,A+124,12,this.size)||this.needPax,this.needPax=b(O,A+136,12,this.mtime)||this.needPax,O[A+156]=this.#e.charCodeAt(0),this.needPax=_(O,A+157,100,this.linkpath)||this.needPax,O.write("ustar\x0000",A+257,8),this.needPax=_(O,A+265,32,this.uname)||this.needPax,this.needPax=_(O,A+297,32,this.gname)||this.needPax,this.needPax=f(O,A+329,8,this.devmaj)||this.needPax,this.needPax=f(O,A+337,8,this.devmin)||this.needPax,this.needPax=_(O,A+345,I,j)||this.needPax,O[A+475]!==0?this.needPax=_(O,A+345,155,j)||this.needPax:(this.needPax=_(O,A+345,130,j)||this.needPax,this.needPax=b(O,A+476,12,this.atime)||this.needPax,this.needPax=b(O,A+488,12,this.ctime)||this.needPax);let N=256;for(let M=A;M<A+148;M++)N+=O[M];for(let M=A+156;M<A+512;M++)N+=O[M];return this.cksum=N,f(O,A+148,8,this.cksum),this.cksumValid=!0,this.needPax}get type(){return this.#e==="Unsupported"?this.#e:c.name.get(this.#e)}get typeKey(){return this.#e}set type(O){let A=String(c.code.get(O));if(c.isCode(A)||A==="Unsupported")this.#e=A;else if(c.isCode(O))this.#e=O;else throw new TypeError("invalid entry type: "+O)}};e.Header=r;var s=S((O,A)=>{let I=O,P="",L,j=n.posix.parse(O).root||".";if(Buffer.byteLength(I)<100)L=[I,P,!1];else{P=n.posix.dirname(I),I=n.posix.basename(I);do Buffer.byteLength(I)<=100&&Buffer.byteLength(P)<=A?L=[I,P,!1]:Buffer.byteLength(I)>100&&Buffer.byteLength(P)<=A?L=[I.slice(0,99),P,!0]:(I=n.posix.join(n.posix.basename(P),I),P=n.posix.dirname(P));while(P!==j&&L===void 0);L||(L=[O.slice(0,99),"",!0])}return L},"splitPrefix"),o=S((O,A,I)=>O.subarray(A,A+I).toString("utf8").replace(/\0.*/,""),"decString"),a=S((O,A,I)=>h(p(O,A,I)),"decDate"),h=S(O=>O===void 0?void 0:new Date(O*1e3),"numToDate"),p=S((O,A,I)=>Number(O[A])&128?l.parse(O.subarray(A,A+I)):m(O,A,I),"decNumber"),d=S(O=>isNaN(O)?void 0:O,"nanUndef"),m=S((O,A,I)=>d(parseInt(O.subarray(A,A+I).toString("utf8").replace(/\0.*$/,"").trim(),8)),"decSmallNumber"),g={12:8589934591,8:2097151},f=S((O,A,I,P)=>P===void 0?!1:P>g[I]||P<0?(l.encode(P,O.subarray(A,A+I)),!0):(y(O,A,I,P),!1),"encNumber"),y=S((O,A,I,P)=>O.write(v(P,I),A,I,"ascii"),"encSmallNumber"),v=S((O,A)=>E(Math.floor(O).toString(8),A),"octalString"),E=S((O,A)=>(O.length===A-1?O:new Array(A-O.length-1).join("0")+O+" ")+"\0","padOctal"),b=S((O,A,I,P)=>P===void 0?!1:f(O,A,I,P.getTime()/1e3),"encDate"),w=new Array(156).join("\0"),_=S((O,A,I,P)=>P===void 0?!1:(O.write(P+w,A,I,"utf8"),P.length!==Buffer.byteLength(P)||P.length>I),"encString")}),ec=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pax=void 0;var t=require("path"),i=Rs(),u=class Ig{static{S(this,"Pax")}atime;mtime;ctime;charset;comment;gid;uid;gname;uname;linkpath;dev;ino;nlink;path;size;mode;global;constructor(s,o=!1){this.atime=s.atime,this.charset=s.charset,this.comment=s.comment,this.ctime=s.ctime,this.dev=s.dev,this.gid=s.gid,this.global=o,this.gname=s.gname,this.ino=s.ino,this.linkpath=s.linkpath,this.mtime=s.mtime,this.nlink=s.nlink,this.path=s.path,this.size=s.size,this.uid=s.uid,this.uname=s.uname}encode(){let s=this.encodeBody();if(s==="")return Buffer.allocUnsafe(0);let o=Buffer.byteLength(s),a=512*Math.ceil(1+o/512),h=Buffer.allocUnsafe(a);for(let p=0;p<512;p++)h[p]=0;new i.Header({path:("PaxHeader/"+(0,t.basename)(this.path??"")).slice(0,99),mode:this.mode||420,uid:this.uid,gid:this.gid,size:o,mtime:this.mtime,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime,ctime:this.ctime}).encode(h),h.write(s,512,o,"utf8");for(let p=o+512;p<h.length;p++)h[p]=0;return h}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(s){if(this[s]===void 0)return"";let o=this[s],a=o instanceof Date?o.getTime()/1e3:o,h=" "+(s==="dev"||s==="ino"||s==="nlink"?"SCHILY.":"")+s+"="+a+`
45
- `,p=Buffer.byteLength(h),d=Math.floor(Math.log(p)/Math.log(10))+1;return p+d>=Math.pow(10,d)&&(d+=1),d+p+h}static parse(s,o,a=!1){return new Ig(n(l(s),o),a)}};e.Pax=u;var n=S((r,s)=>s?Object.assign({},s,r):r,"merge"),l=S(r=>r.replace(/\n$/,"").split(`
46
- `).reduce(c,Object.create(null)),"parseKV"),c=S((r,s)=>{let o=parseInt(s,10);if(o!==Buffer.byteLength(s)+1)return r;s=s.slice((o+" ").length);let a=s.split("="),h=a.shift();if(!h)return r;let p=h.replace(/^SCHILY\.(dev|ino|nlink)/,"$1"),d=a.join("=");return r[p]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(p)?new Date(Number(d)*1e3):/^[0-9]+$/.test(d)?+d:d,r},"parseKVLine")}),As=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeWindowsPath=void 0;var t=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.normalizeWindowsPath=t!=="win32"?i=>i:i=>i&&i.replace(/\\/g,"/")}),tc=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadEntry=void 0;var t=ke(),i=As(),u=class extends t.Minipass{static{S(this,"ReadEntry")}extended;globalExtended;header;startBlockSize;blockRemain;remain;type;meta=!1;ignore=!1;path;mode;uid;gid;uname;gname;size=0;mtime;atime;ctime;linkpath;dev;ino;nlink;invalid=!1;absolute;unsupported=!1;constructor(n,l,c){switch(super({}),this.pause(),this.extended=l,this.globalExtended=c,this.header=n,this.remain=n.size??0,this.startBlockSize=512*Math.ceil(this.remain/512),this.blockRemain=this.startBlockSize,this.type=n.type,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}if(!n.path)throw new Error("no path provided for tar.ReadEntry");this.path=(0,i.normalizeWindowsPath)(n.path),this.mode=n.mode,this.mode&&(this.mode=this.mode&4095),this.uid=n.uid,this.gid=n.gid,this.uname=n.uname,this.gname=n.gname,this.size=this.remain,this.mtime=n.mtime,this.atime=n.atime,this.ctime=n.ctime,this.linkpath=n.linkpath?(0,i.normalizeWindowsPath)(n.linkpath):void 0,this.uname=n.uname,this.gname=n.gname,l&&this.#e(l),c&&this.#e(c,!0)}write(n){let l=n.length;if(l>this.blockRemain)throw new Error("writing more to entry than is appropriate");let c=this.remain,r=this.blockRemain;return this.remain=Math.max(0,c-l),this.blockRemain=Math.max(0,r-l),this.ignore?!0:c>=l?super.write(n):super.write(n.subarray(0,c))}#e(n,l=!1){n.path&&(n.path=(0,i.normalizeWindowsPath)(n.path)),n.linkpath&&(n.linkpath=(0,i.normalizeWindowsPath)(n.linkpath)),Object.assign(this,Object.fromEntries(Object.entries(n).filter(([c,r])=>!(r==null||c==="path"&&l))))}};e.ReadEntry=u}),rc=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.warnMethod=void 0;var t=S((i,u,n,l={})=>{i.file&&(l.file=i.file),i.cwd&&(l.cwd=i.cwd),l.code=n instanceof Error&&n.code||u,l.tarCode=u,!i.strict&&l.recoverable!==!1?(n instanceof Error&&(l=Object.assign(n,l),n=n.message),i.emit("warn",u,n,l)):n instanceof Error?i.emit("error",Object.assign(n,l)):i.emit("error",Object.assign(new Error(`${u}: ${n}`),l))},"warnMethod");e.warnMethod=t}),sc=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=void 0;var t=require("events"),i=sn(),u=Rs(),n=ec(),l=tc(),c=rc(),r=1024*1024,s=Buffer.from([31,139]),o=Buffer.from([40,181,47,253]),a=Math.max(s.length,o.length),h=Symbol("state"),p=Symbol("writeEntry"),d=Symbol("readEntry"),m=Symbol("nextEntry"),g=Symbol("processEntry"),f=Symbol("extendedHeader"),y=Symbol("globalExtendedHeader"),v=Symbol("meta"),E=Symbol("emitMeta"),b=Symbol("buffer"),w=Symbol("queue"),_=Symbol("ended"),O=Symbol("emittedEnd"),A=Symbol("emit"),I=Symbol("unzip"),P=Symbol("consumeChunk"),L=Symbol("consumeChunkSub"),j=Symbol("consumeBody"),N=Symbol("consumeMeta"),M=Symbol("consumeHeader"),B=Symbol("consuming"),F=Symbol("bufferConcat"),D=Symbol("maybeEnd"),H=Symbol("writing"),G=Symbol("aborted"),x=Symbol("onDone"),k=Symbol("sawValidEntry"),T=Symbol("sawNullBlock"),C=Symbol("sawEOF"),q=Symbol("closeStream"),X=S(()=>!0,"noop"),Y=class extends t.EventEmitter{static{S(this,"Parser")}file;strict;maxMetaEntrySize;filter;brotli;zstd;writable=!0;readable=!1;[w]=[];[b];[d];[p];[h]="begin";[v]="";[f];[y];[_]=!1;[I];[G]=!1;[k];[T]=!1;[C]=!1;[H]=!1;[B]=!1;[O]=!1;constructor($={}){super(),this.file=$.file||"",this.on(x,()=>{(this[h]==="begin"||this[k]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),$.ondone?this.on(x,$.ondone):this.on(x,()=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")}),this.strict=!!$.strict,this.maxMetaEntrySize=$.maxMetaEntrySize||r,this.filter=typeof $.filter=="function"?$.filter:X;let V=$.file&&($.file.endsWith(".tar.br")||$.file.endsWith(".tbr"));this.brotli=!($.gzip||$.zstd)&&$.brotli!==void 0?$.brotli:V?void 0:!1;let z=$.file&&($.file.endsWith(".tar.zst")||$.file.endsWith(".tzst"));this.zstd=!($.gzip||$.brotli)&&$.zstd!==void 0?$.zstd:z?!0:void 0,this.on("end",()=>this[q]()),typeof $.onwarn=="function"&&this.on("warn",$.onwarn),typeof $.onReadEntry=="function"&&this.on("entry",$.onReadEntry)}warn($,V,z={}){(0,c.warnMethod)(this,$,V,z)}[M]($,V){this[k]===void 0&&(this[k]=!1);let z;try{z=new u.Header($,V,this[f],this[y])}catch(U){return this.warn("TAR_ENTRY_INVALID",U)}if(z.nullBlock)this[T]?(this[C]=!0,this[h]==="begin"&&(this[h]="header"),this[A]("eof")):(this[T]=!0,this[A]("nullBlock"));else if(this[T]=!1,!z.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:z});else if(!z.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:z});else{let U=z.type;if(/^(Symbolic)?Link$/.test(U)&&!z.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:z});else if(!/^(Symbolic)?Link$/.test(U)&&!/^(Global)?ExtendedHeader$/.test(U)&&z.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:z});else{let K=this[p]=new l.ReadEntry(z,this[f],this[y]);if(!this[k])if(K.remain){let Z=S(()=>{K.invalid||(this[k]=!0)},"onend");K.on("end",Z)}else this[k]=!0;K.meta?K.size>this.maxMetaEntrySize?(K.ignore=!0,this[A]("ignoredEntry",K),this[h]="ignore",K.resume()):K.size>0&&(this[v]="",K.on("data",Z=>this[v]+=Z),this[h]="meta"):(this[f]=void 0,K.ignore=K.ignore||!this.filter(K.path,K),K.ignore?(this[A]("ignoredEntry",K),this[h]=K.remain?"ignore":"header",K.resume()):(K.remain?this[h]="body":(this[h]="header",K.end()),this[d]?this[w].push(K):(this[w].push(K),this[m]())))}}}[q](){queueMicrotask(()=>this.emit("close"))}[g]($){let V=!0;if(!$)this[d]=void 0,V=!1;else if(Array.isArray($)){let[z,...U]=$;this.emit(z,...U)}else this[d]=$,this.emit("entry",$),$.emittedEnd||($.on("end",()=>this[m]()),V=!1);return V}[m](){do;while(this[g](this[w].shift()));if(!this[w].length){let $=this[d];!$||$.flowing||$.size===$.remain?this[H]||this.emit("drain"):$.once("drain",()=>this.emit("drain"))}}[j]($,V){let z=this[p];if(!z)throw new Error("attempt to consume body without entry??");let U=z.blockRemain??0,K=U>=$.length&&V===0?$:$.subarray(V,V+U);return z.write(K),z.blockRemain||(this[h]="header",this[p]=void 0,z.end()),K.length}[N]($,V){let z=this[p],U=this[j]($,V);return!this[p]&&z&&this[E](z),U}[A]($,V,z){!this[w].length&&!this[d]?this.emit($,V,z):this[w].push([$,V,z])}[E]($){switch(this[A]("meta",this[v]),$.type){case"ExtendedHeader":case"OldExtendedHeader":this[f]=n.Pax.parse(this[v],this[f],!1);break;case"GlobalExtendedHeader":this[y]=n.Pax.parse(this[v],this[y],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":{let V=this[f]??Object.create(null);this[f]=V,V.path=this[v].replace(/\0.*/,"");break}case"NextFileHasLongLinkpath":{let V=this[f]||Object.create(null);this[f]=V,V.linkpath=this[v].replace(/\0.*/,"");break}default:throw new Error("unknown meta: "+$.type)}}abort($){this[G]=!0,this.emit("abort",$),this.warn("TAR_ABORT",$,{recoverable:!1})}write($,V,z){if(typeof V=="function"&&(z=V,V=void 0),typeof $=="string"&&($=Buffer.from($,typeof V=="string"?V:"utf8")),this[G])return z?.(),!1;if((this[I]===void 0||this.brotli===void 0&&this[I]===!1)&&$){if(this[b]&&($=Buffer.concat([this[b],$]),this[b]=void 0),$.length<a)return this[b]=$,z?.(),!0;for(let Q=0;this[I]===void 0&&Q<s.length;Q++)$[Q]!==s[Q]&&(this[I]=!1);let K=!1;if(this[I]===!1&&this.zstd!==!1){K=!0;for(let Q=0;Q<o.length;Q++)if($[Q]!==o[Q]){K=!1;break}}let Z=this.brotli===void 0&&!K;if(this[I]===!1&&Z)if($.length<512)if(this[_])this.brotli=!0;else return this[b]=$,z?.(),!0;else try{new u.Header($.subarray(0,512)),this.brotli=!1}catch{this.brotli=!0}if(this[I]===void 0||this[I]===!1&&(this.brotli||K)){let Q=this[_];this[_]=!1,this[I]=this[I]===void 0?new i.Unzip({}):K?new i.ZstdDecompress({}):new i.BrotliDecompress({}),this[I].on("data",W=>this[P](W)),this[I].on("error",W=>this.abort(W)),this[I].on("end",()=>{this[_]=!0,this[P]()}),this[H]=!0;let R=!!this[I][Q?"end":"write"]($);return this[H]=!1,z?.(),R}}this[H]=!0,this[I]?this[I].write($):this[P]($),this[H]=!1;let U=this[w].length?!1:this[d]?this[d].flowing:!0;return!U&&!this[w].length&&this[d]?.once("drain",()=>this.emit("drain")),z?.(),U}[F]($){$&&!this[G]&&(this[b]=this[b]?Buffer.concat([this[b],$]):$)}[D](){if(this[_]&&!this[O]&&!this[G]&&!this[B]){this[O]=!0;let $=this[p];if($&&$.blockRemain){let V=this[b]?this[b].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${$.blockRemain} more bytes, only ${V} available)`,{entry:$}),this[b]&&$.write(this[b]),$.end()}this[A](x)}}[P]($){if(this[B]&&$)this[F]($);else if(!$&&!this[b])this[D]();else if($){if(this[B]=!0,this[b]){this[F]($);let V=this[b];this[b]=void 0,this[L](V)}else this[L]($);for(;this[b]&&this[b]?.length>=512&&!this[G]&&!this[C];){let V=this[b];this[b]=void 0,this[L](V)}this[B]=!1}(!this[b]||this[_])&&this[D]()}[L]($){let V=0,z=$.length;for(;V+512<=z&&!this[G]&&!this[C];)switch(this[h]){case"begin":case"header":this[M]($,V),V+=512;break;case"ignore":case"body":V+=this[j]($,V);break;case"meta":V+=this[N]($,V);break;default:throw new Error("invalid state: "+this[h])}V<z&&(this[b]?this[b]=Buffer.concat([$.subarray(V),this[b]]):this[b]=$.subarray(V))}end($,V,z){return typeof $=="function"&&(z=$,V=void 0,$=void 0),typeof V=="function"&&(z=V,V=void 0),typeof $=="string"&&($=Buffer.from($,V)),z&&this.once("finish",z),this[G]||(this[I]?($&&this[I].write($),this[I].end()):(this[_]=!0,(this.brotli===void 0||this.zstd===void 0)&&($=$||Buffer.alloc(0)),$&&this.write($),this[D]())),this}};e.Parser=Y}),ic=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stripTrailingSlashes=void 0;var t=S(i=>{let u=i.length-1,n=-1;for(;u>-1&&i.charAt(u)==="/";)n=u,u--;return n===-1?i:i.slice(0,n)},"stripTrailingSlashes");e.stripTrailingSlashes=t}),gs=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(g,f,y,v){v===void 0&&(v=y);var E=Object.getOwnPropertyDescriptor(f,y);(!E||("get"in E?!f.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:S(function(){return f[y]},"get")}),Object.defineProperty(g,v,E)}:function(g,f,y,v){v===void 0&&(v=y),g[v]=f[y]}),i=e&&e.__setModuleDefault||(Object.create?function(g,f){Object.defineProperty(g,"default",{enumerable:!0,value:f})}:function(g,f){g.default=f}),u=e&&e.__importStar||function(g){if(g&&g.__esModule)return g;var f={};if(g!=null)for(var y in g)y!=="default"&&Object.prototype.hasOwnProperty.call(g,y)&&t(f,g,y);return i(f,g),f},n=e&&e.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.list=e.filesFilter=void 0;var l=u(_s()),c=n(require("fs")),r=require("path"),s=Os(),o=sc(),a=ic(),h=S(g=>{let f=g.onReadEntry;g.onReadEntry=f?y=>{f(y),y.resume()}:y=>y.resume()},"onReadEntryFunction"),p=S((g,f)=>{let y=new Map(f.map(b=>[(0,a.stripTrailingSlashes)(b),!0])),v=g.filter,E=S((b,w="")=>{let _=w||(0,r.parse)(b).root||".",O;if(b===_)O=!1;else{let A=y.get(b);A!==void 0?O=A:O=E((0,r.dirname)(b),_)}return y.set(b,O),O},"mapHas");g.filter=v?(b,w)=>v(b,w)&&E((0,a.stripTrailingSlashes)(b)):b=>E((0,a.stripTrailingSlashes)(b))},"filesFilter");e.filesFilter=p;var d=S(g=>{let f=new o.Parser(g),y=g.file,v;try{v=c.default.openSync(y,"r");let E=c.default.fstatSync(v),b=g.maxReadSize||16*1024*1024;if(E.size<b){let w=Buffer.allocUnsafe(E.size);c.default.readSync(v,w,0,E.size,0),f.end(w)}else{let w=0,_=Buffer.allocUnsafe(b);for(;w<E.size;){let O=c.default.readSync(v,_,0,b,w);w+=O,f.write(_.subarray(0,O))}f.end()}}finally{if(typeof v=="number")try{c.default.closeSync(v)}catch{}}},"listFileSync"),m=S((g,f)=>{let y=new o.Parser(g),v=g.maxReadSize||16*1024*1024,E=g.file;return new Promise((b,w)=>{y.on("error",w),y.on("end",b),c.default.stat(E,(_,O)=>{if(_)w(_);else{let A=new l.ReadStream(E,{readSize:v,size:O.size});A.on("error",w),A.pipe(y)}})})},"listFile");e.list=(0,s.makeCommand)(d,m,g=>new o.Parser(g),g=>new o.Parser(g),(g,f)=>{f?.length&&(0,e.filesFilter)(g,f),g.noResume||h(g)})}),nk=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.modeFix=void 0;var t=S((i,u,n)=>(i&=4095,n&&(i=(i|384)&-19),u&&(i&256&&(i|=64),i&32&&(i|=8),i&4&&(i|=1)),i),"modeFix");e.modeFix=t}),Tg=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stripAbsolutePath=void 0;var t=require("path"),{isAbsolute:i,parse:u}=t.win32,n=S(l=>{let c="",r=u(l);for(;i(l)||r.root;){let s=l.charAt(0)==="/"&&l.slice(0,4)!=="//?/"?"/":r.root;l=l.slice(s.length),c+=s,r=u(l)}return[c,l]},"stripAbsolutePath");e.stripAbsolutePath=n}),Pg=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=void 0;var t=["|","<",">","?",":"],i=t.map(r=>String.fromCharCode(61440+r.charCodeAt(0))),u=new Map(t.map((r,s)=>[r,i[s]])),n=new Map(i.map((r,s)=>[r,t[s]])),l=S(r=>t.reduce((s,o)=>s.split(o).join(u.get(o)),r),"encode");e.encode=l;var c=S(r=>i.reduce((s,o)=>s.split(o).join(n.get(o)),r),"decode");e.decode=c}),xg=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(X,Y,$,V){V===void 0&&(V=$);var z=Object.getOwnPropertyDescriptor(Y,$);(!z||("get"in z?!Y.__esModule:z.writable||z.configurable))&&(z={enumerable:!0,get:S(function(){return Y[$]},"get")}),Object.defineProperty(X,V,z)}:function(X,Y,$,V){V===void 0&&(V=$),X[V]=Y[$]}),i=e&&e.__setModuleDefault||(Object.create?function(X,Y){Object.defineProperty(X,"default",{enumerable:!0,value:Y})}:function(X,Y){X.default=Y}),u=e&&e.__importStar||function(X){if(X&&X.__esModule)return X;var Y={};if(X!=null)for(var $ in X)$!=="default"&&Object.prototype.hasOwnProperty.call(X,$)&&t(Y,X,$);return i(Y,X),Y},n=e&&e.__importDefault||function(X){return X&&X.__esModule?X:{default:X}};Object.defineProperty(e,"__esModule",{value:!0}),e.WriteEntryTar=e.WriteEntrySync=e.WriteEntry=void 0;var l=n(require("fs")),c=ke(),r=n(require("path")),s=Rs(),o=nk(),a=As(),h=Ql(),p=ec(),d=Tg(),m=ic(),g=rc(),f=u(Pg()),y=S((X,Y)=>Y?(X=(0,a.normalizeWindowsPath)(X).replace(/^\.(\/|$)/,""),(0,m.stripTrailingSlashes)(Y)+"/"+X):(0,a.normalizeWindowsPath)(X),"prefixPath"),v=16*1024*1024,E=Symbol("process"),b=Symbol("file"),w=Symbol("directory"),_=Symbol("symlink"),O=Symbol("hardlink"),A=Symbol("header"),I=Symbol("read"),P=Symbol("lstat"),L=Symbol("onlstat"),j=Symbol("onread"),N=Symbol("onreadlink"),M=Symbol("openfile"),B=Symbol("onopenfile"),F=Symbol("close"),D=Symbol("mode"),H=Symbol("awaitDrain"),G=Symbol("ondrain"),x=Symbol("prefix"),k=class extends c.Minipass{static{S(this,"WriteEntry")}path;portable;myuid=process.getuid&&process.getuid()||0;myuser=process.env.USER||"";maxReadSize;linkCache;statCache;preservePaths;cwd;strict;mtime;noPax;noMtime;prefix;fd;blockLen=0;blockRemain=0;buf;pos=0;remain=0;length=0;offset=0;win32;absolute;header;type;linkpath;stat;onWriteEntry;#e=!1;constructor(X,Y={}){let $=(0,h.dealias)(Y);super(),this.path=(0,a.normalizeWindowsPath)(X),this.portable=!!$.portable,this.maxReadSize=$.maxReadSize||v,this.linkCache=$.linkCache||new Map,this.statCache=$.statCache||new Map,this.preservePaths=!!$.preservePaths,this.cwd=(0,a.normalizeWindowsPath)($.cwd||process.cwd()),this.strict=!!$.strict,this.noPax=!!$.noPax,this.noMtime=!!$.noMtime,this.mtime=$.mtime,this.prefix=$.prefix?(0,a.normalizeWindowsPath)($.prefix):void 0,this.onWriteEntry=$.onWriteEntry,typeof $.onwarn=="function"&&this.on("warn",$.onwarn);let V=!1;if(!this.preservePaths){let[U,K]=(0,d.stripAbsolutePath)(this.path);U&&typeof K=="string"&&(this.path=K,V=U)}this.win32=!!$.win32||process.platform==="win32",this.win32&&(this.path=f.decode(this.path.replace(/\\/g,"/")),X=X.replace(/\\/g,"/")),this.absolute=(0,a.normalizeWindowsPath)($.absolute||r.default.resolve(this.cwd,X)),this.path===""&&(this.path="./"),V&&this.warn("TAR_ENTRY_INFO",`stripping ${V} from absolute path`,{entry:this,path:V+this.path});let z=this.statCache.get(this.absolute);z?this[L](z):this[P]()}warn(X,Y,$={}){return(0,g.warnMethod)(this,X,Y,$)}emit(X,...Y){return X==="error"&&(this.#e=!0),super.emit(X,...Y)}[P](){l.default.lstat(this.absolute,(X,Y)=>{if(X)return this.emit("error",X);this[L](Y)})}[L](X){this.statCache.set(this.absolute,X),this.stat=X,X.isFile()||(X.size=0),this.type=q(X),this.emit("stat",X),this[E]()}[E](){switch(this.type){case"File":return this[b]();case"Directory":return this[w]();case"SymbolicLink":return this[_]();default:return this.end()}}[D](X){return(0,o.modeFix)(X,this.type==="Directory",this.portable)}[x](X){return y(X,this.prefix)}[A](){if(!this.stat)throw new Error("cannot write header before stat");this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.onWriteEntry?.(this),this.header=new s.Header({path:this[x](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[x](this.linkpath):this.linkpath,mode:this[D](this.stat.mode),uid:this.portable?void 0:this.stat.uid,gid:this.portable?void 0:this.stat.gid,size:this.stat.size,mtime:this.noMtime?void 0:this.mtime||this.stat.mtime,type:this.type==="Unsupported"?void 0:this.type,uname:this.portable?void 0:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?void 0:this.stat.atime,ctime:this.portable?void 0:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new p.Pax({atime:this.portable?void 0:this.header.atime,ctime:this.portable?void 0:this.header.ctime,gid:this.portable?void 0:this.header.gid,mtime:this.noMtime?void 0:this.mtime||this.header.mtime,path:this[x](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[x](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?void 0:this.header.uid,uname:this.portable?void 0:this.header.uname,dev:this.portable?void 0:this.stat.dev,ino:this.portable?void 0:this.stat.ino,nlink:this.portable?void 0:this.stat.nlink}).encode());let X=this.header?.block;if(!X)throw new Error("failed to encode header");super.write(X)}[w](){if(!this.stat)throw new Error("cannot create directory entry without stat");this.path.slice(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[A](),this.end()}[_](){l.default.readlink(this.absolute,(X,Y)=>{if(X)return this.emit("error",X);this[N](Y)})}[N](X){this.linkpath=(0,a.normalizeWindowsPath)(X),this[A](),this.end()}[O](X){if(!this.stat)throw new Error("cannot create link entry without stat");this.type="Link",this.linkpath=(0,a.normalizeWindowsPath)(r.default.relative(this.cwd,X)),this.stat.size=0,this[A](),this.end()}[b](){if(!this.stat)throw new Error("cannot create file entry without stat");if(this.stat.nlink>1){let X=`${this.stat.dev}:${this.stat.ino}`,Y=this.linkCache.get(X);if(Y?.indexOf(this.cwd)===0)return this[O](Y);this.linkCache.set(X,this.absolute)}if(this[A](),this.stat.size===0)return this.end();this[M]()}[M](){l.default.open(this.absolute,"r",(X,Y)=>{if(X)return this.emit("error",X);this[B](Y)})}[B](X){if(this.fd=X,this.#e)return this[F]();if(!this.stat)throw new Error("should stat before calling onopenfile");this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let Y=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(Y),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[I]()}[I](){let{fd:X,buf:Y,offset:$,length:V,pos:z}=this;if(X===void 0||Y===void 0)throw new Error("cannot read file without first opening");l.default.read(X,Y,$,V,z,(U,K)=>{if(U)return this[F](()=>this.emit("error",U));this[j](K)})}[F](X=()=>{}){this.fd!==void 0&&l.default.close(this.fd,X)}[j](X){if(X<=0&&this.remain>0){let $=Object.assign(new Error("encountered unexpected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[F](()=>this.emit("error",$))}if(X>this.remain){let $=Object.assign(new Error("did not encounter expected EOF"),{path:this.absolute,syscall:"read",code:"EOF"});return this[F](()=>this.emit("error",$))}if(!this.buf)throw new Error("should have created buffer prior to reading");if(X===this.remain)for(let $=X;$<this.length&&X<this.blockRemain;$++)this.buf[$+this.offset]=0,X++,this.remain++;let Y=this.offset===0&&X===this.buf.length?this.buf:this.buf.subarray(this.offset,this.offset+X);this.write(Y)?this[G]():this[H](()=>this[G]())}[H](X){this.once("drain",X)}write(X,Y,$){if(typeof Y=="function"&&($=Y,Y=void 0),typeof X=="string"&&(X=Buffer.from(X,typeof Y=="string"?Y:"utf8")),this.blockRemain<X.length){let V=Object.assign(new Error("writing more data than expected"),{path:this.absolute});return this.emit("error",V)}return this.remain-=X.length,this.blockRemain-=X.length,this.pos+=X.length,this.offset+=X.length,super.write(X,null,$)}[G](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[F](X=>X?this.emit("error",X):this.end());if(!this.buf)throw new Error("buffer lost somehow in ONDRAIN");this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[I]()}};e.WriteEntry=k;var T=class extends k{static{S(this,"WriteEntrySync")}sync=!0;[P](){this[L](l.default.lstatSync(this.absolute))}[_](){this[N](l.default.readlinkSync(this.absolute))}[M](){this[B](l.default.openSync(this.absolute,"r"))}[I](){let X=!0;try{let{fd:Y,buf:$,offset:V,length:z,pos:U}=this;if(Y===void 0||$===void 0)throw new Error("fd and buf must be set in READ method");let K=l.default.readSync(Y,$,V,z,U);this[j](K),X=!1}finally{if(X)try{this[F](()=>{})}catch{}}}[H](X){X()}[F](X=()=>{}){this.fd!==void 0&&l.default.closeSync(this.fd),X()}};e.WriteEntrySync=T;var C=class extends c.Minipass{static{S(this,"WriteEntryTar")}blockLen=0;blockRemain=0;buf=0;pos=0;remain=0;length=0;preservePaths;portable;strict;noPax;noMtime;readEntry;type;prefix;path;mode;uid;gid;uname;gname;header;mtime;atime;ctime;linkpath;size;onWriteEntry;warn(X,Y,$={}){return(0,g.warnMethod)(this,X,Y,$)}constructor(X,Y={}){let $=(0,h.dealias)(Y);super(),this.preservePaths=!!$.preservePaths,this.portable=!!$.portable,this.strict=!!$.strict,this.noPax=!!$.noPax,this.noMtime=!!$.noMtime,this.onWriteEntry=$.onWriteEntry,this.readEntry=X;let{type:V}=X;if(V==="Unsupported")throw new Error("writing entry that should be ignored");this.type=V,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=$.prefix,this.path=(0,a.normalizeWindowsPath)(X.path),this.mode=X.mode!==void 0?this[D](X.mode):void 0,this.uid=this.portable?void 0:X.uid,this.gid=this.portable?void 0:X.gid,this.uname=this.portable?void 0:X.uname,this.gname=this.portable?void 0:X.gname,this.size=X.size,this.mtime=this.noMtime?void 0:$.mtime||X.mtime,this.atime=this.portable?void 0:X.atime,this.ctime=this.portable?void 0:X.ctime,this.linkpath=X.linkpath!==void 0?(0,a.normalizeWindowsPath)(X.linkpath):void 0,typeof $.onwarn=="function"&&this.on("warn",$.onwarn);let z=!1;if(!this.preservePaths){let[K,Z]=(0,d.stripAbsolutePath)(this.path);K&&typeof Z=="string"&&(this.path=Z,z=K)}this.remain=X.size,this.blockRemain=X.startBlockSize,this.onWriteEntry?.(this),this.header=new s.Header({path:this[x](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[x](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?void 0:this.uid,gid:this.portable?void 0:this.gid,size:this.size,mtime:this.noMtime?void 0:this.mtime,type:this.type,uname:this.portable?void 0:this.uname,atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime}),z&&this.warn("TAR_ENTRY_INFO",`stripping ${z} from absolute path`,{entry:this,path:z+this.path}),this.header.encode()&&!this.noPax&&super.write(new p.Pax({atime:this.portable?void 0:this.atime,ctime:this.portable?void 0:this.ctime,gid:this.portable?void 0:this.gid,mtime:this.noMtime?void 0:this.mtime,path:this[x](this.path),linkpath:this.type==="Link"&&this.linkpath!==void 0?this[x](this.linkpath):this.linkpath,size:this.size,uid:this.portable?void 0:this.uid,uname:this.portable?void 0:this.uname,dev:this.portable?void 0:this.readEntry.dev,ino:this.portable?void 0:this.readEntry.ino,nlink:this.portable?void 0:this.readEntry.nlink}).encode());let U=this.header?.block;if(!U)throw new Error("failed to encode header");super.write(U),X.pipe(this)}[x](X){return y(X,this.prefix)}[D](X){return(0,o.modeFix)(X,this.type==="Directory",this.portable)}write(X,Y,$){typeof Y=="function"&&($=Y,Y=void 0),typeof X=="string"&&(X=Buffer.from(X,typeof Y=="string"?Y:"utf8"));let V=X.length;if(V>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=V,super.write(X,$)}end(X,Y,$){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),typeof X=="function"&&($=X,Y=void 0,X=void 0),typeof Y=="function"&&($=Y,Y=void 0),typeof X=="string"&&(X=Buffer.from(X,Y??"utf8")),$&&this.once("finish",$),X?super.end(X,$):super.end($),this}};e.WriteEntryTar=C;var q=S(X=>X.isFile()?"File":X.isDirectory()?"Directory":X.isSymbolicLink()?"SymbolicLink":"Unsupported","getType")}),ok=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Node=e.Yallist=void 0;var t=class _r{static{S(this,"Yallist")}tail;head;length=0;static create(r=[]){return new _r(r)}constructor(r=[]){for(let s of r)this.push(s)}*[Symbol.iterator](){for(let r=this.head;r;r=r.next)yield r.value}removeNode(r){if(r.list!==this)throw new Error("removing node which does not belong to this list");let s=r.next,o=r.prev;return s&&(s.prev=o),o&&(o.next=s),r===this.head&&(this.head=s),r===this.tail&&(this.tail=o),this.length--,r.next=void 0,r.prev=void 0,r.list=void 0,s}unshiftNode(r){if(r===this.head)return;r.list&&r.list.removeNode(r);let s=this.head;r.list=this,r.next=s,s&&(s.prev=r),this.head=r,this.tail||(this.tail=r),this.length++}pushNode(r){if(r===this.tail)return;r.list&&r.list.removeNode(r);let s=this.tail;r.list=this,r.prev=s,s&&(s.next=r),this.tail=r,this.head||(this.head=r),this.length++}push(...r){for(let s=0,o=r.length;s<o;s++)u(this,r[s]);return this.length}unshift(...r){for(var s=0,o=r.length;s<o;s++)n(this,r[s]);return this.length}pop(){if(!this.tail)return;let r=this.tail.value,s=this.tail;return this.tail=this.tail.prev,this.tail?this.tail.next=void 0:this.head=void 0,s.list=void 0,this.length--,r}shift(){if(!this.head)return;let r=this.head.value,s=this.head;return this.head=this.head.next,this.head?this.head.prev=void 0:this.tail=void 0,s.list=void 0,this.length--,r}forEach(r,s){s=s||this;for(let o=this.head,a=0;o;a++)r.call(s,o.value,a,this),o=o.next}forEachReverse(r,s){s=s||this;for(let o=this.tail,a=this.length-1;o;a--)r.call(s,o.value,a,this),o=o.prev}get(r){let s=0,o=this.head;for(;o&&s<r;s++)o=o.next;if(s===r&&o)return o.value}getReverse(r){let s=0,o=this.tail;for(;o&&s<r;s++)o=o.prev;if(s===r&&o)return o.value}map(r,s){s=s||this;let o=new _r;for(let a=this.head;a;)o.push(r.call(s,a.value,this)),a=a.next;return o}mapReverse(r,s){s=s||this;var o=new _r;for(let a=this.tail;a;)o.push(r.call(s,a.value,this)),a=a.prev;return o}reduce(r,s){let o,a=this.head;if(arguments.length>1)o=s;else if(this.head)a=this.head.next,o=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var h=0;a;h++)o=r(o,a.value,h),a=a.next;return o}reduceReverse(r,s){let o,a=this.tail;if(arguments.length>1)o=s;else if(this.tail)a=this.tail.prev,o=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(let h=this.length-1;a;h--)o=r(o,a.value,h),a=a.prev;return o}toArray(){let r=new Array(this.length);for(let s=0,o=this.head;o;s++)r[s]=o.value,o=o.next;return r}toArrayReverse(){let r=new Array(this.length);for(let s=0,o=this.tail;o;s++)r[s]=o.value,o=o.prev;return r}slice(r=0,s=this.length){s<0&&(s+=this.length),r<0&&(r+=this.length);let o=new _r;if(s<r||s<0)return o;r<0&&(r=0),s>this.length&&(s=this.length);let a=this.head,h=0;for(h=0;a&&h<r;h++)a=a.next;for(;a&&h<s;h++,a=a.next)o.push(a.value);return o}sliceReverse(r=0,s=this.length){s<0&&(s+=this.length),r<0&&(r+=this.length);let o=new _r;if(s<r||s<0)return o;r<0&&(r=0),s>this.length&&(s=this.length);let a=this.length,h=this.tail;for(;h&&a>s;a--)h=h.prev;for(;h&&a>r;a--,h=h.prev)o.push(h.value);return o}splice(r,s=0,...o){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);let a=this.head;for(let p=0;a&&p<r;p++)a=a.next;let h=[];for(let p=0;a&&p<s;p++)h.push(a.value),a=this.removeNode(a);a?a!==this.tail&&(a=a.prev):a=this.tail;for(let p of o)a=i(this,a,p);return h}reverse(){let r=this.head,s=this.tail;for(let o=r;o;o=o.prev){let a=o.prev;o.prev=o.next,o.next=a}return this.head=s,this.tail=r,this}};e.Yallist=t;function i(c,r,s){let o=r,a=r?r.next:c.head,h=new l(s,o,a,c);return h.next===void 0&&(c.tail=h),h.prev===void 0&&(c.head=h),c.length++,h}S(i,"insertAfter");function u(c,r){c.tail=new l(r,c.tail,void 0,c),c.head||(c.head=c.tail),c.length++}S(u,"push");function n(c,r){c.head=new l(r,void 0,c.head,c),c.tail||(c.tail=c.head),c.length++}S(n,"unshift");var l=class{static{S(this,"Node")}list;next;prev;value;constructor(c,r,s,o){this.list=o,this.value=c,r?(r.next=this,this.prev=r):this.prev=void 0,s?(s.prev=this,this.next=s):this.next=void 0}};e.Node=l}),nc=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(T,C,q,X){X===void 0&&(X=q);var Y=Object.getOwnPropertyDescriptor(C,q);(!Y||("get"in Y?!C.__esModule:Y.writable||Y.configurable))&&(Y={enumerable:!0,get:S(function(){return C[q]},"get")}),Object.defineProperty(T,X,Y)}:function(T,C,q,X){X===void 0&&(X=q),T[X]=C[q]}),i=e&&e.__setModuleDefault||(Object.create?function(T,C){Object.defineProperty(T,"default",{enumerable:!0,value:C})}:function(T,C){T.default=C}),u=e&&e.__importStar||function(T){if(T&&T.__esModule)return T;var C={};if(T!=null)for(var q in T)q!=="default"&&Object.prototype.hasOwnProperty.call(T,q)&&t(C,T,q);return i(C,T),C},n=e&&e.__importDefault||function(T){return T&&T.__esModule?T:{default:T}};Object.defineProperty(e,"__esModule",{value:!0}),e.PackSync=e.Pack=e.PackJob=void 0;var l=n(require("fs")),c=xg(),r=class{static{S(this,"PackJob")}path;absolute;entry;stat;readdir;pending=!1;ignore=!1;piped=!1;constructor(T,C){this.path=T||"./",this.absolute=C}};e.PackJob=r;var s=ke(),o=u(sn()),a=ok(),h=tc(),p=rc(),d=Buffer.alloc(1024),m=Symbol("onStat"),g=Symbol("ended"),f=Symbol("queue"),y=Symbol("current"),v=Symbol("process"),E=Symbol("processing"),b=Symbol("processJob"),w=Symbol("jobs"),_=Symbol("jobDone"),O=Symbol("addFSEntry"),A=Symbol("addTarEntry"),I=Symbol("stat"),P=Symbol("readdir"),L=Symbol("onreaddir"),j=Symbol("pipe"),N=Symbol("entry"),M=Symbol("entryOpt"),B=Symbol("writeEntryClass"),F=Symbol("write"),D=Symbol("ondrain"),H=n(require("path")),G=As(),x=class extends s.Minipass{static{S(this,"Pack")}opt;cwd;maxReadSize;preservePaths;strict;noPax;prefix;linkCache;statCache;file;portable;zip;readdirCache;noDirRecurse;follow;noMtime;mtime;filter;jobs;[B];onWriteEntry;[f];[w]=0;[E]=!1;[g]=!1;constructor(T={}){if(super(),this.opt=T,this.file=T.file||"",this.cwd=T.cwd||process.cwd(),this.maxReadSize=T.maxReadSize,this.preservePaths=!!T.preservePaths,this.strict=!!T.strict,this.noPax=!!T.noPax,this.prefix=(0,G.normalizeWindowsPath)(T.prefix||""),this.linkCache=T.linkCache||new Map,this.statCache=T.statCache||new Map,this.readdirCache=T.readdirCache||new Map,this.onWriteEntry=T.onWriteEntry,this[B]=c.WriteEntry,typeof T.onwarn=="function"&&this.on("warn",T.onwarn),this.portable=!!T.portable,T.gzip||T.brotli||T.zstd){if((T.gzip?1:0)+(T.brotli?1:0)+(T.zstd?1:0)>1)throw new TypeError("gzip, brotli, zstd are mutually exclusive");if(T.gzip&&(typeof T.gzip!="object"&&(T.gzip={}),this.portable&&(T.gzip.portable=!0),this.zip=new o.Gzip(T.gzip)),T.brotli&&(typeof T.brotli!="object"&&(T.brotli={}),this.zip=new o.BrotliCompress(T.brotli)),T.zstd&&(typeof T.zstd!="object"&&(T.zstd={}),this.zip=new o.ZstdCompress(T.zstd)),!this.zip)throw new Error("impossible");let C=this.zip;C.on("data",q=>super.write(q)),C.on("end",()=>super.end()),C.on("drain",()=>this[D]()),this.on("resume",()=>C.resume())}else this.on("drain",this[D]);this.noDirRecurse=!!T.noDirRecurse,this.follow=!!T.follow,this.noMtime=!!T.noMtime,T.mtime&&(this.mtime=T.mtime),this.filter=typeof T.filter=="function"?T.filter:()=>!0,this[f]=new a.Yallist,this[w]=0,this.jobs=Number(T.jobs)||4,this[E]=!1,this[g]=!1}[F](T){return super.write(T)}add(T){return this.write(T),this}end(T,C,q){return typeof T=="function"&&(q=T,T=void 0),typeof C=="function"&&(q=C,C=void 0),T&&this.add(T),this[g]=!0,this[v](),q&&q(),this}write(T){if(this[g])throw new Error("write after end");return T instanceof h.ReadEntry?this[A](T):this[O](T),this.flowing}[A](T){let C=(0,G.normalizeWindowsPath)(H.default.resolve(this.cwd,T.path));if(!this.filter(T.path,T))T.resume();else{let q=new r(T.path,C);q.entry=new c.WriteEntryTar(T,this[M](q)),q.entry.on("end",()=>this[_](q)),this[w]+=1,this[f].push(q)}this[v]()}[O](T){let C=(0,G.normalizeWindowsPath)(H.default.resolve(this.cwd,T));this[f].push(new r(T,C)),this[v]()}[I](T){T.pending=!0,this[w]+=1;let C=this.follow?"stat":"lstat";l.default[C](T.absolute,(q,X)=>{T.pending=!1,this[w]-=1,q?this.emit("error",q):this[m](T,X)})}[m](T,C){this.statCache.set(T.absolute,C),T.stat=C,this.filter(T.path,C)||(T.ignore=!0),this[v]()}[P](T){T.pending=!0,this[w]+=1,l.default.readdir(T.absolute,(C,q)=>{if(T.pending=!1,this[w]-=1,C)return this.emit("error",C);this[L](T,q)})}[L](T,C){this.readdirCache.set(T.absolute,C),T.readdir=C,this[v]()}[v](){if(!this[E]){this[E]=!0;for(let T=this[f].head;T&&this[w]<this.jobs;T=T.next)if(this[b](T.value),T.value.ignore){let C=T.next;this[f].removeNode(T),T.next=C}this[E]=!1,this[g]&&!this[f].length&&this[w]===0&&(this.zip?this.zip.end(d):(super.write(d),super.end()))}}get[y](){return this[f]&&this[f].head&&this[f].head.value}[_](T){this[f].shift(),this[w]-=1,this[v]()}[b](T){if(!T.pending){if(T.entry){T===this[y]&&!T.piped&&this[j](T);return}if(!T.stat){let C=this.statCache.get(T.absolute);C?this[m](T,C):this[I](T)}if(T.stat&&!T.ignore){if(!this.noDirRecurse&&T.stat.isDirectory()&&!T.readdir){let C=this.readdirCache.get(T.absolute);if(C?this[L](T,C):this[P](T),!T.readdir)return}if(T.entry=this[N](T),!T.entry){T.ignore=!0;return}T===this[y]&&!T.piped&&this[j](T)}}}[M](T){return{onwarn:S((C,q,X)=>this.warn(C,q,X),"onwarn"),noPax:this.noPax,cwd:this.cwd,absolute:T.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix,onWriteEntry:this.onWriteEntry}}[N](T){this[w]+=1;try{return new this[B](T.path,this[M](T)).on("end",()=>this[_](T)).on("error",C=>this.emit("error",C))}catch(C){this.emit("error",C)}}[D](){this[y]&&this[y].entry&&this[y].entry.resume()}[j](T){T.piped=!0,T.readdir&&T.readdir.forEach(X=>{let Y=T.path,$=Y==="./"?"":Y.replace(/\/*$/,"/");this[O]($+X)});let C=T.entry,q=this.zip;if(!C)throw new Error("cannot pipe without source");q?C.on("data",X=>{q.write(X)||C.pause()}):C.on("data",X=>{super.write(X)||C.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}warn(T,C,q={}){(0,p.warnMethod)(this,T,C,q)}};e.Pack=x;var k=class extends x{static{S(this,"PackSync")}sync=!0;constructor(T){super(T),this[B]=c.WriteEntrySync}pause(){}resume(){}[I](T){let C=this.follow?"statSync":"lstatSync";this[m](T,l.default[C](T.absolute))}[P](T){this[L](T,l.default.readdirSync(T.absolute))}[j](T){let C=T.entry,q=this.zip;if(T.readdir&&T.readdir.forEach(X=>{let Y=T.path,$=Y==="./"?"":Y.replace(/\/*$/,"/");this[O]($+X)}),!C)throw new Error("Cannot pipe without source");q?C.on("data",X=>{q.write(X)}):C.on("data",X=>{super[F](X)})}};e.PackSync=k}),Lf=J(e=>{"use strict";var t=e&&e.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.create=void 0;var i=_s(),u=t(require("path")),n=gs(),l=Os(),c=nc(),r=S((d,m)=>{let g=new c.PackSync(d),f=new i.WriteStreamSync(d.file,{mode:d.mode||438});g.pipe(f),o(g,m)},"createFileSync"),s=S((d,m)=>{let g=new c.Pack(d),f=new i.WriteStream(d.file,{mode:d.mode||438});g.pipe(f);let y=new Promise((v,E)=>{f.on("error",E),f.on("close",v),g.on("error",E)});return a(g,m),y},"createFile"),o=S((d,m)=>{m.forEach(g=>{g.charAt(0)==="@"?(0,n.list)({file:u.default.resolve(d.cwd,g.slice(1)),sync:!0,noResume:!0,onReadEntry:S(f=>d.add(f),"onReadEntry")}):d.add(g)}),d.end()},"addFilesSync"),a=S(async(d,m)=>{for(let g=0;g<m.length;g++){let f=String(m[g]);f.charAt(0)==="@"?await(0,n.list)({file:u.default.resolve(String(d.cwd),f.slice(1)),noResume:!0,onReadEntry:S(y=>{d.add(y)},"onReadEntry")}):d.add(f)}d.end()},"addFilesAsync"),h=S((d,m)=>{let g=new c.PackSync(d);return o(g,m),g},"createSync"),p=S((d,m)=>{let g=new c.Pack(d);return a(g,m),g},"createAsync");e.create=(0,l.makeCommand)(r,s,h,p,(d,m)=>{if(!m?.length)throw new TypeError("no paths specified to add to archive")})}),ak=J(e=>{"use strict";var t=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.getWriteFlag=void 0;var i=t(require("fs")),u=process.env.__FAKE_PLATFORM__||process.platform,n=u==="win32",{O_CREAT:l,O_TRUNC:c,O_WRONLY:r}=i.default.constants,s=Number(process.env.__FAKE_FS_O_FILENAME__)||i.default.constants.UV_FS_O_FILEMAP||0,o=n&&!!s,a=512*1024,h=s|c|l|r;e.getWriteFlag=o?p=>p<a?h:"w":()=>"w"}),lk=J(e=>{"use strict";var t=e&&e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.chownrSync=e.chownr=void 0;var i=t(require("fs")),u=t(require("path")),n=S((a,h,p)=>{try{return i.default.lchownSync(a,h,p)}catch(d){if(d?.code!=="ENOENT")throw d}},"lchownSync"),l=S((a,h,p,d)=>{i.default.lchown(a,h,p,m=>{d(m&&m?.code!=="ENOENT"?m:null)})},"chown"),c=S((a,h,p,d,m)=>{if(h.isDirectory())(0,e.chownr)(u.default.resolve(a,h.name),p,d,g=>{if(g)return m(g);let f=u.default.resolve(a,h.name);l(f,p,d,m)});else{let g=u.default.resolve(a,h.name);l(g,p,d,m)}},"chownrKid"),r=S((a,h,p,d)=>{i.default.readdir(a,{withFileTypes:!0},(m,g)=>{if(m){if(m.code==="ENOENT")return d();if(m.code!=="ENOTDIR"&&m.code!=="ENOTSUP")return d(m)}if(m||!g.length)return l(a,h,p,d);let f=g.length,y=null,v=S(E=>{if(!y){if(E)return d(y=E);if(--f===0)return l(a,h,p,d)}},"then");for(let E of g)c(a,E,h,p,v)})},"chownr");e.chownr=r;var s=S((a,h,p,d)=>{h.isDirectory()&&(0,e.chownrSync)(u.default.resolve(a,h.name),p,d),n(u.default.resolve(a,h.name),p,d)},"chownrKidSync"),o=S((a,h,p)=>{let d;try{d=i.default.readdirSync(a,{withFileTypes:!0})}catch(m){let g=m;if(g?.code==="ENOENT")return;if(g?.code==="ENOTDIR"||g?.code==="ENOTSUP")return n(a,h,p);throw g}for(let m of d)s(a,m,h,p);return n(a,h,p)},"chownrSync");e.chownrSync=o}),ck=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CwdError=void 0;var t=class extends Error{static{S(this,"CwdError")}path;code;syscall="chdir";constructor(i,u){super(`${u}: Cannot cd into '${i}'`),this.path=i,this.code=u}get name(){return"CwdError"}};e.CwdError=t}),uk=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SymlinkError=void 0;var t=class extends Error{static{S(this,"SymlinkError")}path;symlink;syscall="symlink";code="TAR_SYMLINK_ERROR";constructor(i,u){super("TAR_SYMLINK_ERROR: Cannot extract through symbolic link"),this.symlink=i,this.path=u}get name(){return"SymlinkError"}};e.SymlinkError=t}),hk=J(e=>{"use strict";var t=e&&e.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.mkdirSync=e.mkdir=void 0;var i=lk(),u=t(require("fs")),n=t(require("internal/fs/promises")),l=t(require("path")),c=ck(),r=As(),s=uk(),o=S((g,f)=>{u.default.stat(g,(y,v)=>{(y||!v.isDirectory())&&(y=new c.CwdError(g,y?.code||"ENOTDIR")),f(y)})},"checkCwd"),a=S((g,f,y)=>{g=(0,r.normalizeWindowsPath)(g);let v=f.umask??18,E=f.mode|448,b=(E&v)!==0,w=f.uid,_=f.gid,O=typeof w=="number"&&typeof _=="number"&&(w!==f.processUid||_!==f.processGid),A=f.preserve,I=f.unlink,P=(0,r.normalizeWindowsPath)(f.cwd),L=S((N,M)=>{N?y(N):M&&O?(0,i.chownr)(M,w,_,B=>L(B)):b?u.default.chmod(g,E,y):y()},"done");if(g===P)return o(g,L);if(A)return n.default.mkdir(g,{mode:E,recursive:!0}).then(N=>L(null,N??void 0),L);let j=(0,r.normalizeWindowsPath)(l.default.relative(P,g)).split("/");h(P,j,E,I,P,void 0,L)},"mkdir");e.mkdir=a;var h=S((g,f,y,v,E,b,w)=>{if(!f.length)return w(null,b);let _=f.shift(),O=(0,r.normalizeWindowsPath)(l.default.resolve(g+"/"+_));u.default.mkdir(O,y,p(O,f,y,v,E,b,w))},"mkdir_"),p=S((g,f,y,v,E,b,w)=>_=>{_?u.default.lstat(g,(O,A)=>{if(O)O.path=O.path&&(0,r.normalizeWindowsPath)(O.path),w(O);else if(A.isDirectory())h(g,f,y,v,E,b,w);else if(v)u.default.unlink(g,I=>{if(I)return w(I);u.default.mkdir(g,y,p(g,f,y,v,E,b,w))});else{if(A.isSymbolicLink())return w(new s.SymlinkError(g,g+"/"+f.join("/")));w(_)}}):(b=b||g,h(g,f,y,v,E,b,w))},"onmkdir"),d=S(g=>{let f=!1,y;try{f=u.default.statSync(g).isDirectory()}catch(v){y=v?.code}finally{if(!f)throw new c.CwdError(g,y??"ENOTDIR")}},"checkCwdSync"),m=S((g,f)=>{g=(0,r.normalizeWindowsPath)(g);let y=f.umask??18,v=f.mode|448,E=(v&y)!==0,b=f.uid,w=f.gid,_=typeof b=="number"&&typeof w=="number"&&(b!==f.processUid||w!==f.processGid),O=f.preserve,A=f.unlink,I=(0,r.normalizeWindowsPath)(f.cwd),P=S(N=>{N&&_&&(0,i.chownrSync)(N,b,w),E&&u.default.chmodSync(g,v)},"done");if(g===I)return d(I),P();if(O)return P(u.default.mkdirSync(g,{mode:v,recursive:!0})??void 0);let L=(0,r.normalizeWindowsPath)(l.default.relative(I,g)).split("/"),j;for(let N=L.shift(),M=I;N&&(M+="/"+N);N=L.shift()){M=(0,r.normalizeWindowsPath)(l.default.resolve(M));try{u.default.mkdirSync(M,v),j=j||M}catch{let B=u.default.lstatSync(M);if(B.isDirectory())continue;if(A){u.default.unlinkSync(M),u.default.mkdirSync(M,v),j=j||M;continue}else if(B.isSymbolicLink())return new s.SymlinkError(M,M+"/"+L.join("/"))}}return P(j)},"mkdirSync");e.mkdirSync=m}),pk=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeUnicode=void 0;var t=Object.create(null),i=1e4,u=new Set,n=S(l=>{u.has(l)?u.delete(l):t[l]=l.normalize("NFD"),u.add(l);let c=t[l],r=u.size-i;if(r>i/10){for(let s of u)if(u.delete(s),delete t[s],--r<=0)break}return c},"normalizeUnicode");e.normalizeUnicode=n}),dk=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PathReservations=void 0;var t=require("path"),i=pk(),u=ic(),n=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,l=n==="win32",c=S(s=>s.split("/").slice(0,-1).reduce((o,a)=>{let h=o[o.length-1];return h!==void 0&&(a=(0,t.join)(h,a)),o.push(a||"/"),o},[]),"getDirs"),r=class{static{S(this,"PathReservations")}#e=new Map;#t=new Map;#r=new Set;reserve(s,o){s=l?["win32 parallelization disabled"]:s.map(h=>(0,u.stripTrailingSlashes)((0,t.join)((0,i.normalizeUnicode)(h))).toLowerCase());let a=new Set(s.map(h=>c(h)).reduce((h,p)=>h.concat(p)));this.#t.set(o,{dirs:a,paths:s});for(let h of s){let p=this.#e.get(h);p?p.push(o):this.#e.set(h,[o])}for(let h of a){let p=this.#e.get(h);if(!p)this.#e.set(h,[new Set([o])]);else{let d=p[p.length-1];d instanceof Set?d.add(o):p.push(new Set([o]))}}return this.#n(o)}#s(s){let o=this.#t.get(s);if(!o)throw new Error("function does not have any path reservations");return{paths:o.paths.map(a=>this.#e.get(a)),dirs:[...o.dirs].map(a=>this.#e.get(a))}}check(s){let{paths:o,dirs:a}=this.#s(s);return o.every(h=>h&&h[0]===s)&&a.every(h=>h&&h[0]instanceof Set&&h[0].has(s))}#n(s){return this.#r.has(s)||!this.check(s)?!1:(this.#r.add(s),s(()=>this.#c(s)),!0)}#c(s){if(!this.#r.has(s))return!1;let o=this.#t.get(s);if(!o)throw new Error("invalid reservation");let{paths:a,dirs:h}=o,p=new Set;for(let d of a){let m=this.#e.get(d);if(!m||m?.[0]!==s)continue;let g=m[1];if(!g){this.#e.delete(d);continue}if(m.shift(),typeof g=="function")p.add(g);else for(let f of g)p.add(f)}for(let d of h){let m=this.#e.get(d),g=m?.[0];if(!(!m||!(g instanceof Set)))if(g.size===1&&m.length===1){this.#e.delete(d);continue}else if(g.size===1){m.shift();let f=m[0];typeof f=="function"&&p.add(f)}else g.delete(s)}return this.#r.delete(s),p.forEach(d=>this.#n(d)),!0}};e.PathReservations=r}),Ng=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(R,W,ee,ne){ne===void 0&&(ne=ee);var te=Object.getOwnPropertyDescriptor(W,ee);(!te||("get"in te?!W.__esModule:te.writable||te.configurable))&&(te={enumerable:!0,get:S(function(){return W[ee]},"get")}),Object.defineProperty(R,ne,te)}:function(R,W,ee,ne){ne===void 0&&(ne=ee),R[ne]=W[ee]}),i=e&&e.__setModuleDefault||(Object.create?function(R,W){Object.defineProperty(R,"default",{enumerable:!0,value:W})}:function(R,W){R.default=W}),u=e&&e.__importStar||function(R){if(R&&R.__esModule)return R;var W={};if(R!=null)for(var ee in R)ee!=="default"&&Object.prototype.hasOwnProperty.call(R,ee)&&t(W,R,ee);return i(W,R),W},n=e&&e.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(e,"__esModule",{value:!0}),e.UnpackSync=e.Unpack=void 0;var l=u(_s()),c=n(require("assert")),r=require("crypto"),s=n(require("fs")),o=n(require("path")),a=ak(),h=hk(),p=As(),d=sc(),m=Tg(),g=u(Pg()),f=dk(),y=Symbol("onEntry"),v=Symbol("checkFs"),E=Symbol("checkFs2"),b=Symbol("isReusable"),w=Symbol("makeFs"),_=Symbol("file"),O=Symbol("directory"),A=Symbol("link"),I=Symbol("symlink"),P=Symbol("hardlink"),L=Symbol("unsupported"),j=Symbol("checkPath"),N=Symbol("mkdir"),M=Symbol("onError"),B=Symbol("pending"),F=Symbol("pend"),D=Symbol("unpend"),H=Symbol("ended"),G=Symbol("maybeClose"),x=Symbol("skip"),k=Symbol("doChown"),T=Symbol("uid"),C=Symbol("gid"),q=Symbol("checkedCwd"),X=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Y=X==="win32",$=1024,V=S((R,W)=>{if(!Y)return s.default.unlink(R,W);let ee=R+".DELETE."+(0,r.randomBytes)(16).toString("hex");s.default.rename(R,ee,ne=>{if(ne)return W(ne);s.default.unlink(ee,W)})},"unlinkFile"),z=S(R=>{if(!Y)return s.default.unlinkSync(R);let W=R+".DELETE."+(0,r.randomBytes)(16).toString("hex");s.default.renameSync(R,W),s.default.unlinkSync(W)},"unlinkFileSync"),U=S((R,W,ee)=>R!==void 0&&R===R>>>0?R:W!==void 0&&W===W>>>0?W:ee,"uint32"),K=class extends d.Parser{static{S(this,"Unpack")}[H]=!1;[q]=!1;[B]=0;reservations=new f.PathReservations;transform;writable=!0;readable=!1;uid;gid;setOwner;preserveOwner;processGid;processUid;maxDepth;forceChown;win32;newer;keep;noMtime;preservePaths;unlink;cwd;strip;processUmask;umask;dmode;fmode;chmod;constructor(R={}){if(R.ondone=()=>{this[H]=!0,this[G]()},super(R),this.transform=R.transform,this.chmod=!!R.chmod,typeof R.uid=="number"||typeof R.gid=="number"){if(typeof R.uid!="number"||typeof R.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(R.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=R.uid,this.gid=R.gid,this.setOwner=!0}else this.uid=void 0,this.gid=void 0,this.setOwner=!1;R.preserveOwner===void 0&&typeof R.uid!="number"?this.preserveOwner=!!(process.getuid&&process.getuid()===0):this.preserveOwner=!!R.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():void 0,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():void 0,this.maxDepth=typeof R.maxDepth=="number"?R.maxDepth:$,this.forceChown=R.forceChown===!0,this.win32=!!R.win32||Y,this.newer=!!R.newer,this.keep=!!R.keep,this.noMtime=!!R.noMtime,this.preservePaths=!!R.preservePaths,this.unlink=!!R.unlink,this.cwd=(0,p.normalizeWindowsPath)(o.default.resolve(R.cwd||process.cwd())),this.strip=Number(R.strip)||0,this.processUmask=this.chmod?typeof R.processUmask=="number"?R.processUmask:process.umask():0,this.umask=typeof R.umask=="number"?R.umask:this.processUmask,this.dmode=R.dmode||511&~this.umask,this.fmode=R.fmode||438&~this.umask,this.on("entry",W=>this[y](W))}warn(R,W,ee={}){return(R==="TAR_BAD_ARCHIVE"||R==="TAR_ABORT")&&(ee.recoverable=!1),super.warn(R,W,ee)}[G](){this[H]&&this[B]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[j](R){let W=(0,p.normalizeWindowsPath)(R.path),ee=W.split("/");if(this.strip){if(ee.length<this.strip)return!1;if(R.type==="Link"){let ne=(0,p.normalizeWindowsPath)(String(R.linkpath)).split("/");if(ne.length>=this.strip)R.linkpath=ne.slice(this.strip).join("/");else return!1}ee.splice(0,this.strip),R.path=ee.join("/")}if(isFinite(this.maxDepth)&&ee.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:R,path:W,depth:ee.length,maxDepth:this.maxDepth}),!1;if(!this.preservePaths){if(ee.includes("..")||Y&&/^[a-z]:\.\.$/i.test(ee[0]??""))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:R,path:W}),!1;let[ne,te]=(0,m.stripAbsolutePath)(W);ne&&(R.path=String(te),this.warn("TAR_ENTRY_INFO",`stripping ${ne} from absolute path`,{entry:R,path:W}))}if(o.default.isAbsolute(R.path)?R.absolute=(0,p.normalizeWindowsPath)(o.default.resolve(R.path)):R.absolute=(0,p.normalizeWindowsPath)(o.default.resolve(this.cwd,R.path)),!this.preservePaths&&typeof R.absolute=="string"&&R.absolute.indexOf(this.cwd+"/")!==0&&R.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:R,path:(0,p.normalizeWindowsPath)(R.path),resolvedPath:R.absolute,cwd:this.cwd}),!1;if(R.absolute===this.cwd&&R.type!=="Directory"&&R.type!=="GNUDumpDir")return!1;if(this.win32){let{root:ne}=o.default.win32.parse(String(R.absolute));R.absolute=ne+g.encode(String(R.absolute).slice(ne.length));let{root:te}=o.default.win32.parse(R.path);R.path=te+g.encode(R.path.slice(te.length))}return!0}[y](R){if(!this[j](R))return R.resume();switch(c.default.equal(typeof R.absolute,"string"),R.type){case"Directory":case"GNUDumpDir":R.mode&&(R.mode=R.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[v](R);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[L](R)}}[M](R,W){R.name==="CwdError"?this.emit("error",R):(this.warn("TAR_ENTRY_ERROR",R,{entry:W}),this[D](),W.resume())}[N](R,W,ee){(0,h.mkdir)((0,p.normalizeWindowsPath)(R),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:W},ee)}[k](R){return this.forceChown||this.preserveOwner&&(typeof R.uid=="number"&&R.uid!==this.processUid||typeof R.gid=="number"&&R.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[T](R){return U(this.uid,R.uid,this.processUid)}[C](R){return U(this.gid,R.gid,this.processGid)}[_](R,W){let ee=typeof R.mode=="number"?R.mode&4095:this.fmode,ne=new l.WriteStream(String(R.absolute),{flags:(0,a.getWriteFlag)(R.size),mode:ee,autoClose:!1});ne.on("error",re=>{ne.fd&&s.default.close(ne.fd,()=>{}),ne.write=()=>!0,this[M](re,R),W()});let te=1,le=S(re=>{if(re){ne.fd&&s.default.close(ne.fd,()=>{}),this[M](re,R),W();return}--te===0&&ne.fd!==void 0&&s.default.close(ne.fd,he=>{he?this[M](he,R):this[D](),W()})},"done");ne.on("finish",()=>{let re=String(R.absolute),he=ne.fd;if(typeof he=="number"&&R.mtime&&!this.noMtime){te++;let ie=R.atime||new Date,ce=R.mtime;s.default.futimes(he,ie,ce,ge=>ge?s.default.utimes(re,ie,ce,ye=>le(ye&&ge)):le())}if(typeof he=="number"&&this[k](R)){te++;let ie=this[T](R),ce=this[C](R);typeof ie=="number"&&typeof ce=="number"&&s.default.fchown(he,ie,ce,ge=>ge?s.default.chown(re,ie,ce,ye=>le(ye&&ge)):le())}le()});let pe=this.transform&&this.transform(R)||R;pe!==R&&(pe.on("error",re=>{this[M](re,R),W()}),R.pipe(pe)),pe.pipe(ne)}[O](R,W){let ee=typeof R.mode=="number"?R.mode&4095:this.dmode;this[N](String(R.absolute),ee,ne=>{if(ne){this[M](ne,R),W();return}let te=1,le=S(()=>{--te===0&&(W(),this[D](),R.resume())},"done");R.mtime&&!this.noMtime&&(te++,s.default.utimes(String(R.absolute),R.atime||new Date,R.mtime,le)),this[k](R)&&(te++,s.default.chown(String(R.absolute),Number(this[T](R)),Number(this[C](R)),le)),le()})}[L](R){R.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${R.type}`,{entry:R}),R.resume()}[I](R,W){this[A](R,String(R.linkpath),"symlink",W)}[P](R,W){let ee=(0,p.normalizeWindowsPath)(o.default.resolve(this.cwd,String(R.linkpath)));this[A](R,ee,"link",W)}[F](){this[B]++}[D](){this[B]--,this[G]()}[x](R){this[D](),R.resume()}[b](R,W){return R.type==="File"&&!this.unlink&&W.isFile()&&W.nlink<=1&&!Y}[v](R){this[F]();let W=[R.path];R.linkpath&&W.push(R.linkpath),this.reservations.reserve(W,ee=>this[E](R,ee))}[E](R,W){let ee=S(pe=>{W(pe)},"done"),ne=S(()=>{this[N](this.cwd,this.dmode,pe=>{if(pe){this[M](pe,R),ee();return}this[q]=!0,te()})},"checkCwd"),te=S(()=>{if(R.absolute!==this.cwd){let pe=(0,p.normalizeWindowsPath)(o.default.dirname(String(R.absolute)));if(pe!==this.cwd)return this[N](pe,this.dmode,re=>{if(re){this[M](re,R),ee();return}le()})}le()},"start"),le=S(()=>{s.default.lstat(String(R.absolute),(pe,re)=>{if(re&&(this.keep||this.newer&&re.mtime>(R.mtime??re.mtime))){this[x](R),ee();return}if(pe||this[b](R,re))return this[w](null,R,ee);if(re.isDirectory()){if(R.type==="Directory"){let he=this.chmod&&R.mode&&(re.mode&4095)!==R.mode,ie=S(ce=>this[w](ce??null,R,ee),"afterChmod");return he?s.default.chmod(String(R.absolute),Number(R.mode),ie):ie()}if(R.absolute!==this.cwd)return s.default.rmdir(String(R.absolute),he=>this[w](he??null,R,ee))}if(R.absolute===this.cwd)return this[w](null,R,ee);V(String(R.absolute),he=>this[w](he??null,R,ee))})},"afterMakeParent");this[q]?te():ne()}[w](R,W,ee){if(R){this[M](R,W),ee();return}switch(W.type){case"File":case"OldFile":case"ContiguousFile":return this[_](W,ee);case"Link":return this[P](W,ee);case"SymbolicLink":return this[I](W,ee);case"Directory":case"GNUDumpDir":return this[O](W,ee)}}[A](R,W,ee,ne){s.default[ee](W,String(R.absolute),te=>{te?this[M](te,R):(this[D](),R.resume()),ne()})}};e.Unpack=K;var Z=S(R=>{try{return[null,R()]}catch(W){return[W,null]}},"callSync"),Q=class extends K{static{S(this,"UnpackSync")}sync=!0;[w](R,W){return super[w](R,W,()=>{})}[v](R){if(!this[q]){let te=this[N](this.cwd,this.dmode);if(te)return this[M](te,R);this[q]=!0}if(R.absolute!==this.cwd){let te=(0,p.normalizeWindowsPath)(o.default.dirname(String(R.absolute)));if(te!==this.cwd){let le=this[N](te,this.dmode);if(le)return this[M](le,R)}}let[W,ee]=Z(()=>s.default.lstatSync(String(R.absolute)));if(ee&&(this.keep||this.newer&&ee.mtime>(R.mtime??ee.mtime)))return this[x](R);if(W||this[b](R,ee))return this[w](null,R);if(ee.isDirectory()){if(R.type==="Directory"){let le=this.chmod&&R.mode&&(ee.mode&4095)!==R.mode,[pe]=le?Z(()=>{s.default.chmodSync(String(R.absolute),Number(R.mode))}):[];return this[w](pe,R)}let[te]=Z(()=>s.default.rmdirSync(String(R.absolute)));this[w](te,R)}let[ne]=R.absolute===this.cwd?[]:Z(()=>z(String(R.absolute)));this[w](ne,R)}[_](R,W){let ee=typeof R.mode=="number"?R.mode&4095:this.fmode,ne=S(pe=>{let re;try{s.default.closeSync(te)}catch(he){re=he}(pe||re)&&this[M](pe||re,R),W()},"oner"),te;try{te=s.default.openSync(String(R.absolute),(0,a.getWriteFlag)(R.size),ee)}catch(pe){return ne(pe)}let le=this.transform&&this.transform(R)||R;le!==R&&(le.on("error",pe=>this[M](pe,R)),R.pipe(le)),le.on("data",pe=>{try{s.default.writeSync(te,pe,0,pe.length)}catch(re){ne(re)}}),le.on("end",()=>{let pe=null;if(R.mtime&&!this.noMtime){let re=R.atime||new Date,he=R.mtime;try{s.default.futimesSync(te,re,he)}catch(ie){try{s.default.utimesSync(String(R.absolute),re,he)}catch{pe=ie}}}if(this[k](R)){let re=this[T](R),he=this[C](R);try{s.default.fchownSync(te,Number(re),Number(he))}catch(ie){try{s.default.chownSync(String(R.absolute),Number(re),Number(he))}catch{pe=pe||ie}}}ne(pe)})}[O](R,W){let ee=typeof R.mode=="number"?R.mode&4095:this.dmode,ne=this[N](String(R.absolute),ee);if(ne){this[M](ne,R),W();return}if(R.mtime&&!this.noMtime)try{s.default.utimesSync(String(R.absolute),R.atime||new Date,R.mtime)}catch{}if(this[k](R))try{s.default.chownSync(String(R.absolute),Number(this[T](R)),Number(this[C](R)))}catch{}W(),R.resume()}[N](R,W){try{return(0,h.mkdirSync)((0,p.normalizeWindowsPath)(R),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cwd:this.cwd,mode:W})}catch(ee){return ee}}[A](R,W,ee,ne){let te=`${ee}Sync`;try{s.default[te](W,String(R.absolute)),ne(),R.resume()}catch(le){return this[M](le,R)}}};e.UnpackSync=Q}),Df=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(p,d,m,g){g===void 0&&(g=m);var f=Object.getOwnPropertyDescriptor(d,m);(!f||("get"in f?!d.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:S(function(){return d[m]},"get")}),Object.defineProperty(p,g,f)}:function(p,d,m,g){g===void 0&&(g=m),p[g]=d[m]}),i=e&&e.__setModuleDefault||(Object.create?function(p,d){Object.defineProperty(p,"default",{enumerable:!0,value:d})}:function(p,d){p.default=d}),u=e&&e.__importStar||function(p){if(p&&p.__esModule)return p;var d={};if(p!=null)for(var m in p)m!=="default"&&Object.prototype.hasOwnProperty.call(p,m)&&t(d,p,m);return i(d,p),d},n=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.extract=void 0;var l=u(_s()),c=n(require("fs")),r=gs(),s=Os(),o=Ng(),a=S(p=>{let d=new o.UnpackSync(p),m=p.file,g=c.default.statSync(m),f=p.maxReadSize||16*1024*1024;new l.ReadStreamSync(m,{readSize:f,size:g.size}).pipe(d)},"extractFileSync"),h=S((p,d)=>{let m=new o.Unpack(p),g=p.maxReadSize||16*1024*1024,f=p.file;return new Promise((y,v)=>{m.on("error",v),m.on("close",y),c.default.stat(f,(E,b)=>{if(E)v(E);else{let w=new l.ReadStream(f,{readSize:g,size:b.size});w.on("error",v),w.pipe(m)}})})},"extractFile");e.extract=(0,s.makeCommand)(a,h,p=>new o.UnpackSync(p),p=>new o.Unpack(p),(p,d)=>{d?.length&&(0,r.filesFilter)(p,d)})}),vl=J(e=>{"use strict";var t=e&&e.__importDefault||function(g){return g&&g.__esModule?g:{default:g}};Object.defineProperty(e,"__esModule",{value:!0}),e.replace=void 0;var i=_s(),u=t(require("fs")),n=t(require("path")),l=Rs(),c=gs(),r=Os(),s=Ql(),o=nc(),a=S((g,f)=>{let y=new o.PackSync(g),v=!0,E,b;try{try{E=u.default.openSync(g.file,"r+")}catch(O){if(O?.code==="ENOENT")E=u.default.openSync(g.file,"w+");else throw O}let w=u.default.fstatSync(E),_=Buffer.alloc(512);e:for(b=0;b<w.size;b+=512){for(let I=0,P=0;I<512;I+=P){if(P=u.default.readSync(E,_,I,_.length-I,b+I),b===0&&_[0]===31&&_[1]===139)throw new Error("cannot append to compressed archives");if(!P)break e}let O=new l.Header(_);if(!O.cksumValid)break;let A=512*Math.ceil((O.size||0)/512);if(b+A+512>w.size)break;b+=A,g.mtimeCache&&O.mtime&&g.mtimeCache.set(String(O.path),O.mtime)}v=!1,h(g,y,b,E,f)}finally{if(v)try{u.default.closeSync(E)}catch{}}},"replaceSync"),h=S((g,f,y,v,E)=>{let b=new i.WriteStreamSync(g.file,{fd:v,start:y});f.pipe(b),d(f,E)},"streamSync"),p=S((g,f)=>{f=Array.from(f);let y=new o.Pack(g),v=S((E,b,w)=>{let _=S((L,j)=>{L?u.default.close(E,N=>w(L)):w(null,j)},"cb"),O=0;if(b===0)return _(null,0);let A=0,I=Buffer.alloc(512),P=S((L,j)=>{if(L||typeof j>"u")return _(L);if(A+=j,A<512&&j)return u.default.read(E,I,A,I.length-A,O+A,P);if(O===0&&I[0]===31&&I[1]===139)return _(new Error("cannot append to compressed archives"));if(A<512)return _(null,O);let N=new l.Header(I);if(!N.cksumValid)return _(null,O);let M=512*Math.ceil((N.size??0)/512);if(O+M+512>b||(O+=M+512,O>=b))return _(null,O);g.mtimeCache&&N.mtime&&g.mtimeCache.set(String(N.path),N.mtime),A=0,u.default.read(E,I,0,512,O,P)},"onread");u.default.read(E,I,0,512,O,P)},"getPos");return new Promise((E,b)=>{y.on("error",b);let w="r+",_=S((O,A)=>{if(O&&O.code==="ENOENT"&&w==="r+")return w="w+",u.default.open(g.file,w,_);if(O||!A)return b(O);u.default.fstat(A,(I,P)=>{if(I)return u.default.close(A,()=>b(I));v(A,P.size,(L,j)=>{if(L)return b(L);let N=new i.WriteStream(g.file,{fd:A,start:j});y.pipe(N),N.on("error",b),N.on("close",E),m(y,f)})})},"onopen");u.default.open(g.file,w,_)})},"replaceAsync"),d=S((g,f)=>{f.forEach(y=>{y.charAt(0)==="@"?(0,c.list)({file:n.default.resolve(g.cwd,y.slice(1)),sync:!0,noResume:!0,onReadEntry:S(v=>g.add(v),"onReadEntry")}):g.add(y)}),g.end()},"addFilesSync"),m=S(async(g,f)=>{for(let y=0;y<f.length;y++){let v=String(f[y]);v.charAt(0)==="@"?await(0,c.list)({file:n.default.resolve(String(g.cwd),v.slice(1)),noResume:!0,onReadEntry:S(E=>g.add(E),"onReadEntry")}):g.add(v)}g.end()},"addFilesAsync");e.replace=(0,r.makeCommand)(a,p,()=>{throw new TypeError("file is required")},()=>{throw new TypeError("file is required")},(g,f)=>{if(!(0,s.isFile)(g))throw new TypeError("file is required");if(g.gzip||g.brotli||g.zstd||g.file.endsWith(".br")||g.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!f?.length)throw new TypeError("no paths specified to add/replace")})}),$f=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.update=void 0;var t=Os(),i=vl();e.update=(0,t.makeCommand)(i.replace.syncFile,i.replace.asyncFile,i.replace.syncNoFile,i.replace.asyncNoFile,(n,l=[])=>{i.replace.validate?.(n,l),u(n)});var u=S(n=>{let l=n.filter;n.mtimeCache||(n.mtimeCache=new Map),n.filter=l?(c,r)=>l(c,r)&&!((n.mtimeCache?.get(c)??r.mtime??0)>(r.mtime??0)):(c,r)=>!((n.mtimeCache?.get(c)??r.mtime??0)>(r.mtime??0))},"mtimeFilter")}),kg=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(a,h,p,d){d===void 0&&(d=p);var m=Object.getOwnPropertyDescriptor(h,p);(!m||("get"in m?!h.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:S(function(){return h[p]},"get")}),Object.defineProperty(a,d,m)}:function(a,h,p,d){d===void 0&&(d=p),a[d]=h[p]}),i=e&&e.__setModuleDefault||(Object.create?function(a,h){Object.defineProperty(a,"default",{enumerable:!0,value:h})}:function(a,h){a.default=h}),u=e&&e.__exportStar||function(a,h){for(var p in a)p!=="default"&&!Object.prototype.hasOwnProperty.call(h,p)&&t(h,a,p)},n=e&&e.__importStar||function(a){if(a&&a.__esModule)return a;var h={};if(a!=null)for(var p in a)p!=="default"&&Object.prototype.hasOwnProperty.call(a,p)&&t(h,a,p);return i(h,a),h};Object.defineProperty(e,"__esModule",{value:!0}),e.u=e.types=e.r=e.t=e.x=e.c=void 0,u(Lf(),e);var l=Lf();Object.defineProperty(e,"c",{enumerable:!0,get:S(function(){return l.create},"get")}),u(Df(),e);var c=Df();Object.defineProperty(e,"x",{enumerable:!0,get:S(function(){return c.extract},"get")}),u(Rs(),e),u(gs(),e);var r=gs();Object.defineProperty(e,"t",{enumerable:!0,get:S(function(){return r.list},"get")}),u(nc(),e),u(sc(),e),u(ec(),e),u(tc(),e),u(vl(),e);var s=vl();Object.defineProperty(e,"r",{enumerable:!0,get:S(function(){return s.replace},"get")}),e.types=n(Cg()),u(Ng(),e),u($f(),e);var o=$f();Object.defineProperty(e,"u",{enumerable:!0,get:S(function(){return o.update},"get")}),u(xg(),e)}),Tr=J((e,t)=>{t.exports={cacheFetches:Symbol.for("pacote.Fetcher._cacheFetches"),readPackageJson:Symbol.for("package.Fetcher._readPackageJson"),tarballFromResolved:Symbol.for("pacote.Fetcher._tarballFromResolved")}}),fk=J((e,t)=>{var{resolve:i}=require("path"),{tmpdir:u,homedir:n}=require("os");t.exports=(l=!1)=>{let c=u(),r=process.getuid?process.getuid():process.pid,s=n()||i(c,"npm-"+r),o=l||process.platform,a=o==="win32"?"npm-cache":".npm",h=o==="win32"&&process.env.LOCALAPPDATA||s;return{cacache:i(h,a,"_cacache"),tufcache:i(h,a,"_tuf")}}}),Lg=J((e,t)=>{var i=S((n,l)=>typeof l=="string"?{[n]:l}:l,"binObj"),u=S((n,l)=>{let c=i(n.name,n.bin),r=l.replace(/^[^\\/]*\//,"");for(let s of Object.entries(c))if(s[1]===r)return!0;return!1},"hasBin");t.exports=(n,l)=>n&&n.bin?u(n,l):!1}),Dg=J((e,t)=>{var i=S(u=>{let n=u;for(;n.endsWith("/");)n=n.slice(0,-1);return n},"removeTrailingSlashes");t.exports=i}),gk=J((e,t)=>{"use strict";var i=require("fs"),u=require("path"),n=require("events").EventEmitter,l=zt().Minimatch,c=class $g extends n{static{S(this,"Walker")}constructor(h){h=h||{},super(h),this.isSymbolicLink=h.isSymbolicLink,this.path=h.path||process.cwd(),this.basename=u.basename(this.path),this.ignoreFiles=h.ignoreFiles||[".ignore"],this.ignoreRules={},this.parent=h.parent||null,this.includeEmpty=!!h.includeEmpty,this.root=this.parent?this.parent.root:this.path,this.follow=!!h.follow,this.result=this.parent?this.parent.result:new Set,this.entries=null,this.sawError=!1,this.exact=h.exact}sort(h,p){return h.localeCompare(p,"en")}emit(h,p){let d=!1;return this.sawError&&h==="error"||(h==="error"?this.sawError=!0:h==="done"&&!this.parent&&(p=Array.from(p).map(m=>/^@/.test(m)?`./${m}`:m).sort(this.sort),this.result=p),h==="error"&&this.parent?d=this.parent.emit("error",p):d=super.emit(h,p)),d}start(){return i.readdir(this.path,(h,p)=>h?this.emit("error",h):this.onReaddir(p)),this}isIgnoreFile(h){return h!=="."&&h!==".."&&this.ignoreFiles.indexOf(h)!==-1}onReaddir(h){this.entries=h,h.length===0?(this.includeEmpty&&this.result.add(this.path.slice(this.root.length+1)),this.emit("done",this.result)):this.entries.some(p=>this.isIgnoreFile(p))?this.addIgnoreFiles():this.filterEntries()}addIgnoreFiles(){let h=this.entries.filter(m=>this.isIgnoreFile(m)),p=h.length,d=S(()=>{--p===0&&this.filterEntries()},"then");h.forEach(m=>this.addIgnoreFile(m,d))}addIgnoreFile(h,p){let d=u.resolve(this.path,h);i.readFile(d,"utf8",(m,g)=>m?this.emit("error",m):this.onReadIgnoreFile(h,g,p))}onReadIgnoreFile(h,p,d){let m={matchBase:!0,dot:!0,flipNegate:!0,nocase:!0},g=p.split(/\r?\n/).filter(f=>!/^#|^$/.test(f.trim())).map(f=>new l(f.trim(),m));this.ignoreRules[h]=g,d()}filterEntries(){let h=this.entries.map(d=>{let m=this.filterEntry(d),g=this.filterEntry(d,!0);return m||g?[d,m,g]:!1}).filter(d=>d),p=h.length;if(p===0)this.emit("done",this.result);else{let d=S(()=>{--p===0&&this.emit("done",this.result)},"then");h.forEach(m=>{let g=m[0],f=m[1],y=m[2];this.stat({entry:g,file:f,dir:y},d)})}}onstat({st:h,entry:p,file:d,dir:m,isSymbolicLink:g},f){let y=this.path+"/"+p;h.isDirectory()?m?this.walker(p,{isSymbolicLink:g,exact:d||this.filterEntry(p+"/")},f):f():(d&&this.result.add(y.slice(this.root.length+1)),f())}stat({entry:h,file:p,dir:d},m){let g=this.path+"/"+h;i.lstat(g,(f,y)=>{if(f)this.emit("error",f);else{let v=y.isSymbolicLink();this.follow&&v?i.stat(g,(E,b)=>{E?this.emit("error",E):this.onstat({st:b,entry:h,file:p,dir:d,isSymbolicLink:v},m)}):this.onstat({st:y,entry:h,file:p,dir:d,isSymbolicLink:v},m)}})}walkerOpt(h,p){return{path:this.path+"/"+h,parent:this,ignoreFiles:this.ignoreFiles,follow:this.follow,includeEmpty:this.includeEmpty,...p}}walker(h,p,d){new $g(this.walkerOpt(h,p)).on("done",d).start()}filterEntry(h,p,d){let m=!0;if(this.parent&&this.parent.filterEntry){let g=this.basename+"/"+h,f=d||h;if(m=this.parent.filterEntry(g,p,f),!m&&!this.exact)return!1}return this.ignoreFiles.forEach(g=>{this.ignoreRules[g]&&this.ignoreRules[g].forEach(f=>{if(f.negate!==m){let y=d&&f.globParts.some(v=>v.length<=(v.slice(-1)[0]?1:2));(f.match("/"+h)||f.match(h)||p&&(f.match("/"+h+"/")||f.match(h+"/")||f.negate&&(f.match("/"+h,!0)||f.match(h,!0))||y&&(f.match("/"+d+"/")||f.match(d+"/")||f.negate&&(f.match("/"+d,!0)||f.match(d,!0)))))&&(m=f.negate)}})}),m}},r=class jg extends c{static{S(this,"WalkerSync")}start(){return this.onReaddir(i.readdirSync(this.path)),this}addIgnoreFile(h,p){let d=u.resolve(this.path,h);this.onReadIgnoreFile(h,i.readFileSync(d,"utf8"),p)}stat({entry:h,file:p,dir:d},m){let g=this.path+"/"+h,f=i.lstatSync(g),y=f.isSymbolicLink();this.follow&&y&&(f=i.statSync(g)),this.onstat({st:f,entry:h,file:p,dir:d,isSymbolicLink:y},m)}walker(h,p,d){new jg(this.walkerOpt(h,p)).start(),d()}},s=S((a,h)=>{let p=new Promise((d,m)=>{new c(a).on("done",d).on("error",m).start()});return h?p.then(d=>h(null,d),h):p},"walk"),o=S(a=>new r(a).start().result,"walkSync");t.exports=s,s.sync=o,s.Walker=c,s.WalkerSync=r}),mk=J((e,t)=>{"use strict";var{Walker:i}=gk(),{lstatSync:u,readFileSync:n}=require("fs"),{basename:l,dirname:c,extname:r,join:s,relative:o,resolve:a,sep:h}=require("path"),{log:p}=yt(),d=Symbol("npm-packlist.rules.default"),m=Symbol("npm-packlist.rules.strict"),g=S(_=>/\*/.test(_),"nameIsBadForWindows"),f=[".npmignore",".gitignore","**/.git","**/.svn","**/.hg","**/CVS","**/.git/**","**/.svn/**","**/.hg/**","**/CVS/**","/.lock-wscript","/.wafpickle-*","/build/config.gypi","npm-debug.log","**/.npmrc",".*.swp",".DS_Store","**/.DS_Store/**","._*","**/._*/**","*.orig","/archived-packages/**"],y=["/.git"],v=S(_=>_.split("\\").join("/"),"normalizePath"),E=S((_,O,A=[])=>{for(let j of[".npmignore",".gitignore"])try{let N=n(s(_,j),{encoding:"utf8"});A.push(N);break}catch(N){if(N.code!=="ENOENT")throw N}if(!O)return A;let I=O.split(h,1)[0],P=s(_,I),L=o(P,s(_,O));return E(P,L,A)},"readOutOfTreeIgnoreFiles"),b=class Sl extends i{static{S(this,"PackWalker")}constructor(O,A){let I={...A,includeEmpty:!1,follow:!1,path:a(A?.path||O.path).replace(/\\/g,"/"),ignoreFiles:A?.ignoreFiles||[d,"package.json",".npmignore",".gitignore",m]};super(I),this.isPackage=I.isPackage,this.seen=I.seen||new Set,this.tree=O,this.requiredFiles=I.requiredFiles||[];let P=[];if(I.prefix&&I.workspaces){let L=v(I.path),j=v(I.prefix),N=I.workspaces.map(M=>v(M));if(L!==j&&N.includes(L)){let M=o(I.prefix,c(I.path));P.push(...E(I.prefix,M))}else L===j&&P.push(...N.map(M=>v(o(I.path,M))))}this.injectRules(d,[...f,...P]),this.isPackage||this.injectRules(m,[...y,...this.requiredFiles.map(L=>`!${L}`)])}addIgnoreFile(O,A){return O!=="package.json"||!this.isPackage?super.addIgnoreFile(O,A):this.processPackage(A)}emit(O,A){return O!=="done"||!this.isPackage?super.emit(O,A):(this.gatherBundles().then(()=>{super.emit("done",this.result)}),!0)}filterEntries(){return this.ignoreRules["package.json"]?(this.ignoreRules[".npmignore"]=null,this.ignoreRules[".gitignore"]=null):this.ignoreRules[".npmignore"]?this.ignoreRules[".gitignore"]=null:this.ignoreRules[".gitignore"]&&!this.ignoreRules[".npmignore"]&&p.warn("gitignore-fallback","No .npmignore file found, using .gitignore for file exclusion. Consider creating a .npmignore file to explicitly control published files."),super.filterEntries()}onstat(O,A){return!O.st.isFile()&&!O.st.isDirectory()?A():super.onstat(O,A)}stat(O,A){return g(O.entry)?A():super.stat(O,A)}walkerOpt(O,A){let I=null;if(this.tree.workspaces){let P=[...this.tree.workspaces.values()].map(j=>j.replace(/\\/g,"/")),L=s(this.path,O).replace(/\\/g,"/");P.includes(L)&&(I=[d,"package.json",".npmignore",".gitignore",m])}else I=[d,".npmignore",".gitignore",m];return{...super.walkerOpt(O,A),ignoreFiles:I,requiredFiles:this.requiredFiles.map(P=>o(P,O)===".."?o(O,P).replace(/\\/g,"/"):!1).filter(Boolean)}}walker(O,A,I){new Sl(this.tree,this.walkerOpt(O,A)).on("done",I).start()}sort(O,A){let I=r(O).toLowerCase(),P=r(A).toLowerCase(),L=l(O).toLowerCase(),j=l(A).toLowerCase();return I.localeCompare(P,"en")||L.localeCompare(j,"en")||O.localeCompare(A,"en")}injectRules(O,A,I=()=>{}){this.onReadIgnoreFile(O,`${A.join(`
47
- `)}
48
- `,I)}processPackage(O){let{bin:A,browser:I,files:P,main:L}=this.tree.package,j=[],N=[...y,"!/package.json","!/readme{,.*[^~$]}","!/copying{,.*[^~$]}","!/license{,.*[^~$]}","!/licence{,.*[^~$]}","/.git","/node_modules",".npmrc","/package-lock.json","/yarn.lock","/pnpm-lock.yaml","/bun.lockb"];if(P){for(let M of P){M.startsWith("./")&&(M=M.slice(1)),M.endsWith("/*")&&(M+="*");let B=`!${M}`;try{let F=u(s(this.path,M.replace(/^!+/,"")).replace(/\\/g,"/"));F.isFile()?(N.unshift(B),this.requiredFiles.push(M.startsWith("/")?M.slice(1):M)):F.isDirectory()&&(j.push(B),j.push(`${B}/**`))}catch{j.push(B)}}this.injectRules("package.json",["*",...j])}if(I&&N.push(`!/${I}`),L&&N.push(`!/${L}`),A)for(let M in A)N.push(`!/${A[M]}`);this.injectRules(m,N,O)}async gatherBundles(){if(this.seen.has(this.tree))return;this.seen.add(this.tree);let O;if(this.tree.isProjectRoot){let{bundleDependencies:A}=this.tree.package;O=A||[]}else{let{dependencies:A,optionalDependencies:I}=this.tree.package;O=Object.keys(A||{}).concat(Object.keys(I||{}))}for(let A of O){let I=this.tree.edgesOut.get(A);if(!I||I.peer||I.dev)continue;let P=this.tree.edgesOut.get(A).to;if(!P)continue;let L=P.path,j=P.target,N={path:L,isPackage:!0,ignoreFiles:[],seen:this.seen};P.isLink&&N.ignoreFiles.push(d),N.ignoreFiles.push("package.json"),P.isLink&&(N.ignoreFiles.push(".npmignore"),N.ignoreFiles.push(".gitignore")),N.ignoreFiles.push(m);let M=new Sl(j,N),B=await new Promise((D,H)=>{M.on("error",H),M.on("done",D),M.start()}),F=o(this.root,M.path);for(let D of B)this.result.add(s(F,D).replace(/\\/g,"/"))}}},w=S((_,O,A)=>{typeof O=="function"&&(A=O,O={});let I=new Promise((P,L)=>{new b(_,{...O,isPackage:!0}).on("done",P).on("error",L).start()});return A?I.then(P=>A(null,P),A):I},"walk");t.exports=w,w.Walker=b}),yk=J((e,t)=>{var{resolve:i,dirname:u,delimiter:n}=require("path"),l=i(__dirname,"../lib/node-gyp-bin"),c=S((r,s,o)=>{let a=Object.keys(o).filter(g=>/^path$/i.test(g)&&o[g]).map(g=>o[g].split(n)).reduce((g,f)=>g.concat(f.filter(y=>!g.includes(y))),[]).join(n),h=[];s&&h.push(...s);let p=r,d;do h.push(i(p,"node_modules",".bin")),d=p,p=u(p);while(p!==d);h.push(l,a);let m=h.join(n);for(let g of Object.keys(o))/^path$/i.test(g)&&(o[g]=m);return o},"setPATH");t.exports=c}),vk=J((e,t)=>{var i=yk(),{resolve:u}=require("path"),n,l=S(c=>{let{args:r,binPaths:s,cmd:o,env:a,event:h,nodeGyp:p,path:d,scriptShell:m=!0,stdio:g,stdioString:f}=c;p?n=p:a.npm_config_node_gyp?n=a.npm_config_node_gyp:n=require.resolve("node-gyp/bin/node-gyp.js");let y={env:i(d,s,{...process.env,...a,npm_package_json:u(d,"package.json"),npm_lifecycle_event:h,npm_lifecycle_script:o,npm_config_node_gyp:n}),stdioString:f,stdio:g,cwd:d,shell:m};return[o,r,y]},"makeSpawnArgs");t.exports=l}),Sk=J((e,t)=>{var i=S((u,n,l={})=>{for(let[c,r]of Object.entries(u))r!==void 0&&(r===null||r===!1?l[`${n}${c}`]="":Array.isArray(r)?r.forEach((s,o)=>{i({[`${c}_${o}`]:s},`${n}`,l)}):typeof r=="object"?i(r,`${n}${c}_`,l):l[`${n}${c}`]=String(r));return l},"packageEnvs");t.exports=u=>i({name:u.name,version:u.version,config:u.config,engines:u.engines,bin:u.bin},"npm_package_")}),Ek=J((e,t)=>{var i=require("util"),u=require("fs"),{stat:n}=u.promises||{stat:i.promisify(u.stat)};async function l(c){return await n(`${c}/binding.gyp`).then(r=>r.isFile()).catch(()=>!1)}S(l,"isNodeGypPackage"),t.exports={isNodeGypPackage:l,defaultGypInstallScript:"node-gyp rebuild"}}),bk=J((e,t)=>{var i=new Set,u=!1,n=["SIGINT","SIGTERM"],l=S(o=>{for(let a of i)a.kill(o)},"handleSignal"),c=S(()=>{for(let o of n)process.on(o,l);u=!0},"setupListeners"),r=S(()=>{if(i.size===0){for(let o of n)process.removeListener(o,l);u=!1}},"cleanupListeners"),s=S(o=>{i.add(o),u||c(),o.once("exit",()=>{i.delete(o),r()})},"add");t.exports={add:s,handleSignal:l,forwardedSignals:n}}),Mg=J((e,t)=>{var{stat:i}=require("internal/fs/promises"),{resolve:u}=require("path");t.exports=async n=>{try{return(await i(u(n,"server.js"))).isFile()}catch{return!1}}}),wk=J((e,t)=>{var i=vk(),u=Fl(),n=Sk(),{isNodeGypPackage:l,defaultGypInstallScript:c}=Ek(),r=bk(),s=Mg(),o=S(async a=>{let{args:h=[],binPaths:p=!1,env:d={},event:m,nodeGyp:g,path:f,pkg:y,scriptShell:v,signalTimeout:E=500,stdio:b="pipe",stdioString:w}=a,{scripts:_={},gypfile:O}=y,A=null;if(a.cmd?A=a.cmd:y.scripts&&y.scripts[m]?A=y.scripts[m]:m==="install"&&!_.install&&!_.preinstall&&O!==!1&&await l(f)?A=c:m==="start"&&await s(f)&&(A="node server.js"),!A)return{code:0,signal:null};let I=S(()=>{},"inputEnd");if(b==="inherit"){let M;y._id?M=`
49
- > ${y._id} ${m}
50
- `:M=`
51
- > ${m}
52
- `,M+=`> ${A.trim().replace(/\n/g,`
53
- > `)}`,h.length&&(M+=` ${h.join(" ")}`),M+=`
54
- `;let{output:B,input:F}=yt();B.standard(M),I=F.start()}let[P,L,j]=i({args:h,binPaths:p,cmd:A,env:{...d,...n(y)},event:m,nodeGyp:g,path:f,scriptShell:v,stdio:b,stdioString:w}),N=u(P,L,j,{event:m,script:A,pkgid:y._id,path:f});return b==="inherit"&&r.add(N.process),N.stdin&&N.stdin.end(),N.catch(M=>{let{signal:B}=M;if(b==="inherit"&&B)return process.kill(process.pid,B),new Promise((F,D)=>setTimeout(()=>D(M),E));throw M}).finally(I)},"runScriptPkg");t.exports=o}),_k=J((e,t)=>{var i=S(u=>{if(typeof u!="object"||!u)throw new TypeError("invalid options object provided to runScript");let{event:n,path:l,scriptShell:c,env:r={},stdio:s="pipe",args:o=[],cmd:a}=u;if(!n||typeof n!="string")throw new TypeError("valid event not provided to runScript");if(!l||typeof l!="string")throw new TypeError("valid path not provided to runScript");if(c!==void 0&&typeof c!="string")throw new TypeError("invalid scriptShell option provided to runScript");if(typeof r!="object"||!r)throw new TypeError("invalid env option provided to runScript");if(typeof s!="string"&&!Array.isArray(s))throw new TypeError("invalid stdio option provided to runScript");if(!Array.isArray(o)||o.some(h=>typeof h!="string"))throw new TypeError("invalid args option provided to runScript");if(a!==void 0&&typeof a!="string")throw new TypeError("invalid cmd option provided to runScript")},"validateOptions");t.exports=i}),Ok=J((e,t)=>{var i=Jl(),u=wk(),n=_k(),l=Mg(),c=S(async r=>{if(n(r),r.pkg)return u(r);let{content:s}=await i.normalize(r.path);return u({...r,pkg:s})},"runScript");t.exports=Object.assign(c,{isServerPackage:l})}),Cs=J((e,t)=>{var{resolve:i}=require("path"),{stat:u,chmod:n}=require("internal/fs/promises"),l=rn(),c=bs(),r=kr(),s=Tr(),o=class extends r{static{S(this,"FileFetcher")}constructor(a,h){super(a,h),this.resolved=this.spec.fetchSpec}get types(){return["file"]}manifest(){return this.package?Promise.resolve(this.package):l.tmp.withTmp(this.cache,this.opts,a=>this.extract(a).then(()=>this[s.readPackageJson](a)).then(h=>this.package={...h,_integrity:this.integrity&&String(this.integrity),_resolved:this.resolved,_from:this.from}))}#e(a,h){return a.bin?Promise.all(Object.keys(a.bin).map(async p=>{let d=i(h,a.bin[p]);try{let m=await u(d),g=m.mode|73;if(g===m.mode)return;await n(d,g)}catch{}})):Promise.resolve()}extract(a){return super.extract(a).then(h=>this.package?h:this[s.readPackageJson](a).then(p=>this.#e(p,a)).then(()=>h))}[s.tarballFromResolved](){return new c.ReadStream(this.resolved)}packument(){return this.manifest().then(a=>({name:a.name,"dist-tags":{[this.defaultTag]:a.version},versions:{[a.version]:{...a,dist:{tarball:`file:${this.resolved}`,integrity:this.integrity&&String(this.integrity)}}}}))}};t.exports=o}),Rk=J((e,t)=>{var i=Lg(),u=S(n=>({cwd:n._resolved,prefix:"package/",portable:!0,gzip:{level:9},filter:S((l,c)=>(i(n,l)&&(c.mode|=73),!0),"filter"),mtime:new Date("1985-10-26T08:15:00.000Z")}),"tarCreateOptions");t.exports=u}),oc=J((e,t)=>{var{resolve:i}=require("path"),u=mk(),n=Ok(),l=kg(),{Minipass:c}=ke(),r=kr(),s=Cs(),o=Tr(),a=Rk(),h=class extends r{static{S(this,"DirFetcher")}constructor(p,d){super(p,d),this.resolved=this.spec.fetchSpec,this.tree=d.tree||null,this.Arborist=d.Arborist||null}static tarCreateOptions(p){return a(p)}get types(){return["directory"]}#e(){return this.manifest().then(p=>{if(!p.scripts||!p.scripts.prepare||this.opts.ignoreScripts)return;let d=this.opts.foregroundScripts?"inherit":"pipe";return n({scriptShell:this.opts.scriptShell||void 0,pkg:p,event:"prepare",path:this.resolved,stdio:d,env:{npm_package_resolved:this.resolved,npm_package_integrity:this.integrity,npm_package_json:i(this.resolved,"package.json")}})})}[o.tarballFromResolved](){if(!this.tree&&!this.Arborist)throw new Error("DirFetcher requires either a tree or an Arborist constructor to pack");let p=new c;p.resolved=this.resolved,p.integrity=this.integrity;let{prefix:d,workspaces:m}=this.opts;return this.#e().then(async()=>{if(!this.tree){let g=new this.Arborist({path:this.resolved});this.tree=await g.loadActual()}return u(this.tree,{path:this.resolved,prefix:d,workspaces:m})}).then(g=>l.c(a(this.package),g).on("error",f=>p.emit("error",f)).pipe(p)).catch(g=>p.emit("error",g)),p}manifest(){return this.package?Promise.resolve(this.package):this[o.readPackageJson](this.resolved).then(p=>this.package={...p,_integrity:this.integrity&&String(this.integrity),_resolved:this.resolved,_from:this.from})}packument(){return s.prototype.packument.apply(this)}};t.exports=h}),Bg=J((e,t)=>{"use strict";var{URL:i}=require("url");function u(o){try{let h=new i(o).pathname.slice(1);if(!h.match(/^-/)){h=h.split("/");var a=h.indexOf("_rewrite");return a===-1?a=h.length-1:a++,decodeURIComponent(h[a])}}catch{}}S(u,"packageName");var n=class extends Error{static{S(this,"HttpErrorBase")}constructor(o,a,h,p){super(),this.name=this.constructor.name,this.headers=typeof a.headers?.raw=="function"?a.headers.raw():a.headers,this.statusCode=a.status,this.code=`E${a.status}`,this.method=o,this.uri=a.url,this.body=h,this.pkgid=p?p.toString():u(a.url),Error.captureStackTrace(this,this.constructor)}},l=class extends n{static{S(this,"HttpErrorGeneral")}constructor(o,a,h,p){super(o,a,h,p),this.message=`${a.status} ${a.statusText} - ${this.method.toUpperCase()} ${this.spec||this.uri}${h&&h.error?" - "+h.error:""}`}},c=class extends n{static{S(this,"HttpErrorAuthOTP")}constructor(o,a,h,p){super(o,a,h,p),this.message="OTP required for authentication",this.code="EOTP"}},r=class extends n{static{S(this,"HttpErrorAuthIPAddress")}constructor(o,a,h,p){super(o,a,h,p),this.message="Login is not allowed from your IP address",this.code="EAUTHIP"}},s=class extends n{static{S(this,"HttpErrorAuthUnknown")}constructor(o,a,h,p){super(o,a,h,p),this.message="Unable to authenticate, need: "+a.headers.get("www-authenticate")}};t.exports={HttpErrorBase:n,HttpErrorGeneral:l,HttpErrorAuthOTP:c,HttpErrorAuthIPAddress:r,HttpErrorAuthUnknown:s}}),Ak=J((e,t)=>{var i=Xl(),u=class extends Error{static{S(this,"SizeError")}constructor(l,c){super(`Bad data size: expected ${c} bytes, but got ${l}`),this.expect=c,this.found=l,this.code="EBADSIZE",Error.captureStackTrace(this,this.constructor)}get name(){return"SizeError"}},n=class extends i{static{S(this,"MinipassSized")}constructor(l={}){if(super(l),l.objectMode)throw new TypeError(`${this.constructor.name} streams only work with string and buffer data`);if(this.found=0,this.expect=l.size,typeof this.expect!="number"||this.expect>Number.MAX_SAFE_INTEGER||isNaN(this.expect)||this.expect<0||!isFinite(this.expect)||this.expect!==Math.floor(this.expect))throw new Error("invalid expected size: "+this.expect)}write(l,c,r){let s=Buffer.isBuffer(l)?l:typeof l=="string"?Buffer.from(l,typeof c=="string"?c:"utf8"):l;return Buffer.isBuffer(s)?(this.found+=s.length,this.found>this.expect&&this.emit("error",new u(this.found,this.expect)),super.write(l,c,r)):(this.emit("error",new TypeError(`${this.constructor.name} streams only work with string and buffer data`)),!1)}emit(l,...c){return l==="end"&&this.found!==this.expect&&this.emit("error",new u(this.found,this.expect)),super.emit(l,...c)}};n.SizeError=u,t.exports=n}),Ck=J((e,t)=>{"use strict";var{Minipass:i}=ke(),u=Symbol("type"),n=Symbol("buffer"),l=class El{static{S(this,"Blob")}constructor(r,s){this[u]="";let o=[],a=0;if(r){let p=r,d=Number(p.length);for(let m=0;m<d;m++){let g=p[m],f=g instanceof Buffer?g:ArrayBuffer.isView(g)?Buffer.from(g.buffer,g.byteOffset,g.byteLength):g instanceof ArrayBuffer?Buffer.from(g):g instanceof El?g[n]:typeof g=="string"?Buffer.from(g):Buffer.from(String(g));a+=f.length,o.push(f)}}this[n]=Buffer.concat(o,a);let h=s&&s.type!==void 0&&String(s.type).toLowerCase();h&&!/[^\u0020-\u007E]/.test(h)&&(this[u]=h)}get size(){return this[n].length}get type(){return this[u]}text(){return Promise.resolve(this[n].toString())}arrayBuffer(){let r=this[n],s=r.byteOffset,o=r.byteLength,a=r.buffer.slice(s,s+o);return Promise.resolve(a)}stream(){return new i().end(this[n])}slice(r,s,o){let a=this.size,h=r===void 0?0:r<0?Math.max(a+r,0):Math.min(r,a),p=s===void 0?a:s<0?Math.max(a+s,0):Math.min(s,a),d=Math.max(p-h,0),m=this[n].slice(h,h+d),g=new El([],{type:o});return g[n]=m,g}get[Symbol.toStringTag](){return"Blob"}static get BUFFER(){return n}};Object.defineProperties(l.prototype,{size:{enumerable:!0},type:{enumerable:!0}}),t.exports=l}),Ug=J((e,t)=>{"use strict";var i=class extends Error{static{S(this,"FetchError")}constructor(u,n,l){super(u),this.code="FETCH_ERROR",l&&Object.assign(this,l),this.errno=this.code,this.type=this.code==="EBADSIZE"&&this.found>this.expect?"max-size":n,this.message=u,Error.captureStackTrace(this,this.constructor)}get name(){return"FetchError"}set name(u){}get[Symbol.toStringTag](){return"FetchError"}};t.exports=i}),Ik=J((e,t)=>{t.exports={}}),ac=J((e,t)=>{"use strict";var{Minipass:i}=ke(),u=Ak(),n=Ck(),{BUFFER:l}=n,c=Ug(),r;try{r=Ik().convert}catch{}var s=Symbol("Body internals"),o=Symbol("consumeBody"),a=class{static{S(this,"Body")}constructor(m,g={}){let{size:f=0,timeout:y=0}=g,v=m==null?null:h(m)?Buffer.from(m.toString()):p(m)||Buffer.isBuffer(m)?m:Object.prototype.toString.call(m)==="[object ArrayBuffer]"?Buffer.from(m):ArrayBuffer.isView(m)?Buffer.from(m.buffer,m.byteOffset,m.byteLength):i.isStream(m)?m:Buffer.from(String(m));this[s]={body:v,disturbed:!1,error:null},this.size=f,this.timeout=y,i.isStream(v)&&v.on("error",E=>{let b=E.name==="AbortError"?E:new c(`Invalid response while trying to fetch ${this.url}: ${E.message}`,"system",E);this[s].error=b})}get body(){return this[s].body}get bodyUsed(){return this[s].disturbed}arrayBuffer(){return this[o]().then(m=>m.buffer.slice(m.byteOffset,m.byteOffset+m.byteLength))}blob(){let m=this.headers&&this.headers.get("content-type")||"";return this[o]().then(g=>Object.assign(new n([],{type:m.toLowerCase()}),{[l]:g}))}async json(){let m=await this[o]();try{return JSON.parse(m.toString())}catch(g){throw new c(`invalid json response body at ${this.url} reason: ${g.message}`,"invalid-json")}}text(){return this[o]().then(m=>m.toString())}buffer(){return this[o]()}textConverted(){return this[o]().then(m=>d(m,this.headers))}[o](){if(this[s].disturbed)return Promise.reject(new TypeError(`body used already for: ${this.url}`));if(this[s].disturbed=!0,this[s].error)return Promise.reject(this[s].error);if(this.body===null)return Promise.resolve(Buffer.alloc(0));if(Buffer.isBuffer(this.body))return Promise.resolve(this.body);let m=p(this.body)?this.body.stream():this.body;if(!i.isStream(m))return Promise.resolve(Buffer.alloc(0));let g=this.size&&m instanceof u||!this.size&&m instanceof i&&!(m instanceof u)?m:this.size?new u({size:this.size}):new i,f=this.timeout&&g.writable?setTimeout(()=>{g.emit("error",new c(`Response timeout while trying to fetch ${this.url} (over ${this.timeout}ms)`,"body-timeout"))},this.timeout):null;return f&&f.unref&&f.unref(),new Promise(y=>{g!==m&&(m.on("error",v=>g.emit("error",v)),m.pipe(g)),y()}).then(()=>g.concat()).then(y=>(clearTimeout(f),y)).catch(y=>{throw clearTimeout(f),y.name==="AbortError"||y.name==="FetchError"?y:y.name==="RangeError"?new c(`Could not create Buffer from response body for ${this.url}: ${y.message}`,"system",y):new c(`Invalid response body while trying to fetch ${this.url}: ${y.message}`,"system",y)})}static clone(m){if(m.bodyUsed)throw new Error("cannot clone body after it is used");let g=m.body;if(i.isStream(g)&&typeof g.getBoundary!="function"){let f=new i,y=new i,v=new i;return f.on("error",E=>{y.emit("error",E),v.emit("error",E)}),g.on("error",E=>f.emit("error",E)),f.pipe(y),f.pipe(v),g.pipe(f),m[s].body=y,v}else return m.body}static extractContentType(m){return m==null?null:typeof m=="string"?"text/plain;charset=UTF-8":h(m)?"application/x-www-form-urlencoded;charset=UTF-8":p(m)?m.type||null:Buffer.isBuffer(m)||Object.prototype.toString.call(m)==="[object ArrayBuffer]"||ArrayBuffer.isView(m)?null:typeof m.getBoundary=="function"?`multipart/form-data;boundary=${m.getBoundary()}`:i.isStream(m)?null:"text/plain;charset=UTF-8"}static getTotalBytes(m){let{body:g}=m;return g==null?0:p(g)?g.size:Buffer.isBuffer(g)?g.length:g&&typeof g.getLengthSync=="function"&&(g._lengthRetrievers&&g._lengthRetrievers.length===0||g.hasKnownLength&&g.hasKnownLength())?g.getLengthSync():null}static writeToStream(m,g){let{body:f}=g;return f==null?m.end():Buffer.isBuffer(f)||typeof f=="string"?m.end(f):(p(f)?f.stream():f).on("error",y=>m.emit("error",y)).pipe(m),m}};Object.defineProperties(a.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0}});var h=S(m=>typeof m!="object"||typeof m.append!="function"||typeof m.delete!="function"||typeof m.get!="function"||typeof m.getAll!="function"||typeof m.has!="function"||typeof m.set!="function"?!1:m.constructor.name==="URLSearchParams"||Object.prototype.toString.call(m)==="[object URLSearchParams]"||typeof m.sort=="function","isURLSearchParams"),p=S(m=>typeof m=="object"&&typeof m.arrayBuffer=="function"&&typeof m.type=="string"&&typeof m.stream=="function"&&typeof m.constructor=="function"&&typeof m.constructor.name=="string"&&/^(Blob|File)$/.test(m.constructor.name)&&/^(Blob|File)$/.test(m[Symbol.toStringTag]),"isBlob"),d=S((m,g)=>{if(typeof r!="function")throw new Error("The package `encoding` must be installed to use the textConverted() function");let f=g&&g.get("content-type"),y="utf-8",v;f&&(v=/charset=([^;]*)/i.exec(f));let E=m.slice(0,1024).toString();return!v&&E&&(v=/<meta.+?charset=(['"])(.+?)\1/i.exec(E)),!v&&E&&(v=/<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(E),v||(v=/<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(E),v&&v.pop()),v&&(v=/charset=(.*)/i.exec(v.pop()))),!v&&E&&(v=/<\?xml.+?encoding=(['"])(.+?)\1/i.exec(E)),v&&(y=v.pop(),(y==="gb2312"||y==="gbk")&&(y="gb18030")),r(m,"UTF-8",y).toString()},"convertBody");t.exports=a}),lc=J((e,t)=>{"use strict";var i=/[^^_`a-zA-Z\-0-9!#$%&'*+.|~]/,u=/[^\t\x20-\x7e\x80-\xff]/,n=S(p=>{if(p=`${p}`,i.test(p)||p==="")throw new TypeError(`${p} is not a legal HTTP header name`)},"validateName"),l=S(p=>{if(p=`${p}`,u.test(p))throw new TypeError(`${p} is not a legal HTTP header value`)},"validateValue"),c=S((p,d)=>{d=d.toLowerCase();for(let m in p)if(m.toLowerCase()===d)return m},"find"),r=Symbol("map"),s=class bl{static{S(this,"Headers")}constructor(d=void 0){if(this[r]=Object.create(null),d instanceof bl){let m=d.raw(),g=Object.keys(m);for(let f of g)for(let y of m[f])this.append(f,y);return}if(d!=null)if(typeof d=="object"){let m=d[Symbol.iterator];if(m!=null){if(typeof m!="function")throw new TypeError("Header pairs must be iterable");let g=[];for(let f of d){if(typeof f!="object"||typeof f[Symbol.iterator]!="function")throw new TypeError("Each header pair must be iterable");let y=Array.from(f);if(y.length!==2)throw new TypeError("Each header pair must be a name/value tuple");g.push(y)}for(let f of g)this.append(f[0],f[1])}else for(let g of Object.keys(d))this.append(g,d[g])}else throw new TypeError("Provided initializer must be an object")}get(d){d=`${d}`,n(d);let m=c(this[r],d);return m===void 0?null:this[r][m].join(", ")}forEach(d,m=void 0){let g=o(this);for(let f=0;f<g.length;f++){let[y,v]=g[f];d.call(m,v,y,this),g=o(this)}}set(d,m){d=`${d}`,m=`${m}`,n(d),l(m);let g=c(this[r],d);this[r][g!==void 0?g:d]=[m]}append(d,m){d=`${d}`,m=`${m}`,n(d),l(m);let g=c(this[r],d);g!==void 0?this[r][g].push(m):this[r][d]=[m]}has(d){return d=`${d}`,n(d),c(this[r],d)!==void 0}delete(d){d=`${d}`,n(d);let m=c(this[r],d);m!==void 0&&delete this[r][m]}raw(){return this[r]}keys(){return new h(this,"key")}values(){return new h(this,"value")}[Symbol.iterator](){return new h(this,"key+value")}entries(){return new h(this,"key+value")}get[Symbol.toStringTag](){return"Headers"}static exportNodeCompatibleHeaders(d){let m=Object.assign(Object.create(null),d[r]),g=c(d[r],"Host");return g!==void 0&&(m[g]=m[g][0]),m}static createHeadersLenient(d){let m=new bl;for(let g of Object.keys(d))if(!i.test(g))if(Array.isArray(d[g]))for(let f of d[g])u.test(f)||(m[r][g]===void 0?m[r][g]=[f]:m[r][g].push(f));else u.test(d[g])||(m[r][g]=[d[g]]);return m}};Object.defineProperties(s.prototype,{get:{enumerable:!0},forEach:{enumerable:!0},set:{enumerable:!0},append:{enumerable:!0},has:{enumerable:!0},delete:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0}});var o=S((p,d="key+value")=>Object.keys(p[r]).sort().map(d==="key"?m=>m.toLowerCase():d==="value"?m=>p[r][m].join(", "):m=>[m.toLowerCase(),p[r][m].join(", ")]),"getHeaders"),a=Symbol("internal"),h=class Fg{static{S(this,"HeadersIterator")}constructor(d,m){this[a]={target:d,kind:m,index:0}}get[Symbol.toStringTag](){return"HeadersIterator"}next(){if(!this||Object.getPrototypeOf(this)!==Fg.prototype)throw new TypeError("Value of `this` is not a HeadersIterator");let{target:d,kind:m,index:g}=this[a],f=o(d,m),y=f.length;return g>=y?{value:void 0,done:!0}:(this[a].index++,{value:f[g],done:!1})}};Object.setPrototypeOf(h.prototype,Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))),t.exports=s}),Tk=J((e,t)=>{"use strict";var i=require("http"),{STATUS_CODES:u}=i,n=lc(),l=ac(),{clone:c,extractContentType:r}=l,s=Symbol("Response internals"),o=class Hg extends l{static{S(this,"Response")}constructor(h=null,p={}){super(h,p);let d=p.status||200,m=new n(p.headers);if(h!=null&&!m.has("Content-Type")){let g=r(h);g&&m.append("Content-Type",g)}this[s]={url:p.url,status:d,statusText:p.statusText||u[d],headers:m,counter:p.counter,trailer:Promise.resolve(p.trailer||new n)}}get trailer(){return this[s].trailer}get url(){return this[s].url||""}get status(){return this[s].status}get ok(){return this[s].status>=200&&this[s].status<300}get redirected(){return this[s].counter>0}get statusText(){return this[s].statusText}get headers(){return this[s].headers}clone(){return new Hg(c(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,trailer:this.trailer})}get[Symbol.toStringTag](){return"Response"}};t.exports=o,Object.defineProperties(o.prototype,{url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}})}),Pk=J((e,t)=>{t.exports={name:"minipass-fetch",version:"4.0.1",description:"An implementation of window.fetch in Node.js using Minipass streams",license:"MIT",main:"lib/index.js",scripts:{"test:tls-fixtures":"./test/fixtures/tls/setup.sh",test:"tap",snap:"tap",lint:"npm run eslint",postlint:"template-oss-check",lintfix:"npm run eslint -- --fix",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},tap:{"coverage-map":"map.js","check-coverage":!0,"nyc-arg":["--exclude","tap-snapshots/**"]},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.23.3","@ungap/url-search-params":"^0.2.2","abort-controller":"^3.0.0","abortcontroller-polyfill":"~1.7.3",encoding:"^0.1.13","form-data":"^4.0.0",nock:"^13.2.4",parted:"^0.1.1","string-to-arraybuffer":"^1.0.2",tap:"^16.0.0"},dependencies:{minipass:"^7.0.3","minipass-sized":"^1.0.3",minizlib:"^3.0.1"},optionalDependencies:{encoding:"^0.1.13"},repository:{type:"git",url:"git+https://github.com/npm/minipass-fetch.git"},keywords:["fetch","minipass","node-fetch","window.fetch"],files:["bin/","lib/"],engines:{node:"^18.17.0 || >=20.5.0"},author:"GitHub Inc.",templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.23.3",publish:"true"}}}),xk=J((e,t)=>{"use strict";var{URL:i}=require("url"),{Minipass:u}=ke(),n=lc(),{exportNodeCompatibleHeaders:l}=n,c=ac(),{clone:r,extractContentType:s,getTotalBytes:o}=c,a=Pk().version,h=`minipass-fetch/${a} (+https://github.com/isaacs/minipass-fetch)`,p=Symbol("Request internals"),d=S(f=>typeof f=="object"&&typeof f[p]=="object","isRequest"),m=S(f=>{let y=f&&typeof f=="object"&&Object.getPrototypeOf(f);return!!(y&&y.constructor.name==="AbortSignal")},"isAbortSignal"),g=class Gg extends c{static{S(this,"Request")}constructor(y,v={}){let E=d(y)?new i(y.url):y&&y.href?new i(y.href):new i(`${y}`);d(y)?v={...y[p],...v}:(!y||typeof y=="string")&&(y={});let b=(v.method||y.method||"GET").toUpperCase(),w=b==="GET"||b==="HEAD";if((v.body!==null&&v.body!==void 0||d(y)&&y.body!==null)&&w)throw new TypeError("Request with GET/HEAD method cannot have body");let _=v.body!==null&&v.body!==void 0?v.body:d(y)&&y.body!==null?r(y):null;super(_,{timeout:v.timeout||y.timeout||0,size:v.size||y.size||0});let O=new n(v.headers||y.headers||{});if(_!=null&&!O.has("Content-Type")){let Y=s(_);Y&&O.append("Content-Type",Y)}let A="signal"in v?v.signal:null;if(A!=null&&!m(A))throw new TypeError("Expected signal must be an instanceof AbortSignal");let{ca:I,cert:P,ciphers:L,clientCertEngine:j,crl:N,dhparam:M,ecdhCurve:B,family:F,honorCipherOrder:D,key:H,passphrase:G,pfx:x,rejectUnauthorized:k=process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0",secureOptions:T,secureProtocol:C,servername:q,sessionIdContext:X}=v;this[p]={method:b,redirect:v.redirect||y.redirect||"follow",headers:O,parsedURL:E,signal:A,ca:I,cert:P,ciphers:L,clientCertEngine:j,crl:N,dhparam:M,ecdhCurve:B,family:F,honorCipherOrder:D,key:H,passphrase:G,pfx:x,rejectUnauthorized:k,secureOptions:T,secureProtocol:C,servername:q,sessionIdContext:X},this.follow=v.follow!==void 0?v.follow:y.follow!==void 0?y.follow:20,this.compress=v.compress!==void 0?v.compress:y.compress!==void 0?y.compress:!0,this.counter=v.counter||y.counter||0,this.agent=v.agent||y.agent}get method(){return this[p].method}get url(){return this[p].parsedURL.toString()}get headers(){return this[p].headers}get redirect(){return this[p].redirect}get signal(){return this[p].signal}clone(){return new Gg(this)}get[Symbol.toStringTag](){return"Request"}static getNodeRequestOptions(y){let v=y[p].parsedURL,E=new n(y[p].headers);if(E.has("Accept")||E.set("Accept","*/*"),!/^https?:$/.test(v.protocol))throw new TypeError("Only HTTP(S) protocols are supported");if(y.signal&&u.isStream(y.body)&&typeof y.body.destroy!="function")throw new Error("Cancellation of streamed requests with AbortSignal is not supported");let b=(y.body===null||y.body===void 0)&&/^(POST|PUT)$/i.test(y.method)?"0":y.body!==null&&y.body!==void 0?o(y):null;b&&E.set("Content-Length",b+""),E.has("User-Agent")||E.set("User-Agent",h),y.compress&&!E.has("Accept-Encoding")&&E.set("Accept-Encoding","gzip,deflate");let w=typeof y.agent=="function"?y.agent(v):y.agent;!E.has("Connection")&&!w&&E.set("Connection","close");let{ca:_,cert:O,ciphers:A,clientCertEngine:I,crl:P,dhparam:L,ecdhCurve:j,family:N,honorCipherOrder:M,key:B,passphrase:F,pfx:D,rejectUnauthorized:H,secureOptions:G,secureProtocol:x,servername:k,sessionIdContext:T}=y[p];return{auth:v.username||v.password?`${v.username}:${v.password}`:"",host:v.host,hostname:v.hostname,path:`${v.pathname}${v.search}`,port:v.port,protocol:v.protocol,method:y.method,headers:l(E),agent:w,ca:_,cert:O,ciphers:A,clientCertEngine:I,crl:P,dhparam:L,ecdhCurve:j,family:N,honorCipherOrder:M,key:B,passphrase:F,pfx:D,rejectUnauthorized:H,secureOptions:G,secureProtocol:x,servername:k,sessionIdContext:T,timeout:y.timeout}}};t.exports=g,Object.defineProperties(g.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0}})}),Nk=J((e,t)=>{"use strict";var i=class extends Error{static{S(this,"AbortError")}constructor(u){super(u),this.code="FETCH_ABORTED",this.type="aborted",Error.captureStackTrace(this,this.constructor)}get name(){return"AbortError"}set name(u){}};t.exports=i}),Is=J((e,t)=>{"use strict";var{URL:i}=require("url"),u=require("http"),n=require("https"),l=sn(),{Minipass:c}=ke(),r=ac(),{writeToStream:s,getTotalBytes:o}=r,a=Tk(),h=lc(),{createHeadersLenient:p}=h,d=xk(),{getNodeRequestOptions:m}=d,g=Ug(),f=Nk(),y=S(async(v,E)=>{if(/^data:/.test(v)){let b=new d(v,E);return Promise.resolve().then(()=>new Promise((w,_)=>{let O,A;try{let{pathname:L,search:j}=new i(v),N=L.split(",");if(N.length<2)throw new Error("invalid data: URI");let M=N.shift(),B=/;base64$/.test(M);O=B?M.slice(0,-7):M;let F=decodeURIComponent(N.join(",")+j);A=B?Buffer.from(F,"base64"):Buffer.from(F)}catch(L){return _(new g(`[${b.method}] ${b.url} invalid URL, ${L.message}`,"system",L))}let{signal:I}=b;if(I&&I.aborted)return _(new f("The user aborted a request."));let P={"Content-Length":A.length};return O&&(P["Content-Type"]=O),w(new a(A,{headers:P}))}))}return new Promise((b,w)=>{let _=new d(v,E),O;try{O=m(_)}catch(F){return w(F)}let A=(O.protocol==="https:"?n:u).request,{signal:I}=_,P=null,L=S(()=>{let F=new f("The user aborted a request.");w(F),c.isStream(_.body)&&typeof _.body.destroy=="function"&&_.body.destroy(F),P&&P.body&&P.body.emit("error",F)},"abort");if(I&&I.aborted)return L();let j=S(()=>{L(),N()},"abortAndFinalize"),N=S(()=>{M.abort(),I&&I.removeEventListener("abort",j),clearTimeout(B)},"finalize"),M=A(O);I&&I.addEventListener("abort",j);let B=null;_.timeout&&M.once("socket",()=>{B=setTimeout(()=>{w(new g(`network timeout at: ${_.url}`,"request-timeout")),N()},_.timeout)}),M.on("error",F=>{M.res&&M.res.emit("error",F),w(new g(`request to ${_.url} failed, reason: ${F.message}`,"system",F)),N()}),M.on("response",F=>{clearTimeout(B);let D=p(F.headers);if(y.isRedirect(F.statusCode)){let C=D.get("Location"),q=null;try{q=C===null?null:new i(C,_.url).toString()}catch{if(_.redirect!=="manual"){w(new g(`uri requested responds with an invalid redirect URL: ${C}`,"invalid-redirect")),N();return}}if(_.redirect==="error"){w(new g(`uri requested responds with a redirect, redirect mode is set to error: ${_.url}`,"no-redirect")),N();return}else if(_.redirect==="manual"){if(q!==null)try{D.set("Location",q)}catch(X){w(X)}}else if(_.redirect==="follow"&&q!==null){if(_.counter>=_.follow){w(new g(`maximum redirect reached at: ${_.url}`,"max-redirect")),N();return}if(F.statusCode!==303&&_.body&&o(_)===null){w(new g("Cannot follow redirect with body being a readable stream","unsupported-redirect")),N();return}_.headers.set("host",new i(q).host);let X={headers:new h(_.headers),follow:_.follow,counter:_.counter+1,agent:_.agent,compress:_.compress,method:_.method,body:_.body,signal:_.signal,timeout:_.timeout},Y=new i(_.url),$=new i(q);Y.hostname!==$.hostname&&(X.headers.delete("authorization"),X.headers.delete("cookie")),(F.statusCode===303||(F.statusCode===301||F.statusCode===302)&&_.method==="POST")&&(X.method="GET",X.body=void 0,X.headers.delete("content-length")),b(y(new d(q,X))),N();return}}F.once("end",()=>I&&I.removeEventListener("abort",j));let H=new c;H.on("error",N),F.on("error",C=>H.emit("error",C)),F.on("data",C=>H.write(C)),F.on("end",()=>H.end());let G={url:_.url,status:F.statusCode,statusText:F.statusMessage,headers:D,size:_.size,timeout:_.timeout,counter:_.counter,trailer:new Promise(C=>F.on("end",()=>C(p(F.trailers))))},x=D.get("Content-Encoding");if(!_.compress||_.method==="HEAD"||x===null||F.statusCode===204||F.statusCode===304){P=new a(H,G),b(P);return}let k={flush:l.constants.Z_SYNC_FLUSH,finishFlush:l.constants.Z_SYNC_FLUSH};if(x==="gzip"||x==="x-gzip"){let C=new l.Gunzip(k);P=new a(H.on("error",q=>C.emit("error",q)).pipe(C),G),b(P);return}if(x==="deflate"||x==="x-deflate"){F.once("data",C=>{let q=(C[0]&15)===8?new l.Inflate:new l.InflateRaw;H.on("error",X=>q.emit("error",X)).pipe(q),P=new a(q,G),b(P)});return}if(x==="br"){try{var T=new l.BrotliDecompress}catch(C){w(C),N();return}H.on("error",C=>T.emit("error",C)).pipe(T),P=new a(T,G),b(P);return}P=new a(H,G),b(P)}),s(M,_)})},"fetch");t.exports=y,y.isRedirect=v=>v===301||v===302||v===303||v===307||v===308,y.Headers=h,y.Request=d,y.Response=a,y.FetchError=g,y.AbortError=f}),kk=J((e,t)=>{t.exports={name:"npm-registry-fetch",version:"19.0.0",description:"Fetch-based http client for use with npm registry APIs",main:"lib",files:["bin/","lib/"],scripts:{eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"',lint:"npm run eslint",lintfix:"npm run eslint -- --fix",test:"tap",posttest:"npm run lint",npmclilint:"npmcli-lint",postsnap:"npm run lintfix --",postlint:"template-oss-check",snap:"tap","template-oss-apply":"template-oss-apply --force"},repository:{type:"git",url:"git+https://github.com/npm/npm-registry-fetch.git"},keywords:["npm","registry","fetch"],author:"GitHub Inc.",license:"ISC",dependencies:{"@npmcli/redact":"^3.0.0",jsonparse:"^1.3.1","make-fetch-happen":"^15.0.0",minipass:"^7.0.2","minipass-fetch":"^4.0.0",minizlib:"^3.0.1","npm-package-arg":"^13.0.0","proc-log":"^5.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",cacache:"^20.0.0",nock:"^13.2.4","require-inject":"^1.4.4",ssri:"^12.0.0",tap:"^16.0.1"},tap:{"check-coverage":!0,"test-ignore":"test[\\\\/](util|cache)[\\\\/]","nyc-arg":["--exclude","tap-snapshots/**"]},engines:{node:"^20.17.0 || >=22.9.0"},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.25.0",publish:"true"}}}),Vg=J((e,t)=>{var i=kk();t.exports={maxSockets:12,method:"GET",registry:"https://registry.npmjs.org/",timeout:300*1e3,strictSSL:!0,noProxy:process.env.NOPROXY,userAgent:`${i.name}@${i.version}/node@${process.version}+${process.arch} (${process.platform})`}}),Wg=J((e,t)=>{var i="regex",u="path",n={type:i,pattern:/\b(npms?_)[a-zA-Z0-9]{36,48}\b/gi,replacement:"[REDACTED_NPM_SECRET]"},l={type:i,pattern:/\b(Basic\s+|Bearer\s+)[\w+=\-.]+\b/gi,replacement:"[REDACTED_AUTH_HEADER]"},c={type:i,pattern:/\b[A-Za-z0-9-_]{10,}(?!\.\d+\.)\.[A-Za-z0-9-_]{3,}\.[A-Za-z0-9-_]{20,}\b/gi,replacement:"[REDACTED_JSON_WEB_TOKEN]"},r={type:i,pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,replacement:"[REDACTED_UUID]"},s={type:i,pattern:/(?:https?|ftp):\/\/[^\s/"$.?#].[^\s"]*/gi,replacement:"[REDACTED_URL]"},o={type:u,predicate:S(({path:m})=>m.endsWith(".headers.authorization"),"predicate"),replacement:"[REDACTED_HEADER_AUTHORIZATION]"},a={type:u,predicate:S(({path:m})=>m.endsWith(".headers.set-cookie"),"predicate"),replacement:"[REDACTED_HEADER_SET_COOKIE]"},h={type:u,predicate:S(({path:m})=>m.endsWith(".headers.cookie"),"predicate"),replacement:"[REDACTED_HEADER_COOKIE]"},p={type:u,predicate:S(({path:m})=>m.endsWith(".request"),"predicate"),replacement:S(m=>({method:m?.method,path:m?.path,headers:m?.headers,url:m?.url}),"replacement")},d={type:u,predicate:S(({path:m})=>m.endsWith(".response"),"predicate"),replacement:S(m=>({data:m?.data,status:m?.status,headers:m?.headers}),"replacement")};t.exports={TYPE_REGEX:i,TYPE_URL:"url",TYPE_PATH:u,NPM_SECRET:n,AUTH_HEADER:l,JSON_WEB_TOKEN:c,UUID:r,URL_MATCHER:s,DEEP_HEADER_AUTHORIZATION:o,DEEP_HEADER_SET_COOKIE:a,DEEP_HEADER_COOKIE:h,REWRITE_REQUEST:p,REWRITE_RESPONSE:d}}),Lk=J((e,t)=>{var{URL_MATCHER:i,TYPE_URL:u,TYPE_REGEX:n,TYPE_PATH:l}=Wg(),c=S((w=0)=>(w=typeof w=="string"?w.length:w,w<8?"*".repeat(8):"*".repeat(w)),"asterisk"),r=S(w=>w.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"escapeRegExp"),s=S(w=>{let _=decodeURIComponent(w),O=encodeURIComponent(w);return[...new Set([O,_,w])].map(r).join("|")},"urlEncodeRegexGroup"),o=S((w,..._)=>{let O="";for(let A=0;A<_.length;A++)O+=w[A]+`(${s(_[A])})`;return O+=w[w.length-1],new RegExp(O)},"urlEncodeRegexTag"),a=S(({hostname:w,replacement:_}={})=>({type:u,predicate:S(({url:O})=>O.hostname===w,"predicate"),pattern:S(({url:O})=>o`(^${O.protocol}//${O.username}:.+@)?${O.hostname}`,"pattern"),replacement:`$1${_||c()}`}),"redactUrlHostnameMatcher"),h=S(({param:w,replacement:_}={})=>({type:u,predicate:S(({url:O})=>O.searchParams.has(w),"predicate"),pattern:S(({url:O})=>o`(${w}=)${O.searchParams.get(w)}`,"pattern"),replacement:`$1${_||c()}`}),"redactUrlSearchParamsMatcher"),p=S(({replacement:w}={})=>({type:u,predicate:S(({url:_})=>_.password,"predicate"),pattern:S(({url:_})=>o`(^${_.protocol}//${_.username}:)${_.password}`,"pattern"),replacement:`$1${w||c()}`}),"redactUrlPasswordMatcher"),d=S((...w)=>_=>{try{let O=new URL(_);return y(...w)(_,{url:O})}catch{return _}},"redactUrlReplacement"),m=S((...w)=>({...i,replacement:d(...w)}),"redactUrlMatcher"),g={[n]:w=>_=>(typeof _=="string"&&(_=_.replace(w.pattern,w.replacement)),_),[u]:w=>(_,O)=>{if(typeof _=="string")try{let A=O?.url||new URL(_),{predicate:I,pattern:P}=w;I({url:A})&&(_=_.replace(P({url:A}),w.replacement))}catch{return _}return _},[l]:w=>(_,O)=>{let A=O?.path,I=A.join(".").toLowerCase(),{predicate:P,replacement:L}=w,j=typeof L=="function"?L:()=>L;return P({rawPath:A,path:I})&&(_=j(_,{rawPath:A,path:I})),_}},f=S(w=>g[w.type](w),"redactMatcher"),y=S((...w)=>(_,O)=>w.flat().reduce((A,I)=>(typeof I=="function"?I:f(I))(A,O),_),"redactMatchers"),v=S(()=>(w,_)=>typeof _=="number"?c(w):_+c(w.substring(_.length).length),"redactDynamicReplacement"),E=S(w=>(_,O)=>typeof O=="number"?c(w):O+c(w),"redactFixedReplacement"),b=S((w,_)=>y(p({replacement:_}))(w),"redactUrlPassword");t.exports={asterisk:c,escapeRegExp:r,urlEncodeRegexGroup:s,urlEncodeRegexTag:o,redactUrlHostnameMatcher:a,redactUrlSearchParamsMatcher:h,redactUrlPasswordMatcher:p,redactUrlMatcher:m,redactUrlReplacement:d,redactDynamicReplacement:v,redactFixedReplacement:E,redactMatchers:y,redactUrlPassword:b}}),Dk=J((e,t)=>{var i=Wg(),{redactUrlPassword:u}=Lk(),n="***",l=S(s=>typeof s!="string"||!s?s:u(s,n).replace(i.NPM_SECRET.pattern,`npm_${n}`).replace(i.UUID.pattern,n),"redact"),c=S(s=>{let o=/[\s=]/g,a=null,h="",p=0;for(;a=o.exec(s);)h+=l(s.slice(p,a.index))+a[0],p=o.lastIndex;return h+l(s.slice(p))},"splitAndRedact"),r=S(s=>typeof s=="string"?c(s):Array.isArray(s)?s.map(o=>typeof o=="string"?c(o):o):s,"redactLog");t.exports={redact:l,redactLog:r}}),$k=J((e,t)=>{"use strict";var i=Bg(),{Response:u}=Is(),n=Vg(),{log:l}=yt(),{redact:c}=Dk(),r="https://github.com/npm/cli/wiki/No-auth-for-URI,-but-auth-present-for-scoped-registry",s=S(async({method:h,uri:p,res:d,startTime:m,auth:g,opts:f})=>(f={...n,...f},d.headers.has("npm-notice")&&!d.headers.has("x-local-cache")&&l.notice("",d.headers.get("npm-notice")),d.status>=400?(o(h,d,m),g&&g.scopeAuthKey&&!g.token&&!g.auth&&l.warn("registry",`No auth for URI, but auth present for scoped registry.
55
-
56
- URI: ${p}
57
- Scoped Registry Key: ${g.scopeAuthKey}
58
-
59
- More info here: ${r}`),a(h,d,m,f)):(d.body.on("end",()=>o(h,d,m,f)),f.ignoreBody?(d.body.resume(),new u(null,d)):d)),"checkResponse");t.exports=s;function o(h,p,d){let m=Date.now()-d,g=p.headers.get("x-fetch-attempts"),f=g&&g>1?` attempt #${g}`:"",y=p.headers.get("x-local-cache-status"),v=y?` (cache ${y})`:"",E=c(p.url);y==="hit"?l.http("cache",`${E} ${m}ms${f}${v}`):l.http("fetch",`${h.toUpperCase()} ${p.status} ${E} ${m}ms${f}${v}`)}S(o,"logRequest");function a(h,p,d,m){return p.buffer().catch(()=>null).then(g=>{let f=g;try{f=JSON.parse(g.toString("utf8"))}catch{}if(p.status===401&&p.headers.get("www-authenticate")){let y=p.headers.get("www-authenticate").split(/,\s*/).map(v=>v.toLowerCase());throw y.indexOf("ipaddress")!==-1?new i.HttpErrorAuthIPAddress(h,p,f,m.spec):y.indexOf("otp")!==-1?new i.HttpErrorAuthOTP(h,p,f,m.spec):new i.HttpErrorAuthUnknown(h,p,f,m.spec)}else throw p.status===401&&g!=null&&/one-time pass/.test(g.toString("utf8"))?new i.HttpErrorAuthOTP(h,p,f,m.spec):new i.HttpErrorGeneral(h,p,f,m.spec)})}S(a,"checkErrors")}),jk=J((e,t)=>{"use strict";var i=require("fs"),u=ws(),{URL:n}=require("url"),l=S((p,d)=>{let m=new n(p),g=`//${m.host}${m.pathname}`;for(;g.length>2;){let f=c(g,d);if(f)return{regKey:g,authKey:f};g=g.replace(/([^/]+|\/)$/,"")}return{regKey:!1,authKey:null}},"regFromURI"),c=S((p,d)=>d[`${p}:_authToken`]?"_authToken":d[`${p}:_auth`]?"_auth":d[`${p}:username`]&&d[`${p}:_password`]?"username":d[`${p}:certfile`]&&d[`${p}:keyfile`]?"certfile":!1,"hasAuth"),r=S((p,d)=>{let m=new n(p),g=new n(d);return m.host===g.host},"sameHost"),s=S(p=>{let{spec:d}=p,{scope:m,subSpec:g}=d?u(d):{},f=g&&g.scope,y=g?f:m;return y&&p[`${y}:registry`]||p.registry},"getRegistry"),o=S(p=>{try{return i.readFileSync(p,"utf8")}catch(d){if(d.code!=="ENOENT")throw d;return null}},"maybeReadFile"),a=S((p,d={})=>{let{forceAuth:m}=d;if(!p)throw new Error("URI is required");let{regKey:g,authKey:f}=l(p,m||d);if(m&&!g)return new h({regKey:!1,authKey:null,scopeAuthKey:null,token:m._authToken||m.token,username:m.username,password:m._password||m.password,auth:m._auth||m.auth,certfile:m.certfile,keyfile:m.keyfile});if(!g){let O=s(d);if(O&&p!==O&&r(p,O))return a(O,d);if(O!==d.registry){let{regKey:A,authKey:I}=l(O,d);return new h({scopeAuthKey:A,regKey:A,authKey:I})}}let{[`${g}:_authToken`]:y,[`${g}:username`]:v,[`${g}:_password`]:E,[`${g}:_auth`]:b,[`${g}:certfile`]:w,[`${g}:keyfile`]:_}=d;return new h({scopeAuthKey:null,regKey:g,authKey:f,token:y,auth:b,username:v,password:E,certfile:w,keyfile:_})},"getAuth"),h=class{static{S(this,"Auth")}constructor({token:p,auth:d,username:m,password:g,scopeAuthKey:f,certfile:y,keyfile:v,regKey:E,authKey:b}){if(this.scopeAuthKey=f,this.regKey=E,this.authKey=b,this.token=null,this.auth=null,this.isBasicAuth=!1,this.cert=null,this.key=null,p)this.token=p;else if(d)this.auth=d;else if(m&&g){let w=Buffer.from(g,"base64").toString("utf8");this.auth=Buffer.from(`${m}:${w}`,"utf8").toString("base64"),this.isBasicAuth=!0}if(y&&v){let w=o(y,"utf-8"),_=o(v,"utf-8");w&&_&&(this.cert=w,this.key=_)}}};t.exports=a}),Mk=J((e,t)=>{var i=require("dns"),u=["if-modified-since","if-none-match","if-unmodified-since","if-match","if-range"],n=S(l=>{let{strictSSL:c,...r}={...l};if(r.method=r.method?r.method.toUpperCase():"GET",c==null?r.rejectUnauthorized=process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0":r.rejectUnauthorized=c!==!1,!r.retry)r.retry={retries:0};else if(typeof r.retry=="string"){let s=parseInt(r.retry,10);isFinite(s)?r.retry={retries:s}:r.retry={retries:0}}else typeof r.retry=="number"?r.retry={retries:r.retry}:r.retry={retries:0,...r.retry};return r.dns={ttl:300*1e3,lookup:i.lookup,...r.dns},r.cache=r.cache||"default",r.cache==="default"&&Object.keys(r.headers||{}).some(s=>u.includes(s.toLowerCase()))&&(r.cache="no-store"),r.cacheAdditionalHeaders=r.cacheAdditionalHeaders||[],r.cacheManager&&!r.cachePath&&(r.cachePath=r.cacheManager),r},"configureOptions");t.exports=n}),Bk=J((e,t)=>{"use strict";var i=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),u=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),n=new Set([500,502,503,504]),l={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},c={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function r(h){let p=parseInt(h,10);return isFinite(p)?p:0}S(r,"toNumberOrZero");function s(h){return h?n.has(h.status):!0}S(s,"isErrorResponse");function o(h){let p={};if(!h)return p;let d=h.trim().split(/,/);for(let m of d){let[g,f]=m.split(/=/,2);p[g.trim()]=f===void 0?!0:f.trim().replace(/^"|"$/g,"")}return p}S(o,"parseCacheControl");function a(h){let p=[];for(let d in h){let m=h[d];p.push(m===!0?d:d+"="+m)}if(p.length)return p.join(", ")}S(a,"formatCacheControl"),t.exports=class{static{S(this,"CachePolicy")}constructor(h,p,{shared:d,cacheHeuristic:m,immutableMinTimeToLive:g,ignoreCargoCult:f,_fromObject:y}={}){if(y){this._fromObject(y);return}if(!p||!p.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(h),this._responseTime=this.now(),this._isShared=d!==!1,this._ignoreCargoCult=!!f,this._cacheHeuristic=m!==void 0?m:.1,this._immutableMinTtl=g!==void 0?g:24*3600*1e3,this._status="status"in p?p.status:200,this._resHeaders=p.headers,this._rescc=o(p.headers["cache-control"]),this._method="method"in h?h.method:"GET",this._url=h.url,this._host=h.headers.host,this._noAuthorization=!h.headers.authorization,this._reqHeaders=p.headers.vary?h.headers:null,this._reqcc=o(h.headers["cache-control"]),this._ignoreCargoCult&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":a(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),p.headers["cache-control"]==null&&/no-cache/.test(p.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&u.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||i.has(this._status)))}_hasExplicitExpiration(){return!!(this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires)}_assertRequestHasHeaders(h){if(!h||!h.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(h){return!this.evaluateRequest(h).revalidation}_evaluateRequestHitResult(h){return{response:{headers:this.responseHeaders()},revalidation:h}}_evaluateRequestRevalidation(h,p){return{synchronous:p,headers:this.revalidationHeaders(h)}}_evaluateRequestMissResult(h){return{response:void 0,revalidation:this._evaluateRequestRevalidation(h,!0)}}evaluateRequest(h){if(this._assertRequestHasHeaders(h),this._rescc["must-revalidate"])return this._evaluateRequestMissResult(h);if(!this._requestMatches(h,!1))return this._evaluateRequestMissResult(h);let p=o(h.headers["cache-control"]);return p["no-cache"]||/no-cache/.test(h.headers.pragma)?this._evaluateRequestMissResult(h):p["max-age"]&&this.age()>r(p["max-age"])?this._evaluateRequestMissResult(h):p["min-fresh"]&&this.maxAge()-this.age()<r(p["min-fresh"])?this._evaluateRequestMissResult(h):this.stale()?"max-stale"in p&&(p["max-stale"]===!0||p["max-stale"]>this.age()-this.maxAge())?this._evaluateRequestHitResult(void 0):this.useStaleWhileRevalidate()?this._evaluateRequestHitResult(this._evaluateRequestRevalidation(h,!1)):this._evaluateRequestMissResult(h):this._evaluateRequestHitResult(void 0)}_requestMatches(h,p){return!!((!this._url||this._url===h.url)&&this._host===h.headers.host&&(!h.method||this._method===h.method||p&&h.method==="HEAD")&&this._varyMatches(h))}_allowsStoringAuthenticated(){return!!(this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"])}_varyMatches(h){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let p=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let d of p)if(h.headers[d]!==this._reqHeaders[d])return!1;return!0}_copyWithoutHopByHopHeaders(h){let p={};for(let d in h)l[d]||(p[d]=h[d]);if(h.connection){let d=h.connection.trim().split(/\s*,\s*/);for(let m of d)delete p[m]}if(p.warning){let d=p.warning.split(/,/).filter(m=>!/^\s*1[0-9][0-9]/.test(m));d.length?p.warning=d.join(",").trim():delete p.warning}return p}responseHeaders(){let h=this._copyWithoutHopByHopHeaders(this._resHeaders),p=this.age();return p>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(h.warning=(h.warning?`${h.warning}, `:"")+'113 - "rfc7234 5.5.4"'),h.age=`${Math.round(p)}`,h.date=new Date(this.now()).toUTCString(),h}date(){let h=Date.parse(this._resHeaders.date);return isFinite(h)?h:this._responseTime}age(){let h=this._ageValue(),p=(this.now()-this._responseTime)/1e3;return h+p}_ageValue(){return r(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return r(this._rescc["s-maxage"])}if(this._rescc["max-age"])return r(this._rescc["max-age"]);let h=this._rescc.immutable?this._immutableMinTtl:0,p=this.date();if(this._resHeaders.expires){let d=Date.parse(this._resHeaders.expires);return Number.isNaN(d)||d<p?0:Math.max(h,(d-p)/1e3)}if(this._resHeaders["last-modified"]){let d=Date.parse(this._resHeaders["last-modified"]);if(isFinite(d)&&p>d)return Math.max(h,(p-d)/1e3*this._cacheHeuristic)}return h}timeToLive(){let h=this.maxAge()-this.age(),p=h+r(this._rescc["stale-if-error"]),d=h+r(this._rescc["stale-while-revalidate"]);return Math.round(Math.max(0,h,p,d)*1e3)}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+r(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){let h=r(this._rescc["stale-while-revalidate"]);return h>0&&this.maxAge()+h>this.age()}static fromObject(h){return new this(void 0,void 0,{_fromObject:h})}_fromObject(h){if(this._responseTime)throw Error("Reinitialized");if(!h||h.v!==1)throw Error("Invalid serialization");this._responseTime=h.t,this._isShared=h.sh,this._cacheHeuristic=h.ch,this._immutableMinTtl=h.imm!==void 0?h.imm:24*3600*1e3,this._ignoreCargoCult=!!h.icc,this._status=h.st,this._resHeaders=h.resh,this._rescc=h.rescc,this._method=h.m,this._url=h.u,this._host=h.h,this._noAuthorization=h.a,this._reqHeaders=h.reqh,this._reqcc=h.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,icc:this._ignoreCargoCult,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(h){this._assertRequestHasHeaders(h);let p=this._copyWithoutHopByHopHeaders(h.headers);if(delete p["if-range"],!this._requestMatches(h,!0)||!this.storable())return delete p["if-none-match"],delete p["if-modified-since"],p;if(this._resHeaders.etag&&(p["if-none-match"]=p["if-none-match"]?`${p["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),p["accept-ranges"]||p["if-match"]||p["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete p["if-modified-since"],p["if-none-match"]){let d=p["if-none-match"].split(/,/).filter(m=>!/^\s*W\//.test(m));d.length?p["if-none-match"]=d.join(",").trim():delete p["if-none-match"]}}else this._resHeaders["last-modified"]&&!p["if-modified-since"]&&(p["if-modified-since"]=this._resHeaders["last-modified"]);return p}revalidatedPolicy(h,p){if(this._assertRequestHasHeaders(h),this._useStaleIfError()&&s(p))return{policy:this,modified:!1,matches:!0};if(!p||!p.headers)throw Error("Response headers missing");let d=!1;p.status!==void 0&&p.status!=304?d=!1:p.headers.etag&&!/^\s*W\//.test(p.headers.etag)?d=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===p.headers.etag:this._resHeaders.etag&&p.headers.etag?d=this._resHeaders.etag.replace(/^\s*W\//,"")===p.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?d=this._resHeaders["last-modified"]===p.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!p.headers.etag&&!p.headers["last-modified"]&&(d=!0);let m={shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl,ignoreCargoCult:this._ignoreCargoCult};if(!d)return{policy:new this.constructor(h,p,m),modified:p.status!=304,matches:!1};let g={};for(let y in this._resHeaders)g[y]=y in p.headers&&!c[y]?p.headers[y]:this._resHeaders[y];let f=Object.assign({},p,{status:this._status,method:this._method,headers:g});return{policy:new this.constructor(h,f,m),modified:!1,matches:!0}}}}),Uk=J((e,t)=>{"use strict";t.exports=r,t.exports.preferredCharsets=r;var i=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function u(h){for(var p=h.split(","),d=0,m=0;d<p.length;d++){var g=n(p[d].trim(),d);g&&(p[m++]=g)}return p.length=m,p}S(u,"parseAcceptCharset");function n(h,p){var d=i.exec(h);if(!d)return null;var m=d[1],g=1;if(d[2])for(var f=d[2].split(";"),y=0;y<f.length;y++){var v=f[y].trim().split("=");if(v[0]==="q"){g=parseFloat(v[1]);break}}return{charset:m,q:g,i:p}}S(n,"parseCharset");function l(h,p,d){for(var m={o:-1,q:0,s:0},g=0;g<p.length;g++){var f=c(h,p[g],d);f&&(m.s-f.s||m.q-f.q||m.o-f.o)<0&&(m=f)}return m}S(l,"getCharsetPriority");function c(h,p,d){var m=0;if(p.charset.toLowerCase()===h.toLowerCase())m|=1;else if(p.charset!=="*")return null;return{i:d,o:p.i,q:p.q,s:m}}S(c,"specify");function r(h,p){var d=u(h===void 0?"*":h||"");if(!p)return d.filter(a).sort(s).map(o);var m=p.map(S(function(g,f){return l(g,d,f)},"getPriority"));return m.filter(a).sort(s).map(S(function(g){return p[m.indexOf(g)]},"getCharset"))}S(r,"preferredCharsets");function s(h,p){return p.q-h.q||p.s-h.s||h.o-p.o||h.i-p.i||0}S(s,"compareSpecs");function o(h){return h.charset}S(o,"getFullCharset");function a(h){return h.q>0}S(a,"isQuality")}),Fk=J((e,t)=>{"use strict";t.exports=r,t.exports.preferredEncodings=r;var i=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function u(h){for(var p=h.split(","),d=!1,m=1,g=0,f=0;g<p.length;g++){var y=n(p[g].trim(),g);y&&(p[f++]=y,d=d||c("identity",y),m=Math.min(m,y.q||1))}return d||(p[f++]={encoding:"identity",q:m,i:g}),p.length=f,p}S(u,"parseAcceptEncoding");function n(h,p){var d=i.exec(h);if(!d)return null;var m=d[1],g=1;if(d[2])for(var f=d[2].split(";"),y=0;y<f.length;y++){var v=f[y].trim().split("=");if(v[0]==="q"){g=parseFloat(v[1]);break}}return{encoding:m,q:g,i:p}}S(n,"parseEncoding");function l(h,p,d){for(var m={encoding:h,o:-1,q:0,s:0},g=0;g<p.length;g++){var f=c(h,p[g],d);f&&(m.s-f.s||m.q-f.q||m.o-f.o)<0&&(m=f)}return m}S(l,"getEncodingPriority");function c(h,p,d){var m=0;if(p.encoding.toLowerCase()===h.toLowerCase())m|=1;else if(p.encoding!=="*")return null;return{encoding:h,i:d,o:p.i,q:p.q,s:m}}S(c,"specify");function r(h,p,d){var m=u(h||""),g=d?S(function(y,v){if(y.q!==v.q)return v.q-y.q;var E=d.indexOf(y.encoding),b=d.indexOf(v.encoding);return E===-1&&b===-1?v.s-y.s||y.o-v.o||y.i-v.i:E!==-1&&b!==-1?E-b:E===-1?1:-1},"comparator"):s;if(!p)return m.filter(a).sort(g).map(o);var f=p.map(S(function(y,v){return l(y,m,v)},"getPriority"));return f.filter(a).sort(g).map(S(function(y){return p[f.indexOf(y)]},"getEncoding"))}S(r,"preferredEncodings");function s(h,p){return p.q-h.q||p.s-h.s||h.o-p.o||h.i-p.i}S(s,"compareSpecs");function o(h){return h.encoding}S(o,"getFullEncoding");function a(h){return h.q>0}S(a,"isQuality")}),Hk=J((e,t)=>{"use strict";t.exports=r,t.exports.preferredLanguages=r;var i=/^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;function u(h){for(var p=h.split(","),d=0,m=0;d<p.length;d++){var g=n(p[d].trim(),d);g&&(p[m++]=g)}return p.length=m,p}S(u,"parseAcceptLanguage");function n(h,p){var d=i.exec(h);if(!d)return null;var m=d[1],g=d[2],f=m;g&&(f+="-"+g);var y=1;if(d[3])for(var v=d[3].split(";"),E=0;E<v.length;E++){var b=v[E].split("=");b[0]==="q"&&(y=parseFloat(b[1]))}return{prefix:m,suffix:g,q:y,i:p,full:f}}S(n,"parseLanguage");function l(h,p,d){for(var m={o:-1,q:0,s:0},g=0;g<p.length;g++){var f=c(h,p[g],d);f&&(m.s-f.s||m.q-f.q||m.o-f.o)<0&&(m=f)}return m}S(l,"getLanguagePriority");function c(h,p,d){var m=n(h);if(!m)return null;var g=0;if(p.full.toLowerCase()===m.full.toLowerCase())g|=4;else if(p.prefix.toLowerCase()===m.full.toLowerCase())g|=2;else if(p.full.toLowerCase()===m.prefix.toLowerCase())g|=1;else if(p.full!=="*")return null;return{i:d,o:p.i,q:p.q,s:g}}S(c,"specify");function r(h,p){var d=u(h===void 0?"*":h||"");if(!p)return d.filter(a).sort(s).map(o);var m=p.map(S(function(g,f){return l(g,d,f)},"getPriority"));return m.filter(a).sort(s).map(S(function(g){return p[m.indexOf(g)]},"getLanguage"))}S(r,"preferredLanguages");function s(h,p){return p.q-h.q||p.s-h.s||h.o-p.o||h.i-p.i||0}S(s,"compareSpecs");function o(h){return h.full}S(o,"getFullLanguage");function a(h){return h.q>0}S(a,"isQuality")}),Gk=J((e,t)=>{"use strict";t.exports=r,t.exports.preferredMediaTypes=r;var i=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;function u(g){for(var f=d(g),y=0,v=0;y<f.length;y++){var E=n(f[y].trim(),y);E&&(f[v++]=E)}return f.length=v,f}S(u,"parseAccept");function n(g,f){var y=i.exec(g);if(!y)return null;var v=Object.create(null),E=1,b=y[2],w=y[1];if(y[3])for(var _=m(y[3]).map(p),O=0;O<_.length;O++){var A=_[O],I=A[0].toLowerCase(),P=A[1],L=P&&P[0]==='"'&&P[P.length-1]==='"'?P.slice(1,-1):P;if(I==="q"){E=parseFloat(L);break}v[I]=L}return{type:w,subtype:b,params:v,q:E,i:f}}S(n,"parseMediaType");function l(g,f,y){for(var v={o:-1,q:0,s:0},E=0;E<f.length;E++){var b=c(g,f[E],y);b&&(v.s-b.s||v.q-b.q||v.o-b.o)<0&&(v=b)}return v}S(l,"getMediaTypePriority");function c(g,f,y){var v=n(g),E=0;if(!v)return null;if(f.type.toLowerCase()==v.type.toLowerCase())E|=4;else if(f.type!="*")return null;if(f.subtype.toLowerCase()==v.subtype.toLowerCase())E|=2;else if(f.subtype!="*")return null;var b=Object.keys(f.params);if(b.length>0)if(b.every(function(w){return f.params[w]=="*"||(f.params[w]||"").toLowerCase()==(v.params[w]||"").toLowerCase()}))E|=1;else return null;return{i:y,o:f.i,q:f.q,s:E}}S(c,"specify");function r(g,f){var y=u(g===void 0?"*/*":g||"");if(!f)return y.filter(a).sort(s).map(o);var v=f.map(S(function(E,b){return l(E,y,b)},"getPriority"));return v.filter(a).sort(s).map(S(function(E){return f[v.indexOf(E)]},"getType"))}S(r,"preferredMediaTypes");function s(g,f){return f.q-g.q||f.s-g.s||g.o-f.o||g.i-f.i||0}S(s,"compareSpecs");function o(g){return g.type+"/"+g.subtype}S(o,"getFullType");function a(g){return g.q>0}S(a,"isQuality");function h(g){for(var f=0,y=0;(y=g.indexOf('"',y))!==-1;)f++,y++;return f}S(h,"quoteCount");function p(g){var f=g.indexOf("="),y,v;return f===-1?y=g:(y=g.slice(0,f),v=g.slice(f+1)),[y,v]}S(p,"splitKeyValuePair");function d(g){for(var f=g.split(","),y=1,v=0;y<f.length;y++)h(f[v])%2==0?f[++v]=f[y]:f[v]+=","+f[y];return f.length=v+1,f}S(d,"splitMediaTypes");function m(g){for(var f=g.split(";"),y=1,v=0;y<f.length;y++)h(f[v])%2==0?f[++v]=f[y]:f[v]+=";"+f[y];f.length=v+1;for(var y=0;y<f.length;y++)f[y]=f[y].trim();return f}S(m,"splitParameters")}),Vk=J((e,t)=>{"use strict";var i=Uk(),u=Fk(),n=Hk(),l=Gk();t.exports=c,t.exports.Negotiator=c;function c(r){if(!(this instanceof c))return new c(r);this.request=r}S(c,"Negotiator"),c.prototype.charset=S(function(r){var s=this.charsets(r);return s&&s[0]},"charset"),c.prototype.charsets=S(function(r){return i(this.request.headers["accept-charset"],r)},"charsets"),c.prototype.encoding=S(function(r,s){var o=this.encodings(r,s);return o&&o[0]},"encoding"),c.prototype.encodings=S(function(r,s){var o=s||{};return u(this.request.headers["accept-encoding"],r,o.preferred)},"encodings"),c.prototype.language=S(function(r){var s=this.languages(r);return s&&s[0]},"language"),c.prototype.languages=S(function(r){return n(this.request.headers["accept-language"],r)},"languages"),c.prototype.mediaType=S(function(r){var s=this.mediaTypes(r);return s&&s[0]},"mediaType"),c.prototype.mediaTypes=S(function(r){return l(this.request.headers.accept,r)},"mediaTypes"),c.prototype.preferredCharset=c.prototype.charset,c.prototype.preferredCharsets=c.prototype.charsets,c.prototype.preferredEncoding=c.prototype.encoding,c.prototype.preferredEncodings=c.prototype.encodings,c.prototype.preferredLanguage=c.prototype.language,c.prototype.preferredLanguages=c.prototype.languages,c.prototype.preferredMediaType=c.prototype.mediaType,c.prototype.preferredMediaTypes=c.prototype.mediaTypes}),zg=J((e,t)=>{var i=Bk(),u=Vk(),n=Dt(),l={shared:!1,ignoreCargoCult:!0},c={status:200,headers:{}},r=S(a=>{let h={method:a.method,url:a.url,headers:{},compress:a.compress};return a.headers.forEach((p,d)=>{h.headers[d]=p}),h},"requestObject"),s=S(a=>{let h={status:a.status,headers:{}};return a.headers.forEach((p,d)=>{h.headers[d]=p}),h},"responseObject"),o=class{static{S(this,"CachePolicy")}constructor({entry:a,request:h,response:p,options:d}){this.entry=a,this.request=r(h),this.response=s(p),this.options=d,this.policy=new i(this.request,this.response,l),this.entry&&(this.policy._responseTime=this.entry.metadata.time)}static storable(a,h){return!h.cachePath||h.cache==="no-store"||!["GET","HEAD"].includes(a.method)?!1:new i(r(a),c,l).storable()}satisfies(a){let h=r(a);if(this.request.headers.host!==h.headers.host||this.request.compress!==h.compress)return!1;let p=new u(this.request),d=new u(h);return JSON.stringify(p.mediaTypes())!==JSON.stringify(d.mediaTypes())||JSON.stringify(p.languages())!==JSON.stringify(d.languages())||JSON.stringify(p.encodings())!==JSON.stringify(d.encodings())?!1:this.options.integrity?n.parse(this.options.integrity).match(this.entry.integrity):!0}storable(){return this.policy.storable()}get mustRevalidate(){return!!this.policy._rescc["must-revalidate"]}needsRevalidation(a){let h=r(a);return h.method="GET",!this.policy.satisfiesWithoutRevalidation(h)}responseHeaders(){return this.policy.responseHeaders()}revalidationHeaders(a){let h=r(a);return this.policy.revalidationHeaders(h)}revalidated(a,h){let p=r(a),d=s(h);return!this.policy.revalidatedPolicy(p,d).modified}};t.exports=o}),Wk=J((e,t)=>{var i=class extends Error{static{S(this,"NotCachedError")}constructor(u){super(`request to ${u} failed: cache mode is 'only-if-cached' but no cached response is available.`),this.code="ENOTCACHED"}};t.exports={NotCachedError:i}}),qg=J((e,t)=>{"use strict";var i=vs(),u=class extends i{static{S(this,"CachingMinipassPipeline")}#e=[];#t=new Map;constructor(n,...l){super(),this.#e=n.events,l.length&&this.push(...l)}on(n,l){return this.#e.includes(n)&&this.#t.has(n)?l(...this.#t.get(n)):super.on(n,l)}emit(n,...l){return this.#e.includes(n)&&this.#t.set(n,l),super.emit(n,...l)}};t.exports=u}),zk=J((e,t)=>{var{URL:i,format:u}=require("url"),n={auth:!1,fragment:!1,search:!0,unicode:!1},l=S(c=>{let r=new i(c.url);return`make-fetch-happen:request-cache:${u(r,n)}`},"cacheKey");t.exports=l}),Kg=J((e,t)=>{"use strict";var{LRUCache:i}=Cr(),u=require("dns"),n=new i({max:50}),l=S(({family:c=0,hints:r=u.ADDRCONFIG,all:s=!1,verbatim:o=void 0,ttl:a=300*1e3,lookup:h=u.lookup})=>({hints:r,lookup:S((p,...d)=>{let m=d.pop(),g=d[0]??{},f={family:c,hints:r,all:s,verbatim:o,...typeof g=="number"?{family:g}:g},y=JSON.stringify({hostname:p,...f});if(n.has(y)){let v=n.get(y);return process.nextTick(m,null,...v)}h(p,f,(v,...E)=>v?m(v):(n.set(y,E,{ttl:a}),m(null,...E)))},"lookup")}),"getOptions");t.exports={cache:n,getOptions:l}}),Jg=J((e,t)=>{"use strict";var i=Kg(),u=S(c=>{let r=parseInt(c.family??"0",10),s=c.keepAlive??!0,o={keepAliveMsecs:s?1e3:void 0,maxSockets:c.maxSockets??15,maxTotalSockets:1/0,maxFreeSockets:s?256:void 0,scheduling:"fifo",...c,family:r,keepAlive:s,timeouts:{idle:c.timeout??0,connection:0,response:0,transfer:0,...c.timeouts},...i.getOptions({family:r,...c.dns})};return delete o.timeout,o},"normalizeOptions"),n=S(c=>{let r="",s=Object.entries(c).sort((o,a)=>o[0]-a[0]);for(let[o,a]of s)a==null?a="null":a instanceof URL?a=a.toString():typeof a=="object"&&(a=n(a)),r+=`${o}:${a}:`;return r},"createKey"),l=S(({secureEndpoint:c,...r})=>n({secureEndpoint:!!c,family:r.family,hints:r.hints,localAddress:r.localAddress,strictSsl:c?!!r.rejectUnauthorized:!1,ca:c?r.ca:null,cert:c?r.cert:null,key:c?r.key:null,keepAlive:r.keepAlive,keepAliveMsecs:r.keepAliveMsecs,maxSockets:r.maxSockets,maxTotalSockets:r.maxTotalSockets,maxFreeSockets:r.maxFreeSockets,scheduling:r.scheduling,timeouts:r.timeouts,proxy:r.proxy}),"cacheOptions");t.exports={normalizeOptions:u,cacheOptions:l}}),qk=J((e,t)=>{var i=1e3,u=i*60,n=u*60,l=n*24,c=l*7,r=l*365.25;t.exports=function(p,d){d=d||{};var m=typeof p;if(m==="string"&&p.length>0)return s(p);if(m==="number"&&isFinite(p))return d.long?a(p):o(p);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))};function s(p){if(p=String(p),!(p.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(p);if(d){var m=parseFloat(d[1]),g=(d[2]||"ms").toLowerCase();switch(g){case"years":case"year":case"yrs":case"yr":case"y":return m*r;case"weeks":case"week":case"w":return m*c;case"days":case"day":case"d":return m*l;case"hours":case"hour":case"hrs":case"hr":case"h":return m*n;case"minutes":case"minute":case"mins":case"min":case"m":return m*u;case"seconds":case"second":case"secs":case"sec":case"s":return m*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return m;default:return}}}}S(s,"parse");function o(p){var d=Math.abs(p);return d>=l?Math.round(p/l)+"d":d>=n?Math.round(p/n)+"h":d>=u?Math.round(p/u)+"m":d>=i?Math.round(p/i)+"s":p+"ms"}S(o,"fmtShort");function a(p){var d=Math.abs(p);return d>=l?h(p,d,l,"day"):d>=n?h(p,d,n,"hour"):d>=u?h(p,d,u,"minute"):d>=i?h(p,d,i,"second"):p+" ms"}S(a,"fmtLong");function h(p,d,m,g){var f=d>=m*1.5;return Math.round(p/m)+" "+g+(f?"s":"")}S(h,"plural")}),Xg=J((e,t)=>{function i(u){l.debug=l,l.default=l,l.coerce=h,l.disable=o,l.enable=r,l.enabled=a,l.humanize=qk(),l.destroy=p,Object.keys(u).forEach(d=>{l[d]=u[d]}),l.names=[],l.skips=[],l.formatters={};function n(d){let m=0;for(let g=0;g<d.length;g++)m=(m<<5)-m+d.charCodeAt(g),m|=0;return l.colors[Math.abs(m)%l.colors.length]}S(n,"selectColor"),l.selectColor=n;function l(d){let m,g=null,f,y;function v(...E){if(!v.enabled)return;let b=v,w=Number(new Date),_=w-(m||w);b.diff=_,b.prev=m,b.curr=w,m=w,E[0]=l.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let O=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(A,I)=>{if(A==="%%")return"%";O++;let P=l.formatters[I];if(typeof P=="function"){let L=E[O];A=P.call(b,L),E.splice(O,1),O--}return A}),l.formatArgs.call(b,E),(b.log||l.log).apply(b,E)}return S(v,"debug"),v.namespace=d,v.useColors=l.useColors(),v.color=l.selectColor(d),v.extend=c,v.destroy=l.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:S(()=>g!==null?g:(f!==l.namespaces&&(f=l.namespaces,y=l.enabled(d)),y),"get"),set:S(E=>{g=E},"set")}),typeof l.init=="function"&&l.init(v),v}S(l,"createDebug");function c(d,m){let g=l(this.namespace+(typeof m>"u"?":":m)+d);return g.log=this.log,g}S(c,"extend");function r(d){l.save(d),l.namespaces=d,l.names=[],l.skips=[];let m=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let g of m)g[0]==="-"?l.skips.push(g.slice(1)):l.names.push(g)}S(r,"enable");function s(d,m){let g=0,f=0,y=-1,v=0;for(;g<d.length;)if(f<m.length&&(m[f]===d[g]||m[f]==="*"))m[f]==="*"?(y=f,v=g,f++):(g++,f++);else if(y!==-1)f=y+1,v++,g=v;else return!1;for(;f<m.length&&m[f]==="*";)f++;return f===m.length}S(s,"matchesTemplate");function o(){let d=[...l.names,...l.skips.map(m=>"-"+m)].join(",");return l.enable(""),d}S(o,"disable");function a(d){for(let m of l.skips)if(s(d,m))return!1;for(let m of l.names)if(s(d,m))return!0;return!1}S(a,"enabled");function h(d){return d instanceof Error?d.stack||d.message:d}S(h,"coerce");function p(){}return S(p,"destroy"),l.enable(l.load()),l}S(i,"setup"),t.exports=i}),Kk=J((e,t)=>{e.formatArgs=u,e.save=n,e.load=l,e.useColors=i,e.storage=c(),e.destroy=(()=>{let s=!1;return()=>{s||(s=!0)}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function i(){let s;return!1}S(i,"useColors");function u(s){if(s[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+s[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let o="color: "+this.color;s.splice(1,0,o,"color: inherit");let a=0,h=0;s[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(a++,p==="%c"&&(h=a))}),s.splice(h,0,o)}S(u,"formatArgs"),e.log=console.debug||console.log||(()=>{});function n(s){try{s?e.storage.setItem("debug",s):e.storage.removeItem("debug")}catch{}}S(n,"save");function l(){let s;try{s=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch{}return!s&&typeof process<"u"&&"env"in process&&(s=void 0),s}S(l,"load");function c(){try{return}catch{}}S(c,"localstorage"),t.exports=Xg()(e);var{formatters:r}=t.exports;r.j=function(s){try{return JSON.stringify(s)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}}}),Jk=J((e,t)=>{"use strict";t.exports=(i,u=process.argv)=>{let n=i.startsWith("-")?"":i.length===1?"-":"--",l=u.indexOf(n+i),c=u.indexOf("--");return l!==-1&&(c===-1||l<c)}}),Xk=J((e,t)=>{"use strict";var i=require("os"),u=require("tty"),n=Jk(),{env:l}=process,c;n("no-color")||n("no-colors")||n("color=false")||n("color=never")?c=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(c=1),"FORCE_COLOR"in l&&(l.FORCE_COLOR==="true"?c=1:l.FORCE_COLOR==="false"?c=0:c=l.FORCE_COLOR.length===0?1:Math.min(parseInt(l.FORCE_COLOR,10),3));function r(a){return a===0?!1:{level:a,hasBasic:!0,has256:a>=2,has16m:a>=3}}S(r,"translateLevel");function s(a,h){if(c===0)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(a&&!h&&c===void 0)return 0;let p=c||0;if(l.TERM==="dumb")return p;if(process.platform==="win32"){let d=i.release().split(".");return Number(d[0])>=10&&Number(d[2])>=10586?Number(d[2])>=14931?3:2:1}if("CI"in l)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(d=>d in l)||l.CI_NAME==="codeship"?1:p;if("TEAMCITY_VERSION"in l)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(l.TEAMCITY_VERSION)?1:0;if(l.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in l){let d=parseInt((l.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(l.TERM_PROGRAM){case"iTerm.app":return d>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(l.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(l.TERM)||"COLORTERM"in l?1:p}S(s,"supportsColor");function o(a){let h=s(a,a&&a.isTTY);return r(h)}S(o,"getSupportLevel"),t.exports={supportsColor:o,stdout:r(s(!0,u.isatty(1))),stderr:r(s(!0,u.isatty(2)))}}),Zk=J((e,t)=>{var i=require("tty"),u=require("util");e.init=a,e.log=r,e.formatArgs=l,e.save=s,e.load=o,e.useColors=n,e.destroy=u.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{let p=Xk();p&&(p.stderr||p).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(p=>/^debug_/i.test(p)).reduce((p,d)=>{let m=d.substring(6).toLowerCase().replace(/_([a-z])/g,(f,y)=>y.toUpperCase()),g=process.env[d];return/^(yes|on|true|enabled)$/i.test(g)?g=!0:/^(no|off|false|disabled)$/i.test(g)?g=!1:g==="null"?g=null:g=Number(g),p[m]=g,p},{});function n(){return"colors"in e.inspectOpts?!!e.inspectOpts.colors:i.isatty(process.stderr.fd)}S(n,"useColors");function l(p){let{namespace:d,useColors:m}=this;if(m){let g=this.color,f="\x1B[3"+(g<8?g:"8;5;"+g),y=` ${f};1m${d} \x1B[0m`;p[0]=y+p[0].split(`
60
- `).join(`
61
- `+y),p.push(f+"m+"+t.exports.humanize(this.diff)+"\x1B[0m")}else p[0]=c()+d+" "+p[0]}S(l,"formatArgs");function c(){return e.inspectOpts.hideDate?"":new Date().toISOString()+" "}S(c,"getDate");function r(...p){return process.stderr.write(u.formatWithOptions(e.inspectOpts,...p)+`
62
- `)}S(r,"log");function s(p){p?process.env.DEBUG=p:delete void 0}S(s,"save");function o(){}S(o,"load");function a(p){p.inspectOpts={};let d=Object.keys(e.inspectOpts);for(let m=0;m<d.length;m++)p.inspectOpts[d[m]]=e.inspectOpts[d[m]]}S(a,"init"),t.exports=Xg()(e);var{formatters:h}=t.exports;h.o=function(p){return this.inspectOpts.colors=this.useColors,u.inspect(p,this.inspectOpts).split(`
63
- `).map(d=>d.trim()).join(" ")},h.O=function(p){return this.inspectOpts.colors=this.useColors,u.inspect(p,this.inspectOpts)}}),Pr=J((e,t)=>{typeof process>"u"||process.type==="renderer"||process.__nwjs?t.exports=Kk():t.exports=Zk()}),Yk=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(o,a,h,p){p===void 0&&(p=h);var d=Object.getOwnPropertyDescriptor(a,h);(!d||("get"in d?!a.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:S(function(){return a[h]},"get")}),Object.defineProperty(o,p,d)}:function(o,a,h,p){p===void 0&&(p=h),o[p]=a[h]}),i=e&&e.__setModuleDefault||(Object.create?function(o,a){Object.defineProperty(o,"default",{enumerable:!0,value:a})}:function(o,a){o.default=a}),u=e&&e.__importStar||function(o){if(o&&o.__esModule)return o;var a={};if(o!=null)for(var h in o)h!=="default"&&Object.prototype.hasOwnProperty.call(o,h)&&t(a,o,h);return i(a,o),a};Object.defineProperty(e,"__esModule",{value:!0}),e.req=e.json=e.toBuffer=void 0;var n=u(require("http")),l=u(require("https"));async function c(o){let a=0,h=[];for await(let p of o)a+=p.length,h.push(p);return Buffer.concat(h,a)}S(c,"toBuffer"),e.toBuffer=c;async function r(o){let a=(await c(o)).toString("utf8");try{return JSON.parse(a)}catch(h){let p=h;throw p.message+=` (input: ${a})`,p}}S(r,"json"),e.json=r;function s(o,a={}){let h=((typeof o=="string"?o:o.href).startsWith("https:")?l:n).request(o,a),p=new Promise((d,m)=>{h.once("response",d).once("error",m).end()});return h.then=p.then.bind(p),h}S(s,"req"),e.req=s}),nn=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(a,h,p,d){d===void 0&&(d=p);var m=Object.getOwnPropertyDescriptor(h,p);(!m||("get"in m?!h.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:S(function(){return h[p]},"get")}),Object.defineProperty(a,d,m)}:function(a,h,p,d){d===void 0&&(d=p),a[d]=h[p]}),i=e&&e.__setModuleDefault||(Object.create?function(a,h){Object.defineProperty(a,"default",{enumerable:!0,value:h})}:function(a,h){a.default=h}),u=e&&e.__importStar||function(a){if(a&&a.__esModule)return a;var h={};if(a!=null)for(var p in a)p!=="default"&&Object.prototype.hasOwnProperty.call(a,p)&&t(h,a,p);return i(h,a),h},n=e&&e.__exportStar||function(a,h){for(var p in a)p!=="default"&&!Object.prototype.hasOwnProperty.call(h,p)&&t(h,a,p)};Object.defineProperty(e,"__esModule",{value:!0}),e.Agent=void 0;var l=u(require("net")),c=u(require("http")),r=require("https");n(Yk(),e);var s=Symbol("AgentBaseInternalState"),o=class extends c.Agent{static{S(this,"Agent")}constructor(a){super(a),this[s]={}}isSecureEndpoint(a){if(a){if(typeof a.secureEndpoint=="boolean")return a.secureEndpoint;if(typeof a.protocol=="string")return a.protocol==="https:"}let{stack:h}=new Error;return typeof h!="string"?!1:h.split(`
64
- `).some(p=>p.indexOf("(https.js:")!==-1||p.indexOf("node:https:")!==-1)}incrementSockets(a){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[a]||(this.sockets[a]=[]);let h=new l.Socket({writable:!1});return this.sockets[a].push(h),this.totalSocketCount++,h}decrementSockets(a,h){if(!this.sockets[a]||h===null)return;let p=this.sockets[a],d=p.indexOf(h);d!==-1&&(p.splice(d,1),this.totalSocketCount--,p.length===0&&delete this.sockets[a])}getName(a){return this.isSecureEndpoint(a)?r.Agent.prototype.getName.call(this,a):super.getName(a)}createSocket(a,h,p){let d={...h,secureEndpoint:this.isSecureEndpoint(h)},m=this.getName(d),g=this.incrementSockets(m);Promise.resolve().then(()=>this.connect(a,d)).then(f=>{if(this.decrementSockets(m,g),f instanceof c.Agent)try{return f.addRequest(a,d)}catch(y){return p(y)}this[s].currentSocket=f,super.createSocket(a,h,p)},f=>{this.decrementSockets(m,g),p(f)})}createConnection(){let a=this[s].currentSocket;if(this[s].currentSocket=void 0,!a)throw new Error("No socket was returned in the `connect()` function");return a}get defaultPort(){return this[s].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(a){this[s]&&(this[s].defaultPort=a)}get protocol(){return this[s].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(a){this[s]&&(this[s].protocol=a)}};e.Agent=o}),Qk=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(m,g,f,y){y===void 0&&(y=f);var v=Object.getOwnPropertyDescriptor(g,f);(!v||("get"in v?!g.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:S(function(){return g[f]},"get")}),Object.defineProperty(m,y,v)}:function(m,g,f,y){y===void 0&&(y=f),m[y]=g[f]}),i=e&&e.__setModuleDefault||(Object.create?function(m,g){Object.defineProperty(m,"default",{enumerable:!0,value:g})}:function(m,g){m.default=g}),u=e&&e.__importStar||function(m){if(m&&m.__esModule)return m;var g={};if(m!=null)for(var f in m)f!=="default"&&Object.prototype.hasOwnProperty.call(m,f)&&t(g,m,f);return i(g,m),g},n=e&&e.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(e,"__esModule",{value:!0}),e.HttpProxyAgent=void 0;var l=u(require("net")),c=u(require("tls")),r=n(Pr()),s=require("events"),o=nn(),a=require("url"),h=(0,r.default)("http-proxy-agent"),p=class extends o.Agent{static{S(this,"HttpProxyAgent")}constructor(m,g){super(g),this.proxy=typeof m=="string"?new a.URL(m):m,this.proxyHeaders=g?.headers??{},h("Creating new HttpProxyAgent instance: %o",this.proxy.href);let f=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),y=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...g?d(g,"headers"):null,host:f,port:y}}addRequest(m,g){m._header=null,this.setRequestProps(m,g),super.addRequest(m,g)}setRequestProps(m,g){let{proxy:f}=this,y=g.secureEndpoint?"https:":"http:",v=m.getHeader("host")||"localhost",E=`${y}//${v}`,b=new a.URL(m.path,E);g.port!==80&&(b.port=String(g.port)),m.path=String(b);let w=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(f.username||f.password){let _=`${decodeURIComponent(f.username)}:${decodeURIComponent(f.password)}`;w["Proxy-Authorization"]=`Basic ${Buffer.from(_).toString("base64")}`}w["Proxy-Connection"]||(w["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let _ of Object.keys(w)){let O=w[_];O&&m.setHeader(_,O)}}async connect(m,g){m._header=null,m.path.includes("://")||this.setRequestProps(m,g);let f,y;h("Regenerating stored HTTP header string for request"),m._implicitHeader(),m.outputData&&m.outputData.length>0&&(h("Patching connection write() output buffer with updated header"),f=m.outputData[0].data,y=f.indexOf(`\r
65
- \r
66
- `)+4,m.outputData[0].data=m._header+f.substring(y),h("Output buffer: %o",m.outputData[0].data));let v;return this.proxy.protocol==="https:"?(h("Creating `tls.Socket`: %o",this.connectOpts),v=c.connect(this.connectOpts)):(h("Creating `net.Socket`: %o",this.connectOpts),v=l.connect(this.connectOpts)),await(0,s.once)(v,"connect"),v}};p.protocols=["http","https"],e.HttpProxyAgent=p;function d(m,...g){let f={},y;for(y in m)g.includes(y)||(f[y]=m[y]);return f}S(d,"omit")}),eL=J(e=>{"use strict";var t=e&&e.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseProxyResponse=void 0;var i=t(Pr()),u=(0,i.default)("https-proxy-agent:parse-proxy-response");function n(l){return new Promise((c,r)=>{let s=0,o=[];function a(){let g=l.read();g?m(g):l.once("readable",a)}S(a,"read");function h(){l.removeListener("end",p),l.removeListener("error",d),l.removeListener("readable",a)}S(h,"cleanup");function p(){h(),u("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}S(p,"onend");function d(g){h(),u("onerror %o",g),r(g)}S(d,"onerror");function m(g){o.push(g),s+=g.length;let f=Buffer.concat(o,s),y=f.indexOf(`\r
67
- \r
68
- `);if(y===-1){u("have not received end of HTTP headers yet..."),a();return}let v=f.slice(0,y).toString("ascii").split(`\r
69
- `),E=v.shift();if(!E)return l.destroy(),r(new Error("No header received from proxy CONNECT response"));let b=E.split(" "),w=+b[1],_=b.slice(2).join(" "),O={};for(let A of v){if(!A)continue;let I=A.indexOf(":");if(I===-1)return l.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${A}"`));let P=A.slice(0,I).toLowerCase(),L=A.slice(I+1).trimStart(),j=O[P];typeof j=="string"?O[P]=[j,L]:Array.isArray(j)?j.push(L):O[P]=L}u("got proxy server response: %o %o",E,O),h(),c({connect:{statusCode:w,statusText:_,headers:O},buffered:f})}S(m,"ondata"),l.on("error",d),l.on("end",p),a()})}S(n,"parseProxyResponse"),e.parseProxyResponse=n}),tL=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(y,v,E,b){b===void 0&&(b=E);var w=Object.getOwnPropertyDescriptor(v,E);(!w||("get"in w?!v.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:S(function(){return v[E]},"get")}),Object.defineProperty(y,b,w)}:function(y,v,E,b){b===void 0&&(b=E),y[b]=v[E]}),i=e&&e.__setModuleDefault||(Object.create?function(y,v){Object.defineProperty(y,"default",{enumerable:!0,value:v})}:function(y,v){y.default=v}),u=e&&e.__importStar||function(y){if(y&&y.__esModule)return y;var v={};if(y!=null)for(var E in y)E!=="default"&&Object.prototype.hasOwnProperty.call(y,E)&&t(v,y,E);return i(v,y),v},n=e&&e.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.HttpsProxyAgent=void 0;var l=u(require("net")),c=u(require("tls")),r=n(require("assert")),s=n(Pr()),o=nn(),a=require("url"),h=eL(),p=(0,s.default)("https-proxy-agent"),d=S(y=>y.servername===void 0&&y.host&&!l.isIP(y.host)?{...y,servername:y.host}:y,"setServernameFromNonIpHost"),m=class extends o.Agent{static{S(this,"HttpsProxyAgent")}constructor(y,v){super(v),this.options={path:void 0},this.proxy=typeof y=="string"?new a.URL(y):y,this.proxyHeaders=v?.headers??{},p("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let E=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),b=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...v?f(v,"headers"):null,host:E,port:b}}async connect(y,v){let{proxy:E}=this;if(!v.host)throw new TypeError('No "host" provided');let b;E.protocol==="https:"?(p("Creating `tls.Socket`: %o",this.connectOpts),b=c.connect(d(this.connectOpts))):(p("Creating `net.Socket`: %o",this.connectOpts),b=l.connect(this.connectOpts));let w=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},_=l.isIPv6(v.host)?`[${v.host}]`:v.host,O=`CONNECT ${_}:${v.port} HTTP/1.1\r
70
- `;if(E.username||E.password){let j=`${decodeURIComponent(E.username)}:${decodeURIComponent(E.password)}`;w["Proxy-Authorization"]=`Basic ${Buffer.from(j).toString("base64")}`}w.Host=`${_}:${v.port}`,w["Proxy-Connection"]||(w["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let j of Object.keys(w))O+=`${j}: ${w[j]}\r
71
- `;let A=(0,h.parseProxyResponse)(b);b.write(`${O}\r
72
- `);let{connect:I,buffered:P}=await A;if(y.emit("proxyConnect",I),this.emit("proxyConnect",I,y),I.statusCode===200)return y.once("socket",g),v.secureEndpoint?(p("Upgrading socket connection to TLS"),c.connect({...f(d(v),"host","path","port"),socket:b})):b;b.destroy();let L=new l.Socket({writable:!1});return L.readable=!0,y.once("socket",j=>{p("Replaying proxy buffer for failed request"),(0,r.default)(j.listenerCount("data")>0),j.push(P),j.push(null)}),L}};m.protocols=["http","https"],e.HttpsProxyAgent=m;function g(y){y.resume()}S(g,"resume");function f(y,...v){let E={},b;for(b in y)v.includes(b)||(E[b]=y[b]);return E}S(f,"omit")}),rL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=require("buffer"),i={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};e.ERRORS=i;function u(h){if(!t.Buffer.isEncoding(h))throw new Error(i.INVALID_ENCODING)}S(u,"checkEncoding"),e.checkEncoding=u;function n(h){return typeof h=="number"&&isFinite(h)&&o(h)}S(n,"isFiniteInteger"),e.isFiniteInteger=n;function l(h,p){if(typeof h=="number"){if(!n(h)||h<0)throw new Error(p?i.INVALID_OFFSET:i.INVALID_LENGTH)}else throw new Error(p?i.INVALID_OFFSET_NON_NUMBER:i.INVALID_LENGTH_NON_NUMBER)}S(l,"checkOffsetOrLengthValue");function c(h){l(h,!1)}S(c,"checkLengthValue"),e.checkLengthValue=c;function r(h){l(h,!0)}S(r,"checkOffsetValue"),e.checkOffsetValue=r;function s(h,p){if(h<0||h>p.length)throw new Error(i.INVALID_TARGET_OFFSET)}S(s,"checkTargetOffset"),e.checkTargetOffset=s;function o(h){return typeof h=="number"&&isFinite(h)&&Math.floor(h)===h}S(o,"isInteger");function a(h){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof t.Buffer.prototype[h]>"u")throw new Error(`Platform does not support Buffer.prototype.${h}.`)}S(a,"bigIntAndBufferInt64Check"),e.bigIntAndBufferInt64Check=a}),sL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=rL(),i=4096,u="utf8",n=class Zg{static{S(this,"SmartBuffer")}constructor(c){if(this.length=0,this._encoding=u,this._writeOffset=0,this._readOffset=0,Zg.isSmartBufferOptions(c))if(c.encoding&&(t.checkEncoding(c.encoding),this._encoding=c.encoding),c.size)if(t.isFiniteInteger(c.size)&&c.size>0)this._buff=Buffer.allocUnsafe(c.size);else throw new Error(t.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(c.buff)if(Buffer.isBuffer(c.buff))this._buff=c.buff,this.length=c.buff.length;else throw new Error(t.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(i);else{if(typeof c<"u")throw new Error(t.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(i)}}static fromSize(c,r){return new this({size:c,encoding:r})}static fromBuffer(c,r){return new this({buff:c,encoding:r})}static fromOptions(c){return new this(c)}static isSmartBufferOptions(c){let r=c;return r&&(r.encoding!==void 0||r.size!==void 0||r.buff!==void 0)}readInt8(c){return this._readNumberValue(Buffer.prototype.readInt8,1,c)}readInt16BE(c){return this._readNumberValue(Buffer.prototype.readInt16BE,2,c)}readInt16LE(c){return this._readNumberValue(Buffer.prototype.readInt16LE,2,c)}readInt32BE(c){return this._readNumberValue(Buffer.prototype.readInt32BE,4,c)}readInt32LE(c){return this._readNumberValue(Buffer.prototype.readInt32LE,4,c)}readBigInt64BE(c){return t.bigIntAndBufferInt64Check("readBigInt64BE"),this._readNumberValue(Buffer.prototype.readBigInt64BE,8,c)}readBigInt64LE(c){return t.bigIntAndBufferInt64Check("readBigInt64LE"),this._readNumberValue(Buffer.prototype.readBigInt64LE,8,c)}writeInt8(c,r){return this._writeNumberValue(Buffer.prototype.writeInt8,1,c,r),this}insertInt8(c,r){return this._insertNumberValue(Buffer.prototype.writeInt8,1,c,r)}writeInt16BE(c,r){return this._writeNumberValue(Buffer.prototype.writeInt16BE,2,c,r)}insertInt16BE(c,r){return this._insertNumberValue(Buffer.prototype.writeInt16BE,2,c,r)}writeInt16LE(c,r){return this._writeNumberValue(Buffer.prototype.writeInt16LE,2,c,r)}insertInt16LE(c,r){return this._insertNumberValue(Buffer.prototype.writeInt16LE,2,c,r)}writeInt32BE(c,r){return this._writeNumberValue(Buffer.prototype.writeInt32BE,4,c,r)}insertInt32BE(c,r){return this._insertNumberValue(Buffer.prototype.writeInt32BE,4,c,r)}writeInt32LE(c,r){return this._writeNumberValue(Buffer.prototype.writeInt32LE,4,c,r)}insertInt32LE(c,r){return this._insertNumberValue(Buffer.prototype.writeInt32LE,4,c,r)}writeBigInt64BE(c,r){return t.bigIntAndBufferInt64Check("writeBigInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigInt64BE,8,c,r)}insertBigInt64BE(c,r){return t.bigIntAndBufferInt64Check("writeBigInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigInt64BE,8,c,r)}writeBigInt64LE(c,r){return t.bigIntAndBufferInt64Check("writeBigInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigInt64LE,8,c,r)}insertBigInt64LE(c,r){return t.bigIntAndBufferInt64Check("writeBigInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigInt64LE,8,c,r)}readUInt8(c){return this._readNumberValue(Buffer.prototype.readUInt8,1,c)}readUInt16BE(c){return this._readNumberValue(Buffer.prototype.readUInt16BE,2,c)}readUInt16LE(c){return this._readNumberValue(Buffer.prototype.readUInt16LE,2,c)}readUInt32BE(c){return this._readNumberValue(Buffer.prototype.readUInt32BE,4,c)}readUInt32LE(c){return this._readNumberValue(Buffer.prototype.readUInt32LE,4,c)}readBigUInt64BE(c){return t.bigIntAndBufferInt64Check("readBigUInt64BE"),this._readNumberValue(Buffer.prototype.readBigUInt64BE,8,c)}readBigUInt64LE(c){return t.bigIntAndBufferInt64Check("readBigUInt64LE"),this._readNumberValue(Buffer.prototype.readBigUInt64LE,8,c)}writeUInt8(c,r){return this._writeNumberValue(Buffer.prototype.writeUInt8,1,c,r)}insertUInt8(c,r){return this._insertNumberValue(Buffer.prototype.writeUInt8,1,c,r)}writeUInt16BE(c,r){return this._writeNumberValue(Buffer.prototype.writeUInt16BE,2,c,r)}insertUInt16BE(c,r){return this._insertNumberValue(Buffer.prototype.writeUInt16BE,2,c,r)}writeUInt16LE(c,r){return this._writeNumberValue(Buffer.prototype.writeUInt16LE,2,c,r)}insertUInt16LE(c,r){return this._insertNumberValue(Buffer.prototype.writeUInt16LE,2,c,r)}writeUInt32BE(c,r){return this._writeNumberValue(Buffer.prototype.writeUInt32BE,4,c,r)}insertUInt32BE(c,r){return this._insertNumberValue(Buffer.prototype.writeUInt32BE,4,c,r)}writeUInt32LE(c,r){return this._writeNumberValue(Buffer.prototype.writeUInt32LE,4,c,r)}insertUInt32LE(c,r){return this._insertNumberValue(Buffer.prototype.writeUInt32LE,4,c,r)}writeBigUInt64BE(c,r){return t.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64BE,8,c,r)}insertBigUInt64BE(c,r){return t.bigIntAndBufferInt64Check("writeBigUInt64BE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64BE,8,c,r)}writeBigUInt64LE(c,r){return t.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._writeNumberValue(Buffer.prototype.writeBigUInt64LE,8,c,r)}insertBigUInt64LE(c,r){return t.bigIntAndBufferInt64Check("writeBigUInt64LE"),this._insertNumberValue(Buffer.prototype.writeBigUInt64LE,8,c,r)}readFloatBE(c){return this._readNumberValue(Buffer.prototype.readFloatBE,4,c)}readFloatLE(c){return this._readNumberValue(Buffer.prototype.readFloatLE,4,c)}writeFloatBE(c,r){return this._writeNumberValue(Buffer.prototype.writeFloatBE,4,c,r)}insertFloatBE(c,r){return this._insertNumberValue(Buffer.prototype.writeFloatBE,4,c,r)}writeFloatLE(c,r){return this._writeNumberValue(Buffer.prototype.writeFloatLE,4,c,r)}insertFloatLE(c,r){return this._insertNumberValue(Buffer.prototype.writeFloatLE,4,c,r)}readDoubleBE(c){return this._readNumberValue(Buffer.prototype.readDoubleBE,8,c)}readDoubleLE(c){return this._readNumberValue(Buffer.prototype.readDoubleLE,8,c)}writeDoubleBE(c,r){return this._writeNumberValue(Buffer.prototype.writeDoubleBE,8,c,r)}insertDoubleBE(c,r){return this._insertNumberValue(Buffer.prototype.writeDoubleBE,8,c,r)}writeDoubleLE(c,r){return this._writeNumberValue(Buffer.prototype.writeDoubleLE,8,c,r)}insertDoubleLE(c,r){return this._insertNumberValue(Buffer.prototype.writeDoubleLE,8,c,r)}readString(c,r){let s;typeof c=="number"?(t.checkLengthValue(c),s=Math.min(c,this.length-this._readOffset)):(r=c,s=this.length-this._readOffset),typeof r<"u"&&t.checkEncoding(r);let o=this._buff.slice(this._readOffset,this._readOffset+s).toString(r||this._encoding);return this._readOffset+=s,o}insertString(c,r,s){return t.checkOffsetValue(r),this._handleString(c,!0,r,s)}writeString(c,r,s){return this._handleString(c,!1,r,s)}readStringNT(c){typeof c<"u"&&t.checkEncoding(c);let r=this.length;for(let o=this._readOffset;o<this.length;o++)if(this._buff[o]===0){r=o;break}let s=this._buff.slice(this._readOffset,r);return this._readOffset=r+1,s.toString(c||this._encoding)}insertStringNT(c,r,s){return t.checkOffsetValue(r),this.insertString(c,r,s),this.insertUInt8(0,r+c.length),this}writeStringNT(c,r,s){return this.writeString(c,r,s),this.writeUInt8(0,typeof r=="number"?r+c.length:this.writeOffset),this}readBuffer(c){typeof c<"u"&&t.checkLengthValue(c);let r=typeof c=="number"?c:this.length,s=Math.min(this.length,this._readOffset+r),o=this._buff.slice(this._readOffset,s);return this._readOffset=s,o}insertBuffer(c,r){return t.checkOffsetValue(r),this._handleBuffer(c,!0,r)}writeBuffer(c,r){return this._handleBuffer(c,!1,r)}readBufferNT(){let c=this.length;for(let s=this._readOffset;s<this.length;s++)if(this._buff[s]===0){c=s;break}let r=this._buff.slice(this._readOffset,c);return this._readOffset=c+1,r}insertBufferNT(c,r){return t.checkOffsetValue(r),this.insertBuffer(c,r),this.insertUInt8(0,r+c.length),this}writeBufferNT(c,r){return typeof r<"u"&&t.checkOffsetValue(r),this.writeBuffer(c,r),this.writeUInt8(0,typeof r=="number"?r+c.length:this._writeOffset),this}clear(){return this._writeOffset=0,this._readOffset=0,this.length=0,this}remaining(){return this.length-this._readOffset}get readOffset(){return this._readOffset}set readOffset(c){t.checkOffsetValue(c),t.checkTargetOffset(c,this),this._readOffset=c}get writeOffset(){return this._writeOffset}set writeOffset(c){t.checkOffsetValue(c),t.checkTargetOffset(c,this),this._writeOffset=c}get encoding(){return this._encoding}set encoding(c){t.checkEncoding(c),this._encoding=c}get internalBuffer(){return this._buff}toBuffer(){return this._buff.slice(0,this.length)}toString(c){let r=typeof c=="string"?c:this._encoding;return t.checkEncoding(r),this._buff.toString(r,0,this.length)}destroy(){return this.clear(),this}_handleString(c,r,s,o){let a=this._writeOffset,h=this._encoding;typeof s=="number"?a=s:typeof s=="string"&&(t.checkEncoding(s),h=s),typeof o=="string"&&(t.checkEncoding(o),h=o);let p=Buffer.byteLength(c,h);return r?this.ensureInsertable(p,a):this._ensureWriteable(p,a),this._buff.write(c,a,p,h),r?this._writeOffset+=p:typeof s=="number"?this._writeOffset=Math.max(this._writeOffset,a+p):this._writeOffset+=p,this}_handleBuffer(c,r,s){let o=typeof s=="number"?s:this._writeOffset;return r?this.ensureInsertable(c.length,o):this._ensureWriteable(c.length,o),c.copy(this._buff,o),r?this._writeOffset+=c.length:typeof s=="number"?this._writeOffset=Math.max(this._writeOffset,o+c.length):this._writeOffset+=c.length,this}ensureReadable(c,r){let s=this._readOffset;if(typeof r<"u"&&(t.checkOffsetValue(r),s=r),s<0||s+c>this.length)throw new Error(t.ERRORS.INVALID_READ_BEYOND_BOUNDS)}ensureInsertable(c,r){t.checkOffsetValue(r),this._ensureCapacity(this.length+c),r<this.length&&this._buff.copy(this._buff,r+c,r,this._buff.length),r+c>this.length?this.length=r+c:this.length+=c}_ensureWriteable(c,r){let s=typeof r=="number"?r:this._writeOffset;this._ensureCapacity(s+c),s+c>this.length&&(this.length=s+c)}_ensureCapacity(c){let r=this._buff.length;if(c>r){let s=this._buff,o=r*3/2+1;o<c&&(o=c),this._buff=Buffer.allocUnsafe(o),s.copy(this._buff,0,0,r)}}_readNumberValue(c,r,s){this.ensureReadable(r,s);let o=c.call(this._buff,typeof s=="number"?s:this._readOffset);return typeof s>"u"&&(this._readOffset+=r),o}_insertNumberValue(c,r,s,o){return t.checkOffsetValue(o),this.ensureInsertable(r,o),c.call(this._buff,s,o),this._writeOffset+=r,this}_writeNumberValue(c,r,s,o){if(typeof o=="number"){if(o<0)throw new Error(t.ERRORS.INVALID_WRITE_BEYOND_BOUNDS);t.checkOffsetValue(o)}let a=typeof o=="number"?o:this._writeOffset;return this._ensureWriteable(r,a),c.call(this._buff,s,a),typeof o=="number"?this._writeOffset=Math.max(this._writeOffset,a+r):this._writeOffset+=r,this}};e.SmartBuffer=n}),Yg=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SOCKS5_NO_ACCEPTABLE_AUTH=e.SOCKS5_CUSTOM_AUTH_END=e.SOCKS5_CUSTOM_AUTH_START=e.SOCKS_INCOMING_PACKET_SIZES=e.SocksClientState=e.Socks5Response=e.Socks5HostType=e.Socks5Auth=e.Socks4Response=e.SocksCommand=e.ERRORS=e.DEFAULT_TIMEOUT=void 0;var t=3e4;e.DEFAULT_TIMEOUT=t;var i={InvalidSocksCommand:"An invalid SOCKS command was provided. Valid options are connect, bind, and associate.",InvalidSocksCommandForOperation:"An invalid SOCKS command was provided. Only a subset of commands are supported for this operation.",InvalidSocksCommandChain:"An invalid SOCKS command was provided. Chaining currently only supports the connect command.",InvalidSocksClientOptionsDestination:"An invalid destination host was provided.",InvalidSocksClientOptionsExistingSocket:"An invalid existing socket was provided. This should be an instance of stream.Duplex.",InvalidSocksClientOptionsProxy:"Invalid SOCKS proxy details were provided.",InvalidSocksClientOptionsTimeout:"An invalid timeout value was provided. Please enter a value above 0 (in ms).",InvalidSocksClientOptionsProxiesLength:"At least two socks proxies must be provided for chaining.",InvalidSocksClientOptionsCustomAuthRange:"Custom auth must be a value between 0x80 and 0xFE.",InvalidSocksClientOptionsCustomAuthOptions:"When a custom_auth_method is provided, custom_auth_request_handler, custom_auth_response_size, and custom_auth_response_handler must also be provided and valid.",NegotiationError:"Negotiation error",SocketClosed:"Socket closed",ProxyConnectionTimedOut:"Proxy connection timed out",InternalError:"SocksClient internal error (this should not happen)",InvalidSocks4HandshakeResponse:"Received invalid Socks4 handshake response",Socks4ProxyRejectedConnection:"Socks4 Proxy rejected connection",InvalidSocks4IncomingConnectionResponse:"Socks4 invalid incoming connection response",Socks4ProxyRejectedIncomingBoundConnection:"Socks4 Proxy rejected incoming bound connection",InvalidSocks5InitialHandshakeResponse:"Received invalid Socks5 initial handshake response",InvalidSocks5IntiailHandshakeSocksVersion:"Received invalid Socks5 initial handshake (invalid socks version)",InvalidSocks5InitialHandshakeNoAcceptedAuthType:"Received invalid Socks5 initial handshake (no accepted authentication type)",InvalidSocks5InitialHandshakeUnknownAuthType:"Received invalid Socks5 initial handshake (unknown authentication type)",Socks5AuthenticationFailed:"Socks5 Authentication failed",InvalidSocks5FinalHandshake:"Received invalid Socks5 final handshake response",InvalidSocks5FinalHandshakeRejected:"Socks5 proxy rejected connection",InvalidSocks5IncomingConnectionResponse:"Received invalid Socks5 incoming connection response",Socks5ProxyRejectedIncomingBoundConnection:"Socks5 Proxy rejected incoming bound connection"};e.ERRORS=i;var u={Socks5InitialHandshakeResponse:2,Socks5UserPassAuthenticationResponse:2,Socks5ResponseHeader:5,Socks5ResponseIPv4:10,Socks5ResponseIPv6:22,Socks5ResponseHostname:S(d=>d+7,"Socks5ResponseHostname"),Socks4Response:8};e.SOCKS_INCOMING_PACKET_SIZES=u;var n;(function(d){d[d.connect=1]="connect",d[d.bind=2]="bind",d[d.associate=3]="associate"})(n||(e.SocksCommand=n={}));var l;(function(d){d[d.Granted=90]="Granted",d[d.Failed=91]="Failed",d[d.Rejected=92]="Rejected",d[d.RejectedIdent=93]="RejectedIdent"})(l||(e.Socks4Response=l={}));var c;(function(d){d[d.NoAuth=0]="NoAuth",d[d.GSSApi=1]="GSSApi",d[d.UserPass=2]="UserPass"})(c||(e.Socks5Auth=c={}));var r=128;e.SOCKS5_CUSTOM_AUTH_START=r;var s=254;e.SOCKS5_CUSTOM_AUTH_END=s;var o=255;e.SOCKS5_NO_ACCEPTABLE_AUTH=o;var a;(function(d){d[d.Granted=0]="Granted",d[d.Failure=1]="Failure",d[d.NotAllowed=2]="NotAllowed",d[d.NetworkUnreachable=3]="NetworkUnreachable",d[d.HostUnreachable=4]="HostUnreachable",d[d.ConnectionRefused=5]="ConnectionRefused",d[d.TTLExpired=6]="TTLExpired",d[d.CommandNotSupported=7]="CommandNotSupported",d[d.AddressNotSupported=8]="AddressNotSupported"})(a||(e.Socks5Response=a={}));var h;(function(d){d[d.IPv4=1]="IPv4",d[d.Hostname=3]="Hostname",d[d.IPv6=4]="IPv6"})(h||(e.Socks5HostType=h={}));var p;(function(d){d[d.Created=0]="Created",d[d.Connecting=1]="Connecting",d[d.Connected=2]="Connected",d[d.SentInitialHandshake=3]="SentInitialHandshake",d[d.ReceivedInitialHandshakeResponse=4]="ReceivedInitialHandshakeResponse",d[d.SentAuthentication=5]="SentAuthentication",d[d.ReceivedAuthenticationResponse=6]="ReceivedAuthenticationResponse",d[d.SentFinalHandshake=7]="SentFinalHandshake",d[d.ReceivedFinalResponse=8]="ReceivedFinalResponse",d[d.BoundWaitingForConnection=9]="BoundWaitingForConnection",d[d.Established=10]="Established",d[d.Disconnected=11]="Disconnected",d[d.Error=99]="Error"})(p||(e.SocksClientState=p={}))}),Qg=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shuffleArray=e.SocksClientError=void 0;var t=class extends Error{static{S(this,"SocksClientError")}constructor(u,n){super(u),this.options=n}};e.SocksClientError=t;function i(u){for(let n=u.length-1;n>0;n--){let l=Math.floor(Math.random()*(n+1));[u[n],u[l]]=[u[l],u[n]]}}S(i,"shuffleArray"),e.shuffleArray=i}),wl=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isInSubnet=t,e.isCorrect=i,e.numberToPaddedHex=u,e.stringToPaddedHex=n,e.testBit=l;function t(c){return this.subnetMask<c.subnetMask?!1:this.mask(c.subnetMask)===c.mask()}S(t,"isInSubnet");function i(c){return function(){return this.addressMinusSuffix!==this.correctForm()?!1:this.subnetMask===c&&!this.parsedSubnet?!0:this.parsedSubnet===String(this.subnetMask)}}S(i,"isCorrect");function u(c){return c.toString(16).padStart(2,"0")}S(u,"numberToPaddedHex");function n(c){return u(parseInt(c,10))}S(n,"stringToPaddedHex");function l(c,r){let{length:s}=c;if(r>s)return!1;let o=s-r;return c.substring(o,o+1)==="1"}S(l,"testBit")}),em=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RE_SUBNET_STRING=e.RE_ADDRESS=e.GROUPS=e.BITS=void 0,e.BITS=32,e.GROUPS=4,e.RE_ADDRESS=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/g,e.RE_SUBNET_STRING=/\/\d{1,2}$/}),cc=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AddressError=void 0;var t=class extends Error{static{S(this,"AddressError")}constructor(i,u){super(i),this.name="AddressError",this.parseMessage=u}};e.AddressError=t}),tm=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(s,o,a,h){h===void 0&&(h=a);var p=Object.getOwnPropertyDescriptor(o,a);(!p||("get"in p?!o.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:S(function(){return o[a]},"get")}),Object.defineProperty(s,h,p)}:function(s,o,a,h){h===void 0&&(h=a),s[h]=o[a]}),i=e&&e.__setModuleDefault||(Object.create?function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}:function(s,o){s.default=o}),u=e&&e.__importStar||function(s){if(s&&s.__esModule)return s;var o={};if(s!=null)for(var a in s)a!=="default"&&Object.prototype.hasOwnProperty.call(s,a)&&t(o,s,a);return i(o,s),o};Object.defineProperty(e,"__esModule",{value:!0}),e.Address4=void 0;var n=u(wl()),l=u(em()),c=cc(),r=class mt{static{S(this,"Address4")}constructor(o){this.groups=l.GROUPS,this.parsedAddress=[],this.parsedSubnet="",this.subnet="/32",this.subnetMask=32,this.v4=!0,this.isCorrect=n.isCorrect(l.BITS),this.isInSubnet=n.isInSubnet,this.address=o;let a=l.RE_SUBNET_STRING.exec(o);if(a){if(this.parsedSubnet=a[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,this.subnetMask<0||this.subnetMask>l.BITS)throw new c.AddressError("Invalid subnet mask.");o=o.replace(l.RE_SUBNET_STRING,"")}this.addressMinusSuffix=o,this.parsedAddress=this.parse(o)}static isValid(o){try{return new mt(o),!0}catch{return!1}}parse(o){let a=o.split(".");if(!o.match(l.RE_ADDRESS))throw new c.AddressError("Invalid IPv4 address.");return a}correctForm(){return this.parsedAddress.map(o=>parseInt(o,10)).join(".")}static fromHex(o){let a=o.replace(/:/g,"").padStart(8,"0"),h=[],p;for(p=0;p<8;p+=2){let d=a.slice(p,p+2);h.push(parseInt(d,16))}return new mt(h.join("."))}static fromInteger(o){return mt.fromHex(o.toString(16))}static fromArpa(o){let a=o.replace(/(\.in-addr\.arpa)?\.$/,"").split(".").reverse().join(".");return new mt(a)}toHex(){return this.parsedAddress.map(o=>n.stringToPaddedHex(o)).join(":")}toArray(){return this.parsedAddress.map(o=>parseInt(o,10))}toGroup6(){let o=[],a;for(a=0;a<l.GROUPS;a+=2)o.push(`${n.stringToPaddedHex(this.parsedAddress[a])}${n.stringToPaddedHex(this.parsedAddress[a+1])}`);return o.join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(o=>n.stringToPaddedHex(o)).join("")}`)}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat(l.BITS-this.subnetMask)}`)}startAddress(){return mt.fromBigInt(this._startAddress())}startAddressExclusive(){let o=BigInt("1");return mt.fromBigInt(this._startAddress()+o)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat(l.BITS-this.subnetMask)}`)}endAddress(){return mt.fromBigInt(this._endAddress())}endAddressExclusive(){let o=BigInt("1");return mt.fromBigInt(this._endAddress()-o)}static fromBigInt(o){return mt.fromHex(o.toString(16))}mask(o){return o===void 0&&(o=this.subnetMask),this.getBitsBase2(0,o)}getBitsBase2(o,a){return this.binaryZeroPad().slice(o,a)}reverseForm(o){o||(o={});let a=this.correctForm().split(".").reverse().join(".");return o.omitSuffix?a:`${a}.in-addr.arpa.`}isMulticast(){return this.isInSubnet(new mt("224.0.0.0/4"))}binaryZeroPad(){return this.bigInt().toString(2).padStart(l.BITS,"0")}groupForV6(){let o=this.parsedAddress;return this.address.replace(l.RE_ADDRESS,`<span class="hover-group group-v4 group-6">${o.slice(0,2).join(".")}</span>.<span class="hover-group group-v4 group-7">${o.slice(2,4).join(".")}</span>`)}};e.Address4=r}),rm=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RE_URL_WITH_PORT=e.RE_URL=e.RE_ZONE_STRING=e.RE_SUBNET_STRING=e.RE_BAD_ADDRESS=e.RE_BAD_CHARACTERS=e.TYPES=e.SCOPES=e.GROUPS=e.BITS=void 0,e.BITS=128,e.GROUPS=8,e.SCOPES={0:"Reserved",1:"Interface local",2:"Link local",4:"Admin local",5:"Site local",8:"Organization local",14:"Global",15:"Reserved"},e.TYPES={"ff01::1/128":"Multicast (All nodes on this interface)","ff01::2/128":"Multicast (All routers on this interface)","ff02::1/128":"Multicast (All nodes on this link)","ff02::2/128":"Multicast (All routers on this link)","ff05::2/128":"Multicast (All routers in this site)","ff02::5/128":"Multicast (OSPFv3 AllSPF routers)","ff02::6/128":"Multicast (OSPFv3 AllDR routers)","ff02::9/128":"Multicast (RIP routers)","ff02::a/128":"Multicast (EIGRP routers)","ff02::d/128":"Multicast (PIM routers)","ff02::16/128":"Multicast (MLDv2 reports)","ff01::fb/128":"Multicast (mDNSv6)","ff02::fb/128":"Multicast (mDNSv6)","ff05::fb/128":"Multicast (mDNSv6)","ff02::1:2/128":"Multicast (All DHCP servers and relay agents on this link)","ff05::1:2/128":"Multicast (All DHCP servers and relay agents in this site)","ff02::1:3/128":"Multicast (All DHCP servers on this link)","ff05::1:3/128":"Multicast (All DHCP servers in this site)","::/128":"Unspecified","::1/128":"Loopback","ff00::/8":"Multicast","fe80::/10":"Link-local unicast"},e.RE_BAD_CHARACTERS=/([^0-9a-f:/%])/gi,e.RE_BAD_ADDRESS=/([0-9a-f]{5,}|:{3,}|[^:]:$|^:[^:]|\/$)/gi,e.RE_SUBNET_STRING=/\/\d{1,3}(?=%|$)/,e.RE_ZONE_STRING=/%.*$/,e.RE_URL=/^\[{0,1}([0-9a-f:]+)\]{0,1}/,e.RE_URL_WITH_PORT=/\[([0-9a-f:]+)\]:([0-9]{1,5})/}),sm=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.spanAllZeroes=t,e.spanAll=i,e.spanLeadingZeroes=n,e.simpleGroup=l;function t(c){return c.replace(/(0+)/g,'<span class="zero">$1</span>')}S(t,"spanAllZeroes");function i(c,r=0){return c.split("").map((s,o)=>`<span class="digit value-${s} position-${o+r}">${t(s)}</span>`).join("")}S(i,"spanAll");function u(c){return c.replace(/^(0+)/,'<span class="zero">$1</span>')}S(u,"spanLeadingZeroesSimple");function n(c){return c.split(":").map(r=>u(r)).join(":")}S(n,"spanLeadingZeroes");function l(c,r=0){return c.split(":").map((s,o)=>/group-v4/.test(s)?s:`<span class="hover-group group-${o+r}">${u(s)}</span>`)}S(l,"simpleGroup")}),iL=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(o,a,h,p){p===void 0&&(p=h);var d=Object.getOwnPropertyDescriptor(a,h);(!d||("get"in d?!a.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:S(function(){return a[h]},"get")}),Object.defineProperty(o,p,d)}:function(o,a,h,p){p===void 0&&(p=h),o[p]=a[h]}),i=e&&e.__setModuleDefault||(Object.create?function(o,a){Object.defineProperty(o,"default",{enumerable:!0,value:a})}:function(o,a){o.default=a}),u=e&&e.__importStar||function(o){if(o&&o.__esModule)return o;var a={};if(o!=null)for(var h in o)h!=="default"&&Object.prototype.hasOwnProperty.call(o,h)&&t(a,o,h);return i(a,o),a};Object.defineProperty(e,"__esModule",{value:!0}),e.ADDRESS_BOUNDARY=void 0,e.groupPossibilities=l,e.padGroup=c,e.simpleRegularExpression=r,e.possibleElisions=s;var n=u(rm());function l(o){return`(${o.join("|")})`}S(l,"groupPossibilities");function c(o){return o.length<4?`0{0,${4-o.length}}${o}`:o}S(c,"padGroup"),e.ADDRESS_BOUNDARY="[^A-Fa-f0-9:]";function r(o){let a=[];o.forEach((p,d)=>{parseInt(p,16)===0&&a.push(d)});let h=a.map(p=>o.map((d,m)=>{if(m===p){let g=m===0||m===n.GROUPS-1?":":"";return l([c(d),g])}return c(d)}).join(":"));return h.push(o.map(c).join(":")),l(h)}S(r,"simpleRegularExpression");function s(o,a,h){let p=a?"":":",d=h?"":":",m=[];!a&&!h&&m.push("::"),a&&h&&m.push(""),(h&&!a||!h&&a)&&m.push(":"),m.push(`${p}(:0{1,4}){1,${o-1}}`),m.push(`(0{1,4}:){1,${o-1}}${d}`),m.push(`(0{1,4}:){${o-1}}0{1,4}`);for(let g=1;g<o-1;g++)for(let f=1;f<o-g;f++)m.push(`(0{1,4}:){${f}}:(0{1,4}:){${o-f-g-1}}0{1,4}`);return l(m)}S(s,"possibleElisions")}),nL=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(E,b,w,_){_===void 0&&(_=w);var O=Object.getOwnPropertyDescriptor(b,w);(!O||("get"in O?!b.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:S(function(){return b[w]},"get")}),Object.defineProperty(E,_,O)}:function(E,b,w,_){_===void 0&&(_=w),E[_]=b[w]}),i=e&&e.__setModuleDefault||(Object.create?function(E,b){Object.defineProperty(E,"default",{enumerable:!0,value:b})}:function(E,b){E.default=b}),u=e&&e.__importStar||function(E){if(E&&E.__esModule)return E;var b={};if(E!=null)for(var w in E)w!=="default"&&Object.prototype.hasOwnProperty.call(E,w)&&t(b,E,w);return i(b,E),b};Object.defineProperty(e,"__esModule",{value:!0}),e.Address6=void 0;var n=u(wl()),l=u(em()),c=u(rm()),r=u(sm()),s=tm(),o=iL(),a=cc(),h=wl();function p(E){if(!E)throw new Error("Assertion failed.")}S(p,"assert");function d(E){let b=/(\d+)(\d{3})/;for(;b.test(E);)E=E.replace(b,"$1,$2");return E}S(d,"addCommas");function m(E){return E=E.replace(/^(0{1,})([1-9]+)$/,'<span class="parse-error">$1</span>$2'),E=E.replace(/^(0{1,})(0)$/,'<span class="parse-error">$1</span>$2'),E}S(m,"spanLeadingZeroes4");function g(E,b){let w=[],_=[],O;for(O=0;O<E.length;O++)O<b[0]?w.push(E[O]):O>b[1]&&_.push(E[O]);return w.concat(["compact"]).concat(_)}S(g,"compact");function f(E){return parseInt(E,16).toString(16).padStart(4,"0")}S(f,"paddedHex");function y(E){return E&255}S(y,"unsignByte");var v=class Ue{static{S(this,"Address6")}constructor(b,w){this.addressMinusSuffix="",this.parsedSubnet="",this.subnet="/128",this.subnetMask=128,this.v4=!1,this.zone="",this.isInSubnet=n.isInSubnet,this.isCorrect=n.isCorrect(c.BITS),w===void 0?this.groups=c.GROUPS:this.groups=w,this.address=b;let _=c.RE_SUBNET_STRING.exec(b);if(_){if(this.parsedSubnet=_[0].replace("/",""),this.subnetMask=parseInt(this.parsedSubnet,10),this.subnet=`/${this.subnetMask}`,Number.isNaN(this.subnetMask)||this.subnetMask<0||this.subnetMask>c.BITS)throw new a.AddressError("Invalid subnet mask.");b=b.replace(c.RE_SUBNET_STRING,"")}else if(/\//.test(b))throw new a.AddressError("Invalid subnet mask.");let O=c.RE_ZONE_STRING.exec(b);O&&(this.zone=O[0],b=b.replace(c.RE_ZONE_STRING,"")),this.addressMinusSuffix=b,this.parsedAddress=this.parse(this.addressMinusSuffix)}static isValid(b){try{return new Ue(b),!0}catch{return!1}}static fromBigInt(b){let w=b.toString(16).padStart(32,"0"),_=[],O;for(O=0;O<c.GROUPS;O++)_.push(w.slice(O*4,(O+1)*4));return new Ue(_.join(":"))}static fromURL(b){let w,_=null,O;if(b.indexOf("[")!==-1&&b.indexOf("]:")!==-1){if(O=c.RE_URL_WITH_PORT.exec(b),O===null)return{error:"failed to parse address with port",address:null,port:null};w=O[1],_=O[2]}else if(b.indexOf("/")!==-1){if(b=b.replace(/^[a-z0-9]+:\/\//,""),O=c.RE_URL.exec(b),O===null)return{error:"failed to parse address from URL",address:null,port:null};w=O[1]}else w=b;return _?(_=parseInt(_,10),(_<0||_>65536)&&(_=null)):_=null,{address:new Ue(w),port:_}}static fromAddress4(b){let w=new s.Address4(b),_=c.BITS-(l.BITS-w.subnetMask);return new Ue(`::ffff:${w.correctForm()}/${_}`)}static fromArpa(b){let w=b.replace(/(\.ip6\.arpa)?\.$/,""),_=7;if(w.length!==63)throw new a.AddressError("Invalid 'ip6.arpa' form.");let O=w.split(".").reverse();for(let A=_;A>0;A--){let I=A*4;O.splice(I,0,":")}return w=O.join(""),new Ue(w)}microsoftTranscription(){return`${this.correctForm().replace(/:/g,"-")}.ipv6-literal.net`}mask(b=this.subnetMask){return this.getBitsBase2(0,b)}possibleSubnets(b=128){let w=c.BITS-this.subnetMask,_=Math.abs(b-c.BITS),O=w-_;return O<0?"0":d((BigInt("2")**BigInt(O)).toString(10))}_startAddress(){return BigInt(`0b${this.mask()+"0".repeat(c.BITS-this.subnetMask)}`)}startAddress(){return Ue.fromBigInt(this._startAddress())}startAddressExclusive(){let b=BigInt("1");return Ue.fromBigInt(this._startAddress()+b)}_endAddress(){return BigInt(`0b${this.mask()+"1".repeat(c.BITS-this.subnetMask)}`)}endAddress(){return Ue.fromBigInt(this._endAddress())}endAddressExclusive(){let b=BigInt("1");return Ue.fromBigInt(this._endAddress()-b)}getScope(){let b=c.SCOPES[parseInt(this.getBits(12,16).toString(10),10)];return this.getType()==="Global unicast"&&b!=="Link local"&&(b="Global"),b||"Unknown"}getType(){for(let b of Object.keys(c.TYPES))if(this.isInSubnet(new Ue(b)))return c.TYPES[b];return"Global unicast"}getBits(b,w){return BigInt(`0b${this.getBitsBase2(b,w)}`)}getBitsBase2(b,w){return this.binaryZeroPad().slice(b,w)}getBitsBase16(b,w){let _=w-b;if(_%4!==0)throw new Error("Length of bits to retrieve must be divisible by four");return this.getBits(b,w).toString(16).padStart(_/4,"0")}getBitsPastSubnet(){return this.getBitsBase2(this.subnetMask,c.BITS)}reverseForm(b){b||(b={});let w=Math.floor(this.subnetMask/4),_=this.canonicalForm().replace(/:/g,"").split("").slice(0,w).reverse().join(".");return w>0?b.omitSuffix?_:`${_}.ip6.arpa.`:b.omitSuffix?"":"ip6.arpa."}correctForm(){let b,w=[],_=0,O=[];for(b=0;b<this.parsedAddress.length;b++){let P=parseInt(this.parsedAddress[b],16);P===0&&_++,P!==0&&_>0&&(_>1&&O.push([b-_,b-1]),_=0)}_>1&&O.push([this.parsedAddress.length-_,this.parsedAddress.length-1]);let A=O.map(P=>P[1]-P[0]+1);if(O.length>0){let P=A.indexOf(Math.max(...A));w=g(this.parsedAddress,O[P])}else w=this.parsedAddress;for(b=0;b<w.length;b++)w[b]!=="compact"&&(w[b]=parseInt(w[b],16).toString(16));let I=w.join(":");return I=I.replace(/^compact$/,"::"),I=I.replace(/(^compact)|(compact$)/,":"),I=I.replace(/compact/,""),I}binaryZeroPad(){return this.bigInt().toString(2).padStart(c.BITS,"0")}parse4in6(b){let w=b.split(":"),_=w.slice(-1)[0].match(l.RE_ADDRESS);if(_){this.parsedAddress4=_[0],this.address4=new s.Address4(this.parsedAddress4);for(let O=0;O<this.address4.groups;O++)if(/^0[0-9]+/.test(this.address4.parsedAddress[O]))throw new a.AddressError("IPv4 addresses can't have leading zeroes.",b.replace(l.RE_ADDRESS,this.address4.parsedAddress.map(m).join(".")));this.v4=!0,w[w.length-1]=this.address4.toGroup6(),b=w.join(":")}return b}parse(b){b=this.parse4in6(b);let w=b.match(c.RE_BAD_CHARACTERS);if(w)throw new a.AddressError(`Bad character${w.length>1?"s":""} detected in address: ${w.join("")}`,b.replace(c.RE_BAD_CHARACTERS,'<span class="parse-error">$1</span>'));let _=b.match(c.RE_BAD_ADDRESS);if(_)throw new a.AddressError(`Address failed regex: ${_.join("")}`,b.replace(c.RE_BAD_ADDRESS,'<span class="parse-error">$1</span>'));let O=[],A=b.split("::");if(A.length===2){let I=A[0].split(":"),P=A[1].split(":");I.length===1&&I[0]===""&&(I=[]),P.length===1&&P[0]===""&&(P=[]);let L=this.groups-(I.length+P.length);if(!L)throw new a.AddressError("Error parsing groups");this.elidedGroups=L,this.elisionBegin=I.length,this.elisionEnd=I.length+this.elidedGroups,O=O.concat(I);for(let j=0;j<L;j++)O.push("0");O=O.concat(P)}else if(A.length===1)O=b.split(":"),this.elidedGroups=0;else throw new a.AddressError("Too many :: groups found");if(O=O.map(I=>parseInt(I,16).toString(16)),O.length!==this.groups)throw new a.AddressError("Incorrect number of groups found");return O}canonicalForm(){return this.parsedAddress.map(f).join(":")}decimal(){return this.parsedAddress.map(b=>parseInt(b,16).toString(10).padStart(5,"0")).join(":")}bigInt(){return BigInt(`0x${this.parsedAddress.map(f).join("")}`)}to4(){let b=this.binaryZeroPad().split("");return s.Address4.fromHex(BigInt(`0b${b.slice(96,128).join("")}`).toString(16))}to4in6(){let b=this.to4(),w=new Ue(this.parsedAddress.slice(0,6).join(":"),6).correctForm(),_="";return/:$/.test(w)||(_=":"),w+_+b.address}inspectTeredo(){let b=this.getBitsBase16(0,32),w=(this.getBits(80,96)^BigInt("0xffff")).toString(),_=s.Address4.fromHex(this.getBitsBase16(32,64)),O=this.getBits(96,128),A=s.Address4.fromHex((O^BigInt("0xffffffff")).toString(16)),I=this.getBitsBase2(64,80),P=(0,h.testBit)(I,15),L=(0,h.testBit)(I,14),j=(0,h.testBit)(I,8),N=(0,h.testBit)(I,9),M=BigInt(`0b${I.slice(2,6)+I.slice(8,16)}`).toString(10);return{prefix:`${b.slice(0,4)}:${b.slice(4,8)}`,server4:_.address,client4:A.address,flags:I,coneNat:P,microsoft:{reserved:L,universalLocal:N,groupIndividual:j,nonce:M},udpPort:w}}inspect6to4(){let b=this.getBitsBase16(0,16),w=s.Address4.fromHex(this.getBitsBase16(16,48));return{prefix:b.slice(0,4),gateway:w.address}}to6to4(){if(!this.is4())return null;let b=["2002",this.getBitsBase16(96,112),this.getBitsBase16(112,128),"","/16"].join(":");return new Ue(b)}toByteArray(){let b=this.bigInt().toString(16),w=`${"0".repeat(b.length%2)}${b}`,_=[];for(let O=0,A=w.length;O<A;O+=2)_.push(parseInt(w.substring(O,O+2),16));return _}toUnsignedByteArray(){return this.toByteArray().map(y)}static fromByteArray(b){return this.fromUnsignedByteArray(b.map(y))}static fromUnsignedByteArray(b){let w=BigInt("256"),_=BigInt("0"),O=BigInt("1");for(let A=b.length-1;A>=0;A--)_+=O*BigInt(b[A].toString(10)),O*=w;return Ue.fromBigInt(_)}isCanonical(){return this.addressMinusSuffix===this.canonicalForm()}isLinkLocal(){return this.getBitsBase2(0,64)==="1111111010000000000000000000000000000000000000000000000000000000"}isMulticast(){return this.getType()==="Multicast"}is4(){return this.v4}isTeredo(){return this.isInSubnet(new Ue("2001::/32"))}is6to4(){return this.isInSubnet(new Ue("2002::/16"))}isLoopback(){return this.getType()==="Loopback"}href(b){return b===void 0?b="":b=`:${b}`,`http://[${this.correctForm()}]${b}/`}link(b){b||(b={}),b.className===void 0&&(b.className=""),b.prefix===void 0&&(b.prefix="/#address="),b.v4===void 0&&(b.v4=!1);let w=this.correctForm;b.v4&&(w=this.to4in6);let _=w.call(this);return b.className?`<a href="${b.prefix}${_}" class="${b.className}">${_}</a>`:`<a href="${b.prefix}${_}">${_}</a>`}group(){if(this.elidedGroups===0)return r.simpleGroup(this.address).join(":");p(typeof this.elidedGroups=="number"),p(typeof this.elisionBegin=="number");let b=[],[w,_]=this.address.split("::");w.length?b.push(...r.simpleGroup(w)):b.push("");let O=["hover-group"];for(let A=this.elisionBegin;A<this.elisionBegin+this.elidedGroups;A++)O.push(`group-${A}`);return b.push(`<span class="${O.join(" ")}"></span>`),_.length?b.push(...r.simpleGroup(_,this.elisionEnd)):b.push(""),this.is4()&&(p(this.address4 instanceof s.Address4),b.pop(),b.push(this.address4.groupForV6())),b.join(":")}regularExpressionString(b=!1){let w=[],_=new Ue(this.correctForm());if(_.elidedGroups===0)w.push((0,o.simpleRegularExpression)(_.parsedAddress));else if(_.elidedGroups===c.GROUPS)w.push((0,o.possibleElisions)(c.GROUPS));else{let O=_.address.split("::");O[0].length&&w.push((0,o.simpleRegularExpression)(O[0].split(":"))),p(typeof _.elidedGroups=="number"),w.push((0,o.possibleElisions)(_.elidedGroups,O[0].length!==0,O[1].length!==0)),O[1].length&&w.push((0,o.simpleRegularExpression)(O[1].split(":"))),w=[w.join(":")]}return b||(w=["(?=^|",o.ADDRESS_BOUNDARY,"|[^\\w\\:])(",...w,")(?=[^\\w\\:]|",o.ADDRESS_BOUNDARY,"|$)"]),w.join("")}regularExpression(b=!1){return new RegExp(this.regularExpressionString(b),"i")}};e.Address6=v}),im=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(s,o,a,h){h===void 0&&(h=a);var p=Object.getOwnPropertyDescriptor(o,a);(!p||("get"in p?!o.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:S(function(){return o[a]},"get")}),Object.defineProperty(s,h,p)}:function(s,o,a,h){h===void 0&&(h=a),s[h]=o[a]}),i=e&&e.__setModuleDefault||(Object.create?function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}:function(s,o){s.default=o}),u=e&&e.__importStar||function(s){if(s&&s.__esModule)return s;var o={};if(s!=null)for(var a in s)a!=="default"&&Object.prototype.hasOwnProperty.call(s,a)&&t(o,s,a);return i(o,s),o};Object.defineProperty(e,"__esModule",{value:!0}),e.v6=e.AddressError=e.Address6=e.Address4=void 0;var n=tm();Object.defineProperty(e,"Address4",{enumerable:!0,get:S(function(){return n.Address4},"get")});var l=nL();Object.defineProperty(e,"Address6",{enumerable:!0,get:S(function(){return l.Address6},"get")});var c=cc();Object.defineProperty(e,"AddressError",{enumerable:!0,get:S(function(){return c.AddressError},"get")});var r=u(sm());e.v6={helpers:r}}),oL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ipToBuffer=e.int32ToIpv4=e.ipv4ToInt32=e.validateSocksClientChainOptions=e.validateSocksClientOptions=void 0;var t=Qg(),i=Yg(),u=require("stream"),n=im(),l=require("net");function c(g,f=["connect","bind","associate"]){if(!i.SocksCommand[g.command])throw new t.SocksClientError(i.ERRORS.InvalidSocksCommand,g);if(f.indexOf(g.command)===-1)throw new t.SocksClientError(i.ERRORS.InvalidSocksCommandForOperation,g);if(!o(g.destination))throw new t.SocksClientError(i.ERRORS.InvalidSocksClientOptionsDestination,g);if(!a(g.proxy))throw new t.SocksClientError(i.ERRORS.InvalidSocksClientOptionsProxy,g);if(s(g.proxy,g),g.timeout&&!h(g.timeout))throw new t.SocksClientError(i.ERRORS.InvalidSocksClientOptionsTimeout,g);if(g.existing_socket&&!(g.existing_socket instanceof u.Duplex))throw new t.SocksClientError(i.ERRORS.InvalidSocksClientOptionsExistingSocket,g)}S(c,"validateSocksClientOptions"),e.validateSocksClientOptions=c;function r(g){if(g.command!=="connect")throw new t.SocksClientError(i.ERRORS.InvalidSocksCommandChain,g);if(!o(g.destination))throw new t.SocksClientError(i.ERRORS.InvalidSocksClientOptionsDestination,g);if(!(g.proxies&&Array.isArray(g.proxies)&&g.proxies.length>=2))throw new t.SocksClientError(i.ERRORS.InvalidSocksClientOptionsProxiesLength,g);if(g.proxies.forEach(f=>{if(!a(f))throw new t.SocksClientError(i.ERRORS.InvalidSocksClientOptionsProxy,g);s(f,g)}),g.timeout&&!h(g.timeout))throw new t.SocksClientError(i.ERRORS.InvalidSocksClientOptionsTimeout,g)}S(r,"validateSocksClientChainOptions"),e.validateSocksClientChainOptions=r;function s(g,f){if(g.custom_auth_method!==void 0){if(g.custom_auth_method<i.SOCKS5_CUSTOM_AUTH_START||g.custom_auth_method>i.SOCKS5_CUSTOM_AUTH_END)throw new t.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthRange,f);if(g.custom_auth_request_handler===void 0||typeof g.custom_auth_request_handler!="function")throw new t.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,f);if(g.custom_auth_response_size===void 0)throw new t.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,f);if(g.custom_auth_response_handler===void 0||typeof g.custom_auth_response_handler!="function")throw new t.SocksClientError(i.ERRORS.InvalidSocksClientOptionsCustomAuthOptions,f)}}S(s,"validateCustomProxyAuth");function o(g){return g&&typeof g.host=="string"&&Buffer.byteLength(g.host)<256&&typeof g.port=="number"&&g.port>=0&&g.port<=65535}S(o,"isValidSocksRemoteHost");function a(g){return g&&(typeof g.host=="string"||typeof g.ipaddress=="string")&&typeof g.port=="number"&&g.port>=0&&g.port<=65535&&(g.type===4||g.type===5)}S(a,"isValidSocksProxy");function h(g){return typeof g=="number"&&g>0}S(h,"isValidTimeoutValue");function p(g){return new n.Address4(g).toArray().reduce((f,y)=>(f<<8)+y,0)>>>0}S(p,"ipv4ToInt32"),e.ipv4ToInt32=p;function d(g){let f=g>>>24&255,y=g>>>16&255,v=g>>>8&255,E=g&255;return[f,y,v,E].join(".")}S(d,"int32ToIpv4"),e.int32ToIpv4=d;function m(g){if(l.isIPv4(g)){let f=new n.Address4(g);return Buffer.from(f.toArray())}else if(l.isIPv6(g)){let f=new n.Address6(g);return Buffer.from(f.canonicalForm().split(":").map(y=>y.padStart(4,"0")).join(""),"hex")}else throw new Error("Invalid IP address format")}S(m,"ipToBuffer"),e.ipToBuffer=m}),aL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReceiveBuffer=void 0;var t=class{static{S(this,"ReceiveBuffer")}constructor(i=4096){this.buffer=Buffer.allocUnsafe(i),this.offset=0,this.originalSize=i}get length(){return this.offset}append(i){if(!Buffer.isBuffer(i))throw new Error("Attempted to append a non-buffer instance to ReceiveBuffer.");if(this.offset+i.length>=this.buffer.length){let u=this.buffer;this.buffer=Buffer.allocUnsafe(Math.max(this.buffer.length+this.originalSize,this.buffer.length+i.length)),u.copy(this.buffer)}return i.copy(this.buffer,this.offset),this.offset+=i.length}peek(i){if(i>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");return this.buffer.slice(0,i)}get(i){if(i>this.offset)throw new Error("Attempted to read beyond the bounds of the managed internal data.");let u=Buffer.allocUnsafe(i);return this.buffer.slice(0,i).copy(u),this.buffer.copyWithin(0,i,i+this.offset-i),this.offset-=i,u}};e.ReceiveBuffer=t}),lL=J(e=>{"use strict";var t=e&&e.__awaiter||function(h,p,d,m){function g(f){return f instanceof d?f:new d(function(y){y(f)})}return S(g,"adopt"),new(d||(d=Promise))(function(f,y){function v(w){try{b(m.next(w))}catch(_){y(_)}}S(v,"fulfilled");function E(w){try{b(m.throw(w))}catch(_){y(_)}}S(E,"rejected");function b(w){w.done?f(w.value):g(w.value).then(v,E)}S(b,"step"),b((m=m.apply(h,p||[])).next())})};Object.defineProperty(e,"__esModule",{value:!0}),e.SocksClientError=e.SocksClient=void 0;var i=require("events"),u=require("net"),n=sL(),l=Yg(),c=oL(),r=aL(),s=Qg();Object.defineProperty(e,"SocksClientError",{enumerable:!0,get:S(function(){return s.SocksClientError},"get")});var o=im(),a=class _l extends i.EventEmitter{static{S(this,"SocksClient")}constructor(p){super(),this.options=Object.assign({},p),(0,c.validateSocksClientOptions)(p),this.setState(l.SocksClientState.Created)}static createConnection(p,d){return new Promise((m,g)=>{try{(0,c.validateSocksClientOptions)(p,["connect"])}catch(y){return typeof d=="function"?(d(y),m(y)):g(y)}let f=new _l(p);f.connect(p.existing_socket),f.once("established",y=>{f.removeAllListeners(),typeof d=="function"&&d(null,y),m(y)}),f.once("error",y=>{f.removeAllListeners(),typeof d=="function"?(d(y),m(y)):g(y)})})}static createConnectionChain(p,d){return new Promise((m,g)=>t(this,void 0,void 0,function*(){try{(0,c.validateSocksClientChainOptions)(p)}catch(f){return typeof d=="function"?(d(f),m(f)):g(f)}p.randomizeChain&&(0,s.shuffleArray)(p.proxies);try{let f;for(let y=0;y<p.proxies.length;y++){let v=p.proxies[y],E=y===p.proxies.length-1?p.destination:{host:p.proxies[y+1].host||p.proxies[y+1].ipaddress,port:p.proxies[y+1].port},b=yield _l.createConnection({command:"connect",proxy:v,destination:E,existing_socket:f});f=f||b.socket}typeof d=="function"?(d(null,{socket:f}),m({socket:f})):m({socket:f})}catch(f){typeof d=="function"?(d(f),m(f)):g(f)}}))}static createUDPFrame(p){let d=new n.SmartBuffer;return d.writeUInt16BE(0),d.writeUInt8(p.frameNumber||0),u.isIPv4(p.remoteHost.host)?(d.writeUInt8(l.Socks5HostType.IPv4),d.writeUInt32BE((0,c.ipv4ToInt32)(p.remoteHost.host))):u.isIPv6(p.remoteHost.host)?(d.writeUInt8(l.Socks5HostType.IPv6),d.writeBuffer((0,c.ipToBuffer)(p.remoteHost.host))):(d.writeUInt8(l.Socks5HostType.Hostname),d.writeUInt8(Buffer.byteLength(p.remoteHost.host)),d.writeString(p.remoteHost.host)),d.writeUInt16BE(p.remoteHost.port),d.writeBuffer(p.data),d.toBuffer()}static parseUDPFrame(p){let d=n.SmartBuffer.fromBuffer(p);d.readOffset=2;let m=d.readUInt8(),g=d.readUInt8(),f;g===l.Socks5HostType.IPv4?f=(0,c.int32ToIpv4)(d.readUInt32BE()):g===l.Socks5HostType.IPv6?f=o.Address6.fromByteArray(Array.from(d.readBuffer(16))).canonicalForm():f=d.readString(d.readUInt8());let y=d.readUInt16BE();return{frameNumber:m,remoteHost:{host:f,port:y},data:d.readBuffer()}}setState(p){this.state!==l.SocksClientState.Error&&(this.state=p)}connect(p){this.onDataReceived=m=>this.onDataReceivedHandler(m),this.onClose=()=>this.onCloseHandler(),this.onError=m=>this.onErrorHandler(m),this.onConnect=()=>this.onConnectHandler();let d=setTimeout(()=>this.onEstablishedTimeout(),this.options.timeout||l.DEFAULT_TIMEOUT);d.unref&&typeof d.unref=="function"&&d.unref(),p?this.socket=p:this.socket=new u.Socket,this.socket.once("close",this.onClose),this.socket.once("error",this.onError),this.socket.once("connect",this.onConnect),this.socket.on("data",this.onDataReceived),this.setState(l.SocksClientState.Connecting),this.receiveBuffer=new r.ReceiveBuffer,p?this.socket.emit("connect"):(this.socket.connect(this.getSocketOptions()),this.options.set_tcp_nodelay!==void 0&&this.options.set_tcp_nodelay!==null&&this.socket.setNoDelay(!!this.options.set_tcp_nodelay)),this.prependOnceListener("established",m=>{setImmediate(()=>{if(this.receiveBuffer.length>0){let g=this.receiveBuffer.get(this.receiveBuffer.length);m.socket.emit("data",g)}m.socket.resume()})})}getSocketOptions(){return Object.assign(Object.assign({},this.options.socket_options),{host:this.options.proxy.host||this.options.proxy.ipaddress,port:this.options.proxy.port})}onEstablishedTimeout(){this.state!==l.SocksClientState.Established&&this.state!==l.SocksClientState.BoundWaitingForConnection&&this.closeSocket(l.ERRORS.ProxyConnectionTimedOut)}onConnectHandler(){this.setState(l.SocksClientState.Connected),this.options.proxy.type===4?this.sendSocks4InitialHandshake():this.sendSocks5InitialHandshake(),this.setState(l.SocksClientState.SentInitialHandshake)}onDataReceivedHandler(p){this.receiveBuffer.append(p),this.processData()}processData(){for(;this.state!==l.SocksClientState.Established&&this.state!==l.SocksClientState.Error&&this.receiveBuffer.length>=this.nextRequiredPacketBufferSize;)if(this.state===l.SocksClientState.SentInitialHandshake)this.options.proxy.type===4?this.handleSocks4FinalHandshakeResponse():this.handleInitialSocks5HandshakeResponse();else if(this.state===l.SocksClientState.SentAuthentication)this.handleInitialSocks5AuthenticationHandshakeResponse();else if(this.state===l.SocksClientState.SentFinalHandshake)this.handleSocks5FinalHandshakeResponse();else if(this.state===l.SocksClientState.BoundWaitingForConnection)this.options.proxy.type===4?this.handleSocks4IncomingConnectionResponse():this.handleSocks5IncomingConnectionResponse();else{this.closeSocket(l.ERRORS.InternalError);break}}onCloseHandler(){this.closeSocket(l.ERRORS.SocketClosed)}onErrorHandler(p){this.closeSocket(p.message)}removeInternalSocketHandlers(){this.socket.pause(),this.socket.removeListener("data",this.onDataReceived),this.socket.removeListener("close",this.onClose),this.socket.removeListener("error",this.onError),this.socket.removeListener("connect",this.onConnect)}closeSocket(p){this.state!==l.SocksClientState.Error&&(this.setState(l.SocksClientState.Error),this.socket.destroy(),this.removeInternalSocketHandlers(),this.emit("error",new s.SocksClientError(p,this.options)))}sendSocks4InitialHandshake(){let p=this.options.proxy.userId||"",d=new n.SmartBuffer;d.writeUInt8(4),d.writeUInt8(l.SocksCommand[this.options.command]),d.writeUInt16BE(this.options.destination.port),u.isIPv4(this.options.destination.host)?(d.writeBuffer((0,c.ipToBuffer)(this.options.destination.host)),d.writeStringNT(p)):(d.writeUInt8(0),d.writeUInt8(0),d.writeUInt8(0),d.writeUInt8(1),d.writeStringNT(p),d.writeStringNT(this.options.destination.host)),this.nextRequiredPacketBufferSize=l.SOCKS_INCOMING_PACKET_SIZES.Socks4Response,this.socket.write(d.toBuffer())}handleSocks4FinalHandshakeResponse(){let p=this.receiveBuffer.get(8);if(p[1]!==l.Socks4Response.Granted)this.closeSocket(`${l.ERRORS.Socks4ProxyRejectedConnection} - (${l.Socks4Response[p[1]]})`);else if(l.SocksCommand[this.options.command]===l.SocksCommand.bind){let d=n.SmartBuffer.fromBuffer(p);d.readOffset=2;let m={port:d.readUInt16BE(),host:(0,c.int32ToIpv4)(d.readUInt32BE())};m.host==="0.0.0.0"&&(m.host=this.options.proxy.ipaddress),this.setState(l.SocksClientState.BoundWaitingForConnection),this.emit("bound",{remoteHost:m,socket:this.socket})}else this.setState(l.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{socket:this.socket})}handleSocks4IncomingConnectionResponse(){let p=this.receiveBuffer.get(8);if(p[1]!==l.Socks4Response.Granted)this.closeSocket(`${l.ERRORS.Socks4ProxyRejectedIncomingBoundConnection} - (${l.Socks4Response[p[1]]})`);else{let d=n.SmartBuffer.fromBuffer(p);d.readOffset=2;let m={port:d.readUInt16BE(),host:(0,c.int32ToIpv4)(d.readUInt32BE())};this.setState(l.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:m,socket:this.socket})}}sendSocks5InitialHandshake(){let p=new n.SmartBuffer,d=[l.Socks5Auth.NoAuth];(this.options.proxy.userId||this.options.proxy.password)&&d.push(l.Socks5Auth.UserPass),this.options.proxy.custom_auth_method!==void 0&&d.push(this.options.proxy.custom_auth_method),p.writeUInt8(5),p.writeUInt8(d.length);for(let m of d)p.writeUInt8(m);this.nextRequiredPacketBufferSize=l.SOCKS_INCOMING_PACKET_SIZES.Socks5InitialHandshakeResponse,this.socket.write(p.toBuffer()),this.setState(l.SocksClientState.SentInitialHandshake)}handleInitialSocks5HandshakeResponse(){let p=this.receiveBuffer.get(2);p[0]!==5?this.closeSocket(l.ERRORS.InvalidSocks5IntiailHandshakeSocksVersion):p[1]===l.SOCKS5_NO_ACCEPTABLE_AUTH?this.closeSocket(l.ERRORS.InvalidSocks5InitialHandshakeNoAcceptedAuthType):p[1]===l.Socks5Auth.NoAuth?(this.socks5ChosenAuthType=l.Socks5Auth.NoAuth,this.sendSocks5CommandRequest()):p[1]===l.Socks5Auth.UserPass?(this.socks5ChosenAuthType=l.Socks5Auth.UserPass,this.sendSocks5UserPassAuthentication()):p[1]===this.options.proxy.custom_auth_method?(this.socks5ChosenAuthType=this.options.proxy.custom_auth_method,this.sendSocks5CustomAuthentication()):this.closeSocket(l.ERRORS.InvalidSocks5InitialHandshakeUnknownAuthType)}sendSocks5UserPassAuthentication(){let p=this.options.proxy.userId||"",d=this.options.proxy.password||"",m=new n.SmartBuffer;m.writeUInt8(1),m.writeUInt8(Buffer.byteLength(p)),m.writeString(p),m.writeUInt8(Buffer.byteLength(d)),m.writeString(d),this.nextRequiredPacketBufferSize=l.SOCKS_INCOMING_PACKET_SIZES.Socks5UserPassAuthenticationResponse,this.socket.write(m.toBuffer()),this.setState(l.SocksClientState.SentAuthentication)}sendSocks5CustomAuthentication(){return t(this,void 0,void 0,function*(){this.nextRequiredPacketBufferSize=this.options.proxy.custom_auth_response_size,this.socket.write(yield this.options.proxy.custom_auth_request_handler()),this.setState(l.SocksClientState.SentAuthentication)})}handleSocks5CustomAuthHandshakeResponse(p){return t(this,void 0,void 0,function*(){return yield this.options.proxy.custom_auth_response_handler(p)})}handleSocks5AuthenticationNoAuthHandshakeResponse(p){return t(this,void 0,void 0,function*(){return p[1]===0})}handleSocks5AuthenticationUserPassHandshakeResponse(p){return t(this,void 0,void 0,function*(){return p[1]===0})}handleInitialSocks5AuthenticationHandshakeResponse(){return t(this,void 0,void 0,function*(){this.setState(l.SocksClientState.ReceivedAuthenticationResponse);let p=!1;this.socks5ChosenAuthType===l.Socks5Auth.NoAuth?p=yield this.handleSocks5AuthenticationNoAuthHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===l.Socks5Auth.UserPass?p=yield this.handleSocks5AuthenticationUserPassHandshakeResponse(this.receiveBuffer.get(2)):this.socks5ChosenAuthType===this.options.proxy.custom_auth_method&&(p=yield this.handleSocks5CustomAuthHandshakeResponse(this.receiveBuffer.get(this.options.proxy.custom_auth_response_size))),p?this.sendSocks5CommandRequest():this.closeSocket(l.ERRORS.Socks5AuthenticationFailed)})}sendSocks5CommandRequest(){let p=new n.SmartBuffer;p.writeUInt8(5),p.writeUInt8(l.SocksCommand[this.options.command]),p.writeUInt8(0),u.isIPv4(this.options.destination.host)?(p.writeUInt8(l.Socks5HostType.IPv4),p.writeBuffer((0,c.ipToBuffer)(this.options.destination.host))):u.isIPv6(this.options.destination.host)?(p.writeUInt8(l.Socks5HostType.IPv6),p.writeBuffer((0,c.ipToBuffer)(this.options.destination.host))):(p.writeUInt8(l.Socks5HostType.Hostname),p.writeUInt8(this.options.destination.host.length),p.writeString(this.options.destination.host)),p.writeUInt16BE(this.options.destination.port),this.nextRequiredPacketBufferSize=l.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.socket.write(p.toBuffer()),this.setState(l.SocksClientState.SentFinalHandshake)}handleSocks5FinalHandshakeResponse(){let p=this.receiveBuffer.peek(5);if(p[0]!==5||p[1]!==l.Socks5Response.Granted)this.closeSocket(`${l.ERRORS.InvalidSocks5FinalHandshakeRejected} - ${l.Socks5Response[p[1]]}`);else{let d=p[3],m,g;if(d===l.Socks5HostType.IPv4){let f=l.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<f){this.nextRequiredPacketBufferSize=f;return}g=n.SmartBuffer.fromBuffer(this.receiveBuffer.get(f).slice(4)),m={host:(0,c.int32ToIpv4)(g.readUInt32BE()),port:g.readUInt16BE()},m.host==="0.0.0.0"&&(m.host=this.options.proxy.ipaddress)}else if(d===l.Socks5HostType.Hostname){let f=p[4],y=l.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(f);if(this.receiveBuffer.length<y){this.nextRequiredPacketBufferSize=y;return}g=n.SmartBuffer.fromBuffer(this.receiveBuffer.get(y).slice(5)),m={host:g.readString(f),port:g.readUInt16BE()}}else if(d===l.Socks5HostType.IPv6){let f=l.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<f){this.nextRequiredPacketBufferSize=f;return}g=n.SmartBuffer.fromBuffer(this.receiveBuffer.get(f).slice(4)),m={host:o.Address6.fromByteArray(Array.from(g.readBuffer(16))).canonicalForm(),port:g.readUInt16BE()}}this.setState(l.SocksClientState.ReceivedFinalResponse),l.SocksCommand[this.options.command]===l.SocksCommand.connect?(this.setState(l.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:m,socket:this.socket})):l.SocksCommand[this.options.command]===l.SocksCommand.bind?(this.setState(l.SocksClientState.BoundWaitingForConnection),this.nextRequiredPacketBufferSize=l.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHeader,this.emit("bound",{remoteHost:m,socket:this.socket})):l.SocksCommand[this.options.command]===l.SocksCommand.associate&&(this.setState(l.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:m,socket:this.socket}))}}handleSocks5IncomingConnectionResponse(){let p=this.receiveBuffer.peek(5);if(p[0]!==5||p[1]!==l.Socks5Response.Granted)this.closeSocket(`${l.ERRORS.Socks5ProxyRejectedIncomingBoundConnection} - ${l.Socks5Response[p[1]]}`);else{let d=p[3],m,g;if(d===l.Socks5HostType.IPv4){let f=l.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv4;if(this.receiveBuffer.length<f){this.nextRequiredPacketBufferSize=f;return}g=n.SmartBuffer.fromBuffer(this.receiveBuffer.get(f).slice(4)),m={host:(0,c.int32ToIpv4)(g.readUInt32BE()),port:g.readUInt16BE()},m.host==="0.0.0.0"&&(m.host=this.options.proxy.ipaddress)}else if(d===l.Socks5HostType.Hostname){let f=p[4],y=l.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseHostname(f);if(this.receiveBuffer.length<y){this.nextRequiredPacketBufferSize=y;return}g=n.SmartBuffer.fromBuffer(this.receiveBuffer.get(y).slice(5)),m={host:g.readString(f),port:g.readUInt16BE()}}else if(d===l.Socks5HostType.IPv6){let f=l.SOCKS_INCOMING_PACKET_SIZES.Socks5ResponseIPv6;if(this.receiveBuffer.length<f){this.nextRequiredPacketBufferSize=f;return}g=n.SmartBuffer.fromBuffer(this.receiveBuffer.get(f).slice(4)),m={host:o.Address6.fromByteArray(Array.from(g.readBuffer(16))).canonicalForm(),port:g.readUInt16BE()}}this.setState(l.SocksClientState.Established),this.removeInternalSocketHandlers(),this.emit("established",{remoteHost:m,socket:this.socket})}}get socksClientOptions(){return Object.assign({},this.options)}};e.SocksClient=a}),cL=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(u,n,l,c){c===void 0&&(c=l);var r=Object.getOwnPropertyDescriptor(n,l);(!r||("get"in r?!n.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:S(function(){return n[l]},"get")}),Object.defineProperty(u,c,r)}:function(u,n,l,c){c===void 0&&(c=l),u[c]=n[l]}),i=e&&e.__exportStar||function(u,n){for(var l in u)l!=="default"&&!Object.prototype.hasOwnProperty.call(n,l)&&t(n,u,l)};Object.defineProperty(e,"__esModule",{value:!0}),i(lL(),e)}),uL=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(y,v,E,b){b===void 0&&(b=E);var w=Object.getOwnPropertyDescriptor(v,E);(!w||("get"in w?!v.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:S(function(){return v[E]},"get")}),Object.defineProperty(y,b,w)}:function(y,v,E,b){b===void 0&&(b=E),y[b]=v[E]}),i=e&&e.__setModuleDefault||(Object.create?function(y,v){Object.defineProperty(y,"default",{enumerable:!0,value:v})}:function(y,v){y.default=v}),u=e&&e.__importStar||function(y){if(y&&y.__esModule)return y;var v={};if(y!=null)for(var E in y)E!=="default"&&Object.prototype.hasOwnProperty.call(y,E)&&t(v,y,E);return i(v,y),v},n=e&&e.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(e,"__esModule",{value:!0}),e.SocksProxyAgent=void 0;var l=cL(),c=nn(),r=n(Pr()),s=u(require("dns")),o=u(require("net")),a=u(require("tls")),h=require("url"),p=(0,r.default)("socks-proxy-agent"),d=S(y=>y.servername===void 0&&y.host&&!o.isIP(y.host)?{...y,servername:y.host}:y,"setServernameFromNonIpHost");function m(y){let v=!1,E=5,b=y.hostname,w=parseInt(y.port,10)||1080;switch(y.protocol.replace(":","")){case"socks4":v=!0,E=4;break;case"socks4a":E=4;break;case"socks5":v=!0,E=5;break;case"socks":E=5;break;case"socks5h":E=5;break;default:throw new TypeError(`A "socks" protocol must be specified! Got: ${String(y.protocol)}`)}let _={host:b,port:w,type:E};return y.username&&Object.defineProperty(_,"userId",{value:decodeURIComponent(y.username),enumerable:!1}),y.password!=null&&Object.defineProperty(_,"password",{value:decodeURIComponent(y.password),enumerable:!1}),{lookup:v,proxy:_}}S(m,"parseSocksURL");var g=class extends c.Agent{static{S(this,"SocksProxyAgent")}constructor(y,v){super(v);let E=typeof y=="string"?new h.URL(y):y,{proxy:b,lookup:w}=m(E);this.shouldLookup=w,this.proxy=b,this.timeout=v?.timeout??null,this.socketOptions=v?.socketOptions??null}async connect(y,v){let{shouldLookup:E,proxy:b,timeout:w}=this;if(!v.host)throw new Error("No `host` defined!");let{host:_}=v,{port:O,lookup:A=s.lookup}=v;E&&(_=await new Promise((j,N)=>{A(_,{},(M,B)=>{M?N(M):j(B)})}));let I={proxy:b,destination:{host:_,port:typeof O=="number"?O:parseInt(O,10)},command:"connect",timeout:w??void 0,socket_options:this.socketOptions??void 0},P=S(j=>{y.destroy(),L.destroy(),j&&j.destroy()},"cleanup");p("Creating socks proxy connection: %o",I);let{socket:L}=await l.SocksClient.createConnection(I);if(p("Successfully created socks proxy connection"),w!==null&&(L.setTimeout(w),L.on("timeout",()=>P())),v.secureEndpoint){p("Upgrading socket connection to TLS");let j=a.connect({...f(d(v),"host","path","port"),socket:L});return j.once("error",N=>{p("Socket TLS error",N.message),P(j)}),j}return L}};g.protocols=["socks","socks4","socks4a","socks5","socks5h"],e.SocksProxyAgent=g;function f(y,...v){let E={},b;for(b in y)v.includes(b)||(E[b]=y[b]);return E}S(f,"omit")}),nm=J((e,t)=>{"use strict";var i=class extends Error{static{S(this,"InvalidProxyProtocolError")}constructor(r){super(`Invalid protocol \`${r.protocol}\` connecting to proxy \`${r.host}\``),this.code="EINVALIDPROXY",this.proxy=r}},u=class extends Error{static{S(this,"ConnectionTimeoutError")}constructor(r){super(`Timeout connecting to host \`${r}\``),this.code="ECONNECTIONTIMEOUT",this.host=r}},n=class extends Error{static{S(this,"IdleTimeoutError")}constructor(r){super(`Idle timeout reached for host \`${r}\``),this.code="EIDLETIMEOUT",this.host=r}},l=class extends Error{static{S(this,"ResponseTimeoutError")}constructor(r,s){let o="Response timeout ";s&&(o+=`from proxy \`${s.host}\` `),o+=`connecting to host \`${r.host}\``,super(o),this.code="ERESPONSETIMEOUT",this.proxy=s,this.request=r}},c=class extends Error{static{S(this,"TransferTimeoutError")}constructor(r,s){let o="Transfer timeout ";s&&(o+=`from proxy \`${s.host}\` `),o+=`for \`${r.host}\``,super(o),this.code="ETRANSFERTIMEOUT",this.proxy=s,this.request=r}};t.exports={InvalidProxyProtocolError:i,ConnectionTimeoutError:u,IdleTimeoutError:n,ResponseTimeoutError:l,TransferTimeoutError:c}}),om=J((e,t)=>{"use strict";var{HttpProxyAgent:i}=Qk(),{HttpsProxyAgent:u}=tL(),{SocksProxyAgent:n}=uL(),{LRUCache:l}=Cr(),{InvalidProxyProtocolError:c}=nm(),r=new l({max:20}),s=new Set(n.protocols),o=new Set(["https_proxy","http_proxy","proxy","no_proxy"]),a=Object.entries(process.env).reduce((m,[g,f])=>(g=g.toLowerCase(),o.has(g)&&(m[g]=f),m),{}),h=S(m=>{m=new URL(m);let g=m.protocol.slice(0,-1);if(s.has(g))return n;if(g==="https"||g==="http")return[i,u];throw new c(m)},"getProxyAgent"),p=S((m,g)=>{if(typeof g=="string"&&(g=g.split(",").map(y=>y.trim()).filter(Boolean)),!g||!g.length)return!1;let f=m.hostname.split(".").reverse();return g.some(y=>{let v=y.split(".").filter(Boolean).reverse();if(!v.length)return!1;for(let E=0;E<v.length;E++)if(f[E]!==v[E])return!1;return!0})},"isNoProxy"),d=S((m,{proxy:g,noProxy:f})=>(m=new URL(m),g||(g=m.protocol==="https:"?a.https_proxy:a.https_proxy||a.http_proxy||a.proxy),f||(f=a.no_proxy),!g||p(m,f)?null:new URL(g)),"getProxy");t.exports={getProxyAgent:h,getProxy:d,proxyCache:r}}),hL=J((e,t)=>{"use strict";var i=require("net"),u=require("tls"),{once:n}=require("events"),l=require("timers/promises"),{normalizeOptions:c,cacheOptions:r}=Jg(),{getProxy:s,getProxyAgent:o,proxyCache:a}=om(),h=nm(),{Agent:p}=nn();t.exports=class extends p{static{S(this,"Agent")}#e;#t;#r;#s;#n;constructor(d={}){let{timeouts:m,proxy:g,noProxy:f,...y}=c(d);super(y),this.#e=y,this.#t=m,g&&(this.#r=new URL(g),this.#s=f,this.#n=o(g))}get proxy(){return this.#r?{url:this.#r}:{}}#c(d){if(!this.#r)return;let m=s(`${d.protocol}//${d.host}:${d.port}`,{proxy:this.#r,noProxy:this.#s});if(!m)return;let g=r({...d,...this.#e,timeouts:this.#t,proxy:m});if(a.has(g))return a.get(g);let f=this.#n;Array.isArray(f)&&(f=this.isSecureEndpoint(d)?f[1]:f[0]);let y=new f(m,{...this.#e,socketOptions:{family:this.#e.family}});return a.set(g,y),y}async#u({promises:d,options:m,timeout:g},f=new AbortController){if(g){let v=l.setTimeout(g,null,{signal:f.signal}).then(()=>{throw new h.ConnectionTimeoutError(`${m.host}:${m.port}`)}).catch(E=>{if(E.name!=="AbortError")throw E});d.push(v)}let y;try{y=await Promise.race(d),f.abort()}catch(v){throw f.abort(),v}return y}async connect(d,m){m.lookup??=this.#e.lookup;let g,f=this.#t.connection,y=this.isSecureEndpoint(m),v=this.#c(m);if(v){let _=Date.now();g=await this.#u({options:m,timeout:f,promises:[v.connect(d,m)]}),f&&(f=f-(Date.now()-_))}else g=(y?u:i).connect(m);g.setKeepAlive(this.keepAlive,this.keepAliveMsecs),g.setNoDelay(this.keepAlive);let E=new AbortController,{signal:b}=E,w=g[y?"secureConnecting":"connecting"]?n(g,y?"secureConnect":"connect",{signal:b}):Promise.resolve();return await this.#u({options:m,timeout:f,promises:[w,n(g,"error",{signal:b}).then(_=>{throw _[0]})]},E),this.#t.idle&&g.setTimeout(this.#t.idle,()=>{g.destroy(new h.IdleTimeoutError(`${m.host}:${m.port}`))}),g}addRequest(d,m){let g=this.#c(m);if(g?.setRequestProps&&g.setRequestProps(d,m),d.setHeader("connection",this.keepAlive?"keep-alive":"close"),this.#t.response){let f;d.once("finish",()=>{setTimeout(()=>{d.destroy(new h.ResponseTimeoutError(d,this.#r))},this.#t.response)}),d.once("response",()=>{clearTimeout(f)})}if(this.#t.transfer){let f;d.once("response",y=>{setTimeout(()=>{y.destroy(new h.TransferTimeoutError(d,this.#r))},this.#t.transfer),y.once("close",()=>{clearTimeout(f)})})}return super.addRequest(d,m)}}}),pL=J((e,t)=>{"use strict";var{LRUCache:i}=Cr(),{normalizeOptions:u,cacheOptions:n}=Jg(),{getProxy:l,proxyCache:c}=om(),r=Kg(),s=hL(),o=new i({max:20}),a=S((h,{agent:p,proxy:d,noProxy:m,...g}={})=>{if(p!=null)return p;h=new URL(h);let f=l(h,{proxy:d,noProxy:m}),y={...u(g),proxy:f},v=n({...y,secureEndpoint:h.protocol==="https:"});if(o.has(v))return o.get(v);let E=new s(y);return o.set(v,E),E},"getAgent");t.exports={getAgent:a,Agent:s,HttpAgent:s,HttpsAgent:s,cache:{proxy:c,agent:o,dns:r.cache,clear:S(()=>{c.clear(),o.clear(),r.cache.clear()},"clear")}}}),dL=J((e,t)=>{t.exports={name:"make-fetch-happen",version:"15.0.2",description:"Opinionated, caching, retrying fetch client",main:"lib/index.js",files:["bin/","lib/"],scripts:{test:"tap",posttest:"npm run lint",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"',lint:"npm run eslint",lintfix:"npm run eslint -- --fix",postlint:"template-oss-check",snap:"tap","template-oss-apply":"template-oss-apply --force"},repository:{type:"git",url:"git+https://github.com/npm/make-fetch-happen.git"},keywords:["http","request","fetch","mean girls","caching","cache","subresource integrity"],author:"GitHub Inc.",license:"ISC",dependencies:{"@npmcli/agent":"^4.0.0",cacache:"^20.0.1","http-cache-semantics":"^4.1.1",minipass:"^7.0.2","minipass-fetch":"^4.0.0","minipass-flush":"^1.0.5","minipass-pipeline":"^1.2.4",negotiator:"^1.0.0","proc-log":"^5.0.0","promise-retry":"^2.0.1",ssri:"^12.0.0"},devDependencies:{"@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.25.0",nock:"^13.2.4","safe-buffer":"^5.2.1","standard-version":"^9.3.2",tap:"^16.0.0"},engines:{node:"^20.17.0 || >=22.9.0"},tap:{color:1,files:"test/*.js","check-coverage":!0,timeout:60,"nyc-arg":["--exclude","tap-snapshots/**"]},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.25.0",publish:"true"}}}),uc=J((e,t)=>{var{Minipass:i}=ke(),u=Is(),n=Zi(),l=Dt(),{log:c}=yt(),r=qg(),{getAgent:s}=pL(),o=dL(),a=`${o.name}/${o.version} (+https://npm.im/${o.name})`,h=["ECONNRESET","ECONNREFUSED","EADDRINUSE","ETIMEDOUT","ECONNECTIONTIMEOUT","EIDLETIMEOUT","ERESPONSETIMEOUT","ETRANSFERTIMEOUT"],p=["request-timeout"],d=S((m,g)=>{let f=s(m.url,{...g,signal:void 0});m.headers.has("connection")||m.headers.set("connection",f?"keep-alive":"close"),m.headers.has("user-agent")||m.headers.set("user-agent",a);let y={...g,agent:f,redirect:"manual"};return n(async(v,E)=>{let b=new u.Request(m,y);try{let w=await u(b,y);if(y.integrity&&w.status===200){let O=l.integrityStream({algorithms:y.algorithms,integrity:y.integrity,size:y.size}),A=new r({events:["integrity","size"]},w.body,O);O.on("integrity",I=>A.emit("integrity",I)),O.on("size",I=>A.emit("size",I)),w=new u.Response(A,w),w.body.hasIntegrityEmitter=!0}w.headers.set("x-fetch-attempts",E);let _=i.isStream(b.body);return b.method!=="POST"&&!_&&([408,420,429].includes(w.status)||w.status>=500)?(typeof g.onRetry=="function"&&g.onRetry(w),c.http("fetch",`${b.method} ${b.url} attempt ${E} failed with ${w.status}`),v(w)):w}catch(w){let _=w.code==="EPROMISERETRY"?w.retried.code:w.code,O=w.retried instanceof u.Response||h.includes(_)&&p.includes(w.type);if(b.method==="POST"||O)throw w;return typeof g.onRetry=="function"&&g.onRetry(w),c.http("fetch",`${b.method} ${b.url} attempt ${E} failed with ${w.code}`),v(w)}},g.retry).catch(v=>{if(v.status>=400&&v.type!=="system")return v;throw v})},"remoteFetch");t.exports=d}),fL=J((e,t)=>{var{Request:i,Response:u}=Is(),{Minipass:n}=ke(),l=Yl(),c=rn(),r=require("url"),s=qg(),o=zg(),a=zk(),h=uc(),p=S((b,w)=>Object.prototype.hasOwnProperty.call(b,w),"hasOwnProperty"),d=["accept-charset","accept-encoding","accept-language","accept","cache-control"],m=["cache-control","content-encoding","content-language","content-type","date","etag","expires","last-modified","link","location","pragma","vary"],g=S((b,w,_)=>{let O={time:Date.now(),url:b.url,reqHeaders:{},resHeaders:{},options:{compress:_.compress!=null?_.compress:b.compress}};w.status!==200&&w.status!==304&&(O.status=w.status);for(let P of d)b.headers.has(P)&&(O.reqHeaders[P]=b.headers.get(P));let A=b.headers.get("host"),I=new r.URL(b.url);if(A&&I.host!==A&&(O.reqHeaders.host=A),w.headers.has("vary")){let P=w.headers.get("vary");if(P!=="*"){let L=P.trim().toLowerCase().split(/\s*,\s*/);for(let j of L)b.headers.has(j)&&(O.reqHeaders[j]=b.headers.get(j))}}for(let P of m)w.headers.has(P)&&(O.resHeaders[P]=w.headers.get(P));for(let P of _.cacheAdditionalHeaders)w.headers.has(P)&&(O.resHeaders[P]=w.headers.get(P));return O},"getMetadata"),f=Symbol("request"),y=Symbol("response"),v=Symbol("policy"),E=class Or{static{S(this,"CacheEntry")}constructor({entry:w,request:_,response:O,options:A}){w?(this.key=w.key,this.entry=w,this.entry.metadata.time=this.entry.metadata.time||this.entry.time):this.key=a(_),this.options=A,this[f]=_,this[y]=O,this[v]=null}static async find(w,_){try{var O=await c.index.compact(_.cachePath,a(w),(I,P)=>{let L=new Or({entry:I,options:_}),j=new Or({entry:P,options:_});return L.policy.satisfies(j.request)},{validateEntry:S(I=>I.metadata&&I.metadata.resHeaders&&I.metadata.resHeaders["content-encoding"]===null?!1:I.integrity===null?!!(I.metadata&&I.metadata.status):!0,"validateEntry")})}catch{return}if(_.cache==="reload")return;let A;for(let I of O){let P=new Or({entry:I,options:_});if(P.policy.satisfies(w)){A=P;break}}return A}static async invalidate(w,_){let O=a(w);try{await c.rm.entry(_.cachePath,O,{removeFully:!0})}catch{}}get request(){return this[f]||(this[f]=new i(this.entry.metadata.url,{method:"GET",headers:this.entry.metadata.reqHeaders,...this.entry.metadata.options})),this[f]}get response(){return this[y]||(this[y]=new u(null,{url:this.entry.metadata.url,counter:this.options.counter,status:this.entry.metadata.status||200,headers:{...this.entry.metadata.resHeaders,"content-length":this.entry.size}})),this[y]}get policy(){return this[v]||(this[v]=new o({entry:this.entry,request:this.request,response:this.response,options:this.options})),this[v]}async store(w){if(this.request.method!=="GET"||![200,301,308].includes(this.response.status)||!this.policy.storable())return this.response.headers.set("x-local-cache-status","skip"),this.response;let _=this.response.headers.get("content-length"),O={algorithms:this.options.algorithms,metadata:g(this.request,this.response,this.options),size:_,integrity:this.options.integrity,integrityEmitter:this.response.body.hasIntegrityEmitter&&this.response.body},A=null;if(this.response.status===200){let I,P,L=new Promise((N,M)=>{I=N,P=M}).catch(N=>{A.emit("error",N)});A=new s({events:["integrity","size"]},new l({flush(){return L}})),A.hasIntegrityEmitter=!0;let j=S(()=>{let N=new n,M=c.put.stream(this.options.cachePath,this.key,O);M.on("integrity",B=>A.emit("integrity",B)),M.on("size",B=>A.emit("size",B)),N.pipe(M),M.promise().then(I,P),A.unshift(N),A.unshift(this.response.body)},"onResume");A.once("resume",j),A.once("end",()=>A.removeListener("resume",j))}else await c.index.insert(this.options.cachePath,this.key,null,O);return this.response.headers.set("x-local-cache",encodeURIComponent(this.options.cachePath)),this.response.headers.set("x-local-cache-key",encodeURIComponent(this.key)),this.response.headers.set("x-local-cache-mode","stream"),this.response.headers.set("x-local-cache-status",w),this.response.headers.set("x-local-cache-time",new Date().toISOString()),new u(A,{url:this.response.url,status:this.response.status,headers:this.response.headers,counter:this.options.counter})}async respond(w,_,O){let A;if(w==="HEAD"||[301,308].includes(this.response.status))A=this.response;else{let I=new n,P={...this.policy.responseHeaders()},L=S(()=>{let j=c.get.stream.byDigest(this.options.cachePath,this.entry.integrity,{memoize:this.options.memoize});j.on("error",async N=>{j.pause(),N.code==="EINTEGRITY"&&await c.rm.content(this.options.cachePath,this.entry.integrity,{memoize:this.options.memoize}),(N.code==="ENOENT"||N.code==="EINTEGRITY")&&await Or.invalidate(this.request,this.options),I.emit("error",N),j.resume()}),I.emit("integrity",this.entry.integrity),I.emit("size",Number(P["content-length"])),j.pipe(I)},"onResume");I.once("resume",L),I.once("end",()=>I.removeListener("resume",L)),A=new u(I,{url:this.entry.metadata.url,counter:_.counter,status:200,headers:P})}return A.headers.set("x-local-cache",encodeURIComponent(this.options.cachePath)),A.headers.set("x-local-cache-hash",encodeURIComponent(this.entry.integrity)),A.headers.set("x-local-cache-key",encodeURIComponent(this.key)),A.headers.set("x-local-cache-mode","stream"),A.headers.set("x-local-cache-status",O),A.headers.set("x-local-cache-time",new Date(this.entry.metadata.time).toUTCString()),A}async revalidate(w,_){let O=new i(w,{headers:this.policy.revalidationHeaders(w)});try{var A=await h(O,{..._,headers:void 0})}catch(I){if(!this.policy.mustRevalidate)return this.respond(w.method,_,"stale");throw I}if(this.policy.revalidated(O,A)){let I=g(w,A,_);for(let P of m)!p(I.resHeaders,P)&&p(this.entry.metadata.resHeaders,P)&&(I.resHeaders[P]=this.entry.metadata.resHeaders[P]);for(let P of _.cacheAdditionalHeaders){let L=p(I.resHeaders,P),j=p(this.entry.metadata.resHeaders,P),N=p(this.policy.response.headers,P);!L&&j&&(I.resHeaders[P]=this.entry.metadata.resHeaders[P]),!N&&L&&(this.policy.response.headers[P]=I.resHeaders[P])}try{await c.index.insert(_.cachePath,this.key,this.entry.integrity,{size:this.entry.size,metadata:I})}catch{}return this.respond(w.method,_,"revalidated")}return new Or({request:w,response:A,options:_}).store("updated")}};t.exports=E}),gL=J((e,t)=>{var{NotCachedError:i}=Wk(),u=fL(),n=uc(),l=S(async(c,r)=>{let s=await u.find(c,r);if(!s){if(r.cache==="only-if-cached")throw new i(c.url);let a=await n(c,r);return new u({request:c,response:a,options:r}).store("miss")}if(r.cache==="no-cache")return s.revalidate(c,r);let o=s.policy.needsRevalidation(c);return r.cache==="force-cache"||r.cache==="only-if-cached"||!o?s.respond(c.method,r,o?"stale":"hit"):s.revalidate(c,r)},"cacheFetch");l.invalidate=async(c,r)=>{if(r.cachePath)return u.invalidate(c,r)},t.exports=l}),mL=J((e,t)=>{"use strict";var{FetchError:i,Request:u,isRedirect:n}=Is(),l=require("url"),c=zg(),r=gL(),s=uc(),o=S((p,d,m)=>{if(!n(d.status)||m.redirect==="manual")return!1;if(m.redirect==="error")throw new i(`redirect mode is set to error: ${p.url}`,"no-redirect",{code:"ENOREDIRECT"});if(!d.headers.has("location"))throw new i(`redirect location header missing for: ${p.url}`,"no-location",{code:"EINVALIDREDIRECT"});if(p.counter>=p.follow)throw new i(`maximum redirect reached at: ${p.url}`,"max-redirect",{code:"EMAXREDIRECT"});return!0},"canFollowRedirect"),a=S((p,d,m)=>{let g={...m},f=d.headers.get("location"),y=new l.URL(f,/^https?:/.test(f)?void 0:p.url);return new l.URL(p.url).hostname!==y.hostname&&(p.headers.delete("authorization"),p.headers.delete("cookie")),(d.status===303||p.method==="POST"&&[301,302].includes(d.status))&&(g.method="GET",g.body=null,p.headers.delete("content-length")),g.headers={},p.headers.forEach((v,E)=>{g.headers[E]=v}),g.counter=++p.counter,{request:new u(l.format(y),g),options:g}},"getRedirect"),h=S(async(p,d)=>{let m=c.storable(p,d)?await r(p,d):await s(p,d);if(!["GET","HEAD"].includes(p.method)&&m.status>=200&&m.status<=399&&await r.invalidate(p,d),!o(p,m,d))return m;let g=a(p,m,d);return h(g.request,g.options)},"fetch");t.exports=h}),on=J((e,t)=>{var{FetchError:i,Headers:u,Request:n,Response:l}=Is(),c=Mk(),r=mL(),s=S((o,a)=>{let h=c(a),p=new n(o,h);return r(p,h)},"makeFetchHappen");s.defaults=(o,a={},h=s)=>{typeof o=="object"&&(a=o,o=null);let p=S((d,m={})=>{let g=d||o,f={...a,...m,headers:{...a.headers,...m.headers}};return h(g,f)},"defaultedFetch");return p.defaults=(d,m={})=>s.defaults(d,m,p),p},t.exports=s,t.exports.FetchError=i,t.exports.Headers=u,t.exports.Request=n,t.exports.Response=l}),yL=J((e,t)=>{var i={},u=i.LEFT_BRACE=1,n=i.RIGHT_BRACE=2,l=i.LEFT_BRACKET=3,c=i.RIGHT_BRACKET=4,r=i.COLON=5,s=i.COMMA=6,o=i.TRUE=7,a=i.FALSE=8,h=i.NULL=9,p=i.STRING=10,d=i.NUMBER=11,m=i.START=17,g=i.STOP=18,f=i.TRUE1=33,y=i.TRUE2=34,v=i.TRUE3=35,E=i.FALSE1=49,b=i.FALSE2=50,w=i.FALSE3=51,_=i.FALSE4=52,O=i.NULL1=65,A=i.NULL2=66,I=i.NULL3=67,P=i.NUMBER1=81,L=i.NUMBER3=83,j=i.STRING1=97,N=i.STRING2=98,M=i.STRING3=99,B=i.STRING4=100,F=i.STRING5=101,D=i.STRING6=102,H=i.VALUE=113,G=i.KEY=114,x=i.OBJECT=129,k=i.ARRAY=130,T=92,C=47,q=8,X=12,Y=10,$=13,V=9,z=64*1024;function U(){this.tState=m,this.value=void 0,this.string=void 0,this.stringBuffer=Buffer.alloc?Buffer.alloc(z):new Buffer(z),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=H,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new Buffer(2),3:new Buffer(3),4:new Buffer(4)},this.offset=-1}S(U,"Parser"),U.toknam=function(Z){for(var Q=Object.keys(i),R=0,W=Q.length;R<W;R++){var ee=Q[R];if(i[ee]===Z)return ee}return Z&&"0x"+Z.toString(16)};var K=U.prototype;K.onError=function(Z){throw Z},K.charError=function(Z,Q){this.tState=g,this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(Z[Q]))+" at position "+Q+" in state "+U.toknam(this.tState)))},K.appendStringChar=function(Z){this.stringBufferOffset>=z&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=Z},K.appendStringBuf=function(Z,Q,R){var W=Z.length;typeof Q=="number"&&(typeof R=="number"?R<0?W=Z.length-Q+R:W=R-Q:W=Z.length-Q),W<0&&(W=0),this.stringBufferOffset+W>z&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),Z.copy(this.stringBuffer,this.stringBufferOffset,Q,R),this.stringBufferOffset+=W},K.write=function(Z){typeof Z=="string"&&(Z=new Buffer(Z));for(var Q,R=0,W=Z.length;R<W;R++)if(this.tState===m){if(Q=Z[R],this.offset++,Q===123)this.onToken(u,"{");else if(Q===125)this.onToken(n,"}");else if(Q===91)this.onToken(l,"[");else if(Q===93)this.onToken(c,"]");else if(Q===58)this.onToken(r,":");else if(Q===44)this.onToken(s,",");else if(Q===116)this.tState=f;else if(Q===102)this.tState=E;else if(Q===110)this.tState=O;else if(Q===34)this.string="",this.stringBufferOffset=0,this.tState=j;else if(Q===45)this.string="-",this.tState=P;else if(Q>=48&&Q<64)this.string=String.fromCharCode(Q),this.tState=L;else if(!(Q===32||Q===9||Q===10||Q===13))return this.charError(Z,R)}else if(this.tState===j)if(Q=Z[R],this.bytes_remaining>0){for(var ee=0;ee<this.bytes_remaining;ee++)this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence-this.bytes_remaining+ee]=Z[ee];this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]),this.bytes_in_sequence=this.bytes_remaining=0,R=R+ee-1}else if(this.bytes_remaining===0&&Q>=128){if(Q<=193||Q>244)return this.onError(new Error("Invalid UTF-8 character at position "+R+" in state "+U.toknam(this.tState)));if(Q>=194&&Q<=223&&(this.bytes_in_sequence=2),Q>=224&&Q<=239&&(this.bytes_in_sequence=3),Q>=240&&Q<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+R>Z.length){for(var ne=0;ne<=Z.length-1-R;ne++)this.temp_buffs[this.bytes_in_sequence][ne]=Z[R+ne];this.bytes_remaining=R+this.bytes_in_sequence-Z.length,R=Z.length-1}else this.appendStringBuf(Z,R,R+this.bytes_in_sequence),R=R+this.bytes_in_sequence-1}else if(Q===34)this.tState=m,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(p,this.string),this.offset+=Buffer.byteLength(this.string,"utf8")+1,this.string=void 0;else if(Q===92)this.tState=N;else if(Q>=32)this.appendStringChar(Q);else return this.charError(Z,R);else if(this.tState===N)if(Q=Z[R],Q===34)this.appendStringChar(Q),this.tState=j;else if(Q===92)this.appendStringChar(T),this.tState=j;else if(Q===47)this.appendStringChar(C),this.tState=j;else if(Q===98)this.appendStringChar(q),this.tState=j;else if(Q===102)this.appendStringChar(X),this.tState=j;else if(Q===110)this.appendStringChar(Y),this.tState=j;else if(Q===114)this.appendStringChar($),this.tState=j;else if(Q===116)this.appendStringChar(V),this.tState=j;else if(Q===117)this.unicode="",this.tState=M;else return this.charError(Z,R);else if(this.tState===M||this.tState===B||this.tState===F||this.tState===D)if(Q=Z[R],Q>=48&&Q<64||Q>64&&Q<=70||Q>96&&Q<=102){if(this.unicode+=String.fromCharCode(Q),this.tState++===D){var te=parseInt(this.unicode,16);this.unicode=void 0,this.highSurrogate!==void 0&&te>=56320&&te<57344?(this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate,te))),this.highSurrogate=void 0):this.highSurrogate===void 0&&te>=55296&&te<56320?this.highSurrogate=te:(this.highSurrogate!==void 0&&(this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new Buffer(String.fromCharCode(te)))),this.tState=j}}else return this.charError(Z,R);else if(this.tState===P||this.tState===L)switch(Q=Z[R],Q){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 46:case 101:case 69:case 43:case 45:this.string+=String.fromCharCode(Q),this.tState=L;break;default:this.tState=m;var le=Number(this.string);if(isNaN(le))return this.charError(Z,R);this.string.match(/[0-9]+/)==this.string&&le.toString()!=this.string?this.onToken(p,this.string):this.onToken(d,le),this.offset+=this.string.length-1,this.string=void 0,R--;break}else if(this.tState===f)if(Z[R]===114)this.tState=y;else return this.charError(Z,R);else if(this.tState===y)if(Z[R]===117)this.tState=v;else return this.charError(Z,R);else if(this.tState===v)if(Z[R]===101)this.tState=m,this.onToken(o,!0),this.offset+=3;else return this.charError(Z,R);else if(this.tState===E)if(Z[R]===97)this.tState=b;else return this.charError(Z,R);else if(this.tState===b)if(Z[R]===108)this.tState=w;else return this.charError(Z,R);else if(this.tState===w)if(Z[R]===115)this.tState=_;else return this.charError(Z,R);else if(this.tState===_)if(Z[R]===101)this.tState=m,this.onToken(a,!1),this.offset+=4;else return this.charError(Z,R);else if(this.tState===O)if(Z[R]===117)this.tState=A;else return this.charError(Z,R);else if(this.tState===A)if(Z[R]===108)this.tState=I;else return this.charError(Z,R);else if(this.tState===I)if(Z[R]===108)this.tState=m,this.onToken(h,null),this.offset+=3;else return this.charError(Z,R)},K.onToken=function(Z,Q){},K.parseError=function(Z,Q){this.tState=g,this.onError(new Error("Unexpected "+U.toknam(Z)+(Q?"("+JSON.stringify(Q)+")":"")+" in state "+U.toknam(this.state)))},K.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},K.pop=function(){var Z=this.value,Q=this.stack.pop();this.value=Q.value,this.key=Q.key,this.mode=Q.mode,this.emit(Z),this.mode||(this.state=H)},K.emit=function(Z){this.mode&&(this.state=s),this.onValue(Z)},K.onValue=function(Z){},K.onToken=function(Z,Q){if(this.state===H)if(Z===p||Z===d||Z===o||Z===a||Z===h)this.value&&(this.value[this.key]=Q),this.emit(Q);else if(Z===u)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=G,this.mode=x;else if(Z===l)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=k,this.state=H;else if(Z===n)if(this.mode===x)this.pop();else return this.parseError(Z,Q);else if(Z===c)if(this.mode===k)this.pop();else return this.parseError(Z,Q);else return this.parseError(Z,Q);else if(this.state===G)if(Z===p)this.key=Q,this.state=r;else if(Z===n)this.pop();else return this.parseError(Z,Q);else if(this.state===r)if(Z===r)this.state=H;else return this.parseError(Z,Q);else if(this.state===s)if(Z===s)this.mode===k?(this.key++,this.state=H):this.mode===x&&(this.state=G);else if(Z===c&&this.mode===k||Z===n&&this.mode===x)this.pop();else return this.parseError(Z,Q);else return this.parseError(Z,Q)},U.C=i,t.exports=U}),vL=J((e,t)=>{var i=yL(),{Minipass:u}=ke(),n=class extends Error{static{S(this,"JSONStreamError")}constructor(r,s){super(r.message),Error.captureStackTrace(this,s||this.constructor)}get name(){return"JSONStreamError"}},l=S((r,s)=>typeof r=="string"?String(s)===r:r&&typeof r.test=="function"?r.test(s):typeof r=="boolean"||typeof r=="object"?r:typeof r=="function"?r(s):!1,"check"),c=class am extends u{static{S(this,"JSONStream")}#e=0;#t=!1;#r=null;#s=null;#n=null;#c;#u;#h=null;#o=null;constructor(s){super({...s,objectMode:!0});let o=this.#u=new i;o.onValue=a=>this.#i(a),this.#c=o.onToken,o.onToken=(a,h)=>this.#l(a,h),o.onError=a=>this.#a(a),this.#h=typeof s.path=="string"?s.path.split(".").map(a=>a==="$*"?{emitKey:!0}:a==="*"?!0:a===""?{recurse:!0}:a):Array.isArray(s.path)&&s.path.length?s.path:null,typeof s.map=="function"&&(this.#n=s.map)}#p(s,o){this.#s!==!1&&(this.#s=this.#s||{},this.#s[s]=o),this.#r!==!1&&this.#s===!1&&(this.#r=this.#r||{},this.#r[s]=o)}#a(s){let o=this.#t?this.end:this.write;return this.#t=!1,this.emit("error",new n(s,o))}#l(s,o){let a=this.#u;if(this.#c.call(this.#u,s,o),a.stack.length===0&&this.#o){let h=this.#o;this.#h||super.write(h),this.#o=null,this.#e=0}}#i(s){let o=this.#u;if(this.#o=s,!this.#h)return;let a=0,h=0,p=!1;for(;a<this.#h.length;){let m=this.#h[a];if(h++,m&&!m.recurse){let g=h===o.stack.length?o:o.stack[h];if(!g)return;if(!l(m,g.key)){this.#p(g.key,s);return}p=!!m.emitKey,a++}else{if(a++,a>=this.#h.length)return;let g=this.#h[a];if(!g)return;for(;;){let f=h===o.stack.length?o:o.stack[h];if(!f)return;if(l(g,f.key)){a++,Object.isFrozen(o.stack[h])||(o.stack[h].value=null);break}else this.#p(f.key,s);h++}}}if(this.#s){let m=this.#s;this.#s=!1,this.emit("header",m)}if(h!==o.stack.length)return;this.#e++;let d=o.stack.slice(1).map(m=>m.key).concat([o.key]);if(s!=null){let m=this.#n?this.#n(s,d):s;if(m!=null){let g=p?{value:m}:m;p&&(g.key=o.key),super.write(g)}}o.value&&delete o.value[o.key];for(let m of o.stack)m.value=null}write(s,o){if(typeof s=="string")s=Buffer.from(s,o);else if(!Buffer.isBuffer(s))return this.emit("error",new TypeError("Can only parse JSON from string or buffer input"));return this.#u.write(s),this.flowing}end(s,o){this.#t=!0,s&&this.write(s,o);let a=this.#s;this.#s=null;let h=this.#r;return this.#r=null,a&&this.emit("header",a),h&&this.emit("footer",h),super.end()}static get JSONStreamError(){return n}static parse(s,o){return new am({path:s,map:o})}};t.exports=c}),lm=J((e,t)=>{"use strict";var{HttpErrorAuthOTP:i}=Bg(),u=$k(),n=jk(),l=on(),c=vL(),r=ws(),s=require("querystring"),o=require("url"),a=sn(),{Minipass:h}=ke(),p=Vg(),d=S(b=>{try{return!!new o.URL(b)}catch{return!1}},"urlIsValid");t.exports=m;function m(b,w={}){let _={...p,...w},O=d(b),A=_.registry||p.registry;O||(A=_.registry=_.spec&&y(_.spec,_)||_.registry||A,b=`${A.trim().replace(/\/?$/g,"")}/${b.trim().replace(/^\//,"")}`,new o.URL(b));let I=_.method||"GET",P=Date.now(),L=n(b,_),j=E(b,L,_),N=_.body,M=h.isStream(N),B=N&&typeof N=="object"&&typeof N.then=="function";if(N&&!M&&!B&&typeof N!="string"&&!Buffer.isBuffer(N)?(j["content-type"]=j["content-type"]||"application/json",N=JSON.stringify(N)):N&&!j["content-type"]&&(j["content-type"]="application/octet-stream"),_.gzip)if(j["content-encoding"]="gzip",M){let H=new a.Gzip;N.on("error",G=>H.emit("error",G)),N=N.pipe(H)}else B||(N=new a.Gzip().end(N).concat());let F=new o.URL(b);if(_.query){let H=typeof _.query=="string"?s.parse(_.query):_.query;Object.keys(H).forEach(G=>{H[G]!==void 0&&F.searchParams.set(G,H[G])}),b=o.format(F)}F.searchParams.get("write")==="true"&&I==="GET"&&(_.offline=!1,_.preferOffline=!1,_.preferOnline=!0);let D=S(async H=>{let G=l(b,{agent:_.agent,algorithms:_.algorithms,body:H,cache:v(_),cachePath:_.cache,ca:_.ca,cert:L.cert||_.cert,headers:j,integrity:_.integrity,key:L.key||_.key,localAddress:_.localAddress,maxSockets:_.maxSockets,memoize:_.memoize,method:I,noProxy:_.noProxy,proxy:_.httpsProxy||_.proxy,retry:_.retry?_.retry:{retries:_.fetchRetries,factor:_.fetchRetryFactor,minTimeout:_.fetchRetryMintimeout,maxTimeout:_.fetchRetryMaxtimeout},strictSSL:_.strictSSL,timeout:_.timeout||3e4}).then(x=>u({method:I,uri:b,res:x,registry:A,startTime:P,auth:L,opts:_}));return typeof _.otpPrompt=="function"?G.catch(async x=>{if(x instanceof i){let k;try{k=await _.otpPrompt()}catch{}if(!k)throw x;return m(b,{..._,otp:k})}throw x}):G},"doFetch");return Promise.resolve(N).then(D)}S(m,"regFetch"),t.exports.getAuth=n,t.exports.json=g;function g(b,w){return m(b,w).then(_=>_.json())}S(g,"fetchJSON"),t.exports.json.stream=f;function f(b,w,_={}){let O={...p,..._},A=c.parse(w,O.mapJSON);return m(b,O).then(I=>I.body.on("error",P=>A.emit("error",P)).pipe(A)).catch(I=>A.emit("error",I)),A}S(f,"fetchJSONStream"),t.exports.pickRegistry=y;function y(b,w={}){b=r(b);let _=b.scope&&w[b.scope.replace(/^@?/,"@")+":registry"];return!_&&w.scope&&(_=w[w.scope.replace(/^@?/,"@")+":registry"]),_||(_=w.registry||p.registry),_}S(y,"pickRegistry");function v(b){return b.offline?"only-if-cached":b.preferOffline?"force-cache":b.preferOnline?"no-cache":"default"}S(v,"getCacheMode");function E(b,w,_){let O=Object.assign({"user-agent":_.userAgent},_.headers||{});return _.authType&&(O["npm-auth-type"]=_.authType),_.scope&&(O["npm-scope"]=_.scope),_.npmSession&&(O["npm-session"]=_.npmSession),_.npmCommand&&(O["npm-command"]=_.npmCommand),w.token?O.authorization=`Bearer ${w.token}`:w.auth&&(O.authorization=`Basic ${w.auth}`),_.otp&&(O["npm-otp"]=_.otp),O}S(E,"getHeaders")}),cm=J((e,t)=>{t.exports={name:"pacote",version:"21.0.1",description:"JavaScript package downloader",author:"GitHub Inc.",bin:{pacote:"bin/index.js"},license:"ISC",main:"lib/index.js",scripts:{test:"tap",snap:"tap",lint:"npm run eslint",postlint:"template-oss-check",lintfix:"npm run eslint -- --fix",posttest:"npm run lint","template-oss-apply":"template-oss-apply --force",eslint:'eslint "**/*.{js,cjs,ts,mjs,jsx,tsx}"'},tap:{timeout:300,"nyc-arg":["--exclude","tap-snapshots/**"]},devDependencies:{"@npmcli/arborist":"^9.0.2","@npmcli/eslint-config":"^5.0.0","@npmcli/template-oss":"4.23.4","hosted-git-info":"^9.0.0","mutate-fs":"^2.1.1",nock:"^13.2.4","npm-registry-mock":"^1.3.2",rimraf:"^6.0.1",tap:"^16.0.1"},files:["bin/","lib/"],keywords:["packages","npm","git"],dependencies:{"@npmcli/git":"^6.0.0","@npmcli/installed-package-contents":"^3.0.0","@npmcli/package-json":"^7.0.0","@npmcli/promise-spawn":"^8.0.0","@npmcli/run-script":"^10.0.0",cacache:"^20.0.0","fs-minipass":"^3.0.0",minipass:"^7.0.2","npm-package-arg":"^13.0.0","npm-packlist":"^10.0.1","npm-pick-manifest":"^10.0.0","npm-registry-fetch":"^19.0.0","proc-log":"^5.0.0","promise-retry":"^2.0.1",sigstore:"^4.0.0",ssri:"^12.0.0",tar:"^7.4.3"},engines:{node:"^20.17.0 || >=22.9.0"},repository:{type:"git",url:"git+https://github.com/npm/pacote.git"},templateOSS:{"//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",version:"4.23.4",windowsCI:!1,publish:"true"}}}),an=J((e,t)=>{var i=lm(),{Minipass:u}=ke(),n=kr(),l=Cs(),c=Tr(),r=cm().version,s=class extends n{static{S(this,"RemoteFetcher")}constructor(o,a){super(o,a),this.resolved=this.spec.fetchSpec;let h=new URL(this.resolved);this.replaceRegistryHost!=="never"&&(this.replaceRegistryHost==="always"||this.replaceRegistryHost===h.host)&&(this.resolved=new URL(h.pathname,this.registry).href);let p=this.spec.name?`${this.spec.name}@`:"";this.pkgid=a.pkgid?a.pkgid:`remote:${p}${this.resolved}`}get[c.cacheFetches](){return!1}[c.tarballFromResolved](){let o=new u;o.hasIntegrityEmitter=!0;let a={...this.opts,headers:this.#e(),spec:this.spec,integrity:this.integrity,algorithms:[this.pickIntegrityAlgorithm()]};return i(this.resolved,a).then(h=>{h.body.on("error",p=>o.emit("error",p)),h.body.on("integrity",p=>{this.integrity=p,o.emit("integrity",p)}),h.body.pipe(o)}).catch(h=>o.emit("error",h)),o}#e(){return{"user-agent":this.opts.userAgent||`pacote/${r} node/${process.version}`,...this.opts.headers||{},"pacote-version":r,"pacote-req-type":"tarball","pacote-pkg-id":this.pkgid,...this.integrity?{"pacote-integrity":String(this.integrity)}:{},...this.opts.headers||{}}}get types(){return["remote"]}packument(){return l.prototype.packument.apply(this)}manifest(){return l.prototype.manifest.apply(this)}};t.exports=s}),SL=J((e,t)=>{var i=S((u,n)=>{if(u.hosted){let l=u.hosted,c={noCommittish:!0};return`${l.https&&l.auth?l.https(c):l.shortcut(c)}#${n}`}else return u.rawSpec.replace(/#.*$/,"")+`#${n}`},"addGitSha");t.exports=i}),EL=J((e,t)=>{var i=Fl();t.exports=(u,n,l,c,r)=>{let s=u.endsWith(".js"),o=s?process.execPath:u,a=(s?[u]:[]).concat(n);return i(o,a,{cwd:l,env:c},r)}}),um=J((e,t)=>{var i=rn(),u=fg(),n=ws(),l=Kl(),{Minipass:c}=ke(),{log:r}=yt(),s=oc(),o=kr(),a=Cs(),h=an(),p=Tr(),d=SL(),m=EL(),g=/^[a-f0-9]{40}$/,f=S((E,b)=>E.sshurl&&!(E.https&&E.auth)&&y(E.sshurl(b))||E.https&&y(E.https(b)),"repoUrl"),y=S(E=>E&&`git+${E}`.replace(/^(git\+)+/,"git+"),"addGitPlus"),v=class extends o{static{S(this,"GitFetcher")}constructor(E,b){super(E,b),this.opts.integrity&&(delete this.opts.integrity,r.warn(`skipping integrity check for git dependency ${this.spec.fetchSpec}`)),this.resolvedRef=null,this.spec.hosted&&(this.from=this.spec.hosted.shortcut({noCommittish:!1})),this.spec.gitCommittish&&g.test(this.spec.gitCommittish)?(this.resolvedSha=this.spec.gitCommittish,this.resolved=this.spec.hosted?f(this.spec.hosted,{noCommittish:!1}):this.spec.rawSpec):this.resolvedSha="",this.Arborist=b.Arborist||null}static repoUrl(E,b){return f(E,b)}get types(){return["git"]}resolve(){if(this.resolved)return super.resolve();let E=this.spec.hosted;return E?this.#e(E):this.#t(this.spec.fetchSpec)}#e(E){return this.#t(E.https&&E.https()).catch(b=>{if(b instanceof u.errors.GitPathspecError)throw b;let w=E.sshurl&&E.sshurl();if(!w||E.auth)throw b;return this.#t(w)})}#t(E){if(!E)return Promise.reject(new Error(`No git url for ${this.spec}`));let b=this.spec.gitRange,w=this.spec.name;return u.revs(E,this.opts).then(_=>b?l({versions:_.versions,"dist-tags":_["dist-tags"],name:w},b,this.opts):this.spec.gitCommittish?_.refs[this.spec.gitCommittish]||_.refs[_.shas[this.spec.gitCommittish]]:_.refs.HEAD).then(_=>!_||!_.sha?this.#n():(this.resolvedRef=_,this.resolvedSha=_.sha,this.#s(_.sha),this.resolved))}#r(E){this.resolved=this.spec.hosted?f(n(E).hosted,{noCommittish:!1}):E}#s(E){this.#r(d(this.spec,E))}#n(){return this.#u(()=>this.resolved)}#c(E){return this[p.readPackageJson](E).then(b=>{let w=b.scripts;if(!b.workspaces&&(!w||!(w.postinstall||w.build||w.preinstall||w.install||w.prepack||w.prepare)))return;let _=process.env._PACOTE_NO_PREPARE_?process.env._PACOTE_NO_PREPARE_.split(`
73
- `):[];if(_.includes(this.resolved)){r.info("prepare","skip prepare, already seen",this.resolved);return}return _.push(this.resolved),m(this.npmBin,[].concat(this.npmInstallCmd).concat(this.npmCliConfig),E,{...process.env,_PACOTE_NO_PREPARE_:_.join(`
74
- `)},{message:"git dep preparation failed"})})}[p.tarballFromResolved](){let E=new c;return E.resolved=this.resolved,E.from=this.from,this.#u(b=>this.#c(b).then(()=>new Promise((w,_)=>{if(!this.Arborist)throw new Error("GitFetcher requires an Arborist constructor to pack a tarball");let O=new s(`file:${b}`,{...this.opts,Arborist:this.Arborist,resolved:null,integrity:null})[p.tarballFromResolved]();O.on("error",_),O.on("end",w),O.pipe(E)}))).catch(b=>E.emit("error",b)),E}#u(E,b=!0){let w={tmpPrefix:"git-clone"},_=this.resolvedSha||this.spec.gitCommittish,O=this.spec.hosted,A=this.resolved;return b=b&&O&&A===f(O,{noCommittish:!1})&&O.tarball,i.tmp.withTmp(this.cache,w,async I=>{if(b){let L=this.spec.name?`${this.spec.name}@`:"";return new h(O.tarball({noCommittish:!1}),{...this.opts,allowGitIgnore:!0,pkgid:`git:${L}${this.resolved}`,resolved:this.resolved,integrity:null}).extract(I).then(()=>E(I),j=>{if(j.constructor.name.match(/^Http/))return this.#u(E,!1);throw j})}let P=await(O?this.#h(_,I):this.#o(this.spec.fetchSpec,_,I));return this.resolvedSha=P,this.resolved||await this.#s(P),E(I)})}#h(E,b){let w=this.spec.hosted;return this.#o(w.https({noCommittish:!0}),E,b).catch(_=>{if(_ instanceof u.errors.GitPathspecError)throw _;let O=w.sshurl&&w.sshurl({noCommittish:!0});if(!O||w.auth)throw _;return this.#o(O,E,b)})}#o(E,b,w){let{opts:_,spec:O}=this;return u.clone(E,b,w,{..._,spec:O})}manifest(){return this.package?Promise.resolve(this.package):this.spec.hosted&&this.resolved?a.prototype.manifest.apply(this):this.#u(E=>this[p.readPackageJson](E).then(b=>this.package={...b,_resolved:this.resolved,_from:this.from}))}packument(){return a.prototype.packument.apply(this)}};t.exports=v}),hm=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Signature=e.Envelope=void 0,e.Envelope={fromJSON(n){return{payload:u(n.payload)?Buffer.from(t(n.payload)):Buffer.alloc(0),payloadType:u(n.payloadType)?globalThis.String(n.payloadType):"",signatures:globalThis.Array.isArray(n?.signatures)?n.signatures.map(l=>e.Signature.fromJSON(l)):[]}},toJSON(n){let l={};return n.payload.length!==0&&(l.payload=i(n.payload)),n.payloadType!==""&&(l.payloadType=n.payloadType),n.signatures?.length&&(l.signatures=n.signatures.map(c=>e.Signature.toJSON(c))),l}},e.Signature={fromJSON(n){return{sig:u(n.sig)?Buffer.from(t(n.sig)):Buffer.alloc(0),keyid:u(n.keyid)?globalThis.String(n.keyid):""}},toJSON(n){let l={};return n.sig.length!==0&&(l.sig=i(n.sig)),n.keyid!==""&&(l.keyid=n.keyid),l}};function t(n){return Uint8Array.from(globalThis.Buffer.from(n,"base64"))}S(t,"bytesFromBase64");function i(n){return globalThis.Buffer.from(n).toString("base64")}S(i,"base64FromBytes");function u(n){return n!=null}S(u,"isSet")}),bL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Timestamp=void 0,e.Timestamp={fromJSON(i){return{seconds:t(i.seconds)?globalThis.String(i.seconds):"0",nanos:t(i.nanos)?globalThis.Number(i.nanos):0}},toJSON(i){let u={};return i.seconds!=="0"&&(u.seconds=i.seconds),i.nanos!==0&&(u.nanos=Math.round(i.nanos)),u}};function t(i){return i!=null}S(t,"isSet")}),Ts=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimeRange=e.X509CertificateChain=e.SubjectAlternativeName=e.X509Certificate=e.DistinguishedName=e.ObjectIdentifierValuePair=e.ObjectIdentifier=e.PublicKeyIdentifier=e.PublicKey=e.RFC3161SignedTimestamp=e.LogId=e.MessageSignature=e.HashOutput=e.SubjectAlternativeNameType=e.PublicKeyDetails=e.HashAlgorithm=void 0,e.hashAlgorithmFromJSON=u,e.hashAlgorithmToJSON=n,e.publicKeyDetailsFromJSON=c,e.publicKeyDetailsToJSON=r,e.subjectAlternativeNameTypeFromJSON=o,e.subjectAlternativeNameTypeToJSON=a;var t=bL(),i;(function(f){f[f.HASH_ALGORITHM_UNSPECIFIED=0]="HASH_ALGORITHM_UNSPECIFIED",f[f.SHA2_256=1]="SHA2_256",f[f.SHA2_384=2]="SHA2_384",f[f.SHA2_512=3]="SHA2_512",f[f.SHA3_256=4]="SHA3_256",f[f.SHA3_384=5]="SHA3_384"})(i||(e.HashAlgorithm=i={}));function u(f){switch(f){case 0:case"HASH_ALGORITHM_UNSPECIFIED":return i.HASH_ALGORITHM_UNSPECIFIED;case 1:case"SHA2_256":return i.SHA2_256;case 2:case"SHA2_384":return i.SHA2_384;case 3:case"SHA2_512":return i.SHA2_512;case 4:case"SHA3_256":return i.SHA3_256;case 5:case"SHA3_384":return i.SHA3_384;default:throw new globalThis.Error("Unrecognized enum value "+f+" for enum HashAlgorithm")}}S(u,"hashAlgorithmFromJSON");function n(f){switch(f){case i.HASH_ALGORITHM_UNSPECIFIED:return"HASH_ALGORITHM_UNSPECIFIED";case i.SHA2_256:return"SHA2_256";case i.SHA2_384:return"SHA2_384";case i.SHA2_512:return"SHA2_512";case i.SHA3_256:return"SHA3_256";case i.SHA3_384:return"SHA3_384";default:throw new globalThis.Error("Unrecognized enum value "+f+" for enum HashAlgorithm")}}S(n,"hashAlgorithmToJSON");var l;(function(f){f[f.PUBLIC_KEY_DETAILS_UNSPECIFIED=0]="PUBLIC_KEY_DETAILS_UNSPECIFIED",f[f.PKCS1_RSA_PKCS1V5=1]="PKCS1_RSA_PKCS1V5",f[f.PKCS1_RSA_PSS=2]="PKCS1_RSA_PSS",f[f.PKIX_RSA_PKCS1V5=3]="PKIX_RSA_PKCS1V5",f[f.PKIX_RSA_PSS=4]="PKIX_RSA_PSS",f[f.PKIX_RSA_PKCS1V15_2048_SHA256=9]="PKIX_RSA_PKCS1V15_2048_SHA256",f[f.PKIX_RSA_PKCS1V15_3072_SHA256=10]="PKIX_RSA_PKCS1V15_3072_SHA256",f[f.PKIX_RSA_PKCS1V15_4096_SHA256=11]="PKIX_RSA_PKCS1V15_4096_SHA256",f[f.PKIX_RSA_PSS_2048_SHA256=16]="PKIX_RSA_PSS_2048_SHA256",f[f.PKIX_RSA_PSS_3072_SHA256=17]="PKIX_RSA_PSS_3072_SHA256",f[f.PKIX_RSA_PSS_4096_SHA256=18]="PKIX_RSA_PSS_4096_SHA256",f[f.PKIX_ECDSA_P256_HMAC_SHA_256=6]="PKIX_ECDSA_P256_HMAC_SHA_256",f[f.PKIX_ECDSA_P256_SHA_256=5]="PKIX_ECDSA_P256_SHA_256",f[f.PKIX_ECDSA_P384_SHA_384=12]="PKIX_ECDSA_P384_SHA_384",f[f.PKIX_ECDSA_P521_SHA_512=13]="PKIX_ECDSA_P521_SHA_512",f[f.PKIX_ED25519=7]="PKIX_ED25519",f[f.PKIX_ED25519_PH=8]="PKIX_ED25519_PH",f[f.PKIX_ECDSA_P384_SHA_256=19]="PKIX_ECDSA_P384_SHA_256",f[f.PKIX_ECDSA_P521_SHA_256=20]="PKIX_ECDSA_P521_SHA_256",f[f.LMS_SHA256=14]="LMS_SHA256",f[f.LMOTS_SHA256=15]="LMOTS_SHA256",f[f.ML_DSA_65=21]="ML_DSA_65",f[f.ML_DSA_87=22]="ML_DSA_87"})(l||(e.PublicKeyDetails=l={}));function c(f){switch(f){case 0:case"PUBLIC_KEY_DETAILS_UNSPECIFIED":return l.PUBLIC_KEY_DETAILS_UNSPECIFIED;case 1:case"PKCS1_RSA_PKCS1V5":return l.PKCS1_RSA_PKCS1V5;case 2:case"PKCS1_RSA_PSS":return l.PKCS1_RSA_PSS;case 3:case"PKIX_RSA_PKCS1V5":return l.PKIX_RSA_PKCS1V5;case 4:case"PKIX_RSA_PSS":return l.PKIX_RSA_PSS;case 9:case"PKIX_RSA_PKCS1V15_2048_SHA256":return l.PKIX_RSA_PKCS1V15_2048_SHA256;case 10:case"PKIX_RSA_PKCS1V15_3072_SHA256":return l.PKIX_RSA_PKCS1V15_3072_SHA256;case 11:case"PKIX_RSA_PKCS1V15_4096_SHA256":return l.PKIX_RSA_PKCS1V15_4096_SHA256;case 16:case"PKIX_RSA_PSS_2048_SHA256":return l.PKIX_RSA_PSS_2048_SHA256;case 17:case"PKIX_RSA_PSS_3072_SHA256":return l.PKIX_RSA_PSS_3072_SHA256;case 18:case"PKIX_RSA_PSS_4096_SHA256":return l.PKIX_RSA_PSS_4096_SHA256;case 6:case"PKIX_ECDSA_P256_HMAC_SHA_256":return l.PKIX_ECDSA_P256_HMAC_SHA_256;case 5:case"PKIX_ECDSA_P256_SHA_256":return l.PKIX_ECDSA_P256_SHA_256;case 12:case"PKIX_ECDSA_P384_SHA_384":return l.PKIX_ECDSA_P384_SHA_384;case 13:case"PKIX_ECDSA_P521_SHA_512":return l.PKIX_ECDSA_P521_SHA_512;case 7:case"PKIX_ED25519":return l.PKIX_ED25519;case 8:case"PKIX_ED25519_PH":return l.PKIX_ED25519_PH;case 19:case"PKIX_ECDSA_P384_SHA_256":return l.PKIX_ECDSA_P384_SHA_256;case 20:case"PKIX_ECDSA_P521_SHA_256":return l.PKIX_ECDSA_P521_SHA_256;case 14:case"LMS_SHA256":return l.LMS_SHA256;case 15:case"LMOTS_SHA256":return l.LMOTS_SHA256;case 21:case"ML_DSA_65":return l.ML_DSA_65;case 22:case"ML_DSA_87":return l.ML_DSA_87;default:throw new globalThis.Error("Unrecognized enum value "+f+" for enum PublicKeyDetails")}}S(c,"publicKeyDetailsFromJSON");function r(f){switch(f){case l.PUBLIC_KEY_DETAILS_UNSPECIFIED:return"PUBLIC_KEY_DETAILS_UNSPECIFIED";case l.PKCS1_RSA_PKCS1V5:return"PKCS1_RSA_PKCS1V5";case l.PKCS1_RSA_PSS:return"PKCS1_RSA_PSS";case l.PKIX_RSA_PKCS1V5:return"PKIX_RSA_PKCS1V5";case l.PKIX_RSA_PSS:return"PKIX_RSA_PSS";case l.PKIX_RSA_PKCS1V15_2048_SHA256:return"PKIX_RSA_PKCS1V15_2048_SHA256";case l.PKIX_RSA_PKCS1V15_3072_SHA256:return"PKIX_RSA_PKCS1V15_3072_SHA256";case l.PKIX_RSA_PKCS1V15_4096_SHA256:return"PKIX_RSA_PKCS1V15_4096_SHA256";case l.PKIX_RSA_PSS_2048_SHA256:return"PKIX_RSA_PSS_2048_SHA256";case l.PKIX_RSA_PSS_3072_SHA256:return"PKIX_RSA_PSS_3072_SHA256";case l.PKIX_RSA_PSS_4096_SHA256:return"PKIX_RSA_PSS_4096_SHA256";case l.PKIX_ECDSA_P256_HMAC_SHA_256:return"PKIX_ECDSA_P256_HMAC_SHA_256";case l.PKIX_ECDSA_P256_SHA_256:return"PKIX_ECDSA_P256_SHA_256";case l.PKIX_ECDSA_P384_SHA_384:return"PKIX_ECDSA_P384_SHA_384";case l.PKIX_ECDSA_P521_SHA_512:return"PKIX_ECDSA_P521_SHA_512";case l.PKIX_ED25519:return"PKIX_ED25519";case l.PKIX_ED25519_PH:return"PKIX_ED25519_PH";case l.PKIX_ECDSA_P384_SHA_256:return"PKIX_ECDSA_P384_SHA_256";case l.PKIX_ECDSA_P521_SHA_256:return"PKIX_ECDSA_P521_SHA_256";case l.LMS_SHA256:return"LMS_SHA256";case l.LMOTS_SHA256:return"LMOTS_SHA256";case l.ML_DSA_65:return"ML_DSA_65";case l.ML_DSA_87:return"ML_DSA_87";default:throw new globalThis.Error("Unrecognized enum value "+f+" for enum PublicKeyDetails")}}S(r,"publicKeyDetailsToJSON");var s;(function(f){f[f.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED=0]="SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED",f[f.EMAIL=1]="EMAIL",f[f.URI=2]="URI",f[f.OTHER_NAME=3]="OTHER_NAME"})(s||(e.SubjectAlternativeNameType=s={}));function o(f){switch(f){case 0:case"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED":return s.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED;case 1:case"EMAIL":return s.EMAIL;case 2:case"URI":return s.URI;case 3:case"OTHER_NAME":return s.OTHER_NAME;default:throw new globalThis.Error("Unrecognized enum value "+f+" for enum SubjectAlternativeNameType")}}S(o,"subjectAlternativeNameTypeFromJSON");function a(f){switch(f){case s.SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED:return"SUBJECT_ALTERNATIVE_NAME_TYPE_UNSPECIFIED";case s.EMAIL:return"EMAIL";case s.URI:return"URI";case s.OTHER_NAME:return"OTHER_NAME";default:throw new globalThis.Error("Unrecognized enum value "+f+" for enum SubjectAlternativeNameType")}}S(a,"subjectAlternativeNameTypeToJSON"),e.HashOutput={fromJSON(f){return{algorithm:g(f.algorithm)?u(f.algorithm):0,digest:g(f.digest)?Buffer.from(h(f.digest)):Buffer.alloc(0)}},toJSON(f){let y={};return f.algorithm!==0&&(y.algorithm=n(f.algorithm)),f.digest.length!==0&&(y.digest=p(f.digest)),y}},e.MessageSignature={fromJSON(f){return{messageDigest:g(f.messageDigest)?e.HashOutput.fromJSON(f.messageDigest):void 0,signature:g(f.signature)?Buffer.from(h(f.signature)):Buffer.alloc(0)}},toJSON(f){let y={};return f.messageDigest!==void 0&&(y.messageDigest=e.HashOutput.toJSON(f.messageDigest)),f.signature.length!==0&&(y.signature=p(f.signature)),y}},e.LogId={fromJSON(f){return{keyId:g(f.keyId)?Buffer.from(h(f.keyId)):Buffer.alloc(0)}},toJSON(f){let y={};return f.keyId.length!==0&&(y.keyId=p(f.keyId)),y}},e.RFC3161SignedTimestamp={fromJSON(f){return{signedTimestamp:g(f.signedTimestamp)?Buffer.from(h(f.signedTimestamp)):Buffer.alloc(0)}},toJSON(f){let y={};return f.signedTimestamp.length!==0&&(y.signedTimestamp=p(f.signedTimestamp)),y}},e.PublicKey={fromJSON(f){return{rawBytes:g(f.rawBytes)?Buffer.from(h(f.rawBytes)):void 0,keyDetails:g(f.keyDetails)?c(f.keyDetails):0,validFor:g(f.validFor)?e.TimeRange.fromJSON(f.validFor):void 0}},toJSON(f){let y={};return f.rawBytes!==void 0&&(y.rawBytes=p(f.rawBytes)),f.keyDetails!==0&&(y.keyDetails=r(f.keyDetails)),f.validFor!==void 0&&(y.validFor=e.TimeRange.toJSON(f.validFor)),y}},e.PublicKeyIdentifier={fromJSON(f){return{hint:g(f.hint)?globalThis.String(f.hint):""}},toJSON(f){let y={};return f.hint!==""&&(y.hint=f.hint),y}},e.ObjectIdentifier={fromJSON(f){return{id:globalThis.Array.isArray(f?.id)?f.id.map(y=>globalThis.Number(y)):[]}},toJSON(f){let y={};return f.id?.length&&(y.id=f.id.map(v=>Math.round(v))),y}},e.ObjectIdentifierValuePair={fromJSON(f){return{oid:g(f.oid)?e.ObjectIdentifier.fromJSON(f.oid):void 0,value:g(f.value)?Buffer.from(h(f.value)):Buffer.alloc(0)}},toJSON(f){let y={};return f.oid!==void 0&&(y.oid=e.ObjectIdentifier.toJSON(f.oid)),f.value.length!==0&&(y.value=p(f.value)),y}},e.DistinguishedName={fromJSON(f){return{organization:g(f.organization)?globalThis.String(f.organization):"",commonName:g(f.commonName)?globalThis.String(f.commonName):""}},toJSON(f){let y={};return f.organization!==""&&(y.organization=f.organization),f.commonName!==""&&(y.commonName=f.commonName),y}},e.X509Certificate={fromJSON(f){return{rawBytes:g(f.rawBytes)?Buffer.from(h(f.rawBytes)):Buffer.alloc(0)}},toJSON(f){let y={};return f.rawBytes.length!==0&&(y.rawBytes=p(f.rawBytes)),y}},e.SubjectAlternativeName={fromJSON(f){return{type:g(f.type)?o(f.type):0,identity:g(f.regexp)?{$case:"regexp",regexp:globalThis.String(f.regexp)}:g(f.value)?{$case:"value",value:globalThis.String(f.value)}:void 0}},toJSON(f){let y={};return f.type!==0&&(y.type=a(f.type)),f.identity?.$case==="regexp"?y.regexp=f.identity.regexp:f.identity?.$case==="value"&&(y.value=f.identity.value),y}},e.X509CertificateChain={fromJSON(f){return{certificates:globalThis.Array.isArray(f?.certificates)?f.certificates.map(y=>e.X509Certificate.fromJSON(y)):[]}},toJSON(f){let y={};return f.certificates?.length&&(y.certificates=f.certificates.map(v=>e.X509Certificate.toJSON(v))),y}},e.TimeRange={fromJSON(f){return{start:g(f.start)?m(f.start):void 0,end:g(f.end)?m(f.end):void 0}},toJSON(f){let y={};return f.start!==void 0&&(y.start=f.start.toISOString()),f.end!==void 0&&(y.end=f.end.toISOString()),y}};function h(f){return Uint8Array.from(globalThis.Buffer.from(f,"base64"))}S(h,"bytesFromBase64");function p(f){return globalThis.Buffer.from(f).toString("base64")}S(p,"base64FromBytes");function d(f){let y=(globalThis.Number(f.seconds)||0)*1e3;return y+=(f.nanos||0)/1e6,new globalThis.Date(y)}S(d,"fromTimestamp");function m(f){return f instanceof globalThis.Date?f:typeof f=="string"?new globalThis.Date(f):d(t.Timestamp.fromJSON(f))}S(m,"fromJsonTimestamp");function g(f){return f!=null}S(g,"isSet")}),pm=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TransparencyLogEntry=e.InclusionPromise=e.InclusionProof=e.Checkpoint=e.KindVersion=void 0;var t=Ts();e.KindVersion={fromJSON(l){return{kind:n(l.kind)?globalThis.String(l.kind):"",version:n(l.version)?globalThis.String(l.version):""}},toJSON(l){let c={};return l.kind!==""&&(c.kind=l.kind),l.version!==""&&(c.version=l.version),c}},e.Checkpoint={fromJSON(l){return{envelope:n(l.envelope)?globalThis.String(l.envelope):""}},toJSON(l){let c={};return l.envelope!==""&&(c.envelope=l.envelope),c}},e.InclusionProof={fromJSON(l){return{logIndex:n(l.logIndex)?globalThis.String(l.logIndex):"0",rootHash:n(l.rootHash)?Buffer.from(i(l.rootHash)):Buffer.alloc(0),treeSize:n(l.treeSize)?globalThis.String(l.treeSize):"0",hashes:globalThis.Array.isArray(l?.hashes)?l.hashes.map(c=>Buffer.from(i(c))):[],checkpoint:n(l.checkpoint)?e.Checkpoint.fromJSON(l.checkpoint):void 0}},toJSON(l){let c={};return l.logIndex!=="0"&&(c.logIndex=l.logIndex),l.rootHash.length!==0&&(c.rootHash=u(l.rootHash)),l.treeSize!=="0"&&(c.treeSize=l.treeSize),l.hashes?.length&&(c.hashes=l.hashes.map(r=>u(r))),l.checkpoint!==void 0&&(c.checkpoint=e.Checkpoint.toJSON(l.checkpoint)),c}},e.InclusionPromise={fromJSON(l){return{signedEntryTimestamp:n(l.signedEntryTimestamp)?Buffer.from(i(l.signedEntryTimestamp)):Buffer.alloc(0)}},toJSON(l){let c={};return l.signedEntryTimestamp.length!==0&&(c.signedEntryTimestamp=u(l.signedEntryTimestamp)),c}},e.TransparencyLogEntry={fromJSON(l){return{logIndex:n(l.logIndex)?globalThis.String(l.logIndex):"0",logId:n(l.logId)?t.LogId.fromJSON(l.logId):void 0,kindVersion:n(l.kindVersion)?e.KindVersion.fromJSON(l.kindVersion):void 0,integratedTime:n(l.integratedTime)?globalThis.String(l.integratedTime):"0",inclusionPromise:n(l.inclusionPromise)?e.InclusionPromise.fromJSON(l.inclusionPromise):void 0,inclusionProof:n(l.inclusionProof)?e.InclusionProof.fromJSON(l.inclusionProof):void 0,canonicalizedBody:n(l.canonicalizedBody)?Buffer.from(i(l.canonicalizedBody)):Buffer.alloc(0)}},toJSON(l){let c={};return l.logIndex!=="0"&&(c.logIndex=l.logIndex),l.logId!==void 0&&(c.logId=t.LogId.toJSON(l.logId)),l.kindVersion!==void 0&&(c.kindVersion=e.KindVersion.toJSON(l.kindVersion)),l.integratedTime!=="0"&&(c.integratedTime=l.integratedTime),l.inclusionPromise!==void 0&&(c.inclusionPromise=e.InclusionPromise.toJSON(l.inclusionPromise)),l.inclusionProof!==void 0&&(c.inclusionProof=e.InclusionProof.toJSON(l.inclusionProof)),l.canonicalizedBody.length!==0&&(c.canonicalizedBody=u(l.canonicalizedBody)),c}};function i(l){return Uint8Array.from(globalThis.Buffer.from(l,"base64"))}S(i,"bytesFromBase64");function u(l){return globalThis.Buffer.from(l).toString("base64")}S(u,"base64FromBytes");function n(l){return l!=null}S(n,"isSet")}),dm=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Bundle=e.VerificationMaterial=e.TimestampVerificationData=void 0;var t=hm(),i=Ts(),u=pm();e.TimestampVerificationData={fromJSON(l){return{rfc3161Timestamps:globalThis.Array.isArray(l?.rfc3161Timestamps)?l.rfc3161Timestamps.map(c=>i.RFC3161SignedTimestamp.fromJSON(c)):[]}},toJSON(l){let c={};return l.rfc3161Timestamps?.length&&(c.rfc3161Timestamps=l.rfc3161Timestamps.map(r=>i.RFC3161SignedTimestamp.toJSON(r))),c}},e.VerificationMaterial={fromJSON(l){return{content:n(l.publicKey)?{$case:"publicKey",publicKey:i.PublicKeyIdentifier.fromJSON(l.publicKey)}:n(l.x509CertificateChain)?{$case:"x509CertificateChain",x509CertificateChain:i.X509CertificateChain.fromJSON(l.x509CertificateChain)}:n(l.certificate)?{$case:"certificate",certificate:i.X509Certificate.fromJSON(l.certificate)}:void 0,tlogEntries:globalThis.Array.isArray(l?.tlogEntries)?l.tlogEntries.map(c=>u.TransparencyLogEntry.fromJSON(c)):[],timestampVerificationData:n(l.timestampVerificationData)?e.TimestampVerificationData.fromJSON(l.timestampVerificationData):void 0}},toJSON(l){let c={};return l.content?.$case==="publicKey"?c.publicKey=i.PublicKeyIdentifier.toJSON(l.content.publicKey):l.content?.$case==="x509CertificateChain"?c.x509CertificateChain=i.X509CertificateChain.toJSON(l.content.x509CertificateChain):l.content?.$case==="certificate"&&(c.certificate=i.X509Certificate.toJSON(l.content.certificate)),l.tlogEntries?.length&&(c.tlogEntries=l.tlogEntries.map(r=>u.TransparencyLogEntry.toJSON(r))),l.timestampVerificationData!==void 0&&(c.timestampVerificationData=e.TimestampVerificationData.toJSON(l.timestampVerificationData)),c}},e.Bundle={fromJSON(l){return{mediaType:n(l.mediaType)?globalThis.String(l.mediaType):"",verificationMaterial:n(l.verificationMaterial)?e.VerificationMaterial.fromJSON(l.verificationMaterial):void 0,content:n(l.messageSignature)?{$case:"messageSignature",messageSignature:i.MessageSignature.fromJSON(l.messageSignature)}:n(l.dsseEnvelope)?{$case:"dsseEnvelope",dsseEnvelope:t.Envelope.fromJSON(l.dsseEnvelope)}:void 0}},toJSON(l){let c={};return l.mediaType!==""&&(c.mediaType=l.mediaType),l.verificationMaterial!==void 0&&(c.verificationMaterial=e.VerificationMaterial.toJSON(l.verificationMaterial)),l.content?.$case==="messageSignature"?c.messageSignature=i.MessageSignature.toJSON(l.content.messageSignature):l.content?.$case==="dsseEnvelope"&&(c.dsseEnvelope=t.Envelope.toJSON(l.content.dsseEnvelope)),c}};function n(l){return l!=null}S(n,"isSet")}),fm=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientTrustConfig=e.ServiceConfiguration=e.Service=e.SigningConfig=e.TrustedRoot=e.CertificateAuthority=e.TransparencyLogInstance=e.ServiceSelector=void 0,e.serviceSelectorFromJSON=u,e.serviceSelectorToJSON=n;var t=Ts(),i;(function(c){c[c.SERVICE_SELECTOR_UNDEFINED=0]="SERVICE_SELECTOR_UNDEFINED",c[c.ALL=1]="ALL",c[c.ANY=2]="ANY",c[c.EXACT=3]="EXACT"})(i||(e.ServiceSelector=i={}));function u(c){switch(c){case 0:case"SERVICE_SELECTOR_UNDEFINED":return i.SERVICE_SELECTOR_UNDEFINED;case 1:case"ALL":return i.ALL;case 2:case"ANY":return i.ANY;case 3:case"EXACT":return i.EXACT;default:throw new globalThis.Error("Unrecognized enum value "+c+" for enum ServiceSelector")}}S(u,"serviceSelectorFromJSON");function n(c){switch(c){case i.SERVICE_SELECTOR_UNDEFINED:return"SERVICE_SELECTOR_UNDEFINED";case i.ALL:return"ALL";case i.ANY:return"ANY";case i.EXACT:return"EXACT";default:throw new globalThis.Error("Unrecognized enum value "+c+" for enum ServiceSelector")}}S(n,"serviceSelectorToJSON"),e.TransparencyLogInstance={fromJSON(c){return{baseUrl:l(c.baseUrl)?globalThis.String(c.baseUrl):"",hashAlgorithm:l(c.hashAlgorithm)?(0,t.hashAlgorithmFromJSON)(c.hashAlgorithm):0,publicKey:l(c.publicKey)?t.PublicKey.fromJSON(c.publicKey):void 0,logId:l(c.logId)?t.LogId.fromJSON(c.logId):void 0,checkpointKeyId:l(c.checkpointKeyId)?t.LogId.fromJSON(c.checkpointKeyId):void 0,operator:l(c.operator)?globalThis.String(c.operator):""}},toJSON(c){let r={};return c.baseUrl!==""&&(r.baseUrl=c.baseUrl),c.hashAlgorithm!==0&&(r.hashAlgorithm=(0,t.hashAlgorithmToJSON)(c.hashAlgorithm)),c.publicKey!==void 0&&(r.publicKey=t.PublicKey.toJSON(c.publicKey)),c.logId!==void 0&&(r.logId=t.LogId.toJSON(c.logId)),c.checkpointKeyId!==void 0&&(r.checkpointKeyId=t.LogId.toJSON(c.checkpointKeyId)),c.operator!==""&&(r.operator=c.operator),r}},e.CertificateAuthority={fromJSON(c){return{subject:l(c.subject)?t.DistinguishedName.fromJSON(c.subject):void 0,uri:l(c.uri)?globalThis.String(c.uri):"",certChain:l(c.certChain)?t.X509CertificateChain.fromJSON(c.certChain):void 0,validFor:l(c.validFor)?t.TimeRange.fromJSON(c.validFor):void 0,operator:l(c.operator)?globalThis.String(c.operator):""}},toJSON(c){let r={};return c.subject!==void 0&&(r.subject=t.DistinguishedName.toJSON(c.subject)),c.uri!==""&&(r.uri=c.uri),c.certChain!==void 0&&(r.certChain=t.X509CertificateChain.toJSON(c.certChain)),c.validFor!==void 0&&(r.validFor=t.TimeRange.toJSON(c.validFor)),c.operator!==""&&(r.operator=c.operator),r}},e.TrustedRoot={fromJSON(c){return{mediaType:l(c.mediaType)?globalThis.String(c.mediaType):"",tlogs:globalThis.Array.isArray(c?.tlogs)?c.tlogs.map(r=>e.TransparencyLogInstance.fromJSON(r)):[],certificateAuthorities:globalThis.Array.isArray(c?.certificateAuthorities)?c.certificateAuthorities.map(r=>e.CertificateAuthority.fromJSON(r)):[],ctlogs:globalThis.Array.isArray(c?.ctlogs)?c.ctlogs.map(r=>e.TransparencyLogInstance.fromJSON(r)):[],timestampAuthorities:globalThis.Array.isArray(c?.timestampAuthorities)?c.timestampAuthorities.map(r=>e.CertificateAuthority.fromJSON(r)):[]}},toJSON(c){let r={};return c.mediaType!==""&&(r.mediaType=c.mediaType),c.tlogs?.length&&(r.tlogs=c.tlogs.map(s=>e.TransparencyLogInstance.toJSON(s))),c.certificateAuthorities?.length&&(r.certificateAuthorities=c.certificateAuthorities.map(s=>e.CertificateAuthority.toJSON(s))),c.ctlogs?.length&&(r.ctlogs=c.ctlogs.map(s=>e.TransparencyLogInstance.toJSON(s))),c.timestampAuthorities?.length&&(r.timestampAuthorities=c.timestampAuthorities.map(s=>e.CertificateAuthority.toJSON(s))),r}},e.SigningConfig={fromJSON(c){return{mediaType:l(c.mediaType)?globalThis.String(c.mediaType):"",caUrls:globalThis.Array.isArray(c?.caUrls)?c.caUrls.map(r=>e.Service.fromJSON(r)):[],oidcUrls:globalThis.Array.isArray(c?.oidcUrls)?c.oidcUrls.map(r=>e.Service.fromJSON(r)):[],rekorTlogUrls:globalThis.Array.isArray(c?.rekorTlogUrls)?c.rekorTlogUrls.map(r=>e.Service.fromJSON(r)):[],rekorTlogConfig:l(c.rekorTlogConfig)?e.ServiceConfiguration.fromJSON(c.rekorTlogConfig):void 0,tsaUrls:globalThis.Array.isArray(c?.tsaUrls)?c.tsaUrls.map(r=>e.Service.fromJSON(r)):[],tsaConfig:l(c.tsaConfig)?e.ServiceConfiguration.fromJSON(c.tsaConfig):void 0}},toJSON(c){let r={};return c.mediaType!==""&&(r.mediaType=c.mediaType),c.caUrls?.length&&(r.caUrls=c.caUrls.map(s=>e.Service.toJSON(s))),c.oidcUrls?.length&&(r.oidcUrls=c.oidcUrls.map(s=>e.Service.toJSON(s))),c.rekorTlogUrls?.length&&(r.rekorTlogUrls=c.rekorTlogUrls.map(s=>e.Service.toJSON(s))),c.rekorTlogConfig!==void 0&&(r.rekorTlogConfig=e.ServiceConfiguration.toJSON(c.rekorTlogConfig)),c.tsaUrls?.length&&(r.tsaUrls=c.tsaUrls.map(s=>e.Service.toJSON(s))),c.tsaConfig!==void 0&&(r.tsaConfig=e.ServiceConfiguration.toJSON(c.tsaConfig)),r}},e.Service={fromJSON(c){return{url:l(c.url)?globalThis.String(c.url):"",majorApiVersion:l(c.majorApiVersion)?globalThis.Number(c.majorApiVersion):0,validFor:l(c.validFor)?t.TimeRange.fromJSON(c.validFor):void 0,operator:l(c.operator)?globalThis.String(c.operator):""}},toJSON(c){let r={};return c.url!==""&&(r.url=c.url),c.majorApiVersion!==0&&(r.majorApiVersion=Math.round(c.majorApiVersion)),c.validFor!==void 0&&(r.validFor=t.TimeRange.toJSON(c.validFor)),c.operator!==""&&(r.operator=c.operator),r}},e.ServiceConfiguration={fromJSON(c){return{selector:l(c.selector)?u(c.selector):0,count:l(c.count)?globalThis.Number(c.count):0}},toJSON(c){let r={};return c.selector!==0&&(r.selector=n(c.selector)),c.count!==0&&(r.count=Math.round(c.count)),r}},e.ClientTrustConfig={fromJSON(c){return{mediaType:l(c.mediaType)?globalThis.String(c.mediaType):"",trustedRoot:l(c.trustedRoot)?e.TrustedRoot.fromJSON(c.trustedRoot):void 0,signingConfig:l(c.signingConfig)?e.SigningConfig.fromJSON(c.signingConfig):void 0}},toJSON(c){let r={};return c.mediaType!==""&&(r.mediaType=c.mediaType),c.trustedRoot!==void 0&&(r.trustedRoot=e.TrustedRoot.toJSON(c.trustedRoot)),c.signingConfig!==void 0&&(r.signingConfig=e.SigningConfig.toJSON(c.signingConfig)),r}};function l(c){return c!=null}S(l,"isSet")}),wL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Input=e.Artifact=e.ArtifactVerificationOptions_ObserverTimestampOptions=e.ArtifactVerificationOptions_TlogIntegratedTimestampOptions=e.ArtifactVerificationOptions_TimestampAuthorityOptions=e.ArtifactVerificationOptions_CtlogOptions=e.ArtifactVerificationOptions_TlogOptions=e.ArtifactVerificationOptions=e.PublicKeyIdentities=e.CertificateIdentities=e.CertificateIdentity=void 0;var t=dm(),i=Ts(),u=fm();e.CertificateIdentity={fromJSON(r){return{issuer:c(r.issuer)?globalThis.String(r.issuer):"",san:c(r.san)?i.SubjectAlternativeName.fromJSON(r.san):void 0,oids:globalThis.Array.isArray(r?.oids)?r.oids.map(s=>i.ObjectIdentifierValuePair.fromJSON(s)):[]}},toJSON(r){let s={};return r.issuer!==""&&(s.issuer=r.issuer),r.san!==void 0&&(s.san=i.SubjectAlternativeName.toJSON(r.san)),r.oids?.length&&(s.oids=r.oids.map(o=>i.ObjectIdentifierValuePair.toJSON(o))),s}},e.CertificateIdentities={fromJSON(r){return{identities:globalThis.Array.isArray(r?.identities)?r.identities.map(s=>e.CertificateIdentity.fromJSON(s)):[]}},toJSON(r){let s={};return r.identities?.length&&(s.identities=r.identities.map(o=>e.CertificateIdentity.toJSON(o))),s}},e.PublicKeyIdentities={fromJSON(r){return{publicKeys:globalThis.Array.isArray(r?.publicKeys)?r.publicKeys.map(s=>i.PublicKey.fromJSON(s)):[]}},toJSON(r){let s={};return r.publicKeys?.length&&(s.publicKeys=r.publicKeys.map(o=>i.PublicKey.toJSON(o))),s}},e.ArtifactVerificationOptions={fromJSON(r){return{signers:c(r.certificateIdentities)?{$case:"certificateIdentities",certificateIdentities:e.CertificateIdentities.fromJSON(r.certificateIdentities)}:c(r.publicKeys)?{$case:"publicKeys",publicKeys:e.PublicKeyIdentities.fromJSON(r.publicKeys)}:void 0,tlogOptions:c(r.tlogOptions)?e.ArtifactVerificationOptions_TlogOptions.fromJSON(r.tlogOptions):void 0,ctlogOptions:c(r.ctlogOptions)?e.ArtifactVerificationOptions_CtlogOptions.fromJSON(r.ctlogOptions):void 0,tsaOptions:c(r.tsaOptions)?e.ArtifactVerificationOptions_TimestampAuthorityOptions.fromJSON(r.tsaOptions):void 0,integratedTsOptions:c(r.integratedTsOptions)?e.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.fromJSON(r.integratedTsOptions):void 0,observerOptions:c(r.observerOptions)?e.ArtifactVerificationOptions_ObserverTimestampOptions.fromJSON(r.observerOptions):void 0}},toJSON(r){let s={};return r.signers?.$case==="certificateIdentities"?s.certificateIdentities=e.CertificateIdentities.toJSON(r.signers.certificateIdentities):r.signers?.$case==="publicKeys"&&(s.publicKeys=e.PublicKeyIdentities.toJSON(r.signers.publicKeys)),r.tlogOptions!==void 0&&(s.tlogOptions=e.ArtifactVerificationOptions_TlogOptions.toJSON(r.tlogOptions)),r.ctlogOptions!==void 0&&(s.ctlogOptions=e.ArtifactVerificationOptions_CtlogOptions.toJSON(r.ctlogOptions)),r.tsaOptions!==void 0&&(s.tsaOptions=e.ArtifactVerificationOptions_TimestampAuthorityOptions.toJSON(r.tsaOptions)),r.integratedTsOptions!==void 0&&(s.integratedTsOptions=e.ArtifactVerificationOptions_TlogIntegratedTimestampOptions.toJSON(r.integratedTsOptions)),r.observerOptions!==void 0&&(s.observerOptions=e.ArtifactVerificationOptions_ObserverTimestampOptions.toJSON(r.observerOptions)),s}},e.ArtifactVerificationOptions_TlogOptions={fromJSON(r){return{threshold:c(r.threshold)?globalThis.Number(r.threshold):0,performOnlineVerification:c(r.performOnlineVerification)?globalThis.Boolean(r.performOnlineVerification):!1,disable:c(r.disable)?globalThis.Boolean(r.disable):!1}},toJSON(r){let s={};return r.threshold!==0&&(s.threshold=Math.round(r.threshold)),r.performOnlineVerification!==!1&&(s.performOnlineVerification=r.performOnlineVerification),r.disable!==!1&&(s.disable=r.disable),s}},e.ArtifactVerificationOptions_CtlogOptions={fromJSON(r){return{threshold:c(r.threshold)?globalThis.Number(r.threshold):0,disable:c(r.disable)?globalThis.Boolean(r.disable):!1}},toJSON(r){let s={};return r.threshold!==0&&(s.threshold=Math.round(r.threshold)),r.disable!==!1&&(s.disable=r.disable),s}},e.ArtifactVerificationOptions_TimestampAuthorityOptions={fromJSON(r){return{threshold:c(r.threshold)?globalThis.Number(r.threshold):0,disable:c(r.disable)?globalThis.Boolean(r.disable):!1}},toJSON(r){let s={};return r.threshold!==0&&(s.threshold=Math.round(r.threshold)),r.disable!==!1&&(s.disable=r.disable),s}},e.ArtifactVerificationOptions_TlogIntegratedTimestampOptions={fromJSON(r){return{threshold:c(r.threshold)?globalThis.Number(r.threshold):0,disable:c(r.disable)?globalThis.Boolean(r.disable):!1}},toJSON(r){let s={};return r.threshold!==0&&(s.threshold=Math.round(r.threshold)),r.disable!==!1&&(s.disable=r.disable),s}},e.ArtifactVerificationOptions_ObserverTimestampOptions={fromJSON(r){return{threshold:c(r.threshold)?globalThis.Number(r.threshold):0,disable:c(r.disable)?globalThis.Boolean(r.disable):!1}},toJSON(r){let s={};return r.threshold!==0&&(s.threshold=Math.round(r.threshold)),r.disable!==!1&&(s.disable=r.disable),s}},e.Artifact={fromJSON(r){return{data:c(r.artifactUri)?{$case:"artifactUri",artifactUri:globalThis.String(r.artifactUri)}:c(r.artifact)?{$case:"artifact",artifact:Buffer.from(n(r.artifact))}:c(r.artifactDigest)?{$case:"artifactDigest",artifactDigest:i.HashOutput.fromJSON(r.artifactDigest)}:void 0}},toJSON(r){let s={};return r.data?.$case==="artifactUri"?s.artifactUri=r.data.artifactUri:r.data?.$case==="artifact"?s.artifact=l(r.data.artifact):r.data?.$case==="artifactDigest"&&(s.artifactDigest=i.HashOutput.toJSON(r.data.artifactDigest)),s}},e.Input={fromJSON(r){return{artifactTrustRoot:c(r.artifactTrustRoot)?u.TrustedRoot.fromJSON(r.artifactTrustRoot):void 0,artifactVerificationOptions:c(r.artifactVerificationOptions)?e.ArtifactVerificationOptions.fromJSON(r.artifactVerificationOptions):void 0,bundle:c(r.bundle)?t.Bundle.fromJSON(r.bundle):void 0,artifact:c(r.artifact)?e.Artifact.fromJSON(r.artifact):void 0}},toJSON(r){let s={};return r.artifactTrustRoot!==void 0&&(s.artifactTrustRoot=u.TrustedRoot.toJSON(r.artifactTrustRoot)),r.artifactVerificationOptions!==void 0&&(s.artifactVerificationOptions=e.ArtifactVerificationOptions.toJSON(r.artifactVerificationOptions)),r.bundle!==void 0&&(s.bundle=t.Bundle.toJSON(r.bundle)),r.artifact!==void 0&&(s.artifact=e.Artifact.toJSON(r.artifact)),s}};function n(r){return Uint8Array.from(globalThis.Buffer.from(r,"base64"))}S(n,"bytesFromBase64");function l(r){return globalThis.Buffer.from(r).toString("base64")}S(l,"base64FromBytes");function c(r){return r!=null}S(c,"isSet")}),ln=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(u,n,l,c){c===void 0&&(c=l);var r=Object.getOwnPropertyDescriptor(n,l);(!r||("get"in r?!n.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:S(function(){return n[l]},"get")}),Object.defineProperty(u,c,r)}:function(u,n,l,c){c===void 0&&(c=l),u[c]=n[l]}),i=e&&e.__exportStar||function(u,n){for(var l in u)l!=="default"&&!Object.prototype.hasOwnProperty.call(n,l)&&t(n,u,l)};Object.defineProperty(e,"__esModule",{value:!0}),i(hm(),e),i(dm(),e),i(Ts(),e),i(pm(),e),i(fm(),e),i(wL(),e)}),hc=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BUNDLE_V03_MEDIA_TYPE=e.BUNDLE_V03_LEGACY_MEDIA_TYPE=e.BUNDLE_V02_MEDIA_TYPE=e.BUNDLE_V01_MEDIA_TYPE=void 0,e.isBundleWithCertificateChain=t,e.isBundleWithPublicKey=i,e.isBundleWithMessageSignature=u,e.isBundleWithDsseEnvelope=n,e.BUNDLE_V01_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.1",e.BUNDLE_V02_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.2",e.BUNDLE_V03_LEGACY_MEDIA_TYPE="application/vnd.dev.sigstore.bundle+json;version=0.3",e.BUNDLE_V03_MEDIA_TYPE="application/vnd.dev.sigstore.bundle.v0.3+json";function t(l){return l.verificationMaterial.content.$case==="x509CertificateChain"}S(t,"isBundleWithCertificateChain");function i(l){return l.verificationMaterial.content.$case==="publicKey"}S(i,"isBundleWithPublicKey");function u(l){return l.content.$case==="messageSignature"}S(u,"isBundleWithMessageSignature");function n(l){return l.content.$case==="dsseEnvelope"}S(n,"isBundleWithDsseEnvelope")}),_L=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMessageSignatureBundle=u,e.toDSSEBundle=n;var t=ln(),i=hc();function u(o){return{mediaType:o.certificateChain?i.BUNDLE_V02_MEDIA_TYPE:i.BUNDLE_V03_MEDIA_TYPE,content:{$case:"messageSignature",messageSignature:{messageDigest:{algorithm:t.HashAlgorithm.SHA2_256,digest:o.digest},signature:o.signature}},verificationMaterial:r(o)}}S(u,"toMessageSignatureBundle");function n(o){return{mediaType:o.certificateChain?i.BUNDLE_V02_MEDIA_TYPE:i.BUNDLE_V03_MEDIA_TYPE,content:{$case:"dsseEnvelope",dsseEnvelope:l(o)},verificationMaterial:r(o)}}S(n,"toDSSEBundle");function l(o){return{payloadType:o.artifactType,payload:o.artifact,signatures:[c(o)]}}S(l,"toEnvelope");function c(o){return{keyid:o.keyHint||"",sig:o.signature}}S(c,"toSignature");function r(o){return{content:s(o),tlogEntries:[],timestampVerificationData:{rfc3161Timestamps:[]}}}S(r,"toVerificationMaterial");function s(o){return o.certificate?o.certificateChain?{$case:"x509CertificateChain",x509CertificateChain:{certificates:[{rawBytes:o.certificate}]}}:{$case:"certificate",certificate:{rawBytes:o.certificate}}:{$case:"publicKey",publicKey:{hint:o.keyHint||""}}}S(s,"toKeyContent")}),gm=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ValidationError=void 0;var t=class extends Error{static{S(this,"ValidationError")}constructor(i,u){super(i),this.fields=u}};e.ValidationError=t}),mm=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertBundle=i,e.assertBundleV01=u,e.isBundleV01=n,e.assertBundleV02=l,e.assertBundleLatest=c;var t=gm();function i(h){let p=r(h);if(p.length>0)throw new t.ValidationError("invalid bundle",p)}S(i,"assertBundle");function u(h){let p=[];if(p.push(...r(h)),p.push(...s(h)),p.length>0)throw new t.ValidationError("invalid v0.1 bundle",p)}S(u,"assertBundleV01");function n(h){try{return u(h),!0}catch{return!1}}S(n,"isBundleV01");function l(h){let p=[];if(p.push(...r(h)),p.push(...o(h)),p.length>0)throw new t.ValidationError("invalid v0.2 bundle",p)}S(l,"assertBundleV02");function c(h){let p=[];if(p.push(...r(h)),p.push(...o(h)),p.push(...a(h)),p.length>0)throw new t.ValidationError("invalid bundle",p)}S(c,"assertBundleLatest");function r(h){let p=[];if((h.mediaType===void 0||!h.mediaType.match(/^application\/vnd\.dev\.sigstore\.bundle\+json;version=\d\.\d/)&&!h.mediaType.match(/^application\/vnd\.dev\.sigstore\.bundle\.v\d\.\d\+json/))&&p.push("mediaType"),h.content===void 0)p.push("content");else switch(h.content.$case){case"messageSignature":h.content.messageSignature.messageDigest===void 0?p.push("content.messageSignature.messageDigest"):h.content.messageSignature.messageDigest.digest.length===0&&p.push("content.messageSignature.messageDigest.digest"),h.content.messageSignature.signature.length===0&&p.push("content.messageSignature.signature");break;case"dsseEnvelope":h.content.dsseEnvelope.payload.length===0&&p.push("content.dsseEnvelope.payload"),h.content.dsseEnvelope.signatures.length!==1?p.push("content.dsseEnvelope.signatures"):h.content.dsseEnvelope.signatures[0].sig.length===0&&p.push("content.dsseEnvelope.signatures[0].sig");break}if(h.verificationMaterial===void 0)p.push("verificationMaterial");else{if(h.verificationMaterial.content===void 0)p.push("verificationMaterial.content");else switch(h.verificationMaterial.content.$case){case"x509CertificateChain":h.verificationMaterial.content.x509CertificateChain.certificates.length===0&&p.push("verificationMaterial.content.x509CertificateChain.certificates"),h.verificationMaterial.content.x509CertificateChain.certificates.forEach((d,m)=>{d.rawBytes.length===0&&p.push(`verificationMaterial.content.x509CertificateChain.certificates[${m}].rawBytes`)});break;case"certificate":h.verificationMaterial.content.certificate.rawBytes.length===0&&p.push("verificationMaterial.content.certificate.rawBytes");break}h.verificationMaterial.tlogEntries===void 0?p.push("verificationMaterial.tlogEntries"):h.verificationMaterial.tlogEntries.length>0&&h.verificationMaterial.tlogEntries.forEach((d,m)=>{d.logId===void 0&&p.push(`verificationMaterial.tlogEntries[${m}].logId`),d.kindVersion===void 0&&p.push(`verificationMaterial.tlogEntries[${m}].kindVersion`)})}return p}S(r,"validateBundleBase");function s(h){let p=[];return h.verificationMaterial&&h.verificationMaterial.tlogEntries?.length>0&&h.verificationMaterial.tlogEntries.forEach((d,m)=>{d.inclusionPromise===void 0&&p.push(`verificationMaterial.tlogEntries[${m}].inclusionPromise`)}),p}S(s,"validateInclusionPromise");function o(h){let p=[];return h.verificationMaterial&&h.verificationMaterial.tlogEntries?.length>0&&h.verificationMaterial.tlogEntries.forEach((d,m)=>{d.inclusionProof===void 0?p.push(`verificationMaterial.tlogEntries[${m}].inclusionProof`):d.inclusionProof.checkpoint===void 0&&p.push(`verificationMaterial.tlogEntries[${m}].inclusionProof.checkpoint`)}),p}S(o,"validateInclusionProof");function a(h){let p=[];return h.verificationMaterial?.content?.$case==="x509CertificateChain"&&p.push("verificationMaterial.content.$case"),p}S(a,"validateNoCertificateChain")}),OL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.envelopeToJSON=e.envelopeFromJSON=e.bundleToJSON=e.bundleFromJSON=void 0;var t=ln(),i=hc(),u=mm(),n=S(s=>{let o=t.Bundle.fromJSON(s);switch(o.mediaType){case i.BUNDLE_V01_MEDIA_TYPE:(0,u.assertBundleV01)(o);break;case i.BUNDLE_V02_MEDIA_TYPE:(0,u.assertBundleV02)(o);break;default:(0,u.assertBundleLatest)(o);break}return o},"bundleFromJSON");e.bundleFromJSON=n;var l=S(s=>t.Bundle.toJSON(s),"bundleToJSON");e.bundleToJSON=l;var c=S(s=>t.Envelope.fromJSON(s),"envelopeFromJSON");e.envelopeFromJSON=c;var r=S(s=>t.Envelope.toJSON(s),"envelopeToJSON");e.envelopeToJSON=r}),cn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isBundleV01=e.assertBundleV02=e.assertBundleV01=e.assertBundleLatest=e.assertBundle=e.envelopeToJSON=e.envelopeFromJSON=e.bundleToJSON=e.bundleFromJSON=e.ValidationError=e.isBundleWithPublicKey=e.isBundleWithMessageSignature=e.isBundleWithDsseEnvelope=e.isBundleWithCertificateChain=e.BUNDLE_V03_MEDIA_TYPE=e.BUNDLE_V03_LEGACY_MEDIA_TYPE=e.BUNDLE_V02_MEDIA_TYPE=e.BUNDLE_V01_MEDIA_TYPE=e.toMessageSignatureBundle=e.toDSSEBundle=void 0;var t=_L();Object.defineProperty(e,"toDSSEBundle",{enumerable:!0,get:S(function(){return t.toDSSEBundle},"get")}),Object.defineProperty(e,"toMessageSignatureBundle",{enumerable:!0,get:S(function(){return t.toMessageSignatureBundle},"get")});var i=hc();Object.defineProperty(e,"BUNDLE_V01_MEDIA_TYPE",{enumerable:!0,get:S(function(){return i.BUNDLE_V01_MEDIA_TYPE},"get")}),Object.defineProperty(e,"BUNDLE_V02_MEDIA_TYPE",{enumerable:!0,get:S(function(){return i.BUNDLE_V02_MEDIA_TYPE},"get")}),Object.defineProperty(e,"BUNDLE_V03_LEGACY_MEDIA_TYPE",{enumerable:!0,get:S(function(){return i.BUNDLE_V03_LEGACY_MEDIA_TYPE},"get")}),Object.defineProperty(e,"BUNDLE_V03_MEDIA_TYPE",{enumerable:!0,get:S(function(){return i.BUNDLE_V03_MEDIA_TYPE},"get")}),Object.defineProperty(e,"isBundleWithCertificateChain",{enumerable:!0,get:S(function(){return i.isBundleWithCertificateChain},"get")}),Object.defineProperty(e,"isBundleWithDsseEnvelope",{enumerable:!0,get:S(function(){return i.isBundleWithDsseEnvelope},"get")}),Object.defineProperty(e,"isBundleWithMessageSignature",{enumerable:!0,get:S(function(){return i.isBundleWithMessageSignature},"get")}),Object.defineProperty(e,"isBundleWithPublicKey",{enumerable:!0,get:S(function(){return i.isBundleWithPublicKey},"get")});var u=gm();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:S(function(){return u.ValidationError},"get")});var n=OL();Object.defineProperty(e,"bundleFromJSON",{enumerable:!0,get:S(function(){return n.bundleFromJSON},"get")}),Object.defineProperty(e,"bundleToJSON",{enumerable:!0,get:S(function(){return n.bundleToJSON},"get")}),Object.defineProperty(e,"envelopeFromJSON",{enumerable:!0,get:S(function(){return n.envelopeFromJSON},"get")}),Object.defineProperty(e,"envelopeToJSON",{enumerable:!0,get:S(function(){return n.envelopeToJSON},"get")});var l=mm();Object.defineProperty(e,"assertBundle",{enumerable:!0,get:S(function(){return l.assertBundle},"get")}),Object.defineProperty(e,"assertBundleLatest",{enumerable:!0,get:S(function(){return l.assertBundleLatest},"get")}),Object.defineProperty(e,"assertBundleV01",{enumerable:!0,get:S(function(){return l.assertBundleV01},"get")}),Object.defineProperty(e,"assertBundleV02",{enumerable:!0,get:S(function(){return l.assertBundleV02},"get")}),Object.defineProperty(e,"isBundleV01",{enumerable:!0,get:S(function(){return l.isBundleV01},"get")})}),un=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ByteStream=void 0;var t=class extends Error{static{S(this,"StreamError")}},i=class Ol{static{S(this,"ByteStream")}constructor(n){this.start=0,n?(this.buf=n,this.view=Buffer.from(n)):(this.buf=new ArrayBuffer(0),this.view=Buffer.from(this.buf))}get buffer(){return this.view.subarray(0,this.start)}get length(){return this.view.byteLength}get position(){return this.start}seek(n){this.start=n}slice(n,l){let c=n+l;if(c>this.length)throw new t("request past end of buffer");return this.view.subarray(n,c)}appendChar(n){this.ensureCapacity(1),this.view[this.start]=n,this.start+=1}appendUint16(n){this.ensureCapacity(2);let l=new Uint16Array([n]),c=new Uint8Array(l.buffer);this.view[this.start]=c[1],this.view[this.start+1]=c[0],this.start+=2}appendUint24(n){this.ensureCapacity(3);let l=new Uint32Array([n]),c=new Uint8Array(l.buffer);this.view[this.start]=c[2],this.view[this.start+1]=c[1],this.view[this.start+2]=c[0],this.start+=3}appendView(n){this.ensureCapacity(n.length),this.view.set(n,this.start),this.start+=n.length}getBlock(n){if(n<=0)return Buffer.alloc(0);if(this.start+n>this.view.length)throw new Error("request past end of buffer");let l=this.view.subarray(this.start,this.start+n);return this.start+=n,l}getUint8(){return this.getBlock(1)[0]}getUint16(){let n=this.getBlock(2);return n[0]<<8|n[1]}ensureCapacity(n){if(this.start+n>this.view.byteLength){let l=Ol.BLOCK_SIZE+(n>Ol.BLOCK_SIZE?n:0);this.realloc(this.view.byteLength+l)}}realloc(n){let l=new ArrayBuffer(n),c=Buffer.from(l);c.set(this.view),this.buf=l,this.view=c}};e.ByteStream=i,i.BLOCK_SIZE=1024}),pc=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ASN1TypeError=e.ASN1ParseError=void 0;var t=class extends Error{static{S(this,"ASN1ParseError")}};e.ASN1ParseError=t;var i=class extends Error{static{S(this,"ASN1TypeError")}};e.ASN1TypeError=i}),RL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeLength=i,e.encodeLength=u;var t=pc();function i(n){let l=n.getUint8();if(!(l&128))return l;let c=l&127;if(c>6)throw new t.ASN1ParseError("length exceeds 6 byte limit");let r=0;for(let s=0;s<c;s++)r=r*256+n.getUint8();if(r===0)throw new t.ASN1ParseError("indefinite length encoding not supported");return r}S(i,"decodeLength");function u(n){if(n<128)return Buffer.from([n]);let l=BigInt(n),c=[];for(;l>0n;)c.unshift(Number(l&255n)),l=l>>8n;return Buffer.from([128|c.length,...c])}S(u,"encodeLength")}),AL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseInteger=u,e.parseStringASCII=n,e.parseTime=l,e.parseOID=c,e.parseBoolean=r,e.parseBitString=s;var t=/^(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\.\d{3})?Z$/,i=/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\.\d{3})?Z$/;function u(o){let a=0,h=o.length,p=o[a],d=p>127,m=d?255:0;for(;p==m&&++a<h;)p=o[a];if(h-a===0)return BigInt(d?-1:0);p=d?p-256:p;let g=BigInt(p);for(let f=a+1;f<h;++f)g=g*BigInt(256)+BigInt(o[f]);return g}S(u,"parseInteger");function n(o){return o.toString("ascii")}S(n,"parseStringASCII");function l(o,a){let h=n(o),p=a?t.exec(h):i.exec(h);if(!p)throw new Error("invalid time");if(a){let d=Number(p[1]);d+=d>=50?1900:2e3,p[1]=d.toString()}return new Date(`${p[1]}-${p[2]}-${p[3]}T${p[4]}:${p[5]}:${p[6]}Z`)}S(l,"parseTime");function c(o){let a=0,h=o.length,p=o[a++],d=Math.floor(p/40),m=p%40,g=`${d}.${m}`,f=0;for(;a<h;++a)p=o[a],f=(f<<7)+(p&127),!(p&128)&&(g+=`.${f}`,f=0);return g}S(c,"parseOID");function r(o){return o[0]!==0}S(r,"parseBoolean");function s(o){let a=o[0],h=1,p=o.length,d=[];for(let m=h;m<p;++m){let g=o[m],f=m===p-1?a:0;for(let y=7;y>=f;--y)d.push(g>>y&1)}return d}S(s,"parseBitString")}),CL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ASN1Tag=void 0;var t=pc(),i={BOOLEAN:1,INTEGER:2,BIT_STRING:3,OCTET_STRING:4,OBJECT_IDENTIFIER:6,SEQUENCE:16,SET:17,PRINTABLE_STRING:19,UTC_TIME:23,GENERALIZED_TIME:24},u={UNIVERSAL:0,APPLICATION:1,CONTEXT_SPECIFIC:2,PRIVATE:3},n=class{static{S(this,"ASN1Tag")}constructor(l){if(this.number=l&31,this.constructed=(l&32)===32,this.class=l>>6,this.number===31)throw new t.ASN1ParseError("long form tags not supported");if(this.class===u.UNIVERSAL&&this.number===0)throw new t.ASN1ParseError("unsupported tag 0x00")}isUniversal(){return this.class===u.UNIVERSAL}isContextSpecific(l){let c=this.class===u.CONTEXT_SPECIFIC;return l!==void 0?c&&this.number===l:c}isBoolean(){return this.isUniversal()&&this.number===i.BOOLEAN}isInteger(){return this.isUniversal()&&this.number===i.INTEGER}isBitString(){return this.isUniversal()&&this.number===i.BIT_STRING}isOctetString(){return this.isUniversal()&&this.number===i.OCTET_STRING}isOID(){return this.isUniversal()&&this.number===i.OBJECT_IDENTIFIER}isUTCTime(){return this.isUniversal()&&this.number===i.UTC_TIME}isGeneralizedTime(){return this.isUniversal()&&this.number===i.GENERALIZED_TIME}toDER(){return this.number|(this.constructed?32:0)|this.class<<6}};e.ASN1Tag=n}),IL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ASN1Obj=void 0;var t=un(),i=pc(),u=RL(),n=AL(),l=CL(),c=class{static{S(this,"ASN1Obj")}constructor(o,a,h){this.tag=o,this.value=a,this.subs=h}static parseBuffer(o){return r(new t.ByteStream(o))}toDER(){let o=new t.ByteStream;if(this.subs.length>0)for(let p of this.subs)o.appendView(p.toDER());else o.appendView(this.value);let a=o.buffer,h=new t.ByteStream;return h.appendChar(this.tag.toDER()),h.appendView((0,u.encodeLength)(a.length)),h.appendView(a),h.buffer}toBoolean(){if(!this.tag.isBoolean())throw new i.ASN1TypeError("not a boolean");return(0,n.parseBoolean)(this.value)}toInteger(){if(!this.tag.isInteger())throw new i.ASN1TypeError("not an integer");return(0,n.parseInteger)(this.value)}toOID(){if(!this.tag.isOID())throw new i.ASN1TypeError("not an OID");return(0,n.parseOID)(this.value)}toDate(){switch(!0){case this.tag.isUTCTime():return(0,n.parseTime)(this.value,!0);case this.tag.isGeneralizedTime():return(0,n.parseTime)(this.value,!1);default:throw new i.ASN1TypeError("not a date")}}toBitString(){if(!this.tag.isBitString())throw new i.ASN1TypeError("not a bit string");return(0,n.parseBitString)(this.value)}};e.ASN1Obj=c;function r(o){let a=new l.ASN1Tag(o.getUint8()),h=(0,u.decodeLength)(o),p=o.slice(o.position,h),d=o.position,m=[];if(a.constructed)m=s(o,h);else if(a.isOctetString())try{m=s(o,h)}catch{}return m.length===0&&o.seek(d+h),new c(a,p,m)}S(r,"parseStream");function s(o,a){let h=o.position+a;if(h>o.length)throw new i.ASN1ParseError("invalid length");let p=[];for(;o.position<h;)p.push(r(o));if(o.position!==h)throw new i.ASN1ParseError("invalid length");return p}S(s,"collectSubs")}),dc=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ASN1Obj=void 0;var t=IL();Object.defineProperty(e,"ASN1Obj",{enumerable:!0,get:S(function(){return t.ASN1Obj},"get")})}),Ps=J(e=>{"use strict";var t=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.createPublicKey=u,e.digest=n,e.verify=l,e.bufferEqual=c;var i=t(require("crypto"));function u(r,s="spki"){return typeof r=="string"?i.default.createPublicKey(r):i.default.createPublicKey({key:r,format:"der",type:s})}S(u,"createPublicKey");function n(r,...s){let o=i.default.createHash(r);for(let a of s)o.update(a);return o.digest()}S(n,"digest");function l(r,s,o,a){try{return i.default.verify(a,r,s,o)}catch{return!1}}S(l,"verify");function c(r,s){try{return i.default.timingSafeEqual(r,s)}catch{return!1}}S(c,"bufferEqual")}),TL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preAuthEncoding=i;var t="DSSEv1";function i(u,n){let l=[t,u.length,u,n.length,""].join(" ");return Buffer.concat([Buffer.from(l,"ascii"),n])}S(i,"preAuthEncoding")}),PL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.base64Encode=u,e.base64Decode=n;var t="base64",i="utf-8";function u(l){return Buffer.from(l,i).toString(t)}S(u,"base64Encode");function n(l){return Buffer.from(l,t).toString(i)}S(n,"base64Decode")}),xL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.canonicalize=t;function t(i){let u="";if(i===null||typeof i!="object"||i.toJSON!=null)u+=JSON.stringify(i);else if(Array.isArray(i)){u+="[";let n=!0;i.forEach(l=>{n||(u+=","),n=!1,u+=t(l)}),u+="]"}else{u+="{";let n=!0;Object.keys(i).sort().forEach(l=>{n||(u+=","),n=!1,u+=JSON.stringify(l),u+=":",u+=t(i[l])}),u+="}"}return u}S(t,"canonicalize")}),ym=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toDER=u,e.fromDER=n;var t=/-----BEGIN (.*)-----/,i=/-----END (.*)-----/;function u(l){let c="";return l.split(`
75
- `).forEach(r=>{r.match(t)||r.match(i)||(c+=r)}),Buffer.from(c,"base64")}S(u,"toDER");function n(l,c="CERTIFICATE"){let r=l.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${c}-----`,...r,`-----END ${c}-----`].join(`
76
- `).concat(`
77
- `)}S(n,"fromDER")}),fc=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SHA2_HASH_ALGOS=e.ECDSA_SIGNATURE_ALGOS=void 0,e.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"},e.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}}),vm=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RFC3161TimestampVerificationError=void 0;var t=class extends Error{static{S(this,"RFC3161TimestampVerificationError")}};e.RFC3161TimestampVerificationError=t}),NL=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(s,o,a,h){h===void 0&&(h=a);var p=Object.getOwnPropertyDescriptor(o,a);(!p||("get"in p?!o.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:S(function(){return o[a]},"get")}),Object.defineProperty(s,h,p)}:function(s,o,a,h){h===void 0&&(h=a),s[h]=o[a]}),i=e&&e.__setModuleDefault||(Object.create?function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}:function(s,o){s.default=o}),u=e&&e.__importStar||function(){var s=S(function(o){return s=Object.getOwnPropertyNames||function(a){var h=[];for(var p in a)Object.prototype.hasOwnProperty.call(a,p)&&(h[h.length]=p);return h},s(o)},"ownKeys");return function(o){if(o&&o.__esModule)return o;var a={};if(o!=null)for(var h=s(o),p=0;p<h.length;p++)h[p]!=="default"&&t(a,o,h[p]);return i(a,o),a}}();Object.defineProperty(e,"__esModule",{value:!0}),e.TSTInfo=void 0;var n=u(Ps()),l=fc(),c=vm(),r=class{static{S(this,"TSTInfo")}constructor(s){this.root=s}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let s=this.messageImprintObj.subs[0].subs[0].toOID();return l.SHA2_HASH_ALGOS[s]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(s){let o=n.digest(this.messageImprintHashAlgorithm,s);if(!n.bufferEqual(o,this.messageImprintHashedMessage))throw new c.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};e.TSTInfo=r}),kL=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(d,m,g,f){f===void 0&&(f=g);var y=Object.getOwnPropertyDescriptor(m,g);(!y||("get"in y?!m.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:S(function(){return m[g]},"get")}),Object.defineProperty(d,f,y)}:function(d,m,g,f){f===void 0&&(f=g),d[f]=m[g]}),i=e&&e.__setModuleDefault||(Object.create?function(d,m){Object.defineProperty(d,"default",{enumerable:!0,value:m})}:function(d,m){d.default=m}),u=e&&e.__importStar||function(){var d=S(function(m){return d=Object.getOwnPropertyNames||function(g){var f=[];for(var y in g)Object.prototype.hasOwnProperty.call(g,y)&&(f[f.length]=y);return f},d(m)},"ownKeys");return function(m){if(m&&m.__esModule)return m;var g={};if(m!=null)for(var f=d(m),y=0;y<f.length;y++)f[y]!=="default"&&t(g,m,f[y]);return i(g,m),g}}();Object.defineProperty(e,"__esModule",{value:!0}),e.RFC3161Timestamp=void 0;var n=dc(),l=u(Ps()),c=fc(),r=vm(),s=NL(),o="1.2.840.113549.1.7.2",a="1.2.840.113549.1.9.16.1.4",h="1.2.840.113549.1.9.4",p=class Sm{static{S(this,"RFC3161Timestamp")}constructor(m){this.root=m}static parse(m){let g=n.ASN1Obj.parseBuffer(m);return new Sm(g)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let m=this.signerDigestAlgorithmObj.subs[0].toOID();return c.SHA2_HASH_ALGOS[m]}get signatureAlgorithm(){let m=this.signatureAlgorithmObj.subs[0].toOID();return c.ECDSA_SIGNATURE_ALGOS[m]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new s.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(m,g){if(!this.timeStampTokenObj)throw new r.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==o)throw new r.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==a)throw new r.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(m),this.verifyMessageDigest(),this.verifySignature(g)}verifyMessageDigest(){let m=l.digest(this.signerDigestAlgorithm,this.tstInfo.raw),g=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!l.bufferEqual(m,g))throw new r.RFC3161TimestampVerificationError("signed data does not match tstInfo")}verifySignature(m){let g=this.signedAttrsObj.toDER();if(g[0]=49,!l.verify(g,m,this.signatureValue,this.signatureAlgorithm))throw new r.RFC3161TimestampVerificationError("signature verification failed")}get pkiStatusInfoObj(){return this.root.subs[0]}get timeStampTokenObj(){return this.root.subs[1]}get contentTypeObj(){return this.timeStampTokenObj.subs[0]}get signedDataObj(){return this.timeStampTokenObj.subs.find(m=>m.tag.isContextSpecific(0)).subs[0]}get encapContentInfoObj(){return this.signedDataObj.subs[2]}get signerInfosObj(){let m=this.signedDataObj;return m.subs[m.subs.length-1]}get signerInfoObj(){return this.signerInfosObj.subs[0]}get eContentTypeObj(){return this.encapContentInfoObj.subs[0]}get eContentObj(){return this.encapContentInfoObj.subs[1]}get signedAttrsObj(){return this.signerInfoObj.subs.find(m=>m.tag.isContextSpecific(0))}get messageDigestAttributeObj(){return this.signedAttrsObj.subs.find(m=>m.subs[0].tag.isOID()&&m.subs[0].toOID()===h)}get signerSidObj(){return this.signerInfoObj.subs[1]}get signerDigestAlgorithmObj(){return this.signerInfoObj.subs[2]}get signatureAlgorithmObj(){return this.signerInfoObj.subs[4]}get signatureValueObj(){return this.signerInfoObj.subs[5]}};e.RFC3161Timestamp=p}),LL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RFC3161Timestamp=void 0;var t=kL();Object.defineProperty(e,"RFC3161Timestamp",{enumerable:!0,get:S(function(){return t.RFC3161Timestamp},"get")})}),DL=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(r,s,o,a){a===void 0&&(a=o);var h=Object.getOwnPropertyDescriptor(s,o);(!h||("get"in h?!s.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:S(function(){return s[o]},"get")}),Object.defineProperty(r,a,h)}:function(r,s,o,a){a===void 0&&(a=o),r[a]=s[o]}),i=e&&e.__setModuleDefault||(Object.create?function(r,s){Object.defineProperty(r,"default",{enumerable:!0,value:s})}:function(r,s){r.default=s}),u=e&&e.__importStar||function(){var r=S(function(s){return r=Object.getOwnPropertyNames||function(o){var a=[];for(var h in o)Object.prototype.hasOwnProperty.call(o,h)&&(a[a.length]=h);return a},r(s)},"ownKeys");return function(s){if(s&&s.__esModule)return s;var o={};if(s!=null)for(var a=r(s),h=0;h<a.length;h++)a[h]!=="default"&&t(o,s,a[h]);return i(o,s),o}}();Object.defineProperty(e,"__esModule",{value:!0}),e.SignedCertificateTimestamp=void 0;var n=u(Ps()),l=un(),c=class Em{static{S(this,"SignedCertificateTimestamp")}constructor(s){this.version=s.version,this.logID=s.logID,this.timestamp=s.timestamp,this.extensions=s.extensions,this.hashAlgorithm=s.hashAlgorithm,this.signatureAlgorithm=s.signatureAlgorithm,this.signature=s.signature}get datetime(){return new Date(Number(this.timestamp.readBigInt64BE()))}get algorithm(){switch(this.hashAlgorithm){case 0:return"none";case 1:return"md5";case 2:return"sha1";case 3:return"sha224";case 4:return"sha256";case 5:return"sha384";case 6:return"sha512";default:return"unknown"}}verify(s,o){let a=new l.ByteStream;return a.appendChar(this.version),a.appendChar(0),a.appendView(this.timestamp),a.appendUint16(1),a.appendView(s),a.appendUint16(this.extensions.byteLength),this.extensions.byteLength>0&&a.appendView(this.extensions),n.verify(a.buffer,o,this.signature,this.algorithm)}static parse(s){let o=new l.ByteStream(s),a=o.getUint8(),h=o.getBlock(32),p=o.getBlock(8),d=o.getUint16(),m=o.getBlock(d),g=o.getUint8(),f=o.getUint8(),y=o.getUint16(),v=o.getBlock(y);if(o.position!==s.length)throw new Error("SCT buffer length mismatch");return new Em({version:a,logID:h,timestamp:p,extensions:m,hashAlgorithm:g,signatureAlgorithm:f,signature:v})}};e.SignedCertificateTimestamp=c}),bm=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.X509SCTExtension=e.X509SubjectKeyIDExtension=e.X509AuthorityKeyIDExtension=e.X509SubjectAlternativeNameExtension=e.X509KeyUsageExtension=e.X509BasicConstraintsExtension=e.X509Extension=void 0;var t=un(),i=DL(),u=class{static{S(this,"X509Extension")}constructor(a){this.root=a}get oid(){return this.root.subs[0].toOID()}get critical(){return this.root.subs.length===3?this.root.subs[1].toBoolean():!1}get value(){return this.extnValueObj.value}get valueObj(){return this.extnValueObj}get extnValueObj(){return this.root.subs[this.root.subs.length-1]}};e.X509Extension=u;var n=class extends u{static{S(this,"X509BasicConstraintsExtension")}get isCA(){return this.sequence.subs[0]?.toBoolean()??!1}get pathLenConstraint(){return this.sequence.subs.length>1?this.sequence.subs[1].toInteger():void 0}get sequence(){return this.extnValueObj.subs[0]}};e.X509BasicConstraintsExtension=n;var l=class extends u{static{S(this,"X509KeyUsageExtension")}get digitalSignature(){return this.bitString[0]===1}get keyCertSign(){return this.bitString[5]===1}get crlSign(){return this.bitString[6]===1}get bitString(){return this.extnValueObj.subs[0].toBitString()}};e.X509KeyUsageExtension=l;var c=class extends u{static{S(this,"X509SubjectAlternativeNameExtension")}get rfc822Name(){return this.findGeneralName(1)?.value.toString("ascii")}get uri(){return this.findGeneralName(6)?.value.toString("ascii")}otherName(a){let h=this.findGeneralName(0);return h===void 0||h.subs[0].toOID()!==a?void 0:h.subs[1].subs[0].value.toString("ascii")}findGeneralName(a){return this.generalNames.find(h=>h.tag.isContextSpecific(a))}get generalNames(){return this.extnValueObj.subs[0].subs}};e.X509SubjectAlternativeNameExtension=c;var r=class extends u{static{S(this,"X509AuthorityKeyIDExtension")}get keyIdentifier(){return this.findSequenceMember(0)?.value}findSequenceMember(a){return this.sequence.subs.find(h=>h.tag.isContextSpecific(a))}get sequence(){return this.extnValueObj.subs[0]}};e.X509AuthorityKeyIDExtension=r;var s=class extends u{static{S(this,"X509SubjectKeyIDExtension")}get keyIdentifier(){return this.extnValueObj.subs[0].value}};e.X509SubjectKeyIDExtension=s;var o=class extends u{static{S(this,"X509SCTExtension")}constructor(a){super(a)}get signedCertificateTimestamps(){let a=this.extnValueObj.subs[0].value,h=new t.ByteStream(a),p=h.getUint16()+2,d=[];for(;h.position<p;){let m=h.getUint16(),g=h.getBlock(m);d.push(i.SignedCertificateTimestamp.parse(g))}if(h.position!==p)throw new Error("SCT list length does not match actual length");return d}};e.X509SCTExtension=o}),$L=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(g,f,y,v){v===void 0&&(v=y);var E=Object.getOwnPropertyDescriptor(f,y);(!E||("get"in E?!f.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:S(function(){return f[y]},"get")}),Object.defineProperty(g,v,E)}:function(g,f,y,v){v===void 0&&(v=y),g[v]=f[y]}),i=e&&e.__setModuleDefault||(Object.create?function(g,f){Object.defineProperty(g,"default",{enumerable:!0,value:f})}:function(g,f){g.default=f}),u=e&&e.__importStar||function(){var g=S(function(f){return g=Object.getOwnPropertyNames||function(y){var v=[];for(var E in y)Object.prototype.hasOwnProperty.call(y,E)&&(v[v.length]=E);return v},g(f)},"ownKeys");return function(f){if(f&&f.__esModule)return f;var y={};if(f!=null)for(var v=g(f),E=0;E<v.length;E++)v[E]!=="default"&&t(y,f,v[E]);return i(y,f),y}}();Object.defineProperty(e,"__esModule",{value:!0}),e.X509Certificate=e.EXTENSION_OID_SCT=void 0;var n=dc(),l=u(Ps()),c=fc(),r=u(ym()),s=bm(),o="2.5.29.14",a="2.5.29.15",h="2.5.29.17",p="2.5.29.19",d="2.5.29.35";e.EXTENSION_OID_SCT="1.3.6.1.4.1.11129.2.4.2";var m=class Rl{static{S(this,"X509Certificate")}constructor(f){this.root=f}static parse(f){let y=typeof f=="string"?r.toDER(f):f,v=n.ASN1Obj.parseBuffer(y);return new Rl(v)}get tbsCertificate(){return this.tbsCertificateObj}get version(){return`v${(this.versionObj.subs[0].toInteger()+BigInt(1)).toString()}`}get serialNumber(){return this.serialNumberObj.value}get notBefore(){return this.validityObj.subs[0].toDate()}get notAfter(){return this.validityObj.subs[1].toDate()}get issuer(){return this.issuerObj.value}get subject(){return this.subjectObj.value}get publicKey(){return this.subjectPublicKeyInfoObj.toDER()}get signatureAlgorithm(){let f=this.signatureAlgorithmObj.subs[0].toOID();return c.ECDSA_SIGNATURE_ALGOS[f]}get signatureValue(){return this.signatureValueObj.value.subarray(1)}get subjectAltName(){let f=this.extSubjectAltName;return f?.uri||f?.rfc822Name}get extensions(){return this.extensionsObj?.subs[0]?.subs||[]}get extKeyUsage(){let f=this.findExtension(a);return f?new s.X509KeyUsageExtension(f):void 0}get extBasicConstraints(){let f=this.findExtension(p);return f?new s.X509BasicConstraintsExtension(f):void 0}get extSubjectAltName(){let f=this.findExtension(h);return f?new s.X509SubjectAlternativeNameExtension(f):void 0}get extAuthorityKeyID(){let f=this.findExtension(d);return f?new s.X509AuthorityKeyIDExtension(f):void 0}get extSubjectKeyID(){let f=this.findExtension(o);return f?new s.X509SubjectKeyIDExtension(f):void 0}get extSCT(){let f=this.findExtension(e.EXTENSION_OID_SCT);return f?new s.X509SCTExtension(f):void 0}get isCA(){let f=this.extBasicConstraints?.isCA||!1;return this.extKeyUsage?f&&this.extKeyUsage.keyCertSign:f}extension(f){let y=this.findExtension(f);return y?new s.X509Extension(y):void 0}verify(f){let y=f?.publicKey||this.publicKey,v=l.createPublicKey(y);return l.verify(this.tbsCertificate.toDER(),v,this.signatureValue,this.signatureAlgorithm)}validForDate(f){return this.notBefore<=f&&f<=this.notAfter}equals(f){return this.root.toDER().equals(f.root.toDER())}clone(){let f=this.root.toDER(),y=Buffer.alloc(f.length);return f.copy(y),Rl.parse(y)}findExtension(f){return this.extensions.find(y=>y.subs[0].toOID()===f)}get tbsCertificateObj(){return this.root.subs[0]}get signatureAlgorithmObj(){return this.root.subs[1]}get signatureValueObj(){return this.root.subs[2]}get versionObj(){return this.tbsCertificateObj.subs[0]}get serialNumberObj(){return this.tbsCertificateObj.subs[1]}get issuerObj(){return this.tbsCertificateObj.subs[3]}get validityObj(){return this.tbsCertificateObj.subs[4]}get subjectObj(){return this.tbsCertificateObj.subs[5]}get subjectPublicKeyInfoObj(){return this.tbsCertificateObj.subs[6]}get extensionsObj(){return this.tbsCertificateObj.subs.find(f=>f.tag.isContextSpecific(3))}};e.X509Certificate=m}),jL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.X509SCTExtension=e.X509Certificate=e.EXTENSION_OID_SCT=void 0;var t=$L();Object.defineProperty(e,"EXTENSION_OID_SCT",{enumerable:!0,get:S(function(){return t.EXTENSION_OID_SCT},"get")}),Object.defineProperty(e,"X509Certificate",{enumerable:!0,get:S(function(){return t.X509Certificate},"get")});var i=bm();Object.defineProperty(e,"X509SCTExtension",{enumerable:!0,get:S(function(){return i.X509SCTExtension},"get")})}),ot=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(s,o,a,h){h===void 0&&(h=a);var p=Object.getOwnPropertyDescriptor(o,a);(!p||("get"in p?!o.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:S(function(){return o[a]},"get")}),Object.defineProperty(s,h,p)}:function(s,o,a,h){h===void 0&&(h=a),s[h]=o[a]}),i=e&&e.__setModuleDefault||(Object.create?function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}:function(s,o){s.default=o}),u=e&&e.__importStar||function(){var s=S(function(o){return s=Object.getOwnPropertyNames||function(a){var h=[];for(var p in a)Object.prototype.hasOwnProperty.call(a,p)&&(h[h.length]=p);return h},s(o)},"ownKeys");return function(o){if(o&&o.__esModule)return o;var a={};if(o!=null)for(var h=s(o),p=0;p<h.length;p++)h[p]!=="default"&&t(a,o,h[p]);return i(a,o),a}}();Object.defineProperty(e,"__esModule",{value:!0}),e.X509SCTExtension=e.X509Certificate=e.EXTENSION_OID_SCT=e.ByteStream=e.RFC3161Timestamp=e.pem=e.json=e.encoding=e.dsse=e.crypto=e.ASN1Obj=void 0;var n=dc();Object.defineProperty(e,"ASN1Obj",{enumerable:!0,get:S(function(){return n.ASN1Obj},"get")}),e.crypto=u(Ps()),e.dsse=u(TL()),e.encoding=u(PL()),e.json=u(xL()),e.pem=u(ym());var l=LL();Object.defineProperty(e,"RFC3161Timestamp",{enumerable:!0,get:S(function(){return l.RFC3161Timestamp},"get")});var c=un();Object.defineProperty(e,"ByteStream",{enumerable:!0,get:S(function(){return c.ByteStream},"get")});var r=jL();Object.defineProperty(e,"EXTENSION_OID_SCT",{enumerable:!0,get:S(function(){return r.EXTENSION_OID_SCT},"get")}),Object.defineProperty(e,"X509Certificate",{enumerable:!0,get:S(function(){return r.X509Certificate},"get")}),Object.defineProperty(e,"X509SCTExtension",{enumerable:!0,get:S(function(){return r.X509SCTExtension},"get")})}),ML=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extractJWTSubject=i;var t=ot();function i(u){let n=u.split(".",3),l=JSON.parse(t.encoding.base64Decode(n[1]));if(l.email){if(!l.email_verified)throw new Error("JWT email not verified by issuer");return l.email}if(l.sub)return l.sub;throw new Error("JWT subject not found")}S(i,"extractJWTSubject")}),BL=J((e,t)=>{t.exports={name:"@sigstore/sign",version:"4.0.1",description:"Sigstore signing library",main:"dist/index.js",types:"dist/index.d.ts",scripts:{clean:"shx rm -rf dist *.tsbuildinfo",build:"tsc --build",test:"jest"},files:["dist"],author:"bdehamer@github.com",license:"Apache-2.0",repository:{type:"git",url:"git+https://github.com/sigstore/sigstore-js.git"},bugs:{url:"https://github.com/sigstore/sigstore-js/issues"},homepage:"https://github.com/sigstore/sigstore-js/tree/main/packages/sign#readme",publishConfig:{provenance:!0},devDependencies:{"@sigstore/jest":"^0.0.0","@sigstore/mock":"^0.11.0","@sigstore/rekor-types":"^4.0.0","@types/make-fetch-happen":"^10.0.4","@types/promise-retry":"^1.1.6"},dependencies:{"@sigstore/bundle":"^4.0.0","@sigstore/core":"^3.0.0","@sigstore/protobuf-specs":"^0.5.0","make-fetch-happen":"^15.0.2","proc-log":"^5.0.0","promise-retry":"^2.0.1"},engines:{node:"^20.17.0 || >=22.9.0"}}}),UL=J(e=>{"use strict";var t=e&&e.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(e,"__esModule",{value:!0}),e.getUserAgent=void 0;var i=t(require("os")),u=S(()=>{let n=BL().version,l=process.version,c=i.default.platform(),r=i.default.arch();return`sigstore-js/${n} (Node ${l}) (${c}/${r})`},"getUserAgent");e.getUserAgent=u}),sr=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(l,c,r,s){s===void 0&&(s=r);var o=Object.getOwnPropertyDescriptor(c,r);(!o||("get"in o?!c.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:S(function(){return c[r]},"get")}),Object.defineProperty(l,s,o)}:function(l,c,r,s){s===void 0&&(s=r),l[s]=c[r]}),i=e&&e.__setModuleDefault||(Object.create?function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}:function(l,c){l.default=c}),u=e&&e.__importStar||function(){var l=S(function(c){return l=Object.getOwnPropertyNames||function(r){var s=[];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(s[s.length]=o);return s},l(c)},"ownKeys");return function(c){if(c&&c.__esModule)return c;var r={};if(c!=null)for(var s=l(c),o=0;o<s.length;o++)s[o]!=="default"&&t(r,c,s[o]);return i(r,c),r}}();Object.defineProperty(e,"__esModule",{value:!0}),e.ua=e.oidc=e.pem=e.json=e.encoding=e.dsse=e.crypto=void 0;var n=ot();Object.defineProperty(e,"crypto",{enumerable:!0,get:S(function(){return n.crypto},"get")}),Object.defineProperty(e,"dsse",{enumerable:!0,get:S(function(){return n.dsse},"get")}),Object.defineProperty(e,"encoding",{enumerable:!0,get:S(function(){return n.encoding},"get")}),Object.defineProperty(e,"json",{enumerable:!0,get:S(function(){return n.json},"get")}),Object.defineProperty(e,"pem",{enumerable:!0,get:S(function(){return n.pem},"get")}),e.oidc=u(ML()),e.ua=u(UL())}),wm=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseBundleBuilder=void 0;var t=class{static{S(this,"BaseBundleBuilder")}constructor(u){this.signer=u.signer,this.witnesses=u.witnesses}async create(u){let n=await this.prepare(u).then(o=>this.signer.sign(o)),l=await this.package(u,n),c=await Promise.all(this.witnesses.map(o=>o.testify(l.content,i(n.key)))),r=[],s=[];return c.forEach(({tlogEntries:o,rfc3161Timestamps:a})=>{r.push(...o??[]),s.push(...a??[])}),l.verificationMaterial.tlogEntries=r,l.verificationMaterial.timestampVerificationData={rfc3161Timestamps:s},l}async prepare(u){return u.data}};e.BaseBundleBuilder=t;function i(u){switch(u.$case){case"publicKey":return u.publicKey;case"x509Certificate":return u.certificate}}S(i,"publicKey")}),_m=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(s,o,a,h){h===void 0&&(h=a);var p=Object.getOwnPropertyDescriptor(o,a);(!p||("get"in p?!o.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:S(function(){return o[a]},"get")}),Object.defineProperty(s,h,p)}:function(s,o,a,h){h===void 0&&(h=a),s[h]=o[a]}),i=e&&e.__setModuleDefault||(Object.create?function(s,o){Object.defineProperty(s,"default",{enumerable:!0,value:o})}:function(s,o){s.default=o}),u=e&&e.__importStar||function(){var s=S(function(o){return s=Object.getOwnPropertyNames||function(a){var h=[];for(var p in a)Object.prototype.hasOwnProperty.call(a,p)&&(h[h.length]=p);return h},s(o)},"ownKeys");return function(o){if(o&&o.__esModule)return o;var a={};if(o!=null)for(var h=s(o),p=0;p<h.length;p++)h[p]!=="default"&&t(a,o,h[p]);return i(a,o),a}}();Object.defineProperty(e,"__esModule",{value:!0}),e.toMessageSignatureBundle=c,e.toDSSEBundle=r;var n=u(cn()),l=sr();function c(s,o){let a=l.crypto.digest("sha256",s.data);return n.toMessageSignatureBundle({digest:a,signature:o.signature,certificate:o.key.$case==="x509Certificate"?l.pem.toDER(o.key.certificate):void 0,keyHint:o.key.$case==="publicKey"?o.key.hint:void 0,certificateChain:!0})}S(c,"toMessageSignatureBundle");function r(s,o,a){return n.toDSSEBundle({artifact:s.data,artifactType:s.type,signature:o.signature,certificate:o.key.$case==="x509Certificate"?l.pem.toDER(o.key.certificate):void 0,keyHint:o.key.$case==="publicKey"?o.key.hint:void 0,certificateChain:a})}S(r,"toDSSEBundle")}),FL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DSSEBundleBuilder=void 0;var t=sr(),i=wm(),u=_m(),n=class extends i.BaseBundleBuilder{static{S(this,"DSSEBundleBuilder")}constructor(c){super(c),this.certificateChain=c.certificateChain??!1}async prepare(c){let r=l(c);return t.dsse.preAuthEncoding(r.type,r.data)}async package(c,r){return(0,u.toDSSEBundle)(l(c),r,this.certificateChain)}};e.DSSEBundleBuilder=n;function l(c){return{...c,type:c.type??""}}S(l,"artifactDefaults")}),HL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageSignatureBundleBuilder=void 0;var t=wm(),i=_m(),u=class extends t.BaseBundleBuilder{static{S(this,"MessageSignatureBundleBuilder")}constructor(n){super(n)}async package(n,l){return(0,i.toMessageSignatureBundle)(n,l)}};e.MessageSignatureBundleBuilder=u}),GL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageSignatureBundleBuilder=e.DSSEBundleBuilder=void 0;var t=FL();Object.defineProperty(e,"DSSEBundleBuilder",{enumerable:!0,get:S(function(){return t.DSSEBundleBuilder},"get")});var i=HL();Object.defineProperty(e,"MessageSignatureBundleBuilder",{enumerable:!0,get:S(function(){return i.MessageSignatureBundleBuilder},"get")})}),gc=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HTTPError=void 0;var t=class extends Error{static{S(this,"HTTPError")}constructor({status:i,message:u,location:n}){super(`(${i}) ${u}`),this.statusCode=i,this.location=n}};e.HTTPError=t}),xs=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalError=void 0,e.internalError=u;var t=gc(),i=class extends Error{static{S(this,"InternalError")}constructor({code:n,message:l,cause:c}){super(l),this.name=this.constructor.name,this.cause=c,this.code=n}};e.InternalError=i;function u(n,l,c){throw n instanceof t.HTTPError&&(c+=` - ${n.message}`),new i({code:l,message:c,cause:n})}S(u,"internalError")}),VL=J(e=>{"use strict";var t=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.CIContextProvider=void 0;var i=t(on()),u=[l,c],n=class{static{S(this,"CIContextProvider")}constructor(r="sigstore"){this.audience=r}async getToken(){return Promise.any(u.map(r=>r(this.audience))).catch(()=>Promise.reject("CI: no tokens available"))}};e.CIContextProvider=n;async function l(r){if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL||!process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN)return Promise.reject("no token available");let s=new URL(process.env.ACTIONS_ID_TOKEN_REQUEST_URL);return s.searchParams.append("audience",r),(await(0,i.default)(s.href,{retry:2,headers:{Accept:"application/json",Authorization:`Bearer ${process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN}`}})).json().then(o=>o.value)}S(l,"getGHAToken");async function c(){return process.env.SIGSTORE_ID_TOKEN?process.env.SIGSTORE_ID_TOKEN:Promise.reject("no token available")}S(c,"getEnv")}),WL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CIContextProvider=void 0;var t=VL();Object.defineProperty(e,"CIContextProvider",{enumerable:!0,get:S(function(){return t.CIContextProvider},"get")})}),mc=J(e=>{"use strict";var t=e&&e.__importDefault||function(v){return v&&v.__esModule?v:{default:v}};Object.defineProperty(e,"__esModule",{value:!0}),e.fetchWithRetry=m;var i=require("http2"),u=t(on()),n=yt(),l=t(Zi()),c=sr(),r=gc(),{HTTP2_HEADER_LOCATION:s,HTTP2_HEADER_CONTENT_TYPE:o,HTTP2_HEADER_USER_AGENT:a,HTTP_STATUS_INTERNAL_SERVER_ERROR:h,HTTP_STATUS_TOO_MANY_REQUESTS:p,HTTP_STATUS_REQUEST_TIMEOUT:d}=i.constants;async function m(v,E){return(0,l.default)(async(b,w)=>{let _=E.method||"POST",O={[a]:c.ua.getUserAgent(),...E.headers},A=await(0,u.default)(v,{method:_,headers:O,body:E.body,timeout:E.timeout,retry:!1}).catch(I=>(n.log.http("fetch",`${_} ${v} attempt ${w} failed with ${I}`),b(I)));if(A.ok)return A;{let I=await g(A);if(n.log.http("fetch",`${_} ${v} attempt ${w} failed with ${A.status}`),f(A.status))return b(I);throw I}},y(E.retry))}S(m,"fetchWithRetry");var g=S(async v=>{let E=v.statusText,b=v.headers.get(s)||void 0;if(v.headers.get(o)?.includes("application/json"))try{E=(await v.json()).message||E}catch{}return new r.HTTPError({status:v.status,message:E,location:b})},"errorFromResponse"),f=S(v=>[d,p].includes(v)||v>=h,"retryable"),y=S(v=>typeof v=="boolean"?{retries:v?1:0}:typeof v=="number"?{retries:v}:{retries:0,...v},"retryOpts")}),zL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Fulcio=void 0;var t=mc(),i=class{static{S(this,"Fulcio")}constructor(u){this.options=u}async createSigningCertificate(u){let{baseURL:n,retry:l,timeout:c}=this.options,r=`${n}/api/v2/signingCert`;return(await(0,t.fetchWithRetry)(r,{headers:{"Content-Type":"application/json"},body:JSON.stringify(u),timeout:c,retry:l})).json()}};e.Fulcio=i}),qL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CAClient=void 0;var t=xs(),i=zL(),u=class{static{S(this,"CAClient")}constructor(l){this.fulcio=new i.Fulcio({baseURL:l.fulcioBaseURL,retry:l.retry,timeout:l.timeout})}async createSigningCertificate(l,c,r){let s=n(l,c,r);try{let o=await this.fulcio.createSigningCertificate(s);return(o.signedCertificateEmbeddedSct?o.signedCertificateEmbeddedSct:o.signedCertificateDetachedSct).chain.certificates}catch(o){(0,t.internalError)(o,"CA_CREATE_SIGNING_CERTIFICATE_ERROR","error creating signing certificate")}}};e.CAClient=u;function n(l,c,r){return{credentials:{oidcIdentityToken:l},publicKeyRequest:{publicKey:{algorithm:"ECDSA",content:c},proofOfPossession:r.toString("base64")}}}S(n,"toCertificateRequest")}),KL=J(e=>{"use strict";var t=e&&e.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.EphemeralSigner=void 0;var i=t(require("crypto")),u="ec",n="P-256",l=class{static{S(this,"EphemeralSigner")}constructor(){this.keypair=i.default.generateKeyPairSync(u,{namedCurve:n})}async sign(c){let r=i.default.sign(null,c,this.keypair.privateKey),s=this.keypair.publicKey.export({format:"pem",type:"spki"}).toString("ascii");return{signature:r,key:{$case:"publicKey",publicKey:s}}}};e.EphemeralSigner=l}),JL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FulcioSigner=e.DEFAULT_FULCIO_URL=void 0;var t=xs(),i=sr(),u=qL(),n=KL();e.DEFAULT_FULCIO_URL="https://fulcio.sigstore.dev";var l=class{static{S(this,"FulcioSigner")}constructor(c){this.ca=new u.CAClient({...c,fulcioBaseURL:c.fulcioBaseURL||e.DEFAULT_FULCIO_URL}),this.identityProvider=c.identityProvider,this.keyHolder=c.keyHolder||new n.EphemeralSigner}async sign(c){let r=await this.getIdentityToken(),s;try{s=i.oidc.extractJWTSubject(r)}catch(h){throw new t.InternalError({code:"IDENTITY_TOKEN_PARSE_ERROR",message:`invalid identity token: ${r}`,cause:h})}let o=await this.keyHolder.sign(Buffer.from(s));if(o.key.$case!=="publicKey")throw new t.InternalError({code:"CA_CREATE_SIGNING_CERTIFICATE_ERROR",message:"unexpected format for signing key"});let a=await this.ca.createSigningCertificate(r,o.key.publicKey,o.signature);return{signature:(await this.keyHolder.sign(c)).signature,key:{$case:"x509Certificate",certificate:a[0]}}}async getIdentityToken(){try{return await this.identityProvider.getToken()}catch(c){throw new t.InternalError({code:"IDENTITY_TOKEN_READ_ERROR",message:"error retrieving identity token",cause:c})}}};e.FulcioSigner=l}),XL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FulcioSigner=e.DEFAULT_FULCIO_URL=void 0;var t=JL();Object.defineProperty(e,"DEFAULT_FULCIO_URL",{enumerable:!0,get:S(function(){return t.DEFAULT_FULCIO_URL},"get")}),Object.defineProperty(e,"FulcioSigner",{enumerable:!0,get:S(function(){return t.FulcioSigner},"get")})}),ZL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rekor=void 0;var t=mc(),i=class{static{S(this,"Rekor")}constructor(n){this.options=n}async createEntry(n){let{baseURL:l,timeout:c,retry:r}=this.options,s=`${l}/api/v1/log/entries`,o=await(await(0,t.fetchWithRetry)(s,{headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n),timeout:c,retry:r})).json();return u(o)}async getEntry(n){let{baseURL:l,timeout:c,retry:r}=this.options,s=`${l}/api/v1/log/entries/${n}`,o=await(await(0,t.fetchWithRetry)(s,{method:"GET",headers:{Accept:"application/json"},timeout:c,retry:r})).json();return u(o)}};e.Rekor=i;function u(n){let l=Object.entries(n);if(l.length!=1)throw new Error("Received multiple entries in Rekor response");let[c,r]=l[0];return{...r,uuid:c}}S(u,"entryFromResponse")}),YL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TLogClient=void 0;var t=xs(),i=gc(),u=ZL(),n=class{static{S(this,"TLogClient")}constructor(c){this.fetchOnConflict=c.fetchOnConflict??!1,this.rekor=new u.Rekor({baseURL:c.rekorBaseURL,retry:c.retry,timeout:c.timeout})}async createEntry(c){let r;try{r=await this.rekor.createEntry(c)}catch(s){if(l(s)&&this.fetchOnConflict){let o=s.location.split("/").pop()||"";try{r=await this.rekor.getEntry(o)}catch(a){(0,t.internalError)(a,"TLOG_FETCH_ENTRY_ERROR","error fetching tlog entry")}}else(0,t.internalError)(s,"TLOG_CREATE_ENTRY_ERROR","error creating tlog entry")}return r}};e.TLogClient=n;function l(c){return c instanceof i.HTTPError&&c.statusCode===409&&c.location!==void 0}S(l,"entryExistsError")}),QL=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toProposedEntry=n;var t=cn(),i=sr(),u="sha256";function n(o,a,h="dsse"){switch(o.$case){case"dsseEnvelope":return h==="intoto"?r(o.dsseEnvelope,a):c(o.dsseEnvelope,a);case"messageSignature":return l(o.messageSignature,a)}}S(n,"toProposedEntry");function l(o,a){let h=o.messageDigest.digest.toString("hex"),p=o.signature.toString("base64"),d=i.encoding.base64Encode(a);return{apiVersion:"0.0.1",kind:"hashedrekord",spec:{data:{hash:{algorithm:u,value:h}},signature:{content:p,publicKey:{content:d}}}}}S(l,"toProposedHashedRekordEntry");function c(o,a){let h=JSON.stringify((0,t.envelopeToJSON)(o)),p=i.encoding.base64Encode(a);return{apiVersion:"0.0.1",kind:"dsse",spec:{proposedContent:{envelope:h,verifiers:[p]}}}}S(c,"toProposedDSSEEntry");function r(o,a){let h=i.crypto.digest(u,o.payload).toString("hex"),p=s(o,a),d=i.encoding.base64Encode(o.payload.toString("base64")),m=i.encoding.base64Encode(o.signatures[0].sig.toString("base64")),g=o.signatures[0].keyid,f=i.encoding.base64Encode(a),y={payloadType:o.payloadType,payload:d,signatures:[{sig:m,publicKey:f}]};return g.length>0&&(y.signatures[0].keyid=g),{apiVersion:"0.0.2",kind:"intoto",spec:{content:{envelope:y,hash:{algorithm:u,value:p},payloadHash:{algorithm:u,value:h}}}}}S(r,"toProposedIntotoEntry");function s(o,a){let h={payloadType:o.payloadType,payload:o.payload.toString("base64"),signatures:[{sig:o.signatures[0].sig.toString("base64"),publicKey:a}]};return o.signatures[0].keyid.length>0&&(h.signatures[0].keyid=o.signatures[0].keyid),i.crypto.digest(u,i.json.canonicalize(h)).toString("hex")}S(s,"calculateDSSEHash")}),eD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RekorWitness=e.DEFAULT_REKOR_URL=void 0;var t=sr(),i=YL(),u=QL();e.DEFAULT_REKOR_URL="https://rekor.sigstore.dev";var n=class{static{S(this,"RekorWitness")}constructor(s){this.entryType=s.entryType,this.tlog=new i.TLogClient({...s,rekorBaseURL:s.rekorBaseURL||e.DEFAULT_REKOR_URL})}async testify(s,o){let a=(0,u.toProposedEntry)(s,o,this.entryType),h=await this.tlog.createEntry(a);return l(h)}};e.RekorWitness=n;function l(s){let o=Buffer.from(s.logID,"hex"),a=t.encoding.base64Decode(s.body),h=JSON.parse(a),p=s?.verification?.signedEntryTimestamp?c(s.verification.signedEntryTimestamp):void 0,d=s?.verification?.inclusionProof?r(s.verification.inclusionProof):void 0;return{tlogEntries:[{logIndex:s.logIndex.toString(),logId:{keyId:o},integratedTime:s.integratedTime.toString(),kindVersion:{kind:h.kind,version:h.apiVersion},inclusionPromise:p,inclusionProof:d,canonicalizedBody:Buffer.from(s.body,"base64")}]}}S(l,"toTransparencyLogEntry");function c(s){return{signedEntryTimestamp:Buffer.from(s,"base64")}}S(c,"inclusionPromise");function r(s){return{logIndex:s.logIndex.toString(),treeSize:s.treeSize.toString(),rootHash:Buffer.from(s.rootHash,"hex"),hashes:s.hashes.map(o=>Buffer.from(o,"hex")),checkpoint:{envelope:s.checkpoint}}}S(r,"inclusionProof")}),tD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampAuthority=void 0;var t=mc(),i=class{static{S(this,"TimestampAuthority")}constructor(u){this.options=u}async createTimestamp(u){let{baseURL:n,timeout:l,retry:c}=this.options,r=`${n}/api/v1/timestamp`;return(await(0,t.fetchWithRetry)(r,{headers:{"Content-Type":"application/json"},body:JSON.stringify(u),timeout:l,retry:c})).buffer()}};e.TimestampAuthority=i}),rD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TSAClient=void 0;var t=xs(),i=tD(),u=sr(),n="sha256",l=class{static{S(this,"TSAClient")}constructor(c){this.tsa=new i.TimestampAuthority({baseURL:c.tsaBaseURL,retry:c.retry,timeout:c.timeout})}async createTimestamp(c){let r={artifactHash:u.crypto.digest(n,c).toString("base64"),hashAlgorithm:n};try{return await this.tsa.createTimestamp(r)}catch(s){(0,t.internalError)(s,"TSA_CREATE_TIMESTAMP_ERROR","error creating timestamp")}}};e.TSAClient=l}),sD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TSAWitness=void 0;var t=rD(),i=class{static{S(this,"TSAWitness")}constructor(n){this.tsa=new t.TSAClient({tsaBaseURL:n.tsaBaseURL,retry:n.retry,timeout:n.timeout})}async testify(n){let l=u(n);return{rfc3161Timestamps:[{signedTimestamp:await this.tsa.createTimestamp(l)}]}}};e.TSAWitness=i;function u(n){switch(n.$case){case"dsseEnvelope":return n.dsseEnvelope.signatures[0].sig;case"messageSignature":return n.messageSignature.signature}}S(u,"extractSignature")}),iD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TSAWitness=e.RekorWitness=e.DEFAULT_REKOR_URL=void 0;var t=eD();Object.defineProperty(e,"DEFAULT_REKOR_URL",{enumerable:!0,get:S(function(){return t.DEFAULT_REKOR_URL},"get")}),Object.defineProperty(e,"RekorWitness",{enumerable:!0,get:S(function(){return t.RekorWitness},"get")});var i=sD();Object.defineProperty(e,"TSAWitness",{enumerable:!0,get:S(function(){return i.TSAWitness},"get")})}),Om=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TSAWitness=e.RekorWitness=e.DEFAULT_REKOR_URL=e.FulcioSigner=e.DEFAULT_FULCIO_URL=e.CIContextProvider=e.InternalError=e.MessageSignatureBundleBuilder=e.DSSEBundleBuilder=void 0;var t=GL();Object.defineProperty(e,"DSSEBundleBuilder",{enumerable:!0,get:S(function(){return t.DSSEBundleBuilder},"get")}),Object.defineProperty(e,"MessageSignatureBundleBuilder",{enumerable:!0,get:S(function(){return t.MessageSignatureBundleBuilder},"get")});var i=xs();Object.defineProperty(e,"InternalError",{enumerable:!0,get:S(function(){return i.InternalError},"get")});var u=WL();Object.defineProperty(e,"CIContextProvider",{enumerable:!0,get:S(function(){return u.CIContextProvider},"get")});var n=XL();Object.defineProperty(e,"DEFAULT_FULCIO_URL",{enumerable:!0,get:S(function(){return n.DEFAULT_FULCIO_URL},"get")}),Object.defineProperty(e,"FulcioSigner",{enumerable:!0,get:S(function(){return n.FulcioSigner},"get")});var l=iD();Object.defineProperty(e,"DEFAULT_REKOR_URL",{enumerable:!0,get:S(function(){return l.DEFAULT_REKOR_URL},"get")}),Object.defineProperty(e,"RekorWitness",{enumerable:!0,get:S(function(){return l.RekorWitness},"get")}),Object.defineProperty(e,"TSAWitness",{enumerable:!0,get:S(function(){return l.TSAWitness},"get")})}),nD=J(e=>{"use strict";var t=e&&e.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.appDataPath=n;var i=t(require("os")),u=t(require("path"));function n(l){let c=i.default.homedir();switch(process.platform){case"darwin":{let r=u.default.join(c,"Library","Application Support");return u.default.join(r,l)}case"win32":{let r=process.env.LOCALAPPDATA||u.default.join(c,"AppData","Local");return u.default.join(r,l,"Data")}default:{let r=process.env.XDG_DATA_HOME||u.default.join(c,".local","share");return u.default.join(r,l)}}}S(n,"appDataPath")}),$t=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnsupportedAlgorithmError=e.CryptoError=e.LengthOrHashMismatchError=e.UnsignedMetadataError=e.RepositoryError=e.ValueError=void 0;var t=class extends Error{static{S(this,"ValueError")}};e.ValueError=t;var i=class extends Error{static{S(this,"RepositoryError")}};e.RepositoryError=i;var u=class extends i{static{S(this,"UnsignedMetadataError")}};e.UnsignedMetadataError=u;var n=class extends i{static{S(this,"LengthOrHashMismatchError")}};e.LengthOrHashMismatchError=n;var l=class extends Error{static{S(this,"CryptoError")}};e.CryptoError=l;var c=class extends l{static{S(this,"UnsupportedAlgorithmError")}};e.UnsupportedAlgorithmError=c}),oD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDefined=t,e.isObject=i,e.isStringArray=u,e.isObjectArray=n,e.isStringRecord=l,e.isObjectRecord=c;function t(r){return r!==void 0}S(t,"isDefined");function i(r){return typeof r=="object"&&r!==null}S(i,"isObject");function u(r){return Array.isArray(r)&&r.every(s=>typeof s=="string")}S(u,"isStringArray");function n(r){return Array.isArray(r)&&r.every(i)}S(n,"isObjectArray");function l(r){return typeof r=="object"&&r!==null&&Object.keys(r).every(s=>typeof s=="string")&&Object.values(r).every(s=>typeof s=="string")}S(l,"isStringRecord");function c(r){return typeof r=="object"&&r!==null&&Object.keys(r).every(s=>typeof s=="string")&&Object.values(r).every(s=>typeof s=="object"&&s!==null)}S(c,"isObjectRecord")}),Rm=J((e,t)=>{function i(n){let l=[];if(typeof n=="string")l.push(u(n));else if(typeof n=="boolean")l.push(JSON.stringify(n));else if(Number.isInteger(n))l.push(JSON.stringify(n));else if(n===null)l.push(JSON.stringify(n));else if(Array.isArray(n)){l.push("[");let c=!0;n.forEach(r=>{c||l.push(","),c=!1,l.push(i(r))}),l.push("]")}else if(typeof n=="object"){l.push("{");let c=!0;Object.keys(n).sort().forEach(r=>{c||l.push(","),c=!1,l.push(u(r)),l.push(":"),l.push(i(n[r]))}),l.push("}")}else throw new TypeError("cannot encode "+n.toString());return l.join("")}S(i,"canonicalize");function u(n){return'"'+n.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'}S(u,"canonicalizeString"),t.exports={canonicalize:i}}),aD=J(e=>{"use strict";var t=e&&e.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(e,"__esModule",{value:!0}),e.verifySignature=void 0;var i=Rm(),u=t(require("crypto")),n=S((l,c,r)=>{let s=Buffer.from((0,i.canonicalize)(l));return u.default.verify(void 0,s,c,Buffer.from(r,"hex"))},"verifySignature");e.verifySignature=n}),At=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(n,l,c,r){r===void 0&&(r=c);var s=Object.getOwnPropertyDescriptor(l,c);(!s||("get"in s?!l.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:S(function(){return l[c]},"get")}),Object.defineProperty(n,r,s)}:function(n,l,c,r){r===void 0&&(r=c),n[r]=l[c]}),i=e&&e.__setModuleDefault||(Object.create?function(n,l){Object.defineProperty(n,"default",{enumerable:!0,value:l})}:function(n,l){n.default=l}),u=e&&e.__importStar||function(){var n=S(function(l){return n=Object.getOwnPropertyNames||function(c){var r=[];for(var s in c)Object.prototype.hasOwnProperty.call(c,s)&&(r[r.length]=s);return r},n(l)},"ownKeys");return function(l){if(l&&l.__esModule)return l;var c={};if(l!=null)for(var r=n(l),s=0;s<r.length;s++)r[s]!=="default"&&t(c,l,r[s]);return i(c,l),c}}();Object.defineProperty(e,"__esModule",{value:!0}),e.crypto=e.guard=void 0,e.guard=u(oD()),e.crypto=u(aD())}),xr=J(e=>{"use strict";var t=e&&e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.Signed=e.MetadataKind=void 0,e.isMetadataKind=r;var i=t(require("util")),u=$t(),n=At(),l=["1","0","31"],c;(function(a){a.Root="root",a.Timestamp="timestamp",a.Snapshot="snapshot",a.Targets="targets"})(c||(e.MetadataKind=c={}));function r(a){return typeof a=="string"&&Object.values(c).includes(a)}S(r,"isMetadataKind");var s=class Am{static{S(this,"Signed")}specVersion;expires;version;unrecognizedFields;constructor(h){this.specVersion=h.specVersion||l.join(".");let p=this.specVersion.split(".");if(!(p.length===2||p.length===3)||!p.every(d=>o(d)))throw new u.ValueError("Failed to parse specVersion");if(p[0]!=l[0])throw new u.ValueError("Unsupported specVersion");this.expires=h.expires,this.version=h.version,this.unrecognizedFields=h.unrecognizedFields||{}}equals(h){return h instanceof Am?this.specVersion===h.specVersion&&this.expires===h.expires&&this.version===h.version&&i.default.isDeepStrictEqual(this.unrecognizedFields,h.unrecognizedFields):!1}isExpired(h){return h||(h=new Date),h>=new Date(this.expires)}static commonFieldsFromJSON(h){let{spec_version:p,expires:d,version:m,...g}=h;if(n.guard.isDefined(p)){if(typeof p!="string")throw new TypeError("spec_version must be a string")}else throw new u.ValueError("spec_version is not defined");if(n.guard.isDefined(d)){if(typeof d!="string")throw new TypeError("expires must be a string")}else throw new u.ValueError("expires is not defined");if(n.guard.isDefined(m)){if(typeof m!="number")throw new TypeError("version must be a number")}else throw new u.ValueError("version is not defined");return{specVersion:p,expires:d,version:m,unrecognizedFields:g}}};e.Signed=s;function o(a){return!isNaN(Number(a))}S(o,"isNumeric")}),hn=J(e=>{"use strict";var t=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.TargetFile=e.MetaFile=void 0;var i=t(require("crypto")),u=t(require("util")),n=$t(),l=At(),c=class Al{static{S(this,"MetaFile")}version;length;hashes;unrecognizedFields;constructor(a){if(a.version<=0)throw new n.ValueError("Metafile version must be at least 1");a.length!==void 0&&s(a.length),this.version=a.version,this.length=a.length,this.hashes=a.hashes,this.unrecognizedFields=a.unrecognizedFields||{}}equals(a){return a instanceof Al?this.version===a.version&&this.length===a.length&&u.default.isDeepStrictEqual(this.hashes,a.hashes)&&u.default.isDeepStrictEqual(this.unrecognizedFields,a.unrecognizedFields):!1}verify(a){if(this.length!==void 0&&a.length!==this.length)throw new n.LengthOrHashMismatchError(`Expected length ${this.length} but got ${a.length}`);this.hashes&&Object.entries(this.hashes).forEach(([h,p])=>{let d;try{d=i.default.createHash(h)}catch{throw new n.LengthOrHashMismatchError(`Hash algorithm ${h} not supported`)}let m=d.update(a).digest("hex");if(m!==p)throw new n.LengthOrHashMismatchError(`Expected hash ${p} but got ${m}`)})}toJSON(){let a={version:this.version,...this.unrecognizedFields};return this.length!==void 0&&(a.length=this.length),this.hashes&&(a.hashes=this.hashes),a}static fromJSON(a){let{version:h,length:p,hashes:d,...m}=a;if(typeof h!="number")throw new TypeError("version must be a number");if(l.guard.isDefined(p)&&typeof p!="number")throw new TypeError("length must be a number");if(l.guard.isDefined(d)&&!l.guard.isStringRecord(d))throw new TypeError("hashes must be string keys and values");return new Al({version:h,length:p,hashes:d,unrecognizedFields:m})}};e.MetaFile=c;var r=class Cl{static{S(this,"TargetFile")}length;path;hashes;unrecognizedFields;constructor(a){s(a.length),this.length=a.length,this.path=a.path,this.hashes=a.hashes,this.unrecognizedFields=a.unrecognizedFields||{}}get custom(){let a=this.unrecognizedFields.custom;return!a||Array.isArray(a)||typeof a!="object"?{}:a}equals(a){return a instanceof Cl?this.length===a.length&&this.path===a.path&&u.default.isDeepStrictEqual(this.hashes,a.hashes)&&u.default.isDeepStrictEqual(this.unrecognizedFields,a.unrecognizedFields):!1}async verify(a){let h=0,p=Object.keys(this.hashes).reduce((d,m)=>{try{d[m]=i.default.createHash(m)}catch{throw new n.LengthOrHashMismatchError(`Hash algorithm ${m} not supported`)}return d},{});for await(let d of a)h+=d.length,Object.values(p).forEach(m=>{m.update(d)});if(h!==this.length)throw new n.LengthOrHashMismatchError(`Expected length ${this.length} but got ${h}`);Object.entries(p).forEach(([d,m])=>{let g=this.hashes[d],f=m.digest("hex");if(f!==g)throw new n.LengthOrHashMismatchError(`Expected hash ${g} but got ${f}`)})}toJSON(){return{length:this.length,hashes:this.hashes,...this.unrecognizedFields}}static fromJSON(a,h){let{length:p,hashes:d,...m}=h;if(typeof p!="number")throw new TypeError("length must be a number");if(!l.guard.isStringRecord(d))throw new TypeError("hashes must have string keys and values");return new Cl({length:p,path:a,hashes:d,unrecognizedFields:m})}};e.TargetFile=r;function s(o){if(o<0)throw new n.ValueError("Length must be at least 0")}S(s,"validateLength")}),lD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeOIDString=i;var t=6;function i(n){let l=n.split("."),c=parseInt(l[0],10)*40+parseInt(l[1],10),r=[];l.slice(2).forEach(o=>{let a=u(parseInt(o,10));r.push(...a)});let s=Buffer.from([c,...r]);return Buffer.from([t,s.length,...s])}S(i,"encodeOIDString");function u(n){let l=[],c=0;for(;n>0;)l.unshift(n&127|c),n>>=7,c=128;return l}S(u,"encodeVariableLengthInteger")}),cD=J(e=>{"use strict";var t=e&&e.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(e,"__esModule",{value:!0}),e.getPublicKey=p;var i=t(require("crypto")),u=$t(),n=lD(),l=48,c=3,r=0,s="1.3.101.112",o="1.2.840.10045.2.1",a="1.2.840.10045.3.1.7",h="-----BEGIN PUBLIC KEY-----";function p(E){switch(E.keyType){case"rsa":return d(E);case"ed25519":return m(E);case"ecdsa":case"ecdsa-sha2-nistp256":case"ecdsa-sha2-nistp384":return g(E);default:throw new u.UnsupportedAlgorithmError(`Unsupported key type: ${E.keyType}`)}}S(p,"getPublicKey");function d(E){if(!E.keyVal.startsWith(h))throw new u.CryptoError("Invalid key format");let b=i.default.createPublicKey(E.keyVal);switch(E.scheme){case"rsassa-pss-sha256":return{key:b,padding:i.default.constants.RSA_PKCS1_PSS_PADDING};default:throw new u.UnsupportedAlgorithmError(`Unsupported RSA scheme: ${E.scheme}`)}}S(d,"getRSAPublicKey");function m(E){let b;if(E.keyVal.startsWith(h))b=i.default.createPublicKey(E.keyVal);else{if(!v(E.keyVal))throw new u.CryptoError("Invalid key format");b=i.default.createPublicKey({key:f.hexToDER(E.keyVal),format:"der",type:"spki"})}return{key:b}}S(m,"getED25519PublicKey");function g(E){let b;if(E.keyVal.startsWith(h))b=i.default.createPublicKey(E.keyVal);else{if(!v(E.keyVal))throw new u.CryptoError("Invalid key format");b=i.default.createPublicKey({key:y.hexToDER(E.keyVal),format:"der",type:"spki"})}return{key:b}}S(g,"getECDCSAPublicKey");var f={hexToDER:S(E=>{let b=Buffer.from(E,"hex"),w=(0,n.encodeOIDString)(s),_=Buffer.concat([Buffer.concat([Buffer.from([l]),Buffer.from([w.length]),w]),Buffer.concat([Buffer.from([c]),Buffer.from([b.length+1]),Buffer.from([r]),b])]);return Buffer.concat([Buffer.from([l]),Buffer.from([_.length]),_])},"hexToDER")},y={hexToDER:S(E=>{let b=Buffer.from(E,"hex"),w=Buffer.concat([Buffer.from([c]),Buffer.from([b.length+1]),Buffer.from([r]),b]),_=Buffer.concat([(0,n.encodeOIDString)(o),(0,n.encodeOIDString)(a)]),O=Buffer.concat([Buffer.from([l]),Buffer.from([_.length]),_]);return Buffer.concat([Buffer.from([l]),Buffer.from([O.length+w.length]),O,w])},"hexToDER")},v=S(E=>/^[0-9a-fA-F]+$/.test(E),"isHex")}),yc=J(e=>{"use strict";var t=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.Key=void 0;var i=t(require("util")),u=$t(),n=At(),l=cD(),c=class Il{static{S(this,"Key")}keyID;keyType;scheme;keyVal;unrecognizedFields;constructor(s){let{keyID:o,keyType:a,scheme:h,keyVal:p,unrecognizedFields:d}=s;this.keyID=o,this.keyType=a,this.scheme=h,this.keyVal=p,this.unrecognizedFields=d||{}}verifySignature(s){let o=s.signatures[this.keyID];if(!o)throw new u.UnsignedMetadataError("no signature for key found in metadata");if(!this.keyVal.public)throw new u.UnsignedMetadataError("no public key found");let a=(0,l.getPublicKey)({keyType:this.keyType,scheme:this.scheme,keyVal:this.keyVal.public}),h=s.signed.toJSON();try{if(!n.crypto.verifySignature(h,a,o.sig))throw new u.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}catch(p){throw p instanceof u.UnsignedMetadataError?p:new u.UnsignedMetadataError(`failed to verify ${this.keyID} signature`)}}equals(s){return s instanceof Il?this.keyID===s.keyID&&this.keyType===s.keyType&&this.scheme===s.scheme&&i.default.isDeepStrictEqual(this.keyVal,s.keyVal)&&i.default.isDeepStrictEqual(this.unrecognizedFields,s.unrecognizedFields):!1}toJSON(){return{keytype:this.keyType,scheme:this.scheme,keyval:this.keyVal,...this.unrecognizedFields}}static fromJSON(s,o){let{keytype:a,scheme:h,keyval:p,...d}=o;if(typeof a!="string")throw new TypeError("keytype must be a string");if(typeof h!="string")throw new TypeError("scheme must be a string");if(!n.guard.isStringRecord(p))throw new TypeError("keyval must be a string record");return new Il({keyID:s,keyType:a,scheme:h,keyVal:p,unrecognizedFields:d})}};e.Key=c}),uD=J((e,t)=>{"use strict";t.exports=i;function i(l,c,r){l instanceof RegExp&&(l=u(l,r)),c instanceof RegExp&&(c=u(c,r));var s=n(l,c,r);return s&&{start:s[0],end:s[1],pre:r.slice(0,s[0]),body:r.slice(s[0]+l.length,s[1]),post:r.slice(s[1]+c.length)}}S(i,"balanced");function u(l,c){var r=c.match(l);return r?r[0]:null}S(u,"maybeMatch"),i.range=n;function n(l,c,r){var s,o,a,h,p,d=r.indexOf(l),m=r.indexOf(c,d+1),g=d;if(d>=0&&m>0){if(l===c)return[d,m];for(s=[],a=r.length;g>=0&&!p;)g==d?(s.push(g),d=r.indexOf(l,g+1)):s.length==1?p=[s.pop(),m]:(o=s.pop(),o<a&&(a=o,h=m),m=r.indexOf(c,g+1)),g=d<m&&d>=0?d:m;s.length&&(p=[a,h])}return p}S(n,"range")}),hD=J((e,t)=>{var i=uD();t.exports=p;var u="\0SLASH"+Math.random()+"\0",n="\0OPEN"+Math.random()+"\0",l="\0CLOSE"+Math.random()+"\0",c="\0COMMA"+Math.random()+"\0",r="\0PERIOD"+Math.random()+"\0";function s(v){return parseInt(v,10)==v?parseInt(v,10):v.charCodeAt(0)}S(s,"numeric");function o(v){return v.split("\\\\").join(u).split("\\{").join(n).split("\\}").join(l).split("\\,").join(c).split("\\.").join(r)}S(o,"escapeBraces");function a(v){return v.split(u).join("\\").split(n).join("{").split(l).join("}").split(c).join(",").split(r).join(".")}S(a,"unescapeBraces");function h(v){if(!v)return[""];var E=[],b=i("{","}",v);if(!b)return v.split(",");var w=b.pre,_=b.body,O=b.post,A=w.split(",");A[A.length-1]+="{"+_+"}";var I=h(O);return O.length&&(A[A.length-1]+=I.shift(),A.push.apply(A,I)),E.push.apply(E,A),E}S(h,"parseCommaParts");function p(v){return v?(v.substr(0,2)==="{}"&&(v="\\{\\}"+v.substr(2)),y(o(v),!0).map(a)):[]}S(p,"expandTop");function d(v){return"{"+v+"}"}S(d,"embrace");function m(v){return/^-?0\d/.test(v)}S(m,"isPadded");function g(v,E){return v<=E}S(g,"lte");function f(v,E){return v>=E}S(f,"gte");function y(v,E){var b=[],w=i("{","}",v);if(!w)return[v];var _=w.pre,O=w.post.length?y(w.post,!1):[""];if(/\$$/.test(w.pre))for(var A=0;A<O.length;A++){var I=_+"{"+w.body+"}"+O[A];b.push(I)}else{var P=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(w.body),L=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(w.body),j=P||L,N=w.body.indexOf(",")>=0;if(!j&&!N)return w.post.match(/,(?!,).*\}/)?(v=w.pre+"{"+w.body+l+w.post,y(v)):[v];var M;if(j)M=w.body.split(/\.\./);else if(M=h(w.body),M.length===1&&(M=y(M[0],!1).map(d),M.length===1))return O.map(function(V){return w.pre+M[0]+V});var B;if(j){var F=s(M[0]),D=s(M[1]),H=Math.max(M[0].length,M[1].length),G=M.length==3?Math.abs(s(M[2])):1,x=g,k=D<F;k&&(G*=-1,x=f);var T=M.some(m);B=[];for(var C=F;x(C,D);C+=G){var q;if(L)q=String.fromCharCode(C),q==="\\"&&(q="");else if(q=String(C),T){var X=H-q.length;if(X>0){var Y=new Array(X+1).join("0");C<0?q="-"+Y+q.slice(1):q=Y+q}}B.push(q)}}else{B=[];for(var $=0;$<M.length;$++)B.push.apply(B,y(M[$],!1))}for(var $=0;$<B.length;$++)for(var A=0;A<O.length;A++){var I=_+B[$]+O[A];(!E||j||I)&&b.push(I)}}return b}S(y,"expand")}),pD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assertValidPattern=void 0;var t=1024*64,i=S(u=>{if(typeof u!="string")throw new TypeError("invalid pattern");if(u.length>t)throw new TypeError("pattern is too long")},"assertValidPattern");e.assertValidPattern=i}),dD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseClass=void 0;var t={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},i=S(c=>c.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),u=S(c=>c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),n=S(c=>c.join(""),"rangesToString"),l=S((c,r)=>{let s=r;if(c.charAt(s)!=="[")throw new Error("not in a brace expression");let o=[],a=[],h=s+1,p=!1,d=!1,m=!1,g=!1,f=s,y="";e:for(;h<c.length;){let b=c.charAt(h);if((b==="!"||b==="^")&&h===s+1){g=!0,h++;continue}if(b==="]"&&p&&!m){f=h+1;break}if(p=!0,b==="\\"&&!m){m=!0,h++;continue}if(b==="["&&!m){for(let[w,[_,O,A]]of Object.entries(t))if(c.startsWith(w,h)){if(y)return["$.",!1,c.length-s,!0];h+=w.length,A?a.push(_):o.push(_),d=d||O;continue e}}if(m=!1,y){b>y?o.push(i(y)+"-"+i(b)):b===y&&o.push(i(b)),y="",h++;continue}if(c.startsWith("-]",h+1)){o.push(i(b+"-")),h+=2;continue}if(c.startsWith("-",h+1)){y=b,h+=2;continue}o.push(i(b)),h++}if(f<h)return["",!1,0,!1];if(!o.length&&!a.length)return["$.",!1,c.length-s,!0];if(a.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!g){let b=o[0].length===2?o[0].slice(-1):o[0];return[u(b),!1,f-s,!1]}let v="["+(g?"^":"")+n(o)+"]",E="["+(g?"":"^")+n(a)+"]";return[o.length&&a.length?"("+v+"|"+E+")":o.length?v:E,d,f-s,!0]},"parseClass");e.parseClass=l}),Tl=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=void 0;var t=S((i,{windowsPathsNoEscape:u=!1}={})=>u?i.replace(/\[([^\/\\])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),"unescape");e.unescape=t}),jf=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AST=void 0;var t=dD(),i=Tl(),u=new Set(["!","?","+","*","@"]),n=S(g=>u.has(g),"isExtglobType"),l="(?!(?:^|/)\\.\\.?(?:$|/))",c="(?!\\.)",r=new Set(["[","."]),s=new Set(["..","."]),o=new Set("().*{}+?[]^$\\!"),a=S(g=>g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),h="[^/]",p=h+"*?",d=h+"+?",m=class nt{static{S(this,"AST")}type;#e;#t;#r=!1;#s=[];#n;#c;#u;#h=!1;#o;#p;#a=!1;constructor(f,y,v={}){this.type=f,f&&(this.#t=!0),this.#n=y,this.#e=this.#n?this.#n.#e:this,this.#o=this.#e===this?v:this.#e.#o,this.#u=this.#e===this?[]:this.#e.#u,f==="!"&&!this.#e.#h&&this.#u.push(this),this.#c=this.#n?this.#n.#s.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let f of this.#s)if(typeof f!="string"&&(f.type||f.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#p!==void 0?this.#p:this.type?this.#p=this.type+"("+this.#s.map(f=>String(f)).join("|")+")":this.#p=this.#s.map(f=>String(f)).join("")}#l(){if(this!==this.#e)throw new Error("should only call on root");if(this.#h)return this;this.toString(),this.#h=!0;let f;for(;f=this.#u.pop();){if(f.type!=="!")continue;let y=f,v=y.#n;for(;v;){for(let E=y.#c+1;!v.type&&E<v.#s.length;E++)for(let b of f.#s){if(typeof b=="string")throw new Error("string part in extglob AST??");b.copyIn(v.#s[E])}y=v,v=y.#n}}return this}push(...f){for(let y of f)if(y!==""){if(typeof y!="string"&&!(y instanceof nt&&y.#n===this))throw new Error("invalid part: "+y);this.#s.push(y)}}toJSON(){let f=this.type===null?this.#s.slice().map(y=>typeof y=="string"?y:y.toJSON()):[this.type,...this.#s.map(y=>y.toJSON())];return this.isStart()&&!this.type&&f.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#h&&this.#n?.type==="!")&&f.push({}),f}isStart(){if(this.#e===this)return!0;if(!this.#n?.isStart())return!1;if(this.#c===0)return!0;let f=this.#n;for(let y=0;y<this.#c;y++){let v=f.#s[y];if(!(v instanceof nt&&v.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#n?.type==="!")return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();let f=this.#n?this.#n.#s.length:0;return this.#c===f-1}copyIn(f){typeof f=="string"?this.push(f):this.push(f.clone(this))}clone(f){let y=new nt(this.type,f);for(let v of this.#s)y.copyIn(v);return y}static#i(f,y,v,E){let b=!1,w=!1,_=-1,O=!1;if(y.type===null){let j=v,N="";for(;j<f.length;){let M=f.charAt(j++);if(b||M==="\\"){b=!b,N+=M;continue}if(w){j===_+1?(M==="^"||M==="!")&&(O=!0):M==="]"&&!(j===_+2&&O)&&(w=!1),N+=M;continue}else if(M==="["){w=!0,_=j,O=!1,N+=M;continue}if(!E.noext&&n(M)&&f.charAt(j)==="("){y.push(N),N="";let B=new nt(M,y);j=nt.#i(f,B,j,E),y.push(B);continue}N+=M}return y.push(N),j}let A=v+1,I=new nt(null,y),P=[],L="";for(;A<f.length;){let j=f.charAt(A++);if(b||j==="\\"){b=!b,L+=j;continue}if(w){A===_+1?(j==="^"||j==="!")&&(O=!0):j==="]"&&!(A===_+2&&O)&&(w=!1),L+=j;continue}else if(j==="["){w=!0,_=A,O=!1,L+=j;continue}if(n(j)&&f.charAt(A)==="("){I.push(L),L="";let N=new nt(j,I);I.push(N),A=nt.#i(f,N,A,E);continue}if(j==="|"){I.push(L),L="",P.push(I),I=new nt(null,y);continue}if(j===")")return L===""&&y.#s.length===0&&(y.#a=!0),I.push(L),L="",y.push(...P,I),A;L+=j}return y.type=null,y.#t=void 0,y.#s=[f.substring(v-1)],A}static fromGlob(f,y={}){let v=new nt(null,void 0,y);return nt.#i(f,v,0,y),v}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let f=this.toString(),[y,v,E,b]=this.toRegExpSource();if(!(E||this.#t||this.#o.nocase&&!this.#o.nocaseMagicOnly&&f.toUpperCase()!==f.toLowerCase()))return v;let w=(this.#o.nocase?"i":"")+(b?"u":"");return Object.assign(new RegExp(`^${y}$`,w),{_src:y,_glob:f})}get options(){return this.#o}toRegExpSource(f){let y=f??!!this.#o.dot;if(this.#e===this&&this.#l(),!this.type){let O=this.isStart()&&this.isEnd(),A=this.#s.map(L=>{let[j,N,M,B]=typeof L=="string"?nt.#y(L,this.#t,O):L.toRegExpSource(f);return this.#t=this.#t||M,this.#r=this.#r||B,j}).join(""),I="";if(this.isStart()&&typeof this.#s[0]=="string"&&!(this.#s.length===1&&s.has(this.#s[0]))){let L=r,j=y&&L.has(A.charAt(0))||A.startsWith("\\.")&&L.has(A.charAt(2))||A.startsWith("\\.\\.")&&L.has(A.charAt(4)),N=!y&&!f&&L.has(A.charAt(0));I=j?l:N?c:""}let P="";return this.isEnd()&&this.#e.#h&&this.#n?.type==="!"&&(P="(?:$|\\/)"),[I+A+P,(0,i.unescape)(A),this.#t=!!this.#t,this.#r]}let v=this.type==="*"||this.type==="+",E=this.type==="!"?"(?:(?!(?:":"(?:",b=this.#d(y);if(this.isStart()&&this.isEnd()&&!b&&this.type!=="!"){let O=this.toString();return this.#s=[O],this.type=null,this.#t=void 0,[O,(0,i.unescape)(this.toString()),!1,!1]}let w=!v||f||y||!c?"":this.#d(!0);w===b&&(w=""),w&&(b=`(?:${b})(?:${w})*?`);let _="";if(this.type==="!"&&this.#a)_=(this.isStart()&&!y?c:"")+d;else{let O=this.type==="!"?"))"+(this.isStart()&&!y&&!f?c:"")+p+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&w?")":this.type==="*"&&w?")?":`)${this.type}`;_=E+b+O}return[_,(0,i.unescape)(b),this.#t=!!this.#t,this.#r]}#d(f){return this.#s.map(y=>{if(typeof y=="string")throw new Error("string type in extglob ast??");let[v,E,b,w]=y.toRegExpSource(f);return this.#r=this.#r||w,v}).filter(y=>!(this.isStart()&&this.isEnd())||!!y).join("|")}static#y(f,y,v=!1){let E=!1,b="",w=!1;for(let _=0;_<f.length;_++){let O=f.charAt(_);if(E){E=!1,b+=(o.has(O)?"\\":"")+O;continue}if(O==="\\"){_===f.length-1?b+="\\\\":E=!0;continue}if(O==="["){let[A,I,P,L]=(0,t.parseClass)(f,_);if(P){b+=A,w=w||I,_+=P-1,y=y||L;continue}}if(O==="*"){v&&f==="*"?b+=d:b+=p,y=!0;continue}if(O==="?"){b+=h,y=!0;continue}b+=a(O)}return[b,(0,i.unescape)(f),!!y,w]}};e.AST=m}),Mf=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.escape=void 0;var t=S((i,{windowsPathsNoEscape:u=!1}={})=>u?i.replace(/[?*()[\]]/g,"[$&]"):i.replace(/[?*()[\]\\]/g,"\\$&"),"escape");e.escape=t}),fD=J(e=>{"use strict";var t=e&&e.__importDefault||function(U){return U&&U.__esModule?U:{default:U}};Object.defineProperty(e,"__esModule",{value:!0}),e.unescape=e.escape=e.AST=e.Minimatch=e.match=e.makeRe=e.braceExpand=e.defaults=e.filter=e.GLOBSTAR=e.sep=e.minimatch=void 0;var i=t(hD()),u=pD(),n=jf(),l=Mf(),c=Tl(),r=S((U,K,Z={})=>((0,u.assertValidPattern)(K),!Z.nocomment&&K.charAt(0)==="#"?!1:new Y(K,Z).match(U)),"minimatch");e.minimatch=r;var s=/^\*+([^+@!?\*\[\(]*)$/,o=S(U=>K=>!K.startsWith(".")&&K.endsWith(U),"starDotExtTest"),a=S(U=>K=>K.endsWith(U),"starDotExtTestDot"),h=S(U=>(U=U.toLowerCase(),K=>!K.startsWith(".")&&K.toLowerCase().endsWith(U)),"starDotExtTestNocase"),p=S(U=>(U=U.toLowerCase(),K=>K.toLowerCase().endsWith(U)),"starDotExtTestNocaseDot"),d=/^\*+\.\*+$/,m=S(U=>!U.startsWith(".")&&U.includes("."),"starDotStarTest"),g=S(U=>U!=="."&&U!==".."&&U.includes("."),"starDotStarTestDot"),f=/^\.\*+$/,y=S(U=>U!=="."&&U!==".."&&U.startsWith("."),"dotStarTest"),v=/^\*+$/,E=S(U=>U.length!==0&&!U.startsWith("."),"starTest"),b=S(U=>U.length!==0&&U!=="."&&U!=="..","starTestDot"),w=/^\?+([^+@!?\*\[\(]*)?$/,_=S(([U,K=""])=>{let Z=P([U]);return K?(K=K.toLowerCase(),Q=>Z(Q)&&Q.toLowerCase().endsWith(K)):Z},"qmarksTestNocase"),O=S(([U,K=""])=>{let Z=L([U]);return K?(K=K.toLowerCase(),Q=>Z(Q)&&Q.toLowerCase().endsWith(K)):Z},"qmarksTestNocaseDot"),A=S(([U,K=""])=>{let Z=L([U]);return K?Q=>Z(Q)&&Q.endsWith(K):Z},"qmarksTestDot"),I=S(([U,K=""])=>{let Z=P([U]);return K?Q=>Z(Q)&&Q.endsWith(K):Z},"qmarksTest"),P=S(([U])=>{let K=U.length;return Z=>Z.length===K&&!Z.startsWith(".")},"qmarksTestNoExt"),L=S(([U])=>{let K=U.length;return Z=>Z.length===K&&Z!=="."&&Z!==".."},"qmarksTestNoExtDot"),j=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",N={win32:{sep:"\\"},posix:{sep:"/"}};e.sep=j==="win32"?N.win32.sep:N.posix.sep,e.minimatch.sep=e.sep,e.GLOBSTAR=Symbol("globstar **"),e.minimatch.GLOBSTAR=e.GLOBSTAR;var M="[^/]",B=M+"*?",F="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",D="(?:(?!(?:\\/|^)\\.).)*?",H=S((U,K={})=>Z=>(0,e.minimatch)(Z,U,K),"filter");e.filter=H,e.minimatch.filter=e.filter;var G=S((U,K={})=>Object.assign({},U,K),"ext"),x=S(U=>{if(!U||typeof U!="object"||!Object.keys(U).length)return e.minimatch;let K=e.minimatch;return Object.assign(S((Z,Q,R={})=>K(Z,Q,G(U,R)),"m"),{Minimatch:class extends K.Minimatch{static{S(this,"Minimatch")}constructor(Z,Q={}){super(Z,G(U,Q))}static defaults(Z){return K.defaults(G(U,Z)).Minimatch}},AST:class extends K.AST{static{S(this,"AST")}constructor(Z,Q,R={}){super(Z,Q,G(U,R))}static fromGlob(Z,Q={}){return K.AST.fromGlob(Z,G(U,Q))}},unescape:S((Z,Q={})=>K.unescape(Z,G(U,Q)),"unescape"),escape:S((Z,Q={})=>K.escape(Z,G(U,Q)),"escape"),filter:S((Z,Q={})=>K.filter(Z,G(U,Q)),"filter"),defaults:S(Z=>K.defaults(G(U,Z)),"defaults"),makeRe:S((Z,Q={})=>K.makeRe(Z,G(U,Q)),"makeRe"),braceExpand:S((Z,Q={})=>K.braceExpand(Z,G(U,Q)),"braceExpand"),match:S((Z,Q,R={})=>K.match(Z,Q,G(U,R)),"match"),sep:K.sep,GLOBSTAR:e.GLOBSTAR})},"defaults");e.defaults=x,e.minimatch.defaults=e.defaults;var k=S((U,K={})=>((0,u.assertValidPattern)(U),K.nobrace||!/\{(?:(?!\{).)*\}/.test(U)?[U]:(0,i.default)(U)),"braceExpand");e.braceExpand=k,e.minimatch.braceExpand=e.braceExpand;var T=S((U,K={})=>new Y(U,K).makeRe(),"makeRe");e.makeRe=T,e.minimatch.makeRe=e.makeRe;var C=S((U,K,Z={})=>{let Q=new Y(K,Z);return U=U.filter(R=>Q.match(R)),Q.options.nonull&&!U.length&&U.push(K),U},"match");e.match=C,e.minimatch.match=e.match;var q=/[?*]|[+@!]\(.*?\)|\[|\]/,X=S(U=>U.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Y=class{static{S(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(U,K={}){(0,u.assertValidPattern)(U),K=K||{},this.options=K,this.pattern=U,this.platform=K.platform||j,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!K.windowsPathsNoEscape||K.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!K.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!K.nonegate,this.comment=!1,this.empty=!1,this.partial=!!K.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=K.windowsNoMagicRoot!==void 0?K.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let U of this.set)for(let K of U)if(typeof K!="string")return!0;return!1}debug(...U){}make(){let U=this.pattern,K=this.options;if(!K.nocomment&&U.charAt(0)==="#"){this.comment=!0;return}if(!U){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],K.debug&&(this.debug=(...R)=>{}),this.debug(this.pattern,this.globSet);let Z=this.globSet.map(R=>this.slashSplit(R));this.globParts=this.preprocess(Z),this.debug(this.pattern,this.globParts);let Q=this.globParts.map((R,W,ee)=>{if(this.isWindows&&this.windowsNoMagicRoot){let ne=R[0]===""&&R[1]===""&&(R[2]==="?"||!q.test(R[2]))&&!q.test(R[3]),te=/^[a-z]:/i.test(R[0]);if(ne)return[...R.slice(0,4),...R.slice(4).map(le=>this.parse(le))];if(te)return[R[0],...R.slice(1).map(le=>this.parse(le))]}return R.map(ne=>this.parse(ne))});if(this.debug(this.pattern,Q),this.set=Q.filter(R=>R.indexOf(!1)===-1),this.isWindows)for(let R=0;R<this.set.length;R++){let W=this.set[R];W[0]===""&&W[1]===""&&this.globParts[R][2]==="?"&&typeof W[3]=="string"&&/^[a-z]:$/i.test(W[3])&&(W[2]="?")}this.debug(this.pattern,this.set)}preprocess(U){if(this.options.noglobstar)for(let Z=0;Z<U.length;Z++)for(let Q=0;Q<U[Z].length;Q++)U[Z][Q]==="**"&&(U[Z][Q]="*");let{optimizationLevel:K=1}=this.options;return K>=2?(U=this.firstPhasePreProcess(U),U=this.secondPhasePreProcess(U)):K>=1?U=this.levelOneOptimize(U):U=this.adjascentGlobstarOptimize(U),U}adjascentGlobstarOptimize(U){return U.map(K=>{let Z=-1;for(;(Z=K.indexOf("**",Z+1))!==-1;){let Q=Z;for(;K[Q+1]==="**";)Q++;Q!==Z&&K.splice(Z,Q-Z)}return K})}levelOneOptimize(U){return U.map(K=>(K=K.reduce((Z,Q)=>{let R=Z[Z.length-1];return Q==="**"&&R==="**"?Z:Q===".."&&R&&R!==".."&&R!=="."&&R!=="**"?(Z.pop(),Z):(Z.push(Q),Z)},[]),K.length===0?[""]:K))}levelTwoFileOptimize(U){Array.isArray(U)||(U=this.slashSplit(U));let K=!1;do{if(K=!1,!this.preserveMultipleSlashes){for(let Q=1;Q<U.length-1;Q++){let R=U[Q];Q===1&&R===""&&U[0]===""||(R==="."||R==="")&&(K=!0,U.splice(Q,1),Q--)}U[0]==="."&&U.length===2&&(U[1]==="."||U[1]==="")&&(K=!0,U.pop())}let Z=0;for(;(Z=U.indexOf("..",Z+1))!==-1;){let Q=U[Z-1];Q&&Q!=="."&&Q!==".."&&Q!=="**"&&(K=!0,U.splice(Z-1,2),Z-=2)}}while(K);return U.length===0?[""]:U}firstPhasePreProcess(U){let K=!1;do{K=!1;for(let Z of U){let Q=-1;for(;(Q=Z.indexOf("**",Q+1))!==-1;){let W=Q;for(;Z[W+1]==="**";)W++;W>Q&&Z.splice(Q+1,W-Q);let ee=Z[Q+1],ne=Z[Q+2],te=Z[Q+3];if(ee!==".."||!ne||ne==="."||ne===".."||!te||te==="."||te==="..")continue;K=!0,Z.splice(Q,1);let le=Z.slice(0);le[Q]="**",U.push(le),Q--}if(!this.preserveMultipleSlashes){for(let W=1;W<Z.length-1;W++){let ee=Z[W];W===1&&ee===""&&Z[0]===""||(ee==="."||ee==="")&&(K=!0,Z.splice(W,1),W--)}Z[0]==="."&&Z.length===2&&(Z[1]==="."||Z[1]==="")&&(K=!0,Z.pop())}let R=0;for(;(R=Z.indexOf("..",R+1))!==-1;){let W=Z[R-1];if(W&&W!=="."&&W!==".."&&W!=="**"){K=!0;let ee=R===1&&Z[R+1]==="**"?["."]:[];Z.splice(R-1,2,...ee),Z.length===0&&Z.push(""),R-=2}}}}while(K);return U}secondPhasePreProcess(U){for(let K=0;K<U.length-1;K++)for(let Z=K+1;Z<U.length;Z++){let Q=this.partsMatch(U[K],U[Z],!this.preserveMultipleSlashes);if(Q){U[K]=[],U[Z]=Q;break}}return U.filter(K=>K.length)}partsMatch(U,K,Z=!1){let Q=0,R=0,W=[],ee="";for(;Q<U.length&&R<K.length;)if(U[Q]===K[R])W.push(ee==="b"?K[R]:U[Q]),Q++,R++;else if(Z&&U[Q]==="**"&&K[R]===U[Q+1])W.push(U[Q]),Q++;else if(Z&&K[R]==="**"&&U[Q]===K[R+1])W.push(K[R]),R++;else if(U[Q]==="*"&&K[R]&&(this.options.dot||!K[R].startsWith("."))&&K[R]!=="**"){if(ee==="b")return!1;ee="a",W.push(U[Q]),Q++,R++}else if(K[R]==="*"&&U[Q]&&(this.options.dot||!U[Q].startsWith("."))&&U[Q]!=="**"){if(ee==="a")return!1;ee="b",W.push(K[R]),Q++,R++}else return!1;return U.length===K.length&&W}parseNegate(){if(this.nonegate)return;let U=this.pattern,K=!1,Z=0;for(let Q=0;Q<U.length&&U.charAt(Q)==="!";Q++)K=!K,Z++;Z&&(this.pattern=U.slice(Z)),this.negate=K}matchOne(U,K,Z=!1){let Q=this.options;if(this.isWindows){let ce=typeof U[0]=="string"&&/^[a-z]:$/i.test(U[0]),ge=!ce&&U[0]===""&&U[1]===""&&U[2]==="?"&&/^[a-z]:$/i.test(U[3]),ye=typeof K[0]=="string"&&/^[a-z]:$/i.test(K[0]),ue=!ye&&K[0]===""&&K[1]===""&&K[2]==="?"&&typeof K[3]=="string"&&/^[a-z]:$/i.test(K[3]),de=ge?3:ce?0:void 0,fe=ue?3:ye?0:void 0;if(typeof de=="number"&&typeof fe=="number"){let[ve,be]=[U[de],K[fe]];ve.toLowerCase()===be.toLowerCase()&&(K[fe]=ve,fe>de?K=K.slice(fe):de>fe&&(U=U.slice(de)))}}let{optimizationLevel:R=1}=this.options;R>=2&&(U=this.levelTwoFileOptimize(U)),this.debug("matchOne",this,{file:U,pattern:K}),this.debug("matchOne",U.length,K.length);for(var W=0,ee=0,ne=U.length,te=K.length;W<ne&&ee<te;W++,ee++){this.debug("matchOne loop");var le=K[ee],pe=U[W];if(this.debug(K,le,pe),le===!1)return!1;if(le===e.GLOBSTAR){this.debug("GLOBSTAR",[K,le,pe]);var re=W,he=ee+1;if(he===te){for(this.debug("** at the end");W<ne;W++)if(U[W]==="."||U[W]===".."||!Q.dot&&U[W].charAt(0)===".")return!1;return!0}for(;re<ne;){var ie=U[re];if(this.debug(`
78
- globstar while`,U,re,K,he,ie),this.matchOne(U.slice(re),K.slice(he),Z))return this.debug("globstar found match!",re,ne,ie),!0;if(ie==="."||ie===".."||!Q.dot&&ie.charAt(0)==="."){this.debug("dot detected!",U,re,K,he);break}this.debug("globstar swallow a segment, and continue"),re++}return!!(Z&&(this.debug(`
79
- >>> no match, partial?`,U,re,K,he),re===ne))}let ce;if(typeof le=="string"?(ce=pe===le,this.debug("string match",le,pe,ce)):(ce=le.test(pe),this.debug("pattern match",le,pe,ce)),!ce)return!1}if(W===ne&&ee===te)return!0;if(W===ne)return Z;if(ee===te)return W===ne-1&&U[W]==="";throw new Error("wtf?")}braceExpand(){return(0,e.braceExpand)(this.pattern,this.options)}parse(U){(0,u.assertValidPattern)(U);let K=this.options;if(U==="**")return e.GLOBSTAR;if(U==="")return"";let Z,Q=null;(Z=U.match(v))?Q=K.dot?b:E:(Z=U.match(s))?Q=(K.nocase?K.dot?p:h:K.dot?a:o)(Z[1]):(Z=U.match(w))?Q=(K.nocase?K.dot?O:_:K.dot?A:I)(Z):(Z=U.match(d))?Q=K.dot?g:m:(Z=U.match(f))&&(Q=y);let R=n.AST.fromGlob(U,this.options).toMMPattern();return Q&&typeof R=="object"&&Reflect.defineProperty(R,"test",{value:Q}),R}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let U=this.set;if(!U.length)return this.regexp=!1,this.regexp;let K=this.options,Z=K.noglobstar?B:K.dot?F:D,Q=new Set(K.nocase?["i"]:[]),R=U.map(ne=>{let te=ne.map(le=>{if(le instanceof RegExp)for(let pe of le.flags.split(""))Q.add(pe);return typeof le=="string"?X(le):le===e.GLOBSTAR?e.GLOBSTAR:le._src});return te.forEach((le,pe)=>{let re=te[pe+1],he=te[pe-1];le!==e.GLOBSTAR||he===e.GLOBSTAR||(he===void 0?re!==void 0&&re!==e.GLOBSTAR?te[pe+1]="(?:\\/|"+Z+"\\/)?"+re:te[pe]=Z:re===void 0?te[pe-1]=he+"(?:\\/|"+Z+")?":re!==e.GLOBSTAR&&(te[pe-1]=he+"(?:\\/|\\/"+Z+"\\/)"+re,te[pe+1]=e.GLOBSTAR))}),te.filter(le=>le!==e.GLOBSTAR).join("/")}).join("|"),[W,ee]=U.length>1?["(?:",")"]:["",""];R="^"+W+R+ee+"$",this.negate&&(R="^(?!"+R+").+$");try{this.regexp=new RegExp(R,[...Q].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(U){return this.preserveMultipleSlashes?U.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(U)?["",...U.split(/\/+/)]:U.split(/\/+/)}match(U,K=this.partial){if(this.debug("match",U,this.pattern),this.comment)return!1;if(this.empty)return U==="";if(U==="/"&&K)return!0;let Z=this.options;this.isWindows&&(U=U.split("\\").join("/"));let Q=this.slashSplit(U);this.debug(this.pattern,"split",Q);let R=this.set;this.debug(this.pattern,"set",R);let W=Q[Q.length-1];if(!W)for(let ee=Q.length-2;!W&&ee>=0;ee--)W=Q[ee];for(let ee=0;ee<R.length;ee++){let ne=R[ee],te=Q;if(Z.matchBase&&ne.length===1&&(te=[W]),this.matchOne(te,ne,K))return Z.flipNegate?!0:!this.negate}return Z.flipNegate?!1:this.negate}static defaults(U){return e.minimatch.defaults(U).Minimatch}};e.Minimatch=Y;var $=jf();Object.defineProperty(e,"AST",{enumerable:!0,get:S(function(){return $.AST},"get")});var V=Mf();Object.defineProperty(e,"escape",{enumerable:!0,get:S(function(){return V.escape},"get")});var z=Tl();Object.defineProperty(e,"unescape",{enumerable:!0,get:S(function(){return z.unescape},"get")}),e.minimatch.AST=n.AST,e.minimatch.Minimatch=Y,e.minimatch.escape=l.escape,e.minimatch.unescape=c.unescape}),Cm=J(e=>{"use strict";var t=e&&e.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.SuccinctRoles=e.DelegatedRole=e.Role=e.TOP_LEVEL_ROLE_NAMES=void 0;var i=t(require("crypto")),u=fD(),n=t(require("util")),l=$t(),c=At();e.TOP_LEVEL_ROLE_NAMES=["root","targets","snapshot","timestamp"];var r=class Pl{static{S(this,"Role")}keyIDs;threshold;unrecognizedFields;constructor(m){let{keyIDs:g,threshold:f,unrecognizedFields:y}=m;if(s(g))throw new l.ValueError("duplicate key IDs found");if(f<1)throw new l.ValueError("threshold must be at least 1");this.keyIDs=g,this.threshold=f,this.unrecognizedFields=y||{}}equals(m){return m instanceof Pl?this.threshold===m.threshold&&n.default.isDeepStrictEqual(this.keyIDs,m.keyIDs)&&n.default.isDeepStrictEqual(this.unrecognizedFields,m.unrecognizedFields):!1}toJSON(){return{keyids:this.keyIDs,threshold:this.threshold,...this.unrecognizedFields}}static fromJSON(m){let{keyids:g,threshold:f,...y}=m;if(!c.guard.isStringArray(g))throw new TypeError("keyids must be an array");if(typeof f!="number")throw new TypeError("threshold must be a number");return new Pl({keyIDs:g,threshold:f,unrecognizedFields:y})}};e.Role=r;function s(d){return new Set(d).size!==d.length}S(s,"hasDuplicates");var o=class xl extends r{static{S(this,"DelegatedRole")}name;terminating;paths;pathHashPrefixes;constructor(m){super(m);let{name:g,terminating:f,paths:y,pathHashPrefixes:v}=m;if(this.name=g,this.terminating=f,m.paths&&m.pathHashPrefixes)throw new l.ValueError("paths and pathHashPrefixes are mutually exclusive");this.paths=y,this.pathHashPrefixes=v}equals(m){return m instanceof xl?super.equals(m)&&this.name===m.name&&this.terminating===m.terminating&&n.default.isDeepStrictEqual(this.paths,m.paths)&&n.default.isDeepStrictEqual(this.pathHashPrefixes,m.pathHashPrefixes):!1}isDelegatedPath(m){if(this.paths)return this.paths.some(g=>h(m,g));if(this.pathHashPrefixes){let g=i.default.createHash("sha256").update(m).digest("hex");return this.pathHashPrefixes.some(f=>g.startsWith(f))}return!1}toJSON(){let m={...super.toJSON(),name:this.name,terminating:this.terminating};return this.paths&&(m.paths=this.paths),this.pathHashPrefixes&&(m.path_hash_prefixes=this.pathHashPrefixes),m}static fromJSON(m){let{keyids:g,threshold:f,name:y,terminating:v,paths:E,path_hash_prefixes:b,...w}=m;if(!c.guard.isStringArray(g))throw new TypeError("keyids must be an array of strings");if(typeof f!="number")throw new TypeError("threshold must be a number");if(typeof y!="string")throw new TypeError("name must be a string");if(typeof v!="boolean")throw new TypeError("terminating must be a boolean");if(c.guard.isDefined(E)&&!c.guard.isStringArray(E))throw new TypeError("paths must be an array of strings");if(c.guard.isDefined(b)&&!c.guard.isStringArray(b))throw new TypeError("path_hash_prefixes must be an array of strings");return new xl({keyIDs:g,threshold:f,name:y,terminating:v,paths:E,pathHashPrefixes:b,unrecognizedFields:w})}};e.DelegatedRole=o;var a=S((d,m)=>d.map((g,f)=>[g,m[f]]),"zip");function h(d,m){let g=d.split("/"),f=m.split("/");return f.length!=g.length?!1:a(g,f).every(([y,v])=>(0,u.minimatch)(y,v))}S(h,"isTargetInPathPattern");var p=class Nl extends r{static{S(this,"SuccinctRoles")}bitLength;namePrefix;numberOfBins;suffixLen;constructor(m){super(m);let{bitLength:g,namePrefix:f}=m;if(g<=0||g>32)throw new l.ValueError("bitLength must be between 1 and 32");this.bitLength=g,this.namePrefix=f,this.numberOfBins=Math.pow(2,g),this.suffixLen=(this.numberOfBins-1).toString(16).length}equals(m){return m instanceof Nl?super.equals(m)&&this.bitLength===m.bitLength&&this.namePrefix===m.namePrefix:!1}getRoleForTarget(m){let g=i.default.createHash("sha256").update(m).digest().subarray(0,4),f=32-this.bitLength,y=(g.readUInt32BE()>>>f).toString(16).padStart(this.suffixLen,"0");return`${this.namePrefix}-${y}`}*getRoles(){for(let m=0;m<this.numberOfBins;m++){let g=m.toString(16).padStart(this.suffixLen,"0");yield`${this.namePrefix}-${g}`}}isDelegatedRole(m){let g=this.namePrefix+"-";if(!m.startsWith(g))return!1;let f=m.slice(g.length,m.length);if(f.length!=this.suffixLen||!f.match(/^[0-9a-fA-F]+$/))return!1;let y=parseInt(f,16);return 0<=y&&y<this.numberOfBins}toJSON(){return{...super.toJSON(),bit_length:this.bitLength,name_prefix:this.namePrefix}}static fromJSON(m){let{keyids:g,threshold:f,bit_length:y,name_prefix:v,...E}=m;if(!c.guard.isStringArray(g))throw new TypeError("keyids must be an array of strings");if(typeof f!="number")throw new TypeError("threshold must be a number");if(typeof y!="number")throw new TypeError("bit_length must be a number");if(typeof v!="string")throw new TypeError("name_prefix must be a string");return new Nl({keyIDs:g,threshold:f,bitLength:y,namePrefix:v,unrecognizedFields:E})}};e.SuccinctRoles=p}),Im=J(e=>{"use strict";var t=e&&e.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.Root=void 0;var i=t(require("util")),u=xr(),n=$t(),l=yc(),c=Cm(),r=At(),s=class kl extends u.Signed{static{S(this,"Root")}type=u.MetadataKind.Root;keys;roles;consistentSnapshot;constructor(m){if(super(m),this.keys=m.keys||{},this.consistentSnapshot=m.consistentSnapshot??!0,!m.roles)this.roles=c.TOP_LEVEL_ROLE_NAMES.reduce((g,f)=>({...g,[f]:new c.Role({keyIDs:[],threshold:1})}),{});else{let g=new Set(Object.keys(m.roles));if(!c.TOP_LEVEL_ROLE_NAMES.every(f=>g.has(f)))throw new n.ValueError("missing top-level role");this.roles=m.roles}}addKey(m,g){if(!this.roles[g])throw new n.ValueError(`role ${g} does not exist`);this.roles[g].keyIDs.includes(m.keyID)||this.roles[g].keyIDs.push(m.keyID),this.keys[m.keyID]=m}equals(m){return m instanceof kl?super.equals(m)&&this.consistentSnapshot===m.consistentSnapshot&&i.default.isDeepStrictEqual(this.keys,m.keys)&&i.default.isDeepStrictEqual(this.roles,m.roles):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,keys:o(this.keys),roles:a(this.roles),consistent_snapshot:this.consistentSnapshot,...this.unrecognizedFields}}static fromJSON(m){let{unrecognizedFields:g,...f}=u.Signed.commonFieldsFromJSON(m),{keys:y,roles:v,consistent_snapshot:E,...b}=g;if(typeof E!="boolean")throw new TypeError("consistent_snapshot must be a boolean");return new kl({...f,keys:h(y),roles:p(v),consistentSnapshot:E,unrecognizedFields:b})}};e.Root=s;function o(d){return Object.entries(d).reduce((m,[g,f])=>({...m,[g]:f.toJSON()}),{})}S(o,"keysToJSON");function a(d){return Object.entries(d).reduce((m,[g,f])=>({...m,[g]:f.toJSON()}),{})}S(a,"rolesToJSON");function h(d){let m;if(r.guard.isDefined(d)){if(!r.guard.isObjectRecord(d))throw new TypeError("keys must be an object");m=Object.entries(d).reduce((g,[f,y])=>({...g,[f]:l.Key.fromJSON(f,y)}),{})}return m}S(h,"keysFromJSON");function p(d){let m;if(r.guard.isDefined(d)){if(!r.guard.isObjectRecord(d))throw new TypeError("roles must be an object");m=Object.entries(d).reduce((g,[f,y])=>({...g,[f]:c.Role.fromJSON(y)}),{})}return m}S(p,"rolesFromJSON")}),Tm=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Signature=void 0;var t=class Pm{static{S(this,"Signature")}keyID;sig;constructor(u){let{keyID:n,sig:l}=u;this.keyID=n,this.sig=l}toJSON(){return{keyid:this.keyID,sig:this.sig}}static fromJSON(u){let{keyid:n,sig:l}=u;if(typeof n!="string")throw new TypeError("keyid must be a string");if(typeof l!="string")throw new TypeError("sig must be a string");return new Pm({keyID:n,sig:l})}};e.Signature=t}),xm=J(e=>{"use strict";var t=e&&e.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.Snapshot=void 0;var i=t(require("util")),u=xr(),n=hn(),l=At(),c=class Ll extends u.Signed{static{S(this,"Snapshot")}type=u.MetadataKind.Snapshot;meta;constructor(a){super(a),this.meta=a.meta||{"targets.json":new n.MetaFile({version:1})}}equals(a){return a instanceof Ll?super.equals(a)&&i.default.isDeepStrictEqual(this.meta,a.meta):!1}toJSON(){return{_type:this.type,meta:r(this.meta),spec_version:this.specVersion,version:this.version,expires:this.expires,...this.unrecognizedFields}}static fromJSON(a){let{unrecognizedFields:h,...p}=u.Signed.commonFieldsFromJSON(a),{meta:d,...m}=h;return new Ll({...p,meta:s(d),unrecognizedFields:m})}};e.Snapshot=c;function r(o){return Object.entries(o).reduce((a,[h,p])=>({...a,[h]:p.toJSON()}),{})}S(r,"metaToJSON");function s(o){let a;if(l.guard.isDefined(o))if(l.guard.isObjectRecord(o))a=Object.entries(o).reduce((h,[p,d])=>({...h,[p]:n.MetaFile.fromJSON(d)}),{});else throw new TypeError("meta field is malformed");return a}S(s,"metaFromJSON")}),gD=J(e=>{"use strict";var t=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.Delegations=void 0;var i=t(require("util")),u=$t(),n=yc(),l=Cm(),c=At(),r=class Dl{static{S(this,"Delegations")}keys;roles;unrecognizedFields;succinctRoles;constructor(d){if(this.keys=d.keys,this.unrecognizedFields=d.unrecognizedFields||{},d.roles&&Object.keys(d.roles).some(m=>l.TOP_LEVEL_ROLE_NAMES.includes(m)))throw new u.ValueError("Delegated role name conflicts with top-level role name");this.succinctRoles=d.succinctRoles,this.roles=d.roles}equals(d){return d instanceof Dl?i.default.isDeepStrictEqual(this.keys,d.keys)&&i.default.isDeepStrictEqual(this.roles,d.roles)&&i.default.isDeepStrictEqual(this.unrecognizedFields,d.unrecognizedFields)&&i.default.isDeepStrictEqual(this.succinctRoles,d.succinctRoles):!1}*rolesForTarget(d){if(this.roles)for(let m of Object.values(this.roles))m.isDelegatedPath(d)&&(yield{role:m.name,terminating:m.terminating});else this.succinctRoles&&(yield{role:this.succinctRoles.getRoleForTarget(d),terminating:!0})}toJSON(){let d={keys:s(this.keys),...this.unrecognizedFields};return this.roles?d.roles=o(this.roles):this.succinctRoles&&(d.succinct_roles=this.succinctRoles.toJSON()),d}static fromJSON(d){let{keys:m,roles:g,succinct_roles:f,...y}=d,v;return c.guard.isObject(f)&&(v=l.SuccinctRoles.fromJSON(f)),new Dl({keys:a(m),roles:h(g),unrecognizedFields:y,succinctRoles:v})}};e.Delegations=r;function s(p){return Object.entries(p).reduce((d,[m,g])=>({...d,[m]:g.toJSON()}),{})}S(s,"keysToJSON");function o(p){return Object.values(p).map(d=>d.toJSON())}S(o,"rolesToJSON");function a(p){if(!c.guard.isObjectRecord(p))throw new TypeError("keys is malformed");return Object.entries(p).reduce((d,[m,g])=>({...d,[m]:n.Key.fromJSON(m,g)}),{})}S(a,"keysFromJSON");function h(p){let d;if(c.guard.isDefined(p)){if(!c.guard.isObjectArray(p))throw new TypeError("roles is malformed");d=p.reduce((m,g)=>{let f=l.DelegatedRole.fromJSON(g);return{...m,[f.name]:f}},{})}return d}S(h,"rolesFromJSON")}),Nm=J(e=>{"use strict";var t=e&&e.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0}),e.Targets=void 0;var i=t(require("util")),u=xr(),n=gD(),l=hn(),c=At(),r=class $l extends u.Signed{static{S(this,"Targets")}type=u.MetadataKind.Targets;targets;delegations;constructor(p){super(p),this.targets=p.targets||{},this.delegations=p.delegations}addTarget(p){this.targets[p.path]=p}equals(p){return p instanceof $l?super.equals(p)&&i.default.isDeepStrictEqual(this.targets,p.targets)&&i.default.isDeepStrictEqual(this.delegations,p.delegations):!1}toJSON(){let p={_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,targets:s(this.targets),...this.unrecognizedFields};return this.delegations&&(p.delegations=this.delegations.toJSON()),p}static fromJSON(p){let{unrecognizedFields:d,...m}=u.Signed.commonFieldsFromJSON(p),{targets:g,delegations:f,...y}=d;return new $l({...m,targets:o(g),delegations:a(f),unrecognizedFields:y})}};e.Targets=r;function s(h){return Object.entries(h).reduce((p,[d,m])=>({...p,[d]:m.toJSON()}),{})}S(s,"targetsToJSON");function o(h){let p;if(c.guard.isDefined(h))if(c.guard.isObjectRecord(h))p=Object.entries(h).reduce((d,[m,g])=>({...d,[m]:l.TargetFile.fromJSON(m,g)}),{});else throw new TypeError("targets must be an object");return p}S(o,"targetsFromJSON");function a(h){let p;if(c.guard.isDefined(h))if(c.guard.isObject(h))p=n.Delegations.fromJSON(h);else throw new TypeError("delegations must be an object");return p}S(a,"delegationsFromJSON")}),km=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Timestamp=void 0;var t=xr(),i=hn(),u=At(),n=class jl extends t.Signed{static{S(this,"Timestamp")}type=t.MetadataKind.Timestamp;snapshotMeta;constructor(r){super(r),this.snapshotMeta=r.snapshotMeta||new i.MetaFile({version:1})}equals(r){return r instanceof jl?super.equals(r)&&this.snapshotMeta.equals(r.snapshotMeta):!1}toJSON(){return{_type:this.type,spec_version:this.specVersion,version:this.version,expires:this.expires,meta:{"snapshot.json":this.snapshotMeta.toJSON()},...this.unrecognizedFields}}static fromJSON(r){let{unrecognizedFields:s,...o}=t.Signed.commonFieldsFromJSON(r),{meta:a,...h}=s;return new jl({...o,snapshotMeta:l(a),unrecognizedFields:h})}};e.Timestamp=n;function l(c){let r;if(u.guard.isDefined(c)){let s=c["snapshot.json"];if(!u.guard.isDefined(s)||!u.guard.isObject(s))throw new TypeError("missing snapshot.json in meta");r=i.MetaFile.fromJSON(s)}return r}S(l,"snapshotMetaFromJSON")}),mD=J(e=>{"use strict";var t=e&&e.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(e,"__esModule",{value:!0}),e.Metadata=void 0;var i=Rm(),u=t(require("util")),n=xr(),l=$t(),c=Im(),r=Tm(),s=xm(),o=Nm(),a=km(),h=At(),p=class Ml{static{S(this,"Metadata")}signed;signatures;unrecognizedFields;constructor(m,g,f){this.signed=m,this.signatures=g||{},this.unrecognizedFields=f||{}}sign(m,g=!0){let f=Buffer.from((0,i.canonicalize)(this.signed.toJSON())),y=m(f);g||(this.signatures={}),this.signatures[y.keyID]=y}verifyDelegate(m,g){let f,y={};switch(this.signed.type){case n.MetadataKind.Root:y=this.signed.keys,f=this.signed.roles[m];break;case n.MetadataKind.Targets:if(!this.signed.delegations)throw new l.ValueError(`No delegations found for ${m}`);y=this.signed.delegations.keys,this.signed.delegations.roles?f=this.signed.delegations.roles[m]:this.signed.delegations.succinctRoles&&this.signed.delegations.succinctRoles.isDelegatedRole(m)&&(f=this.signed.delegations.succinctRoles);break;default:throw new TypeError("invalid metadata type")}if(!f)throw new l.ValueError(`no delegation found for ${m}`);let v=new Set;if(f.keyIDs.forEach(E=>{let b=y[E];if(b)try{b.verifySignature(g),v.add(b.keyID)}catch{}}),v.size<f.threshold)throw new l.UnsignedMetadataError(`${m} was signed by ${v.size}/${f.threshold} keys`)}equals(m){return m instanceof Ml?this.signed.equals(m.signed)&&u.default.isDeepStrictEqual(this.signatures,m.signatures)&&u.default.isDeepStrictEqual(this.unrecognizedFields,m.unrecognizedFields):!1}toJSON(){return{signatures:Object.values(this.signatures).map(m=>m.toJSON()),signed:this.signed.toJSON(),...this.unrecognizedFields}}static fromJSON(m,g){let{signed:f,signatures:y,...v}=g;if(!h.guard.isDefined(f)||!h.guard.isObject(f))throw new TypeError("signed is not defined");if(m!==f._type)throw new l.ValueError(`expected '${m}', got ${f._type}`);if(!h.guard.isObjectArray(y))throw new TypeError("signatures is not an array");let E;switch(m){case n.MetadataKind.Root:E=c.Root.fromJSON(f);break;case n.MetadataKind.Timestamp:E=a.Timestamp.fromJSON(f);break;case n.MetadataKind.Snapshot:E=s.Snapshot.fromJSON(f);break;case n.MetadataKind.Targets:E=o.Targets.fromJSON(f);break;default:throw new TypeError("invalid metadata type")}let b={};return y.forEach(w=>{let _=r.Signature.fromJSON(w);if(b[_.keyID])throw new l.ValueError(`multiple signatures found for keyid: ${_.keyID}`);b[_.keyID]=_}),new Ml(E,b,v)}};e.Metadata=p}),vc=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Timestamp=e.Targets=e.Snapshot=e.Signature=e.Root=e.Metadata=e.Key=e.TargetFile=e.MetaFile=e.ValueError=e.MetadataKind=void 0;var t=xr();Object.defineProperty(e,"MetadataKind",{enumerable:!0,get:S(function(){return t.MetadataKind},"get")});var i=$t();Object.defineProperty(e,"ValueError",{enumerable:!0,get:S(function(){return i.ValueError},"get")});var u=hn();Object.defineProperty(e,"MetaFile",{enumerable:!0,get:S(function(){return u.MetaFile},"get")}),Object.defineProperty(e,"TargetFile",{enumerable:!0,get:S(function(){return u.TargetFile},"get")});var n=yc();Object.defineProperty(e,"Key",{enumerable:!0,get:S(function(){return n.Key},"get")});var l=mD();Object.defineProperty(e,"Metadata",{enumerable:!0,get:S(function(){return l.Metadata},"get")});var c=Im();Object.defineProperty(e,"Root",{enumerable:!0,get:S(function(){return c.Root},"get")});var r=Tm();Object.defineProperty(e,"Signature",{enumerable:!0,get:S(function(){return r.Signature},"get")});var s=xm();Object.defineProperty(e,"Snapshot",{enumerable:!0,get:S(function(){return s.Snapshot},"get")});var o=Nm();Object.defineProperty(e,"Targets",{enumerable:!0,get:S(function(){return o.Targets},"get")});var a=km();Object.defineProperty(e,"Timestamp",{enumerable:!0,get:S(function(){return a.Timestamp},"get")})}),Sc=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DownloadHTTPError=e.DownloadLengthMismatchError=e.DownloadError=e.ExpiredMetadataError=e.EqualVersionError=e.BadVersionError=e.RepositoryError=e.PersistError=e.RuntimeError=e.ValueError=void 0;var t=class extends Error{static{S(this,"ValueError")}};e.ValueError=t;var i=class extends Error{static{S(this,"RuntimeError")}};e.RuntimeError=i;var u=class extends Error{static{S(this,"PersistError")}};e.PersistError=u;var n=class extends Error{static{S(this,"RepositoryError")}};e.RepositoryError=n;var l=class extends n{static{S(this,"BadVersionError")}};e.BadVersionError=l;var c=class extends l{static{S(this,"EqualVersionError")}};e.EqualVersionError=c;var r=class extends n{static{S(this,"ExpiredMetadataError")}};e.ExpiredMetadataError=r;var s=class extends Error{static{S(this,"DownloadError")}};e.DownloadError=s;var o=class extends s{static{S(this,"DownloadLengthMismatchError")}};e.DownloadLengthMismatchError=o;var a=class extends s{static{S(this,"DownloadHTTPError")}statusCode;constructor(h,p){super(h),this.statusCode=p}};e.DownloadHTTPError=a}),yD=J(e=>{"use strict";var t=e&&e.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.withTempFile=void 0;var i=t(require("internal/fs/promises")),u=t(require("os")),n=t(require("path")),l=S(async r=>c(async s=>r(n.default.join(s,"tempfile"))),"withTempFile");e.withTempFile=l;var c=S(async r=>{let s=await i.default.realpath(u.default.tmpdir()),o=await i.default.mkdtemp(s+n.default.sep);try{return await r(o)}finally{await i.default.rm(o,{force:!0,recursive:!0,maxRetries:3})}},"withTempDir")}),Lm=J(e=>{"use strict";var t=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultFetcher=e.BaseFetcher=void 0;var i=t(Pr()),u=t(require("fs")),n=t(on()),l=t(require("util")),c=Sc(),r=yD(),s=(0,i.default)("tuf:fetch"),o=class{static{S(this,"BaseFetcher")}async downloadFile(p,d,m){return(0,r.withTempFile)(async g=>{let f=await this.fetch(p),y=0,v=u.default.createWriteStream(g);try{for await(let E of f){if(y+=E.length,y>d)throw new c.DownloadLengthMismatchError("Max length reached");await h(v,E)}}finally{await l.default.promisify(v.close).bind(v)()}return m(g)})}async downloadBytes(p,d){return this.downloadFile(p,d,async m=>{let g=u.default.createReadStream(m),f=[];for await(let y of g)f.push(y);return Buffer.concat(f)})}};e.BaseFetcher=o;var a=class extends o{static{S(this,"DefaultFetcher")}timeout;retry;constructor(p={}){super(),this.timeout=p.timeout,this.retry=p.retry}async fetch(p){s("GET %s",p);let d=await(0,n.default)(p,{timeout:this.timeout,retry:this.retry});if(!d.ok||!d?.body)throw new c.DownloadHTTPError("Failed to download",d.status);return d.body}};e.DefaultFetcher=a;var h=S(async(p,d)=>new Promise((m,g)=>{p.write(d,f=>{f&&g(f),m(!0)})}),"writeBufferToStream")}),vD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultConfig=void 0,e.defaultConfig={maxRootRotations:256,maxDelegations:32,rootMaxLength:512e3,timestampMaxLength:16384,snapshotMaxLength:2e6,targetsMaxLength:5e6,prefixTargetsWithHash:!0,fetchTimeout:1e5,fetchRetries:void 0,fetchRetry:2}}),SD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TrustedMetadataStore=void 0;var t=vc(),i=Sc(),u=class{static{S(this,"TrustedMetadataStore")}trustedSet={};referenceTime;constructor(n){this.referenceTime=new Date,this.loadTrustedRoot(n)}get root(){if(!this.trustedSet.root)throw new ReferenceError("No trusted root metadata");return this.trustedSet.root}get timestamp(){return this.trustedSet.timestamp}get snapshot(){return this.trustedSet.snapshot}get targets(){return this.trustedSet.targets}getRole(n){return this.trustedSet[n]}updateRoot(n){let l=JSON.parse(n.toString("utf8")),c=t.Metadata.fromJSON(t.MetadataKind.Root,l);if(c.signed.type!=t.MetadataKind.Root)throw new i.RepositoryError(`Expected 'root', got ${c.signed.type}`);if(this.root.verifyDelegate(t.MetadataKind.Root,c),c.signed.version!=this.root.signed.version+1)throw new i.BadVersionError(`Expected version ${this.root.signed.version+1}, got ${c.signed.version}`);return c.verifyDelegate(t.MetadataKind.Root,c),this.trustedSet.root=c,c}updateTimestamp(n){if(this.snapshot)throw new i.RuntimeError("Cannot update timestamp after snapshot");if(this.root.signed.isExpired(this.referenceTime))throw new i.ExpiredMetadataError("Final root.json is expired");let l=JSON.parse(n.toString("utf8")),c=t.Metadata.fromJSON(t.MetadataKind.Timestamp,l);if(c.signed.type!=t.MetadataKind.Timestamp)throw new i.RepositoryError(`Expected 'timestamp', got ${c.signed.type}`);if(this.root.verifyDelegate(t.MetadataKind.Timestamp,c),this.timestamp){if(c.signed.version<this.timestamp.signed.version)throw new i.BadVersionError(`New timestamp version ${c.signed.version} is less than current version ${this.timestamp.signed.version}`);if(c.signed.version===this.timestamp.signed.version)throw new i.EqualVersionError(`New timestamp version ${c.signed.version} is equal to current version ${this.timestamp.signed.version}`);let r=this.timestamp.signed.snapshotMeta,s=c.signed.snapshotMeta;if(s.version<r.version)throw new i.BadVersionError(`New snapshot version ${s.version} is less than current version ${r.version}`)}return this.trustedSet.timestamp=c,this.checkFinalTimestamp(),c}updateSnapshot(n,l=!1){if(!this.timestamp)throw new i.RuntimeError("Cannot update snapshot before timestamp");if(this.targets)throw new i.RuntimeError("Cannot update snapshot after targets");this.checkFinalTimestamp();let c=this.timestamp.signed.snapshotMeta;l||c.verify(n);let r=JSON.parse(n.toString("utf8")),s=t.Metadata.fromJSON(t.MetadataKind.Snapshot,r);if(s.signed.type!=t.MetadataKind.Snapshot)throw new i.RepositoryError(`Expected 'snapshot', got ${s.signed.type}`);return this.root.verifyDelegate(t.MetadataKind.Snapshot,s),this.snapshot&&Object.entries(this.snapshot.signed.meta).forEach(([o,a])=>{let h=s.signed.meta[o];if(!h)throw new i.RepositoryError(`Missing file ${o} in new snapshot`);if(h.version<a.version)throw new i.BadVersionError(`New version ${h.version} of ${o} is less than current version ${a.version}`)}),this.trustedSet.snapshot=s,this.checkFinalSnapsnot(),s}updateDelegatedTargets(n,l,c){if(!this.snapshot)throw new i.RuntimeError("Cannot update delegated targets before snapshot");this.checkFinalSnapsnot();let r=this.trustedSet[c];if(!r)throw new i.RuntimeError(`No trusted ${c} metadata`);let s=this.snapshot.signed.meta?.[`${l}.json`];if(!s)throw new i.RepositoryError(`Missing ${l}.json in snapshot`);s.verify(n);let o=JSON.parse(n.toString("utf8")),a=t.Metadata.fromJSON(t.MetadataKind.Targets,o);if(a.signed.type!=t.MetadataKind.Targets)throw new i.RepositoryError(`Expected 'targets', got ${a.signed.type}`);r.verifyDelegate(l,a);let h=a.signed.version;if(h!=s.version)throw new i.BadVersionError(`Version ${h} of ${l} does not match snapshot version ${s.version}`);if(a.signed.isExpired(this.referenceTime))throw new i.ExpiredMetadataError(`${l}.json is expired`);this.trustedSet[l]=a}loadTrustedRoot(n){let l=JSON.parse(n.toString("utf8")),c=t.Metadata.fromJSON(t.MetadataKind.Root,l);if(c.signed.type!=t.MetadataKind.Root)throw new i.RepositoryError(`Expected 'root', got ${c.signed.type}`);c.verifyDelegate(t.MetadataKind.Root,c),this.trustedSet.root=c}checkFinalTimestamp(){if(!this.timestamp)throw new ReferenceError("No trusted timestamp metadata");if(this.timestamp.signed.isExpired(this.referenceTime))throw new i.ExpiredMetadataError("Final timestamp.json is expired")}checkFinalSnapsnot(){if(!this.snapshot)throw new ReferenceError("No trusted snapshot metadata");if(!this.timestamp)throw new ReferenceError("No trusted timestamp metadata");if(this.snapshot.signed.isExpired(this.referenceTime))throw new i.ExpiredMetadataError("snapshot.json is expired");let n=this.timestamp.signed.snapshotMeta;if(this.snapshot.signed.version!==n.version)throw new i.BadVersionError("Snapshot version doesn't match timestamp")}};e.TrustedMetadataStore=u}),ED=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.join=i;var t=require("url");function i(l,c){return new t.URL(u(l)+n(c)).toString()}S(i,"join");function u(l){return l.endsWith("/")?l:l+"/"}S(u,"ensureTrailingSlash");function n(l){return l.startsWith("/")?l.slice(1):l}S(n,"removeLeadingSlash")}),bD=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(f,y,v,E){E===void 0&&(E=v);var b=Object.getOwnPropertyDescriptor(y,v);(!b||("get"in b?!y.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:S(function(){return y[v]},"get")}),Object.defineProperty(f,E,b)}:function(f,y,v,E){E===void 0&&(E=v),f[E]=y[v]}),i=e&&e.__setModuleDefault||(Object.create?function(f,y){Object.defineProperty(f,"default",{enumerable:!0,value:y})}:function(f,y){f.default=y}),u=e&&e.__importStar||function(){var f=S(function(y){return f=Object.getOwnPropertyNames||function(v){var E=[];for(var b in v)Object.prototype.hasOwnProperty.call(v,b)&&(E[E.length]=b);return E},f(y)},"ownKeys");return function(y){if(y&&y.__esModule)return y;var v={};if(y!=null)for(var E=f(y),b=0;b<E.length;b++)E[b]!=="default"&&t(v,y,E[b]);return i(v,y),v}}(),n=e&&e.__importDefault||function(f){return f&&f.__esModule?f:{default:f}};Object.defineProperty(e,"__esModule",{value:!0}),e.Updater=void 0;var l=vc(),c=n(Pr()),r=u(require("fs")),s=u(require("path")),o=vD(),a=Sc(),h=Lm(),p=SD(),d=u(ED()),m=(0,c.default)("tuf:cache"),g=class{static{S(this,"Updater")}dir;metadataBaseUrl;targetDir;targetBaseUrl;forceCache;trustedSet;config;fetcher;constructor(f){let{metadataDir:y,metadataBaseUrl:v,targetDir:E,targetBaseUrl:b,fetcher:w,config:_}=f;this.dir=y,this.metadataBaseUrl=v,this.targetDir=E,this.targetBaseUrl=b,this.forceCache=f.forceCache??!1;let O=this.loadLocalMetadata(l.MetadataKind.Root);this.trustedSet=new p.TrustedMetadataStore(O),this.config={...o.defaultConfig,..._},this.fetcher=w||new h.DefaultFetcher({timeout:this.config.fetchTimeout,retry:this.config.fetchRetries??this.config.fetchRetry})}async refresh(){if(this.forceCache)try{await this.loadTimestamp({checkRemote:!1})}catch{await this.loadRoot(),await this.loadTimestamp()}else await this.loadRoot(),await this.loadTimestamp();await this.loadSnapshot(),await this.loadTargets(l.MetadataKind.Targets,l.MetadataKind.Root)}async getTargetInfo(f){return this.trustedSet.targets||await this.refresh(),this.preorderDepthFirstWalk(f)}async downloadTarget(f,y,v){let E=y||this.generateTargetPath(f);if(!v){if(!this.targetBaseUrl)throw new a.ValueError("Target base URL not set");v=this.targetBaseUrl}let b=f.path;if(this.trustedSet.root.signed.consistentSnapshot&&this.config.prefixTargetsWithHash){let _=Object.values(f.hashes),{dir:O,base:A}=s.parse(b),I=`${_[0]}.${A}`;b=O?`${O}/${I}`:I}let w=d.join(v,b);return await this.fetcher.downloadFile(w,f.length,async _=>{await f.verify(r.createReadStream(_)),m("WRITE %s",E),r.copyFileSync(_,E)}),E}async findCachedTarget(f,y){y||(y=this.generateTargetPath(f));try{if(r.existsSync(y))return await f.verify(r.createReadStream(y)),y}catch{return}}loadLocalMetadata(f){let y=s.join(this.dir,`${f}.json`);return m("READ %s",y),r.readFileSync(y)}async loadRoot(){let f=this.trustedSet.root.signed.version+1,y=f+this.config.maxRootRotations;for(let v=f;v<y;v++){let E=d.join(this.metadataBaseUrl,`${v}.root.json`);try{let b=await this.fetcher.downloadBytes(E,this.config.rootMaxLength);this.trustedSet.updateRoot(b),this.persistMetadata(l.MetadataKind.Root,b)}catch(b){if(b instanceof a.DownloadHTTPError&&[403,404].includes(b.statusCode))break;throw b}}}async loadTimestamp({checkRemote:f}={checkRemote:!0}){try{let E=this.loadLocalMetadata(l.MetadataKind.Timestamp);if(this.trustedSet.updateTimestamp(E),!f)return}catch{}let y=d.join(this.metadataBaseUrl,"timestamp.json"),v=await this.fetcher.downloadBytes(y,this.config.timestampMaxLength);try{this.trustedSet.updateTimestamp(v)}catch(E){if(E instanceof a.EqualVersionError)return;throw E}this.persistMetadata(l.MetadataKind.Timestamp,v)}async loadSnapshot(){try{let f=this.loadLocalMetadata(l.MetadataKind.Snapshot);this.trustedSet.updateSnapshot(f,!0)}catch{if(!this.trustedSet.timestamp)throw new ReferenceError("No timestamp metadata");let f=this.trustedSet.timestamp.signed.snapshotMeta,y=f.length||this.config.snapshotMaxLength,v=this.trustedSet.root.signed.consistentSnapshot?f.version:void 0,E=d.join(this.metadataBaseUrl,v?`${v}.snapshot.json`:"snapshot.json");try{let b=await this.fetcher.downloadBytes(E,y);this.trustedSet.updateSnapshot(b),this.persistMetadata(l.MetadataKind.Snapshot,b)}catch(b){throw new a.RuntimeError(`Unable to load snapshot metadata error ${b}`)}}}async loadTargets(f,y){if(this.trustedSet.getRole(f))return this.trustedSet.getRole(f);try{let v=this.loadLocalMetadata(f);this.trustedSet.updateDelegatedTargets(v,f,y)}catch{if(!this.trustedSet.snapshot)throw new ReferenceError("No snapshot metadata");let v=this.trustedSet.snapshot.signed.meta[`${f}.json`],E=v.length||this.config.targetsMaxLength,b=this.trustedSet.root.signed.consistentSnapshot?v.version:void 0,w=encodeURIComponent(f),_=d.join(this.metadataBaseUrl,b?`${b}.${w}.json`:`${w}.json`);try{let O=await this.fetcher.downloadBytes(_,E);this.trustedSet.updateDelegatedTargets(O,f,y),this.persistMetadata(f,O)}catch(O){throw new a.RuntimeError(`Unable to load targets error ${O}`)}}return this.trustedSet.getRole(f)}async preorderDepthFirstWalk(f){let y=[{roleName:l.MetadataKind.Targets,parentRoleName:l.MetadataKind.Root}],v=new Set;for(;v.size<=this.config.maxDelegations&&y.length>0;){let{roleName:E,parentRoleName:b}=y.pop();if(v.has(E))continue;let w=(await this.loadTargets(E,b))?.signed;if(!w)continue;let _=w.targets?.[f];if(_)return _;if(v.add(E),w.delegations){let O=[],A=w.delegations.rolesForTarget(f);for(let{role:I,terminating:P}of A)if(O.push({roleName:I,parentRoleName:E}),P){y.splice(0);break}O.reverse(),y.push(...O)}}}generateTargetPath(f){if(!this.targetDir)throw new a.ValueError("Target directory not set");let y=encodeURIComponent(f.path);return s.join(this.targetDir,y)}persistMetadata(f,y){let v=encodeURIComponent(f);try{let E=s.join(this.dir,`${v}.json`);m("WRITE %s",E),r.writeFileSync(E,y.toString("utf8"))}catch(E){throw new a.PersistError(`Failed to persist metadata ${v} error: ${E}`)}}};e.Updater=g}),wD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Updater=e.BaseFetcher=e.TargetFile=void 0;var t=vc();Object.defineProperty(e,"TargetFile",{enumerable:!0,get:S(function(){return t.TargetFile},"get")});var i=Lm();Object.defineProperty(e,"BaseFetcher",{enumerable:!0,get:S(function(){return i.BaseFetcher},"get")});var u=bD();Object.defineProperty(e,"Updater",{enumerable:!0,get:S(function(){return u.Updater},"get")})}),Dm=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TUFError=void 0;var t=class extends Error{static{S(this,"TUFError")}constructor({code:i,message:u,cause:n}){super(u),this.code=i,this.cause=n,this.name=this.constructor.name}};e.TUFError=t}),_D=J(e=>{"use strict";var t=e&&e.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.readTarget=n;var i=t(require("fs")),u=Dm();async function n(c,r){let s=await l(c,r);return new Promise((o,a)=>{i.default.readFile(s,"utf-8",(h,p)=>{h?a(new u.TUFError({code:"TUF_READ_TARGET_ERROR",message:`error reading target ${s}`,cause:h})):o(p)})})}S(n,"readTarget");async function l(c,r){let s;try{s=await c.getTargetInfo(r)}catch(a){throw new u.TUFError({code:"TUF_REFRESH_METADATA_ERROR",message:"error refreshing TUF metadata",cause:a})}if(!s)throw new u.TUFError({code:"TUF_FIND_TARGET_ERROR",message:`target ${r} not found`});let o=await c.findCachedTarget(s);if(!o)try{o=await c.downloadTarget(s)}catch(a){throw new u.TUFError({code:"TUF_DOWNLOAD_TARGET_ERROR",message:`error downloading target ${o}`,cause:a})}return o}S(l,"getTargetPath")}),OD=J((e,t)=>{t.exports={"https://tuf-repo-cdn.sigstore.dev":{"root.json":"ewogInNpZ25hdHVyZXMiOiBbCiAgewogICAia2V5aWQiOiAiNmYyNjAwODlkNTkyM2RhZjIwMTY2Y2E2NTdjNTQzYWY2MTgzNDZhYjk3MTg4NGE5OTk2MmIwMTk4OGJiZTBjMyIsCiAgICJzaWciOiAiIgogIH0sCiAgewogICAia2V5aWQiOiAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICJzaWciOiAiMzA0NTAyMjEwMGJiZGRkNDY0ZjgwNjZjZWI4OGJhNzg3Mzc1YzEyY2Q2MzMwNjgwZTA4YzI5MTA3MDNlNjUzOGM3MWNjNzlhZDIwMjIwNTE5MGIwNmU0NTM3ZmU5NjFiM2VmODFmZTY4ZWRjZDAwODljMTlmOTE5YWZlZDQyM2I5YWFmZDcwMDY0MTE1MyIKICB9LAogIHsKICAgImtleWlkIjogIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAic2lnIjogIjMwNDQwMjIwNjkzMDZjZDUyNTdmNzMyYTc0MGMxYWZlNjBhOGU0MzNjNWRlNThlYWZlYWRiZTk5YzMzNmM5YzcxZDE5OGNmODAyMjAwZDc3Mzk1M2FlN2RiYzQ4ZDNlNWJhZDlhNmY2NGJhZmZmMTk2YjdlMmFkNGE1MmExOTUxOTM2N2Q0N2RjMDQyIgogIH0sCiAgewogICAia2V5aWQiOiAiNjE2NDM4MzgxMjViNDQwYjQwZGI2OTQyZjVjYjVhMzFjMGRjMDQzNjgzMTZlYjJhYWE1OGI5NTkwNGE1ODIyMiIsCiAgICJzaWciOiAiMzA0NDAyMjA0ZDIxYTJlYzgwZGY2NmU2MWY2ZmUyOTEyOTUxZGM0N2RmODM2MDM2ZjhjMGFiMTA4MTZkMzc1ZTcxZGJmNzllMDIyMDU0N2FkY2UxYWZkZjA0ZTY3OTRlZmEyMDNkZDUyNjRjNmY3ZTBlZjc4ZTU3ZmU5MzRiMGQyNmNiOTk0ZWVjNzYiCiAgfSwKICB7CiAgICJrZXlpZCI6ICJhNjg3ZTViZjRmYWI4MmIwZWU1OGQ0NmUwNWM5NTM1MTQ1YTJjOWFmYjQ1OGY0M2Q0MmI0NWNhMGZkY2UyYTcwIiwKICAgInNpZyI6ICIzMDQ1MDIyMDYwODI2NDk2NTU3MTQ0ZWIxNjQ5ODkzZWQ1ZjZmNGVhNTQ1MzZmZWIwY2E4MmY4Yjg5YWU2NDFiZTM5NzQzZTUwMjIxMDBhZDcxMThiNWU5ZDQ4MzczMjYyMDZlNDEyZmM2ZGEyOTk5OTI1ZDExMDMyOGE3YzE2NmIwNmM2MjQzMzZjOTNmIgogIH0sCiAgewogICAia2V5aWQiOiAiMTgzZTY0ZjM3NjcwZGMxM2NhMGQyODk5NWEzMDUzZjM3NDA5NTRkZGNlNDQzMjFhNDFlNDY1MzRjZjQ0ZTYzMiIsCiAgICJzaWciOiAiMzA0NjAyMjEwMGQ4MTc5NDM5YzJlNzNlYjBjMTczM2FiZWU3ZmFmODMyZGNhZWE3MjYzZWRjYjQ5MTk4OTFjM2EyNDdmMDU5MjMwMjIxMDBlMWE0MzdlMDc5N2U4MDNmOWI3MmRjOWQyZDkyMTU1YjBhMjI3MGMyNGVmZGQ1ZjRiM2E1ZDhmMGIwZjQzMWE3IgogIH0KIF0sCiAic2lnbmVkIjogewogICJfdHlwZSI6ICJyb290IiwKICAiY29uc2lzdGVudF9zbmFwc2hvdCI6IHRydWUsCiAgImV4cGlyZXMiOiAiMjAyNi0wMS0yMlQxMzowNTo1OVoiLAogICJrZXlzIjogewogICAiMGM4NzQzMmMzYmYwOWZkOTkxODlmZGMzMmZhNWVhZWRmNGU0YTVmYWM3YmFiNzNmYTA0YTJlMGZjNjRhZjZmNSI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVdSaUdyNStqKzNKNVNzSCtadHI1bkUySDJ3TzdcbkJWK25PM3M5M2dMY2ExOHFUT3pIWTFvV3lBR0R5a01Tc0dUVUJTdDlEK0FuMEtmS3NEMm1mU000MlE9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1vbmxpbmUtdXJpIjogImdjcGttczpwcm9qZWN0cy9zaWdzdG9yZS1yb290LXNpZ25pbmcvbG9jYXRpb25zL2dsb2JhbC9rZXlSaW5ncy9yb290L2NyeXB0b0tleXMvdGltZXN0YW1wL2NyeXB0b0tleVZlcnNpb25zLzEiCiAgIH0sCiAgICIxODNlNjRmMzc2NzBkYzEzY2EwZDI4OTk1YTMwNTNmMzc0MDk1NGRkY2U0NDMyMWE0MWU0NjUzNGNmNDRlNjMyIjogewogICAgImtleXR5cGUiOiAiZWNkc2EiLAogICAgImtleXZhbCI6IHsKICAgICAicHVibGljIjogIi0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tXG5NRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVNeHBQT0pDSVo1b3RHNDEwNmZHSnNlRVFpM1Y5XG5wa01ZUTR1eVY5VGoxTTdXSFhJeUxHK2prZnZ1RzBnbFExSlpiUlpaQlYzZ0FSNHNvamRHSElTZW93PT1cbi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLVxuIgogICAgfSwKICAgICJzY2hlbWUiOiAiZWNkc2Etc2hhMi1uaXN0cDI1NiIsCiAgICAieC10dWYtb24tY2kta2V5b3duZXIiOiAiQGxhbmNlIgogICB9LAogICAiMjJmNGNhZWM2ZDhlNmY5NTU1YWY2NmIzZDRjM2NiMDZhM2JiMjNmZGM3ZTM5YzkxNmM2MWY0NjJlNmY1MmIwNiI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRXpCelZPbUhDUG9qTVZMU0kzNjRXaWlWOE5QckRcbjZJZ1J4Vmxpc2t6L3YreTNKRVI1bWNWR2NPTmxpRGNXTUM1SjJsZkhtalBOUGhiNEg3eG04THpmU0E9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1rZXlvd25lciI6ICJAc2FudGlhZ290b3JyZXMiCiAgIH0sCiAgICI2MTY0MzgzODEyNWI0NDBiNDBkYjY5NDJmNWNiNWEzMWMwZGMwNDM2ODMxNmViMmFhYTU4Yjk1OTA0YTU4MjIyIjogewogICAgImtleWlkX2hhc2hfYWxnb3JpdGhtcyI6IFsKICAgICAic2hhMjU2IiwKICAgICAic2hhNTEyIgogICAgXSwKICAgICJrZXl0eXBlIjogImVjZHNhIiwKICAgICJrZXl2YWwiOiB7CiAgICAgInB1YmxpYyI6ICItLS0tLUJFR0lOIFBVQkxJQyBLRVktLS0tLVxuTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFaW5pa1NzQVFtWWtOZUg1ZVlxL0NuSXpMYWFjT1xueGxTYWF3UURPd3FLeS90Q3F4cTV4eFBTSmMyMUs0V0loczlHeU9rS2Z6dWVZM0dJTHpjTUpaNGNXdz09XG4tLS0tLUVORCBQVUJMSUMgS0VZLS0tLS1cbiIKICAgIH0sCiAgICAic2NoZW1lIjogImVjZHNhLXNoYTItbmlzdHAyNTYiLAogICAgIngtdHVmLW9uLWNpLWtleW93bmVyIjogIkBib2JjYWxsYXdheSIKICAgfSwKICAgImE2ODdlNWJmNGZhYjgyYjBlZTU4ZDQ2ZTA1Yzk1MzUxNDVhMmM5YWZiNDU4ZjQzZDQyYjQ1Y2EwZmRjZTJhNzAiOiB7CiAgICAia2V5aWRfaGFzaF9hbGdvcml0aG1zIjogWwogICAgICJzaGEyNTYiLAogICAgICJzaGE1MTIiCiAgICBdLAogICAgImtleXR5cGUiOiAiZWNkc2EiLAogICAgImtleXZhbCI6IHsKICAgICAicHVibGljIjogIi0tLS0tQkVHSU4gUFVCTElDIEtFWS0tLS0tXG5NRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUwZ2hyaDkyTHcxWXIzaWRHVjVXcUN0TURCOEN4XG4rRDhoZEM0dzJaTE5JcGxWUm9WR0xza1lhM2doZU15T2ppSjhrUGkxNWFRMi8vN1Arb2o3VXZKUEd3PT1cbi0tLS0tRU5EIFBVQkxJQyBLRVktLS0tLVxuIgogICAgfSwKICAgICJzY2hlbWUiOiAiZWNkc2Etc2hhMi1uaXN0cDI1NiIsCiAgICAieC10dWYtb24tY2kta2V5b3duZXIiOiAiQGpvc2h1YWdsIgogICB9LAogICAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiI6IHsKICAgICJrZXlpZF9oYXNoX2FsZ29yaXRobXMiOiBbCiAgICAgInNoYTI1NiIsCiAgICAgInNoYTUxMiIKICAgIF0sCiAgICAia2V5dHlwZSI6ICJlY2RzYSIsCiAgICAia2V5dmFsIjogewogICAgICJwdWJsaWMiOiAiLS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS1cbk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRUVYc3ozU1pYRmI4ak1WNDJqNnBKbHlqYmpSOEtcbk4zQndvY2V4cTZMTUliNXFzV0tPUXZMTjE2TlVlZkxjNEhzd09vdW1Sc1ZWYWFqU3BRUzZmb2JrUnc9PVxuLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tXG4iCiAgICB9LAogICAgInNjaGVtZSI6ICJlY2RzYS1zaGEyLW5pc3RwMjU2IiwKICAgICJ4LXR1Zi1vbi1jaS1rZXlvd25lciI6ICJAbW5tNjc4IgogICB9CiAgfSwKICAicm9sZXMiOiB7CiAgICJyb290IjogewogICAgImtleWlkcyI6IFsKICAgICAiZTcxYTU0ZDU0MzgzNWJhODZhZGFkOTQ2MDM3OWM3NjQxZmI4NzI2ZDE2NGVhNzY2ODAxYTFjNTIyYWJhN2VhMiIsCiAgICAgIjIyZjRjYWVjNmQ4ZTZmOTU1NWFmNjZiM2Q0YzNjYjA2YTNiYjIzZmRjN2UzOWM5MTZjNjFmNDYyZTZmNTJiMDYiLAogICAgICI2MTY0MzgzODEyNWI0NDBiNDBkYjY5NDJmNWNiNWEzMWMwZGMwNDM2ODMxNmViMmFhYTU4Yjk1OTA0YTU4MjIyIiwKICAgICAiYTY4N2U1YmY0ZmFiODJiMGVlNThkNDZlMDVjOTUzNTE0NWEyYzlhZmI0NThmNDNkNDJiNDVjYTBmZGNlMmE3MCIsCiAgICAgIjE4M2U2NGYzNzY3MGRjMTNjYTBkMjg5OTVhMzA1M2YzNzQwOTU0ZGRjZTQ0MzIxYTQxZTQ2NTM0Y2Y0NGU2MzIiCiAgICBdLAogICAgInRocmVzaG9sZCI6IDMKICAgfSwKICAgInNuYXBzaG90IjogewogICAgImtleWlkcyI6IFsKICAgICAiMGM4NzQzMmMzYmYwOWZkOTkxODlmZGMzMmZhNWVhZWRmNGU0YTVmYWM3YmFiNzNmYTA0YTJlMGZjNjRhZjZmNSIKICAgIF0sCiAgICAidGhyZXNob2xkIjogMSwKICAgICJ4LXR1Zi1vbi1jaS1leHBpcnktcGVyaW9kIjogMzY1MCwKICAgICJ4LXR1Zi1vbi1jaS1zaWduaW5nLXBlcmlvZCI6IDM2NQogICB9LAogICAidGFyZ2V0cyI6IHsKICAgICJrZXlpZHMiOiBbCiAgICAgImU3MWE1NGQ1NDM4MzViYTg2YWRhZDk0NjAzNzljNzY0MWZiODcyNmQxNjRlYTc2NjgwMWExYzUyMmFiYTdlYTIiLAogICAgICIyMmY0Y2FlYzZkOGU2Zjk1NTVhZjY2YjNkNGMzY2IwNmEzYmIyM2ZkYzdlMzljOTE2YzYxZjQ2MmU2ZjUyYjA2IiwKICAgICAiNjE2NDM4MzgxMjViNDQwYjQwZGI2OTQyZjVjYjVhMzFjMGRjMDQzNjgzMTZlYjJhYWE1OGI5NTkwNGE1ODIyMiIsCiAgICAgImE2ODdlNWJmNGZhYjgyYjBlZTU4ZDQ2ZTA1Yzk1MzUxNDVhMmM5YWZiNDU4ZjQzZDQyYjQ1Y2EwZmRjZTJhNzAiLAogICAgICIxODNlNjRmMzc2NzBkYzEzY2EwZDI4OTk1YTMwNTNmMzc0MDk1NGRkY2U0NDMyMWE0MWU0NjUzNGNmNDRlNjMyIgogICAgXSwKICAgICJ0aHJlc2hvbGQiOiAzCiAgIH0sCiAgICJ0aW1lc3RhbXAiOiB7CiAgICAia2V5aWRzIjogWwogICAgICIwYzg3NDMyYzNiZjA5ZmQ5OTE4OWZkYzMyZmE1ZWFlZGY0ZTRhNWZhYzdiYWI3M2ZhMDRhMmUwZmM2NGFmNmY1IgogICAgXSwKICAgICJ0aHJlc2hvbGQiOiAxLAogICAgIngtdHVmLW9uLWNpLWV4cGlyeS1wZXJpb2QiOiA3LAogICAgIngtdHVmLW9uLWNpLXNpZ25pbmctcGVyaW9kIjogNgogICB9CiAgfSwKICAic3BlY192ZXJzaW9uIjogIjEuMCIsCiAgInZlcnNpb24iOiAxMywKICAieC10dWYtb24tY2ktZXhwaXJ5LXBlcmlvZCI6IDE5NywKICAieC10dWYtb24tY2ktc2lnbmluZy1wZXJpb2QiOiA0NgogfQp9",targets:{"trusted_root.json":"ewogICJtZWRpYVR5cGUiOiAiYXBwbGljYXRpb24vdm5kLmRldi5zaWdzdG9yZS50cnVzdGVkcm9vdCtqc29uO3ZlcnNpb249MC4xIiwKICAidGxvZ3MiOiBbCiAgICB7CiAgICAgICJiYXNlVXJsIjogImh0dHBzOi8vcmVrb3Iuc2lnc3RvcmUuZGV2IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUyRzJZKzJ0YWJkVFY1QmNHaUJJeDBhOWZBRndya0JibUxTR3RrczRMM3FYNnlZWTB6dWZCbmhDOFVyL2l5NTVHaFdQLzlBL2JZMkxoQzMwTTkrUll0dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDEtMTJUMTE6NTM6MjdaIgogICAgICAgIH0KICAgICAgfSwKICAgICAgImxvZ0lkIjogewogICAgICAgICJrZXlJZCI6ICJ3Tkk5YXRRR2x6K1ZXZk82TFJ5Z0g0UVVmWS84VzRSRndpVDVpNVdSZ0IwPSIKICAgICAgfQogICAgfQogIF0sCiAgImNlcnRpZmljYXRlQXV0aG9yaXRpZXMiOiBbCiAgICB7CiAgICAgICJzdWJqZWN0IjogewogICAgICAgICJvcmdhbml6YXRpb24iOiAic2lnc3RvcmUuZGV2IiwKICAgICAgICAiY29tbW9uTmFtZSI6ICJzaWdzdG9yZSIKICAgICAgfSwKICAgICAgInVyaSI6ICJodHRwczovL2Z1bGNpby5zaWdzdG9yZS5kZXYiLAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlCK0RDQ0FYNmdBd0lCQWdJVE5Wa0Rab0Npb2ZQRHN5N2RmbTZnZUxidWh6QUtCZ2dxaGtqT1BRUURBekFxTVJVd0V3WURWUVFLRXd4emFXZHpkRzl5WlM1a1pYWXhFVEFQQmdOVkJBTVRDSE5wWjNOMGIzSmxNQjRYRFRJeE1ETXdOekF6TWpBeU9Wb1hEVE14TURJeU16QXpNakF5T1Zvd0tqRVZNQk1HQTFVRUNoTU1jMmxuYzNSdmNtVXVaR1YyTVJFd0R3WURWUVFERXdoemFXZHpkRzl5WlRCMk1CQUdCeXFHU000OUFnRUdCU3VCQkFBaUEySUFCTFN5QTdJaTVrK3BOTzhaRVdZMHlsZW1XRG93T2tOYTNrTCtHWkU1WjVHV2VoTDkvQTliUk5BM1JicnNaNWkwSmNhc3RhUkw3U3A1ZnAvakQ1ZHhxYy9VZFRWbmx2UzE2YW4rMllmc3dlL1F1TG9sUlVDcmNPRTIrMmlBNSt0emQ2Tm1NR1F3RGdZRFZSMFBBUUgvQkFRREFnRUdNQklHQTFVZEV3RUIvd1FJTUFZQkFmOENBUUV3SFFZRFZSME9CQllFRk1qRkhRQkJtaVFwTWxFazZ3MnVTdTFLQnRQc01COEdBMVVkSXdRWU1CYUFGTWpGSFFCQm1pUXBNbEVrNncydVN1MUtCdFBzTUFvR0NDcUdTTTQ5QkFNREEyZ0FNR1VDTUg4bGlXSmZNdWk2dlhYQmhqRGdZNE13c2xtTi9USnhWZS84M1dyRm9td21OZjA1NnkxWDQ4RjljNG0zYTNvelhBSXhBS2pSYXk1L2FqL2pzS0tHSWttUWF0akk4dXVwSHIvK0N4RnZhSldtcFlxTmtMREdSVSs5b3J6aDVoSTJScmN1YVE9PSIKICAgICAgICAgIH0KICAgICAgICBdCiAgICAgIH0sCiAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAic3RhcnQiOiAiMjAyMS0wMy0wN1QwMzoyMDoyOVoiLAogICAgICAgICJlbmQiOiAiMjAyMi0xMi0zMVQyMzo1OTo1OS45OTlaIgogICAgICB9CiAgICB9LAogICAgewogICAgICAic3ViamVjdCI6IHsKICAgICAgICAib3JnYW5pemF0aW9uIjogInNpZ3N0b3JlLmRldiIsCiAgICAgICAgImNvbW1vbk5hbWUiOiAic2lnc3RvcmUiCiAgICAgIH0sCiAgICAgICJ1cmkiOiAiaHR0cHM6Ly9mdWxjaW8uc2lnc3RvcmUuZGV2IiwKICAgICAgImNlcnRDaGFpbiI6IHsKICAgICAgICAiY2VydGlmaWNhdGVzIjogWwogICAgICAgICAgewogICAgICAgICAgICAicmF3Qnl0ZXMiOiAiTUlJQ0dqQ0NBYUdnQXdJQkFnSVVBTG5WaVZmblUwYnJKYXNtUmtIcm4vVW5mYVF3Q2dZSUtvWkl6ajBFQXdNd0tqRVZNQk1HQTFVRUNoTU1jMmxuYzNSdmNtVXVaR1YyTVJFd0R3WURWUVFERXdoemFXZHpkRzl5WlRBZUZ3MHlNakEwTVRNeU1EQTJNVFZhRncwek1URXdNRFV4TXpVMk5UaGFNRGN4RlRBVEJnTlZCQW9UREhOcFozTjBiM0psTG1SbGRqRWVNQndHQTFVRUF4TVZjMmxuYzNSdmNtVXRhVzUwWlhKdFpXUnBZWFJsTUhZd0VBWUhLb1pJemowQ0FRWUZLNEVFQUNJRFlnQUU4UlZTL3lzSCtOT3Z1RFp5UEladGlsZ1VGOU5sYXJZcEFkOUhQMXZCQkgxVTVDVjc3TFNTN3MwWmlING5FN0h2N3B0UzZMdnZSL1NUazc5OExWZ016TGxKNEhlSWZGM3RIU2FleExjWXBTQVNyMWtTME4vUmdCSnovOWpXQ2lYbm8zc3dlVEFPQmdOVkhROEJBZjhFQkFNQ0FRWXdFd1lEVlIwbEJBd3dDZ1lJS3dZQkJRVUhBd013RWdZRFZSMFRBUUgvQkFnd0JnRUIvd0lCQURBZEJnTlZIUTRFRmdRVTM5UHB6MVlrRVpiNXFOanBLRldpeGk0WVpEOHdId1lEVlIwakJCZ3dGb0FVV01BZVg1RkZwV2FwZXN5UW9aTWkwQ3JGeGZvd0NnWUlLb1pJemowRUF3TURad0F3WkFJd1BDc1FLNERZaVpZRFBJYURpNUhGS25meFh4NkFTU1ZtRVJmc3luWUJpWDJYNlNKUm5aVTg0LzlEWmRuRnZ2eG1BakJPdDZRcEJsYzRKLzBEeHZrVENxcGNsdnppTDZCQ0NQbmpkbElCM1B1M0J4c1BteWdVWTdJaTJ6YmRDZGxpaW93PSIKICAgICAgICAgIH0sCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlCOXpDQ0FYeWdBd0lCQWdJVUFMWk5BUEZkeEhQd2plRGxvRHd5WUNoQU8vNHdDZ1lJS29aSXpqMEVBd013S2pFVk1CTUdBMVVFQ2hNTWMybG5jM1J2Y21VdVpHVjJNUkV3RHdZRFZRUURFd2h6YVdkemRHOXlaVEFlRncweU1URXdNRGN4TXpVMk5UbGFGdzB6TVRFd01EVXhNelUyTlRoYU1Db3hGVEFUQmdOVkJBb1RESE5wWjNOMGIzSmxMbVJsZGpFUk1BOEdBMVVFQXhNSWMybG5jM1J2Y21Vd2RqQVFCZ2NxaGtqT1BRSUJCZ1VyZ1FRQUlnTmlBQVQ3WGVGVDRyYjNQUUd3UzRJYWp0TGszL09sbnBnYW5nYUJjbFlwc1lCcjVpKzR5bkIwN2NlYjNMUDBPSU9aZHhleFg2OWM1aVZ1eUpSUStIejA1eWkrVUYzdUJXQWxIcGlTNXNoMCtIMkdIRTdTWHJrMUVDNW0xVHIxOUw5Z2c5MmpZekJoTUE0R0ExVWREd0VCL3dRRUF3SUJCakFQQmdOVkhSTUJBZjhFQlRBREFRSC9NQjBHQTFVZERnUVdCQlJZd0I1ZmtVV2xacWw2ekpDaGt5TFFLc1hGK2pBZkJnTlZIU01FR0RBV2dCUll3QjVma1VXbFpxbDZ6SkNoa3lMUUtzWEYrakFLQmdncWhrak9QUVFEQXdOcEFEQm1BakVBajFuSGVYWnArMTNOV0JOYStFRHNEUDhHMVdXZzF0Q01XUC9XSFBxcGFWbzBqaHN3ZU5GWmdTczBlRTd3WUk0cUFqRUEyV0I5b3Q5OHNJa29GM3ZaWWRkMy9WdFdCNWI5VE5NZWE3SXgvc3RKNVRmY0xMZUFCTEU0Qk5KT3NRNHZuQkhKIgogICAgICAgICAgfQogICAgICAgIF0KICAgICAgfSwKICAgICAgInZhbGlkRm9yIjogewogICAgICAgICJzdGFydCI6ICIyMDIyLTA0LTEzVDIwOjA2OjE1WiIKICAgICAgfQogICAgfQogIF0sCiAgImN0bG9ncyI6IFsKICAgIHsKICAgICAgImJhc2VVcmwiOiAiaHR0cHM6Ly9jdGZlLnNpZ3N0b3JlLmRldi90ZXN0IiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUViZndSK1JKdWRYc2NnUkJScEtYMVhGRHkzUHl1ZER4ei9TZm5SaTFmVDhla3BmQmQyTzF1b3o3anIzWjhuS3p4QTY5RVVRK2VGQ0ZJM3pldWJQV1U3dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjEtMDMtMTRUMDA6MDA6MDBaIiwKICAgICAgICAgICJlbmQiOiAiMjAyMi0xMC0zMVQyMzo1OTo1OS45OTlaIgogICAgICAgIH0KICAgICAgfSwKICAgICAgImxvZ0lkIjogewogICAgICAgICJrZXlJZCI6ICJDR0NTOENoUy8yaEYwZEZySjRTY1JXY1lyQlk5d3pqU2JlYThJZ1kyYjNJPSIKICAgICAgfQogICAgfSwKICAgIHsKICAgICAgImJhc2VVcmwiOiAiaHR0cHM6Ly9jdGZlLnNpZ3N0b3JlLmRldi8yMDIyIiwKICAgICAgImhhc2hBbGdvcml0aG0iOiAiU0hBMl8yNTYiLAogICAgICAicHVibGljS2V5IjogewogICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVpUFNsRmkwQ21GVGZFakNVcUY5SHVDRWNZWE5LQWFZYWxJSm1CWjh5eWV6UGpUcWh4cktCcE1uYW9jVnRMSkJJMWVNM3VYblF6UUdBSmRKNGdzOUZ5dz09IiwKICAgICAgICAia2V5RGV0YWlscyI6ICJQS0lYX0VDRFNBX1AyNTZfU0hBXzI1NiIsCiAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgInN0YXJ0IjogIjIwMjItMTAtMjBUMDA6MDA6MDBaIgogICAgICAgIH0KICAgICAgfSwKICAgICAgImxvZ0lkIjogewogICAgICAgICJrZXlJZCI6ICIzVDB3YXNiSEVUSmpHUjRjbVdjM0FxSktYcmplUEszL2g0cHlnQzhwN280PSIKICAgICAgfQogICAgfQogIF0sCiAgInRpbWVzdGFtcEF1dGhvcml0aWVzIjogWwogICAgewogICAgICAic3ViamVjdCI6IHsKICAgICAgICAib3JnYW5pemF0aW9uIjogInNpZ3N0b3JlLmRldiIsCiAgICAgICAgImNvbW1vbk5hbWUiOiAic2lnc3RvcmUtdHNhLXNlbGZzaWduZWQiCiAgICAgIH0sCiAgICAgICJ1cmkiOiAiaHR0cHM6Ly90aW1lc3RhbXAuc2lnc3RvcmUuZGV2L2FwaS92MS90aW1lc3RhbXAiLAogICAgICAiY2VydENoYWluIjogewogICAgICAgICJjZXJ0aWZpY2F0ZXMiOiBbCiAgICAgICAgICB7CiAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNSUlDRURDQ0FaYWdBd0lCQWdJVU9oTlVMd3lRWWU2OHdVTXZ5NHFPaXlvaml3d3dDZ1lJS29aSXpqMEVBd013T1RFVk1CTUdBMVVFQ2hNTWMybG5jM1J2Y21VdVpHVjJNU0F3SGdZRFZRUURFeGR6YVdkemRHOXlaUzEwYzJFdGMyVnNabk5wWjI1bFpEQWVGdzB5TlRBME1EZ3dOalU1TkROYUZ3MHpOVEEwTURZd05qVTVORE5hTUM0eEZUQVRCZ05WQkFvVERITnBaM04wYjNKbExtUmxkakVWTUJNR0ExVUVBeE1NYzJsbmMzUnZjbVV0ZEhOaE1IWXdFQVlIS29aSXpqMENBUVlGSzRFRUFDSURZZ0FFNHJhMlo4aEtOaWcyVDlrRmpDQVRvR0czMGpreStXUXYzQnpMK21LdmgxU0tOUi9Vd3V3c2ZOQ2c0c3J5b1lBZDhFNmlzb3ZWQTNNNGFvTmRtOVFEaTUwWjhuVEV5dnFnZkRQdFRJd1hJdGZpVy9BRmYxVjd1d2tia0FvajB4eGNvMm93YURBT0JnTlZIUThCQWY4RUJBTUNCNEF3SFFZRFZSME9CQllFRkluOWVVT0h6OUJsUnNNQ1JzY3NjMXQ5dE9zRE1COEdBMVVkSXdRWU1CYUFGSmpzQWU5L3UxSC8xSlVlYjRxSW1GTUhpYzYvTUJZR0ExVWRKUUVCL3dRTU1Bb0dDQ3NHQVFVRkJ3TUlNQW9HQ0NxR1NNNDlCQU1EQTJnQU1HVUNNRHRwc1YvNkthTzBxeUYvVU1zWDJhU1VYS1FGZG9HVHB0UUdjMGZ0cTFjc3VsSFBHRzZkc215TU5kM0pCK0czRVFJeEFPYWp2QmNqcEptS2I0TnYrMlRhb2o4VWM1K2I2aWg2RlhDQ0tyYVNxdXBlMDd6cXN3TWNYSlRlMWNFeHZIdnZsdz09IgogICAgICAgICAgfSwKICAgICAgICAgIHsKICAgICAgICAgICAgInJhd0J5dGVzIjogIk1JSUI5ekNDQVh5Z0F3SUJBZ0lVVjdmMEdMRE9vRXpJaDhMWFNXODBPSmlVcDE0d0NnWUlLb1pJemowRUF3TXdPVEVWTUJNR0ExVUVDaE1NYzJsbmMzUnZjbVV1WkdWMk1TQXdIZ1lEVlFRREV4ZHphV2R6ZEc5eVpTMTBjMkV0YzJWc1puTnBaMjVsWkRBZUZ3MHlOVEEwTURnd05qVTVORE5hRncwek5UQTBNRFl3TmpVNU5ETmFNRGt4RlRBVEJnTlZCQW9UREhOcFozTjBiM0psTG1SbGRqRWdNQjRHQTFVRUF4TVhjMmxuYzNSdmNtVXRkSE5oTFhObGJHWnphV2R1WldRd2RqQVFCZ2NxaGtqT1BRSUJCZ1VyZ1FRQUlnTmlBQVFVUU50ZlJUL291M1lBVGE2d0Iva0tUZTcwY2ZKd3lSSUJvdk1udDhSY0pwaC9DT0U4MnV5UzZGbXBwTExMMVZCUEdjUGZwUVBZSk5Yeld3aThpY3doS1E2Vy9RZTJoM29lYkJiMkZIcHdOSkRxbytUTWFDL3RkZmt2L0VsSkI3MmpSVEJETUE0R0ExVWREd0VCL3dRRUF3SUJCakFTQmdOVkhSTUJBZjhFQ0RBR0FRSC9BZ0VBTUIwR0ExVWREZ1FXQkJTWTdBSHZmN3RSLzlTVkhtK0tpSmhUQjRuT3Z6QUtCZ2dxaGtqT1BRUURBd05wQURCbUFqRUF3R0VHcmZHWlIxY2VuMVI4L0RUVk1JOTQzTHNzWm1KUnREcC9pN1NmR0htR1JQNmdSYnVqOXZPSzNiNjdaMFFRQWpFQXVUMkg2NzNMUUVhSFRjeVFTWnJrcDRtWDdXd2ttRitzVmJrWVk1bVhOK1JNSDEzS1VFSEhPcUFTYWVtWVdLL0UiCiAgICAgICAgICB9CiAgICAgICAgXQogICAgICB9LAogICAgICAidmFsaWRGb3IiOiB7CiAgICAgICAgInN0YXJ0IjogIjIwMjUtMDctMDRUMDA6MDA6MDBaIgogICAgICB9CiAgICB9CiAgXQp9Cg==","registry.npmjs.org%2Fkeys.json":"ewogICAgImtleXMiOiBbCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OmpsM2J3c3d1ODBQampva0NnaDBvMnc1YzJVNExoUUFFNTdnajljejFrekEiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRTFPbGIzek1BRkZ4WEtIaUlrUU81Y0ozWWhsNWk2VVBwK0lodXRlQkpidUhjQTVVb2dLbzBFV3RsV3dXNktTYUtvVE5FWUw3SmxDUWlWbmtoQmt0VWdnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIxOTk5LTAxLTAxVDAwOjAwOjAwLjAwMFoiLAogICAgICAgICAgICAgICAgICAgICJlbmQiOiAiMjAyNS0wMS0yOVQwMDowMDowMC4wMDBaIgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICB7CiAgICAgICAgICAgICJrZXlJZCI6ICJTSEEyNTY6amwzYndzd3U4MFBqam9rQ2doMG8ydzVjMlU0TGhRQUU1N2dqOWN6MWt6QSIsCiAgICAgICAgICAgICJrZXlVc2FnZSI6ICJucG06YXR0ZXN0YXRpb25zIiwKICAgICAgICAgICAgInB1YmxpY0tleSI6IHsKICAgICAgICAgICAgICAgICJyYXdCeXRlcyI6ICJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUxT2xiM3pNQUZGeFhLSGlJa1FPNWNKM1lobDVpNlVQcCtJaHV0ZUJKYnVIY0E1VW9nS28wRVd0bFd3VzZLU2FLb1RORVlMN0psQ1FpVm5raEJrdFVnZz09IiwKICAgICAgICAgICAgICAgICJrZXlEZXRhaWxzIjogIlBLSVhfRUNEU0FfUDI1Nl9TSEFfMjU2IiwKICAgICAgICAgICAgICAgICJ2YWxpZEZvciI6IHsKICAgICAgICAgICAgICAgICAgICAic3RhcnQiOiAiMjAyMi0xMi0wMVQwMDowMDowMC4wMDBaIiwKICAgICAgICAgICAgICAgICAgICAiZW5kIjogIjIwMjUtMDEtMjlUMDA6MDA6MDAuMDAwWiIKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgewogICAgICAgICAgICAia2V5SWQiOiAiU0hBMjU2OkRoUTh3UjVBUEJ2RkhMRi8rVGMrQVl2UE9kVHBjSURxT2h4c0JIUndDN1UiLAogICAgICAgICAgICAia2V5VXNhZ2UiOiAibnBtOnNpZ25hdHVyZXMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9LAogICAgICAgIHsKICAgICAgICAgICAgImtleUlkIjogIlNIQTI1NjpEaFE4d1I1QVBCdkZITEYvK1RjK0FZdlBPZFRwY0lEcU9oeHNCSFJ3QzdVIiwKICAgICAgICAgICAgImtleVVzYWdlIjogIm5wbTphdHRlc3RhdGlvbnMiLAogICAgICAgICAgICAicHVibGljS2V5IjogewogICAgICAgICAgICAgICAgInJhd0J5dGVzIjogIk1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRVk2WWE3VysrN2FVUHp2TVRyZXpINlljeDNjK0hPS1lDY05HeWJKWlNDSnEvZmQ3UWE4dXVBS3RkSWtVUXRRaUVLRVJoQW1FNWxNTUpoUDhPa0RPYTJnPT0iLAogICAgICAgICAgICAgICAgImtleURldGFpbHMiOiAiUEtJWF9FQ0RTQV9QMjU2X1NIQV8yNTYiLAogICAgICAgICAgICAgICAgInZhbGlkRm9yIjogewogICAgICAgICAgICAgICAgICAgICJzdGFydCI6ICIyMDI1LTAxLTEzVDAwOjAwOjAwLjAwMFoiCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICBdCn0K"}}}}),RD=J(e=>{"use strict";var t=e&&e.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(e,"__esModule",{value:!0}),e.TUFClient=void 0;var i=t(require("fs")),u=t(require("path")),n=wD(),l=Ec(),c=_D(),r="targets",s=class{static{S(this,"TUFClient")}constructor(p){let d=new URL(p.mirrorURL),m=encodeURIComponent(d.host+d.pathname.replace(/\/$/,"")),g=u.default.join(p.cachePath,m);o(g),a({cachePath:g,mirrorURL:p.mirrorURL,tufRootPath:p.rootPath,forceInit:p.forceInit}),this.updater=h({mirrorURL:p.mirrorURL,cachePath:g,forceCache:p.forceCache,retry:p.retry,timeout:p.timeout})}async refresh(){return this.updater.refresh()}getTarget(p){return(0,c.readTarget)(this.updater,p)}};e.TUFClient=s;function o(p){let d=u.default.join(p,r);i.default.existsSync(p)||i.default.mkdirSync(p,{recursive:!0}),i.default.existsSync(d)||i.default.mkdirSync(d)}S(o,"initTufCache");function a({cachePath:p,mirrorURL:d,tufRootPath:m,forceInit:g}){let f=u.default.join(p,"root.json");if(!i.default.existsSync(f)||g)if(m)i.default.copyFileSync(m,f);else{let y=OD()[d];if(!y)throw new l.TUFError({code:"TUF_INIT_CACHE_ERROR",message:`No root.json found for mirror: ${d}`});i.default.writeFileSync(f,Buffer.from(y["root.json"],"base64")),Object.entries(y.targets).forEach(([v,E])=>{i.default.writeFileSync(u.default.join(p,r,v),Buffer.from(E,"base64"))})}}S(a,"seedCache");function h(p){let d={fetchTimeout:p.timeout,fetchRetry:p.retry};return new n.Updater({metadataBaseUrl:p.mirrorURL,targetBaseUrl:`${p.mirrorURL}/targets`,metadataDir:p.cachePath,targetDir:u.default.join(p.cachePath,r),forceCache:p.forceCache,config:d})}S(h,"initClient")}),Ec=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TUFError=e.DEFAULT_MIRROR_URL=void 0,e.getTrustedRoot=s,e.initTUF=o;var t=ln(),i=nD(),u=RD();e.DEFAULT_MIRROR_URL="https://tuf-repo-cdn.sigstore.dev";var n="sigstore-js",l={retries:2},c=5e3,r="trusted_root.json";async function s(p={}){let d=await a(p).getTarget(r);return t.TrustedRoot.fromJSON(JSON.parse(d))}S(s,"getTrustedRoot");async function o(p={}){let d=a(p);return d.refresh().then(()=>d)}S(o,"initTUF");function a(p){return new u.TUFClient({cachePath:p.cachePath||(0,i.appDataPath)(n),rootPath:p.rootPath,mirrorURL:p.mirrorURL||e.DEFAULT_MIRROR_URL,retry:p.retry??l,timeout:p.timeout??c,forceCache:p.forceCache??!1,forceInit:p.forceInit??p.force??!1})}S(a,"createClient");var h=Dm();Object.defineProperty(e,"TUFError",{enumerable:!0,get:S(function(){return h.TUFError},"get")})}),AD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DSSESignatureContent=void 0;var t=ot(),i=class{static{S(this,"DSSESignatureContent")}constructor(u){this.env=u}compareDigest(u){return t.crypto.bufferEqual(u,t.crypto.digest("sha256",this.env.payload))}compareSignature(u){return t.crypto.bufferEqual(u,this.signature)}verifySignature(u){return t.crypto.verify(this.preAuthEncoding,u,this.signature)}get signature(){return this.env.signatures.length>0?this.env.signatures[0].sig:Buffer.from("")}get preAuthEncoding(){return t.dsse.preAuthEncoding(this.env.payloadType,this.env.payload)}};e.DSSESignatureContent=i}),CD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageSignatureContent=void 0;var t=ot(),i=class{static{S(this,"MessageSignatureContent")}constructor(u,n){this.signature=u.signature,this.messageDigest=u.messageDigest.digest,this.artifact=n}compareSignature(u){return t.crypto.bufferEqual(u,this.signature)}compareDigest(u){return t.crypto.bufferEqual(u,this.messageDigest)}verifySignature(u){return t.crypto.verify(this.artifact,u,this.signature)}};e.MessageSignatureContent=i}),ID=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toSignedEntity=n,e.signatureContent=l;var t=ot(),i=AD(),u=CD();function n(r,s){let{tlogEntries:o,timestampVerificationData:a}=r.verificationMaterial,h=[];for(let p of o)h.push({$case:"transparency-log",tlogEntry:p});for(let p of a?.rfc3161Timestamps??[])h.push({$case:"timestamp-authority",timestamp:t.RFC3161Timestamp.parse(p.signedTimestamp)});return{signature:l(r,s),key:c(r),tlogEntries:o,timestamps:h}}S(n,"toSignedEntity");function l(r,s){switch(r.content.$case){case"dsseEnvelope":return new i.DSSESignatureContent(r.content.dsseEnvelope);case"messageSignature":return new u.MessageSignatureContent(r.content.messageSignature,s)}}S(l,"signatureContent");function c(r){switch(r.verificationMaterial.content.$case){case"publicKey":return{$case:"public-key",hint:r.verificationMaterial.content.publicKey.hint};case"x509CertificateChain":return{$case:"certificate",certificate:t.X509Certificate.parse(r.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes)};case"certificate":return{$case:"certificate",certificate:t.X509Certificate.parse(r.verificationMaterial.content.certificate.rawBytes)}}}S(c,"key")}),Ge=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolicyError=e.VerificationError=void 0;var t=class extends Error{static{S(this,"BaseError")}constructor({code:n,message:l,cause:c}){super(l),this.code=n,this.cause=c,this.name=this.constructor.name}},i=class extends t{static{S(this,"VerificationError")}};e.VerificationError=i;var u=class extends t{static{S(this,"PolicyError")}};e.PolicyError=u}),TD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.filterCertAuthorities=t,e.filterTLogAuthorities=i;function t(u,n){return u.filter(l=>l.validFor.start<=n&&l.validFor.end>=n)}S(t,"filterCertAuthorities");function i(u,n){return u.filter(l=>n.logID&&!l.logID.equals(n.logID)?!1:l.validFor.start<=n.targetDate&&n.targetDate<=l.validFor.end)}S(i,"filterTLogAuthorities")}),Nr=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.filterTLogAuthorities=e.filterCertAuthorities=void 0,e.toTrustMaterial=r;var t=ot(),i=ln(),u=Ge(),n=new Date(0),l=new Date(864e13),c=TD();Object.defineProperty(e,"filterCertAuthorities",{enumerable:!0,get:S(function(){return c.filterCertAuthorities},"get")}),Object.defineProperty(e,"filterTLogAuthorities",{enumerable:!0,get:S(function(){return c.filterTLogAuthorities},"get")});function r(h,p){let d=typeof p=="function"?p:a(p);return{certificateAuthorities:h.certificateAuthorities.map(o),timestampAuthorities:h.timestampAuthorities.map(o),tlogs:h.tlogs.map(s),ctlogs:h.ctlogs.map(s),publicKey:d}}S(r,"toTrustMaterial");function s(h){let p=h.publicKey.keyDetails,d=p===i.PublicKeyDetails.PKCS1_RSA_PKCS1V5||p===i.PublicKeyDetails.PKIX_RSA_PKCS1V5||p===i.PublicKeyDetails.PKIX_RSA_PKCS1V15_2048_SHA256||p===i.PublicKeyDetails.PKIX_RSA_PKCS1V15_3072_SHA256||p===i.PublicKeyDetails.PKIX_RSA_PKCS1V15_4096_SHA256?"pkcs1":"spki";return{logID:h.logId.keyId,publicKey:t.crypto.createPublicKey(h.publicKey.rawBytes,d),validFor:{start:h.publicKey.validFor?.start||n,end:h.publicKey.validFor?.end||l}}}S(s,"createTLogAuthority");function o(h){return{certChain:h.certChain.certificates.map(p=>t.X509Certificate.parse(p.rawBytes)),validFor:{start:h.validFor?.start||n,end:h.validFor?.end||l}}}S(o,"createCertAuthority");function a(h){return p=>{let d=(h||{})[p];if(!d)throw new u.VerificationError({code:"PUBLIC_KEY_ERROR",message:`key not found: ${p}`});return{publicKey:t.crypto.createPublicKey(d.rawBytes),validFor:S(m=>(d.validFor?.start||n)<=m&&(d.validFor?.end||l)>=m,"validFor")}}}S(a,"keyLocator")}),$m=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CertificateChainVerifier=void 0,e.verifyCertificateChain=u;var t=Ge(),i=Nr();function u(c,r,s){let o=(0,i.filterCertAuthorities)(s,c),a;for(let h of o)try{return new n({trustedCerts:h.certChain,untrustedCert:r,timestamp:c}).verify()}catch(p){a=p}throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"Failed to verify certificate chain",cause:a})}S(u,"verifyCertificateChain");var n=class{static{S(this,"CertificateChainVerifier")}constructor(c){this.untrustedCert=c.untrustedCert,this.trustedCerts=c.trustedCerts,this.localCerts=l([...c.trustedCerts,c.untrustedCert]),this.timestamp=c.timestamp}verify(){let c=this.sort();if(this.checkPath(c),!c.every(r=>r.validForDate(this.timestamp)))throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"certificate is not valid or expired at the specified date"});return c}sort(){let c=this.untrustedCert,r=this.buildPaths(c);if(r=r.filter(o=>o.some(a=>this.trustedCerts.includes(a))),r.length===0)throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"no trusted certificate path found"});let s=r.reduce((o,a)=>o.length<a.length?o:a);return[c,...s].slice(0,-1)}buildPaths(c){let r=[],s=this.findIssuer(c);if(s.length===0)throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"no valid certificate path found"});for(let o=0;o<s.length;o++){let a=s[o];if(a.equals(c)){r.push([c]);continue}let h=this.buildPaths(a);for(let p=0;p<h.length;p++)r.push([a,...h[p]])}return r}findIssuer(c){let r=[],s;return c.subject.equals(c.issuer)&&c.verify()?[c]:(c.extAuthorityKeyID&&(s=c.extAuthorityKeyID.keyIdentifier),this.localCerts.forEach(o=>{if(s&&o.extSubjectKeyID){o.extSubjectKeyID.keyIdentifier.equals(s)&&r.push(o);return}o.subject.equals(c.issuer)&&r.push(o)}),r=r.filter(o=>{try{return c.verify(o)}catch{return!1}}),r)}checkPath(c){if(c.length<1)throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"certificate chain must contain at least one certificate"});if(!c.slice(1).every(r=>r.isCA))throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"intermediate certificate is not a CA"});for(let r=c.length-2;r>=0;r--)if(!c[r].issuer.equals(c[r+1].subject))throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"incorrect certificate name chaining"});for(let r=0;r<c.length;r++){let s=c[r];if(s.extBasicConstraints?.isCA){let o=s.extBasicConstraints.pathLenConstraint;if(o!==void 0&&o<r-1)throw new t.VerificationError({code:"CERTIFICATE_ERROR",message:"path length constraint exceeded"})}}}};e.CertificateChainVerifier=n;function l(c){for(let r=0;r<c.length;r++)for(let s=r+1;s<c.length;s++)c[r].equals(c[s])&&(c.splice(s,1),s--);return c}S(l,"dedupeCertificates")}),PD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifySCTs=n;var t=ot(),i=Ge(),u=Nr();function n(l,c,r){let s,o=l.clone();for(let d=0;d<o.extensions.length;d++){let m=o.extensions[d];if(m.subs[0].toOID()===t.EXTENSION_OID_SCT){s=new t.X509SCTExtension(m),o.extensions.splice(d,1);break}}if(!s)return[];if(s.signedCertificateTimestamps.length===0)return[];let a=new t.ByteStream,h=t.crypto.digest("sha256",c.publicKey);a.appendView(h);let p=o.tbsCertificate.toDER();return a.appendUint24(p.length),a.appendView(p),s.signedCertificateTimestamps.map(d=>{if(!(0,u.filterTLogAuthorities)(r,{logID:d.logID,targetDate:d.datetime}).some(m=>d.verify(a.buffer,m.publicKey)))throw new i.VerificationError({code:"CERTIFICATE_ERROR",message:"SCT verification failed"});return d.logID})}S(n,"verifySCTs")}),xD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyPublicKey=r,e.verifyCertificate=s;var t=ot(),i=Ge(),u=$m(),n=PD(),l="1.3.6.1.4.1.57264.1.1",c="1.3.6.1.4.1.57264.1.8";function r(a,h,p){let d=p.publicKey(a);return h.forEach(m=>{if(!d.validFor(m))throw new i.VerificationError({code:"PUBLIC_KEY_ERROR",message:`Public key is not valid for timestamp: ${m.toISOString()}`})}),{key:d.publicKey}}S(r,"verifyPublicKey");function s(a,h,p){let d=[];return h.forEach(m=>{d=(0,u.verifyCertificateChain)(m,a,p.certificateAuthorities)}),{scts:(0,n.verifySCTs)(d[0],d[1],p.ctlogs),signer:o(d[0])}}S(s,"verifyCertificate");function o(a){let h,p=a.extension(c);p?h=p.valueObj.subs?.[0]?.value.toString("ascii"):h=a.extension(l)?.value.toString("ascii");let d={extensions:{issuer:h},subjectAlternativeName:a.subjectAltName};return{key:t.crypto.createPublicKey(a.publicKey),identity:d}}S(o,"getSigner")}),ND=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifySubjectAlternativeName=i,e.verifyExtensions=u;var t=Ge();function i(n,l){if(l===void 0||!l.match(n))throw new t.PolicyError({code:"UNTRUSTED_SIGNER_ERROR",message:`certificate identity error - expected ${n}, got ${l}`})}S(i,"verifySubjectAlternativeName");function u(n,l={}){let c;for(c in n)if(l[c]!==n[c])throw new t.PolicyError({code:"UNTRUSTED_SIGNER_ERROR",message:`invalid certificate extension - expected ${c}=${n[c]}, got ${c}=${l[c]}`})}S(u,"verifyExtensions")}),kD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyCheckpoint=c;var t=ot(),i=Ge(),u=Nr(),n=`
80
-
81
- `,l=/\u2014 (\S+) (\S+)\n/g;function c(a,h){let p=(0,u.filterTLogAuthorities)(h,{targetDate:new Date(Number(a.integratedTime)*1e3)}),d=a.inclusionProof,m=s.fromString(d.checkpoint.envelope),g=o.fromString(m.note);if(!r(m,p))throw new i.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});if(!t.crypto.bufferEqual(g.logHash,d.rootHash))throw new i.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"root hash mismatch"})}S(c,"verifyCheckpoint");function r(a,h){let p=Buffer.from(a.note,"utf-8");return a.signatures.every(d=>{let m=h.find(g=>t.crypto.bufferEqual(g.logID.subarray(0,4),d.keyHint));return m?t.crypto.verify(p,m.publicKey,d.signature):!1})}S(r,"verifySignedNote");var s=class jm{static{S(this,"SignedNote")}constructor(h,p){this.note=h,this.signatures=p}static fromString(h){if(!h.includes(n))throw new i.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let p=h.indexOf(n),d=h.slice(0,p+1),m=h.slice(p+n.length).matchAll(l),g=Array.from(m,f=>{let[,y,v]=f,E=Buffer.from(v,"base64");if(E.length<5)throw new i.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:y,keyHint:E.subarray(0,4),signature:E.subarray(4)}});if(g.length===0)throw new i.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new jm(d,g)}},o=class Mm{static{S(this,"LogCheckpoint")}constructor(h,p,d,m){this.origin=h,this.logSize=p,this.logHash=d,this.rest=m}static fromString(h){let p=h.trimEnd().split(`
82
- `);if(p.length<3)throw new i.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let d=p[0],m=BigInt(p[1]),g=Buffer.from(p[2],"base64"),f=p.slice(3);return new Mm(d,m,g,f)}}}),LD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyMerkleInclusion=l;var t=ot(),i=Ge(),u=Buffer.from([0]),n=Buffer.from([1]);function l(m){let g=m.inclusionProof,f=BigInt(g.logIndex),y=BigInt(g.treeSize);if(f<0n||f>=y)throw new i.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${f}`});let{inner:v,border:E}=c(f,y);if(g.hashes.length!==v+E)throw new i.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let b=g.hashes.slice(0,v),w=g.hashes.slice(v),_=d(m.canonicalizedBody),O=s(r(_,b,f),w);if(!t.crypto.bufferEqual(O,g.rootHash))throw new i.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}S(l,"verifyMerkleInclusion");function c(m,g){let f=o(m,g),y=a(m>>BigInt(f));return{inner:f,border:y}}S(c,"decompInclProof");function r(m,g,f){return g.reduce((y,v,E)=>f>>BigInt(E)&BigInt(1)?p(v,y):p(y,v),m)}S(r,"chainInner");function s(m,g){return g.reduce((f,y)=>p(y,f),m)}S(s,"chainBorderRight");function o(m,g){return h(m^g-BigInt(1))}S(o,"innerProofSize");function a(m){return m.toString(2).split("1").length-1}S(a,"onesCount");function h(m){return m===0n?0:m.toString(2).length}S(h,"bitLength");function p(m,g){return t.crypto.digest("sha256",n,m,g)}S(p,"hashChildren");function d(m){return t.crypto.digest("sha256",u,m)}S(d,"hashLeaf")}),DD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyTLogSET=n;var t=ot(),i=Ge(),u=Nr();function n(c,r){if(!(0,u.filterTLogAuthorities)(r,{logID:c.logId.keyId,targetDate:new Date(Number(c.integratedTime)*1e3)}).some(s=>{let o=l(c),a=Buffer.from(t.json.canonicalize(o),"utf8"),h=c.inclusionPromise.signedEntryTimestamp;return t.crypto.verify(a,s.publicKey,h)}))throw new i.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}S(n,"verifyTLogSET");function l(c){let{integratedTime:r,logIndex:s,logId:o,canonicalizedBody:a}=c;return{body:a.toString("base64"),integratedTime:Number(r),logIndex:Number(s),logID:o.keyId.toString("hex")}}S(l,"toVerificationPayload")}),$D=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyRFC3161Timestamp=l;var t=ot(),i=Ge(),u=$m(),n=Nr();function l(s,o,a){let h=s.signingTime;if(a=(0,n.filterCertAuthorities)(a,h),a=r(a,{serialNumber:s.signerSerialNumber,issuer:s.signerIssuer}),!a.some(p=>{try{return c(s,o,p),!0}catch{return!1}}))throw new i.VerificationError({code:"TIMESTAMP_ERROR",message:"timestamp could not be verified"})}S(l,"verifyRFC3161Timestamp");function c(s,o,a){let[h,...p]=a.certChain,d=t.crypto.createPublicKey(h.publicKey),m=s.signingTime;try{new u.CertificateChainVerifier({untrustedCert:h,trustedCerts:p,timestamp:m}).verify()}catch{throw new i.VerificationError({code:"TIMESTAMP_ERROR",message:"invalid certificate chain"})}s.verify(o,d)}S(c,"verifyTimestampForCA");function r(s,o){return s.filter(a=>a.certChain.length>0&&t.crypto.bufferEqual(a.certChain[0].serialNumber,o.serialNumber)&&t.crypto.bufferEqual(a.certChain[0].issuer,o.issuer))}S(r,"filterCAsBySerialAndIssuer")}),jD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyTSATimestamp=c,e.verifyTLogTimestamp=r;var t=Ge(),i=kD(),u=LD(),n=DD(),l=$D();function c(a,h,p){return(0,l.verifyRFC3161Timestamp)(a,h,p),{type:"timestamp-authority",logID:a.signerSerialNumber,timestamp:a.signingTime}}S(c,"verifyTSATimestamp");function r(a,h){let p=!1;if(s(a)&&((0,n.verifyTLogSET)(a,h),p=!0),o(a)&&((0,u.verifyMerkleInclusion)(a),(0,i.verifyCheckpoint)(a,h),p=!0),!p)throw new t.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"});return{type:"transparency-log",logID:a.logId.keyId,timestamp:new Date(Number(a.integratedTime)*1e3)}}S(r,"verifyTLogTimestamp");function s(a){return a.inclusionPromise!==void 0}S(s,"isTLogEntryWithInclusionPromise");function o(a){return a.inclusionProof!==void 0}S(o,"isTLogEntryWithInclusionProof")}),MD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyDSSETLogBody=i;var t=Ge();function i(n,l){switch(n.apiVersion){case"0.0.1":return u(n,l);default:throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported dsse version: ${n.apiVersion}`})}}S(i,"verifyDSSETLogBody");function u(n,l){if(n.spec.signatures?.length!==1)throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"});let c=n.spec.signatures[0].signature;if(!l.compareSignature(Buffer.from(c,"base64")))throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});let r=n.spec.payloadHash?.value||"";if(!l.compareDigest(Buffer.from(r,"hex")))throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}S(u,"verifyDSSE001TLogBody")}),BD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyHashedRekordTLogBody=i;var t=Ge();function i(n,l){switch(n.apiVersion){case"0.0.1":return u(n,l);default:throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported hashedrekord version: ${n.apiVersion}`})}}S(i,"verifyHashedRekordTLogBody");function u(n,l){let c=n.spec.signature.content||"";if(!l.compareSignature(Buffer.from(c,"base64")))throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"signature mismatch"});let r=n.spec.data.hash?.value||"";if(!l.compareDigest(Buffer.from(r,"hex")))throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"digest mismatch"})}S(u,"verifyHashedrekord001TLogBody")}),UD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyIntotoTLogBody=i;var t=Ge();function i(l,c){switch(l.apiVersion){case"0.0.2":return u(l,c);default:throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported intoto version: ${l.apiVersion}`})}}S(i,"verifyIntotoTLogBody");function u(l,c){if(l.spec.content.envelope.signatures?.length!==1)throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"});let r=n(l.spec.content.envelope.signatures[0].sig);if(!c.compareSignature(Buffer.from(r,"base64")))throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});let s=l.spec.content.payloadHash?.value||"";if(!c.compareDigest(Buffer.from(s,"hex")))throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}S(u,"verifyIntoto002TLogBody");function n(l){return Buffer.from(l,"base64").toString("utf-8")}S(n,"base64Decode")}),FD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyTLogBody=l;var t=Ge(),i=MD(),u=BD(),n=UD();function l(c,r){let{kind:s,version:o}=c.kindVersion,a=JSON.parse(c.canonicalizedBody.toString("utf8"));if(s!==a.kind||o!==a.apiVersion)throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${s}/${o}, received: ${a.kind}/${a.apiVersion}`});switch(a.kind){case"dsse":return(0,i.verifyDSSETLogBody)(a,r);case"intoto":return(0,n.verifyIntotoTLogBody)(a,r);case"hashedrekord":return(0,u.verifyHashedRekordTLogBody)(a,r);default:throw new t.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${s}`})}}S(l,"verifyTLogBody")}),HD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Verifier=void 0;var t=require("util"),i=Ge(),u=xD(),n=ND(),l=jD(),c=FD(),r=class{static{S(this,"Verifier")}constructor(o,a={}){this.trustMaterial=o,this.options={ctlogThreshold:a.ctlogThreshold??1,tlogThreshold:a.tlogThreshold??1,tsaThreshold:a.tsaThreshold??0}}verify(o,a){let h=this.verifyTimestamps(o),p=this.verifySigningKey(o,h);return this.verifyTLogs(o),this.verifySignature(o,p),a&&this.verifyPolicy(a,p.identity||{}),p}verifyTimestamps(o){let a=0,h=0,p=o.timestamps.map(d=>{switch(d.$case){case"timestamp-authority":return h++,(0,l.verifyTSATimestamp)(d.timestamp,o.signature.signature,this.trustMaterial.timestampAuthorities);case"transparency-log":return a++,(0,l.verifyTLogTimestamp)(d.tlogEntry,this.trustMaterial.tlogs)}});if(s(p))throw new i.VerificationError({code:"TIMESTAMP_ERROR",message:"duplicate timestamp"});if(a<this.options.tlogThreshold)throw new i.VerificationError({code:"TIMESTAMP_ERROR",message:`expected ${this.options.tlogThreshold} tlog timestamps, got ${a}`});if(h<this.options.tsaThreshold)throw new i.VerificationError({code:"TIMESTAMP_ERROR",message:`expected ${this.options.tsaThreshold} tsa timestamps, got ${h}`});return p.map(d=>d.timestamp)}verifySigningKey({key:o},a){switch(o.$case){case"public-key":return(0,u.verifyPublicKey)(o.hint,a,this.trustMaterial);case"certificate":{let h=(0,u.verifyCertificate)(o.certificate,a,this.trustMaterial);if(s(h.scts))throw new i.VerificationError({code:"CERTIFICATE_ERROR",message:"duplicate SCT"});if(h.scts.length<this.options.ctlogThreshold)throw new i.VerificationError({code:"CERTIFICATE_ERROR",message:`expected ${this.options.ctlogThreshold} SCTs, got ${h.scts.length}`});return h.signer}}}verifyTLogs({signature:o,tlogEntries:a}){a.forEach(h=>(0,c.verifyTLogBody)(h,o))}verifySignature(o,a){if(!o.signature.verifySignature(a.key))throw new i.VerificationError({code:"SIGNATURE_ERROR",message:"signature verification failed"})}verifyPolicy(o,a){o.subjectAlternativeName&&(0,n.verifySubjectAlternativeName)(o.subjectAlternativeName,a.subjectAlternativeName),o.extensions&&(0,n.verifyExtensions)(o.extensions,a.extensions)}};e.Verifier=r;function s(o){for(let a=0;a<o.length;a++)for(let h=a+1;h<o.length;h++)if((0,t.isDeepStrictEqual)(o[a],o[h]))return!0;return!1}S(s,"containsDupes")}),bc=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Verifier=e.toTrustMaterial=e.VerificationError=e.PolicyError=e.toSignedEntity=void 0;var t=ID();Object.defineProperty(e,"toSignedEntity",{enumerable:!0,get:S(function(){return t.toSignedEntity},"get")});var i=Ge();Object.defineProperty(e,"PolicyError",{enumerable:!0,get:S(function(){return i.PolicyError},"get")}),Object.defineProperty(e,"VerificationError",{enumerable:!0,get:S(function(){return i.VerificationError},"get")});var u=Nr();Object.defineProperty(e,"toTrustMaterial",{enumerable:!0,get:S(function(){return u.toTrustMaterial},"get")});var n=HD();Object.defineProperty(e,"Verifier",{enumerable:!0,get:S(function(){return n.Verifier},"get")})}),GD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_TIMEOUT=e.DEFAULT_RETRY=void 0,e.createBundleBuilder=n,e.createKeyFinder=l,e.createVerificationPolicy=c;var t=ot(),i=Om(),u=bc();e.DEFAULT_RETRY={retries:2},e.DEFAULT_TIMEOUT=5e3;function n(p,d){let m={signer:r(d),witnesses:o(d)};switch(p){case"messageSignature":return new i.MessageSignatureBundleBuilder(m);case"dsseEnvelope":return new i.DSSEBundleBuilder({...m,certificateChain:d.legacyCompatibility})}}S(n,"createBundleBuilder");function l(p){return d=>{let m=p(d);if(!m)throw new u.VerificationError({code:"PUBLIC_KEY_ERROR",message:`key not found: ${d}`});return{publicKey:t.crypto.createPublicKey(m),validFor:S(()=>!0,"validFor")}}}S(l,"createKeyFinder");function c(p){let d={},m=p.certificateIdentityEmail||p.certificateIdentityURI;return m&&(d.subjectAlternativeName=m),p.certificateIssuer&&(d.extensions={issuer:p.certificateIssuer}),d}S(c,"createVerificationPolicy");function r(p){return new i.FulcioSigner({fulcioBaseURL:p.fulcioURL,identityProvider:p.identityProvider||s(p),retry:p.retry??e.DEFAULT_RETRY,timeout:p.timeout??e.DEFAULT_TIMEOUT})}S(r,"initSigner");function s(p){let d=p.identityToken;return d?{getToken:S(()=>Promise.resolve(d),"getToken")}:new i.CIContextProvider("sigstore")}S(s,"initIdentityProvider");function o(p){let d=[];return a(p)&&d.push(new i.RekorWitness({rekorBaseURL:p.rekorURL,entryType:p.legacyCompatibility?"intoto":"dsse",fetchOnConflict:!1,retry:p.retry??e.DEFAULT_RETRY,timeout:p.timeout??e.DEFAULT_TIMEOUT})),h(p)&&d.push(new i.TSAWitness({tsaBaseURL:p.tsaServerURL,retry:p.retry??e.DEFAULT_RETRY,timeout:p.timeout??e.DEFAULT_TIMEOUT})),d}S(o,"initWitnesses");function a(p){return p.tlogUpload!==!1}S(a,"isRekorEnabled");function h(p){return p.tsaServerURL!==void 0}S(h,"isTSAEnabled")}),VD=J(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(p,d,m,g){g===void 0&&(g=m);var f=Object.getOwnPropertyDescriptor(d,m);(!f||("get"in f?!d.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:S(function(){return d[m]},"get")}),Object.defineProperty(p,g,f)}:function(p,d,m,g){g===void 0&&(g=m),p[g]=d[m]}),i=e&&e.__setModuleDefault||(Object.create?function(p,d){Object.defineProperty(p,"default",{enumerable:!0,value:d})}:function(p,d){p.default=d}),u=e&&e.__importStar||function(){var p=S(function(d){return p=Object.getOwnPropertyNames||function(m){var g=[];for(var f in m)Object.prototype.hasOwnProperty.call(m,f)&&(g[g.length]=f);return g},p(d)},"ownKeys");return function(d){if(d&&d.__esModule)return d;var m={};if(d!=null)for(var g=p(d),f=0;f<g.length;f++)g[f]!=="default"&&t(m,d,g[f]);return i(m,d),m}}();Object.defineProperty(e,"__esModule",{value:!0}),e.sign=s,e.attest=o,e.verify=a,e.createVerifier=h;var n=cn(),l=u(Ec()),c=bc(),r=u(GD());async function s(p,d={}){let m=await r.createBundleBuilder("messageSignature",d).create({data:p});return(0,n.bundleToJSON)(m)}S(s,"sign");async function o(p,d,m={}){let g=await r.createBundleBuilder("dsseEnvelope",m).create({data:p,type:d});return(0,n.bundleToJSON)(g)}S(o,"attest");async function a(p,d,m){let g;return Buffer.isBuffer(d)?g=d:m=d,h(m).then(f=>f.verify(p,g))}S(a,"verify");async function h(p={}){let d=await l.getTrustedRoot({mirrorURL:p.tufMirrorURL,rootPath:p.tufRootPath,cachePath:p.tufCachePath,forceCache:p.tufForceCache,retry:p.retry??r.DEFAULT_RETRY,timeout:p.timeout??r.DEFAULT_TIMEOUT}),m=p.keySelector?r.createKeyFinder(p.keySelector):void 0,g=(0,c.toTrustMaterial)(d,m),f={ctlogThreshold:p.ctLogThreshold,tlogThreshold:p.tlogThreshold},y=new c.Verifier(g,f),v=r.createVerificationPolicy(p);return{verify:S((E,b)=>{let w=(0,n.bundleFromJSON)(E),_=(0,c.toSignedEntity)(w,b);y.verify(_,v)},"verify")}}S(h,"createVerifier")}),WD=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verify=e.sign=e.createVerifier=e.attest=e.VerificationError=e.PolicyError=e.TUFError=e.InternalError=e.DEFAULT_REKOR_URL=e.DEFAULT_FULCIO_URL=e.ValidationError=void 0;var t=cn();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:S(function(){return t.ValidationError},"get")});var i=Om();Object.defineProperty(e,"DEFAULT_FULCIO_URL",{enumerable:!0,get:S(function(){return i.DEFAULT_FULCIO_URL},"get")}),Object.defineProperty(e,"DEFAULT_REKOR_URL",{enumerable:!0,get:S(function(){return i.DEFAULT_REKOR_URL},"get")}),Object.defineProperty(e,"InternalError",{enumerable:!0,get:S(function(){return i.InternalError},"get")});var u=Ec();Object.defineProperty(e,"TUFError",{enumerable:!0,get:S(function(){return u.TUFError},"get")});var n=bc();Object.defineProperty(e,"PolicyError",{enumerable:!0,get:S(function(){return n.PolicyError},"get")}),Object.defineProperty(e,"VerificationError",{enumerable:!0,get:S(function(){return n.VerificationError},"get")});var l=VD();Object.defineProperty(e,"attest",{enumerable:!0,get:S(function(){return l.attest},"get")}),Object.defineProperty(e,"createVerifier",{enumerable:!0,get:S(function(){return l.createVerifier},"get")}),Object.defineProperty(e,"sign",{enumerable:!0,get:S(function(){return l.sign},"get")}),Object.defineProperty(e,"verify",{enumerable:!0,get:S(function(){return l.verify},"get")})}),Bm=J((e,t)=>{var i=require("crypto"),u=Jl(),n=Kl(),l=Dt(),c=ws(),r=WD(),s=lm(),o=kr(),a=an(),h=cm().version,p=Dg(),d=Tr(),m="application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*",g="application/json",f="2015-01-01T00:00:00.000Z",y=class extends o{static{S(this,"RegistryFetcher")}#e;constructor(v,E){super(v,E),this.packumentCache=this.opts.packumentCache||null,this.registry=s.pickRegistry(v,E),this.packumentUrl=`${p(this.registry)}/${this.spec.escapedName}`,this.#e=`${this.fullMetadata?"full":"corgi"}:${this.packumentUrl}`;let b=new URL(this.registry),w=`//${b.host}${b.pathname}`;this.opts[`${w}:_keys`]&&(this.registryKeys=this.opts[`${w}:_keys`])}async resolve(){if(await this.manifest(),!this.resolved)throw Object.assign(new Error("Invalid package manifest: no `dist.tarball` field"),{package:this.spec.toString()});return this.resolved}#t(){return{"user-agent":this.opts.userAgent||`pacote/${h} node/${process.version}`,...this.opts.headers||{},"pacote-version":h,"pacote-req-type":"packument","pacote-pkg-id":`registry:${this.spec.name}`,accept:this.fullMetadata?g:m}}async packument(){if(this.packumentCache?.has(this.#e))return this.packumentCache.get(this.#e);try{let v=await s(this.packumentUrl,{...this.opts,headers:this.#t(),spec:this.spec,integrity:null}),E=await v.json(),b=v.headers.get("content-length");return b&&(E._contentLength=Number(b)),this.packumentCache?.set(this.#e,E),E}catch(v){if(this.packumentCache?.delete(this.#e),v.code!=="E404"||this.fullMetadata)throw v;return this.fullMetadata=!0,this.packument()}}async manifest(){if(this.package)return this.package;this.opts.verifySignatures&&(this.fullMetadata=!0);let v=await this.packument(),E=u.normalizeSteps.filter(O=>O!=="_attributes"),b=await new u().fromContent(n(v,this.spec.fetchSpec,{...this.opts,defaultTag:this.defaultTag,before:this.before})).normalize({steps:E}).then(O=>O.content),w=v.time?.[b.version];w&&(b._time=w);let{dist:_}=b;if(_){this.resolved=b._resolved=_.tarball,b._from=this.from;let O=_.integrity?l.parse(_.integrity):_.shasum?l.fromHex(_.shasum,"sha1",{...this.opts}):null;if(O){if(this.integrity&&!this.integrity.match(O)){for(let A of Object.keys(this.integrity))if(O[A])throw Object.assign(new Error(`Integrity checksum failed when using ${A}: wanted ${this.integrity} but got ${O}.`),{code:"EINTEGRITY"})}this.integrity=O}}if(this.integrity){if(b._integrity=String(this.integrity),_.signatures)if(this.opts.verifySignatures){let O=`${b._id}:${b._integrity}`;for(let A of _.signatures){let I=this.registryKeys&&this.registryKeys.filter(j=>j.keyid===A.keyid)[0];if(!I)throw Object.assign(new Error(`${b._id} has a registry signature with keyid: ${A.keyid} but no corresponding public key can be found`),{code:"EMISSINGSIGNATUREKEY"});let P=Date.parse(b._time||f);if(!(!I.expires||P<Date.parse(I.expires)))throw Object.assign(new Error(`${b._id} has a registry signature with keyid: ${A.keyid} but the corresponding public key has expired ${I.expires}`),{code:"EEXPIREDSIGNATUREKEY"});let L=i.createVerify("SHA256");if(L.write(O),L.end(),!L.verify(I.pemkey,A.sig,"base64"))throw Object.assign(new Error(`${b._id} has an invalid registry signature with keyid: ${I.keyid} and signature: ${A.sig}`),{code:"EINTEGRITYSIGNATURE",keyid:I.keyid,signature:A.sig,resolved:b._resolved,integrity:b._integrity})}b._signatures=_.signatures}else b._signatures=_.signatures;if(_.attestations)if(this.opts.verifyAttestations){let O=new URL(_.attestations.url).pathname,A=p(this.registry)+O,I=await s(A,{...this.opts,integrity:null}),{attestations:P}=await I.json(),L=P.map(({predicateType:M,bundle:B})=>{let F=JSON.parse(Buffer.from(B.dsseEnvelope.payload,"base64").toString("utf8")),D=B.dsseEnvelope.signatures[0].keyid,H=B.dsseEnvelope.signatures[0].sig;return{predicateType:M,bundle:B,statement:F,keyid:D,signature:H}}),j=L.map(M=>M.keyid).filter(M=>!!M),N=(this.registryKeys||[]).filter(M=>j.includes(M.keyid));if(!N.length)throw Object.assign(new Error(`${b._id} has attestations but no corresponding public key(s) can be found`),{code:"EMISSINGSIGNATUREKEY"});for(let{predicateType:M,bundle:B,keyid:F,signature:D,statement:H}of L){let G=N.find(C=>C.keyid===F);if(F){if(!G)throw Object.assign(new Error(`${b._id} has attestations with keyid: ${F} but no corresponding public key can be found`),{code:"EMISSINGSIGNATUREKEY"});let C=new Date(Number(B.verificationMaterial.tlogEntries[0].integratedTime)*1e3);if(!(!G.expires||C<Date.parse(G.expires)))throw Object.assign(new Error(`${b._id} has attestations with keyid: ${F} but the corresponding public key has expired ${G.expires}`),{code:"EEXPIREDSIGNATUREKEY"})}let x={name:H.subject[0].name,sha512:H.subject[0].digest.sha512},k=this.spec.type==="version"?c.toPurl(this.spec):this.spec;if(x.name!==k)throw Object.assign(new Error(`${b._id} package name and version (PURL): ${k} doesn't match what was signed: ${x.name}`),{code:"EATTESTATIONSUBJECT"});let T=l.parse(this.integrity).hexDigest();if(x.sha512!==T)throw Object.assign(new Error(`${b._id} package integrity (hex digest): ${T} doesn't match what was signed: ${x.sha512}`),{code:"EATTESTATIONSUBJECT"});try{let C={tufCachePath:this.tufCache,tufForceCache:!0,keySelector:G?()=>G.pemkey:void 0};await r.verify(B,C)}catch(C){throw Object.assign(new Error(`${b._id} failed to verify attestation: ${C.message}`),{code:"EATTESTATIONVERIFY",predicateType:M,keyid:F,signature:D,resolved:b._resolved,integrity:b._integrity})}}b._attestations=_.attestations}else b._attestations=_.attestations}return this.package=b,this.package}[d.tarballFromResolved](){return new a(this.resolved,{...this.opts,resolved:this.resolved,pkgid:`registry:${this.spec.name}@${this.resolved}`})[d.tarballFromResolved]()}get types(){return["tag","version","range"]}};t.exports=y}),kr=J((e,t)=>{var{basename:i,dirname:u}=require("path"),{rm:n,mkdir:l}=require("internal/fs/promises"),c=Jl(),r=rn(),s=bs(),o=sk(),a=ws(),h=Zi(),p=Dt(),d=kg(),{Minipass:m}=ke(),{log:g}=yt(),f=Tr(),y=fk(),v=Lg(),E=Dg(),b=S(j=>c.prepare(j).then(N=>N.content),"packageJsonPrepare"),w=S(j=>c.normalize(j).then(N=>N.content),"packageJsonNormalize"),_=class{static{S(this,"FetcherBase")}constructor(j,N){if(!N||typeof N!="object")throw new TypeError("options object is required");this.spec=a(j,N.where),this.allowGitIgnore=!!N.allowGitIgnore,this.from=this.spec.registry?`${this.spec.name}@${this.spec.rawSpec}`:this.spec.saveSpec,this.#r(),this.opts={...N},this.cache=N.cache||y().cacache,this.tufCache=N.tufCache||y().tufcache,this.resolved=N.resolved||null,this.defaultIntegrityAlgorithm=N.defaultIntegrityAlgorithm||"sha512",typeof N.integrity=="string"&&(this.opts.integrity=p.parse(N.integrity)),this.package=null,this.type=this.constructor.name,this.fmode=N.fmode||438,this.dmode=N.dmode||511,this.umask=N.umask||0,this.preferOnline=!!N.preferOnline,this.preferOffline=!!N.preferOffline,this.offline=!!N.offline,this.before=N.before,this.fullMetadata=this.before?!0:!!N.fullMetadata,this.fullReadJson=!!N.fullReadJson,this[f.readPackageJson]=this.fullReadJson?b:w,this.replaceRegistryHost=!N.replaceRegistryHost||N.replaceRegistryHost==="npmjs"?"registry.npmjs.org":N.replaceRegistryHost,this.defaultTag=N.defaultTag||"latest",this.registry=E(N.registry||"https://registry.npmjs.org"),this.npmBin=N.npmBin||"npm",this.npmInstallCmd=N.npmInstallCmd||["install","--force"],this.npmCliConfig=N.npmCliConfig||[`--cache=${u(this.cache)}`,`--prefer-offline=${!!this.preferOffline}`,`--prefer-online=${!!this.preferOnline}`,`--offline=${!!this.offline}`,...this.before?[`--before=${this.before.toISOString()}`]:[],"--no-progress","--no-save","--no-audit","--include=dev","--include=peer","--include=optional","--no-package-lock-only","--no-dry-run"]}get integrity(){return this.opts.integrity||null}set integrity(j){if(!j)return;j=p.parse(j);let N=this.opts.integrity;N?N.merge(j):this.opts.integrity=j}get notImplementedError(){return new Error("not implemented in this fetcher type: "+this.type)}resolve(){return this.resolved?Promise.resolve(this.resolved):Promise.reject(this.notImplementedError)}packument(){return Promise.reject(this.notImplementedError)}manifest(){return Promise.reject(this.notImplementedError)}[f.tarballFromResolved](){throw this.notImplementedError}tarball(){return this.tarballStream(j=>j.concat().then(N=>(N.integrity=this.integrity&&String(this.integrity),N.resolved=this.resolved,N.from=this.from,N)))}#e(){let j=Date.now(),N=r.get.stream.byDigest(this.cache,this.integrity,this.opts),M=Date.now()-j;return g.http("cache",`${this.spec} ${M}ms (cache hit)`),N}get[f.cacheFetches](){return!0}#t(j){if(!this.opts.cache||!this[f.cacheFetches]){if(j.hasIntegrityEmitter)return j.on("integrity",F=>this.integrity=F),j;let B=p.integrityStream(this.opts);return B.on("integrity",F=>this.integrity=F),j.on("error",F=>B.emit("error",F)),j.pipe(B)}let N=new m;j.on("error",B=>N.emit("error",B)),j.pipe(N,{end:!1});let M=r.put.stream(this.opts.cache,`pacote:tarball:${this.from}`,this.opts);return M.on("integrity",B=>this.integrity=B),M.on("error",B=>j.emit("error",B)),j.pipe(M),M.promise().catch(()=>{}).then(()=>N.end()),N}pickIntegrityAlgorithm(){return this.integrity?this.integrity.pickAlgorithm(this.opts):this.defaultIntegrityAlgorithm}isDataCorruptionError(j){return j.code==="EINTEGRITY"||j.code==="Z_DATA_ERROR"}get types(){return!1}#r(){if(this.types&&!this.types.includes(this.spec.type))throw new TypeError(`Wrong spec type (${this.spec.type}) for ${this.constructor.name}. Supported types: ${this.types.join(", ")}`)}isRetriableError(j){return this.isDataCorruptionError(j)||j.code==="ENOENT"||j.code==="EISDIR"}tarballStream(j){let N=!this.preferOnline&&this.integrity&&this.resolved?j(this.#e()).catch(B=>{if(this.isDataCorruptionError(B))return g.warn("tarball",`cached data for ${this.spec} (${this.integrity}) seems to be corrupted. Refreshing cache.`),this.cleanupCached().then(()=>{throw B});throw B}):null,M=S(B=>{if(B){if(!this.isRetriableError(B))throw B;g.silly("tarball",`no local data for ${this.spec}. Extracting by manifest.`)}return this.resolve().then(()=>h(F=>j(this.#t(this[f.tarballFromResolved]())).catch(D=>{if(this.isRetriableError(D))return g.warn("tarball",`tarball data for ${this.spec} (${this.integrity}) seems to be corrupted. Trying again.`),this.cleanupCached().then(()=>F(D));throw D}),{retries:1,minTimeout:0,maxTimeout:0}))},"fromResolved");return N?N.catch(M):M()}cleanupCached(){return r.rm.content(this.cache,this.integrity,this.opts)}#s(j){return o({path:j,depth:1}).then(N=>Promise.all(N.map(M=>n(M,{recursive:!0,force:!0}))))}async#n(j){return await this.#s(j),await l(j,{recursive:!0})}async extract(j){return await this.#n(j),this.tarballStream(N=>this.#u(j,N))}#c(j){return this.tarballStream(N=>new Promise((M,B)=>{let F=new s.WriteStream(j);N.on("error",D=>F.emit("error",D)),F.on("error",D=>B(D)),F.on("close",()=>M({integrity:this.integrity&&String(this.integrity),resolved:this.resolved,from:this.from})),N.pipe(F)}))}async tarballFile(j){let N=u(j);return await l(N,{recursive:!0}),this.#c(j)}#u(j,N){let M=d.x(this.#o({cwd:j})),B=new Promise((F,D)=>{M.on("end",()=>{F({resolved:this.resolved,integrity:this.integrity&&String(this.integrity),from:this.from})}),M.on("error",H=>{g.warn("tar",H.message),g.silly("tar",H),D(H)}),N.on("error",H=>D(H))});return N.pipe(M),B}#h(j,N,M){let B=/Directory|GNUDumpDir/.test(M)?this.dmode:/File$/.test(M)?this.fmode:0,F=v(this.package,j)?73:0;return(N|B)&~this.umask|F|384}#o({cwd:j}){let N=new Set;return{cwd:j,noChmod:!0,noMtime:!0,filter:S((M,B)=>{if(/Link$/.test(B.type))return!1;if(B.mode=this.#h(B.path,B.mode,B.type),/File$/.test(B.type)){let F=i(B.path);if(F===".npmignore")N.add(B.path);else if(F===".gitignore"&&!this.allowGitIgnore){let D=B.path.replace(/\.gitignore$/,".npmignore");if(N.has(D))return!1;B.path=D}return!0}},"filter"),strip:1,onwarn:S((M,B,F)=>{g.warn("tar",M,B),g.silly("tar",M,B,F)},"onwarn"),umask:this.umask,preserveOwner:!1}}};t.exports=_;var O=um(),A=Bm(),I=Cs(),P=oc(),L=an();_.get=(j,N={})=>{let M=a(j,N.where);switch(M.type){case"git":return new O(M,N);case"remote":return new L(M,N);case"version":case"range":case"tag":case"alias":return new A(M.subSpec||M,N);case"file":return new I(M,N);case"directory":return new P(M,N);default:throw new TypeError("Unknown spec type: "+M.type)}}}),{get:rr}=kr(),zD=um(),qD=Bm(),KD=Cs(),JD=oc(),XD=an(),wc=S((e,t)=>rr(e,t).tarball(),"tarball");wc.stream=(e,t,i)=>rr(e,i).tarballStream(t);wc.file=(e,t,i)=>rr(e,i).tarballFile(t);Um.exports={GitFetcher:zD,RegistryFetcher:qD,FileFetcher:KD,DirFetcher:JD,RemoteFetcher:XD,resolve:S((e,t)=>rr(e,t).resolve(),"resolve"),extract:S((e,t,i)=>rr(e,i).extract(t),"extract"),manifest:S((e,t)=>rr(e,t).manifest(),"manifest"),packument:S((e,t)=>rr(e,t).packument(),"packument"),tarball:wc};});var Gm=me((i4,Hm)=>{var Rc=Object.defineProperty,ZD=Object.getOwnPropertyDescriptor,YD=Object.getOwnPropertyNames,QD=Object.prototype.hasOwnProperty,e$=(e,t)=>{for(var i in t)Rc(e,i,{get:t[i],enumerable:!0})},t$=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of YD(t))!QD.call(e,n)&&n!==i&&Rc(e,n,{get:()=>t[n],enumerable:!(u=ZD(t,n))||u.enumerable});return e},r$=e=>t$(Rc({},"__esModule",{value:!0}),e),Fm={};e$(Fm,{AT_LATEST:()=>n$,LATEST:()=>o$,PACKAGE:()=>i$,PACKAGE_DEFAULT_VERSION:()=>a$,getLifecycleScriptNames:()=>p$,getNpmLifecycleEvent:()=>h$,getPackageDefaultNodeRange:()=>l$,getPackageDefaultSocketCategories:()=>c$,getPackageExtensions:()=>u$,getPackumentCache:()=>d$,getPacoteCachePath:()=>f$});Hm.exports=r$(Fm);var s$=If(),pn,dn,fn,gn,mn,Oc,i$="package",n$="@latest",o$="latest",a$="1.0.0";function l$(){if(dn===void 0)try{dn=require("../lib/package-default-node-range")}catch{dn=">=18"}return dn}function c$(){if(fn===void 0)try{fn=require("../lib/package-default-socket-categories")}catch{fn=[]}return fn}function u$(){if(gn===void 0)try{let e=require("../lib/package-extensions");gn=Object.entries(e)}catch{gn=[]}return gn}function h$(){return(0,s$.getNpmLifecycleEvent)()}function p$(){if(pn===void 0)try{pn=require("../lib/lifecycle-script-names")}catch{pn=[]}return pn}function d$(){return Oc===void 0&&(Oc=new Map),Oc}function f$(){if(mn===void 0)try{let e=_c(),{normalizePath:t}=require("../lib/path"),i=Reflect.getPrototypeOf(e.RegistryFetcher.prototype)?.constructor,u=i?new i("x",{}).cache:"";mn=t(u)}catch{mn=""}return mn}});var Nc=me((n4,qm)=>{var Ic=Object.defineProperty,g$=Object.getOwnPropertyDescriptor,m$=Object.getOwnPropertyNames,y$=Object.prototype.hasOwnProperty,v$=(e,t)=>{for(var i in t)Ic(e,i,{get:t[i],enumerable:!0})},S$=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of m$(t))!y$.call(e,n)&&n!==i&&Ic(e,n,{get:()=>t[n],enumerable:!(u=g$(t,n))||u.enumerable});return e},E$=e=>S$(Ic({},"__esModule",{value:!0}),e),Vm={};v$(Vm,{normalizeIterationOptions:()=>Pc,normalizeRetryOptions:()=>Ns,pEach:()=>_$,pEachChunk:()=>R$,pFilter:()=>O$,pFilterChunk:()=>zm,pRetry:()=>yn,resolveRetryOptions:()=>xc});qm.exports=E$(Vm);var Ac=Oo(),b$=lr(),Tc=cr(),Wm=(0,b$.getAbortSignal)(),Cc;function w$(){return Cc===void 0&&(Cc=require("timers/promises")),Cc}function Pc(e){let t=typeof e=="number"?{concurrency:e}:e,{concurrency:i=1,retries:u,signal:n=Wm}={__proto__:null,...t};return{__proto__:null,concurrency:Math.max(1,i),retries:Ns({signal:n,...xc(u)}),signal:n}}function Ns(e){let t=xc(e),{args:i=[],backoffFactor:u=t.factor||2,baseDelayMs:n=t.minTimeout||200,jitter:l=!0,maxDelayMs:c=t.maxTimeout||1e4,onRetry:r,onRetryCancelOnFalse:s=!1,onRetryRethrow:o=!1,retries:a=t.retries||0,signal:h=Wm}=t;return{args:i,backoffFactor:u,baseDelayMs:n,jitter:l,maxDelayMs:c,minTimeout:n,maxTimeout:c,onRetry:r,onRetryCancelOnFalse:s,onRetryRethrow:o,retries:a,signal:h}}function xc(e){let t={__proto__:null,retries:0,minTimeout:200,maxTimeout:1e4,factor:2};return typeof e=="number"?{...t,retries:e}:e?{...t,...e}:t}async function _$(e,t,i){let u=Pc(i),{concurrency:n,retries:l,signal:c}=u,r=(0,Tc.arrayChunk)(e,n);for(let s of r){if(c?.aborted)return;await Promise.all(s.map(o=>yn((...a)=>t(a[0]),{...l,args:[o],signal:c})))}}async function O$(e,t,i){let u=Pc(i);return(await zm((0,Tc.arrayChunk)(e,u.concurrency),t,u.retries)).flat()}async function R$(e,t,i){let{chunkSize:u=100,...n}=i||{},l=(0,Tc.arrayChunk)(e,u),c=Ns(n),{signal:r}=c;for(let s of l){if(r?.aborted)return;await yn((...o)=>t(o[0]),{...c,args:[s]})}}async function zm(e,t,i){let u=Ns(i),{signal:n}=u,{length:l}=e,c=Array(l);for(let r=0;r<l;r+=1)if(n?.aborted)c[r]=[];else{let s=e[r],o=await Promise.all(s.map(a=>yn((...h)=>t(h[0]),{...u,args:[a]})));c[r]=s.filter((a,h)=>o[h])}return c}async function yn(e,t){let{args:i,backoffFactor:u,baseDelayMs:n,jitter:l,maxDelayMs:c,onRetry:r,onRetryCancelOnFalse:s,onRetryRethrow:o,retries:a,signal:h}=Ns(t);if(h?.aborted)return;if(a===0)return await e(...i||[],{signal:h});let p=w$(),d=a,m=n,g=Ac.UNDEFINED_TOKEN;for(;d-->=0;){if(h?.aborted)return;try{return await e(...i||[],{signal:h})}catch(f){if(g===Ac.UNDEFINED_TOKEN&&(g=f),d<0)break;let y=m;if(l&&(y+=Math.floor(Math.random()*m)),y=Math.min(y,c),typeof r=="function")try{let v=r(a-d,f,y);if(v===!1&&s)break;typeof v=="number"&&v>=0&&(y=Math.min(v,c))}catch(v){if(o)throw v}try{await p.setTimeout(y,void 0,{signal:h})}catch{return}if(h?.aborted)return;m=Math.min(m*u,c)}}if(g!==Ac.UNDEFINED_TOKEN)throw g}});var ry=me((o4,ty)=>{var Lc=Object.defineProperty,A$=Object.getOwnPropertyDescriptor,C$=Object.getOwnPropertyNames,I$=Object.prototype.hasOwnProperty,T$=(e,t)=>{for(var i in t)Lc(e,i,{get:t[i],enumerable:!0})},P$=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of C$(t))!I$.call(e,n)&&n!==i&&Lc(e,n,{get:()=>t[n],enumerable:!(u=A$(t,n))||u.enumerable});return e},x$=e=>P$(Lc({},"__esModule",{value:!0}),e),Km={};T$(Km,{clearDlx:()=>D$,clearDlxSync:()=>$$,dlxDirExists:()=>j$,dlxDirExistsAsync:()=>M$,ensureDlxDir:()=>B$,ensureDlxDirSync:()=>U$,generateCacheKey:()=>L$,getDlxInstalledPackageDir:()=>Sn,getDlxPackageDir:()=>En,getDlxPackageJsonPath:()=>F$,getDlxPackageNodeModulesDir:()=>Xm,isDlxPackageInstalled:()=>G$,isDlxPackageInstalledAsync:()=>V$,isInSocketDlx:()=>H$,listDlxPackages:()=>Zm,listDlxPackagesAsync:()=>Ym,removeDlxPackage:()=>Qm,removeDlxPackageSync:()=>ey});ty.exports=x$(Km);var N$=require("crypto"),Lr=require("fs"),Jm=cs(),vn=fr(),qt=Pi(),k$=Nc();function L$(e){return(0,N$.createHash)("sha512").update(e).digest("hex").substring(0,16)}var kc;function ks(){return kc===void 0&&(kc=require("path")),kc}async function D$(){let e=await Ym();await(0,k$.pEach)(e,t=>Qm(t))}function $$(){let e=Zm();for(let t of e)ey(t)}function j$(){return(0,Lr.existsSync)((0,qt.getSocketDlxDir)())}async function M$(){try{return await Lr.promises.access((0,qt.getSocketDlxDir)()),!0}catch{return!1}}async function B$(){await Lr.promises.mkdir((0,qt.getSocketDlxDir)(),{recursive:!0})}function U$(){let{mkdirSync:e}=require("fs");e((0,qt.getSocketDlxDir)(),{recursive:!0})}function Sn(e){return(0,vn.normalizePath)(ks().join(Xm(e),e))}function En(e){return(0,vn.normalizePath)(ks().join((0,qt.getSocketDlxDir)(),e))}function F$(e){return(0,vn.normalizePath)(ks().join(Sn(e),"package.json"))}function Xm(e){return(0,vn.normalizePath)(ks().join(En(e),"node_modules"))}function H$(e){if(!e)return!1;let t=ks(),i=(0,qt.getSocketDlxDir)();return t.resolve(e).startsWith(i+t.sep)}function G$(e){return(0,Lr.existsSync)(Sn(e))}async function V$(e){try{return await Lr.promises.access(Sn(e)),!0}catch{return!1}}function Zm(){try{return(0,Jm.readDirNamesSync)((0,qt.getSocketDlxDir)(),{sort:!0})}catch{return[]}}async function Ym(){try{return(await Lr.promises.readdir((0,qt.getSocketDlxDir)(),{withFileTypes:!0})).filter(e=>e.isDirectory()).map(e=>e.name).sort()}catch{return[]}}async function Qm(e){let t=En(e);try{await(0,Jm.safeDelete)(t,{recursive:!0,force:!0})}catch(i){throw new Error(`Failed to remove DLX package "${e}"`,{cause:i})}}function ey(e){let{rmSync:t}=require("fs"),i=En(e);try{t(i,{recursive:!0,force:!0})}catch(u){let n=u.code;throw n==="EACCES"||n==="EPERM"?new Error(`Permission denied removing DLX package "${e}"
83
- Directory: ${i}
84
- To resolve:
85
- 1. Check file/directory permissions
86
- 2. Close any programs using files in this directory
87
- 3. Try running with elevated privileges if necessary
88
- 4. Manually remove: rm -rf "${i}"`,{cause:u}):n==="EROFS"?new Error(`Cannot remove DLX package "${e}" from read-only filesystem
89
- Directory: ${i}
90
- The filesystem is mounted read-only.`,{cause:u}):new Error(`Failed to remove DLX package "${e}"
91
- Directory: ${i}
92
- Check permissions and ensure no programs are using this directory.`,{cause:u})}}});var Dc=me((a4,ay)=>{var W$=Object.create,Ls=Object.defineProperty,z$=Object.getOwnPropertyDescriptor,q$=Object.getOwnPropertyNames,K$=Object.getPrototypeOf,J$=Object.prototype.hasOwnProperty,sy=(e,t)=>Ls(e,"name",{value:t,configurable:!0}),X$=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Z$=(e,t)=>{for(var i in t)Ls(e,i,{get:t[i],enumerable:!0})},ny=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of q$(t))!J$.call(e,n)&&n!==i&&Ls(e,n,{get:()=>t[n],enumerable:!(u=z$(t,n))||u.enumerable});return e},Y$=(e,t,i)=>(i=e!=null?W$(K$(e)):{},ny(t||!e||!e.__esModule?Ls(i,"default",{value:e,enumerable:!0}):i,e)),Q$=e=>ny(Ls({},"__esModule",{value:!0}),e),ej=X$((e,t)=>{"use strict";var i;function u(){return i===void 0&&(i=require("process")),i}sy(u,"getProcess"),t.exports=sy(function(){let n=u();if(n.platform!=="win32")return n.env.TERM!=="linux";let{env:l}=n;if(l.WT_SESSION||l.TERMINUS_SUBLIME||l.ConEmuTask==="{cmd::Cmder}")return!0;let{TERM:c,TERM_PROGRAM:r}=l;return r==="Terminus-Sublime"||r==="vscode"||c==="xterm-256color"||c==="alacritty"||c==="rxvt-unicode"||c==="rxvt-unicode-256color"||l.TERMINAL_EMULATOR==="JetBrains-JediTerm"},"isUnicodeSupported")}),oy={};Z$(oy,{default:()=>iy.default,"module.exports":()=>iy.default});ay.exports=Q$(oy);var iy=Y$(ej(),1)});var $c=me((l4,ly)=>{var tj=Object.defineProperty,rj=(e,t)=>tj(e,"name",{value:t,configurable:!0}),sj=require("tty"),ij=sj?.WriteStream?.prototype?.hasColors?.()??!1,Te=rj((e,t)=>{if(!ij)return n=>n;let i=`\x1B[${e}m`,u=`\x1B[${t}m`;return n=>{let l=n+"",c=l.indexOf(u);if(c===-1)return i+l+u;let r=i,s=0,o=(t===22?u:"")+i;for(;c!==-1;)r+=l.slice(s,c)+o,s=c+u.length,c=l.indexOf(u,s);return r+=l.slice(s)+u,r}},"format"),Ie={};Ie.reset=Te(0,0);Ie.bold=Te(1,22);Ie.dim=Te(2,22);Ie.italic=Te(3,23);Ie.underline=Te(4,24);Ie.overline=Te(53,55);Ie.inverse=Te(7,27);Ie.hidden=Te(8,28);Ie.strikethrough=Te(9,29);Ie.black=Te(30,39);Ie.red=Te(31,39);Ie.green=Te(32,39);Ie.yellow=Te(33,39);Ie.blue=Te(34,39);Ie.magenta=Te(35,39);Ie.cyan=Te(36,39);Ie.white=Te(37,39);Ie.gray=Te(90,39);Ie.bgBlack=Te(40,49);Ie.bgRed=Te(41,49);Ie.bgGreen=Te(42,49);Ie.bgYellow=Te(43,49);Ie.bgBlue=Te(44,49);Ie.bgMagenta=Te(45,49);Ie.bgCyan=Te(46,49);Ie.bgWhite=Te(47,49);Ie.bgGray=Te(100,49);Ie.redBright=Te(91,39);Ie.greenBright=Te(92,39);Ie.yellowBright=Te(93,39);Ie.blueBright=Te(94,39);Ie.magentaBright=Te(95,39);Ie.cyanBright=Te(96,39);Ie.whiteBright=Te(97,39);Ie.bgRedBright=Te(101,49);Ie.bgGreenBright=Te(102,49);Ie.bgYellowBright=Te(103,49);Ie.bgBlueBright=Te(104,49);Ie.bgMagentaBright=Te(105,49);Ie.bgCyanBright=Te(106,49);Ie.bgWhiteBright=Te(107,49);ly.exports=Ie});var jt=me((c4,my)=>{var nj=Object.create,Rn=Object.defineProperty,oj=Object.getOwnPropertyDescriptor,aj=Object.getOwnPropertyNames,lj=Object.getPrototypeOf,cj=Object.prototype.hasOwnProperty,uj=(e,t)=>{for(var i in t)Rn(e,i,{get:t[i],enumerable:!0})},py=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of aj(t))!cj.call(e,n)&&n!==i&&Rn(e,n,{get:()=>t[n],enumerable:!(u=oj(t,n))||u.enumerable});return e},dy=(e,t,i)=>(i=e!=null?nj(lj(e)):{},py(t||!e||!e.__esModule?Rn(i,"default",{value:e,enumerable:!0}):i,e)),hj=e=>py(Rn({},"__esModule",{value:!0}),e),fy={};uj(fy,{LOG_SYMBOLS:()=>wn,Logger:()=>Dr,incLogCallCountSymbol:()=>tt,lastWasBlankSymbol:()=>Fe,logger:()=>Sj});my.exports=hj(fy);var pj=dy(Dc()),dj=dy($c()),cy=Zt(),bn=Qt(),Ds=console,jc=Reflect.apply,fj=Reflect.construct,Mc;function _n(...e){return Mc===void 0&&(Mc=require("console").Console),fj(Mc,e)}function gj(){return dj.default}var wn=(()=>{let e={__proto__:null},t={__proto__:null},i=()=>{let u=(0,pj.default)(),n=gj();(0,cy.objectAssign)(e,{fail:n.red(u?"\u2716":"\xD7"),info:n.blue(u?"\u2139":"i"),step:n.cyan(u?"\u2192":">"),success:n.green(u?"\u2714":"\u221A"),warn:n.yellow(u?"\u26A0":"\u203C")}),(0,cy.objectFreeze)(e);for(let l in t)delete t[l]};for(let u of Reflect.ownKeys(Reflect)){let n=Reflect[u];typeof n=="function"&&(t[u]=(...l)=>(i(),n(...l)))}return new Proxy(e,t)})(),gy=["_stderrErrorHandler","_stdoutErrorHandler","assert","clear","count","countReset","createTask","debug","dir","dirxml","error","info","log","table","time","timeEnd","timeLog","trace","warn"].filter(e=>typeof Ds[e]=="function").map(e=>[e,Ds[e].bind(Ds)]),uy={__proto__:null,writable:!0,enumerable:!1,configurable:!0},mj=1e3,On=new WeakMap,Kt=new WeakMap,Bc;function yj(){return Bc===void 0&&(Bc=Object.getOwnPropertySymbols(Ds)),Bc}var tt=Symbol.for("logger.logCallCount++"),Uc;function Fc(){return Uc===void 0&&(Uc=yj().find(e=>e.label==="kGroupIndentWidth")??Symbol("kGroupIndentWidth")),Uc}var Fe=Symbol.for("logger.lastWasBlank"),Dr=class e{static LOG_SYMBOLS=wn;#e;#t;#r;#s;#n="";#c="";#u=!1;#h=!1;#o=0;#p;#a;constructor(...t){Kt.set(this,t);let i=t[0];typeof i=="object"&&i!==null?(this.#p={__proto__:null,...i},this.#a=i.stdout):this.#p={__proto__:null}}#l(){vj();let t=On.get(this);if(!t){let i=Kt.get(this)??[];if(i.length)t=_n(...i);else{t=_n({stdout:process.stdout,stderr:process.stderr});for(let{0:u,1:n}of gy)t[u]=n}On.set(this,t),Kt.delete(this)}return t}get stderr(){if(!this.#r){let t=Kt.get(this)??[],i=new e(...t);i.#e=this,i.#t="stderr",i.#p={__proto__:null,...this.#p},this.#r=i}return this.#r}get stdout(){if(!this.#s){let t=Kt.get(this)??[],i=new e(...t);i.#e=this,i.#t="stdout",i.#p={__proto__:null,...this.#p},this.#s=i}return this.#s}#i(){return this.#e||this}#d(t){let i=this.#i();return t==="stderr"?i.#n:i.#c}#y(t,i){let u=this.#i();t==="stderr"?u.#n=i:u.#c=i}#S(t){let i=this.#i();return t==="stderr"?i.#u:i.#h}#f(t,i){let u=this.#i();t==="stderr"?u.#u=i:u.#h=i}#R(){return this.#t||"stderr"}#v(t,i,u){let n=this.#l(),l=i.at(0),c=typeof l=="string",r=u||(t==="log"?"stdout":"stderr"),s=this.#d(r),o=c?[(0,bn.applyLinePrefix)(l,{prefix:s}),...i.slice(1)]:i;return jc(n[t],n,o),this[Fe](c&&(0,bn.isBlankString)(o[0]),r),this[tt](),this}#E(t){return t.replace(/^[✖✗×⚠‼✔✓√ℹ→]\uFE0F?\s*/u,"")}#b(t,i){let u=this.#l(),n=i.at(0),l;typeof n=="string"?(n=this.#E(n),l=i.slice(1)):(l=i,n="");let c=this.#d("stderr");return u.error((0,bn.applyLinePrefix)(`${wn[t]} ${n}`,{prefix:c}),...l),this[Fe](!1,"stderr"),this[tt](),this}get logCallCount(){return this.#i().#o}[tt](){let t=this.#i();return t.#o+=1,this}[Fe](t,i){return i?this.#f(i,!!t):this.#t?this.#f(this.#t,!!t):(this.#f("stderr",!!t),this.#f("stdout",!!t)),this}assert(t,...i){return this.#l().assert(t,i[0],...i.slice(1)),this[Fe](!1),t?this:this[tt]()}clearVisible(){if(this.#t)throw new Error("clearVisible() is only available on the main logger instance, not on stream-bound instances");let t=this.#l();return t.clear(),t._stdout.isTTY&&(this[Fe](!0),this.#o=0),this}count(t){return this.#l().count(t),this[Fe](!1),this[tt]()}createTask(t){return{run:i=>{this.log(`Starting task: ${t}`);let u=i();return this.log(`Completed task: ${t}`),u}}}dedent(t=2){if(this.#t){let i=this.#d(this.#t);this.#y(this.#t,i.slice(0,-t))}else{let i=this.#d("stderr"),u=this.#d("stdout");this.#y("stderr",i.slice(0,-t)),this.#y("stdout",u.slice(0,-t))}return this}dir(t,i){return this.#l().dir(t,i),this[Fe](!1),this[tt]()}dirxml(...t){return this.#l().dirxml(t),this[Fe](!1),this[tt]()}error(...t){return this.#v("error",t)}errorNewline(){return this.#S("stderr")?this:this.error("")}fail(...t){return this.#b("fail",t)}group(...t){let{length:i}=t;return i&&jc(this.log,this,t),this.indent(this[Fc()]),i&&(this[Fe](!1),this[tt]()),this}groupCollapsed(...t){return jc(this.group,this,t)}groupEnd(){return this.dedent(this[Fc()]),this}indent(t=2){let i=" ".repeat(Math.min(t,mj));if(this.#t){let u=this.#d(this.#t);this.#y(this.#t,u+i)}else{let u=this.#d("stderr"),n=this.#d("stdout");this.#y("stderr",u+i),this.#y("stdout",n+i)}return this}info(...t){return this.#b("info",t)}log(...t){return this.#v("log",t)}logNewline(){return this.#S("stdout")?this:this.log("")}resetIndent(){return this.#t?this.#y(this.#t,""):(this.#y("stderr",""),this.#y("stdout","")),this}step(t,...i){this.#S("stdout")||this.log("");let u=this.#E(t),n=this.#d("stdout");return this.#l().log((0,bn.applyLinePrefix)(`${wn.step} ${u}`,{prefix:n}),...i),this[Fe](!1,"stdout"),this[tt](),this}substep(t,...i){let u=` ${t}`;return this.log(u,...i)}success(...t){return this.#b("success",t)}done(...t){return this.#b("success",t)}table(t,i){return this.#l().table(t,i),this[Fe](!1),this[tt]()}timeEnd(t){return this.#l().timeEnd(t),this[Fe](!1),this[tt]()}timeLog(t,...i){return this.#l().timeLog(t,...i),this[Fe](!1),this[tt]()}trace(t,...i){return this.#l().trace(t,...i),this[Fe](!1),this[tt]()}warn(...t){return this.#b("warn",t)}write(t){let i=this.#l(),u=Kt.get(this)??[];return(this.#a||u[0]?.stdout||i._stdout).write(t),this[Fe](!1),this}progress(t){let i=this.#l();return(this.#R()==="stderr"?i._stderr:i._stdout).write(`\u2234 ${t}`),this[Fe](!1),this}clearLine(){let t=this.#l(),i=this.#R()==="stderr"?t._stderr:t._stdout;return i.isTTY?(i.cursorTo(0),i.clearLine(0)):i.write("\r\x1B[K"),this}},hy=!1;function vj(){if(hy)return;hy=!0;let e=[[Fc(),{...uy,value:2}],[Symbol.toStringTag,{__proto__:null,configurable:!0,value:"logger"}]];for(let{0:t,1:i}of Object.entries(Ds))if(!Dr.prototype[t]&&typeof i=="function"){let{[t]:u}={[t](...n){let l=On.get(this);if(l===void 0){let r=Kt.get(this)??[];if(Kt.delete(this),r.length)l=_n(...r);else{l=_n({stdout:process.stdout,stderr:process.stderr});for(let{0:s,1:o}of gy)l[s]=o}On.set(this,l)}let c=l[t](...n);return c===void 0||c===l?this:c}};e.push([t,{...uy,value:u}])}Object.defineProperties(Dr.prototype,Object.fromEntries(e))}var Sj=new Dr});var wy=me((u4,by)=>{var zc=Object.defineProperty,Ej=Object.getOwnPropertyDescriptor,bj=Object.getOwnPropertyNames,wj=Object.prototype.hasOwnProperty,_j=(e,t)=>{for(var i in t)zc(e,i,{get:t[i],enumerable:!0})},Oj=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of bj(t))!wj.call(e,n)&&n!==i&&zc(e,n,{get:()=>t[n],enumerable:!(u=Ej(t,n))||u.enumerable});return e},Rj=e=>Oj(zc({},"__esModule",{value:!0}),e),yy={};_j(yy,{load:()=>Cj,onExit:()=>Pj,signals:()=>xj,unload:()=>Nj});by.exports=Rj(yy);var Gc=Reflect.apply,Le=globalThis.process,Vc=Le?.emit,vy=Le?.platform??"",Wc=Le?.reallyExit,Sy=vy==="win32",Hc;function Aj(){return Hc===void 0&&(Hc=require("events")),Hc}var Ct;function In(){if(Ct===void 0){if(Le?.__signal_exit_emitter__)Ct=Le.__signal_exit_emitter__;else if(Le){let e=Aj().EventEmitter;Ct=Le.__signal_exit_emitter__=new e,Ct.count=0,Ct.emitted={__proto__:null}}Ct&&!Ct.infinite&&(Ct.setMaxListeners(Number.POSITIVE_INFINITY),Ct.infinite=!0)}return Ct}var An;function Ey(){if(An===void 0){An={__proto__:null};let e=In(),t=qc();for(let i of t)An[i]=function(){if((Le?.listeners(i)||[]).length===e.count){let u=Sy&&i==="SIGHUP"?"SIGINT":i;Le?.kill(Le?.pid,u)}}}return An}var ir;function qc(){return ir===void 0&&(ir=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],Sy||ir.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),vy==="linux"&&ir.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")),ir}var Cn=!1;function Cj(){if(Cn||!Le)return;Cn=!0;let e=In();e.count!==void 0&&(e.count+=1);let t=qc(),i=Ey();ir=t.filter(u=>{try{return Le.on(u,i[u]),!0}catch{}return!1}),Le.emit=Ij,Le.reallyExit=Tj}function Ij(e,t,...i){if(e==="exit"){let u=t;if(u===void 0){let c=Le?.exitCode;u=typeof c=="number"?c:void 0}else Le&&(Le.exitCode=u);let n=Gc(Vc,this,[e,u,...i]),l=typeof u=="number"?u:null;return n}return Gc(Vc,this,[e,t,...i])}function Tj(e){let t=e||0;throw Le&&(Le.exitCode=t),Gc(Wc,Le,[t]),new Error("processReallyExit should never return")}function Pj(e,t){if(!Le)return function(){};if(typeof e!="function")throw new TypeError("a callback must be provided for exit handler");let{alwaysLast:i}={__proto__:null,...t},u="exit";i&&(u="afterexit");let n=In();return n.on(u,e),function(){n.removeListener(u,e),!n.listeners("exit").length&&n.listeners("afterexit").length}}function xj(){return ir}function Nj(){if(!Cn||!Le)return;Cn=!1;let e=qc(),t=Ey();for(let u of e)try{Le.removeListener(u,t[u])}catch{}Le.emit=Vc,Wc!==void 0&&(Le.reallyExit=Wc);let i=In();i.count!==void 0&&(i.count-=1)}});var Ry=me((h4,Oy)=>{var Zc=Object.defineProperty,kj=Object.getOwnPropertyDescriptor,Lj=Object.getOwnPropertyNames,Dj=Object.prototype.hasOwnProperty,$j=(e,t)=>{for(var i in t)Zc(e,i,{get:t[i],enumerable:!0})},jj=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Lj(t))!Dj.call(e,n)&&n!==i&&Zc(e,n,{get:()=>t[n],enumerable:!(u=kj(t,n))||u.enumerable});return e},Mj=e=>jj(Zc({},"__esModule",{value:!0}),e),_y={};$j(_y,{processLock:()=>Fj});Oy.exports=Mj(_y);var Mt=require("fs"),Kc=cs(),Jc=jt(),Bj=Nc(),Uj=wy(),Xc=class{activeLocks=new Set;touchTimers=new Map;exitHandlerRegistered=!1;ensureExitHandler(){this.exitHandlerRegistered||((0,Uj.onExit)(()=>{for(let t of this.touchTimers.values())clearInterval(t);this.touchTimers.clear();for(let t of this.activeLocks)try{(0,Mt.existsSync)(t)&&(0,Kc.safeDeleteSync)(t,{recursive:!0})}catch{}}),this.exitHandlerRegistered=!0)}touchLock(t){try{if((0,Mt.existsSync)(t)){let i=new Date;(0,Mt.utimesSync)(t,i,i)}}catch(i){Jc.logger.warn(`Failed to touch lock ${t}: ${i instanceof Error?i.message:String(i)}`)}}startTouchTimer(t,i){if(i<=0||this.touchTimers.has(t))return;let u=setInterval(()=>{this.touchLock(t)},i);u.unref(),this.touchTimers.set(t,u)}stopTouchTimer(t){let i=this.touchTimers.get(t);i&&(clearInterval(i),this.touchTimers.delete(t))}isStale(t,i){try{if(!(0,Mt.existsSync)(t))return!1;let u=(0,Mt.statSync)(t),n=Math.floor((Date.now()-u.mtime.getTime())/1e3),l=Math.floor(i/1e3);return n>l}catch{return!1}}async acquire(t,i={}){let{baseDelayMs:u=100,maxDelayMs:n=1e3,retries:l=3,staleMs:c=5e3,touchIntervalMs:r=2e3}=i;return this.ensureExitHandler(),await(0,Bj.pRetry)(async()=>{try{if((0,Mt.existsSync)(t)&&this.isStale(t,c)){Jc.logger.log(`Removing stale lock: ${t}`);try{(0,Kc.safeDeleteSync)(t,{recursive:!0})}catch{}}if((0,Mt.existsSync)(t))throw new Error(`Lock already exists: ${t}`);return(0,Mt.mkdirSync)(t,{recursive:!0}),this.activeLocks.add(t),this.startTouchTimer(t,r),()=>this.release(t)}catch(s){let o=s.code;if(o==="EEXIST")throw this.isStale(t,c)?new Error(`Stale lock detected: ${t}`):new Error(`Lock already exists: ${t}`);if(o==="EACCES"||o==="EPERM")throw new Error(`Permission denied creating lock: ${t}. Check directory permissions or run with appropriate access.`,{cause:s});if(o==="EROFS")throw new Error(`Cannot create lock on read-only filesystem: ${t}`,{cause:s});if(o==="ENOTDIR"){let a=t.slice(0,t.lastIndexOf("/"));throw new Error(`Cannot create lock directory: ${t}
93
- A path component is a file when it should be a directory.
94
- Parent path: ${a}
95
- To resolve:
96
- 1. Check if "${a}" contains a file instead of a directory
97
- 2. Remove any conflicting files in the path
98
- 3. Ensure the full parent directory structure exists`,{cause:s})}if(o==="ENOENT"){let a=t.slice(0,t.lastIndexOf("/"));throw new Error(`Cannot create lock directory: ${t}
99
- Parent directory does not exist: ${a}
100
- To resolve:
101
- 1. Ensure the parent directory "${a}" exists
102
- 2. Create the directory structure: mkdir -p "${a}"
103
- 3. Check filesystem permissions allow directory creation`,{cause:s})}throw new Error(`Failed to acquire lock: ${t}`,{cause:s})}},{retries:l,baseDelayMs:u,maxDelayMs:n,jitter:!0})}release(t){this.stopTouchTimer(t);try{(0,Mt.existsSync)(t)&&(0,Kc.safeDeleteSync)(t,{recursive:!0}),this.activeLocks.delete(t)}catch(i){Jc.logger.warn(`Failed to release lock ${t}: ${i instanceof Error?i.message:String(i)}`)}}async withLock(t,i,u){let n=await this.acquire(t,u);try{return await i()}finally{n()}}},Fj=new Xc});var Ky=me((p4,Bs)=>{"use strict";var Hj=Object.defineProperty,ae=(e,t)=>Hj(e,"name",{value:t,configurable:!0}),Re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gj=Re(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var t=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,i=new Set,u=typeof process=="object"&&process?process:{},n=ae((m,g,f,y)=>{typeof u.emitWarning=="function"&&u.emitWarning(m,g,f,y)},"emitWarning"),l=globalThis.AbortController,c=globalThis.AbortSignal;if(typeof l>"u"){c=class{static{ae(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(f,y){this._onabort.push(y)}},l=class{static{ae(this,"AbortController")}constructor(){g()}signal=new c;abort(f){if(!this.signal.aborted){this.signal.reason=f,this.signal.aborted=!0;for(let y of this.signal._onabort)y(f);this.signal.onabort?.(f)}}};let m=u.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",g=ae(()=>{m&&(m=!1,n("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",g))},"warnACPolyfill")}var r=ae(m=>!i.has(m),"shouldWarn"),s=Symbol("type"),o=ae(m=>m&&m===Math.floor(m)&&m>0&&isFinite(m),"isPosInt"),a=ae(m=>o(m)?m<=Math.pow(2,8)?Uint8Array:m<=Math.pow(2,16)?Uint16Array:m<=Math.pow(2,32)?Uint32Array:m<=Number.MAX_SAFE_INTEGER?h:null:null,"getUintArray"),h=class extends Array{static{ae(this,"ZeroArray")}constructor(m){super(m),this.fill(0)}},p=class $s{static{ae(this,"Stack")}heap;length;static#e=!1;static create(g){let f=a(g);if(!f)return[];$s.#e=!0;let y=new $s(g,f);return $s.#e=!1,y}constructor(g,f){if(!$s.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new f(g),this.length=0}push(g){this.heap[this.length++]=g}pop(){return this.heap[--this.length]}},d=class Iy{static{ae(this,"LRUCache")}#e;#t;#r;#s;#n;#c;#u;#h;get perf(){return this.#h}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#p;#a;#l;#i;#d;#y;#S;#f;#R;#v;#E;#b;#w;#_;#N;#O;#m;static unsafeExposeInternals(g){return{starts:g.#b,ttls:g.#w,sizes:g.#E,keyMap:g.#a,keyList:g.#l,valList:g.#i,next:g.#d,prev:g.#y,get head(){return g.#S},get tail(){return g.#f},free:g.#R,isBackgroundFetch:ae(f=>g.#g(f),"isBackgroundFetch"),backgroundFetch:ae((f,y,v,E)=>g.#j(f,y,v,E),"backgroundFetch"),moveToTail:ae(f=>g.#F(f),"moveToTail"),indexes:ae(f=>g.#P(f),"indexes"),rindexes:ae(f=>g.#x(f),"rindexes"),isStale:ae(f=>g.#C(f),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#p}get size(){return this.#o}get fetchMethod(){return this.#c}get memoMethod(){return this.#u}get dispose(){return this.#r}get onInsert(){return this.#s}get disposeAfter(){return this.#n}constructor(g){let{max:f=0,ttl:y,ttlResolution:v=1,ttlAutopurge:E,updateAgeOnGet:b,updateAgeOnHas:w,allowStale:_,dispose:O,onInsert:A,disposeAfter:I,noDisposeOnSet:P,noUpdateTTL:L,maxSize:j=0,maxEntrySize:N=0,sizeCalculation:M,fetchMethod:B,memoMethod:F,noDeleteOnFetchRejection:D,noDeleteOnStaleGet:H,allowStaleOnFetchRejection:G,allowStaleOnFetchAbort:x,ignoreFetchAbort:k,perf:T}=g;if(T!==void 0&&typeof T?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#h=T??t,f!==0&&!o(f))throw new TypeError("max option must be a nonnegative integer");let C=f?a(f):Array;if(!C)throw new Error("invalid max value: "+f);if(this.#e=f,this.#t=j,this.maxEntrySize=N||this.#t,this.sizeCalculation=M,this.sizeCalculation){if(!this.#t&&!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(F!==void 0&&typeof F!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#u=F,B!==void 0&&typeof B!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#c=B,this.#N=!!B,this.#a=new Map,this.#l=new Array(f).fill(void 0),this.#i=new Array(f).fill(void 0),this.#d=new C(f),this.#y=new C(f),this.#S=0,this.#f=0,this.#R=p.create(f),this.#o=0,this.#p=0,typeof O=="function"&&(this.#r=O),typeof A=="function"&&(this.#s=A),typeof I=="function"?(this.#n=I,this.#v=[]):(this.#n=void 0,this.#v=void 0),this.#_=!!this.#r,this.#m=!!this.#s,this.#O=!!this.#n,this.noDisposeOnSet=!!P,this.noUpdateTTL=!!L,this.noDeleteOnFetchRejection=!!D,this.allowStaleOnFetchRejection=!!G,this.allowStaleOnFetchAbort=!!x,this.ignoreFetchAbort=!!k,this.maxEntrySize!==0){if(this.#t!==0&&!o(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!o(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#H()}if(this.allowStale=!!_,this.noDeleteOnStaleGet=!!H,this.updateAgeOnGet=!!b,this.updateAgeOnHas=!!w,this.ttlResolution=o(v)||v===0?v:1,this.ttlAutopurge=!!E,this.ttl=y||0,this.ttl){if(!o(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#M()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let q="LRU_CACHE_UNBOUNDED";r(q)&&(i.add(q),n("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",q,Iy))}}getRemainingTTL(g){return this.#a.has(g)?1/0:0}#M(){let g=new h(this.#e),f=new h(this.#e);this.#w=g,this.#b=f,this.#B=(E,b,w=this.#h.now())=>{if(f[E]=b!==0?w:0,g[E]=b,b!==0&&this.ttlAutopurge){let _=setTimeout(()=>{this.#C(E)&&this.#L(this.#l[E],"expire")},b+1);_.unref&&_.unref()}},this.#I=E=>{f[E]=g[E]!==0?this.#h.now():0},this.#T=(E,b)=>{if(g[b]){let w=g[b],_=f[b];if(!w||!_)return;E.ttl=w,E.start=_,E.now=y||v();let O=E.now-_;E.remainingTTL=w-O}};let y=0,v=ae(()=>{let E=this.#h.now();if(this.ttlResolution>0){y=E;let b=setTimeout(()=>y=0,this.ttlResolution);b.unref&&b.unref()}return E},"getNow");this.getRemainingTTL=E=>{let b=this.#a.get(E);if(b===void 0)return 0;let w=g[b],_=f[b];if(!w||!_)return 1/0;let O=(y||v())-_;return w-O},this.#C=E=>{let b=f[E],w=g[E];return!!w&&!!b&&(y||v())-b>w}}#I=ae(()=>{},"#updateItemAge");#T=ae(()=>{},"#statusTTL");#B=ae(()=>{},"#setItemTTL");#C=ae(()=>!1,"#isStale");#H(){let g=new h(this.#e);this.#p=0,this.#E=g,this.#k=f=>{this.#p-=g[f],g[f]=0},this.#U=(f,y,v,E)=>{if(this.#g(y))return 0;if(!o(v))if(E){if(typeof E!="function")throw new TypeError("sizeCalculation must be a function");if(v=E(y,f),!o(v))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 v},this.#D=(f,y,v)=>{if(g[f]=y,this.#t){let E=this.#t-g[f];for(;this.#p>E;)this.#$(!0)}this.#p+=g[f],v&&(v.entrySize=y,v.totalCalculatedSize=this.#p)}}#k=ae(g=>{},"#removeItemSize");#D=ae((g,f,y)=>{},"#addItemSize");#U=ae((g,f,y,v)=>{if(y||v)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#P({allowStale:g=this.allowStale}={}){if(this.#o)for(let f=this.#f;!(!this.#A(f)||((g||!this.#C(f))&&(yield f),f===this.#S));)f=this.#y[f]}*#x({allowStale:g=this.allowStale}={}){if(this.#o)for(let f=this.#S;!(!this.#A(f)||((g||!this.#C(f))&&(yield f),f===this.#f));)f=this.#d[f]}#A(g){return g!==void 0&&this.#a.get(this.#l[g])===g}*entries(){for(let g of this.#P())this.#i[g]!==void 0&&this.#l[g]!==void 0&&!this.#g(this.#i[g])&&(yield[this.#l[g],this.#i[g]])}*rentries(){for(let g of this.#x())this.#i[g]!==void 0&&this.#l[g]!==void 0&&!this.#g(this.#i[g])&&(yield[this.#l[g],this.#i[g]])}*keys(){for(let g of this.#P()){let f=this.#l[g];f!==void 0&&!this.#g(this.#i[g])&&(yield f)}}*rkeys(){for(let g of this.#x()){let f=this.#l[g];f!==void 0&&!this.#g(this.#i[g])&&(yield f)}}*values(){for(let g of this.#P())this.#i[g]!==void 0&&!this.#g(this.#i[g])&&(yield this.#i[g])}*rvalues(){for(let g of this.#x())this.#i[g]!==void 0&&!this.#g(this.#i[g])&&(yield this.#i[g])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(g,f={}){for(let y of this.#P()){let v=this.#i[y],E=this.#g(v)?v.__staleWhileFetching:v;if(E!==void 0&&g(E,this.#l[y],this))return this.get(this.#l[y],f)}}forEach(g,f=this){for(let y of this.#P()){let v=this.#i[y],E=this.#g(v)?v.__staleWhileFetching:v;E!==void 0&&g.call(f,E,this.#l[y],this)}}rforEach(g,f=this){for(let y of this.#x()){let v=this.#i[y],E=this.#g(v)?v.__staleWhileFetching:v;E!==void 0&&g.call(f,E,this.#l[y],this)}}purgeStale(){let g=!1;for(let f of this.#x({allowStale:!0}))this.#C(f)&&(this.#L(this.#l[f],"expire"),g=!0);return g}info(g){let f=this.#a.get(g);if(f===void 0)return;let y=this.#i[f],v=this.#g(y)?y.__staleWhileFetching:y;if(v===void 0)return;let E={value:v};if(this.#w&&this.#b){let b=this.#w[f],w=this.#b[f];if(b&&w){let _=b-(this.#h.now()-w);E.ttl=_,E.start=Date.now()}}return this.#E&&(E.size=this.#E[f]),E}dump(){let g=[];for(let f of this.#P({allowStale:!0})){let y=this.#l[f],v=this.#i[f],E=this.#g(v)?v.__staleWhileFetching:v;if(E===void 0||y===void 0)continue;let b={value:E};if(this.#w&&this.#b){b.ttl=this.#w[f];let w=this.#h.now()-this.#b[f];b.start=Math.floor(Date.now()-w)}this.#E&&(b.size=this.#E[f]),g.unshift([y,b])}return g}load(g){this.clear();for(let[f,y]of g){if(y.start){let v=Date.now()-y.start;y.start=this.#h.now()-v}this.set(f,y.value,y)}}set(g,f,y={}){if(f===void 0)return this.delete(g),this;let{ttl:v=this.ttl,start:E,noDisposeOnSet:b=this.noDisposeOnSet,sizeCalculation:w=this.sizeCalculation,status:_}=y,{noUpdateTTL:O=this.noUpdateTTL}=y,A=this.#U(g,f,y.size||0,w);if(this.maxEntrySize&&A>this.maxEntrySize)return _&&(_.set="miss",_.maxEntrySizeExceeded=!0),this.#L(g,"set"),this;let I=this.#o===0?void 0:this.#a.get(g);if(I===void 0)I=this.#o===0?this.#f:this.#R.length!==0?this.#R.pop():this.#o===this.#e?this.#$(!1):this.#o,this.#l[I]=g,this.#i[I]=f,this.#a.set(g,I),this.#d[this.#f]=I,this.#y[I]=this.#f,this.#f=I,this.#o++,this.#D(I,A,_),_&&(_.set="add"),O=!1,this.#m&&this.#s?.(f,g,"add");else{this.#F(I);let P=this.#i[I];if(f!==P){if(this.#N&&this.#g(P)){P.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:L}=P;L!==void 0&&!b&&(this.#_&&this.#r?.(L,g,"set"),this.#O&&this.#v?.push([L,g,"set"]))}else b||(this.#_&&this.#r?.(P,g,"set"),this.#O&&this.#v?.push([P,g,"set"]));if(this.#k(I),this.#D(I,A,_),this.#i[I]=f,_){_.set="replace";let L=P&&this.#g(P)?P.__staleWhileFetching:P;L!==void 0&&(_.oldValue=L)}}else _&&(_.set="update");this.#m&&this.onInsert?.(f,g,f===P?"update":"replace")}if(v!==0&&!this.#w&&this.#M(),this.#w&&(O||this.#B(I,v,E),_&&this.#T(_,I)),!b&&this.#O&&this.#v){let P=this.#v,L;for(;L=P?.shift();)this.#n?.(...L)}return this}pop(){try{for(;this.#o;){let g=this.#i[this.#S];if(this.#$(!0),this.#g(g)){if(g.__staleWhileFetching)return g.__staleWhileFetching}else if(g!==void 0)return g}}finally{if(this.#O&&this.#v){let g=this.#v,f;for(;f=g?.shift();)this.#n?.(...f)}}}#$(g){let f=this.#S,y=this.#l[f],v=this.#i[f];return this.#N&&this.#g(v)?v.__abortController.abort(new Error("evicted")):(this.#_||this.#O)&&(this.#_&&this.#r?.(v,y,"evict"),this.#O&&this.#v?.push([v,y,"evict"])),this.#k(f),g&&(this.#l[f]=void 0,this.#i[f]=void 0,this.#R.push(f)),this.#o===1?(this.#S=this.#f=0,this.#R.length=0):this.#S=this.#d[f],this.#a.delete(y),this.#o--,f}has(g,f={}){let{updateAgeOnHas:y=this.updateAgeOnHas,status:v}=f,E=this.#a.get(g);if(E!==void 0){let b=this.#i[E];if(this.#g(b)&&b.__staleWhileFetching===void 0)return!1;if(this.#C(E))v&&(v.has="stale",this.#T(v,E));else return y&&this.#I(E),v&&(v.has="hit",this.#T(v,E)),!0}else v&&(v.has="miss");return!1}peek(g,f={}){let{allowStale:y=this.allowStale}=f,v=this.#a.get(g);if(v===void 0||!y&&this.#C(v))return;let E=this.#i[v];return this.#g(E)?E.__staleWhileFetching:E}#j(g,f,y,v){let E=f===void 0?void 0:this.#i[f];if(this.#g(E))return E;let b=new l,{signal:w}=y;w?.addEventListener("abort",()=>b.abort(w.reason),{signal:b.signal});let _={signal:b.signal,options:y,context:v},O=ae((N,M=!1)=>{let{aborted:B}=b.signal,F=y.ignoreFetchAbort&&N!==void 0;if(y.status&&(B&&!M?(y.status.fetchAborted=!0,y.status.fetchError=b.signal.reason,F&&(y.status.fetchAbortIgnored=!0)):y.status.fetchResolved=!0),B&&!F&&!M)return I(b.signal.reason);let D=L,H=this.#i[f];return(H===L||F&&M&&H===void 0)&&(N===void 0?D.__staleWhileFetching!==void 0?this.#i[f]=D.__staleWhileFetching:this.#L(g,"fetch"):(y.status&&(y.status.fetchUpdated=!0),this.set(g,N,_.options))),N},"cb"),A=ae(N=>(y.status&&(y.status.fetchRejected=!0,y.status.fetchError=N),I(N)),"eb"),I=ae(N=>{let{aborted:M}=b.signal,B=M&&y.allowStaleOnFetchAbort,F=B||y.allowStaleOnFetchRejection,D=F||y.noDeleteOnFetchRejection,H=L;if(this.#i[f]===L&&(!D||H.__staleWhileFetching===void 0?this.#L(g,"fetch"):B||(this.#i[f]=H.__staleWhileFetching)),F)return y.status&&H.__staleWhileFetching!==void 0&&(y.status.returnedStale=!0),H.__staleWhileFetching;if(H.__returned===H)throw N},"fetchFail"),P=ae((N,M)=>{let B=this.#c?.(g,E,_);B&&B instanceof Promise&&B.then(F=>N(F===void 0?void 0:F),M),b.signal.addEventListener("abort",()=>{(!y.ignoreFetchAbort||y.allowStaleOnFetchAbort)&&(N(void 0),y.allowStaleOnFetchAbort&&(N=ae(F=>O(F,!0),"res")))})},"pcall");y.status&&(y.status.fetchDispatched=!0);let L=new Promise(P).then(O,A),j=Object.assign(L,{__abortController:b,__staleWhileFetching:E,__returned:void 0});return f===void 0?(this.set(g,j,{..._.options,status:void 0}),f=this.#a.get(g)):this.#i[f]=j,j}#g(g){if(!this.#N)return!1;let f=g;return!!f&&f instanceof Promise&&f.hasOwnProperty("__staleWhileFetching")&&f.__abortController instanceof l}async fetch(g,f={}){let{allowStale:y=this.allowStale,updateAgeOnGet:v=this.updateAgeOnGet,noDeleteOnStaleGet:E=this.noDeleteOnStaleGet,ttl:b=this.ttl,noDisposeOnSet:w=this.noDisposeOnSet,size:_=0,sizeCalculation:O=this.sizeCalculation,noUpdateTTL:A=this.noUpdateTTL,noDeleteOnFetchRejection:I=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:P=this.allowStaleOnFetchRejection,ignoreFetchAbort:L=this.ignoreFetchAbort,allowStaleOnFetchAbort:j=this.allowStaleOnFetchAbort,context:N,forceRefresh:M=!1,status:B,signal:F}=f;if(!this.#N)return B&&(B.fetch="get"),this.get(g,{allowStale:y,updateAgeOnGet:v,noDeleteOnStaleGet:E,status:B});let D={allowStale:y,updateAgeOnGet:v,noDeleteOnStaleGet:E,ttl:b,noDisposeOnSet:w,size:_,sizeCalculation:O,noUpdateTTL:A,noDeleteOnFetchRejection:I,allowStaleOnFetchRejection:P,allowStaleOnFetchAbort:j,ignoreFetchAbort:L,status:B,signal:F},H=this.#a.get(g);if(H===void 0){B&&(B.fetch="miss");let G=this.#j(g,H,D,N);return G.__returned=G}else{let G=this.#i[H];if(this.#g(G)){let C=y&&G.__staleWhileFetching!==void 0;return B&&(B.fetch="inflight",C&&(B.returnedStale=!0)),C?G.__staleWhileFetching:G.__returned=G}let x=this.#C(H);if(!M&&!x)return B&&(B.fetch="hit"),this.#F(H),v&&this.#I(H),B&&this.#T(B,H),G;let k=this.#j(g,H,D,N),T=k.__staleWhileFetching!==void 0&&y;return B&&(B.fetch=x?"stale":"refresh",T&&x&&(B.returnedStale=!0)),T?k.__staleWhileFetching:k.__returned=k}}async forceFetch(g,f={}){let y=await this.fetch(g,f);if(y===void 0)throw new Error("fetch() returned undefined");return y}memo(g,f={}){let y=this.#u;if(!y)throw new Error("no memoMethod provided to constructor");let{context:v,forceRefresh:E,...b}=f,w=this.get(g,b);if(!E&&w!==void 0)return w;let _=y(g,w,{options:b,context:v});return this.set(g,_,b),_}get(g,f={}){let{allowStale:y=this.allowStale,updateAgeOnGet:v=this.updateAgeOnGet,noDeleteOnStaleGet:E=this.noDeleteOnStaleGet,status:b}=f,w=this.#a.get(g);if(w!==void 0){let _=this.#i[w],O=this.#g(_);return b&&this.#T(b,w),this.#C(w)?(b&&(b.get="stale"),O?(b&&y&&_.__staleWhileFetching!==void 0&&(b.returnedStale=!0),y?_.__staleWhileFetching:void 0):(E||this.#L(g,"expire"),b&&y&&(b.returnedStale=!0),y?_:void 0)):(b&&(b.get="hit"),O?_.__staleWhileFetching:(this.#F(w),v&&this.#I(w),_))}else b&&(b.get="miss")}#G(g,f){this.#y[f]=g,this.#d[g]=f}#F(g){g!==this.#f&&(g===this.#S?this.#S=this.#d[g]:this.#G(this.#y[g],this.#d[g]),this.#G(this.#f,g),this.#f=g)}delete(g){return this.#L(g,"delete")}#L(g,f){let y=!1;if(this.#o!==0){let v=this.#a.get(g);if(v!==void 0)if(y=!0,this.#o===1)this.#V(f);else{this.#k(v);let E=this.#i[v];if(this.#g(E)?E.__abortController.abort(new Error("deleted")):(this.#_||this.#O)&&(this.#_&&this.#r?.(E,g,f),this.#O&&this.#v?.push([E,g,f])),this.#a.delete(g),this.#l[v]=void 0,this.#i[v]=void 0,v===this.#f)this.#f=this.#y[v];else if(v===this.#S)this.#S=this.#d[v];else{let b=this.#y[v];this.#d[b]=this.#d[v];let w=this.#d[v];this.#y[w]=this.#y[v]}this.#o--,this.#R.push(v)}}if(this.#O&&this.#v?.length){let v=this.#v,E;for(;E=v?.shift();)this.#n?.(...E)}return y}clear(){return this.#V("delete")}#V(g){for(let f of this.#x({allowStale:!0})){let y=this.#i[f];if(this.#g(y))y.__abortController.abort(new Error("deleted"));else{let v=this.#l[f];this.#_&&this.#r?.(y,v,g),this.#O&&this.#v?.push([y,v,g])}}if(this.#a.clear(),this.#i.fill(void 0),this.#l.fill(void 0),this.#w&&this.#b&&(this.#w.fill(0),this.#b.fill(0)),this.#E&&this.#E.fill(0),this.#S=0,this.#f=0,this.#R.length=0,this.#p=0,this.#o=0,this.#O&&this.#v){let f=this.#v,y;for(;y=f?.shift();)this.#n?.(...y)}}};e.LRUCache=d}),Vj=Re((e,t)=>{"use strict";var i=ae((...r)=>r.every(s=>s)?r.join(""):"","maybeJoin"),u=ae(r=>r?encodeURIComponent(r):"","maybeEncode"),n=ae(r=>r.toLowerCase().replace(/^\W+/g,"").replace(/(?<!\W)\W+$/,"").replace(/\//g,"").replace(/\W+/g,"-"),"formatHashFragment"),l={sshtemplate:ae(({domain:r,user:s,project:o,committish:a})=>`git@${r}:${s}/${o}.git${i("#",a)}`,"sshtemplate"),sshurltemplate:ae(({domain:r,user:s,project:o,committish:a})=>`git+ssh://git@${r}/${s}/${o}.git${i("#",a)}`,"sshurltemplate"),edittemplate:ae(({domain:r,user:s,project:o,committish:a,editpath:h,path:p})=>`https://${r}/${s}/${o}${i("/",h,"/",u(a||"HEAD"),"/",p)}`,"edittemplate"),browsetemplate:ae(({domain:r,user:s,project:o,committish:a,treepath:h})=>`https://${r}/${s}/${o}${i("/",h,"/",u(a))}`,"browsetemplate"),browsetreetemplate:ae(({domain:r,user:s,project:o,committish:a,treepath:h,path:p,fragment:d,hashformat:m})=>`https://${r}/${s}/${o}/${h}/${u(a||"HEAD")}/${p}${i("#",m(d||""))}`,"browsetreetemplate"),browseblobtemplate:ae(({domain:r,user:s,project:o,committish:a,blobpath:h,path:p,fragment:d,hashformat:m})=>`https://${r}/${s}/${o}/${h}/${u(a||"HEAD")}/${p}${i("#",m(d||""))}`,"browseblobtemplate"),docstemplate:ae(({domain:r,user:s,project:o,treepath:a,committish:h})=>`https://${r}/${s}/${o}${i("/",a,"/",u(h))}#readme`,"docstemplate"),httpstemplate:ae(({auth:r,domain:s,user:o,project:a,committish:h})=>`git+https://${i(r,"@")}${s}/${o}/${a}.git${i("#",h)}`,"httpstemplate"),filetemplate:ae(({domain:r,user:s,project:o,committish:a,path:h})=>`https://${r}/${s}/${o}/raw/${u(a||"HEAD")}/${h}`,"filetemplate"),shortcuttemplate:ae(({type:r,user:s,project:o,committish:a})=>`${r}:${s}/${o}${i("#",a)}`,"shortcuttemplate"),pathtemplate:ae(({user:r,project:s,committish:o})=>`${r}/${s}${i("#",o)}`,"pathtemplate"),bugstemplate:ae(({domain:r,user:s,project:o})=>`https://${r}/${s}/${o}/issues`,"bugstemplate"),hashformat:n},c={};c.github={protocols:["git:","http:","git+ssh:","git+https:","ssh:","https:"],domain:"github.com",treepath:"tree",blobpath:"blob",editpath:"edit",filetemplate:ae(({auth:r,user:s,project:o,committish:a,path:h})=>`https://${i(r,"@")}raw.githubusercontent.com/${s}/${o}/${u(a||"HEAD")}/${h}`,"filetemplate"),gittemplate:ae(({auth:r,domain:s,user:o,project:a,committish:h})=>`git://${i(r,"@")}${s}/${o}/${a}.git${i("#",h)}`,"gittemplate"),tarballtemplate:ae(({domain:r,user:s,project:o,committish:a})=>`https://codeload.${r}/${s}/${o}/tar.gz/${u(a||"HEAD")}`,"tarballtemplate"),extract:ae(r=>{let[,s,o,a,h]=r.pathname.split("/",5);if(!(a&&a!=="tree")&&(a||(h=r.hash.slice(1)),o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!s||!o)))return{user:s,project:o,committish:h}},"extract")},c.bitbucket={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"bitbucket.org",treepath:"src",blobpath:"src",editpath:"?mode=edit",edittemplate:ae(({domain:r,user:s,project:o,committish:a,treepath:h,path:p,editpath:d})=>`https://${r}/${s}/${o}${i("/",h,"/",u(a||"HEAD"),"/",p,d)}`,"edittemplate"),tarballtemplate:ae(({domain:r,user:s,project:o,committish:a})=>`https://${r}/${s}/${o}/get/${u(a||"HEAD")}.tar.gz`,"tarballtemplate"),extract:ae(r=>{let[,s,o,a]=r.pathname.split("/",4);if(!["get"].includes(a)&&(o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!s||!o)))return{user:s,project:o,committish:r.hash.slice(1)}},"extract")},c.gitlab={protocols:["git+ssh:","git+https:","ssh:","https:"],domain:"gitlab.com",treepath:"tree",blobpath:"tree",editpath:"-/edit",tarballtemplate:ae(({domain:r,user:s,project:o,committish:a})=>`https://${r}/${s}/${o}/repository/archive.tar.gz?ref=${u(a||"HEAD")}`,"tarballtemplate"),extract:ae(r=>{let s=r.pathname.slice(1);if(s.includes("/-/")||s.includes("/archive.tar.gz"))return;let o=s.split("/"),a=o.pop();a.endsWith(".git")&&(a=a.slice(0,-4));let h=o.join("/");if(!(!h||!a))return{user:h,project:a,committish:r.hash.slice(1)}},"extract")},c.gist={protocols:["git:","git+ssh:","git+https:","ssh:","https:"],domain:"gist.github.com",editpath:"edit",sshtemplate:ae(({domain:r,project:s,committish:o})=>`git@${r}:${s}.git${i("#",o)}`,"sshtemplate"),sshurltemplate:ae(({domain:r,project:s,committish:o})=>`git+ssh://git@${r}/${s}.git${i("#",o)}`,"sshurltemplate"),edittemplate:ae(({domain:r,user:s,project:o,committish:a,editpath:h})=>`https://${r}/${s}/${o}${i("/",u(a))}/${h}`,"edittemplate"),browsetemplate:ae(({domain:r,project:s,committish:o})=>`https://${r}/${s}${i("/",u(o))}`,"browsetemplate"),browsetreetemplate:ae(({domain:r,project:s,committish:o,path:a,hashformat:h})=>`https://${r}/${s}${i("/",u(o))}${i("#",h(a))}`,"browsetreetemplate"),browseblobtemplate:ae(({domain:r,project:s,committish:o,path:a,hashformat:h})=>`https://${r}/${s}${i("/",u(o))}${i("#",h(a))}`,"browseblobtemplate"),docstemplate:ae(({domain:r,project:s,committish:o})=>`https://${r}/${s}${i("/",u(o))}`,"docstemplate"),httpstemplate:ae(({domain:r,project:s,committish:o})=>`git+https://${r}/${s}.git${i("#",o)}`,"httpstemplate"),filetemplate:ae(({user:r,project:s,committish:o,path:a})=>`https://gist.githubusercontent.com/${r}/${s}/raw${i("/",u(o))}/${a}`,"filetemplate"),shortcuttemplate:ae(({type:r,project:s,committish:o})=>`${r}:${s}${i("#",o)}`,"shortcuttemplate"),pathtemplate:ae(({project:r,committish:s})=>`${r}${i("#",s)}`,"pathtemplate"),bugstemplate:ae(({domain:r,project:s})=>`https://${r}/${s}`,"bugstemplate"),gittemplate:ae(({domain:r,project:s,committish:o})=>`git://${r}/${s}.git${i("#",o)}`,"gittemplate"),tarballtemplate:ae(({project:r,committish:s})=>`https://codeload.github.com/gist/${r}/tar.gz/${u(s||"HEAD")}`,"tarballtemplate"),extract:ae(r=>{let[,s,o,a]=r.pathname.split("/",4);if(a!=="raw"){if(!o){if(!s)return;o=s,s=null}return o.endsWith(".git")&&(o=o.slice(0,-4)),{user:s,project:o,committish:r.hash.slice(1)}}},"extract"),hashformat:ae(function(r){return r&&"file-"+n(r)},"hashformat")},c.sourcehut={protocols:["git+ssh:","https:"],domain:"git.sr.ht",treepath:"tree",blobpath:"tree",filetemplate:ae(({domain:r,user:s,project:o,committish:a,path:h})=>`https://${r}/${s}/${o}/blob/${u(a)||"HEAD"}/${h}`,"filetemplate"),httpstemplate:ae(({domain:r,user:s,project:o,committish:a})=>`https://${r}/${s}/${o}.git${i("#",a)}`,"httpstemplate"),tarballtemplate:ae(({domain:r,user:s,project:o,committish:a})=>`https://${r}/${s}/${o}/archive/${u(a)||"HEAD"}.tar.gz`,"tarballtemplate"),bugstemplate:ae(()=>null,"bugstemplate"),extract:ae(r=>{let[,s,o,a]=r.pathname.split("/",4);if(!["archive"].includes(a)&&(o&&o.endsWith(".git")&&(o=o.slice(0,-4)),!(!s||!o)))return{user:s,project:o,committish:r.hash.slice(1)}},"extract")};for(let[r,s]of Object.entries(c))c[r]=Object.assign({},l,s);t.exports=c}),Ty=Re((e,t)=>{var i=require("url"),u=ae((r,s,o)=>{let a=r.indexOf(o);return r.lastIndexOf(s,a>-1?a:1/0)},"lastIndexOfBefore"),n=ae(r=>{try{return new i.URL(r)}catch{}},"safeUrl"),l=ae((r,s)=>{let o=r.indexOf(":"),a=r.slice(0,o+1);if(Object.prototype.hasOwnProperty.call(s,a)||r.substr(o,3)==="://")return r;let h=r.indexOf("@");return h>-1?h>o?`git+ssh://${r}`:r:`${r.slice(0,o+1)}//${r.slice(o+1)}`},"correctProtocol"),c=ae(r=>{let s=u(r,"@","#"),o=u(r,":","#");return o>s&&(r=r.slice(0,o)+"/"+r.slice(o+1)),u(r,":","#")===-1&&r.indexOf("//")===-1&&(r=`git+ssh://${r}`),r},"correctUrl");t.exports=(r,s)=>{let o=s?l(r,s):r;return n(o)||n(c(o))}}),Wj=Re((e,t)=>{"use strict";var i=Ty(),u=ae(n=>{let l=n.indexOf("#"),c=n.indexOf("/"),r=n.indexOf("/",c+1),s=n.indexOf(":"),o=/\s/.exec(n),a=n.indexOf("@"),h=!o||l>-1&&o.index>l,p=a===-1||l>-1&&a>l,d=s===-1||l>-1&&s>l,m=r===-1||l>-1&&r>l,g=c>0,f=l>-1?n[l-1]!=="/":!n.endsWith("/"),y=!n.startsWith(".");return h&&g&&f&&y&&p&&d&&m},"isGitHubShorthand");t.exports=(n,l,{gitHosts:c,protocols:r})=>{if(!n)return;let s=u(n)?`github:${n}`:n,o=i(s,r);if(!o)return;let a=c.byShortcut[o.protocol],h=c.byDomain[o.hostname.startsWith("www.")?o.hostname.slice(4):o.hostname],p=a||h;if(!p)return;let d=c[a||h],m=null;r[o.protocol]?.auth&&(o.username||o.password)&&(m=`${o.username}${o.password?":"+o.password:""}`);let g=null,f=null,y=null,v=null;try{if(a){let E=o.pathname.startsWith("/")?o.pathname.slice(1):o.pathname,b=E.indexOf("@");b>-1&&(E=E.slice(b+1));let w=E.lastIndexOf("/");w>-1?(f=decodeURIComponent(E.slice(0,w)),f||(f=null),y=decodeURIComponent(E.slice(w+1))):y=decodeURIComponent(E),y.endsWith(".git")&&(y=y.slice(0,-4)),o.hash&&(g=decodeURIComponent(o.hash.slice(1))),v="shortcut"}else{if(!d.protocols.includes(o.protocol))return;let E=d.extract(o);if(!E)return;f=E.user&&decodeURIComponent(E.user),y=decodeURIComponent(E.project),g=decodeURIComponent(E.committish),v=r[o.protocol]?.name||o.protocol.slice(0,-1)}}catch(E){if(E instanceof URIError)return;throw E}return[p,f,m,y,g,v,l]}}),zj=Re((e,t)=>{"use strict";var{LRUCache:i}=Gj(),u=Vj(),n=Wj(),l=Ty(),c=new i({max:1e3});function r(o){try{let{protocol:a,hostname:h,pathname:p}=new URL(o);if(!h)return null;let d=/(?:git\+)http:$/.test(a)?"http:":"https:",m=p.replace(/\.git$/,"");return`${d}//${h}${m}`}catch{return null}}ae(r,"unknownHostedUrl");var s=class Et{static{ae(this,"GitHost")}constructor(a,h,p,d,m,g,f={}){Object.assign(this,Et.#e[a],{type:a,user:h,auth:p,project:d,committish:m,default:g,opts:f})}static#e={byShortcut:{},byDomain:{}};static#t={"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(a,h){Et.#e[a]=h,Et.#e.byDomain[h.domain]=a,Et.#e.byShortcut[`${a}:`]=a,Et.#t[`${a}:`]={name:a}}static fromUrl(a,h){if(typeof a!="string")return;let p=a+JSON.stringify(h||{});if(!c.has(p)){let d=n(a,h,{gitHosts:Et.#e,protocols:Et.#t});c.set(p,d?new Et(...d):void 0)}return c.get(p)}static fromManifest(a,h={}){if(!a||typeof a!="object")return;let p=a.repository,d=p&&(typeof p=="string"?p:typeof p=="object"&&typeof p.url=="string"?p.url:null);if(!d)throw new Error("no repository");let m=d&&Et.fromUrl(d.replace(/^git\+/,""),h)||null;if(m)return m;let g=r(d);return Et.fromUrl(g,h)||g}static parseUrl(a){return l(a)}#r(a,h){if(typeof a!="function")return null;let p={...this,...this.opts,...h};p.path||(p.path=""),p.path.startsWith("/")&&(p.path=p.path.slice(1)),p.noCommittish&&(p.committish=null);let d=a(p);return p.noGitPlus&&d.startsWith("git+")?d.slice(4):d}hash(){return this.committish?`#${this.committish}`:""}ssh(a){return this.#r(this.sshtemplate,a)}sshurl(a){return this.#r(this.sshurltemplate,a)}browse(a,...h){return typeof a!="string"?this.#r(this.browsetemplate,a):typeof h[0]!="string"?this.#r(this.browsetreetemplate,{...h[0],path:a}):this.#r(this.browsetreetemplate,{...h[1],fragment:h[0],path:a})}browseFile(a,...h){return typeof h[0]!="string"?this.#r(this.browseblobtemplate,{...h[0],path:a}):this.#r(this.browseblobtemplate,{...h[1],fragment:h[0],path:a})}docs(a){return this.#r(this.docstemplate,a)}bugs(a){return this.#r(this.bugstemplate,a)}https(a){return this.#r(this.httpstemplate,a)}git(a){return this.#r(this.gittemplate,a)}shortcut(a){return this.#r(this.shortcuttemplate,a)}path(a){return this.#r(this.pathtemplate,a)}tarball(a){return this.#r(this.tarballtemplate,{...a,noCommittish:!1})}file(a,h){return this.#r(this.filetemplate,{...h,path:a})}edit(a,h){return this.#r(this.edittemplate,{...h,path:a})}getDefaultRepresentation(){return this.default}toString(a){return this.default&&typeof this[this.default]=="function"?this[this.default](a):this.sshurl(a)}};for(let[o,a]of Object.entries(u))s.addHost(o,a);t.exports=s}),xn=Re((e,t)=>{"use strict";var i="2.0.0",u=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,l=250,c=["major","premajor","minor","preminor","patch","prepatch","prerelease"];t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:l,MAX_SAFE_INTEGER:u,RELEASE_TYPES:c,SEMVER_SPEC_VERSION:i,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}),Nn=Re((e,t)=>{"use strict";var i=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...u)=>{}:()=>{};t.exports=i}),js=Re((e,t)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:u,MAX_LENGTH:n}=xn(),l=Nn();e=t.exports={};var c=e.re=[],r=e.safeRe=[],s=e.src=[],o=e.safeSrc=[],a=e.t={},h=0,p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",n],[p,u]],m=ae(f=>{for(let[y,v]of d)f=f.split(`${y}*`).join(`${y}{0,${v}}`).split(`${y}+`).join(`${y}{1,${v}}`);return f},"makeSafeRegex"),g=ae((f,y,v)=>{let E=m(y),b=h++;l(f,b,y),a[f]=b,s[b]=y,o[b]=E,c[b]=new RegExp(y,v?"g":void 0),r[b]=new RegExp(E,v?"g":void 0)},"createToken");g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),g("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${s[a.NONNUMERICIDENTIFIER]}|${s[a.NUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NONNUMERICIDENTIFIER]}|${s[a.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${p}+`),g("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),g("FULL",`^${s[a.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),g("LOOSE",`^${s[a.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE",`${s[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${s[a.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),g("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),g("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),g("COERCEPLAIN",`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),g("COERCE",`${s[a.COERCEPLAIN]}(?:$|[^\\d])`),g("COERCEFULL",s[a.COERCEPLAIN]+`(?:${s[a.PRERELEASE]})?(?:${s[a.BUILD]})?(?:$|[^\\d])`),g("COERCERTL",s[a.COERCE],!0),g("COERCERTLFULL",s[a.COERCEFULL],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",g("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),g("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",g("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}),ru=Re((e,t)=>{"use strict";var i=Object.freeze({loose:!0}),u=Object.freeze({}),n=ae(l=>l?typeof l!="object"?i:l:u,"parseOptions");t.exports=n}),Py=Re((e,t)=>{"use strict";var i=/^[0-9]+$/,u=ae((l,c)=>{let r=i.test(l),s=i.test(c);return r&&s&&(l=+l,c=+c),l===c?0:r&&!s?-1:s&&!r?1:l<c?-1:1},"compareIdentifiers"),n=ae((l,c)=>u(c,l),"rcompareIdentifiers");t.exports={compareIdentifiers:u,rcompareIdentifiers:n}}),Xe=Re((e,t)=>{"use strict";var i=Nn(),{MAX_LENGTH:u,MAX_SAFE_INTEGER:n}=xn(),{safeRe:l,t:c}=js(),r=ru(),{compareIdentifiers:s}=Py(),o=class It{static{ae(this,"SemVer")}constructor(h,p){if(p=r(p),h instanceof It){if(h.loose===!!p.loose&&h.includePrerelease===!!p.includePrerelease)return h;h=h.version}else if(typeof h!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof h}".`);if(h.length>u)throw new TypeError(`version is longer than ${u} characters`);i("SemVer",h,p),this.options=p,this.loose=!!p.loose,this.includePrerelease=!!p.includePrerelease;let d=h.trim().match(p.loose?l[c.LOOSE]:l[c.FULL]);if(!d)throw new TypeError(`Invalid Version: ${h}`);if(this.raw=h,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(m=>{if(/^[0-9]+$/.test(m)){let g=+m;if(g>=0&&g<n)return g}return m}):this.prerelease=[],this.build=d[5]?d[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(h){if(i("SemVer.compare",this.version,this.options,h),!(h instanceof It)){if(typeof h=="string"&&h===this.version)return 0;h=new It(h,this.options)}return h.version===this.version?0:this.compareMain(h)||this.comparePre(h)}compareMain(h){return h instanceof It||(h=new It(h,this.options)),s(this.major,h.major)||s(this.minor,h.minor)||s(this.patch,h.patch)}comparePre(h){if(h instanceof It||(h=new It(h,this.options)),this.prerelease.length&&!h.prerelease.length)return-1;if(!this.prerelease.length&&h.prerelease.length)return 1;if(!this.prerelease.length&&!h.prerelease.length)return 0;let p=0;do{let d=this.prerelease[p],m=h.prerelease[p];if(i("prerelease compare",p,d,m),d===void 0&&m===void 0)return 0;if(m===void 0)return 1;if(d===void 0)return-1;if(d!==m)return s(d,m)}while(++p)}compareBuild(h){h instanceof It||(h=new It(h,this.options));let p=0;do{let d=this.build[p],m=h.build[p];if(i("build compare",p,d,m),d===void 0&&m===void 0)return 0;if(m===void 0)return 1;if(d===void 0)return-1;if(d!==m)return s(d,m)}while(++p)}inc(h,p,d){if(h.startsWith("pre")){if(!p&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(p){let m=`-${p}`.match(this.options.loose?l[c.PRERELEASELOOSE]:l[c.PRERELEASE]);if(!m||m[1]!==p)throw new Error(`invalid identifier: ${p}`)}}switch(h){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",p,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",p,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",p,d),this.inc("pre",p,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",p,d),this.inc("pre",p,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let m=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[m];else{let g=this.prerelease.length;for(;--g>=0;)typeof this.prerelease[g]=="number"&&(this.prerelease[g]++,g=-2);if(g===-1){if(p===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(m)}}if(p){let g=[p,m];d===!1&&(g=[p]),s(this.prerelease[0],p)===0?isNaN(this.prerelease[1])&&(this.prerelease=g):this.prerelease=g}break}default:throw new Error(`invalid increment argument: ${h}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};t.exports=o}),Mr=Re((e,t)=>{"use strict";var i=Xe(),u=ae((n,l,c=!1)=>{if(n instanceof i)return n;try{return new i(n,l)}catch(r){if(!c)return null;throw r}},"parse");t.exports=u}),qj=Re((e,t)=>{"use strict";var i=Mr(),u=ae((n,l)=>{let c=i(n,l);return c?c.version:null},"valid");t.exports=u}),Kj=Re((e,t)=>{"use strict";var i=Mr(),u=ae((n,l)=>{let c=i(n.trim().replace(/^[=v]+/,""),l);return c?c.version:null},"clean");t.exports=u}),Jj=Re((e,t)=>{"use strict";var i=Xe(),u=ae((n,l,c,r,s)=>{typeof c=="string"&&(s=r,r=c,c=void 0);try{return new i(n instanceof i?n.version:n,c).inc(l,r,s).version}catch{return null}},"inc");t.exports=u}),Xj=Re((e,t)=>{"use strict";var i=Mr(),u=ae((n,l)=>{let c=i(n,null,!0),r=i(l,null,!0),s=c.compare(r);if(s===0)return null;let o=s>0,a=o?c:r,h=o?r:c,p=!!a.prerelease.length;if(h.prerelease.length&&!p){if(!h.patch&&!h.minor)return"major";if(h.compareMain(a)===0)return h.minor&&!h.patch?"minor":"patch"}let d=p?"pre":"";return c.major!==r.major?d+"major":c.minor!==r.minor?d+"minor":c.patch!==r.patch?d+"patch":"prerelease"},"diff");t.exports=u}),Zj=Re((e,t)=>{"use strict";var i=Xe(),u=ae((n,l)=>new i(n,l).major,"major");t.exports=u}),Yj=Re((e,t)=>{"use strict";var i=Xe(),u=ae((n,l)=>new i(n,l).minor,"minor");t.exports=u}),Qj=Re((e,t)=>{"use strict";var i=Xe(),u=ae((n,l)=>new i(n,l).patch,"patch");t.exports=u}),eM=Re((e,t)=>{"use strict";var i=Mr(),u=ae((n,l)=>{let c=i(n,l);return c&&c.prerelease.length?c.prerelease:null},"prerelease");t.exports=u}),bt=Re((e,t)=>{"use strict";var i=Xe(),u=ae((n,l,c)=>new i(n,c).compare(new i(l,c)),"compare");t.exports=u}),tM=Re((e,t)=>{"use strict";var i=bt(),u=ae((n,l,c)=>i(l,n,c),"rcompare");t.exports=u}),rM=Re((e,t)=>{"use strict";var i=bt(),u=ae((n,l)=>i(n,l,!0),"compareLoose");t.exports=u}),su=Re((e,t)=>{"use strict";var i=Xe(),u=ae((n,l,c)=>{let r=new i(n,c),s=new i(l,c);return r.compare(s)||r.compareBuild(s)},"compareBuild");t.exports=u}),sM=Re((e,t)=>{"use strict";var i=su(),u=ae((n,l)=>n.sort((c,r)=>i(c,r,l)),"sort");t.exports=u}),iM=Re((e,t)=>{"use strict";var i=su(),u=ae((n,l)=>n.sort((c,r)=>i(r,c,l)),"rsort");t.exports=u}),kn=Re((e,t)=>{"use strict";var i=bt(),u=ae((n,l,c)=>i(n,l,c)>0,"gt");t.exports=u}),iu=Re((e,t)=>{"use strict";var i=bt(),u=ae((n,l,c)=>i(n,l,c)<0,"lt");t.exports=u}),xy=Re((e,t)=>{"use strict";var i=bt(),u=ae((n,l,c)=>i(n,l,c)===0,"eq");t.exports=u}),Ny=Re((e,t)=>{"use strict";var i=bt(),u=ae((n,l,c)=>i(n,l,c)!==0,"neq");t.exports=u}),nu=Re((e,t)=>{"use strict";var i=bt(),u=ae((n,l,c)=>i(n,l,c)>=0,"gte");t.exports=u}),ou=Re((e,t)=>{"use strict";var i=bt(),u=ae((n,l,c)=>i(n,l,c)<=0,"lte");t.exports=u}),ky=Re((e,t)=>{"use strict";var i=xy(),u=Ny(),n=kn(),l=nu(),c=iu(),r=ou(),s=ae((o,a,h,p)=>{switch(a){case"===":return typeof o=="object"&&(o=o.version),typeof h=="object"&&(h=h.version),o===h;case"!==":return typeof o=="object"&&(o=o.version),typeof h=="object"&&(h=h.version),o!==h;case"":case"=":case"==":return i(o,h,p);case"!=":return u(o,h,p);case">":return n(o,h,p);case">=":return l(o,h,p);case"<":return c(o,h,p);case"<=":return r(o,h,p);default:throw new TypeError(`Invalid operator: ${a}`)}},"cmp");t.exports=s}),nM=Re((e,t)=>{"use strict";var i=Xe(),u=Mr(),{safeRe:n,t:l}=js(),c=ae((r,s)=>{if(r instanceof i)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;s=s||{};let o=null;if(!s.rtl)o=r.match(s.includePrerelease?n[l.COERCEFULL]:n[l.COERCE]);else{let g=s.includePrerelease?n[l.COERCERTLFULL]:n[l.COERCERTL],f;for(;(f=g.exec(r))&&(!o||o.index+o[0].length!==r.length);)(!o||f.index+f[0].length!==o.index+o[0].length)&&(o=f),g.lastIndex=f.index+f[1].length+f[2].length;g.lastIndex=-1}if(o===null)return null;let a=o[2],h=o[3]||"0",p=o[4]||"0",d=s.includePrerelease&&o[5]?`-${o[5]}`:"",m=s.includePrerelease&&o[6]?`+${o[6]}`:"";return u(`${a}.${h}.${p}${d}${m}`,s)},"coerce");t.exports=c}),oM=Re((e,t)=>{"use strict";var i=class{static{ae(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(u){let n=this.map.get(u);if(n!==void 0)return this.map.delete(u),this.map.set(u,n),n}delete(u){return this.map.delete(u)}set(u,n){if(!this.delete(u)&&n!==void 0){if(this.map.size>=this.max){let l=this.map.keys().next().value;this.delete(l)}this.map.set(u,n)}return this}};t.exports=i}),wt=Re((e,t)=>{"use strict";var i=/\s+/g,u=class Tn{static{ae(this,"Range")}constructor(D,H){if(H=c(H),D instanceof Tn)return D.loose===!!H.loose&&D.includePrerelease===!!H.includePrerelease?D:new Tn(D.raw,H);if(D instanceof r)return this.raw=D.value,this.set=[[D]],this.formatted=void 0,this;if(this.options=H,this.loose=!!H.loose,this.includePrerelease=!!H.includePrerelease,this.raw=D.trim().replace(i," "),this.set=this.raw.split("||").map(G=>this.parseRange(G.trim())).filter(G=>G.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let G=this.set[0];if(this.set=this.set.filter(x=>!y(x[0])),this.set.length===0)this.set=[G];else if(this.set.length>1){for(let x of this.set)if(x.length===1&&v(x[0])){this.set=[x];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let D=0;D<this.set.length;D++){D>0&&(this.formatted+="||");let H=this.set[D];for(let G=0;G<H.length;G++)G>0&&(this.formatted+=" "),this.formatted+=H[G].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(D){let H=((this.options.includePrerelease&&g)|(this.options.loose&&f))+":"+D,G=l.get(H);if(G)return G;let x=this.options.loose,k=x?a[h.HYPHENRANGELOOSE]:a[h.HYPHENRANGE];D=D.replace(k,M(this.options.includePrerelease)),s("hyphen replace",D),D=D.replace(a[h.COMPARATORTRIM],p),s("comparator trim",D),D=D.replace(a[h.TILDETRIM],d),s("tilde trim",D),D=D.replace(a[h.CARETTRIM],m),s("caret trim",D);let T=D.split(" ").map(Y=>b(Y,this.options)).join(" ").split(/\s+/).map(Y=>N(Y,this.options));x&&(T=T.filter(Y=>(s("loose invalid filter",Y,this.options),!!Y.match(a[h.COMPARATORLOOSE])))),s("range list",T);let C=new Map,q=T.map(Y=>new r(Y,this.options));for(let Y of q){if(y(Y))return[Y];C.set(Y.value,Y)}C.size>1&&C.has("")&&C.delete("");let X=[...C.values()];return l.set(H,X),X}intersects(D,H){if(!(D instanceof Tn))throw new TypeError("a Range is required");return this.set.some(G=>E(G,H)&&D.set.some(x=>E(x,H)&&G.every(k=>x.every(T=>k.intersects(T,H)))))}test(D){if(!D)return!1;if(typeof D=="string")try{D=new o(D,this.options)}catch{return!1}for(let H=0;H<this.set.length;H++)if(B(this.set[H],D,this.options))return!0;return!1}};t.exports=u;var n=oM(),l=new n,c=ru(),r=Ln(),s=Nn(),o=Xe(),{safeRe:a,t:h,comparatorTrimReplace:p,tildeTrimReplace:d,caretTrimReplace:m}=js(),{FLAG_INCLUDE_PRERELEASE:g,FLAG_LOOSE:f}=xn(),y=ae(F=>F.value==="<0.0.0-0","isNullSet"),v=ae(F=>F.value==="","isAny"),E=ae((F,D)=>{let H=!0,G=F.slice(),x=G.pop();for(;H&&G.length;)H=G.every(k=>x.intersects(k,D)),x=G.pop();return H},"isSatisfiable"),b=ae((F,D)=>(s("comp",F,D),F=A(F,D),s("caret",F),F=_(F,D),s("tildes",F),F=P(F,D),s("xrange",F),F=j(F,D),s("stars",F),F),"parseComparator"),w=ae(F=>!F||F.toLowerCase()==="x"||F==="*","isX"),_=ae((F,D)=>F.trim().split(/\s+/).map(H=>O(H,D)).join(" "),"replaceTildes"),O=ae((F,D)=>{let H=D.loose?a[h.TILDELOOSE]:a[h.TILDE];return F.replace(H,(G,x,k,T,C)=>{s("tilde",F,G,x,k,T,C);let q;return w(x)?q="":w(k)?q=`>=${x}.0.0 <${+x+1}.0.0-0`:w(T)?q=`>=${x}.${k}.0 <${x}.${+k+1}.0-0`:C?(s("replaceTilde pr",C),q=`>=${x}.${k}.${T}-${C} <${x}.${+k+1}.0-0`):q=`>=${x}.${k}.${T} <${x}.${+k+1}.0-0`,s("tilde return",q),q})},"replaceTilde"),A=ae((F,D)=>F.trim().split(/\s+/).map(H=>I(H,D)).join(" "),"replaceCarets"),I=ae((F,D)=>{s("caret",F,D);let H=D.loose?a[h.CARETLOOSE]:a[h.CARET],G=D.includePrerelease?"-0":"";return F.replace(H,(x,k,T,C,q)=>{s("caret",F,x,k,T,C,q);let X;return w(k)?X="":w(T)?X=`>=${k}.0.0${G} <${+k+1}.0.0-0`:w(C)?k==="0"?X=`>=${k}.${T}.0${G} <${k}.${+T+1}.0-0`:X=`>=${k}.${T}.0${G} <${+k+1}.0.0-0`:q?(s("replaceCaret pr",q),k==="0"?T==="0"?X=`>=${k}.${T}.${C}-${q} <${k}.${T}.${+C+1}-0`:X=`>=${k}.${T}.${C}-${q} <${k}.${+T+1}.0-0`:X=`>=${k}.${T}.${C}-${q} <${+k+1}.0.0-0`):(s("no pr"),k==="0"?T==="0"?X=`>=${k}.${T}.${C}${G} <${k}.${T}.${+C+1}-0`:X=`>=${k}.${T}.${C}${G} <${k}.${+T+1}.0-0`:X=`>=${k}.${T}.${C} <${+k+1}.0.0-0`),s("caret return",X),X})},"replaceCaret"),P=ae((F,D)=>(s("replaceXRanges",F,D),F.split(/\s+/).map(H=>L(H,D)).join(" ")),"replaceXRanges"),L=ae((F,D)=>{F=F.trim();let H=D.loose?a[h.XRANGELOOSE]:a[h.XRANGE];return F.replace(H,(G,x,k,T,C,q)=>{s("xRange",F,G,x,k,T,C,q);let X=w(k),Y=X||w(T),$=Y||w(C),V=$;return x==="="&&V&&(x=""),q=D.includePrerelease?"-0":"",X?x===">"||x==="<"?G="<0.0.0-0":G="*":x&&V?(Y&&(T=0),C=0,x===">"?(x=">=",Y?(k=+k+1,T=0,C=0):(T=+T+1,C=0)):x==="<="&&(x="<",Y?k=+k+1:T=+T+1),x==="<"&&(q="-0"),G=`${x+k}.${T}.${C}${q}`):Y?G=`>=${k}.0.0${q} <${+k+1}.0.0-0`:$&&(G=`>=${k}.${T}.0${q} <${k}.${+T+1}.0-0`),s("xRange return",G),G})},"replaceXRange"),j=ae((F,D)=>(s("replaceStars",F,D),F.trim().replace(a[h.STAR],"")),"replaceStars"),N=ae((F,D)=>(s("replaceGTE0",F,D),F.trim().replace(a[D.includePrerelease?h.GTE0PRE:h.GTE0],"")),"replaceGTE0"),M=ae(F=>(D,H,G,x,k,T,C,q,X,Y,$,V)=>(w(G)?H="":w(x)?H=`>=${G}.0.0${F?"-0":""}`:w(k)?H=`>=${G}.${x}.0${F?"-0":""}`:T?H=`>=${H}`:H=`>=${H}${F?"-0":""}`,w(X)?q="":w(Y)?q=`<${+X+1}.0.0-0`:w($)?q=`<${X}.${+Y+1}.0-0`:V?q=`<=${X}.${Y}.${$}-${V}`:F?q=`<${X}.${Y}.${+$+1}-0`:q=`<=${q}`,`${H} ${q}`.trim()),"hyphenReplace"),B=ae((F,D,H)=>{for(let G=0;G<F.length;G++)if(!F[G].test(D))return!1;if(D.prerelease.length&&!H.includePrerelease){for(let G=0;G<F.length;G++)if(s(F[G].semver),F[G].semver!==r.ANY&&F[G].semver.prerelease.length>0){let x=F[G].semver;if(x.major===D.major&&x.minor===D.minor&&x.patch===D.patch)return!0}return!1}return!0},"testSet")}),Ln=Re((e,t)=>{"use strict";var i=Symbol("SemVer ANY"),u=class Yc{static{ae(this,"Comparator")}static get ANY(){return i}constructor(p,d){if(d=n(d),p instanceof Yc){if(p.loose===!!d.loose)return p;p=p.value}p=p.trim().split(/\s+/).join(" "),s("comparator",p,d),this.options=d,this.loose=!!d.loose,this.parse(p),this.semver===i?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(p){let d=this.options.loose?l[c.COMPARATORLOOSE]:l[c.COMPARATOR],m=p.match(d);if(!m)throw new TypeError(`Invalid comparator: ${p}`);this.operator=m[1]!==void 0?m[1]:"",this.operator==="="&&(this.operator=""),m[2]?this.semver=new o(m[2],this.options.loose):this.semver=i}toString(){return this.value}test(p){if(s("Comparator.test",p,this.options.loose),this.semver===i||p===i)return!0;if(typeof p=="string")try{p=new o(p,this.options)}catch{return!1}return r(p,this.operator,this.semver,this.options)}intersects(p,d){if(!(p instanceof Yc))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new a(p.value,d).test(this.value):p.operator===""?p.value===""?!0:new a(this.value,d).test(p.semver):(d=n(d),d.includePrerelease&&(this.value==="<0.0.0-0"||p.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||p.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&p.operator.startsWith(">")||this.operator.startsWith("<")&&p.operator.startsWith("<")||this.semver.version===p.semver.version&&this.operator.includes("=")&&p.operator.includes("=")||r(this.semver,"<",p.semver,d)&&this.operator.startsWith(">")&&p.operator.startsWith("<")||r(this.semver,">",p.semver,d)&&this.operator.startsWith("<")&&p.operator.startsWith(">")))}};t.exports=u;var n=ru(),{safeRe:l,t:c}=js(),r=ky(),s=Nn(),o=Xe(),a=wt()}),Dn=Re((e,t)=>{"use strict";var i=wt(),u=ae((n,l,c)=>{try{l=new i(l,c)}catch{return!1}return l.test(n)},"satisfies");t.exports=u}),aM=Re((e,t)=>{"use strict";var i=wt(),u=ae((n,l)=>new i(n,l).set.map(c=>c.map(r=>r.value).join(" ").trim().split(" ")),"toComparators");t.exports=u}),lM=Re((e,t)=>{"use strict";var i=Xe(),u=wt(),n=ae((l,c,r)=>{let s=null,o=null,a=null;try{a=new u(c,r)}catch{return null}return l.forEach(h=>{a.test(h)&&(!s||o.compare(h)===-1)&&(s=h,o=new i(s,r))}),s},"maxSatisfying");t.exports=n}),cM=Re((e,t)=>{"use strict";var i=Xe(),u=wt(),n=ae((l,c,r)=>{let s=null,o=null,a=null;try{a=new u(c,r)}catch{return null}return l.forEach(h=>{a.test(h)&&(!s||o.compare(h)===1)&&(s=h,o=new i(s,r))}),s},"minSatisfying");t.exports=n}),uM=Re((e,t)=>{"use strict";var i=Xe(),u=wt(),n=kn(),l=ae((c,r)=>{c=new u(c,r);let s=new i("0.0.0");if(c.test(s)||(s=new i("0.0.0-0"),c.test(s)))return s;s=null;for(let o=0;o<c.set.length;++o){let a=c.set[o],h=null;a.forEach(p=>{let d=new i(p.semver.version);switch(p.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!h||n(d,h))&&(h=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${p.operator}`)}}),h&&(!s||n(s,h))&&(s=h)}return s&&c.test(s)?s:null},"minVersion");t.exports=l}),hM=Re((e,t)=>{"use strict";var i=wt(),u=ae((n,l)=>{try{return new i(n,l).range||"*"}catch{return null}},"validRange");t.exports=u}),au=Re((e,t)=>{"use strict";var i=Xe(),u=Ln(),{ANY:n}=u,l=wt(),c=Dn(),r=kn(),s=iu(),o=ou(),a=nu(),h=ae((p,d,m,g)=>{p=new i(p,g),d=new l(d,g);let f,y,v,E,b;switch(m){case">":f=r,y=o,v=s,E=">",b=">=";break;case"<":f=s,y=a,v=r,E="<",b="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(c(p,d,g))return!1;for(let w=0;w<d.set.length;++w){let _=d.set[w],O=null,A=null;if(_.forEach(I=>{I.semver===n&&(I=new u(">=0.0.0")),O=O||I,A=A||I,f(I.semver,O.semver,g)?O=I:v(I.semver,A.semver,g)&&(A=I)}),O.operator===E||O.operator===b||(!A.operator||A.operator===E)&&y(p,A.semver)||A.operator===b&&v(p,A.semver))return!1}return!0},"outside");t.exports=h}),pM=Re((e,t)=>{"use strict";var i=au(),u=ae((n,l,c)=>i(n,l,">",c),"gtr");t.exports=u}),dM=Re((e,t)=>{"use strict";var i=au(),u=ae((n,l,c)=>i(n,l,"<",c),"ltr");t.exports=u}),fM=Re((e,t)=>{"use strict";var i=wt(),u=ae((n,l,c)=>(n=new i(n,c),l=new i(l,c),n.intersects(l,c)),"intersects");t.exports=u}),gM=Re((e,t)=>{"use strict";var i=Dn(),u=bt();t.exports=(n,l,c)=>{let r=[],s=null,o=null,a=n.sort((m,g)=>u(m,g,c));for(let m of a)i(m,l,c)?(o=m,s||(s=m)):(o&&r.push([s,o]),o=null,s=null);s&&r.push([s,null]);let h=[];for(let[m,g]of r)m===g?h.push(m):!g&&m===a[0]?h.push("*"):g?m===a[0]?h.push(`<=${g}`):h.push(`${m} - ${g}`):h.push(`>=${m}`);let p=h.join(" || "),d=typeof l.raw=="string"?l.raw:String(l);return p.length<d.length?p:l}}),mM=Re((e,t)=>{"use strict";var i=wt(),u=Ln(),{ANY:n}=u,l=Dn(),c=bt(),r=ae((d,m,g={})=>{if(d===m)return!0;d=new i(d,g),m=new i(m,g);let f=!1;e:for(let y of d.set){for(let v of m.set){let E=a(y,v,g);if(f=f||E!==null,E)continue e}if(f)return!1}return!0},"subset"),s=[new u(">=0.0.0-0")],o=[new u(">=0.0.0")],a=ae((d,m,g)=>{if(d===m)return!0;if(d.length===1&&d[0].semver===n){if(m.length===1&&m[0].semver===n)return!0;g.includePrerelease?d=s:d=o}if(m.length===1&&m[0].semver===n){if(g.includePrerelease)return!0;m=o}let f=new Set,y,v;for(let P of d)P.operator===">"||P.operator===">="?y=h(y,P,g):P.operator==="<"||P.operator==="<="?v=p(v,P,g):f.add(P.semver);if(f.size>1)return null;let E;if(y&&v&&(E=c(y.semver,v.semver,g),E>0||E===0&&(y.operator!==">="||v.operator!=="<=")))return null;for(let P of f){if(y&&!l(P,String(y),g)||v&&!l(P,String(v),g))return null;for(let L of m)if(!l(P,String(L),g))return!1;return!0}let b,w,_,O,A=v&&!g.includePrerelease&&v.semver.prerelease.length?v.semver:!1,I=y&&!g.includePrerelease&&y.semver.prerelease.length?y.semver:!1;A&&A.prerelease.length===1&&v.operator==="<"&&A.prerelease[0]===0&&(A=!1);for(let P of m){if(O=O||P.operator===">"||P.operator===">=",_=_||P.operator==="<"||P.operator==="<=",y){if(I&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===I.major&&P.semver.minor===I.minor&&P.semver.patch===I.patch&&(I=!1),P.operator===">"||P.operator===">="){if(b=h(y,P,g),b===P&&b!==y)return!1}else if(y.operator===">="&&!l(y.semver,String(P),g))return!1}if(v){if(A&&P.semver.prerelease&&P.semver.prerelease.length&&P.semver.major===A.major&&P.semver.minor===A.minor&&P.semver.patch===A.patch&&(A=!1),P.operator==="<"||P.operator==="<="){if(w=p(v,P,g),w===P&&w!==v)return!1}else if(v.operator==="<="&&!l(v.semver,String(P),g))return!1}if(!P.operator&&(v||y)&&E!==0)return!1}return!(y&&_&&!v&&E!==0||v&&O&&!y&&E!==0||I||A)},"simpleSubset"),h=ae((d,m,g)=>{if(!d)return m;let f=c(d.semver,m.semver,g);return f>0?d:f<0||m.operator===">"&&d.operator===">="?m:d},"higherGT"),p=ae((d,m,g)=>{if(!d)return m;let f=c(d.semver,m.semver,g);return f<0?d:f>0||m.operator==="<"&&d.operator==="<="?m:d},"lowerLT");t.exports=r}),yM=Re((e,t)=>{"use strict";var i=js(),u=xn(),n=Xe(),l=Py(),c=Mr(),r=qj(),s=Kj(),o=Jj(),a=Xj(),h=Zj(),p=Yj(),d=Qj(),m=eM(),g=bt(),f=tM(),y=rM(),v=su(),E=sM(),b=iM(),w=kn(),_=iu(),O=xy(),A=Ny(),I=nu(),P=ou(),L=ky(),j=nM(),N=Ln(),M=wt(),B=Dn(),F=aM(),D=lM(),H=cM(),G=uM(),x=hM(),k=au(),T=pM(),C=dM(),q=fM(),X=gM(),Y=mM();t.exports={parse:c,valid:r,clean:s,inc:o,diff:a,major:h,minor:p,patch:d,prerelease:m,compare:g,rcompare:f,compareLoose:y,compareBuild:v,sort:E,rsort:b,gt:w,lt:_,eq:O,neq:A,gte:I,lte:P,cmp:L,coerce:j,Comparator:N,Range:M,satisfies:B,toComparators:F,maxSatisfying:D,minSatisfying:H,minVersion:G,validRange:x,outside:k,gtr:T,ltr:C,intersects:q,simplifyRange:X,subset:Y,SemVer:n,re:i.re,src:i.src,tokens:i.t,SEMVER_SPEC_VERSION:u.SEMVER_SPEC_VERSION,RELEASE_TYPES:u.RELEASE_TYPES,compareIdentifiers:l.compareIdentifiers,rcompareIdentifiers:l.rcompareIdentifiers}}),vM=Re((e,t)=>{"use strict";var{builtinModules:i}=require("module"),u=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),n=["node_modules","favicon.ico"];function l(r){var s=[],o=[];if(r===null)return o.push("name cannot be null"),c(s,o);if(r===void 0)return o.push("name cannot be undefined"),c(s,o);if(typeof r!="string")return o.push("name must be a string"),c(s,o);if(r.length||o.push("name length must be greater than zero"),r.startsWith(".")&&o.push("name cannot start with a period"),r.match(/^_/)&&o.push("name cannot start with an underscore"),r.trim()!==r&&o.push("name cannot contain leading or trailing spaces"),n.forEach(function(d){r.toLowerCase()===d&&o.push(d+" is not a valid package name")}),i.includes(r.toLowerCase())&&s.push(r+" is a core module name"),r.length>214&&s.push("name can no longer contain more than 214 characters"),r.toLowerCase()!==r&&s.push("name can no longer contain capital letters"),/[~'!()*]/.test(r.split("/").slice(-1)[0])&&s.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(r)!==r){var a=r.match(u);if(a){var h=a[1],p=a[2];if(p.startsWith(".")&&o.push("name cannot start with a period"),encodeURIComponent(h)===h&&encodeURIComponent(p)===p)return c(s,o)}o.push("name can only contain URL-friendly characters")}return c(s,o)}ae(l,"validate");var c=ae(function(r,s){var o={validForNewPackages:s.length===0&&r.length===0,validForOldPackages:s.length===0,warnings:r,errors:s};return o.warnings.length||delete o.warnings,o.errors.length||delete o.errors,o},"done");t.exports=l}),SM=Re((e,t)=>{var i=Symbol("proc-log.meta");t.exports={META:i,output:{LEVELS:["standard","error","buffer","flush"],KEYS:{standard:"standard",error:"error",buffer:"buffer",flush:"flush"},standard:ae(function(...u){return process.emit("output","standard",...u)},"standard"),error:ae(function(...u){return process.emit("output","error",...u)},"error"),buffer:ae(function(...u){return process.emit("output","buffer",...u)},"buffer"),flush:ae(function(...u){return process.emit("output","flush",...u)},"flush")},log:{LEVELS:["notice","error","warn","info","verbose","http","silly","timing","pause","resume"],KEYS:{notice:"notice",error:"error",warn:"warn",info:"info",verbose:"verbose",http:"http",silly:"silly",timing:"timing",pause:"pause",resume:"resume"},error:ae(function(...u){return process.emit("log","error",...u)},"error"),notice:ae(function(...u){return process.emit("log","notice",...u)},"notice"),warn:ae(function(...u){return process.emit("log","warn",...u)},"warn"),info:ae(function(...u){return process.emit("log","info",...u)},"info"),verbose:ae(function(...u){return process.emit("log","verbose",...u)},"verbose"),http:ae(function(...u){return process.emit("log","http",...u)},"http"),silly:ae(function(...u){return process.emit("log","silly",...u)},"silly"),timing:ae(function(...u){return process.emit("log","timing",...u)},"timing"),pause:ae(function(){return process.emit("log","pause")},"pause"),resume:ae(function(){return process.emit("log","resume")},"resume")},time:{LEVELS:["start","end"],KEYS:{start:"start",end:"end"},start:ae(function(u,n){process.emit("time","start",u);function l(){return process.emit("time","end",u)}if(ae(l,"end"),typeof n=="function"){let c=n();return c&&c.finally?c.finally(l):(l(),c)}return l},"start"),end:ae(function(u){return process.emit("time","end",u)},"end")},input:{LEVELS:["start","end","read"],KEYS:{start:"start",end:"end",read:"read"},start:ae(function(u){process.emit("input","start");function n(){return process.emit("input","end")}if(ae(n,"end"),typeof u=="function"){let l=u();return l&&l.finally?l.finally(n):(n(),l)}return n},"start"),end:ae(function(){return process.emit("input","end")},"end"),read:ae(function(...u){let n,l,c=new Promise((r,s)=>{n=r,l=s});return process.emit("input","read",n,l,...u),c},"read")}}}),Ms=process.platform==="win32",{URL:Qc}=require("url"),$r=Ms?require("path"):require("path"),{homedir:EM}=require("os"),bM=zj(),Ay=yM(),Ly=vM(),{log:wM}=SM(),Dy=Ms?/\\|[/]/:/[/]/,$y=/^(?:git[+])?[a-z]+:/i,_M=/^[^@]+@[^:.]+\.[^:]+:.+$/i,lu=/[.](?:tgz|tar.gz|tar)$/i,OM=/:[0-9]+(\/|$)/i,RM=/^(?:[.]|~[/]|[/\\]|[a-zA-Z]:)/,AM=/^(?:[.]|~[/]|[/]|[a-zA-Z]:)/,Cy="https://registry.npmjs.org";function jr(e,t){let i,u;if(typeof e=="object")return e instanceof uu&&(!t||t===e.where)?e:e.name&&e.rawSpec?jr.resolve(e.name,e.rawSpec,t||e.where):jr(e.raw,t||e.where);let n=e.indexOf("@",1),l=n>0?e.slice(0,n):e;return $y.test(e)?u=e:_M.test(e)?u=`git+ssh://${e}`:!l.startsWith("@")&&(Dy.test(l)||lu.test(l))?u=e:n>0?(i=l,u=e.slice(n+1)||"*"):Ly(e).validForOldPackages?(i=e,u="*"):u=e,cu(i,u,t,e)}ae(jr,"npa");function jy(e){return e?e.toLowerCase().startsWith("file:")?!0:Ms?RM.test(e):AM.test(e):!1}ae(jy,"isFileSpec");function My(e){return e?e.toLowerCase().startsWith("npm:"):!1}ae(My,"isAliasSpec");function cu(e,t,i,u){let n=new uu({raw:u,name:e,rawSpec:t,fromArgument:u!=null});if(e&&(n.name=e),i||(i=process.cwd()),jy(t))return tu(n,i);if(My(t))return zy(n,i);let l=bM.fromUrl(t,{noGitPlus:!0,noCommittish:!0});return l?Gy(n,l):t&&$y.test(t)?Wy(n):t&&(Dy.test(t)||lu.test(t))?tu(n,i):qy(n)}ae(cu,"resolve");function By(e,t=Cy){let i=jr(e);if(i.type!=="version")throw Hy(i.type,i.raw);let u="pkg:npm/"+i.name.replace(/^@/,"%40")+"@"+i.rawSpec;return t!==Cy&&(u+="?repository_url="+t),u}ae(By,"toPurl");function Uy(e,t,i){let u=new Error(`Invalid package name "${e}" of package "${i}": ${t.errors.join("; ")}.`);return u.code="EINVALIDPACKAGENAME",u}ae(Uy,"invalidPackageName");function Fy(e,t){let i=new Error(`Invalid tag name "${e}" of package "${t}": Tags may not have any characters that encodeURIComponent encodes.`);return i.code="EINVALIDTAGNAME",i}ae(Fy,"invalidTagName");function Hy(e,t){let i=new Error(`Invalid type "${e}" of package "${t}": Purl can only be generated for "version" types.`);return i.code="EINVALIDPURLTYPE",i}ae(Hy,"invalidPurlType");var uu=class{static{ae(this,"Result")}constructor(e){this.type=e.type,this.registry=e.registry,this.where=e.where,e.raw==null?this.raw=e.name?`${e.name}@${e.rawSpec}`:e.rawSpec:this.raw=e.raw,this.name=void 0,this.escapedName=void 0,this.scope=void 0,this.rawSpec=e.rawSpec||"",this.saveSpec=e.saveSpec,this.fetchSpec=e.fetchSpec,e.name&&this.setName(e.name),this.gitRange=e.gitRange,this.gitCommittish=e.gitCommittish,this.gitSubdir=e.gitSubdir,this.hosted=e.hosted}setName(e){let t=Ly(e);if(!t.validForOldPackages)throw Uy(e,t,this.raw);return this.name=e,this.scope=e[0]==="@"?e.slice(0,e.indexOf("/")):void 0,this.escapedName=e.replace("/","%2f"),this}toString(){let e=[];this.name!=null&&this.name!==""&&e.push(this.name);let t=this.saveSpec||this.fetchSpec||this.rawSpec;return t!=null&&t!==""&&e.push(t),e.length?e.join("@"):this.raw}toJSON(){let e=Object.assign({},this);return delete e.hosted,e}};function Pn(e,t){if(!t){e.gitCommittish=null;return}for(let i of t.split("::")){if(!i.includes(":")){if(e.gitRange)throw new Error("cannot override existing semver range with a committish");if(e.gitCommittish)throw new Error("cannot override existing committish with a second committish");e.gitCommittish=i;continue}let[u,n]=i.split(":");if(u==="semver"){if(e.gitCommittish)throw new Error("cannot override existing committish with a semver range");if(e.gitRange)throw new Error("cannot override existing semver range with a second semver range");e.gitRange=decodeURIComponent(n);continue}if(u==="path"){if(e.gitSubdir)throw new Error("cannot override existing path with a second path");e.gitSubdir=`/${n}`;continue}wM.warn("npm-package-arg",`ignoring unknown key "${u}"`)}}ae(Pn,"setGitAttrs");var CM=new Map([["\0","%00"],[" ","%09"],[`
104
- `,"%0A"],["\r","%0D"],[" ","%20"],['"',"%22"],["#","%23"],["%","%25"],["?","%3F"],["[","%5B"],["\\",Ms?"/":"%5C"],["]","%5D"],["^","%5E"],["|","%7C"],["~","%7E"]]);function eu(e){let t="";for(let i=0;i<e.length;i++)t=`${t}${CM.get(e[i])??e[i]}`;return t.startsWith("file:")?t:`file:${t}`}ae(eu,"pathToFileURL");function tu(e,t){e.type=lu.test(e.rawSpec)?"file":"directory",e.where=t;let i=eu(e.rawSpec);i.startsWith("file:/")&&(/^file:\/\/[^/]/.test(i)&&(i=`file:/${i.slice(5)}`),/^\/{1,3}\.\.?(\/|$)/.test(i.slice(5))&&(i=i.replace(/^file:\/{1,3}/,"file:")));let u,n;try{u=new Qc(i,`${eu($r.resolve(t))}/`),n=new Qc(i)}catch(r){let s=new Error("Invalid file: URL, must comply with RFC 8089");throw Object.assign(s,{raw:e.rawSpec,spec:e,where:t,originalError:r})}let l=decodeURIComponent(n.pathname),c=decodeURIComponent(u.pathname);return Ms&&(l=l.replace(/^\/+([a-z]:\/)/i,"$1"),c=c.replace(/^\/+([a-z]:\/)/i,"$1")),/^\/~(\/|$)/.test(l)?(e.saveSpec=`file:${l.substr(1)}`,c=$r.resolve(EM(),l.substr(3))):$r.isAbsolute(i.slice(5))?e.saveSpec=`file:${$r.resolve(c)}`:e.saveSpec=`file:${$r.relative(t,c)}`,e.fetchSpec=$r.resolve(t,c),e.saveSpec=e.saveSpec.split("\\").join("/"),e.saveSpec.startsWith("file://")&&(e.saveSpec=`file:/${e.saveSpec.slice(7)}`),e}ae(tu,"fromFile");function Gy(e,t){return e.type="git",e.hosted=t,e.saveSpec=t.toString({noGitPlus:!1,noCommittish:!1}),e.fetchSpec=t.getDefaultRepresentation()==="shortcut"?null:t.toString(),Pn(e,t.committish),e}ae(Gy,"fromHostedGit");function Vy(e,t){let i=new Error(`Unsupported URL Type "${e}": ${t}`);return i.code="EUNSUPPORTEDPROTOCOL",i}ae(Vy,"unsupportedURLType");function Wy(e){let t=e.rawSpec;if(e.saveSpec=t,t.startsWith("git+ssh:")){let u=t.match(/^git\+ssh:\/\/([^:#]+:[^#]+(?:\.git)?)(?:#(.*))?$/i);if(u&&!u[1].match(OM))return e.type="git",Pn(e,u[2]),e.fetchSpec=u[1],e}else t.startsWith("git+file://")&&(t=t.replace(/\\/g,"/"));let i=new Qc(t);switch(i.protocol){case"git:":case"git+http:":case"git+https:":case"git+rsync:":case"git+ftp:":case"git+file:":case"git+ssh:":e.type="git",Pn(e,i.hash.slice(1)),i.protocol==="git+file:"&&/^git\+file:\/\/[a-z]:/i.test(t)?e.fetchSpec=`git+file://${i.host.toLowerCase()}:${i.pathname}`:(i.hash="",e.fetchSpec=i.toString()),e.fetchSpec.startsWith("git+")&&(e.fetchSpec=e.fetchSpec.slice(4));break;case"http:":case"https:":e.type="remote",e.fetchSpec=e.saveSpec;break;default:throw Vy(i.protocol,t)}return e}ae(Wy,"fromURL");function zy(e,t){let i=jr(e.rawSpec.substr(4),t);if(i.type==="alias")throw new Error("nested aliases not supported");if(!i.registry)throw new Error("aliases only work for registry deps");if(!i.name)throw new Error("aliases must have a name");return e.subSpec=i,e.registry=!0,e.type="alias",e.saveSpec=null,e.fetchSpec=null,e}ae(zy,"fromAlias");function qy(e){e.registry=!0;let t=e.rawSpec.trim();e.saveSpec=null,e.fetchSpec=t;let i=Ay.valid(t,!0),u=Ay.validRange(t,!0);if(i)e.type="version";else if(u)e.type="range";else{if(encodeURIComponent(t)!==t)throw Fy(t,e.raw);e.type="tag"}return e}ae(qy,"fromRegistry");Bs.exports=jr;Bs.exports.resolve=cu;Bs.exports.toPurl=By;Bs.exports.Result=uu});var e0=me((v4,Qy)=>{var IM=Object.create,Mn=Object.defineProperty,TM=Object.getOwnPropertyDescriptor,PM=Object.getOwnPropertyNames,xM=Object.getPrototypeOf,NM=Object.prototype.hasOwnProperty,kM=(e,t)=>{for(var i in t)Mn(e,i,{get:t[i],enumerable:!0})},Jy=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of PM(t))!NM.call(e,n)&&n!==i&&Mn(e,n,{get:()=>t[n],enumerable:!(u=TM(t,n))||u.enumerable});return e},LM=(e,t,i)=>(i=e!=null?IM(xM(e)):{},Jy(t||!e||!e.__esModule?Mn(i,"default",{value:e,enumerable:!0}):i,e)),DM=e=>Jy(Mn({},"__esModule",{value:!0}),e),Xy={};kM(Xy,{dlxPackage:()=>JM,downloadPackage:()=>Zy,executePackage:()=>Yy});Qy.exports=DM(Xy);var $n=require("fs"),Jt=LM(require("path")),$M=ti(),jM=Gm(),MM=ry(),BM=cs(),jn=fr(),UM=Pi(),FM=Ry(),HM=Fi(),hu;function GM(){return hu===void 0&&(hu=Ky()),hu}var pu;function VM(){return pu===void 0&&(pu=_c()),pu}var WM=/[~^><=xX* ]|\|\|/;function zM(e){try{let t=GM()(e),i=t.type==="tag"||t.type==="version"||t.type==="range"?t.fetchSpec:void 0;return{name:t.name||e,version:i}}catch{let t=e.lastIndexOf("@");return t===-1||e.startsWith("@")?{name:e,version:void 0}:{name:e.slice(0,t),version:e.slice(t+1)}}}async function qM(e,t,i){let u=(0,MM.generateCacheKey)(t),n=(0,jn.normalizePath)(Jt.default.join((0,UM.getSocketDlxDir)(),u)),l=(0,jn.normalizePath)(Jt.default.join(n,"node_modules",e));try{await $n.promises.mkdir(n,{recursive:!0})}catch(r){let s=r.code;throw s==="EACCES"||s==="EPERM"?new Error(`Permission denied creating package directory: ${n}
105
- Please check directory permissions or run with appropriate access.`,{cause:r}):s==="EROFS"?new Error(`Cannot create package directory on read-only filesystem: ${n}
106
- Ensure the filesystem is writable or set SOCKET_DLX_DIR to a writable location.`,{cause:r}):new Error(`Failed to create package directory: ${n}`,{cause:r})}let c=Jt.default.join(n,"concurrency.lock");return await FM.processLock.withLock(c,async()=>{if(!i&&(0,$n.existsSync)(l)){let s=Jt.default.join(l,"package.json");if((0,$n.existsSync)(s))return{installed:!1,packageDir:n}}let r=(0,jM.getPacoteCachePath)();try{await VM().extract(t,l,{cache:r||Jt.default.join(n,".cache")})}catch(s){let o=s.code;throw o==="E404"||o==="ETARGET"?new Error(`Package not found: ${t}
107
- Verify the package exists on npm registry and check the version.
108
- Visit https://www.npmjs.com/package/${e} to see available versions.`,{cause:s}):o==="ENOTFOUND"||o==="ETIMEDOUT"||o==="EAI_AGAIN"?new Error(`Network error installing ${t}
109
- Check your internet connection and try again.`,{cause:s}):new Error(`Failed to install package: ${t}
110
- Destination: ${l}
111
- Check npm registry connectivity or package name.`,{cause:s})}return{installed:!0,packageDir:n}},{staleMs:5e3,touchIntervalMs:2e3})}function KM(e,t,i){let u=(0,jn.normalizePath)(Jt.default.join(e,"node_modules",t)),n=Jt.default.join(u,"package.json"),l=(0,BM.readJsonSync)(n).bin,c;if(typeof l=="string")c=l;else if(typeof l=="object"&&l!==null){let r=l,s=Object.keys(r);if(s.length===1)c=r[s[0]];else{let o=t.split("/").pop(),a=[i,o,t.replace(/^@[^/]+\//,"")].filter(Boolean);for(let h of a)if(h&&r[h]){c=r[h];break}!c&&s.length>0&&(c=r[s[0]])}}if(!c)throw new Error(`No binary found for package "${t}"`);return(0,jn.normalizePath)(Jt.default.join(u,c))}async function JM(e,t,i){let u=await Zy(t),n=Yy(u.binaryPath,e,t?.spawnOptions,i);return{...u,spawnPromise:n}}async function Zy(e){let{binaryName:t,force:i,package:u}={__proto__:null,...e},{name:n,version:l}=zM(u),c=l!==void 0&&WM.test(l),r=i!==void 0?i:c,s=l?`${n}@${l}`:n,{installed:o,packageDir:a}=await qM(n,s,r),h=KM(a,n,t);if(!$M.WIN32&&(0,$n.existsSync)(h)){let{chmodSync:p}=require("fs");try{p(h,493)}catch{}}return{binaryPath:h,installed:o,packageDir:a}}function Yy(e,t,i,u){return(0,HM.spawn)(e,t,i,u)}});var n0=me((S4,i0)=>{var du=Object.defineProperty,XM=Object.getOwnPropertyDescriptor,ZM=Object.getOwnPropertyNames,YM=Object.prototype.hasOwnProperty,QM=(e,t)=>{for(var i in t)du(e,i,{get:t[i],enumerable:!0})},eB=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ZM(t))!YM.call(e,n)&&n!==i&&du(e,n,{get:()=>t[n],enumerable:!(u=XM(t,n))||u.enumerable});return e},tB=e=>eB(du({},"__esModule",{value:!0}),e),s0={};QM(s0,{createEnvProxy:()=>nB,envAsBoolean:()=>oB,envAsNumber:()=>aB,envAsString:()=>lB,findCaseInsensitiveEnvKey:()=>Us});i0.exports=tB(s0);var rB=Number,sB=Number.isFinite,iB=Number.parseInt,t0=String,r0=new Set(["APPDATA","COMSPEC","HOME","LOCALAPPDATA","PATH","PATHEXT","PROGRAMFILES","SYSTEMROOT","TEMP","TMP","USERPROFILE","WINDIR"]);function nB(e,t){return new Proxy({},{get(i,u){if(typeof u!="string")return;if(t&&u in t)return t[u];if(u in e)return e[u];let n=u.toUpperCase();if(r0.has(n)){if(t){let c=Us(t,n);if(c!==void 0)return t[c]}let l=Us(e,n);if(l!==void 0)return e[l]}},ownKeys(i){return[...new Set([...Object.keys(e),...t?Object.keys(t):[]])]},getOwnPropertyDescriptor(i,u){if(typeof u!="string")return;let n=this.get?.(i,u,i);return n!==void 0?{enumerable:!0,configurable:!0,writable:!0,value:n}:void 0},has(i,u){if(typeof u!="string")return!1;if(t&&u in t||u in e)return!0;let n=u.toUpperCase();return!!(r0.has(n)&&(t&&Us(t,n)!==void 0||Us(e,n)!==void 0))},set(i,u,n){return typeof u=="string"&&t?(t[u]=n,!0):!1}})}function oB(e,t=!1){if(typeof e=="string"){let i=e.trim();return i==="1"||i.toLowerCase()==="true"}return e==null?!!t:!!e}function aB(e,t=0){let i=iB(String(e),10);return(sB(i)?i:rB(t))||0}function lB(e,t=""){return typeof e=="string"?e.trim():e==null?t===""?t:t0(t).trim():t0(e).trim()}function Us(e,t){let i=t.length;for(let u of Object.keys(e))if(u.length===i&&u.toUpperCase()===t)return u}});var gu=me((E4,a0)=>{var fu=Object.defineProperty,cB=Object.getOwnPropertyDescriptor,uB=Object.getOwnPropertyNames,hB=Object.prototype.hasOwnProperty,pB=(e,t)=>{for(var i in t)fu(e,i,{get:t[i],enumerable:!0})},dB=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of uB(t))!hB.call(e,n)&&n!==i&&fu(e,n,{get:()=>t[n],enumerable:!(u=cB(t,n))||u.enumerable});return e},fB=e=>dB(fu({},"__esModule",{value:!0}),e),o0={};pB(o0,{getCI:()=>yB});a0.exports=fB(o0);var gB=Aa(),mB=Bt();function yB(){return(0,gB.envAsBoolean)((0,mB.getEnvValue)("CI"))}});var u0=me((b4,c0)=>{var mu=Object.defineProperty,vB=Object.getOwnPropertyDescriptor,SB=Object.getOwnPropertyNames,EB=Object.prototype.hasOwnProperty,bB=(e,t)=>{for(var i in t)mu(e,i,{get:t[i],enumerable:!0})},wB=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of SB(t))!EB.call(e,n)&&n!==i&&mu(e,n,{get:()=>t[n],enumerable:!(u=vB(t,n))||u.enumerable});return e},_B=e=>wB(mu({},"__esModule",{value:!0}),e),l0={};bB(l0,{generateSocketSpinnerFrames:()=>OB});c0.exports=_B(l0);function OB(e){let t={__proto__:null,...e}.interval??50,i="\x1B[1m",u="\x1B[2m",n="\x1B[0m",l="\u26A1\uFE0E",c="\u2726\uFE0E",r="\u2727\uFE0E",s="\u22C6\uFE0E";return{__proto__:null,frames:[`${u}${r}${n}`,`${u}${r}${n}`,`${u}${s}${n}`,`${c}${n}`,`${c}${n}`,`${i}${c}${n}`,`${i}${c}${n}`,`${i}${l}${n}`,`${i}${l}${n}`,`${i}${l}${n}`,`${i}${l}${n}`,`${i}${l}${n}`,`${i}${c}${n}`,`${i}${c}${n}`,`${c}${n}`,`${c}${n}`,`${u}${s}${n}`,`${u}${r}${n}`],interval:t}}});var m0=me((w4,g0)=>{var vu=Object.defineProperty,RB=Object.getOwnPropertyDescriptor,AB=Object.getOwnPropertyNames,CB=Object.prototype.hasOwnProperty,IB=(e,t)=>{for(var i in t)vu(e,i,{get:t[i],enumerable:!0})},TB=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of AB(t))!CB.call(e,n)&&n!==i&&vu(e,n,{get:()=>t[n],enumerable:!(u=RB(t,n))||u.enumerable});return e},PB=e=>TB(vu({},"__esModule",{value:!0}),e),h0={};IB(h0,{COLOR_INHERIT:()=>kB,DIR_LTR:()=>Fs,DIR_NONE:()=>yu,DIR_RANDOM:()=>Un,DIR_RTL:()=>Br,MODE_BI:()=>f0,applyShimmer:()=>BB});g0.exports=PB(h0);var Bn=la(),p0=cr(),xB=gu();function NB(e){return{__proto__:null,bold:/\x1b\[1m/.test(e),dim:/\x1b\[2m/.test(e),italic:/\x1b\[3m/.test(e),strikethrough:/\x1b\[9m/.test(e),underline:/\x1b\[4m/.test(e)}}function d0(e){let t="";return e.bold&&(t+="\x1B[1m"),e.dim&&(t+="\x1B[2m"),e.italic&&(t+="\x1B[3m"),e.underline&&(t+="\x1B[4m"),e.strikethrough&&(t+="\x1B[9m"),t}var kB="inherit",Fs="ltr",yu="none",Un="random",Br="rtl",f0="bi";function LB(e,t=2.5){return e>t?0:(1-e/t)**2.5}function DB(e,t,i){let u=Math.round(e[0]+(t[0]-e[0])*i),n=Math.round(e[1]+(t[1]-e[1])*i),l=Math.round(e[2]+(t[2]-e[2])*i);return[u,n,l]}function $B(e,t,i,u,n){let l=Math.abs(t-i),c=LB(l),r=d0(n),s=(0,p0.isArray)(u[0])?u[t%u.length]??[140,82,255]:u;if(c===0){let h=`\x1B[38;2;${s[0]};${s[1]};${s[2]}m`;return`${r}${h}${e}${Bn.ANSI_RESET}`}let o=DB(s,[255,255,255],c),a=`\x1B[38;2;${o[0]};${o[1]};${o[2]}m`;return`${r}${a}${e}${Bn.ANSI_RESET}`}function jB(e,t,i,u=2.5){let n=e+u+2;return i===Br?e-t%n:t%n}function MB(e){return e===Un?Math.random()<.5?Fs:Br:e===Br?Br:Fs}function BB(e,t,i){let u={__proto__:null,...i},n=u.direction??yu,l=u.shimmerWidth??2.5,c=u.color??[140,82,255],r=u.styles??NB(e),s=(0,Bn.stripAnsi)(e);if((0,xB.getCI)()||!s||n===yu){let p=d0(r),d=(0,p0.isArray)(c[0]);return s.split("").map((m,g)=>{let f=d?c[g%c.length]??[140,82,255]:c,y=`\x1B[38;2;${f[0]};${f[1]};${f[2]}m`;return`${p}${y}${m}${Bn.ANSI_RESET}`}).join("")}let o=jB(s.length,t.step,t.currentDir,l),a=s.split("").map((p,d)=>$B(p,d,o,c,r)).join("");t.step+=t.speed;let h=s.length+l+2;return t.mode===f0?t.step>=h&&(t.step=0,t.currentDir=t.currentDir===Fs?Br:Fs):t.mode===Un?t.step>=h&&(t.step=0,t.currentDir=MB(Un)):t.step>=h&&(t.step=0),a}});var w0=me((_4,b0)=>{var UB=Object.create,Hs=Object.defineProperty,FB=Object.getOwnPropertyDescriptor,HB=Object.getOwnPropertyNames,GB=Object.getPrototypeOf,VB=Object.prototype.hasOwnProperty,Tt=(e,t)=>Hs(e,"name",{value:t,configurable:!0}),v0=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),WB=(e,t)=>{for(var i in t)Hs(e,i,{get:t[i],enumerable:!0})},S0=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of HB(t))!VB.call(e,n)&&n!==i&&Hs(e,n,{get:()=>t[n],enumerable:!(u=FB(t,n))||u.enumerable});return e},zB=(e,t,i)=>(i=e!=null?UB(GB(e)):{},S0(t||!e||!e.__esModule?Hs(i,"default",{value:e,enumerable:!0}):i,e)),qB=e=>S0(Hs({},"__esModule",{value:!0}),e),KB=v0((e,t)=>{var i=require("tty"),u=i?.WriteStream?.prototype?.hasColors?.()??!1,n=Tt((c,r)=>{if(!u)return a=>a;let s=`\x1B[${c}m`,o=`\x1B[${r}m`;return a=>{let h=a+"",p=h.indexOf(o);if(p===-1)return s+h+o;let d=s,m=0,g=(r===22?o:"")+s;for(;p!==-1;)d+=h.slice(m,p)+g,m=p+o.length,p=h.indexOf(o,m);return d+=h.slice(m)+o,d}},"format"),l={};l.reset=n(0,0),l.bold=n(1,22),l.dim=n(2,22),l.italic=n(3,23),l.underline=n(4,24),l.overline=n(53,55),l.inverse=n(7,27),l.hidden=n(8,28),l.strikethrough=n(9,29),l.black=n(30,39),l.red=n(31,39),l.green=n(32,39),l.yellow=n(33,39),l.blue=n(34,39),l.magenta=n(35,39),l.cyan=n(36,39),l.white=n(37,39),l.gray=n(90,39),l.bgBlack=n(40,49),l.bgRed=n(41,49),l.bgGreen=n(42,49),l.bgYellow=n(43,49),l.bgBlue=n(44,49),l.bgMagenta=n(45,49),l.bgCyan=n(46,49),l.bgWhite=n(47,49),l.bgGray=n(100,49),l.redBright=n(91,39),l.greenBright=n(92,39),l.yellowBright=n(93,39),l.blueBright=n(94,39),l.magentaBright=n(95,39),l.cyanBright=n(96,39),l.whiteBright=n(97,39),l.bgRedBright=n(101,49),l.bgGreenBright=n(102,49),l.bgYellowBright=n(103,49),l.bgBlueBright=n(104,49),l.bgMagentaBright=n(105,49),l.bgCyanBright=n(106,49),l.bgWhiteBright=n(107,49),t.exports=l}),JB=v0((e,t)=>{"use strict";var i;function u(){return i===void 0&&(i={frames:d()?["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"]:["-","\\","|","/"],interval:80}),i}Tt(u,"getDefaultSpinner");var n;function l(){if(n===void 0){let y=d(),v=o();n={error:v.red(y?"\u2716":"\xD7"),info:v.blue(y?"\u2139":"i"),success:v.green(y?"\u2714":"\u221A"),warning:v.yellow(y?"\u26A0":"\u203C")}}return n}Tt(l,"getLogSymbols");var c;function r(){return c===void 0&&(c=require("process")),c}Tt(r,"getProcess");var s;function o(){return s===void 0&&(s={...KB()}),s}Tt(o,"getYoctocolors");var a;function h(){if(a===void 0){let{env:y}=r();a=y.TERM!=="dumb"&&!("CI"in y)}return a}Tt(h,"isProcessInteractive");var p;function d(){if(p===void 0){let y=r();if(y.platform!=="win32")return p=y.env.TERM!=="linux",p;let{env:v}=y;if(v.WT_SESSION||v.TERMINUS_SUBLIME||v.ConEmuTask==="{cmd::Cmder}")return p=!0,p;let{TERM:E,TERM_PROGRAM:b}=v;p=b==="Terminus-Sublime"||b==="vscode"||E==="xterm-256color"||E==="alacritty"||E==="rxvt-unicode"||E==="rxvt-unicode-256color"||v.TERMINAL_EMULATOR==="JetBrains-JediTerm"}return p}Tt(d,"isUnicodeSupported");var m;function g(y){return m===void 0&&(m=require("util").stripVTControlCharacters),m(y)}Tt(g,"stripVTControlCharacters");var f=class{static{Tt(this,"YoctoSpinner")}#e;#t=-1;#r;#s;#n="";#c;#u;#h=!1;#o=0;#p=0;#a;#l;#i;constructor(y={}){let v={__proto__:null,...y},E=v.spinner??u(),b=v.stream??r().stderr;this.#s=E.frames,this.#c=E.interval,this.#l=y.text??"",this.#a=b??process.stderr,this.#e=y.color??"cyan",this.#u=!!b.isTTY&&h(),this.#r=this.#d.bind(this)}#d(y){this.isSpinning&&this.stop();let v=y==="SIGINT"?130:y==="SIGTERM"?143:1;process.exit(v)}#y(){this.#u&&this.#b("\x1B[?25l")}#S(y){let v=this.#a.columns??80,E=g(y).split(`
112
- `),b=0;for(let w of E)b+=Math.max(1,Math.ceil(w.length/v));return b}#f(){let y=Date.now();(this.#t===-1||y-this.#o>=this.#c)&&(this.#t=++this.#t%this.#s.length,this.#o=y);let v=o(),E=v[this.#e]??v.cyan,b=this.#s[this.#t],w=`${E(b)} ${this.#l}`;w&&(this.#n.length&&(w=`${this.#n}${w}`),this.#u||(w+=`
113
- `)),this.clear(),this.#b(w),this.#u&&(this.#p=this.#S(w))}#R(){this.#u&&this.#b("\x1B[?25h")}#v(){process.once("SIGINT",this.#r),process.once("SIGTERM",this.#r)}#E(y,v){let E=l();return this.stop(`${E[y]} ${v??this.#l}`)}#b(y){this.#a.write(y)}#w(){process.off("SIGINT",this.#r),process.off("SIGTERM",this.#r)}get color(){return this.#e}set color(y){this.#e=y,this.#f()}get isSpinning(){return this.#h}get text(){return this.#l}set text(y){this.#l=y??"",this.#f()}clear(){if(!this.#u)return this;this.#a.cursorTo(0);for(let y=0;y<this.#p;y++)y>0&&this.#a.moveCursor(0,-1),this.#a.clearLine(1);return this.#p=0,this}dedent(y=2){return this.#n=this.#n.slice(0,-y),this}error(y){return this.#E("error",y)}indent(y=2){return this.#n+=" ".repeat(y),this}info(y){return this.#E("info",y)}resetIndent(){return this.#n="",this}start(y){return y&&(this.#l=y),this.isSpinning?this:(this.#h=!0,this.#y(),this.#f(),this.#v(),this.#u&&(this.#i=setInterval(()=>{this.#f()},this.#c)),this)}stop(y){return this.isSpinning?(this.#h=!1,this.#i&&(clearInterval(this.#i),this.#i=void 0),this.#R(),this.clear(),this.#w(),y&&this.#b(`${this.#n}${y}
114
- `),this):this}success(y){return this.#E("success",y)}warning(y){return this.#E("warning",y)}};t.exports=Tt(function(y){return new f(y)},"yoctoSpinner")}),E0={};WB(E0,{default:()=>y0.default,"module.exports":()=>y0.default});b0.exports=qB(E0);var y0=zB(JB(),1)});var R0=me((R4,O0)=>{var Su=Object.defineProperty,XB=Object.getOwnPropertyDescriptor,ZB=Object.getOwnPropertyNames,YB=Object.prototype.hasOwnProperty,QB=(e,t)=>{for(var i in t)Su(e,i,{get:t[i],enumerable:!0})},e2=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ZB(t))!YB.call(e,n)&&n!==i&&Su(e,n,{get:()=>t[n],enumerable:!(u=XB(t,n))||u.enumerable});return e},t2=e=>e2(Su({},"__esModule",{value:!0}),e),_0={};QB(_0,{getDebug:()=>s2});O0.exports=t2(_0);var r2=Bt();function s2(){return(0,r2.getEnvValue)("DEBUG")}});var C0=me((A4,Eu)=>{var i2=Object.defineProperty,Pe=(e,t)=>i2(e,"name",{value:t,configurable:!0}),Ur=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),n2=Ur((e,t)=>{var i=1e3,u=i*60,n=u*60,l=n*24,c=l*7,r=l*365.25;t.exports=function(p,d){d=d||{};var m=typeof p;if(m==="string"&&p.length>0)return s(p);if(m==="number"&&isFinite(p))return d.long?a(p):o(p);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))};function s(p){if(p=String(p),!(p.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(p);if(d){var m=parseFloat(d[1]),g=(d[2]||"ms").toLowerCase();switch(g){case"years":case"year":case"yrs":case"yr":case"y":return m*r;case"weeks":case"week":case"w":return m*c;case"days":case"day":case"d":return m*l;case"hours":case"hour":case"hrs":case"hr":case"h":return m*n;case"minutes":case"minute":case"mins":case"min":case"m":return m*u;case"seconds":case"second":case"secs":case"sec":case"s":return m*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return m;default:return}}}}Pe(s,"parse");function o(p){var d=Math.abs(p);return d>=l?Math.round(p/l)+"d":d>=n?Math.round(p/n)+"h":d>=u?Math.round(p/u)+"m":d>=i?Math.round(p/i)+"s":p+"ms"}Pe(o,"fmtShort");function a(p){var d=Math.abs(p);return d>=l?h(p,d,l,"day"):d>=n?h(p,d,n,"hour"):d>=u?h(p,d,u,"minute"):d>=i?h(p,d,i,"second"):p+" ms"}Pe(a,"fmtLong");function h(p,d,m,g){var f=d>=m*1.5;return Math.round(p/m)+" "+g+(f?"s":"")}Pe(h,"plural")}),A0=Ur((e,t)=>{function i(u){l.debug=l,l.default=l,l.coerce=h,l.disable=o,l.enable=r,l.enabled=a,l.humanize=n2(),l.destroy=p,Object.keys(u).forEach(d=>{l[d]=u[d]}),l.names=[],l.skips=[],l.formatters={};function n(d){let m=0;for(let g=0;g<d.length;g++)m=(m<<5)-m+d.charCodeAt(g),m|=0;return l.colors[Math.abs(m)%l.colors.length]}Pe(n,"selectColor"),l.selectColor=n;function l(d){let m,g=null,f,y;function v(...E){if(!v.enabled)return;let b=v,w=Number(new Date),_=w-(m||w);b.diff=_,b.prev=m,b.curr=w,m=w,E[0]=l.coerce(E[0]),typeof E[0]!="string"&&E.unshift("%O");let O=0;E[0]=E[0].replace(/%([a-zA-Z%])/g,(A,I)=>{if(A==="%%")return"%";O++;let P=l.formatters[I];if(typeof P=="function"){let L=E[O];A=P.call(b,L),E.splice(O,1),O--}return A}),l.formatArgs.call(b,E),(b.log||l.log).apply(b,E)}return Pe(v,"debug"),v.namespace=d,v.useColors=l.useColors(),v.color=l.selectColor(d),v.extend=c,v.destroy=l.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:Pe(()=>g!==null?g:(f!==l.namespaces&&(f=l.namespaces,y=l.enabled(d)),y),"get"),set:Pe(E=>{g=E},"set")}),typeof l.init=="function"&&l.init(v),v}Pe(l,"createDebug");function c(d,m){let g=l(this.namespace+(typeof m>"u"?":":m)+d);return g.log=this.log,g}Pe(c,"extend");function r(d){l.save(d),l.namespaces=d,l.names=[],l.skips=[];let m=(typeof d=="string"?d:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let g of m)g[0]==="-"?l.skips.push(g.slice(1)):l.names.push(g)}Pe(r,"enable");function s(d,m){let g=0,f=0,y=-1,v=0;for(;g<d.length;)if(f<m.length&&(m[f]===d[g]||m[f]==="*"))m[f]==="*"?(y=f,v=g,f++):(g++,f++);else if(y!==-1)f=y+1,v++,g=v;else return!1;for(;f<m.length&&m[f]==="*";)f++;return f===m.length}Pe(s,"matchesTemplate");function o(){let d=[...l.names,...l.skips.map(m=>"-"+m)].join(",");return l.enable(""),d}Pe(o,"disable");function a(d){for(let m of l.skips)if(s(d,m))return!1;for(let m of l.names)if(s(d,m))return!0;return!1}Pe(a,"enabled");function h(d){return d instanceof Error?d.stack||d.message:d}Pe(h,"coerce");function p(){}return Pe(p,"destroy"),l.enable(l.load()),l}Pe(i,"setup"),t.exports=i}),o2=Ur((e,t)=>{e.formatArgs=u,e.save=n,e.load=l,e.useColors=i,e.storage=c(),e.destroy=(()=>{let s=!1;return()=>{s||(s=!0)}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function i(){let s;return!1}Pe(i,"useColors");function u(s){if(s[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+s[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let o="color: "+this.color;s.splice(1,0,o,"color: inherit");let a=0,h=0;s[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(a++,p==="%c"&&(h=a))}),s.splice(h,0,o)}Pe(u,"formatArgs"),e.log=console.debug||console.log||(()=>{});function n(s){try{s?e.storage.setItem("debug",s):e.storage.removeItem("debug")}catch{}}Pe(n,"save");function l(){let s;try{s=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch{}return!s&&typeof process<"u"&&"env"in process&&(s=void 0),s}Pe(l,"load");function c(){try{return}catch{}}Pe(c,"localstorage"),t.exports=A0()(e);var{formatters:r}=t.exports;r.j=function(s){try{return JSON.stringify(s)}catch(o){return"[UnexpectedJSONParseError]: "+o.message}}}),a2=Ur((e,t)=>{"use strict";t.exports=(i,u=process.argv)=>{let n=i.startsWith("-")?"":i.length===1?"-":"--",l=u.indexOf(n+i),c=u.indexOf("--");return l!==-1&&(c===-1||l<c)}}),l2=Ur((e,t)=>{"use strict";var i=require("os"),u=require("tty"),n=a2(),{env:l}=process,c;n("no-color")||n("no-colors")||n("color=false")||n("color=never")?c=0:(n("color")||n("colors")||n("color=true")||n("color=always"))&&(c=1),"FORCE_COLOR"in l&&(l.FORCE_COLOR==="true"?c=1:l.FORCE_COLOR==="false"?c=0:c=l.FORCE_COLOR.length===0?1:Math.min(parseInt(l.FORCE_COLOR,10),3));function r(a){return a===0?!1:{level:a,hasBasic:!0,has256:a>=2,has16m:a>=3}}Pe(r,"translateLevel");function s(a,h){if(c===0)return 0;if(n("color=16m")||n("color=full")||n("color=truecolor"))return 3;if(n("color=256"))return 2;if(a&&!h&&c===void 0)return 0;let p=c||0;if(l.TERM==="dumb")return p;if(process.platform==="win32"){let d=i.release().split(".");return Number(d[0])>=10&&Number(d[2])>=10586?Number(d[2])>=14931?3:2:1}if("CI"in l)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(d=>d in l)||l.CI_NAME==="codeship"?1:p;if("TEAMCITY_VERSION"in l)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(l.TEAMCITY_VERSION)?1:0;if(l.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in l){let d=parseInt((l.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(l.TERM_PROGRAM){case"iTerm.app":return d>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(l.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(l.TERM)||"COLORTERM"in l?1:p}Pe(s,"supportsColor");function o(a){let h=s(a,a&&a.isTTY);return r(h)}Pe(o,"getSupportLevel"),t.exports={supportsColor:o,stdout:r(s(!0,u.isatty(1))),stderr:r(s(!0,u.isatty(2)))}}),c2=Ur((e,t)=>{var i=require("tty"),u=require("util");e.init=a,e.log=r,e.formatArgs=l,e.save=s,e.load=o,e.useColors=n,e.destroy=u.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{let p=l2();p&&(p.stderr||p).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(p=>/^debug_/i.test(p)).reduce((p,d)=>{let m=d.substring(6).toLowerCase().replace(/_([a-z])/g,(f,y)=>y.toUpperCase()),g=process.env[d];return/^(yes|on|true|enabled)$/i.test(g)?g=!0:/^(no|off|false|disabled)$/i.test(g)?g=!1:g==="null"?g=null:g=Number(g),p[m]=g,p},{});function n(){return"colors"in e.inspectOpts?!!e.inspectOpts.colors:i.isatty(process.stderr.fd)}Pe(n,"useColors");function l(p){let{namespace:d,useColors:m}=this;if(m){let g=this.color,f="\x1B[3"+(g<8?g:"8;5;"+g),y=` ${f};1m${d} \x1B[0m`;p[0]=y+p[0].split(`
115
- `).join(`
116
- `+y),p.push(f+"m+"+t.exports.humanize(this.diff)+"\x1B[0m")}else p[0]=c()+d+" "+p[0]}Pe(l,"formatArgs");function c(){return e.inspectOpts.hideDate?"":new Date().toISOString()+" "}Pe(c,"getDate");function r(...p){return process.stderr.write(u.formatWithOptions(e.inspectOpts,...p)+`
117
- `)}Pe(r,"log");function s(p){p?process.env.DEBUG=p:delete void 0}Pe(s,"save");function o(){}Pe(o,"load");function a(p){p.inspectOpts={};let d=Object.keys(e.inspectOpts);for(let m=0;m<d.length;m++)p.inspectOpts[d[m]]=e.inspectOpts[d[m]]}Pe(a,"init"),t.exports=A0()(e);var{formatters:h}=t.exports;h.o=function(p){return this.inspectOpts.colors=this.useColors,u.inspect(p,this.inspectOpts).split(`
118
- `).map(d=>d.trim()).join(" ")},h.O=function(p){return this.inspectOpts.colors=this.useColors,u.inspect(p,this.inspectOpts)}});typeof process>"u"||process.type==="renderer"||process.__nwjs?Eu.exports=o2():Eu.exports=c2()});var _u=me((C4,j0)=>{var u2=Object.create,Fn=Object.defineProperty,h2=Object.getOwnPropertyDescriptor,p2=Object.getOwnPropertyNames,d2=Object.getPrototypeOf,f2=Object.prototype.hasOwnProperty,g2=(e,t)=>{for(var i in t)Fn(e,i,{get:t[i],enumerable:!0})},P0=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of p2(t))!f2.call(e,n)&&n!==i&&Fn(e,n,{get:()=>t[n],enumerable:!(u=h2(t,n))||u.enumerable});return e},x0=(e,t,i)=>(i=e!=null?u2(d2(e)):{},P0(t||!e||!e.__esModule?Fn(i,"default",{value:e,enumerable:!0}):i,e)),m2=e=>P0(Fn({},"__esModule",{value:!0}),e),N0={};g2(N0,{debug:()=>_2,debugCache:()=>b2,debugCacheNs:()=>E2,debugDir:()=>O2,debugDirNs:()=>L0,debugLog:()=>R2,debugLogNs:()=>$0,debugNs:()=>D0,debuglog:()=>C2,debugtime:()=>I2,isDebug:()=>A2,isDebugNs:()=>w2});j0.exports=m2(N0);var Hn=lr(),y2=R0(),Gs=Ia(),Vs=x0(Dc()),Pt=x0(C0()),xt=jt(),v2=Zt(),k0=Qt(),Gn=Reflect.apply,I0=new Map;function T0(e){let t=I0.get(e);return t||(!(0,y2.getDebug)()&&(0,Gs.getSocketDebug)()&&(e==="error"||e==="notice")&&Pt.default.enable(e),t=(0,Pt.default)(e),t.log=S2,I0.set(e,t),t)}var bu;function wu(){return bu===void 0&&(bu=require("util")),bu}function Fr(e=3){let t="",i=Error.captureStackTrace;if(typeof i=="function"){let u={};i(u,Fr);let n=u.stack;if(typeof n=="string"){let l=0,c=0;for(let r=0,{length:s}=n;r<s;r+=1)if(n[r]===`
119
- `)if(l+=1,l<e)c=r+1;else{let o=n.slice(c,r).trimStart(),a=/(?<=^at\s+).*?(?=\s+\(|$)/.exec(o)?.[0];if(a&&(t=a.replace(/^(?:async|bound|get|new|set)\s+/,""),t.startsWith("Object."))){let h=t.slice(7);(0,v2.hasOwn)(Object,h)||(t=h)}break}}}return t}function S2(...e){let t=wu(),i=Pt.default.inspectOpts?{...Pt.default.inspectOpts,showHidden:Pt.default.inspectOpts.showHidden===null?void 0:Pt.default.inspectOpts.showHidden,depth:Pt.default.inspectOpts.depth===null||typeof Pt.default.inspectOpts.depth=="boolean"?void 0:Pt.default.inspectOpts.depth}:{};Gn(xt.logger.info,xt.logger,[t.formatWithOptions(i,...e)])}function Vn(e){return e!==null&&typeof e=="object"?{__proto__:null,...e}:{__proto__:null,namespaces:e}}function Ws(e){if(!(0,Gs.getSocketDebug)())return!1;if(typeof e!="string"||!e||e==="*")return!0;let t=e.trim().replace(/\s+/g,",").split(",").filter(Boolean),i=[],u=[];for(let n of t)n.startsWith("-")?u.push(n.slice(1)):i.push(n);return i.length&&!i.some(n=>T0(n).enabled)?!1:u.every(n=>!T0(n).enabled)}function L0(e,t,i){let u=Vn(e),{namespaces:n}=u;if(!Ws(n))return;let l=Fr(4)||"anonymous";Ve===void 0&&(Ve=(0,Vs.default)()?"\u25B8":">");let c=i;if(c===void 0){let o=Pt.default.inspectOpts;o&&(c={...o,showHidden:o.showHidden===null?void 0:o.showHidden,depth:o.depth===null||typeof o.depth=="boolean"?null:o.depth})}let r=u.spinner||(0,Hn.getSpinner)(),s=r?.isSpinning;r?.stop(),xt.logger.info(`[DEBUG] ${l} ${Ve} object inspection:`),xt.logger.dir(t,i),s&&r?.start()}var Ve;function D0(e,...t){let i=Vn(e),{namespaces:u}=i;if(!Ws(u))return;let n=Fr(4)||"anonymous";Ve===void 0&&(Ve=(0,Vs.default)()?"\u25B8":">");let l=t.at(0),c=typeof l=="string"?[(0,k0.applyLinePrefix)(`${n?`${n} ${Ve} `:""}${l}`,{prefix:"[DEBUG] "}),...t.slice(1)]:t,r=i.spinner||(0,Hn.getSpinner)(),s=r?.isSpinning;r?.stop(),Gn(xt.logger.info,xt.logger,c),s&&r?.start()}function $0(e,...t){let i=Vn(e),{namespaces:u}=i;if(!Ws(u))return;let n=Fr(4)||"anonymous";Ve===void 0&&(Ve=(0,Vs.default)()?"\u25B8":">");let l=t.at(0),c=typeof l=="string"?[(0,k0.applyLinePrefix)(`${n?`${n} ${Ve} `:""}${l}`,{prefix:"[DEBUG] "}),...t.slice(1)]:[`[DEBUG] ${n} ${Ve}`,...t],r=i.spinner||(0,Hn.getSpinner)(),s=r?.isSpinning;r?.stop(),Gn(xt.logger.info,xt.logger,c),s&&r?.start()}function E2(e,t,i,u){let n=Vn(e),{namespaces:l}=n;if(!Ws(l))return;let c=Fr(4)||"cache";Ve===void 0&&(Ve=(0,Vs.default)()?"\u25B8":">");let r=`[CACHE] ${c} ${Ve} ${t}: ${i}`,s=u!==void 0?[r,u]:[r],o=n.spinner||(0,Hn.getSpinner)(),a=o?.isSpinning;o?.stop(),Gn(xt.logger.info,xt.logger,s),a&&o?.start()}function b2(e,t,i){if(!(0,Gs.getSocketDebug)())return;let u=Fr(3)||"cache";Ve===void 0&&(Ve=(0,Vs.default)()?"\u25B8":">");let n=`[CACHE] ${u} ${Ve} ${e}: ${t}`;console.log(...i!==void 0?[n,i]:[n])}function w2(e){return!!(0,Gs.getSocketDebug)()&&Ws(e)}function _2(...e){D0("*",...e)}function O2(e,t){L0("*",e,t)}function R2(...e){$0("*",...e)}function A2(){return!!(0,Gs.getSocketDebug)()}function C2(e){return wu().debuglog(e)}function I2(e){let t=wu(),i,u=()=>{if(i===void 0)i=Date.now();else{let n=Date.now()-i;t.debuglog("time")(`${e}: ${n}ms`),i=void 0}};return u.start=()=>{i=Date.now()},u.end=()=>{if(i!==void 0){let n=Date.now()-i;t.debuglog("time")(`${e}: ${n}ms`),i=void 0}},u}});var q0=me((I4,z0)=>{var T2=Object.create,Kn=Object.defineProperty,P2=Object.getOwnPropertyDescriptor,x2=Object.getOwnPropertyNames,N2=Object.getPrototypeOf,k2=Object.prototype.hasOwnProperty,L2=(e,t)=>{for(var i in t)Kn(e,i,{get:t[i],enumerable:!0})},F0=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of x2(t))!k2.call(e,n)&&n!==i&&Kn(e,n,{get:()=>t[n],enumerable:!(u=P2(t,n))||u.enumerable});return e},D2=(e,t,i)=>(i=e!=null?T2(N2(e)):{},F0(t||!e||!e.__esModule?Kn(i,"default",{value:e,enumerable:!0}):i,e)),$2=e=>F0(Kn({},"__esModule",{value:!0}),e),H0={};L2(H0,{Spinner:()=>Ru,ciSpinner:()=>V0,getCliSpinners:()=>W0,getDefaultSpinner:()=>G2,spinner:()=>V2,withSpinner:()=>W2,withSpinnerRestore:()=>z2,withSpinnerSync:()=>q2});z0.exports=$2(H0);var j2=gu(),M2=u0(),Ze=m0(),G0=D2(w0()),B2=Zt(),M0=Qt(),U2={__proto__:null,black:[0,0,0],blue:[0,0,255],blueBright:[100,149,237],cyan:[0,255,255],cyanBright:[0,255,255],gray:[128,128,128],green:[0,128,0],greenBright:[0,255,0],magenta:[255,0,255],magentaBright:[255,105,180],red:[255,0,0],redBright:[255,69,0],white:[255,255,255],whiteBright:[255,255,255],yellow:[255,255,0],yellowBright:[255,255,153]};function qn(e){return Array.isArray(e)}function Wn(e){return qn(e)?e:U2[e]}var V0={frames:[""],interval:2147483647};function zn(e){return{__proto__:null,configurable:!0,value:e,writable:!0}}function B0(e){return typeof e=="string"?e.trimStart():""}function F2(e){let{current:t,total:i,unit:u}=e,n=Math.round(t/i*100),l=H2(n),c=u?`${t}/${i} ${u}`:`${t}/${i}`;return`${l} ${n}% (${c})`}function H2(e,t=20){let i=Math.round(e/100*t),u=t-i,n="\u2588".repeat(i)+"\u2591".repeat(u);return $c().cyan(n)}var Hr;function W0(e){return Hr===void 0&&(Hr={__proto__:null,...(0,G0.default)({}).constructor.spinners,socket:(0,M2.generateSocketSpinnerFrames)()}),typeof e=="string"&&Hr?(0,B2.hasOwn)(Hr,e)?Hr[e]:void 0:Hr}var Xt,U0;function Ru(e){if(Xt===void 0){let t=(0,G0.default)({}).constructor;Xt=class extends t{#e="";#t="";#r;#s;#n;constructor(i){let u={__proto__:null,...i},n=u.color??[140,82,255];if(qn(n)&&(n.length!==3||!n.every(r=>typeof r=="number"&&r>=0&&r<=255)))throw new TypeError("RGB color must be an array of 3 numbers between 0 and 255");let l=Wn(n),c;if(u.shimmer){let r,s,o=.3333333333333333;if(typeof u.shimmer=="string")r=u.shimmer;else{let a={__proto__:null,...u.shimmer};r=a.dir??Ze.DIR_LTR,s=a.color??Ze.COLOR_INHERIT,o=a.speed??1/3}c={__proto__:null,color:s===void 0?Ze.COLOR_INHERIT:s,currentDir:Ze.DIR_LTR,mode:r,speed:o,step:0}}super({signal:lr().getAbortSignal(),...u,color:l,onRenderFrame:(r,s,o)=>{let a=(0,M0.stringWidth)(r)===1?" ":" ";return r?`${o(r)}${a}${s}`:s},onFrameUpdate:c?()=>{this.#e&&(super.text=this.#u())}:void 0}),this.#s=c,this.#n=c}get color(){let i=super.color;return qn(i)?i:Wn(i)}set color(i){super.color=qn(i)?i:Wn(i)}#c(i,u){let n,l=u.at(0);typeof l=="string"?n=u.slice(1):(n=u,l="");let c=this.isSpinning,r=B0(l);super[i](r);let{incLogCallCountSymbol:s,lastWasBlankSymbol:o,logger:a}=jt();return i==="stop"?c&&r&&(a[o]((0,M0.isBlankString)(r)),a[s]()):(a[o](!1),a[s]()),n.length&&(a.log(...n),a[o](!1)),this}#u(){let i=this.#e;if(this.#r){let u=F2(this.#r);i=i?`${i} ${u}`:u}if(i&&this.#s){let u;this.#s.color===Ze.COLOR_INHERIT?u=this.color:Array.isArray(this.#s.color[0])?u=this.#s.color:u=Wn(this.#s.color),i=(0,Ze.applyShimmer)(i,this.#s,{color:u,direction:this.#s.mode})}return this.#t&&i&&(i=this.#t+i),i}#h(i,u){let n=u.at(0),l;typeof n=="string"?l=u.slice(1):(l=u,n="");let{LOG_SYMBOLS:c,logger:r}=jt();return r.error(`${c[i]} ${n}`,...l),this}#o(){super.text=this.#u()}debug(i,...u){let{isDebug:n}=_u();return n()?this.#h("info",[i,...u]):this}debugAndStop(i,...u){let{isDebug:n}=_u();return n()?this.#c("info",[i,...u]):this}dedent(i){if(i===0)this.#t="";else{let u=i??2,n=Math.max(0,this.#t.length-u);this.#t=this.#t.slice(0,n)}return this.#o(),this}done(i,...u){return this.#h("success",[i,...u])}doneAndStop(i,...u){return this.#c("success",[i,...u])}fail(i,...u){return this.#h("fail",[i,...u])}failAndStop(i,...u){return this.#c("error",[i,...u])}indent(i){if(i===0)this.#t="";else{let u=i??2;this.#t+=" ".repeat(u)}return this.#o(),this}info(i,...u){return this.#h("info",[i,...u])}infoAndStop(i,...u){return this.#c("info",[i,...u])}log(...i){let{logger:u}=jt();return u.log(...i),this}logAndStop(i,...u){return this.#c("stop",[i,...u])}progress=(i,u,n)=>(this.#r={__proto__:null,current:i,total:u,...n?{unit:n}:{}},this.#o(),this);progressStep(i=1){if(this.#r){let u=this.#r.current+i;this.#r={__proto__:null,current:Math.max(0,Math.min(u,this.#r.total)),total:this.#r.total,...this.#r.unit?{unit:this.#r.unit}:{}},this.#o()}return this}start(...i){if(i.length){let u=i.at(0),n=B0(u);n?this.#e=n:(this.#e="",super.text="")}return this.#o(),this.#c("start",i)}step(i,...u){let{logger:n}=jt();return typeof i=="string"&&(n.error(""),n.error(i,...u)),this}substep(i,...u){if(typeof i=="string"){let{logger:n}=jt();n.error(` ${i}`,...u)}return this}stop(...i){this.#e="",this.#r=void 0,this.#s&&(this.#s.currentDir=Ze.DIR_LTR,this.#s.step=0);let u=this.#c("stop",i);return super.text="",u}success(i,...u){return this.#h("success",[i,...u])}successAndStop(i,...u){return this.#c("success",[i,...u])}text(i){return arguments.length===0?this.#e:(this.#e=i??"",this.#o(),this)}warn(i,...u){return this.#h("warn",[i,...u])}warnAndStop(i,...u){return this.#c("warning",[i,...u])}shimmer(i){if(i===!1)this.#s=void 0;else if(i===!0)this.#n?this.#s={...this.#n}:(this.#s={color:Ze.COLOR_INHERIT,currentDir:Ze.DIR_LTR,mode:Ze.DIR_LTR,speed:1/3,step:0},this.#n=this.#s);else if(typeof i=="string")this.#s?(this.#s={...this.#s,mode:i},this.#n=this.#s):this.#n?(this.#s={...this.#n,mode:i},this.#n=this.#s):(this.#s={color:Ze.COLOR_INHERIT,currentDir:Ze.DIR_LTR,mode:i,speed:1/3,step:0},this.#n=this.#s);else if(i&&typeof i=="object"){let u={__proto__:null,...i};this.#s?(this.#s={...this.#s,...u.color!==void 0?{color:u.color}:{},...u.dir!==void 0?{mode:u.dir}:{},...u.speed!==void 0?{speed:u.speed}:{}},this.#n=this.#s):this.#n?(this.#s={...this.#n,...u.color!==void 0?{color:u.color}:{},...u.dir!==void 0?{mode:u.dir}:{},...u.speed!==void 0?{speed:u.speed}:{}},this.#n=this.#s):(this.#s={color:u.color??Ze.COLOR_INHERIT,currentDir:Ze.DIR_LTR,mode:u.dir??Ze.DIR_LTR,speed:u.speed??1/3,step:0},this.#n=this.#s)}return this.#o(),this}},Object.defineProperties(Xt.prototype,{error:zn(Xt.prototype.fail),errorAndStop:zn(Xt.prototype.failAndStop),warning:zn(Xt.prototype.warn),warningAndStop:zn(Xt.prototype.warnAndStop)}),U0=(0,j2.getCI)()?V0:W0("socket")}return new Xt({spinner:U0,...e})}var Ou;function G2(){return Ou===void 0&&(Ou=Ru()),Ou}var V2=(()=>{let e;return new Proxy({},{get(t,i){e===void 0&&(e=Ru());let u=e[i];return typeof u=="function"?u.bind(e):u}})})();async function W2(e){let{message:t,operation:i,spinner:u}={__proto__:null,...e};if(!u)return await i();u.start(t);try{return await i()}finally{u.stop()}}async function z2(e){let{operation:t,spinner:i,wasSpinning:u}={__proto__:null,...e};try{return await t()}finally{i&&u&&i.start()}}function q2(e){let{message:t,operation:i,spinner:u}={__proto__:null,...e};if(!u)return i();u.start(t);try{return i()}finally{u.stop()}}});var zs=me((P4,K0)=>{"use strict";var K2="2.0.0",J2=Number.MAX_SAFE_INTEGER||9007199254740991,X2=16,Z2=250,Y2=["major","premajor","minor","preminor","patch","prepatch","prerelease"];K0.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:X2,MAX_SAFE_BUILD_LENGTH:Z2,MAX_SAFE_INTEGER:J2,RELEASE_TYPES:Y2,SEMVER_SPEC_VERSION:K2,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var qs=me((x4,J0)=>{"use strict";var Q2=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};J0.exports=Q2});var Gr=me((Nt,X0)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Au,MAX_SAFE_BUILD_LENGTH:eU,MAX_LENGTH:tU}=zs(),rU=qs();Nt=X0.exports={};var sU=Nt.re=[],iU=Nt.safeRe=[],we=Nt.src=[],nU=Nt.safeSrc=[],_e=Nt.t={},oU=0,Cu="[a-zA-Z0-9-]",aU=[["\\s",1],["\\d",tU],[Cu,eU]],lU=e=>{for(let[t,i]of aU)e=e.split(`${t}*`).join(`${t}{0,${i}}`).split(`${t}+`).join(`${t}{1,${i}}`);return e},Ce=(e,t,i)=>{let u=lU(t),n=oU++;rU(e,n,t),_e[e]=n,we[n]=t,nU[n]=u,sU[n]=new RegExp(t,i?"g":void 0),iU[n]=new RegExp(u,i?"g":void 0)};Ce("NUMERICIDENTIFIER","0|[1-9]\\d*");Ce("NUMERICIDENTIFIERLOOSE","\\d+");Ce("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Cu}*`);Ce("MAINVERSION",`(${we[_e.NUMERICIDENTIFIER]})\\.(${we[_e.NUMERICIDENTIFIER]})\\.(${we[_e.NUMERICIDENTIFIER]})`);Ce("MAINVERSIONLOOSE",`(${we[_e.NUMERICIDENTIFIERLOOSE]})\\.(${we[_e.NUMERICIDENTIFIERLOOSE]})\\.(${we[_e.NUMERICIDENTIFIERLOOSE]})`);Ce("PRERELEASEIDENTIFIER",`(?:${we[_e.NONNUMERICIDENTIFIER]}|${we[_e.NUMERICIDENTIFIER]})`);Ce("PRERELEASEIDENTIFIERLOOSE",`(?:${we[_e.NONNUMERICIDENTIFIER]}|${we[_e.NUMERICIDENTIFIERLOOSE]})`);Ce("PRERELEASE",`(?:-(${we[_e.PRERELEASEIDENTIFIER]}(?:\\.${we[_e.PRERELEASEIDENTIFIER]})*))`);Ce("PRERELEASELOOSE",`(?:-?(${we[_e.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${we[_e.PRERELEASEIDENTIFIERLOOSE]})*))`);Ce("BUILDIDENTIFIER",`${Cu}+`);Ce("BUILD",`(?:\\+(${we[_e.BUILDIDENTIFIER]}(?:\\.${we[_e.BUILDIDENTIFIER]})*))`);Ce("FULLPLAIN",`v?${we[_e.MAINVERSION]}${we[_e.PRERELEASE]}?${we[_e.BUILD]}?`);Ce("FULL",`^${we[_e.FULLPLAIN]}$`);Ce("LOOSEPLAIN",`[v=\\s]*${we[_e.MAINVERSIONLOOSE]}${we[_e.PRERELEASELOOSE]}?${we[_e.BUILD]}?`);Ce("LOOSE",`^${we[_e.LOOSEPLAIN]}$`);Ce("GTLT","((?:<|>)?=?)");Ce("XRANGEIDENTIFIERLOOSE",`${we[_e.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Ce("XRANGEIDENTIFIER",`${we[_e.NUMERICIDENTIFIER]}|x|X|\\*`);Ce("XRANGEPLAIN",`[v=\\s]*(${we[_e.XRANGEIDENTIFIER]})(?:\\.(${we[_e.XRANGEIDENTIFIER]})(?:\\.(${we[_e.XRANGEIDENTIFIER]})(?:${we[_e.PRERELEASE]})?${we[_e.BUILD]}?)?)?`);Ce("XRANGEPLAINLOOSE",`[v=\\s]*(${we[_e.XRANGEIDENTIFIERLOOSE]})(?:\\.(${we[_e.XRANGEIDENTIFIERLOOSE]})(?:\\.(${we[_e.XRANGEIDENTIFIERLOOSE]})(?:${we[_e.PRERELEASELOOSE]})?${we[_e.BUILD]}?)?)?`);Ce("XRANGE",`^${we[_e.GTLT]}\\s*${we[_e.XRANGEPLAIN]}$`);Ce("XRANGELOOSE",`^${we[_e.GTLT]}\\s*${we[_e.XRANGEPLAINLOOSE]}$`);Ce("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Au}})(?:\\.(\\d{1,${Au}}))?(?:\\.(\\d{1,${Au}}))?`);Ce("COERCE",`${we[_e.COERCEPLAIN]}(?:$|[^\\d])`);Ce("COERCEFULL",we[_e.COERCEPLAIN]+`(?:${we[_e.PRERELEASE]})?(?:${we[_e.BUILD]})?(?:$|[^\\d])`);Ce("COERCERTL",we[_e.COERCE],!0);Ce("COERCERTLFULL",we[_e.COERCEFULL],!0);Ce("LONETILDE","(?:~>?)");Ce("TILDETRIM",`(\\s*)${we[_e.LONETILDE]}\\s+`,!0);Nt.tildeTrimReplace="$1~";Ce("TILDE",`^${we[_e.LONETILDE]}${we[_e.XRANGEPLAIN]}$`);Ce("TILDELOOSE",`^${we[_e.LONETILDE]}${we[_e.XRANGEPLAINLOOSE]}$`);Ce("LONECARET","(?:\\^)");Ce("CARETTRIM",`(\\s*)${we[_e.LONECARET]}\\s+`,!0);Nt.caretTrimReplace="$1^";Ce("CARET",`^${we[_e.LONECARET]}${we[_e.XRANGEPLAIN]}$`);Ce("CARETLOOSE",`^${we[_e.LONECARET]}${we[_e.XRANGEPLAINLOOSE]}$`);Ce("COMPARATORLOOSE",`^${we[_e.GTLT]}\\s*(${we[_e.LOOSEPLAIN]})$|^$`);Ce("COMPARATOR",`^${we[_e.GTLT]}\\s*(${we[_e.FULLPLAIN]})$|^$`);Ce("COMPARATORTRIM",`(\\s*)${we[_e.GTLT]}\\s*(${we[_e.LOOSEPLAIN]}|${we[_e.XRANGEPLAIN]})`,!0);Nt.comparatorTrimReplace="$1$2$3";Ce("HYPHENRANGE",`^\\s*(${we[_e.XRANGEPLAIN]})\\s+-\\s+(${we[_e.XRANGEPLAIN]})\\s*$`);Ce("HYPHENRANGELOOSE",`^\\s*(${we[_e.XRANGEPLAINLOOSE]})\\s+-\\s+(${we[_e.XRANGEPLAINLOOSE]})\\s*$`);Ce("STAR","(<|>)?=?\\s*\\*");Ce("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Ce("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Jn=me((N4,Z0)=>{"use strict";var cU=Object.freeze({loose:!0}),uU=Object.freeze({}),hU=e=>e?typeof e!="object"?cU:e:uU;Z0.exports=hU});var Iu=me((k4,ev)=>{"use strict";var Y0=/^[0-9]+$/,Q0=(e,t)=>{let i=Y0.test(e),u=Y0.test(t);return i&&u&&(e=+e,t=+t),e===t?0:i&&!u?-1:u&&!i?1:e<t?-1:1},pU=(e,t)=>Q0(t,e);ev.exports={compareIdentifiers:Q0,rcompareIdentifiers:pU}});var We=me((L4,rv)=>{"use strict";var Xn=qs(),{MAX_LENGTH:tv,MAX_SAFE_INTEGER:Zn}=zs(),{safeRe:Yn,t:Qn}=Gr(),dU=Jn(),{compareIdentifiers:Vr}=Iu(),Tu=class e{constructor(t,i){if(i=dU(i),t instanceof e){if(t.loose===!!i.loose&&t.includePrerelease===!!i.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>tv)throw new TypeError(`version is longer than ${tv} characters`);Xn("SemVer",t,i),this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease;let u=t.trim().match(i.loose?Yn[Qn.LOOSE]:Yn[Qn.FULL]);if(!u)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+u[1],this.minor=+u[2],this.patch=+u[3],this.major>Zn||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Zn||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Zn||this.patch<0)throw new TypeError("Invalid patch version");u[4]?this.prerelease=u[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let l=+n;if(l>=0&&l<Zn)return l}return n}):this.prerelease=[],this.build=u[5]?u[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(t){if(Xn("SemVer.compare",this.version,this.options,t),!(t instanceof e)){if(typeof t=="string"&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),Vr(this.major,t.major)||Vr(this.minor,t.minor)||Vr(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let i=0;do{let u=this.prerelease[i],n=t.prerelease[i];if(Xn("prerelease compare",i,u,n),u===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(u===void 0)return-1;if(u===n)continue;return Vr(u,n)}while(++i)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let i=0;do{let u=this.build[i],n=t.build[i];if(Xn("build compare",i,u,n),u===void 0&&n===void 0)return 0;if(n===void 0)return 1;if(u===void 0)return-1;if(u===n)continue;return Vr(u,n)}while(++i)}inc(t,i,u){if(t.startsWith("pre")){if(!i&&u===!1)throw new Error("invalid increment argument: identifier is empty");if(i){let n=`-${i}`.match(this.options.loose?Yn[Qn.PRERELEASELOOSE]:Yn[Qn.PRERELEASE]);if(!n||n[1]!==i)throw new Error(`invalid identifier: ${i}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",i,u);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",i,u);break;case"prepatch":this.prerelease.length=0,this.inc("patch",i,u),this.inc("pre",i,u);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",i,u),this.inc("pre",i,u);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let n=Number(u)?1:0;if(this.prerelease.length===0)this.prerelease=[n];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(i===this.prerelease.join(".")&&u===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(n)}}if(i){let l=[i,n];u===!1&&(l=[i]),Vr(this.prerelease[0],i)===0?isNaN(this.prerelease[1])&&(this.prerelease=l):this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};rv.exports=Tu});var nr=me((D4,iv)=>{"use strict";var sv=We(),fU=(e,t,i=!1)=>{if(e instanceof sv)return e;try{return new sv(e,t)}catch(u){if(!i)return null;throw u}};iv.exports=fU});var ov=me(($4,nv)=>{"use strict";var gU=nr(),mU=(e,t)=>{let i=gU(e,t);return i?i.version:null};nv.exports=mU});var lv=me((j4,av)=>{"use strict";var yU=nr(),vU=(e,t)=>{let i=yU(e.trim().replace(/^[=v]+/,""),t);return i?i.version:null};av.exports=vU});var hv=me((M4,uv)=>{"use strict";var cv=We(),SU=(e,t,i,u,n)=>{typeof i=="string"&&(n=u,u=i,i=void 0);try{return new cv(e instanceof cv?e.version:e,i).inc(t,u,n).version}catch{return null}};uv.exports=SU});var fv=me((B4,dv)=>{"use strict";var pv=nr(),EU=(e,t)=>{let i=pv(e,null,!0),u=pv(t,null,!0),n=i.compare(u);if(n===0)return null;let l=n>0,c=l?i:u,r=l?u:i,s=!!c.prerelease.length;if(!!r.prerelease.length&&!s){if(!r.patch&&!r.minor)return"major";if(r.compareMain(c)===0)return r.minor&&!r.patch?"minor":"patch"}let a=s?"pre":"";return i.major!==u.major?a+"major":i.minor!==u.minor?a+"minor":i.patch!==u.patch?a+"patch":"prerelease"};dv.exports=EU});var mv=me((U4,gv)=>{"use strict";var bU=We(),wU=(e,t)=>new bU(e,t).major;gv.exports=wU});var vv=me((F4,yv)=>{"use strict";var _U=We(),OU=(e,t)=>new _U(e,t).minor;yv.exports=OU});var Ev=me((H4,Sv)=>{"use strict";var RU=We(),AU=(e,t)=>new RU(e,t).patch;Sv.exports=AU});var wv=me((G4,bv)=>{"use strict";var CU=nr(),IU=(e,t)=>{let i=CU(e,t);return i&&i.prerelease.length?i.prerelease:null};bv.exports=IU});var ut=me((V4,Ov)=>{"use strict";var _v=We(),TU=(e,t,i)=>new _v(e,i).compare(new _v(t,i));Ov.exports=TU});var Av=me((W4,Rv)=>{"use strict";var PU=ut(),xU=(e,t,i)=>PU(t,e,i);Rv.exports=xU});var Iv=me((z4,Cv)=>{"use strict";var NU=ut(),kU=(e,t)=>NU(e,t,!0);Cv.exports=kU});var eo=me((q4,Pv)=>{"use strict";var Tv=We(),LU=(e,t,i)=>{let u=new Tv(e,i),n=new Tv(t,i);return u.compare(n)||u.compareBuild(n)};Pv.exports=LU});var Nv=me((K4,xv)=>{"use strict";var DU=eo(),$U=(e,t)=>e.sort((i,u)=>DU(i,u,t));xv.exports=$U});var Lv=me((J4,kv)=>{"use strict";var jU=eo(),MU=(e,t)=>e.sort((i,u)=>jU(u,i,t));kv.exports=MU});var Ks=me((X4,Dv)=>{"use strict";var BU=ut(),UU=(e,t,i)=>BU(e,t,i)>0;Dv.exports=UU});var to=me((Z4,$v)=>{"use strict";var FU=ut(),HU=(e,t,i)=>FU(e,t,i)<0;$v.exports=HU});var Pu=me((Y4,jv)=>{"use strict";var GU=ut(),VU=(e,t,i)=>GU(e,t,i)===0;jv.exports=VU});var xu=me((Q4,Mv)=>{"use strict";var WU=ut(),zU=(e,t,i)=>WU(e,t,i)!==0;Mv.exports=zU});var ro=me((eq,Bv)=>{"use strict";var qU=ut(),KU=(e,t,i)=>qU(e,t,i)>=0;Bv.exports=KU});var so=me((tq,Uv)=>{"use strict";var JU=ut(),XU=(e,t,i)=>JU(e,t,i)<=0;Uv.exports=XU});var Nu=me((rq,Fv)=>{"use strict";var ZU=Pu(),YU=xu(),QU=Ks(),eF=ro(),tF=to(),rF=so(),sF=(e,t,i,u)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof i=="object"&&(i=i.version),e===i;case"!==":return typeof e=="object"&&(e=e.version),typeof i=="object"&&(i=i.version),e!==i;case"":case"=":case"==":return ZU(e,i,u);case"!=":return YU(e,i,u);case">":return QU(e,i,u);case">=":return eF(e,i,u);case"<":return tF(e,i,u);case"<=":return rF(e,i,u);default:throw new TypeError(`Invalid operator: ${t}`)}};Fv.exports=sF});var Gv=me((sq,Hv)=>{"use strict";var iF=We(),nF=nr(),{safeRe:io,t:no}=Gr(),oF=(e,t)=>{if(e instanceof iF)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let i=null;if(!t.rtl)i=e.match(t.includePrerelease?io[no.COERCEFULL]:io[no.COERCE]);else{let s=t.includePrerelease?io[no.COERCERTLFULL]:io[no.COERCERTL],o;for(;(o=s.exec(e))&&(!i||i.index+i[0].length!==e.length);)(!i||o.index+o[0].length!==i.index+i[0].length)&&(i=o),s.lastIndex=o.index+o[1].length+o[2].length;s.lastIndex=-1}if(i===null)return null;let u=i[2],n=i[3]||"0",l=i[4]||"0",c=t.includePrerelease&&i[5]?`-${i[5]}`:"",r=t.includePrerelease&&i[6]?`+${i[6]}`:"";return nF(`${u}.${n}.${l}${c}${r}`,t)};Hv.exports=oF});var Wv=me((iq,Vv)=>{"use strict";var ku=class{constructor(){this.max=1e3,this.map=new Map}get(t){let i=this.map.get(t);if(i!==void 0)return this.map.delete(t),this.map.set(t,i),i}delete(t){return this.map.delete(t)}set(t,i){if(!this.delete(t)&&i!==void 0){if(this.map.size>=this.max){let n=this.map.keys().next().value;this.delete(n)}this.map.set(t,i)}return this}};Vv.exports=ku});var ht=me((nq,Jv)=>{"use strict";var aF=/\s+/g,Lu=class e{constructor(t,i){if(i=cF(i),t instanceof e)return t.loose===!!i.loose&&t.includePrerelease===!!i.includePrerelease?t:new e(t.raw,i);if(t instanceof Du)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=t.trim().replace(aF," "),this.set=this.raw.split("||").map(u=>this.parseRange(u.trim())).filter(u=>u.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let u=this.set[0];if(this.set=this.set.filter(n=>!qv(n[0])),this.set.length===0)this.set=[u];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&mF(n[0])){this.set=[n];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let t=0;t<this.set.length;t++){t>0&&(this.formatted+="||");let i=this.set[t];for(let u=0;u<i.length;u++)u>0&&(this.formatted+=" "),this.formatted+=i[u].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(t){let u=((this.options.includePrerelease&&fF)|(this.options.loose&&gF))+":"+t,n=zv.get(u);if(n)return n;let l=this.options.loose,c=l?rt[Ye.HYPHENRANGELOOSE]:rt[Ye.HYPHENRANGE];t=t.replace(c,AF(this.options.includePrerelease)),De("hyphen replace",t),t=t.replace(rt[Ye.COMPARATORTRIM],hF),De("comparator trim",t),t=t.replace(rt[Ye.TILDETRIM],pF),De("tilde trim",t),t=t.replace(rt[Ye.CARETTRIM],dF),De("caret trim",t);let r=t.split(" ").map(h=>yF(h,this.options)).join(" ").split(/\s+/).map(h=>RF(h,this.options));l&&(r=r.filter(h=>(De("loose invalid filter",h,this.options),!!h.match(rt[Ye.COMPARATORLOOSE])))),De("range list",r);let s=new Map,o=r.map(h=>new Du(h,this.options));for(let h of o){if(qv(h))return[h];s.set(h.value,h)}s.size>1&&s.has("")&&s.delete("");let a=[...s.values()];return zv.set(u,a),a}intersects(t,i){if(!(t instanceof e))throw new TypeError("a Range is required");return this.set.some(u=>Kv(u,i)&&t.set.some(n=>Kv(n,i)&&u.every(l=>n.every(c=>l.intersects(c,i)))))}test(t){if(!t)return!1;if(typeof t=="string")try{t=new uF(t,this.options)}catch{return!1}for(let i=0;i<this.set.length;i++)if(CF(this.set[i],t,this.options))return!0;return!1}};Jv.exports=Lu;var lF=Wv(),zv=new lF,cF=Jn(),Du=Js(),De=qs(),uF=We(),{safeRe:rt,t:Ye,comparatorTrimReplace:hF,tildeTrimReplace:pF,caretTrimReplace:dF}=Gr(),{FLAG_INCLUDE_PRERELEASE:fF,FLAG_LOOSE:gF}=zs(),qv=e=>e.value==="<0.0.0-0",mF=e=>e.value==="",Kv=(e,t)=>{let i=!0,u=e.slice(),n=u.pop();for(;i&&u.length;)i=u.every(l=>n.intersects(l,t)),n=u.pop();return i},yF=(e,t)=>(De("comp",e,t),e=EF(e,t),De("caret",e),e=vF(e,t),De("tildes",e),e=wF(e,t),De("xrange",e),e=OF(e,t),De("stars",e),e),Qe=e=>!e||e.toLowerCase()==="x"||e==="*",vF=(e,t)=>e.trim().split(/\s+/).map(i=>SF(i,t)).join(" "),SF=(e,t)=>{let i=t.loose?rt[Ye.TILDELOOSE]:rt[Ye.TILDE];return e.replace(i,(u,n,l,c,r)=>{De("tilde",e,u,n,l,c,r);let s;return Qe(n)?s="":Qe(l)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:Qe(c)?s=`>=${n}.${l}.0 <${n}.${+l+1}.0-0`:r?(De("replaceTilde pr",r),s=`>=${n}.${l}.${c}-${r} <${n}.${+l+1}.0-0`):s=`>=${n}.${l}.${c} <${n}.${+l+1}.0-0`,De("tilde return",s),s})},EF=(e,t)=>e.trim().split(/\s+/).map(i=>bF(i,t)).join(" "),bF=(e,t)=>{De("caret",e,t);let i=t.loose?rt[Ye.CARETLOOSE]:rt[Ye.CARET],u=t.includePrerelease?"-0":"";return e.replace(i,(n,l,c,r,s)=>{De("caret",e,n,l,c,r,s);let o;return Qe(l)?o="":Qe(c)?o=`>=${l}.0.0${u} <${+l+1}.0.0-0`:Qe(r)?l==="0"?o=`>=${l}.${c}.0${u} <${l}.${+c+1}.0-0`:o=`>=${l}.${c}.0${u} <${+l+1}.0.0-0`:s?(De("replaceCaret pr",s),l==="0"?c==="0"?o=`>=${l}.${c}.${r}-${s} <${l}.${c}.${+r+1}-0`:o=`>=${l}.${c}.${r}-${s} <${l}.${+c+1}.0-0`:o=`>=${l}.${c}.${r}-${s} <${+l+1}.0.0-0`):(De("no pr"),l==="0"?c==="0"?o=`>=${l}.${c}.${r}${u} <${l}.${c}.${+r+1}-0`:o=`>=${l}.${c}.${r}${u} <${l}.${+c+1}.0-0`:o=`>=${l}.${c}.${r} <${+l+1}.0.0-0`),De("caret return",o),o})},wF=(e,t)=>(De("replaceXRanges",e,t),e.split(/\s+/).map(i=>_F(i,t)).join(" ")),_F=(e,t)=>{e=e.trim();let i=t.loose?rt[Ye.XRANGELOOSE]:rt[Ye.XRANGE];return e.replace(i,(u,n,l,c,r,s)=>{De("xRange",e,u,n,l,c,r,s);let o=Qe(l),a=o||Qe(c),h=a||Qe(r),p=h;return n==="="&&p&&(n=""),s=t.includePrerelease?"-0":"",o?n===">"||n==="<"?u="<0.0.0-0":u="*":n&&p?(a&&(c=0),r=0,n===">"?(n=">=",a?(l=+l+1,c=0,r=0):(c=+c+1,r=0)):n==="<="&&(n="<",a?l=+l+1:c=+c+1),n==="<"&&(s="-0"),u=`${n+l}.${c}.${r}${s}`):a?u=`>=${l}.0.0${s} <${+l+1}.0.0-0`:h&&(u=`>=${l}.${c}.0${s} <${l}.${+c+1}.0-0`),De("xRange return",u),u})},OF=(e,t)=>(De("replaceStars",e,t),e.trim().replace(rt[Ye.STAR],"")),RF=(e,t)=>(De("replaceGTE0",e,t),e.trim().replace(rt[t.includePrerelease?Ye.GTE0PRE:Ye.GTE0],"")),AF=e=>(t,i,u,n,l,c,r,s,o,a,h,p)=>(Qe(u)?i="":Qe(n)?i=`>=${u}.0.0${e?"-0":""}`:Qe(l)?i=`>=${u}.${n}.0${e?"-0":""}`:c?i=`>=${i}`:i=`>=${i}${e?"-0":""}`,Qe(o)?s="":Qe(a)?s=`<${+o+1}.0.0-0`:Qe(h)?s=`<${o}.${+a+1}.0-0`:p?s=`<=${o}.${a}.${h}-${p}`:e?s=`<${o}.${a}.${+h+1}-0`:s=`<=${s}`,`${i} ${s}`.trim()),CF=(e,t,i)=>{for(let u=0;u<e.length;u++)if(!e[u].test(t))return!1;if(t.prerelease.length&&!i.includePrerelease){for(let u=0;u<e.length;u++)if(De(e[u].semver),e[u].semver!==Du.ANY&&e[u].semver.prerelease.length>0){let n=e[u].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}});var Js=me((oq,tS)=>{"use strict";var Xs=Symbol("SemVer ANY"),Mu=class e{static get ANY(){return Xs}constructor(t,i){if(i=Xv(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(" "),ju("comparator",t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===Xs?this.value="":this.value=this.operator+this.semver.version,ju("comp",this)}parse(t){let i=this.options.loose?Zv[Yv.COMPARATORLOOSE]:Zv[Yv.COMPARATOR],u=t.match(i);if(!u)throw new TypeError(`Invalid comparator: ${t}`);this.operator=u[1]!==void 0?u[1]:"",this.operator==="="&&(this.operator=""),u[2]?this.semver=new Qv(u[2],this.options.loose):this.semver=Xs}toString(){return this.value}test(t){if(ju("Comparator.test",t,this.options.loose),this.semver===Xs||t===Xs)return!0;if(typeof t=="string")try{t=new Qv(t,this.options)}catch{return!1}return $u(t,this.operator,this.semver,this.options)}intersects(t,i){if(!(t instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new eS(t.value,i).test(this.value):t.operator===""?t.value===""?!0:new eS(this.value,i).test(t.semver):(i=Xv(i),i.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")||!i.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&t.operator.startsWith(">")||this.operator.startsWith("<")&&t.operator.startsWith("<")||this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")||$u(this.semver,"<",t.semver,i)&&this.operator.startsWith(">")&&t.operator.startsWith("<")||$u(this.semver,">",t.semver,i)&&this.operator.startsWith("<")&&t.operator.startsWith(">")))}};tS.exports=Mu;var Xv=Jn(),{safeRe:Zv,t:Yv}=Gr(),$u=Nu(),ju=qs(),Qv=We(),eS=ht()});var Zs=me((aq,rS)=>{"use strict";var IF=ht(),TF=(e,t,i)=>{try{t=new IF(t,i)}catch{return!1}return t.test(e)};rS.exports=TF});var iS=me((lq,sS)=>{"use strict";var PF=ht(),xF=(e,t)=>new PF(e,t).set.map(i=>i.map(u=>u.value).join(" ").trim().split(" "));sS.exports=xF});var oS=me((cq,nS)=>{"use strict";var NF=We(),kF=ht(),LF=(e,t,i)=>{let u=null,n=null,l=null;try{l=new kF(t,i)}catch{return null}return e.forEach(c=>{l.test(c)&&(!u||n.compare(c)===-1)&&(u=c,n=new NF(u,i))}),u};nS.exports=LF});var lS=me((uq,aS)=>{"use strict";var DF=We(),$F=ht(),jF=(e,t,i)=>{let u=null,n=null,l=null;try{l=new $F(t,i)}catch{return null}return e.forEach(c=>{l.test(c)&&(!u||n.compare(c)===1)&&(u=c,n=new DF(u,i))}),u};aS.exports=jF});var hS=me((hq,uS)=>{"use strict";var Bu=We(),MF=ht(),cS=Ks(),BF=(e,t)=>{e=new MF(e,t);let i=new Bu("0.0.0");if(e.test(i)||(i=new Bu("0.0.0-0"),e.test(i)))return i;i=null;for(let u=0;u<e.set.length;++u){let n=e.set[u],l=null;n.forEach(c=>{let r=new Bu(c.semver.version);switch(c.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!l||cS(r,l))&&(l=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),l&&(!i||cS(i,l))&&(i=l)}return i&&e.test(i)?i:null};uS.exports=BF});var dS=me((pq,pS)=>{"use strict";var UF=ht(),FF=(e,t)=>{try{return new UF(e,t).range||"*"}catch{return null}};pS.exports=FF});var oo=me((dq,yS)=>{"use strict";var HF=We(),mS=Js(),{ANY:GF}=mS,VF=ht(),WF=Zs(),fS=Ks(),gS=to(),zF=so(),qF=ro(),KF=(e,t,i,u)=>{e=new HF(e,u),t=new VF(t,u);let n,l,c,r,s;switch(i){case">":n=fS,l=zF,c=gS,r=">",s=">=";break;case"<":n=gS,l=qF,c=fS,r="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(WF(e,t,u))return!1;for(let o=0;o<t.set.length;++o){let a=t.set[o],h=null,p=null;if(a.forEach(d=>{d.semver===GF&&(d=new mS(">=0.0.0")),h=h||d,p=p||d,n(d.semver,h.semver,u)?h=d:c(d.semver,p.semver,u)&&(p=d)}),h.operator===r||h.operator===s||(!p.operator||p.operator===r)&&l(e,p.semver))return!1;if(p.operator===s&&c(e,p.semver))return!1}return!0};yS.exports=KF});var SS=me((fq,vS)=>{"use strict";var JF=oo(),XF=(e,t,i)=>JF(e,t,">",i);vS.exports=XF});var bS=me((gq,ES)=>{"use strict";var ZF=oo(),YF=(e,t,i)=>ZF(e,t,"<",i);ES.exports=YF});var OS=me((mq,_S)=>{"use strict";var wS=ht(),QF=(e,t,i)=>(e=new wS(e,i),t=new wS(t,i),e.intersects(t,i));_S.exports=QF});var AS=me((yq,RS)=>{"use strict";var eH=Zs(),tH=ut();RS.exports=(e,t,i)=>{let u=[],n=null,l=null,c=e.sort((a,h)=>tH(a,h,i));for(let a of c)eH(a,t,i)?(l=a,n||(n=a)):(l&&u.push([n,l]),l=null,n=null);n&&u.push([n,null]);let r=[];for(let[a,h]of u)a===h?r.push(a):!h&&a===c[0]?r.push("*"):h?a===c[0]?r.push(`<=${h}`):r.push(`${a} - ${h}`):r.push(`>=${a}`);let s=r.join(" || "),o=typeof t.raw=="string"?t.raw:String(t);return s.length<o.length?s:t}});var NS=me((vq,xS)=>{"use strict";var CS=ht(),Fu=Js(),{ANY:Uu}=Fu,Ys=Zs(),Hu=ut(),rH=(e,t,i={})=>{if(e===t)return!0;e=new CS(e,i),t=new CS(t,i);let u=!1;e:for(let n of e.set){for(let l of t.set){let c=iH(n,l,i);if(u=u||c!==null,c)continue e}if(u)return!1}return!0},sH=[new Fu(">=0.0.0-0")],IS=[new Fu(">=0.0.0")],iH=(e,t,i)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===Uu){if(t.length===1&&t[0].semver===Uu)return!0;i.includePrerelease?e=sH:e=IS}if(t.length===1&&t[0].semver===Uu){if(i.includePrerelease)return!0;t=IS}let u=new Set,n,l;for(let d of e)d.operator===">"||d.operator===">="?n=TS(n,d,i):d.operator==="<"||d.operator==="<="?l=PS(l,d,i):u.add(d.semver);if(u.size>1)return null;let c;if(n&&l){if(c=Hu(n.semver,l.semver,i),c>0)return null;if(c===0&&(n.operator!==">="||l.operator!=="<="))return null}for(let d of u){if(n&&!Ys(d,String(n),i)||l&&!Ys(d,String(l),i))return null;for(let m of t)if(!Ys(d,String(m),i))return!1;return!0}let r,s,o,a,h=l&&!i.includePrerelease&&l.semver.prerelease.length?l.semver:!1,p=n&&!i.includePrerelease&&n.semver.prerelease.length?n.semver:!1;h&&h.prerelease.length===1&&l.operator==="<"&&h.prerelease[0]===0&&(h=!1);for(let d of t){if(a=a||d.operator===">"||d.operator===">=",o=o||d.operator==="<"||d.operator==="<=",n){if(p&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===p.major&&d.semver.minor===p.minor&&d.semver.patch===p.patch&&(p=!1),d.operator===">"||d.operator===">="){if(r=TS(n,d,i),r===d&&r!==n)return!1}else if(n.operator===">="&&!Ys(n.semver,String(d),i))return!1}if(l){if(h&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===h.major&&d.semver.minor===h.minor&&d.semver.patch===h.patch&&(h=!1),d.operator==="<"||d.operator==="<="){if(s=PS(l,d,i),s===d&&s!==l)return!1}else if(l.operator==="<="&&!Ys(l.semver,String(d),i))return!1}if(!d.operator&&(l||n)&&c!==0)return!1}return!(n&&o&&!l&&c!==0||l&&a&&!n&&c!==0||p||h)},TS=(e,t,i)=>{if(!e)return t;let u=Hu(e.semver,t.semver,i);return u>0?e:u<0||t.operator===">"&&e.operator===">="?t:e},PS=(e,t,i)=>{if(!e)return t;let u=Hu(e.semver,t.semver,i);return u<0?e:u>0||t.operator==="<"&&e.operator==="<="?t:e};xS.exports=rH});var $S=me((Sq,DS)=>{"use strict";var Gu=Gr(),kS=zs(),nH=We(),LS=Iu(),oH=nr(),aH=ov(),lH=lv(),cH=hv(),uH=fv(),hH=mv(),pH=vv(),dH=Ev(),fH=wv(),gH=ut(),mH=Av(),yH=Iv(),vH=eo(),SH=Nv(),EH=Lv(),bH=Ks(),wH=to(),_H=Pu(),OH=xu(),RH=ro(),AH=so(),CH=Nu(),IH=Gv(),TH=Js(),PH=ht(),xH=Zs(),NH=iS(),kH=oS(),LH=lS(),DH=hS(),$H=dS(),jH=oo(),MH=SS(),BH=bS(),UH=OS(),FH=AS(),HH=NS();DS.exports={parse:oH,valid:aH,clean:lH,inc:cH,diff:uH,major:hH,minor:pH,patch:dH,prerelease:fH,compare:gH,rcompare:mH,compareLoose:yH,compareBuild:vH,sort:SH,rsort:EH,gt:bH,lt:wH,eq:_H,neq:OH,gte:RH,lte:AH,cmp:CH,coerce:IH,Comparator:TH,Range:PH,satisfies:xH,toComparators:NH,maxSatisfying:kH,minSatisfying:LH,minVersion:DH,validRange:$H,outside:jH,gtr:MH,ltr:BH,intersects:UH,simplifyRange:FH,subset:HH,SemVer:nH,re:Gu.re,src:Gu.src,tokens:Gu.t,SEMVER_SPEC_VERSION:kS.SEMVER_SPEC_VERSION,RELEASE_TYPES:kS.RELEASE_TYPES,compareIdentifiers:LS.compareIdentifiers,rcompareIdentifiers:LS.rcompareIdentifiers}});var Me=class{};var Wr=class extends Me{locale;options;constructor(t,i){super(),this.locale="en-US",this.options=i||{}}compare(t,i){return t<i?-1:t>i?1:0}resolvedOptions(){return{caseFirst:"false",collation:"default",ignorePunctuation:!1,locale:"en-US",numeric:!1,sensitivity:"variant",usage:"sort"}}};var zr=class extends Me{locale;options;constructor(t,i){super(),this.locale="en-US",this.options=i||{}}format(t){return t instanceof Date||(t=new Date(t||Date.now())),t.toISOString()}formatToParts(t){return[{type:"literal",value:this.format(t)}]}resolvedOptions(){return{calendar:"gregory",locale:"en-US",numberingSystem:"latn",timeZone:"UTC"}}};var qr=class extends Me{locale;type;constructor(t,i){super(),this.locale="en-US",this.type=i?.type||"language"}of(t){return t}resolvedOptions(){return{fallback:"code",locale:"en-US",style:"long",type:this.type}}};var Kr=class extends Me{locale;type;constructor(t,i){super(),this.locale="en-US",this.type=i?.type||"conjunction"}format(t){if(!Array.isArray(t)||t.length===0)return"";if(t.length===1)return String(t[0]);if(t.length===2)return`${t[0]} and ${t[1]}`;let i=t[t.length-1];return`${t.slice(0,-1).join(", ")}, and ${i}`}formatToParts(t){return[{type:"element",value:this.format(t)}]}resolvedOptions(){return{locale:"en-US",style:"long",type:this.type}}};var Jr=class extends Me{baseName;language;constructor(t,i){super(),this.baseName="en-US",this.language="en"}toString(){return this.baseName}};var Xr=class extends Me{currency;locale;options;style;constructor(t,i){super(),this.locale="en-US",this.options=i||{},this.style=i?.style||"decimal",this.currency=i?.currency}format(t){return this.style==="currency"&&this.currency?`${this.currency} ${t.toFixed(2)}`:this.style==="percent"?`${(t*100).toFixed(0)}%`:String(t)}formatToParts(t){return[{type:"integer",value:this.format(t)}]}resolvedOptions(){return{compactDisplay:"short",currency:this.currency,currencyDisplay:"symbol",currencySign:"standard",locale:"en-US",maximumFractionDigits:3,maximumSignificantDigits:21,minimumFractionDigits:0,minimumIntegerDigits:1,minimumSignificantDigits:1,notation:"standard",numberingSystem:"latn",roundingIncrement:1,roundingMode:"halfExpand",roundingPriority:"auto",signDisplay:"auto",style:this.style,trailingZeroDisplay:"auto",useGrouping:"auto"}}};var Zr=class extends Me{locale;constructor(t,i){super(),this.locale="en-US"}select(t){return t===1?"one":"other"}resolvedOptions(){return{locale:"en-US",maximumFractionDigits:3,minimumFractionDigits:0,minimumIntegerDigits:1,pluralCategories:["one","other"],type:"cardinal"}}};var Yr=class extends Me{locale;numeric;constructor(t,i){super(),this.locale="en-US",this.numeric=i?.numeric||"always"}format(t,i){let u=Math.abs(t),n=t<0?"":"in ",l=t<0?" ago":"";return`${n}${u} ${i}${u!==1?"s":""}${l}`}formatToParts(t,i){return[{type:"literal",value:this.format(t,i)}]}resolvedOptions(){return{locale:"en-US",numberingSystem:"latn",numeric:this.numeric,style:"long"}}};var Qr=class extends Me{granularity;locale;constructor(t,i){super(),this.locale="en-US",this.granularity=i?.granularity||"grapheme"}segment(t){let i=[];for(let u=0;u<t.length;u++)i.push({index:u,input:t,segment:t[u]});return i}resolvedOptions(){return{granularity:this.granularity,locale:"en-US"}}};function qu(e){return Array.isArray(e)?e.length>0?["en-US"]:[]:e?["en-US"]:[]}function Ku(e){return{calendar:["gregory"],collation:["default"],currency:["USD"],numberingSystem:["latn"],timeZone:["UTC"],unit:["meter","second","byte"]}[e]||[]}typeof globalThis.Intl>"u"&&(globalThis.Intl={Collator:Wr,DateTimeFormat:zr,DisplayNames:qr,ListFormat:Kr,Locale:Jr,NumberFormat:Xr,PluralRules:Zr,RelativeTimeFormat:Yr,Segmenter:Qr,getCanonicalLocales:qu,supportedValuesOf:Ku},Object.defineProperty(globalThis,"Intl",{configurable:!1,enumerable:!1,value:globalThis.Intl,writable:!1}));var ao=require("fs"),MS=require("os"),Wu=_t(require("path"),1),BS=_t(Rf(),1),US=_t(kt(),1),FS=_t(e0(),1),HS=_t(n0(),1),ze=_t(jt(),1),lo=_t(q0(),1),GS=_t(Fi(),1),VH=_t($S(),1);var GH="sktsec_",Eq=GH.length;var jS="https://github.com/SocketDev/socket-cli/issues";var Vu=Wu.default.join((0,MS.homedir)(),".socket","_dlx"),_q=(0,HS.envAsBoolean)(process.env.SOCKET_CLI_DISABLE_NODE_FORWARDING);function WH(e){if(!e)throw new Error("CLI package directory not initialized");return{cliEntry:Wu.default.join(e,"node_modules","@socketsecurity","cli","dist","index.js")}}function VS(){return process.argv?process.argv.slice(2):[]}async function zH(){try{let e=await(0,BS.which)("node",{all:!0,nothrow:!0});if(!e)return;let t=Array.isArray(e)?e:[e],i=process.execPath;return t.find(n=>n!==i)}catch{return}}async function qH(e,t){let u=await zH()??process.execPath,n=await(0,GS.spawn)(u,[e,...t],{stdio:["inherit","inherit","inherit","ipc"]});n.process&&typeof n.process.send=="function"&&n.process.send({[US.SOCKET_IPC_HANDSHAKE]:{subprocess:!0,parent_pid:process.pid}}),process.exit(n.code??0)}async function KH(){try{(0,ao.mkdirSync)(Vu,{recursive:!0})}catch(e){ze.logger.error("Failed to create Socket directory"),ze.logger.error(` Error: ${e instanceof Error?e.message:String(e)}`),ze.logger.error(` Path: ${Vu}`),process.exit(1)}try{let e=await(0,lo.withSpinner)({message:"Socket powering up\u2026",spinner:(0,lo.Spinner)({shimmer:{dir:"random"}}),operation:async()=>await(0,FS.downloadPackage)({package:"@socketsecurity/cli",binaryName:"socket",force:!1})});return ze.logger.log(""),e}catch(e){ze.logger.error("Failed to download Socket CLI"),ze.logger.error(` Error: ${e instanceof Error?e.message:String(e)}`),ze.logger.error(""),ze.logger.error("This may be a temporary issue. Please try:"),ze.logger.error(" 1. Check your internet connection"),ze.logger.error(" 2. Try running the command again"),ze.logger.error(` 3. Manually create directory: mkdir -p "${Vu}"`),ze.logger.error(` 4. Report issue at: ${jS}`),process.exit(1)}}async function WS(e){let i=(await KH()).packageDir,{cliEntry:u}=WH(i);(0,ao.existsSync)(u)&&await qH(u,e),ze.logger.error("Socket CLI installation failed"),ze.logger.error(" CLI entry point not found after installation"),ze.logger.error(` Looked in: ${u}`),process.exit(1)}async function JH(){let e=VS();await WS(e)}JH().catch(e=>{process.stderr.write(`Bootstrap error: ${e instanceof Error?e.message:String(e)}
120
- `),process.exit(1)});
121
- /*! Bundled license information:
122
-
123
- @socketsecurity/lib/dist/external/fast-glob.js:
124
- (*! Bundled license information:
125
-
126
- is-extglob/index.js:
127
- (*!
128
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
129
- *
130
- * Copyright (c) 2014-2016, Jon Schlinkert.
131
- * Licensed under the MIT License.
132
- *)
133
-
134
- is-glob/index.js:
135
- (*!
136
- * is-glob <https://github.com/jonschlinkert/is-glob>
137
- *
138
- * Copyright (c) 2014-2017, Jon Schlinkert.
139
- * Released under the MIT License.
140
- *)
141
-
142
- is-number/index.js:
143
- (*!
144
- * is-number <https://github.com/jonschlinkert/is-number>
145
- *
146
- * Copyright (c) 2014-present, Jon Schlinkert.
147
- * Released under the MIT License.
148
- *)
149
-
150
- to-regex-range/index.js:
151
- (*!
152
- * to-regex-range <https://github.com/micromatch/to-regex-range>
153
- *
154
- * Copyright (c) 2015-present, Jon Schlinkert.
155
- * Released under the MIT License.
156
- *)
157
-
158
- fill-range/index.js:
159
- (*!
160
- * fill-range <https://github.com/jonschlinkert/fill-range>
161
- *
162
- * Copyright (c) 2014-present, Jon Schlinkert.
163
- * Licensed under the MIT License.
164
- *)
165
-
166
- queue-microtask/index.js:
167
- (*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
168
-
169
- run-parallel/index.js:
170
- (*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
171
- *)
172
-
173
- @socketsecurity/lib/dist/external/del.js:
174
- (*! Bundled license information:
175
-
176
- is-extglob/index.js:
177
- (*!
178
- * is-extglob <https://github.com/jonschlinkert/is-extglob>
179
- *
180
- * Copyright (c) 2014-2016, Jon Schlinkert.
181
- * Licensed under the MIT License.
182
- *)
183
-
184
- is-glob/index.js:
185
- (*!
186
- * is-glob <https://github.com/jonschlinkert/is-glob>
187
- *
188
- * Copyright (c) 2014-2017, Jon Schlinkert.
189
- * Released under the MIT License.
190
- *)
191
-
192
- is-number/index.js:
193
- (*!
194
- * is-number <https://github.com/jonschlinkert/is-number>
195
- *
196
- * Copyright (c) 2014-present, Jon Schlinkert.
197
- * Released under the MIT License.
198
- *)
199
-
200
- to-regex-range/index.js:
201
- (*!
202
- * to-regex-range <https://github.com/micromatch/to-regex-range>
203
- *
204
- * Copyright (c) 2015-present, Jon Schlinkert.
205
- * Released under the MIT License.
206
- *)
207
-
208
- fill-range/index.js:
209
- (*!
210
- * fill-range <https://github.com/jonschlinkert/fill-range>
211
- *
212
- * Copyright (c) 2014-present, Jon Schlinkert.
213
- * Licensed under the MIT License.
214
- *)
215
-
216
- queue-microtask/index.js:
217
- (*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
218
-
219
- run-parallel/index.js:
220
- (*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
221
- *)
222
-
223
- @socketsecurity/lib/dist/external/pacote.js:
224
- (*! Bundled license information:
225
-
226
- imurmurhash/imurmurhash.js:
227
- (**
228
- * @preserve
229
- * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
230
- *
231
- * @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
232
- * @see http://github.com/homebrewing/brauhaus-diff
233
- * @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
234
- * @see http://github.com/garycourt/murmurhash-js
235
- * @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
236
- * @see http://sites.google.com/site/murmurhash/
237
- *)
238
-
239
- negotiator/index.js:
240
- (*!
241
- * negotiator
242
- * Copyright(c) 2012 Federico Romero
243
- * Copyright(c) 2012-2014 Isaac Z. Schlueter
244
- * Copyright(c) 2015 Douglas Christopher Wilson
245
- * MIT Licensed
246
- *)
247
-
248
- make-fetch-happen/lib/fetch.js:
249
- (**
250
- * @license
251
- * Copyright (c) 2010-2012 Mikeal Rogers
252
- * Licensed under the Apache License, Version 2.0 (the "License");
253
- * you may not use this file except in compliance with the License.
254
- * You may obtain a copy of the License at
255
- * http://www.apache.org/licenses/LICENSE-2.0
256
- * Unless required by applicable law or agreed to in writing,
257
- * software distributed under the License is distributed on an "AS
258
- * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
259
- * express or implied. See the License for the specific language
260
- * governing permissions and limitations under the License.
261
- *)
262
- *)
263
- */