@pinnacle0/pnpm-single-version 1.0.8 → 1.0.9

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.
@@ -10,7 +10,7 @@ Caused by: `+Eu(r)),e}function hu(t,e){e.err={name:t.name,message:t.message,code
10
10
  `:`
11
11
  `)+r,s=n+1,n=t.indexOf(`
12
12
  `,s)}while(n!==-1);return i+=t.slice(s),i}var{stdout:Wo,stderr:Ho}=Go,Gr=Symbol("GENERATOR"),Te=Symbol("STYLER"),He=Symbol("IS_EMPTY"),zo=["ansi","ansi","ansi256","ansi16m"],$e=Object.create(null),yd=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Wo?Wo.level:0;t.level=e.level===void 0?r:e.level};var Ed=t=>{let e=(...r)=>r.join(" ");return yd(e,t),Object.setPrototypeOf(e,ze.prototype),e};function ze(t){return Ed(t)}Object.setPrototypeOf(ze.prototype,Function.prototype);for(let[t,e]of Object.entries(ee))$e[t]={get(){let r=It(this,Ur(e.open,e.close,this[Te]),this[He]);return Object.defineProperty(this,t,{value:r}),r}};$e.visible={get(){let t=It(this,this[Te],!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Vr=(t,e,r,...n)=>t==="rgb"?e==="ansi16m"?ee[r].ansi16m(...n):e==="ansi256"?ee[r].ansi256(ee.rgbToAnsi256(...n)):ee[r].ansi(ee.rgbToAnsi(...n)):t==="hex"?Vr("rgb",e,r,...ee.hexToRgb(...n)):ee[r][t](...n),_d=["rgb","hex","ansi256"];for(let t of _d){$e[t]={get(){let{level:r}=this;return function(...n){let s=Ur(Vr(t,zo[r],"color",...n),ee.color.close,this[Te]);return It(this,s,this[He])}}};let e="bg"+t[0].toUpperCase()+t.slice(1);$e[e]={get(){let{level:r}=this;return function(...n){let s=Ur(Vr(t,zo[r],"bgColor",...n),ee.bgColor.close,this[Te]);return It(this,s,this[He])}}}}var Od=Object.defineProperties(()=>{},{...$e,level:{enumerable:!0,get(){return this[Gr].level},set(t){this[Gr].level=t}}}),Ur=(t,e,r)=>{let n,s;return r===void 0?(n=t,s=e):(n=r.openAll+t,s=e+r.closeAll),{open:t,close:e,openAll:n,closeAll:s,parent:r}},It=(t,e,r)=>{let n=(...s)=>bd(n,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(n,Od),n[Gr]=t,n[Te]=e,n[He]=r,n},bd=(t,e)=>{if(t.level<=0||!e)return t[He]?"":e;let r=t[Te];if(r===void 0)return e;let{openAll:n,closeAll:s}=r;if(e.includes("\x1B"))for(;r!==void 0;)e=Vo(e,r.close,r.open),r=r.parent;let i=e.indexOf(`
13
- `);return i!==-1&&(e=Uo(e,s,n,i)),n+e+s};Object.defineProperties(ze.prototype,$e);var vd=ze(),e0=ze({level:Ho?Ho.level:0});var V=vd;var Pt="pnpmSingleVersion",Xo="Single Version Checker";var Rt=class extends Error{constructor(){super("Can not find project root"),this.name="ProjectRootError"}};var Lt=class extends Error{constructor(){super(`Unable to find option ${V.blueBright(`'${Pt}'`)} in package.json of root project `),this.name="OptionsNotFound"}},Xe=class extends Error{constructor(e){super(`Invalid option: ${e}`),this.name="OptionSyntaxError"}};var xt=class extends Error{constructor(){super("'packages' in lockfile is missing"),this.name="LockfilePackagesMissingError"}};var Wr=(t,e,r)=>{let n=t instanceof RegExp?Ko(t,r):t,s=e instanceof RegExp?Ko(e,r):e,i=n!==null&&s!=null&&wd(n,s,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+n.length,i[1]),post:r.slice(i[1]+s.length)}},Ko=(t,e)=>{let r=e.match(t);return r?r[0]:null},wd=(t,e,r)=>{let n,s,i,o,c,u=r.indexOf(t),a=r.indexOf(e,u+1),l=u;if(u>=0&&a>0){if(t===e)return[u,a];for(n=[],i=r.length;l>=0&&!c;){if(l===u)n.push(l),u=r.indexOf(t,l+1);else if(n.length===1){let f=n.pop();f!==void 0&&(c=[f,a])}else s=n.pop(),s!==void 0&&s<i&&(i=s,o=a),a=r.indexOf(e,l+1);l=u<a&&u>=0?u:a}n.length&&o!==void 0&&(c=[i,o])}return c};var Yo="\0SLASH"+Math.random()+"\0",Jo="\0OPEN"+Math.random()+"\0",zr="\0CLOSE"+Math.random()+"\0",Zo="\0COMMA"+Math.random()+"\0",Qo="\0PERIOD"+Math.random()+"\0",Sd=new RegExp(Yo,"g"),Id=new RegExp(Jo,"g"),Pd=new RegExp(zr,"g"),Rd=new RegExp(Zo,"g"),Ld=new RegExp(Qo,"g"),xd=/\\\\/g,Nd=/\\{/g,Ad=/\\}/g,Td=/\\,/g,$d=/\\./g,qd=1e5;function Hr(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function jd(t){return t.replace(xd,Yo).replace(Nd,Jo).replace(Ad,zr).replace(Td,Zo).replace($d,Qo)}function Md(t){return t.replace(Sd,"\\").replace(Id,"{").replace(Pd,"}").replace(Rd,",").replace(Ld,".")}function ec(t){if(!t)return[""];let e=[],r=Wr("{","}",t);if(!r)return t.split(",");let{pre:n,body:s,post:i}=r,o=n.split(",");o[o.length-1]+="{"+s+"}";let c=ec(i);return i.length&&(o[o.length-1]+=c.shift(),o.push.apply(o,c)),e.push.apply(e,o),e}function tc(t,e={}){if(!t)return[];let{max:r=qd}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),Ke(jd(t),r,!0).map(Md)}function Cd(t){return"{"+t+"}"}function Dd(t){return/^-?0\d/.test(t)}function Fd(t,e){return t<=e}function kd(t,e){return t>=e}function Ke(t,e,r){let n=[],s=Wr("{","}",t);if(!s)return[t];let i=s.pre,o=s.post.length?Ke(s.post,e,!1):[""];if(/\$$/.test(s.pre))for(let c=0;c<o.length&&c<e;c++){let u=i+"{"+s.body+"}"+o[c];n.push(u)}else{let c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),a=c||u,l=s.body.indexOf(",")>=0;if(!a&&!l)return s.post.match(/,(?!,).*\}/)?(t=s.pre+"{"+s.body+zr+s.post,Ke(t,e,!0)):[t];let f;if(a)f=s.body.split(/\.\./);else if(f=ec(s.body),f.length===1&&f[0]!==void 0&&(f=Ke(f[0],e,!1).map(Cd),f.length===1))return o.map(h=>s.pre+f[0]+h);let d;if(a&&f[0]!==void 0&&f[1]!==void 0){let h=Hr(f[0]),E=Hr(f[1]),y=Math.max(f[0].length,f[1].length),I=f.length===3&&f[2]!==void 0?Math.abs(Hr(f[2])):1,v=Fd;E<h&&(I*=-1,v=kd);let C=f.some(Dd);d=[];for(let B=h;v(B,E);B+=I){let T;if(u)T=String.fromCharCode(B),T==="\\"&&(T="");else if(T=String(B),C){let be=y-T.length;if(be>0){let oe=new Array(be+1).join("0");B<0?T="-"+oe+T.slice(1):T=oe+T}}d.push(T)}}else{d=[];for(let h=0;h<f.length;h++)d.push.apply(d,Ke(f[h],e,!1))}for(let h=0;h<d.length;h++)for(let E=0;E<o.length&&n.length<e;E++){let y=i+d[h]+o[E];(!r||a||y)&&n.push(y)}}return n}var Ye=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var Bd={"[: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]},Je=t=>t.replace(/[[\]\\-]/g,"\\$&"),Gd=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),rc=t=>t.join(""),nc=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],s=[],i=r+1,o=!1,c=!1,u=!1,a=!1,l=r,f="";e:for(;i<t.length;){let y=t.charAt(i);if((y==="!"||y==="^")&&i===r+1){a=!0,i++;continue}if(y==="]"&&o&&!u){l=i+1;break}if(o=!0,y==="\\"&&!u){u=!0,i++;continue}if(y==="["&&!u){for(let[I,[v,w,C]]of Object.entries(Bd))if(t.startsWith(I,i)){if(f)return["$.",!1,t.length-r,!0];i+=I.length,C?s.push(v):n.push(v),c=c||w;continue e}}if(u=!1,f){y>f?n.push(Je(f)+"-"+Je(y)):y===f&&n.push(Je(y)),f="",i++;continue}if(t.startsWith("-]",i+1)){n.push(Je(y+"-")),i+=2;continue}if(t.startsWith("-",i+1)){f=y,i+=2;continue}n.push(Je(y)),i++}if(l<i)return["",!1,0,!1];if(!n.length&&!s.length)return["$.",!1,t.length-r,!0];if(s.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!a){let y=n[0].length===2?n[0].slice(-1):n[0];return[Gd(y),!1,l-r,!1]}let d="["+(a?"^":"")+rc(n)+"]",h="["+(a?"":"^")+rc(s)+"]";return[n.length&&s.length?"("+d+"|"+h+")":n.length?d:h,c,l-r,!0]};var ae=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!0}={})=>r?e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?t.replace(/\[([^\/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");var U,Vd=new Set(["!","?","+","*","@"]),Xr=t=>Vd.has(t),sc=t=>Xr(t.type),Ud=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),Wd=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),Hd=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),ic=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),zd="(?!(?:^|/)\\.\\.?(?:$|/))",Nt="(?!\\.)",Xd=new Set(["[","."]),Kd=new Set(["..","."]),Yd=new Set("().*{}+?[]^$\\!"),Jd=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Kr="[^/]",oc=Kr+"*?",cc=Kr+"+?",Zd=0,ye=class{type;#t;#r;#s=!1;#e=[];#n;#c;#a;#u=!1;#i;#o;#l=!1;id=++Zd;get depth(){return(this.#n?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#t.id,parent:this.#n?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(e,r,n={}){this.type=e,e&&(this.#r=!0),this.#n=r,this.#t=this.#n?this.#n.#t:this,this.#i=this.#t===this?n:this.#t.#i,this.#a=this.#t===this?[]:this.#t.#a,e==="!"&&!this.#t.#u&&this.#a.push(this),this.#c=this.#n?this.#n.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#o=this.#e.map(e=>String(e)).join("")}#y(){if(this!==this.#t)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let e;for(;e=this.#a.pop();){if(e.type!=="!")continue;let r=e,n=r.#n;for(;n;){for(let s=r.#c+1;!n.type&&s<n.#e.length;s++)for(let i of e.#e){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(n.#e[s])}r=n,n=r.#n}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof U&&r.#n===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let e=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#u&&this.#n?.type==="!")&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#n?.isStart())return!1;if(this.#c===0)return!0;let e=this.#n;for(let r=0;r<this.#c;r++){let n=e.#e[r];if(!(n instanceof U&&n.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#n?.type==="!")return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();let e=this.#n?this.#n.#e.length:0;return this.#c===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new U(this.type,e);for(let n of this.#e)r.copyIn(n);return r}static#f(e,r,n,s,i){let o=s.maxExtglobRecursion??2,c=!1,u=!1,a=-1,l=!1;if(r.type===null){let y=n,I="";for(;y<e.length;){let v=e.charAt(y++);if(c||v==="\\"){c=!c,I+=v;continue}if(u){y===a+1?(v==="^"||v==="!")&&(l=!0):v==="]"&&!(y===a+2&&l)&&(u=!1),I+=v;continue}else if(v==="["){u=!0,a=y,l=!1,I+=v;continue}if(!s.noext&&Xr(v)&&e.charAt(y)==="("&&i<=o){r.push(I),I="";let C=new U(v,r);y=U.#f(e,C,y,s,i+1),r.push(C);continue}I+=v}return r.push(I),y}let f=n+1,d=new U(null,r),h=[],E="";for(;f<e.length;){let y=e.charAt(f++);if(c||y==="\\"){c=!c,E+=y;continue}if(u){f===a+1?(y==="^"||y==="!")&&(l=!0):y==="]"&&!(f===a+2&&l)&&(u=!1),E+=y;continue}else if(y==="["){u=!0,a=f,l=!1,E+=y;continue}if(!s.noext&&Xr(y)&&e.charAt(f)==="("&&(i<=o||r&&r.#p(y))){let v=r&&r.#p(y)?0:1;d.push(E),E="";let w=new U(y,d);d.push(w),f=U.#f(e,w,f,s,i+v);continue}if(y==="|"){d.push(E),E="",h.push(d),d=new U(null,r);continue}if(y===")")return E===""&&r.#e.length===0&&(r.#l=!0),d.push(E),E="",r.push(...h,d),f;E+=y}return r.type=null,r.#r=void 0,r.#e=[e.substring(n-1)],f}#E(e){return this.#d(e,Wd)}#d(e,r=Ud){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null)return!1;let n=e.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#p(n.type,r)}#p(e,r=Hd){return!!r.get(this.type)?.includes(e)}#_(e,r){let n=e.#e[0],s=new U(null,n,this.options);s.#e.push(""),n.push(s),this.#g(e,r)}#g(e,r){let n=e.#e[0];this.#e.splice(r,1,...n.#e);for(let s of n.#e)typeof s=="object"&&(s.#n=this);this.#o=void 0}#O(e){return!!ic.get(this.type)?.has(e)}#b(e){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=e.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#O(r.type)}#v(e){let r=ic.get(this.type),n=e.#e[0],s=r?.get(n.type);if(!s)return!1;this.#e=n.#e;for(let i of this.#e)typeof i=="object"&&(i.#n=this);this.type=s,this.#o=void 0,this.#l=!1}static fromGlob(e,r={}){let n=new U(null,void 0,r);return U.#f(e,n,0,r,0),n}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let e=this.toString(),[r,n,s,i]=this.toRegExpSource();if(!(s||this.#r||this.#i.nocase&&!this.#i.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let c=(this.#i.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${r}$`,c),{_src:r,_glob:e})}get options(){return this.#i}toRegExpSource(e){let r=e??!!this.#i.dot;if(this.#t===this&&(this.#h(),this.#y()),!sc(this)){let u=this.isStart()&&this.isEnd()&&!this.#e.some(h=>typeof h!="string"),a=this.#e.map(h=>{let[E,y,I,v]=typeof h=="string"?U.#w(h,this.#r,u):h.toRegExpSource(e);return this.#r=this.#r||I,this.#s=this.#s||v,E}).join(""),l="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&Kd.has(this.#e[0]))){let E=Xd,y=r&&E.has(a.charAt(0))||a.startsWith("\\.")&&E.has(a.charAt(2))||a.startsWith("\\.\\.")&&E.has(a.charAt(4)),I=!r&&!e&&E.has(a.charAt(0));l=y?zd:I?Nt:""}let f="";return this.isEnd()&&this.#t.#u&&this.#n?.type==="!"&&(f="(?:$|\\/)"),[l+a+f,ae(a),this.#r=!!this.#r,this.#s]}let n=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:",i=this.#m(r);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){let u=this.toString(),a=this;return a.#e=[u],a.type=null,a.#r=void 0,[u,ae(this.toString()),!1,!1]}let o=!n||e||r||!Nt?"":this.#m(!0);o===i&&(o=""),o&&(i=`(?:${i})(?:${o})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!r?Nt:"")+cc;else{let u=this.type==="!"?"))"+(this.isStart()&&!r&&!e?Nt:"")+oc+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;c=s+i+u}return[c,ae(i),this.#r=!!this.#r,this.#s]}#h(){if(sc(this)){let e=0,r=!1;do{r=!0;for(let n=0;n<this.#e.length;n++){let s=this.#e[n];typeof s=="object"&&(s.#h(),this.#d(s)?(r=!1,this.#g(s,n)):this.#E(s)?(r=!1,this.#_(s,n)):this.#b(s)&&(r=!1,this.#v(s)))}}while(!r&&++e<10)}else for(let e of this.#e)typeof e=="object"&&e.#h();this.#o=void 0}#m(e){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,s,i,o]=r.toRegExpSource(e);return this.#s=this.#s||o,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#w(e,r,n=!1){let s=!1,i="",o=!1,c=!1;for(let u=0;u<e.length;u++){let a=e.charAt(u);if(s){s=!1,i+=(Yd.has(a)?"\\":"")+a;continue}if(a==="*"){if(c)continue;c=!0,i+=n&&/^[*]+$/.test(e)?cc:oc,r=!0;continue}else c=!1;if(a==="\\"){u===e.length-1?i+="\\\\":s=!0;continue}if(a==="["){let[l,f,d,h]=nc(e,u);if(d){i+=l,o=o||f,u+=d-1,r=r||h;continue}}if(a==="?"){i+=Kr,r=!0;continue}i+=Jd(a)}return[i,ae(e),!!r,o]}};U=ye;var Yr=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!1}={})=>r?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var $=(t,e,r={})=>(Ye(e),!r.nocomment&&e.charAt(0)==="#"?!1:new qe(e,r).match(t)),Qd=/^\*+([^+@!?\*\[\(]*)$/,eg=t=>e=>!e.startsWith(".")&&e.endsWith(t),tg=t=>e=>e.endsWith(t),rg=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),ng=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),sg=/^\*+\.\*+$/,ig=t=>!t.startsWith(".")&&t.includes("."),og=t=>t!=="."&&t!==".."&&t.includes("."),cg=/^\.\*+$/,ug=t=>t!=="."&&t!==".."&&t.startsWith("."),ag=/^\*+$/,lg=t=>t.length!==0&&!t.startsWith("."),fg=t=>t.length!==0&&t!=="."&&t!=="..",pg=/^\?+([^+@!?\*\[\(]*)?$/,hg=([t,e=""])=>{let r=lc([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},dg=([t,e=""])=>{let r=fc([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},gg=([t,e=""])=>{let r=fc([t]);return e?n=>r(n)&&n.endsWith(e):r},mg=([t,e=""])=>{let r=lc([t]);return e?n=>r(n)&&n.endsWith(e):r},lc=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},fc=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},pc=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",uc={win32:{sep:"\\"},posix:{sep:"/"}},yg=pc==="win32"?uc.win32.sep:uc.posix.sep;$.sep=yg;var M=Symbol("globstar **");$.GLOBSTAR=M;var Eg="[^/]",_g=Eg+"*?",Og="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",bg="(?:(?!(?:\\/|^)\\.).)*?",vg=(t,e={})=>r=>$(r,t,e);$.filter=vg;var Q=(t,e={})=>Object.assign({},t,e),wg=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return $;let e=$;return Object.assign((n,s,i={})=>e(n,s,Q(t,i)),{Minimatch:class extends e.Minimatch{constructor(s,i={}){super(s,Q(t,i))}static defaults(s){return e.defaults(Q(t,s)).Minimatch}},AST:class extends e.AST{constructor(s,i,o={}){super(s,i,Q(t,o))}static fromGlob(s,i={}){return e.AST.fromGlob(s,Q(t,i))}},unescape:(n,s={})=>e.unescape(n,Q(t,s)),escape:(n,s={})=>e.escape(n,Q(t,s)),filter:(n,s={})=>e.filter(n,Q(t,s)),defaults:n=>e.defaults(Q(t,n)),makeRe:(n,s={})=>e.makeRe(n,Q(t,s)),braceExpand:(n,s={})=>e.braceExpand(n,Q(t,s)),match:(n,s,i={})=>e.match(n,s,Q(t,i)),sep:e.sep,GLOBSTAR:M})};$.defaults=wg;var hc=(t,e={})=>(Ye(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:tc(t,{max:e.braceExpandMax}));$.braceExpand=hc;var Sg=(t,e={})=>new qe(t,e).makeRe();$.makeRe=Sg;var Ig=(t,e,r={})=>{let n=new qe(e,r);return t=t.filter(s=>n.match(s)),n.options.nonull&&!t.length&&t.push(e),t};$.match=Ig;var ac=/[?*]|[+@!]\(.*?\)|\[|\]/,Pg=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),qe=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,r={}){Ye(e),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=e,this.platform=r.platform||pc,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((i,o,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=i[0]===""&&i[1]===""&&(i[2]==="?"||!ac.test(i[2]))&&!ac.test(i[3]),a=/^[a-z]:/i.test(i[0]);if(u)return[...i.slice(0,4),...i.slice(4).map(l=>this.parse(l))];if(a)return[i[0],...i.slice(1).map(l=>this.parse(l))]}return i.map(u=>this.parse(u))});if(this.debug(this.pattern,s),this.set=s.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){let o=this.set[i];o[0]===""&&o[1]===""&&this.globParts[i][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n=0;n<e.length;n++)for(let s=0;s<e[n].length;s++)e[n][s]==="**"&&(e[n][s]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let s=n;for(;r[s+1]==="**";)s++;s!==n&&r.splice(n,s-n)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((n,s)=>{let i=n[n.length-1];return s==="**"&&i==="**"?n:s===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(n.pop(),n):(n.push(s),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let s=1;s<e.length-1;s++){let i=e[s];s===1&&i===""&&e[0]===""||(i==="."||i==="")&&(r=!0,e.splice(s,1),s--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let s=e[n-1];s&&s!=="."&&s!==".."&&s!=="**"&&(r=!0,e.splice(n-1,2),n-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let n of e){let s=-1;for(;(s=n.indexOf("**",s+1))!==-1;){let o=s;for(;n[o+1]==="**";)o++;o>s&&n.splice(s+1,o-s);let c=n[s+1],u=n[s+2],a=n[s+3];if(c!==".."||!u||u==="."||u===".."||!a||a==="."||a==="..")continue;r=!0,n.splice(s,1);let l=n.slice(0);l[s]="**",e.push(l),s--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){let c=n[o];o===1&&c===""&&n[0]===""||(c==="."||c==="")&&(r=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let i=0;for(;(i=n.indexOf("..",i+1))!==-1;){let o=n[i-1];if(o&&o!=="."&&o!==".."&&o!=="**"){r=!0;let u=i===1&&n[i+1]==="**"?["."]:[];n.splice(i-1,2,...u),n.length===0&&n.push(""),i-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let n=r+1;n<e.length;n++){let s=this.partsMatch(e[r],e[n],!this.preserveMultipleSlashes);if(s){e[r]=[],e[n]=s;break}}return e.filter(r=>r.length)}partsMatch(e,r,n=!1){let s=0,i=0,o=[],c="";for(;s<e.length&&i<r.length;)if(e[s]===r[i])o.push(c==="b"?r[i]:e[s]),s++,i++;else if(n&&e[s]==="**"&&r[i]===e[s+1])o.push(e[s]),s++;else if(n&&r[i]==="**"&&e[s]===r[i+1])o.push(r[i]),i++;else if(e[s]==="*"&&r[i]&&(this.options.dot||!r[i].startsWith("."))&&r[i]!=="**"){if(c==="b")return!1;c="a",o.push(e[s]),s++,i++}else if(r[i]==="*"&&e[s]&&(this.options.dot||!e[s].startsWith("."))&&e[s]!=="**"){if(c==="a")return!1;c="b",o.push(r[i]),s++,i++}else return!1;return e.length===r.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,n=0;for(let s=0;s<e.length&&e.charAt(s)==="!";s++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r,n=!1){let s=0,i=0;if(this.isWindows){let c=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),u=!c&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),a=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),l=!a&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=u?3:c?0:void 0,d=l?3:a?0:void 0;if(typeof f=="number"&&typeof d=="number"){let[h,E]=[e[f],r[d]];h.toLowerCase()===E.toLowerCase()&&(r[d]=h,i=d,s=f)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(e=this.levelTwoFileOptimize(e)),r.includes(M)?this.#t(e,r,n,s,i):this.#s(e,r,n,s,i)}#t(e,r,n,s,i){let o=r.indexOf(M,i),c=r.lastIndexOf(M),[u,a,l]=n?[r.slice(i,o),r.slice(o+1),[]]:[r.slice(i,o),r.slice(o+1,c),r.slice(c+1)];if(u.length){let w=e.slice(s,s+u.length);if(!this.#s(w,u,n,0,0))return!1;s+=u.length,i+=u.length}let f=0;if(l.length){if(l.length+s>e.length)return!1;let w=e.length-l.length;if(this.#s(e,l,n,w,0))f=l.length;else{if(e[e.length-1]!==""||s+l.length===e.length||(w--,!this.#s(e,l,n,w,0)))return!1;f=l.length+1}}if(!a.length){let w=!!f;for(let C=s;C<e.length-f;C++){let B=String(e[C]);if(w=!0,B==="."||B===".."||!this.options.dot&&B.startsWith("."))return!1}return n||w}let d=[[[],0]],h=d[0],E=0,y=[0];for(let w of a)w===M?(y.push(E),h=[[],0],d.push(h)):(h[0].push(w),E++);let I=d.length-1,v=e.length-f;for(let w of d)w[1]=v-(y[I--]+w[0].length);return!!this.#r(e,d,s,0,n,0,!!f)}#r(e,r,n,s,i,o,c){let u=r[s];if(!u){for(let f=n;f<e.length;f++){c=!0;let d=e[f];if(d==="."||d===".."||!this.options.dot&&d.startsWith("."))return!1}return c}let[a,l]=u;for(;n<=l;){if(this.#s(e.slice(0,n+a.length),a,i,n,0)&&o<this.maxGlobstarRecursion){let h=this.#r(e,r,n+a.length,s+1,i,o+1,c);if(h!==!1)return h}let d=e[n];if(d==="."||d===".."||!this.options.dot&&d.startsWith("."))return!1;n++}return i||null}#s(e,r,n,s,i){let o,c,u,a;for(o=s,c=i,a=e.length,u=r.length;o<a&&c<u;o++,c++){this.debug("matchOne loop");let l=r[c],f=e[o];if(this.debug(r,l,f),l===!1||l===M)return!1;let d;if(typeof l=="string"?(d=f===l,this.debug("string match",l,f,d)):(d=l.test(f),this.debug("pattern match",l,f,d)),!d)return!1}if(o===a&&c===u)return!0;if(o===a)return n;if(c===u)return o===a-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return hc(this.pattern,this.options)}parse(e){Ye(e);let r=this.options;if(e==="**")return M;if(e==="")return"";let n,s=null;(n=e.match(ag))?s=r.dot?fg:lg:(n=e.match(Qd))?s=(r.nocase?r.dot?ng:rg:r.dot?tg:eg)(n[1]):(n=e.match(pg))?s=(r.nocase?r.dot?dg:hg:r.dot?gg:mg)(n):(n=e.match(sg))?s=r.dot?og:ig:(n=e.match(cg))&&(s=ug);let i=ye.fromGlob(e,this.options).toMMPattern();return s&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:s}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?_g:r.dot?Og:bg,s=new Set(r.nocase?["i"]:[]),i=e.map(u=>{let a=u.map(f=>{if(f instanceof RegExp)for(let d of f.flags.split(""))s.add(d);return typeof f=="string"?Pg(f):f===M?M:f._src});a.forEach((f,d)=>{let h=a[d+1],E=a[d-1];f!==M||E===M||(E===void 0?h!==void 0&&h!==M?a[d+1]="(?:\\/|"+n+"\\/)?"+h:a[d]=n:h===void 0?a[d-1]=E+"(?:\\/|\\/"+n+")?":h!==M&&(a[d-1]=E+"(?:\\/|\\/"+n+"\\/)"+h,a[d+1]=M))});let l=a.filter(f=>f!==M);if(this.partial&&l.length>=1){let f=[];for(let d=1;d<=l.length;d++)f.push(l.slice(0,d).join("/"));return"(?:"+f.join("|")+")"}return l.join("/")}).join("|"),[o,c]=e.length>1?["(?:",")"]:["",""];i="^"+o+i+c+"$",this.partial&&(i="^(?:\\/|"+o+i.slice(1,-1)+c+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let s=this.slashSplit(e);this.debug(this.pattern,"split",s);let i=this.set;this.debug(this.pattern,"set",i);let o=s[s.length-1];if(!o)for(let c=s.length-2;!o&&c>=0;c--)o=s[c];for(let c=0;c<i.length;c++){let u=i[c],a=s;if(n.matchBase&&u.length===1&&(a=[o]),this.matchOne(a,u,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return $.defaults(e).Minimatch}};$.AST=ye;$.Minimatch=qe;$.escape=Yr;$.unescape=ae;function Rg(t,e){let r=!1;for(let n of e)if(r=$(t,n),r)return r;return r}function Lg(t){return new RegExp(t.map(e=>$.makeRe(e)).filter(e=>e!==!1).map(e=>e.source).join("|"))}var dc=Object.freeze({isMatch:Rg,toRegex:Lg});var Jr={sad:"\u{1F614}",cross:"\u274C",happy:"\u{1F917}"},xg=t=>`${Jr.cross} Found ${V.redBright(t)} Non-single version dependencies
13
+ `);return i!==-1&&(e=Uo(e,s,n,i)),n+e+s};Object.defineProperties(ze.prototype,$e);var vd=ze(),e0=ze({level:Ho?Ho.level:0});var V=vd;var Pt="pnpmSingleVersion",Xo="Single Version Checker";var Rt=class extends Error{constructor(){super("Can not find project root"),this.name="ProjectRootError"}};var Lt=class extends Error{constructor(){super(`Unable to find option ${V.blueBright(`'${Pt}'`)} in package.json of root project `),this.name="OptionsNotFound"}},Xe=class extends Error{constructor(e){super(`Invalid option: ${e}`),this.name="OptionSyntaxError"}};var xt=class extends Error{constructor(){super("'packages' in lockfile is missing"),this.name="LockfilePackagesMissingError"}};var Wr=(t,e,r)=>{let n=t instanceof RegExp?Ko(t,r):t,s=e instanceof RegExp?Ko(e,r):e,i=n!==null&&s!=null&&wd(n,s,r);return i&&{start:i[0],end:i[1],pre:r.slice(0,i[0]),body:r.slice(i[0]+n.length,i[1]),post:r.slice(i[1]+s.length)}},Ko=(t,e)=>{let r=e.match(t);return r?r[0]:null},wd=(t,e,r)=>{let n,s,i,o,c,u=r.indexOf(t),a=r.indexOf(e,u+1),l=u;if(u>=0&&a>0){if(t===e)return[u,a];for(n=[],i=r.length;l>=0&&!c;){if(l===u)n.push(l),u=r.indexOf(t,l+1);else if(n.length===1){let f=n.pop();f!==void 0&&(c=[f,a])}else s=n.pop(),s!==void 0&&s<i&&(i=s,o=a),a=r.indexOf(e,l+1);l=u<a&&u>=0?u:a}n.length&&o!==void 0&&(c=[i,o])}return c};var Yo="\0SLASH"+Math.random()+"\0",Jo="\0OPEN"+Math.random()+"\0",zr="\0CLOSE"+Math.random()+"\0",Zo="\0COMMA"+Math.random()+"\0",Qo="\0PERIOD"+Math.random()+"\0",Sd=new RegExp(Yo,"g"),Id=new RegExp(Jo,"g"),Pd=new RegExp(zr,"g"),Rd=new RegExp(Zo,"g"),Ld=new RegExp(Qo,"g"),xd=/\\\\/g,Nd=/\\{/g,Ad=/\\}/g,Td=/\\,/g,$d=/\\\./g,qd=1e5;function Hr(t){return isNaN(t)?t.charCodeAt(0):parseInt(t,10)}function jd(t){return t.replace(xd,Yo).replace(Nd,Jo).replace(Ad,zr).replace(Td,Zo).replace($d,Qo)}function Md(t){return t.replace(Sd,"\\").replace(Id,"{").replace(Pd,"}").replace(Rd,",").replace(Ld,".")}function ec(t){if(!t)return[""];let e=[],r=Wr("{","}",t);if(!r)return t.split(",");let{pre:n,body:s,post:i}=r,o=n.split(",");o[o.length-1]+="{"+s+"}";let c=ec(i);return i.length&&(o[o.length-1]+=c.shift(),o.push.apply(o,c)),e.push.apply(e,o),e}function tc(t,e={}){if(!t)return[];let{max:r=qd}=e;return t.slice(0,2)==="{}"&&(t="\\{\\}"+t.slice(2)),Ke(jd(t),r,!0).map(Md)}function Cd(t){return"{"+t+"}"}function Dd(t){return/^-?0\d/.test(t)}function Fd(t,e){return t<=e}function kd(t,e){return t>=e}function Ke(t,e,r){let n=[],s=Wr("{","}",t);if(!s)return[t];let i=s.pre,o=s.post.length?Ke(s.post,e,!1):[""];if(/\$$/.test(s.pre))for(let c=0;c<o.length&&c<e;c++){let u=i+"{"+s.body+"}"+o[c];n.push(u)}else{let c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),a=c||u,l=s.body.indexOf(",")>=0;if(!a&&!l)return s.post.match(/,(?!,).*\}/)?(t=s.pre+"{"+s.body+zr+s.post,Ke(t,e,!0)):[t];let f;if(a)f=s.body.split(/\.\./);else if(f=ec(s.body),f.length===1&&f[0]!==void 0&&(f=Ke(f[0],e,!1).map(Cd),f.length===1))return o.map(h=>s.pre+f[0]+h);let d;if(a&&f[0]!==void 0&&f[1]!==void 0){let h=Hr(f[0]),E=Hr(f[1]),y=Math.max(f[0].length,f[1].length),I=f.length===3&&f[2]!==void 0?Math.max(Math.abs(Hr(f[2])),1):1,v=Fd;E<h&&(I*=-1,v=kd);let C=f.some(Dd);d=[];for(let B=h;v(B,E);B+=I){let T;if(u)T=String.fromCharCode(B),T==="\\"&&(T="");else if(T=String(B),C){let be=y-T.length;if(be>0){let oe=new Array(be+1).join("0");B<0?T="-"+oe+T.slice(1):T=oe+T}}d.push(T)}}else{d=[];for(let h=0;h<f.length;h++)d.push.apply(d,Ke(f[h],e,!1))}for(let h=0;h<d.length;h++)for(let E=0;E<o.length&&n.length<e;E++){let y=i+d[h]+o[E];(!r||a||y)&&n.push(y)}}return n}var Ye=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var Bd={"[: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]},Je=t=>t.replace(/[[\]\\-]/g,"\\$&"),Gd=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),rc=t=>t.join(""),nc=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],s=[],i=r+1,o=!1,c=!1,u=!1,a=!1,l=r,f="";e:for(;i<t.length;){let y=t.charAt(i);if((y==="!"||y==="^")&&i===r+1){a=!0,i++;continue}if(y==="]"&&o&&!u){l=i+1;break}if(o=!0,y==="\\"&&!u){u=!0,i++;continue}if(y==="["&&!u){for(let[I,[v,w,C]]of Object.entries(Bd))if(t.startsWith(I,i)){if(f)return["$.",!1,t.length-r,!0];i+=I.length,C?s.push(v):n.push(v),c=c||w;continue e}}if(u=!1,f){y>f?n.push(Je(f)+"-"+Je(y)):y===f&&n.push(Je(y)),f="",i++;continue}if(t.startsWith("-]",i+1)){n.push(Je(y+"-")),i+=2;continue}if(t.startsWith("-",i+1)){f=y,i+=2;continue}n.push(Je(y)),i++}if(l<i)return["",!1,0,!1];if(!n.length&&!s.length)return["$.",!1,t.length-r,!0];if(s.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!a){let y=n[0].length===2?n[0].slice(-1):n[0];return[Gd(y),!1,l-r,!1]}let d="["+(a?"^":"")+rc(n)+"]",h="["+(a?"":"^")+rc(s)+"]";return[n.length&&s.length?"("+d+"|"+h+")":n.length?d:h,c,l-r,!0]};var ae=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!0}={})=>r?e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):e?t.replace(/\[([^\/\\{}])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");var U,Vd=new Set(["!","?","+","*","@"]),Xr=t=>Vd.has(t),sc=t=>Xr(t.type),Ud=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),Wd=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),Hd=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),ic=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),zd="(?!(?:^|/)\\.\\.?(?:$|/))",Nt="(?!\\.)",Xd=new Set(["[","."]),Kd=new Set(["..","."]),Yd=new Set("().*{}+?[]^$\\!"),Jd=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Kr="[^/]",oc=Kr+"*?",cc=Kr+"+?",Zd=0,ye=class{type;#t;#r;#s=!1;#e=[];#n;#c;#a;#u=!1;#i;#o;#l=!1;id=++Zd;get depth(){return(this.#n?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#t.id,parent:this.#n?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(e,r,n={}){this.type=e,e&&(this.#r=!0),this.#n=r,this.#t=this.#n?this.#n.#t:this,this.#i=this.#t===this?n:this.#t.#i,this.#a=this.#t===this?[]:this.#t.#a,e==="!"&&!this.#t.#u&&this.#a.push(this),this.#c=this.#n?this.#n.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#o!==void 0?this.#o:this.type?this.#o=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#o=this.#e.map(e=>String(e)).join("")}#y(){if(this!==this.#t)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let e;for(;e=this.#a.pop();){if(e.type!=="!")continue;let r=e,n=r.#n;for(;n;){for(let s=r.#c+1;!n.type&&s<n.#e.length;s++)for(let i of e.#e){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(n.#e[s])}r=n,n=r.#n}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof U&&r.#n===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let e=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#u&&this.#n?.type==="!")&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#n?.isStart())return!1;if(this.#c===0)return!0;let e=this.#n;for(let r=0;r<this.#c;r++){let n=e.#e[r];if(!(n instanceof U&&n.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#n?.type==="!")return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();let e=this.#n?this.#n.#e.length:0;return this.#c===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new U(this.type,e);for(let n of this.#e)r.copyIn(n);return r}static#f(e,r,n,s,i){let o=s.maxExtglobRecursion??2,c=!1,u=!1,a=-1,l=!1;if(r.type===null){let y=n,I="";for(;y<e.length;){let v=e.charAt(y++);if(c||v==="\\"){c=!c,I+=v;continue}if(u){y===a+1?(v==="^"||v==="!")&&(l=!0):v==="]"&&!(y===a+2&&l)&&(u=!1),I+=v;continue}else if(v==="["){u=!0,a=y,l=!1,I+=v;continue}if(!s.noext&&Xr(v)&&e.charAt(y)==="("&&i<=o){r.push(I),I="";let C=new U(v,r);y=U.#f(e,C,y,s,i+1),r.push(C);continue}I+=v}return r.push(I),y}let f=n+1,d=new U(null,r),h=[],E="";for(;f<e.length;){let y=e.charAt(f++);if(c||y==="\\"){c=!c,E+=y;continue}if(u){f===a+1?(y==="^"||y==="!")&&(l=!0):y==="]"&&!(f===a+2&&l)&&(u=!1),E+=y;continue}else if(y==="["){u=!0,a=f,l=!1,E+=y;continue}if(!s.noext&&Xr(y)&&e.charAt(f)==="("&&(i<=o||r&&r.#p(y))){let v=r&&r.#p(y)?0:1;d.push(E),E="";let w=new U(y,d);d.push(w),f=U.#f(e,w,f,s,i+v);continue}if(y==="|"){d.push(E),E="",h.push(d),d=new U(null,r);continue}if(y===")")return E===""&&r.#e.length===0&&(r.#l=!0),d.push(E),E="",r.push(...h,d),f;E+=y}return r.type=null,r.#r=void 0,r.#e=[e.substring(n-1)],f}#E(e){return this.#d(e,Wd)}#d(e,r=Ud){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null)return!1;let n=e.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#p(n.type,r)}#p(e,r=Hd){return!!r.get(this.type)?.includes(e)}#_(e,r){let n=e.#e[0],s=new U(null,n,this.options);s.#e.push(""),n.push(s),this.#g(e,r)}#g(e,r){let n=e.#e[0];this.#e.splice(r,1,...n.#e);for(let s of n.#e)typeof s=="object"&&(s.#n=this);this.#o=void 0}#O(e){return!!ic.get(this.type)?.has(e)}#b(e){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=e.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#O(r.type)}#v(e){let r=ic.get(this.type),n=e.#e[0],s=r?.get(n.type);if(!s)return!1;this.#e=n.#e;for(let i of this.#e)typeof i=="object"&&(i.#n=this);this.type=s,this.#o=void 0,this.#l=!1}static fromGlob(e,r={}){let n=new U(null,void 0,r);return U.#f(e,n,0,r,0),n}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let e=this.toString(),[r,n,s,i]=this.toRegExpSource();if(!(s||this.#r||this.#i.nocase&&!this.#i.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let c=(this.#i.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${r}$`,c),{_src:r,_glob:e})}get options(){return this.#i}toRegExpSource(e){let r=e??!!this.#i.dot;if(this.#t===this&&(this.#h(),this.#y()),!sc(this)){let u=this.isStart()&&this.isEnd()&&!this.#e.some(h=>typeof h!="string"),a=this.#e.map(h=>{let[E,y,I,v]=typeof h=="string"?U.#w(h,this.#r,u):h.toRegExpSource(e);return this.#r=this.#r||I,this.#s=this.#s||v,E}).join(""),l="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&Kd.has(this.#e[0]))){let E=Xd,y=r&&E.has(a.charAt(0))||a.startsWith("\\.")&&E.has(a.charAt(2))||a.startsWith("\\.\\.")&&E.has(a.charAt(4)),I=!r&&!e&&E.has(a.charAt(0));l=y?zd:I?Nt:""}let f="";return this.isEnd()&&this.#t.#u&&this.#n?.type==="!"&&(f="(?:$|\\/)"),[l+a+f,ae(a),this.#r=!!this.#r,this.#s]}let n=this.type==="*"||this.type==="+",s=this.type==="!"?"(?:(?!(?:":"(?:",i=this.#m(r);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){let u=this.toString(),a=this;return a.#e=[u],a.type=null,a.#r=void 0,[u,ae(this.toString()),!1,!1]}let o=!n||e||r||!Nt?"":this.#m(!0);o===i&&(o=""),o&&(i=`(?:${i})(?:${o})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!r?Nt:"")+cc;else{let u=this.type==="!"?"))"+(this.isStart()&&!r&&!e?Nt:"")+oc+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;c=s+i+u}return[c,ae(i),this.#r=!!this.#r,this.#s]}#h(){if(sc(this)){let e=0,r=!1;do{r=!0;for(let n=0;n<this.#e.length;n++){let s=this.#e[n];typeof s=="object"&&(s.#h(),this.#d(s)?(r=!1,this.#g(s,n)):this.#E(s)?(r=!1,this.#_(s,n)):this.#b(s)&&(r=!1,this.#v(s)))}}while(!r&&++e<10)}else for(let e of this.#e)typeof e=="object"&&e.#h();this.#o=void 0}#m(e){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,s,i,o]=r.toRegExpSource(e);return this.#s=this.#s||o,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#w(e,r,n=!1){let s=!1,i="",o=!1,c=!1;for(let u=0;u<e.length;u++){let a=e.charAt(u);if(s){s=!1,i+=(Yd.has(a)?"\\":"")+a;continue}if(a==="*"){if(c)continue;c=!0,i+=n&&/^[*]+$/.test(e)?cc:oc,r=!0;continue}else c=!1;if(a==="\\"){u===e.length-1?i+="\\\\":s=!0;continue}if(a==="["){let[l,f,d,h]=nc(e,u);if(d){i+=l,o=o||f,u+=d-1,r=r||h;continue}}if(a==="?"){i+=Kr,r=!0;continue}i+=Jd(a)}return[i,ae(e),!!r,o]}};U=ye;var Yr=(t,{windowsPathsNoEscape:e=!1,magicalBraces:r=!1}={})=>r?e?t.replace(/[?*()[\]{}]/g,"[$&]"):t.replace(/[?*()[\]\\{}]/g,"\\$&"):e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var $=(t,e,r={})=>(Ye(e),!r.nocomment&&e.charAt(0)==="#"?!1:new qe(e,r).match(t)),Qd=/^\*+([^+@!?\*\[\(]*)$/,eg=t=>e=>!e.startsWith(".")&&e.endsWith(t),tg=t=>e=>e.endsWith(t),rg=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),ng=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),sg=/^\*+\.\*+$/,ig=t=>!t.startsWith(".")&&t.includes("."),og=t=>t!=="."&&t!==".."&&t.includes("."),cg=/^\.\*+$/,ug=t=>t!=="."&&t!==".."&&t.startsWith("."),ag=/^\*+$/,lg=t=>t.length!==0&&!t.startsWith("."),fg=t=>t.length!==0&&t!=="."&&t!=="..",pg=/^\?+([^+@!?\*\[\(]*)?$/,hg=([t,e=""])=>{let r=lc([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},dg=([t,e=""])=>{let r=fc([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},gg=([t,e=""])=>{let r=fc([t]);return e?n=>r(n)&&n.endsWith(e):r},mg=([t,e=""])=>{let r=lc([t]);return e?n=>r(n)&&n.endsWith(e):r},lc=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},fc=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},pc=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",uc={win32:{sep:"\\"},posix:{sep:"/"}},yg=pc==="win32"?uc.win32.sep:uc.posix.sep;$.sep=yg;var M=Symbol("globstar **");$.GLOBSTAR=M;var Eg="[^/]",_g=Eg+"*?",Og="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",bg="(?:(?!(?:\\/|^)\\.).)*?",vg=(t,e={})=>r=>$(r,t,e);$.filter=vg;var Q=(t,e={})=>Object.assign({},t,e),wg=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return $;let e=$;return Object.assign((n,s,i={})=>e(n,s,Q(t,i)),{Minimatch:class extends e.Minimatch{constructor(s,i={}){super(s,Q(t,i))}static defaults(s){return e.defaults(Q(t,s)).Minimatch}},AST:class extends e.AST{constructor(s,i,o={}){super(s,i,Q(t,o))}static fromGlob(s,i={}){return e.AST.fromGlob(s,Q(t,i))}},unescape:(n,s={})=>e.unescape(n,Q(t,s)),escape:(n,s={})=>e.escape(n,Q(t,s)),filter:(n,s={})=>e.filter(n,Q(t,s)),defaults:n=>e.defaults(Q(t,n)),makeRe:(n,s={})=>e.makeRe(n,Q(t,s)),braceExpand:(n,s={})=>e.braceExpand(n,Q(t,s)),match:(n,s,i={})=>e.match(n,s,Q(t,i)),sep:e.sep,GLOBSTAR:M})};$.defaults=wg;var hc=(t,e={})=>(Ye(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:tc(t,{max:e.braceExpandMax}));$.braceExpand=hc;var Sg=(t,e={})=>new qe(t,e).makeRe();$.makeRe=Sg;var Ig=(t,e,r={})=>{let n=new qe(e,r);return t=t.filter(s=>n.match(s)),n.options.nonull&&!t.length&&t.push(e),t};$.match=Ig;var ac=/[?*]|[+@!]\(.*?\)|\[|\]/,Pg=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),qe=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,r={}){Ye(e),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=e,this.platform=r.platform||pc,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((i,o,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let u=i[0]===""&&i[1]===""&&(i[2]==="?"||!ac.test(i[2]))&&!ac.test(i[3]),a=/^[a-z]:/i.test(i[0]);if(u)return[...i.slice(0,4),...i.slice(4).map(l=>this.parse(l))];if(a)return[i[0],...i.slice(1).map(l=>this.parse(l))]}return i.map(u=>this.parse(u))});if(this.debug(this.pattern,s),this.set=s.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){let o=this.set[i];o[0]===""&&o[1]===""&&this.globParts[i][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n=0;n<e.length;n++)for(let s=0;s<e[n].length;s++)e[n][s]==="**"&&(e[n][s]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let s=n;for(;r[s+1]==="**";)s++;s!==n&&r.splice(n,s-n)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((n,s)=>{let i=n[n.length-1];return s==="**"&&i==="**"?n:s===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(n.pop(),n):(n.push(s),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let s=1;s<e.length-1;s++){let i=e[s];s===1&&i===""&&e[0]===""||(i==="."||i==="")&&(r=!0,e.splice(s,1),s--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let s=e[n-1];s&&s!=="."&&s!==".."&&s!=="**"&&(r=!0,e.splice(n-1,2),n-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let n of e){let s=-1;for(;(s=n.indexOf("**",s+1))!==-1;){let o=s;for(;n[o+1]==="**";)o++;o>s&&n.splice(s+1,o-s);let c=n[s+1],u=n[s+2],a=n[s+3];if(c!==".."||!u||u==="."||u===".."||!a||a==="."||a==="..")continue;r=!0,n.splice(s,1);let l=n.slice(0);l[s]="**",e.push(l),s--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){let c=n[o];o===1&&c===""&&n[0]===""||(c==="."||c==="")&&(r=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let i=0;for(;(i=n.indexOf("..",i+1))!==-1;){let o=n[i-1];if(o&&o!=="."&&o!==".."&&o!=="**"){r=!0;let u=i===1&&n[i+1]==="**"?["."]:[];n.splice(i-1,2,...u),n.length===0&&n.push(""),i-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let n=r+1;n<e.length;n++){let s=this.partsMatch(e[r],e[n],!this.preserveMultipleSlashes);if(s){e[r]=[],e[n]=s;break}}return e.filter(r=>r.length)}partsMatch(e,r,n=!1){let s=0,i=0,o=[],c="";for(;s<e.length&&i<r.length;)if(e[s]===r[i])o.push(c==="b"?r[i]:e[s]),s++,i++;else if(n&&e[s]==="**"&&r[i]===e[s+1])o.push(e[s]),s++;else if(n&&r[i]==="**"&&e[s]===r[i+1])o.push(r[i]),i++;else if(e[s]==="*"&&r[i]&&(this.options.dot||!r[i].startsWith("."))&&r[i]!=="**"){if(c==="b")return!1;c="a",o.push(e[s]),s++,i++}else if(r[i]==="*"&&e[s]&&(this.options.dot||!e[s].startsWith("."))&&e[s]!=="**"){if(c==="a")return!1;c="b",o.push(r[i]),s++,i++}else return!1;return e.length===r.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,n=0;for(let s=0;s<e.length&&e.charAt(s)==="!";s++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r,n=!1){let s=0,i=0;if(this.isWindows){let c=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),u=!c&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),a=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),l=!a&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),f=u?3:c?0:void 0,d=l?3:a?0:void 0;if(typeof f=="number"&&typeof d=="number"){let[h,E]=[e[f],r[d]];h.toLowerCase()===E.toLowerCase()&&(r[d]=h,i=d,s=f)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(e=this.levelTwoFileOptimize(e)),r.includes(M)?this.#t(e,r,n,s,i):this.#s(e,r,n,s,i)}#t(e,r,n,s,i){let o=r.indexOf(M,i),c=r.lastIndexOf(M),[u,a,l]=n?[r.slice(i,o),r.slice(o+1),[]]:[r.slice(i,o),r.slice(o+1,c),r.slice(c+1)];if(u.length){let w=e.slice(s,s+u.length);if(!this.#s(w,u,n,0,0))return!1;s+=u.length,i+=u.length}let f=0;if(l.length){if(l.length+s>e.length)return!1;let w=e.length-l.length;if(this.#s(e,l,n,w,0))f=l.length;else{if(e[e.length-1]!==""||s+l.length===e.length||(w--,!this.#s(e,l,n,w,0)))return!1;f=l.length+1}}if(!a.length){let w=!!f;for(let C=s;C<e.length-f;C++){let B=String(e[C]);if(w=!0,B==="."||B===".."||!this.options.dot&&B.startsWith("."))return!1}return n||w}let d=[[[],0]],h=d[0],E=0,y=[0];for(let w of a)w===M?(y.push(E),h=[[],0],d.push(h)):(h[0].push(w),E++);let I=d.length-1,v=e.length-f;for(let w of d)w[1]=v-(y[I--]+w[0].length);return!!this.#r(e,d,s,0,n,0,!!f)}#r(e,r,n,s,i,o,c){let u=r[s];if(!u){for(let f=n;f<e.length;f++){c=!0;let d=e[f];if(d==="."||d===".."||!this.options.dot&&d.startsWith("."))return!1}return c}let[a,l]=u;for(;n<=l;){if(this.#s(e.slice(0,n+a.length),a,i,n,0)&&o<this.maxGlobstarRecursion){let h=this.#r(e,r,n+a.length,s+1,i,o+1,c);if(h!==!1)return h}let d=e[n];if(d==="."||d===".."||!this.options.dot&&d.startsWith("."))return!1;n++}return i||null}#s(e,r,n,s,i){let o,c,u,a;for(o=s,c=i,a=e.length,u=r.length;o<a&&c<u;o++,c++){this.debug("matchOne loop");let l=r[c],f=e[o];if(this.debug(r,l,f),l===!1||l===M)return!1;let d;if(typeof l=="string"?(d=f===l,this.debug("string match",l,f,d)):(d=l.test(f),this.debug("pattern match",l,f,d)),!d)return!1}if(o===a&&c===u)return!0;if(o===a)return n;if(c===u)return o===a-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return hc(this.pattern,this.options)}parse(e){Ye(e);let r=this.options;if(e==="**")return M;if(e==="")return"";let n,s=null;(n=e.match(ag))?s=r.dot?fg:lg:(n=e.match(Qd))?s=(r.nocase?r.dot?ng:rg:r.dot?tg:eg)(n[1]):(n=e.match(pg))?s=(r.nocase?r.dot?dg:hg:r.dot?gg:mg)(n):(n=e.match(sg))?s=r.dot?og:ig:(n=e.match(cg))&&(s=ug);let i=ye.fromGlob(e,this.options).toMMPattern();return s&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:s}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?_g:r.dot?Og:bg,s=new Set(r.nocase?["i"]:[]),i=e.map(u=>{let a=u.map(f=>{if(f instanceof RegExp)for(let d of f.flags.split(""))s.add(d);return typeof f=="string"?Pg(f):f===M?M:f._src});a.forEach((f,d)=>{let h=a[d+1],E=a[d-1];f!==M||E===M||(E===void 0?h!==void 0&&h!==M?a[d+1]="(?:\\/|"+n+"\\/)?"+h:a[d]=n:h===void 0?a[d-1]=E+"(?:\\/|\\/"+n+")?":h!==M&&(a[d-1]=E+"(?:\\/|\\/"+n+"\\/)"+h,a[d+1]=M))});let l=a.filter(f=>f!==M);if(this.partial&&l.length>=1){let f=[];for(let d=1;d<=l.length;d++)f.push(l.slice(0,d).join("/"));return"(?:"+f.join("|")+")"}return l.join("/")}).join("|"),[o,c]=e.length>1?["(?:",")"]:["",""];i="^"+o+i+c+"$",this.partial&&(i="^(?:\\/|"+o+i.slice(1,-1)+c+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...s].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let s=this.slashSplit(e);this.debug(this.pattern,"split",s);let i=this.set;this.debug(this.pattern,"set",i);let o=s[s.length-1];if(!o)for(let c=s.length-2;!o&&c>=0;c--)o=s[c];for(let c=0;c<i.length;c++){let u=i[c],a=s;if(n.matchBase&&u.length===1&&(a=[o]),this.matchOne(a,u,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return $.defaults(e).Minimatch}};$.AST=ye;$.Minimatch=qe;$.escape=Yr;$.unescape=ae;function Rg(t,e){let r=!1;for(let n of e)if(r=$(t,n),r)return r;return r}function Lg(t){return new RegExp(t.map(e=>$.makeRe(e)).filter(e=>e!==!1).map(e=>e.source).join("|"))}var dc=Object.freeze({isMatch:Rg,toRegex:Lg});var Jr={sad:"\u{1F614}",cross:"\u274C",happy:"\u{1F917}"},xg=t=>`${Jr.cross} Found ${V.redBright(t)} Non-single version dependencies
14
14
  `,Ng=(t,e)=>`
15
15
  - ${V.blueBright(t)} has ${V.redBright(e.length)} distinct versions
16
16
  ${e.map(r=>r.version+(r.peersSuffix??"")).join(", ")}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pinnacle0/pnpm-single-version",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "author": "Pinnacle",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  "@types/minimatch": "6.0.0",
38
38
  "@types/node": "25.3.0",
39
39
  "esbuild": "0.27.3",
40
- "@pinnacle0/devtool-util": "1.3.15"
40
+ "@pinnacle0/devtool-util": "1.3.16"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "pnpm run test && pnpm tsx script/build.ts",