@kitelev/exocortex-cli 16.240.1 → 16.240.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +6 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- // @kitelev/exocortex-cli v16.240.1
2
+ // @kitelev/exocortex-cli v16.240.2
3
3
  // CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more
4
4
  // License: MIT
5
5
 
@@ -82,7 +82,7 @@ ${o}
82
82
  `);if(r.findPropertyLineSpan(i,t)===null)return e;for(;;){let o=r.findPropertyLineSpan(i,t);if(!o)break;o.start===0?i.splice(0,o.end,""):i.splice(o.start,o.end-o.start)}let s=i.join(`
83
83
  `);return e.replace(r.FRONTMATTER_REGEX,()=>`---
84
84
  ${s}
85
- ---`)}hasProperty(e,t){return new RegExp(`^${this.escapeRegex(t)}:`,"m").test(e)}static normalizeIRI(e){let t=e.lastIndexOf("#");if(t<0)return e;let n=e.substring(0,t+1),i=e.substring(t+1),s=r.IRI_PREFIX_MAP[n];return s?s+i:e}static normalizeIRIValue(e){let t=e.match(/^obsidian:\/\/vault\/.*\/([^/]+)\.md$/);if(t)return`"[[${t[1]}]]"`;let n=r.normalizeIRI(e);return n!==e?`"[[${n}]]"`:e}static applyPatch(e,t){for(let n of Object.keys(t)){let i=(0,Sf.canonicalYamlKey)(r.normalizeIRI(n));if(i!==n&&Object.prototype.hasOwnProperty.call(t,i))continue;let s=t[n];if(s!==void 0){typeof s=="string"&&(s=r.normalizeIRIValue(s)),e[i]=s;for(let o of Sf.LEGACY_YAML_KEYS.get(i)??[])delete e[o]}}return e}createFrontmatter(e,t){let n={};for(let[l,u]of Object.entries(t))n[(0,Sf.canonicalYamlKey)(l)]=u;let i=(0,lL.orderProperties)(n,(0,lL.loadDefaultSpec)()),o=`---
85
+ ---`)}hasProperty(e,t){return new RegExp(`^${this.escapeRegex(t)}:`,"m").test(e)}static normalizeIRI(e){let t=e.lastIndexOf("#");if(t<0)return e;let n=e.substring(0,t+1),i=e.substring(t+1),s=r.IRI_PREFIX_MAP[n];return s?s+i:e}static normalizeIRIValue(e,t={}){let n=a(o=>t.bare?`[[${o}]]`:`"[[${o}]]"`,"wrap"),i=e.match(/^obsidian:\/\/vault\/.*\/([^/]+)\.md$/);if(i)return n(i[1]);let s=r.normalizeIRI(e);return s!==e?n(s):e}static applyPatch(e,t){for(let n of Object.keys(t)){let i=(0,Sf.canonicalYamlKey)(r.normalizeIRI(n));if(i!==n&&Object.prototype.hasOwnProperty.call(t,i))continue;let s=t[n];if(s!==void 0){typeof s=="string"&&(s=r.normalizeIRIValue(s,{bare:!0})),e[i]=s;for(let o of Sf.LEGACY_YAML_KEYS.get(i)??[])delete e[o]}}return e}createFrontmatter(e,t){let n={};for(let[l,u]of Object.entries(t))n[(0,Sf.canonicalYamlKey)(l)]=u;let i=(0,lL.orderProperties)(n,(0,lL.loadDefaultSpec)()),o=`---
86
86
  ${Object.entries(i).map(([l,u])=>this.serializeValue(l,u,!0)).join(`
87
87
  `)}
88
88
  ---`,c=e.startsWith(`
@@ -399,11 +399,9 @@ ${r.slice(o+1)}`:l+=r.slice(i),l.slice(1)}function Kfe(r){let e="",t=0;for(let n
399
399
  `:" ";n+=`---${d}${f}
400
400
  `}else n+=Oa(t,0,o.contents,{block:!0,compact:!0})+`
401
401
  `;i=o.explicitEnd||o.contents!==null&&Zfe(o.contents),i&&(n+=`...
402
- `)}return n}function vd(r,e={}){let t={...rde,...e},n=Efe(r,t.schema,{noRefs:t.noRefs,skipInvalid:t.skipInvalid});return t.flowLevel>=0&&Tfe(n,(i,s)=>{if(!(s.depth<t.flowLevel))return i.style.flow=!0,x5}),t.transform(n),tde(n,{...PC(t,Object.keys(ZC)),schema:t.schema})}var _t,Cle,xle,Ole,Ple,Dle,Fle,Lle,Nle,kle,Mle,jle,$le,Ule,Ble,Vle,Gle,qle,p5,zle,Kle,Xle,Jle,xC,tue,rue,h5,sue,oue,lue,uue,fue,OC,hue,mue,_ue,bue,Sue,Eue,vue,Tue,Aue,Iue,Rue,_S,HC,tOe,ru,zC,Pue,rOe,nOe,Due,Rc,mr,En,Cc,$i,Lue,y5,_5,Vue,md,Gue,YC,wt,v5,bd,DC,T5,hS,Yue,Que,A5,FC,I5,Xue,Jue,Zue,QC,_fe,uS,Ql,vfe,x5,XC,Afe,tu,O5,Ife,Rfe,P5,kC,Cfe,xfe,D5,Ofe,MC,JC,gm,Pfe,Dfe,F5,Ffe,jC,$C,Lfe,UC,Nfe,BC,$n,ZC,_m,mm,ex,tx,Ic,rde,iOe,sOe,oOe,aOe,cOe,lOe,uOe,fOe,dOe,pOe,hOe,mOe,gOe,yOe,_Oe,bOe,Sm=qe(()=>{_t=Symbol("NOT_RESOLVED");a(jn,"defineScalarTag");a(WC,"defineSequenceTag");a(gS,"defineMappingTag");Cle=jn("tag:yaml.org,2002:str",{resolve:a(r=>r,"resolve"),identify:a(r=>typeof r=="string","identify")}),xle=["","~","null","Null","NULL"],Ole=jn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:a(r=>xle.indexOf(r)!==-1?null:_t,"resolve"),identify:a(r=>r===null,"identify"),represent:a(()=>"null","represent")}),Ple=jn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:a((r,e)=>r==="null"||e&&r===""?null:_t,"resolve"),identify:a(r=>r===null,"identify"),represent:a(()=>"null","represent")}),Dle=["","~","null","Null","NULL"],Fle=jn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:a(r=>Dle.indexOf(r)!==-1?null:_t,"resolve"),identify:a(r=>r===null,"identify"),represent:a(()=>"null","represent")}),Lle=["true","True","TRUE"],Nle=["false","False","FALSE"],kle=jn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:a(r=>Lle.indexOf(r)!==-1?!0:Nle.indexOf(r)!==-1?!1:_t,"resolve"),identify:a(r=>Object.prototype.toString.call(r)==="[object Boolean]","identify"),represent:a(r=>r?"true":"false","represent")}),Mle=["true"],jle=["false"],$le=jn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:a(r=>Mle.indexOf(r)!==-1?!0:jle.indexOf(r)!==-1?!1:_t,"resolve"),identify:a(r=>Object.prototype.toString.call(r)==="[object Boolean]","identify"),represent:a(r=>r?"true":"false","represent")}),Ule=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],Ble=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],Vle=jn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:a(r=>Ule.indexOf(r)!==-1?!0:Ble.indexOf(r)!==-1?!1:_t,"resolve"),identify:a(r=>Object.prototype.toString.call(r)==="[object Boolean]","identify"),represent:a(r=>r?"true":"false","represent")}),Gle=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),qle=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");a(Wle,"parseYamlInteger$2");a(Hle,"resolveYamlInteger$2");p5=jn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:Hle,identify:a(r=>Number.isInteger(r)&&!Object.is(r,-0)&&r.toString(10).indexOf("e")<0,"identify"),represent:a(r=>r.toString(10),"represent")}),zle=new RegExp("^-?(?:0|[1-9][0-9]*)$"),Kle=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");a(Yle,"parseYamlInteger$1");a(Qle,"resolveYamlInteger$1");Xle=jn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Qle,identify:a(r=>Number.isInteger(r)&&!Object.is(r,-0)&&r.toString(10).indexOf("e")<0,"identify"),represent:a(r=>r.toString(10),"represent")}),Jle=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");a(Zle,"parseYamlInteger");a(eue,"resolveYamlInteger");xC=jn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:eue,identify:a(r=>Number.isInteger(r)&&!Object.is(r,-0)&&r.toString(10).indexOf("e")<0,"identify"),represent:a(r=>r.toString(10),"represent")}),tue=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),rue=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");a(nue,"resolveYamlFloat$2");a(iue,"representYamlFloat$2");h5=jn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:nue,identify:a(r=>typeof r=="number"&&(!Number.isInteger(r)||Object.is(r,-0)||r.toString(10).indexOf("e")>=0),"identify"),represent:iue}),sue=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),oue=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");a(aue,"resolveYamlFloat$1");a(cue,"representYamlFloat$1");lue=jn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:aue,identify:a(r=>typeof r=="number"&&(!Number.isInteger(r)||Object.is(r,-0)||r.toString(10).indexOf("e")>=0),"identify"),represent:cue}),uue=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),fue=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");a(due,"resolveYamlFloat");a(pue,"representYamlFloat");OC=jn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:due,identify:a(r=>typeof r=="number"&&(!Number.isInteger(r)||Object.is(r,-0)||r.toString(10).indexOf("e")>=0),"identify"),represent:pue}),hue=jn("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:a((r,e)=>r==="<<"||e&&r===""?"<<":_t,"resolve"),identify:a(()=>!1,"identify")}),mue=/^[A-Za-z0-9+/]*={0,2}$/;a(gue,"resolveYamlBinary");a(yue,"representYamlBinary");_ue=jn("tag:yaml.org,2002:binary",{resolve:gue,identify:a(r=>Object.prototype.toString.call(r)==="[object Uint8Array]","identify"),represent:yue}),bue=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Sue=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");a(Y9,"makeUtcDate");a(wue,"resolveYamlTimestamp");Eue=jn("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:wue,identify:a(r=>r instanceof Date,"identify"),represent:a(r=>r.toISOString(),"represent")}),vue=WC("tag:yaml.org,2002:seq",{create:a(()=>[],"create"),addItem:a((r,e)=>{r.push(e)},"addItem"),identify:Array.isArray});a(yS,"isPlainObject");a(PC,"pick");Tue=WC("tag:yaml.org,2002:omap",{create:a(()=>({list:[],seen:new Set}),"create"),addItem:a((r,e)=>{let t;if(e instanceof Map){if(e.size!==1)return"cannot resolve an ordered map item";t=e.keys().next().value}else if(yS(e)){let n=Object.keys(e);if(n.length!==1)return"cannot resolve an ordered map item";t=n[0]}else return"cannot resolve an ordered map item";return r.seen.has(t)?"duplicate key in ordered map":(r.seen.add(t),r.list.push(e),"")},"addItem"),finalize:a(r=>r.list,"finalize"),identify:a(()=>!1,"identify")}),Aue=WC("tag:yaml.org,2002:pairs",{create:a(()=>[],"create"),addItem:a((r,e)=>{if(e instanceof Map)return e.size!==1?"cannot resolve a pairs item":(r.push(e.entries().next().value),"");if(Object.prototype.toString.call(e)!=="[object Object]")return"cannot resolve a pairs item";let t=e,n=Object.keys(t);return n.length!==1?"cannot resolve a pairs item":(r.push([n[0],t[n[0]]]),"")},"addItem"),identify:a(()=>!1,"identify")}),Iue=gS("tag:yaml.org,2002:map",{create:a(()=>({}),"create"),identify:yS,represent:a(r=>{let e=new Map;for(let t of Object.keys(r))e.set(t,r[t]);return e},"represent"),addPair:a((r,e,t)=>{if(e!==null&&typeof e=="object")return"object-based map does not support complex keys";let n=String(e);return n==="__proto__"?Object.defineProperty(r,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[n]=t,""},"addPair"),has:a((r,e)=>e!==null&&typeof e=="object"?!1:Object.prototype.hasOwnProperty.call(r,String(e)),"has"),keys:a(r=>Object.keys(r),"keys"),get:a((r,e)=>{let t=String(e);return Object.prototype.hasOwnProperty.call(r,t)?r[t]:null},"get")}),Rue=gS("tag:yaml.org,2002:set",{create:a(()=>new Set,"create"),identify:a(r=>r instanceof Set,"identify"),represent:a(r=>{let e=new Map;for(let t of r)e.set(t,null);return e},"represent"),addPair:a((r,e,t)=>t!==null?"cannot resolve a set item":(r.add(e),""),"addPair"),has:a((r,e)=>r.has(e),"has"),keys:a(r=>r.keys(),"keys"),get:a(()=>null,"get")});a(Cue,"createTagDefinitionMap");a(xue,"createTagDefinitionListMap");a(Oue,"compileTags");_S=class m5{static{a(this,"Schema")}tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(e){let t=Oue(e),n=[],i=Cue(),s=xue();for(let f of t){if(f.nodeKind==="scalar"&&f.implicit){if(f.matchByTagPrefix)throw new Error("Implicit scalar tags cannot match by tag prefix");n.push(f)}switch(f.nodeKind){case"scalar":f.matchByTagPrefix?s.scalar.push(f):i.scalar[f.tagName]=f;break;case"sequence":f.matchByTagPrefix?s.sequence.push(f):i.sequence[f.tagName]=f;break;case"mapping":f.matchByTagPrefix?s.mapping.push(f):i.mapping[f.tagName]=f;break}}let o=n.filter(f=>f.implicitFirstChars===null),c=new Set;for(let f of n)if(f.implicitFirstChars!==null)for(let d of f.implicitFirstChars)c.add(d);let l=new Map;for(let f of c)l.set(f,n.filter(d=>d.implicitFirstChars===null||d.implicitFirstChars.indexOf(f)!==-1));let u=i.scalar["tag:yaml.org,2002:str"];if(!u)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=t,this.implicitScalarTags=n,this.implicitScalarByFirstChar=l,this.implicitScalarAnyFirstChar=o,this.defaultScalarTag=u,this.defaultSequenceTag=i.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=i.mapping["tag:yaml.org,2002:map"],this.exact=i,this.prefix=s}lookupScalarTag(e){let t=this.exact.scalar[e];if(t)return t;for(let n of this.prefix.scalar)if(e.startsWith(n.tagName))return n}lookupSequenceTag(e){let t=this.exact.sequence[e];if(t)return t;for(let n of this.prefix.sequence)if(e.startsWith(n.tagName))return n}lookupMappingTag(e){let t=this.exact.mapping[e];if(t)return t;for(let n of this.prefix.mapping)if(e.startsWith(n.tagName))return n}resolveImplicitScalarTag(e){let t=this.implicitScalarByFirstChar.get(e.charAt(0))??this.implicitScalarAnyFirstChar;for(let i of t){let s=i.resolve(e,!1,i.tagName);if(s!==_t)return{value:s,tag:i}}let n=this.defaultScalarTag;return{value:n.resolve(e,!1,n.tagName),tag:n}}withTags(...e){let t=[];for(let n of e)t=t.concat(n);return new m5([...this.tags,...t])}},HC=new _S([Cle,vue,Iue]),tOe=new _S([...HC.tags,Ple,$le,Xle,lue]),ru=new _S([...HC.tags,Ole,kle,p5,h5]),zC=new _S([...HC.tags,Fle,Vle,xC,OC,Eue,hue,_ue,Tue,Aue,Rue]),Pue=zC.withTags({...xC,resolve:a((r,e,t)=>{let n=xC.resolve(r,e,t);return n===_t?p5.resolve(r,e,t):n},"resolve")},{...OC,resolve:a((r,e,t)=>{let n=OC.resolve(r,e,t);return n===_t?h5.resolve(r,e,t):n},"resolve")}),rOe=gS("tag:yaml.org,2002:map",{create:a(()=>new Map,"create"),addPair:a((r,e,t)=>(r.set(e,t),""),"addPair"),has:a((r,e)=>r.has(e),"has"),keys:a(r=>r.keys(),"keys"),get:a((r,e)=>r.get(e),"get"),identify:a(r=>r instanceof Map||yS(r),"identify"),represent:a(r=>{if(r instanceof Map)return r;let e=new Map,t=r;for(let n of Object.keys(t))e.set(n,t[n]);return e},"represent")});a(Q9,"normalizeKey");nOe=gS("tag:yaml.org,2002:map",{create:a(()=>({}),"create"),identify:yS,represent:a(r=>{let e=new Map;for(let t of Object.keys(r))e.set(t,r[t]);return e},"represent"),addPair:a((r,e,t)=>{let n=Q9(e);return n===null?"nested arrays are not supported inside keys":(n==="__proto__"?Object.defineProperty(r,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[n]=t,"")},"addPair"),has:a((r,e)=>{let t=Q9(e);return t!==null&&Object.prototype.hasOwnProperty.call(r,t)},"has"),keys:a(r=>Object.keys(r),"keys"),get:a((r,e)=>{let t=String(e);return Object.prototype.hasOwnProperty.call(r,t)?r[t]:null},"get")}),Due={maxLength:79,indent:1,linesBefore:3,linesAfter:2};a(vC,"getLine");a(TC,"padStart");a(Fue,"makeSnippet");a(X9,"formatError");Rc=class g5 extends Error{static{a(this,"YAMLException")}reason;mark;constructor(e,t){super(),this.name="YAMLException",this.reason=e,this.mark=t,this.message=X9(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(e){return`${this.name}: ${X9(this,e)}`}static throwAt(e,t,n,i=""){let s=0,o=0;for(let l=0;l<t;l++){let u=e.charCodeAt(l);u===10?(s++,o=l+1):u===13&&(s++,e.charCodeAt(l+1)===10&&l++,o=l+1)}let c={name:i,buffer:e,position:t,line:s,column:t-o};throw c.snippet=Fue(c),new g5(n,c)}},mr={DOCUMENT:1,SEQUENCE:2,MAPPING:3,SCALAR:4,ALIAS:5,POP:6},En={PLAIN:1,SINGLE_QUOTED:2,DOUBLE_QUOTED:3,LITERAL_BLOCK:4,FOLDED_BLOCK:5},Cc={BLOCK:1,FLOW:2},$i={CLIP:1,STRIP:2,KEEP:3},Lue=-1;a(J9,"simpleEscapeSequence");y5=new Array(256),_5=new Array(256);for(let r=0;r<256;r++)y5[r]=J9(r)?1:0,_5[r]=J9(r);a(Nue,"charFromCodepoint");a(kue,"fromHexCode$1");a(Mue,"escapedHexLen$1");a(pS,"skipFoldedBreaks");a(KC,"foldedBreaks");a(jue,"getPlainValue");a($ue,"getSingleQuotedValue");a(Uue,"getDoubleQuotedValue");a(Z9,"getBlockValue");a(Bue,"getScalarValue");Vue=Object.assign(Object.create(null),{"!":"!","!!":"tag:yaml.org,2002:"});a(AC,"tagPercentEncode");a(b5,"tagNameFull");a(S5,"tagNameShort");md=-1,Gue="tag:yaml.org,2002:merge",YC={filename:"",schema:ru,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};a(que,"eventPosition$1");a(Mn,"throwError$1");a(w5,"finalizeCollection");a(Wue,"constructScalar");a(e5,"collectionTagName");a(E5,"isMappingTag");a(t5,"mergeKeys");a(Hue,"mergeSource");a(zue,"addMappingValue");a(IC,"addValue");a(RC,"storeAnchor");a(Kue,"constructFromEvents");wt=-1,v5=Object.prototype.hasOwnProperty,bd=1,DC=2,T5=3,hS=4,Yue=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Que=/[,\[\]{}]/,A5=/^(?:!|!!|![0-9A-Za-z-]+!)$/,FC=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,I5=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,Xue=new RegExp(`^(?:${FC})*$`),Jue=new RegExp(`^(?:${I5})+$`),Zue=new RegExp(`^(?:!(?:${FC})*|${I5}(?:${FC})*)$`),QC={filename:"",maxDepth:100};a(efe,"addDocumentEvent");a(R5,"addSequenceEvent");a(LC,"addMappingEvent");a(r5,"insertFlowPairMappingEvent");a(wd,"addScalarEvent");a(tfe,"addAliasEvent");a(gd,"addPopEvent");a(ii,"addEmptyScalarEvent");a(n5,"emptyProperties");a(hm,"snapshotState");a(yd,"restoreState");a(Ne,"throwError");a(tn,"isEol");a(Zl,"isWhiteSpace");a(js,"isWsOrEol");a(xa,"isWsOrEolOrEnd");a(eu,"isFlowIndicator");a(rfe,"fromDecimalCode");a(nfe,"fromHexCode");a(ife,"escapedHexLen");a(sfe,"isSimpleEscape");a(mS,"consumeLineBreak");a(si,"skipSeparationSpace");a(Xl,"testDocumentSeparator");a(i5,"skipUntilLineEnd");a(C5,"checkPrintable");a(ofe,"readTagProperty");a(afe,"readAnchorProperty");a(cfe,"readAlias");a(NC,"readFlowScalarBreak");a(lfe,"readSingleQuotedScalar");a(ufe,"readDoubleQuotedScalar");a(ffe,"readBlockScalar");a(dfe,"canStartPlainScalar");a(pfe,"readPlainScalar");a(dm,"skipFlowSeparationSpace");a(hfe,"readFlowCollection");a(s5,"readBlockSequence");a(CC,"readBlockMapping");a(Jl,"parseNode");a(mfe,"readDirective");a(gfe,"readDocument");a(yfe,"parseEvents");_fe={...QC,...YC};a(bfe,"loadDocuments");a(Ed,"load");uS=class{static{a(this,"Style")}tagged=!1;flow=!1;singleQuoted=!1;doubleQuoted=!1;literal=!1;folded=!1},Ql=Symbol("INVALID");a(Sfe,"buildRepresentTypes");a(wfe,"matchTag");a(pm,"build");a(Efe,"jsToAst");vfe=Symbol("visit:break"),x5=Symbol("visit:skip");a(dS,"visitNode");a(Tfe,"visit");XC=65279,Afe=9,tu=10,O5=13,Ife=32,Rfe=33,P5=34,kC=35,Cfe=37,xfe=38,D5=39,Ofe=42,MC=44,JC=45,gm=58,Pfe=61,Dfe=62,F5=63,Ffe=64,jC=91,$C=93,Lfe=96,UC=123,Nfe=124,BC=125,$n={};$n[0]="\\0";$n[7]="\\a";$n[8]="\\b";$n[9]="\\t";$n[10]="\\n";$n[11]="\\v";$n[12]="\\f";$n[13]="\\r";$n[27]="\\e";$n[34]='\\"';$n[92]="\\\\";$n[133]="\\N";$n[160]="\\_";$n[8232]="\\L";$n[8233]="\\P";ZC={indent:2,seqNoIndent:!1,seqInlineFirst:!0,sortKeys:!1,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:"single",forceQuotes:!1,tagBeforeAnchor:!1};a(kfe,"nodeTagShort");a(Mfe,"createPresenterState");a(jfe,"encodeNonPrintable");a(o5,"indentString");a(VC,"generateNextLine");a($fe,"scalarLayout");a(Sd,"isWhitespace");a(Ufe,"startsWithDocumentSeparator");a(ym,"isPrintable");a(a5,"isNsCharOrWhitespace");a(GC,"isPlainSafe");a(Bfe,"isPlainSafeFirst");a(Vfe,"isPlainSafeAtStart");a(Gfe,"isPlainSafeLast");a(_d,"codePointAt");a(L5,"needIndentIndicator");_m=1,mm=2,ex=3,tx=4,Ic=5;a(qfe,"chooseScalarStyle");a(Wfe,"renderScalarStyle");a(Hfe,"resolveScalarStyle");a(c5,"blockHeader");a(l5,"encodeFlowBreaks");a(u5,"dropEndingNewline");a(bm,"isMoreIndented");a(zfe,"foldBlockScalar");a(f5,"foldLine");a(Kfe,"escapeString");a(Yfe,"writeFlowSequence");a(d5,"writeBlockSequence");a(Qfe,"writeFlowMapping");a(fS,"sortKeyValue");a(N5,"sortMappingItems");a(Xfe,"writeBlockMapping");a(qC,"cannotBeCompact");a(Oa,"writeNode");a(Jfe,"rootStartsOwnLine");a(Zfe,"isOpenEnded");a(ede,"writeDocumentDirectives");a(tde,"present");rde={...ZC,schema:Pue,skipInvalid:!1,noRefs:!1,flowLevel:-1,transform:a(()=>{},"transform")};a(vd,"dump");iOe=mr.DOCUMENT,sOe=mr.SEQUENCE,oOe=mr.MAPPING,aOe=mr.SCALAR,cOe=mr.ALIAS,lOe=mr.POP,uOe=En.PLAIN,fOe=En.SINGLE_QUOTED,dOe=En.DOUBLE_QUOTED,pOe=En.LITERAL_BLOCK,hOe=En.FOLDED_BLOCK,mOe=Cc.BLOCK,gOe=Cc.FLOW,yOe=$i.CLIP,_Oe=$i.STRIP,bOe=$i.KEEP});var rx,k5,nde,M5=qe(()=>{rx=a((r,e,t)=>{let n=r instanceof RegExp?k5(r,t):r,i=e instanceof RegExp?k5(e,t):e,s=n!==null&&i!=null&&nde(n,i,t);return s&&{start:s[0],end:s[1],pre:t.slice(0,s[0]),body:t.slice(s[0]+n.length,s[1]),post:t.slice(s[1]+i.length)}},"balanced"),k5=a((r,e)=>{let t=e.match(r);return t?t[0]:null},"maybeMatch"),nde=a((r,e,t)=>{let n,i,s,o,c,l=t.indexOf(r),u=t.indexOf(e,l+1),f=l;if(l>=0&&u>0){if(r===e)return[l,u];for(n=[],s=t.length;f>=0&&!c;){if(f===l)n.push(f),l=t.indexOf(r,f+1);else if(n.length===1){let d=n.pop();d!==void 0&&(c=[d,u])}else i=n.pop(),i!==void 0&&i<s&&(s=i,o=u),u=t.indexOf(e,f+1);f=l<u&&l>=0?l:u}n.length&&o!==void 0&&(c=[s,o])}return c},"range")});function nx(r){return isNaN(r)?r.charCodeAt(0):parseInt(r,10)}function gde(r){return r.replace(lde,j5).replace(ude,$5).replace(fde,sx).replace(dde,U5).replace(pde,B5)}function yde(r){return r.replace(ide,"\\").replace(sde,"{").replace(ode,"}").replace(ade,",").replace(cde,".")}function V5(r){if(!r)return[""];let e=[],t=rx("{","}",r);if(!t)return r.split(",");let{pre:n,body:i,post:s}=t,o=n.split(",");o[o.length-1]+="{"+i+"}";let c=V5(s);return s.length&&(o[o.length-1]+=c.shift(),o.push.apply(o,c)),e.push.apply(e,o),e}function G5(r,e={}){if(!r)return[];let{max:t=hde,maxLength:n=mde}=e;return r.slice(0,2)==="{}"&&(r="\\{\\}"+r.slice(2)),ix(gde(r),t,n,!0).map(yde)}function _de(r){return"{"+r+"}"}function bde(r){return/^-?0\d/.test(r)}function Sde(r,e){return r<=e}function wde(r,e){return r>=e}function wm(r,e,t,n,i,s){let o=[],c=0;for(let l=0;l<r.length;l++)for(let u=0;u<t.length;u++){if(o.length>=n)return o;let f=r[l]+e+t[u];if(!(s&&!f)){if(c+f.length>i)return o;o.push(f),c+=f.length}}return o}function Ede(r,e,t,n){let i=r.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let o=nx(i[0]),c=nx(i[1]),l=Math.max(i[0].length,i[1].length),u=i.length===3&&i[2]!==void 0?Math.max(Math.abs(nx(i[2])),1):1,f=Sde;c<o&&(u*=-1,f=wde);let p=i.some(bde),h=0;for(let m=o;f(m,c)&&s.length<t;m+=u){let g;if(e)g=String.fromCharCode(m),g==="\\"&&(g="");else if(g=String(m),p){let _=l-g.length;if(_>0){let b=new Array(_+1).join("0");m<0?g="-"+b+g.slice(1):g=b+g}}if(h+g.length>n)break;s.push(g),h+=g.length}return s}function ix(r,e,t,n){let i=[""],s=!1,o=!0;for(;;){let c=rx("{","}",r);if(!c)return wm(i,r,[""],e,t,s);let l=c.pre;if(/\$$/.test(l)){if(i=wm(i,l+"{"+c.body+"}",[""],e,t,s&&!c.post.length),o=!1,!c.post.length)break;r=c.post;continue}let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(c.body),f=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(c.body),d=u||f,p=c.body.indexOf(",")>=0;if(!d&&!p){if(c.post.match(/,(?!,).*\}/)){r=c.pre+"{"+c.body+sx+c.post,n=!0;continue}return wm(i,l+"{"+c.body+"}"+c.post,[""],e,t,s)}o&&(s=n&&!d,o=!1);let h;if(d)h=Ede(c.body,f,e,t);else{let m=V5(c.body);if(m.length===1&&m[0]!==void 0&&(m=ix(m[0],e,t,!1).map(_de),m.length===1)){if(i=wm(i,l+m[0],[""],e,t,s&&!c.post.length),!c.post.length)break;r=c.post;continue}let g=s&&!c.post.length&&!l;for(let b=0;g&&b<i.length;b++)i[b]&&(g=!1);h=[];let _=0;e:for(let b=0;b<m.length;b++){let T=ix(m[b],e,t,!1);for(let I=0;I<T.length;I++){let w=T[I];if(!(g&&!w)){if(h.length>=e||_+w.length>t)break e;h.push(w),_+=w.length}}}}if(i=wm(i,l,h,e,t,s&&!c.post.length),!c.post.length)break;r=c.post}return i}var j5,$5,sx,U5,B5,ide,sde,ode,ade,cde,lde,ude,fde,dde,pde,hde,mde,q5=qe(()=>{M5();j5="\0SLASH"+Math.random()+"\0",$5="\0OPEN"+Math.random()+"\0",sx="\0CLOSE"+Math.random()+"\0",U5="\0COMMA"+Math.random()+"\0",B5="\0PERIOD"+Math.random()+"\0",ide=new RegExp(j5,"g"),sde=new RegExp($5,"g"),ode=new RegExp(sx,"g"),ade=new RegExp(U5,"g"),cde=new RegExp(B5,"g"),lde=/\\\\/g,ude=/\\{/g,fde=/\\}/g,dde=/\\,/g,pde=/\\\./g,hde=1e5,mde=4e6;a(nx,"numeric");a(gde,"escapeBraces");a(yde,"unescapeBraces");a(V5,"parseCommaParts");a(G5,"expand");a(_de,"embrace");a(bde,"isPadded");a(Sde,"lte");a(wde,"gte");a(wm,"combine");a(Ede,"expandSequence");a(ix,"expand_")});var Em,W5=qe(()=>{Em=a(r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern")});var vde,vm,Tde,H5,z5,K5=qe(()=>{vde={"[: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]},vm=a(r=>r.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),Tde=a(r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),H5=a(r=>r.join(""),"rangesToString"),z5=a((r,e)=>{let t=e;if(r.charAt(t)!=="[")throw new Error("not in a brace expression");let n=[],i=[],s=t+1,o=!1,c=!1,l=!1,u=!1,f=t,d="";e:for(;s<r.length;){let g=r.charAt(s);if((g==="!"||g==="^")&&s===t+1){u=!0,s++;continue}if(g==="]"&&o&&!l){f=s+1;break}if(o=!0,g==="\\"&&!l){l=!0,s++;continue}if(g==="["&&!l){for(let[_,[b,T,I]]of Object.entries(vde))if(r.startsWith(_,s)){if(d)return["$.",!1,r.length-t,!0];s+=_.length,I?i.push(b):n.push(b),c=c||T;continue e}}if(l=!1,d){g>d?n.push(vm(d)+"-"+vm(g)):g===d&&n.push(vm(g)),d="",s++;continue}if(r.startsWith("-]",s+1)){n.push(vm(g+"-")),s+=2;continue}if(r.startsWith("-",s+1)){d=g,s+=2;continue}n.push(vm(g)),s++}if(f<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,r.length-t,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!u){let g=n[0].length===2?n[0].slice(-1):n[0];return[Tde(g),!1,f-t,!1]}let p="["+(u?"^":"")+H5(n)+"]",h="["+(u?"":"^")+H5(i)+"]";return[n.length&&i.length?"("+p+"|"+h+")":n.length?p:h,c,f-t,!0]},"parseClass")});var $s,SS=qe(()=>{$s=a((r,{windowsPathsNoEscape:e=!1,magicalBraces:t=!0}={})=>t?e?r.replace(/\[([^/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?r.replace(/\[([^/\\{}])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1"),"unescape")});var xi,Ade,ox,Y5,Ide,Rde,Cde,Q5,xde,wS,Ode,Pde,Dde,Fde,ax,X5,J5,Lde,nu,cx=qe(()=>{K5();SS();Ade=new Set(["!","?","+","*","@"]),ox=a(r=>Ade.has(r),"isExtglobType"),Y5=a(r=>ox(r.type),"isExtglobAST"),Ide=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),Rde=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),Cde=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Q5=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),xde="(?!(?:^|/)\\.\\.?(?:$|/))",wS="(?!\\.)",Ode=new Set(["[","."]),Pde=new Set(["..","."]),Dde=new Set("().*{}+?[]^$\\!"),Fde=a(r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),ax="[^/]",X5=ax+"*?",J5=ax+"+?",Lde=0,nu=class{static{a(this,"AST")}type;#t;#r;#n=!1;#e=[];#i;#a;#p;#u=!1;#c;#f;#l=!1;id=++Lde;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#t.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(e,t,n={}){this.type=e,e&&(this.#r=!0),this.#i=t,this.#t=this.#i?this.#i.#t:this,this.#c=this.#t===this?n:this.#t.#c,this.#p=this.#t===this?[]:this.#t.#p,e==="!"&&!this.#t.#u&&this.#p.push(this),this.#a=this.#i?this.#i.#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.#f!==void 0?this.#f:this.type?this.#f=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#f=this.#e.map(e=>String(e)).join("")}#d(){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.#p.pop();){if(e.type!=="!")continue;let t=e,n=t.#i;for(;n;){for(let i=t.#a+1;!n.type&&i<n.#e.length;i++)for(let s of e.#e){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#e[i])}t=n,n=t.#i}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof xi&&t.#i===this))throw new Error("invalid part: "+t);this.#e.push(t)}}toJSON(){let e=this.type===null?this.#e.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#e.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#u&&this.#i?.type==="!")&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let n=e.#e[t];if(!(n instanceof xi&&n.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#e.length:0;return this.#a===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new xi(this.type,e);for(let n of this.#e)t.copyIn(n);return t}static#o(e,t,n,i,s){let o=i.maxExtglobRecursion??2,c=!1,l=!1,u=-1,f=!1;if(t.type===null){let g=n,_="";for(;g<e.length;){let b=e.charAt(g++);if(c||b==="\\"){c=!c,_+=b;continue}if(l){g===u+1?(b==="^"||b==="!")&&(f=!0):b==="]"&&!(g===u+2&&f)&&(l=!1),_+=b;continue}else if(b==="["){l=!0,u=g,f=!1,_+=b;continue}if(!i.noext&&ox(b)&&e.charAt(g)==="("&&s<=o){t.push(_),_="";let I=new xi(b,t);g=xi.#o(e,I,g,i,s+1),t.push(I);continue}_+=b}return t.push(_),g}let d=n+1,p=new xi(null,t),h=[],m="";for(;d<e.length;){let g=e.charAt(d++);if(c||g==="\\"){c=!c,m+=g;continue}if(l){d===u+1?(g==="^"||g==="!")&&(f=!0):g==="]"&&!(d===u+2&&f)&&(l=!1),m+=g;continue}else if(g==="["){l=!0,u=d,f=!1,m+=g;continue}if(!i.noext&&ox(g)&&e.charAt(d)==="("&&(s<=o||t&&t.#b(g))){let b=t&&t.#b(g)?0:1;p.push(m),m="";let T=new xi(g,p);p.push(T),d=xi.#o(e,T,d,i,s+b);continue}if(g==="|"){p.push(m),m="",h.push(p),p=new xi(null,t);continue}if(g===")")return m===""&&t.#e.length===0&&(t.#l=!0),p.push(m),m="",t.push(...h,p),d;m+=g}return t.type=null,t.#r=void 0,t.#e=[e.substring(n-1)],d}#g(e){return this.#E(e,Rde)}#E(e,t=Ide){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.#b(n.type,t)}#b(e,t=Cde){return!!t.get(this.type)?.includes(e)}#S(e,t){let n=e.#e[0],i=new xi(null,n,this.options);i.#e.push(""),n.push(i),this.#A(e,t)}#A(e,t){let n=e.#e[0];this.#e.splice(t,1,...n.#e);for(let i of n.#e)typeof i=="object"&&(i.#i=this);this.#f=void 0}#y(e){return!!Q5.get(this.type)?.has(e)}#v(e){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let t=e.#e[0];return!t||typeof t!="object"||t.type===null?!1:this.#y(t.type)}#T(e){let t=Q5.get(this.type),n=e.#e[0],i=t?.get(n.type);if(!i)return!1;this.#e=n.#e;for(let s of this.#e)typeof s=="object"&&(s.#i=this);this.type=i,this.#f=void 0,this.#l=!1}static fromGlob(e,t={}){let n=new xi(null,void 0,t);return xi.#o(e,n,0,t,0),n}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let e=this.toString(),[t,n,i,s]=this.toRegExpSource();if(!(i||this.#r||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let c=(this.#c.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${t}$`,c),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#t===this&&(this.#m(),this.#d()),!Y5(this)){let l=this.isStart()&&this.isEnd()&&!this.#e.some(h=>typeof h!="string"),u=this.#e.map(h=>{let[m,g,_,b]=typeof h=="string"?xi.#w(h,this.#r,l):h.toRegExpSource(e);return this.#r=this.#r||_,this.#n=this.#n||b,m}).join(""),f="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&Pde.has(this.#e[0]))){let m=Ode,g=t&&m.has(u.charAt(0))||u.startsWith("\\.")&&m.has(u.charAt(2))||u.startsWith("\\.\\.")&&m.has(u.charAt(4)),_=!t&&!e&&m.has(u.charAt(0));f=g?xde:_?wS:""}let d="";return this.isEnd()&&this.#t.#u&&this.#i?.type==="!"&&(d="(?:$|\\/)"),[f+u+d,$s(u),this.#r=!!this.#r,this.#n]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#_(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString(),u=this;return u.#e=[l],u.type=null,u.#r=void 0,[l,$s(this.toString()),!1,!1]}let o=!n||e||t||!wS?"":this.#_(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!t?wS:"")+J5;else{let l=this.type==="!"?"))"+(this.isStart()&&!t&&!e?wS:"")+X5+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;c=i+s+l}return[c,$s(s),this.#r=!!this.#r,this.#n]}#m(){if(Y5(this)){let e=0,t=!1;do{t=!0;for(let n=0;n<this.#e.length;n++){let i=this.#e[n];typeof i=="object"&&(i.#m(),this.#E(i)?(t=!1,this.#A(i,n)):this.#g(i)?(t=!1,this.#S(i,n)):this.#v(i)&&(t=!1,this.#T(i)))}}while(!t&&++e<10)}else for(let e of this.#e)typeof e=="object"&&e.#m();this.#f=void 0}#_(e){return this.#e.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[n,i,s,o]=t.toRegExpSource(e);return this.#n=this.#n||o,n}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#w(e,t,n=!1){let i=!1,s="",o=!1,c=!1;for(let l=0;l<e.length;l++){let u=e.charAt(l);if(i){i=!1,s+=(Dde.has(u)?"\\":"")+u;continue}if(u==="*"){if(c)continue;c=!0,s+=n&&/^[*]+$/.test(e)?J5:X5,t=!0;continue}else c=!1;if(u==="\\"){l===e.length-1?s+="\\\\":i=!0;continue}if(u==="["){let[f,d,p,h]=z5(e,l);if(p){s+=f,o=o||d,l+=p-1,t=t||h;continue}}if(u==="?"){s+=ax,t=!0;continue}s+=Fde(u)}return[s,$s(e),!!t,o]}};xi=nu});var Td,lx=qe(()=>{Td=a((r,{windowsPathsNoEscape:e=!1,magicalBraces:t=!1}={})=>t?e?r.replace(/[?*()[\]{}]/g,"[$&]"):r.replace(/[?*()[\]\\{}]/g,"\\$&"):e?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&"),"escape")});var oi,Nde,kde,Mde,jde,$de,Ude,Bde,Vde,Gde,qde,Wde,Hde,zde,Kde,Yde,Qde,Xde,Jde,tU,rU,nU,Z5,Zde,br,epe,tpe,rpe,npe,ipe,ts,spe,iU,ope,ape,eU,cpe,Ui,xc=qe(()=>{q5();W5();cx();lx();SS();cx();lx();SS();oi=a((r,e,t={})=>(Em(e),!t.nocomment&&e.charAt(0)==="#"?!1:new Ui(e,t).match(r)),"minimatch"),Nde=/^\*+([^+@!?*[(]*)$/,kde=a(r=>e=>!e.startsWith(".")&&e.endsWith(r),"starDotExtTest"),Mde=a(r=>e=>e.endsWith(r),"starDotExtTestDot"),jde=a(r=>(r=r.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(r)),"starDotExtTestNocase"),$de=a(r=>(r=r.toLowerCase(),e=>e.toLowerCase().endsWith(r)),"starDotExtTestNocaseDot"),Ude=/^\*+\.\*+$/,Bde=a(r=>!r.startsWith(".")&&r.includes("."),"starDotStarTest"),Vde=a(r=>r!=="."&&r!==".."&&r.includes("."),"starDotStarTestDot"),Gde=/^\.\*+$/,qde=a(r=>r!=="."&&r!==".."&&r.startsWith("."),"dotStarTest"),Wde=/^\*+$/,Hde=a(r=>r.length!==0&&!r.startsWith("."),"starTest"),zde=a(r=>r.length!==0&&r!=="."&&r!=="..","starTestDot"),Kde=/^\?+([^+@!?*[(]*)?$/,Yde=a(([r,e=""])=>{let t=tU([r]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},"qmarksTestNocase"),Qde=a(([r,e=""])=>{let t=rU([r]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},"qmarksTestNocaseDot"),Xde=a(([r,e=""])=>{let t=rU([r]);return e?n=>t(n)&&n.endsWith(e):t},"qmarksTestDot"),Jde=a(([r,e=""])=>{let t=tU([r]);return e?n=>t(n)&&n.endsWith(e):t},"qmarksTest"),tU=a(([r])=>{let e=r.length;return t=>t.length===e&&!t.startsWith(".")},"qmarksTestNoExt"),rU=a(([r])=>{let e=r.length;return t=>t.length===e&&t!=="."&&t!==".."},"qmarksTestNoExtDot"),nU=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Z5={win32:{sep:"\\"},posix:{sep:"/"}},Zde=nU==="win32"?Z5.win32.sep:Z5.posix.sep;oi.sep=Zde;br=Symbol("globstar **");oi.GLOBSTAR=br;epe="[^/]",tpe=epe+"*?",rpe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",npe="(?:(?!(?:\\/|^)\\.).)*?",ipe=a((r,e={})=>t=>oi(t,r,e),"filter");oi.filter=ipe;ts=a((r,e={})=>Object.assign({},r,e),"ext"),spe=a(r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return oi;let e=oi;return Object.assign(a((n,i,s={})=>e(n,i,ts(r,s)),"m"),{Minimatch:class extends e.Minimatch{static{a(this,"Minimatch")}constructor(i,s={}){super(i,ts(r,s))}static defaults(i){return e.defaults(ts(r,i)).Minimatch}},AST:class extends e.AST{static{a(this,"AST")}constructor(i,s,o={}){super(i,s,ts(r,o))}static fromGlob(i,s={}){return e.AST.fromGlob(i,ts(r,s))}},unescape:a((n,i={})=>e.unescape(n,ts(r,i)),"unescape"),escape:a((n,i={})=>e.escape(n,ts(r,i)),"escape"),filter:a((n,i={})=>e.filter(n,ts(r,i)),"filter"),defaults:a(n=>e.defaults(ts(r,n)),"defaults"),makeRe:a((n,i={})=>e.makeRe(n,ts(r,i)),"makeRe"),braceExpand:a((n,i={})=>e.braceExpand(n,ts(r,i)),"braceExpand"),match:a((n,i,s={})=>e.match(n,i,ts(r,s)),"match"),sep:e.sep,GLOBSTAR:br})},"defaults");oi.defaults=spe;iU=a((r,e={})=>(Em(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:G5(r,{max:e.braceExpandMax})),"braceExpand");oi.braceExpand=iU;ope=a((r,e={})=>new Ui(r,e).makeRe(),"makeRe");oi.makeRe=ope;ape=a((r,e,t={})=>{let n=new Ui(e,t);return r=r.filter(i=>n.match(i)),n.options.nonull&&!r.length&&r.push(e),r},"match");oi.match=ape;eU=/[?*]|[+@!]\(.*?\)|\[|\]/,cpe=a(r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Ui=class{static{a(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){Em(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||nU,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,o,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!eU.test(s[2]))&&!eU.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(f=>this.parse(f))];if(u)return[s[0],...s.slice(1).map(f=>this.parse(f))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][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 of e)for(let i=0;i<n.length;i++)n[i]==="**"&&(n[i]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let n=-1;for(;(n=t.indexOf("**",n+1))!==-1;){let i=n;for(;t[i+1]==="**";)i++;i!==n&&t.splice(n,i-n)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((n,i)=>{let s=n[n.length-1];return i==="**"&&s==="**"?n:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(i),n)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let s=e[i];i===1&&s===""&&e[0]===""||(s==="."||s==="")&&(t=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let i=e[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let c=n[i+1],l=n[i+2],u=n[i+3];if(c!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;t=!0,n.splice(i,1);let f=n.slice(0);f[i]="**",e.push(f),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){let c=n[o];o===1&&c===""&&n[0]===""||(c==="."||c==="")&&(t=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(t=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let l=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...l),n.length===0&&n.push(""),s-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let i=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(i){e[t]=[],e[n]=i;break}}return e.filter(t=>t.length)}partsMatch(e,t,n=!1){let i=0,s=0,o=[],c="";for(;i<e.length&&s<t.length;)if(e[i]===t[s])o.push(c==="b"?t[s]:e[i]),i++,s++;else if(n&&e[i]==="**"&&t[s]===e[i+1])o.push(e[i]),i++;else if(n&&t[s]==="**"&&e[i]===t[s+1])o.push(t[s]),s++;else if(e[i]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(c==="b")return!1;c="a",o.push(e[i]),i++,s++}else if(t[s]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(c==="a")return!1;c="b",o.push(t[s]),i++,s++}else return!1;return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let i=0,s=0;if(this.isWindows){let c=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),l=!c&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),u=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),f=!u&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),d=l?3:c?0:void 0,p=f?3:u?0:void 0;if(typeof d=="number"&&typeof p=="number"){let[h,m]=[e[d],t[p]];h.toLowerCase()===m.toLowerCase()&&(t[p]=h,s=p,i=d)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(br)?this.#t(e,t,n,i,s):this.#n(e,t,n,i,s)}#t(e,t,n,i,s){let o=t.indexOf(br,s),c=t.lastIndexOf(br),[l,u,f]=n?[t.slice(s,o),t.slice(o+1),[]]:[t.slice(s,o),t.slice(o+1,c),t.slice(c+1)];if(l.length){let T=e.slice(i,i+l.length);if(!this.#n(T,l,n,0,0))return!1;i+=l.length,s+=l.length}let d=0;if(f.length){if(f.length+i>e.length)return!1;let T=e.length-f.length;if(this.#n(e,f,n,T,0))d=f.length;else{if(e[e.length-1]!==""||i+f.length===e.length||(T--,!this.#n(e,f,n,T,0)))return!1;d=f.length+1}}if(!u.length){let T=!!d;for(let I=i;I<e.length-d;I++){let w=String(e[I]);if(T=!0,w==="."||w===".."||!this.options.dot&&w.startsWith("."))return!1}return n||T}let p=[[[],0]],h=p[0],m=0,g=[0];for(let T of u)T===br?(g.push(m),h=[[],0],p.push(h)):(h[0].push(T),m++);let _=p.length-1,b=e.length-d;for(let T of p)T[1]=b-(g[_--]+T[0].length);return!!this.#r(e,p,i,0,n,0,!!d)}#r(e,t,n,i,s,o,c){let l=t[i];if(!l){for(let d=n;d<e.length;d++){c=!0;let p=e[d];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return c}let[u,f]=l;for(;n<=f;){if(this.#n(e.slice(0,n+u.length),u,s,n,0)&&o<this.maxGlobstarRecursion){let h=this.#r(e,t,n+u.length,i+1,s,o+1,c);if(h!==!1)return h}let p=e[n];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;n++}return s||null}#n(e,t,n,i,s){let o,c,l,u;for(o=i,c=s,u=e.length,l=t.length;o<u&&c<l;o++,c++){this.debug("matchOne loop");let f=t[c],d=e[o];if(this.debug(t,f,d),f===!1||f===br)return!1;let p;if(typeof f=="string"?(p=d===f,this.debug("string match",f,d,p)):(p=f.test(d),this.debug("pattern match",f,d,p)),!p)return!1}if(o===u&&c===l)return!0;if(o===u)return n;if(c===l)return o===u-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return iU(this.pattern,this.options)}parse(e){Em(e);let t=this.options;if(e==="**")return br;if(e==="")return"";let n,i=null;(n=e.match(Wde))?i=t.dot?zde:Hde:(n=e.match(Nde))?i=(t.nocase?t.dot?$de:jde:t.dot?Mde:kde)(n[1]):(n=e.match(Kde))?i=(t.nocase?t.dot?Qde:Yde:t.dot?Xde:Jde)(n):(n=e.match(Ude))?i=t.dot?Vde:Bde:(n=e.match(Gde))&&(i=qde);let s=nu.fromGlob(e,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?tpe:t.dot?rpe:npe,i=new Set(t.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(d=>{if(d instanceof RegExp)for(let p of d.flags.split(""))i.add(p);return typeof d=="string"?cpe(d):d===br?br:d._src});u.forEach((d,p)=>{let h=u[p+1],m=u[p-1];d!==br||m===br||(m===void 0?h!==void 0&&h!==br?u[p+1]="(?:\\/|"+n+"\\/)?"+h:u[p]=n:h===void 0?u[p-1]=m+"(?:\\/|\\/"+n+")?":h!==br&&(u[p-1]=m+"(?:\\/|\\/"+n+"\\/)"+h,u[p+1]=br))});let f=u.filter(d=>d!==br);if(this.partial&&f.length>=1){let d=[];for(let p=1;p<=f.length;p++)d.push(f.slice(0,p).join("/"));return"(?:"+d.join("|")+")"}return f.join("/")}).join("|"),[o,c]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+c+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+c+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let c=i.length-2;!o&&c>=0;c--)o=i[c];for(let c of s){let l=i;if(n.matchBase&&c.length===1&&(l=[o]),this.matchOne(l,c,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return oi.defaults(e).Minimatch}};oi.AST=nu;oi.Minimatch=Ui;oi.escape=Td;oi.unescape=$s});var vS,vn,Tm,lpe,ux,oU,sU,upe,fpe,Oc,aU,ES,dpe,Im,lU=qe(()=>{vS=require("node:diagnostics_channel"),vn=(0,vS.channel)("lru-cache:metrics"),Tm=(0,vS.tracingChannel)("lru-cache"),lpe=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ux=a(()=>vn.hasSubscribers||Tm.hasSubscribers,"R"),oU=new Set,sU=typeof process=="object"&&process?process:{},upe=a((r,e,t,n)=>{typeof sU.emitWarning=="function"?sU.emitWarning(r,e,t,n):console.error(`[${t}] ${e}: ${r}`)},"k"),fpe=a(r=>!oU.has(r),"H"),Oc=a(r=>!!r&&r===Math.floor(r)&&r>0&&isFinite(r),"T"),aU=a(r=>Oc(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?ES:null:null,"j"),ES=class extends Array{static{a(this,"O")}constructor(r){super(r),this.fill(0)}},dpe=class Am{static{a(this,"d")}heap;length;static#t=!1;static create(e){let t=aU(e);if(!t)return[];Am.#t=!0;let n=new Am(e,t);return Am.#t=!1,n}constructor(e,t){if(!Am.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Im=class cU{static{a(this,"d")}#t;#r;#n;#e;#i;#a;#p;#u;get perf(){return this.#u}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#c;#f;#l;#d;#o;#g;#E;#b;#S;#A;#y;#v;#T;#m;#_;#w;#R;#s;#x;static unsafeExposeInternals(e){return{starts:e.#T,ttls:e.#m,autopurgeTimers:e.#_,sizes:e.#v,keyMap:e.#l,keyList:e.#d,valList:e.#o,next:e.#g,prev:e.#E,get head(){return e.#b},get tail(){return e.#S},free:e.#A,isBackgroundFetch:a(t=>e.#h(t),"isBackgroundFetch"),backgroundFetch:a((t,n,i,s)=>e.#M(t,n,i,s),"backgroundFetch"),moveToTail:a(t=>e.#K(t),"moveToTail"),indexes:a(t=>e.#P(t),"indexes"),rindexes:a(t=>e.#D(t),"rindexes"),isStale:a(t=>e.#I(t),"isStale")}}get max(){return this.#t}get maxSize(){return this.#r}get calculatedSize(){return this.#f}get size(){return this.#c}get fetchMethod(){return this.#a}get memoMethod(){return this.#p}get dispose(){return this.#n}get onInsert(){return this.#e}get disposeAfter(){return this.#i}constructor(e){let{max:t=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:c,allowStale:l,dispose:u,onInsert:f,disposeAfter:d,noDisposeOnSet:p,noUpdateTTL:h,maxSize:m=0,maxEntrySize:g=0,sizeCalculation:_,fetchMethod:b,memoMethod:T,noDeleteOnFetchRejection:I,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:R,ignoreFetchAbort:L,backgroundFetchSize:P=1,perf:M}=e;if(this.backgroundFetchSize=P,M!==void 0&&typeof M?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#u=M??lpe,t!==0&&!Oc(t))throw new TypeError("max option must be a nonnegative integer");let O=t?aU(t):Array;if(!O)throw new Error("invalid max value: "+t);if(this.#t=t,this.#r=m,this.maxEntrySize=g||this.#r,this.sizeCalculation=_,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(T!==void 0&&typeof T!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#p=T,b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=b,this.#R=!!b,this.#l=new Map,this.#d=Array.from({length:t}).fill(void 0),this.#o=Array.from({length:t}).fill(void 0),this.#g=new O(t),this.#E=new O(t),this.#b=0,this.#S=0,this.#A=dpe.create(t),this.#c=0,this.#f=0,typeof u=="function"&&(this.#n=u),typeof f=="function"&&(this.#e=f),typeof d=="function"?(this.#i=d,this.#y=[]):(this.#i=void 0,this.#y=void 0),this.#w=!!this.#n,this.#x=!!this.#e,this.#s=!!this.#i,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!I,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!R,this.ignoreFetchAbort=!!L,this.maxEntrySize!==0){if(this.#r!==0&&!Oc(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!Oc(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#q()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!c,this.ttlResolution=Oc(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!Oc(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#O()}if(this.#t===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#r){let F="LRU_CACHE_UNBOUNDED";fpe(F)&&(oU.add(F),upe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,cU))}}getRemainingTTL(e){return this.#l.has(e)?1/0:0}#O(){let e=new ES(this.#t),t=new ES(this.#t);this.#m=e,this.#T=t;let n=this.ttlAutopurge?Array.from({length:this.#t}):void 0;this.#_=n,this.#$=(l,u,f=this.#u.now())=>{t[l]=u!==0?f:0,e[l]=u,i(l,u)},this.#C=l=>{t[l]=e[l]!==0?this.#u.now():0,i(l,e[l])};let i=this.ttlAutopurge?(l,u)=>{if(n?.[l]&&(clearTimeout(n[l]),n[l]=void 0),u&&u!==0&&n){let f=setTimeout(()=>{this.#I(l)?(this.#j(this.#d[l],"expire"),n[l]=void 0):i(l,c(l))},u+1);f.unref&&f.unref(),n[l]=f}}:()=>{};this.#F=(l,u)=>{if(e[u]){let f=e[u],d=t[u];if(!f||!d)return;l.ttl=f,l.start=d,l.now=s||o();let p=l.now-d;l.remainingTTL=f-p}};let s=0,o=a(()=>{let l=this.#u.now();if(this.ttlResolution>0){s=l;let u=setTimeout(()=>s=0,this.ttlResolution);u.unref&&u.unref()}return l},"o");this.getRemainingTTL=l=>{let u=this.#l.get(l);return u===void 0?0:c(u)};let c=a(l=>{let u=e[l],f=t[l];if(!u||!f)return 1/0;let d=(s||o())-f;return u-d},"l");this.#I=l=>{let u=t[l],f=e[l];return!!f&&!!u&&(s||o())-u>f}}#C=a(()=>{},"#R");#F=a(()=>{},"#v");#$=a(()=>{},"#H");#I=a(()=>!1,"#p");#q(){let e=new ES(this.#t);this.#f=0,this.#v=e,this.#N=t=>{this.#f-=e[t],e[t]=0},this.#U=(t,n,i,s)=>{if(!Oc(i)){if(this.#h(n))return this.backgroundFetchSize;if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(n,t),!Oc(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return i},this.#L=(t,n,i)=>{if(e[t]=n,this.#r){let s=this.#r-e[t];for(;this.#f>s;)this.#G(!0)}this.#f+=e[t],i&&(i.entrySize=n,i.totalCalculatedSize=this.#f)}}#N=a(e=>{},"#x");#L=a((e,t,n)=>{},"#j");#U=a((e,t,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#N");*#P({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#S;this.#B(t)&&((e||!this.#I(t))&&(yield t),t!==this.#b);)t=this.#E[t]}*#D({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#b;this.#B(t)&&((e||!this.#I(t))&&(yield t),t!==this.#S);)t=this.#g[t]}#B(e){return e!==void 0&&this.#l.get(this.#d[e])===e}*entries(){for(let e of this.#P())this.#o[e]!==void 0&&this.#d[e]!==void 0&&!this.#h(this.#o[e])&&(yield[this.#d[e],this.#o[e]])}*rentries(){for(let e of this.#D())this.#o[e]!==void 0&&this.#d[e]!==void 0&&!this.#h(this.#o[e])&&(yield[this.#d[e],this.#o[e]])}*keys(){for(let e of this.#P()){let t=this.#d[e];t!==void 0&&!this.#h(this.#o[e])&&(yield t)}}*rkeys(){for(let e of this.#D()){let t=this.#d[e];t!==void 0&&!this.#h(this.#o[e])&&(yield t)}}*values(){for(let e of this.#P())this.#o[e]!==void 0&&!this.#h(this.#o[e])&&(yield this.#o[e])}*rvalues(){for(let e of this.#D())this.#o[e]!==void 0&&!this.#h(this.#o[e])&&(yield this.#o[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let n of this.#P()){let i=this.#o[n],s=this.#h(i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,this.#d[n],this))return this.#z(this.#d[n],t)}}forEach(e,t=this){for(let n of this.#P()){let i=this.#o[n],s=this.#h(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(t,s,this.#d[n],this)}}rforEach(e,t=this){for(let n of this.#D()){let i=this.#o[n],s=this.#h(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(t,s,this.#d[n],this)}}purgeStale(){let e=!1;for(let t of this.#D({allowStale:!0}))this.#I(t)&&(this.#j(this.#d[t],"expire"),e=!0);return e}info(e){let t=this.#l.get(e);if(t===void 0)return;let n=this.#o[t],i=this.#h(n)?n.__staleWhileFetching:n;if(i===void 0)return;let s={value:i};if(this.#m&&this.#T){let o=this.#m[t],c=this.#T[t];if(o&&c){let l=o-(this.#u.now()-c);s.ttl=l,s.start=Date.now()}}return this.#v&&(s.size=this.#v[t]),s}dump(){let e=[];for(let t of this.#P({allowStale:!0})){let n=this.#d[t],i=this.#o[t],s=this.#h(i)?i.__staleWhileFetching:i;if(s===void 0||n===void 0)continue;let o={value:s};if(this.#m&&this.#T){o.ttl=this.#m[t];let c=this.#u.now()-this.#T[t];o.start=Math.floor(Date.now()-c)}this.#v&&(o.size=this.#v[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let i=Date.now()-n.start;n.start=this.#u.now()-i}this.#k(t,n.value,n)}}set(e,t,n={}){let{status:i=vn.hasSubscribers?{}:void 0}=n;n.status=i,i&&(i.op="set",i.key=e,t!==void 0&&(i.value=t),i.cache=this);let s=this.#k(e,t,n);return i&&vn.hasSubscribers&&vn.publish(i),s}#k(e,t,n,i){let{ttl:s=this.ttl,start:o,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=n,f=this.#h(t);if(t===void 0)return u&&(u.set="deleted"),this.delete(e),this;let{noUpdateTTL:d=this.noUpdateTTL}=n;u&&!f&&(u.value=t);let p=this.#U(e,t,n.size||0,l,u);if(this.maxEntrySize&&p>this.maxEntrySize)return this.#j(e,"set"),u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this;let h=this.#c===0?void 0:this.#l.get(e);if(h===void 0)h=this.#c===0?this.#S:this.#A.length!==0?this.#A.pop():this.#c===this.#t?this.#G(!1):this.#c,this.#d[h]=e,this.#o[h]=t,this.#l.set(e,h),this.#g[this.#S]=h,this.#E[h]=this.#S,this.#S=h,this.#c++,this.#L(h,p,u),u&&(u.set="add"),d=!1,this.#x&&!f&&this.#e?.(t,e,"add");else{this.#K(h);let m=this.#o[h];if(t!==m){if(!c)if(this.#h(m)){m!==i&&m.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:g}=m;g!==void 0&&g!==t&&(this.#w&&this.#n?.(g,e,"set"),this.#s&&this.#y?.push([g,e,"set"]))}else this.#w&&this.#n?.(m,e,"set"),this.#s&&this.#y?.push([m,e,"set"]);if(this.#N(h),this.#L(h,p,u),this.#o[h]=t,!f){let g=m&&this.#h(m)?m.__staleWhileFetching:m,_=g===void 0?"add":t!==g?"replace":"update";u&&(u.set=_,g!==void 0&&(u.oldValue=g)),this.#x&&this.onInsert?.(t,e,_)}}else f||(u&&(u.set="update"),this.#x&&this.onInsert?.(t,e,"update"))}if(s!==0&&!this.#m&&this.#O(),this.#m&&(d||this.#$(h,s,o),u&&this.#F(u,h)),!c&&this.#s&&this.#y){let m=this.#y,g;for(;g=m?.shift();)this.#i?.(...g)}return this}pop(){try{for(;this.#c;){let e=this.#o[this.#b];if(this.#G(!0),this.#h(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#s&&this.#y){let e=this.#y,t;for(;t=e?.shift();)this.#i?.(...t)}}}#G(e){let t=this.#b,n=this.#d[t],i=this.#o[t],s=this.#h(i);s&&i.__abortController.abort(new Error("evicted"));let o=s?i.__staleWhileFetching:i;return(this.#w||this.#s)&&o!==void 0&&(this.#w&&this.#n?.(o,n,"evict"),this.#s&&this.#y?.push([o,n,"evict"])),this.#N(t),this.#_?.[t]&&(clearTimeout(this.#_[t]),this.#_[t]=void 0),e&&(this.#d[t]=void 0,this.#o[t]=void 0,this.#A.push(t)),this.#c===1?(this.#b=this.#S=0,this.#A.length=0):this.#b=this.#g[t],this.#l.delete(n),this.#c--,t}has(e,t={}){let{status:n=vn.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="has",n.key=e,n.cache=this);let i=this.#Y(e,t);return vn.hasSubscribers&&vn.publish(n),i}#Y(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=t,s=this.#l.get(e);if(s!==void 0){let o=this.#o[s];if(this.#h(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#I(s))i&&(i.has="stale",this.#F(i,s));else return n&&this.#C(s),i&&(i.has="hit",this.#F(i,s)),!0}else i&&(i.has="miss");return!1}peek(e,t={}){let{status:n=ux()?{}:void 0}=t;n&&(n.op="peek",n.key=e,n.cache=this),t.status=n;let i=this.#W(e,t);return vn.hasSubscribers&&vn.publish(n),i}#W(e,t){let{status:n,allowStale:i=this.allowStale}=t,s=this.#l.get(e);if(s===void 0||!i&&this.#I(s)){n&&(n.peek=s===void 0?"miss":"stale");return}let o=this.#o[s],c=this.#h(o)?o.__staleWhileFetching:o;return n&&(c!==void 0?(n.peek="hit",n.value=c):n.peek="miss"),c}#M(e,t,n,i){let s=t===void 0?void 0:this.#o[t];if(this.#h(s))return s;let o=new AbortController,{signal:c}=n;c?.addEventListener("abort",()=>o.abort(c.reason),{signal:o.signal});let l={signal:o.signal,options:n,context:i},u=a((g,_=!1)=>{let{aborted:b}=o.signal,T=n.ignoreFetchAbort&&g!==void 0,I=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&g!==void 0);if(n.status&&(b&&!_?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,T&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),b&&!T&&!_)return d(o.signal.reason,I);let w=h,S=this.#o[t];return(S===h||S===void 0&&T&&_)&&(g===void 0?w.__staleWhileFetching!==void 0?this.#o[t]=w.__staleWhileFetching:this.#j(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#k(e,g,l.options,w))),g},"r"),f=a(g=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=g),d(g,!1)),"c"),d=a((g,_)=>{let{aborted:b}=o.signal,T=b&&n.allowStaleOnFetchAbort,I=T||n.allowStaleOnFetchRejection,w=I||n.noDeleteOnFetchRejection,S=h;if(this.#o[t]===h&&(!w||!_&&S.__staleWhileFetching===void 0?this.#j(e,"fetch"):T||(this.#o[t]=S.__staleWhileFetching)),I)return n.status&&S.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw g},"m"),p=a((g,_)=>{let b=this.#a?.(e,s,l);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(g(void 0),n.allowStaleOnFetchAbort&&(g=a(T=>u(T,!0),"f")))}),b&&b instanceof Promise?b.then(T=>g(T===void 0?void 0:T),_):b!==void 0&&g(b)},"_");n.status&&(n.status.fetchDispatched=!0);let h=new Promise(p).then(u,f),m=Object.assign(h,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.#k(e,m,{...l.options,status:void 0}),t=this.#l.get(e)):this.#o[t]=m,m}#h(e){if(!this.#R)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let n=Tm.hasSubscribers,{status:i=ux()?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let s=this.#H(e,t);return i&&n&&(i.trace=!0,Tm.tracePromise(()=>s,i).catch(()=>{})),s}async#H(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:g,forceRefresh:_=!1,status:b,signal:T}=t;if(b&&(b.op="fetch",b.key=e,_&&(b.forceRefresh=!0),b.cache=this),!this.#R)return b&&(b.fetch="get"),this.#z(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:b});let I={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:c,size:l,sizeCalculation:u,noUpdateTTL:f,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:m,ignoreFetchAbort:h,status:b,signal:T},w=this.#l.get(e);if(w===void 0){b&&(b.fetch="miss");let S=this.#M(e,w,I,g);return S.__returned=S}else{let S=this.#o[w];if(this.#h(S)){let M=n&&S.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",M&&(b.returnedStale=!0)),M?S.__staleWhileFetching:S.__returned=S}let R=this.#I(w);if(!_&&!R)return b&&(b.fetch="hit"),this.#K(w),i&&this.#C(w),b&&this.#F(b,w),S;let L=this.#M(e,w,I,g),P=L.__staleWhileFetching!==void 0&&n;return b&&(b.fetch=R?"stale":"refresh",P&&R&&(b.returnedStale=!0)),P?L.__staleWhileFetching:L.__returned=L}}forceFetch(e,t={}){let n=Tm.hasSubscribers,{status:i=ux()?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let s=this.#V(e,t);return i&&n&&(i.trace=!0,Tm.tracePromise(()=>s,i).catch(()=>{})),s}async#V(e,t={}){let n=await this.#H(e,t);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,t={}){let{status:n=vn.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="memo",n.key=e,t.context&&(n.context=t.context),n.cache=this);let i=this.#J(e,t);return n&&(n.value=i),vn.hasSubscribers&&vn.publish(n),i}#J(e,t={}){let n=this.#p;if(!n)throw new Error("no memoMethod provided to constructor");let{context:i,status:s,forceRefresh:o,...c}=t;s&&o&&(s.forceRefresh=!0);let l=this.#z(e,c),u=o||l===void 0;if(s&&(s.memo=u?"miss":"hit",u||(s.value=l)),!u)return l;let f=n(e,l,{options:c,context:i});return s&&(s.value=f),this.#k(e,f,c),f}get(e,t={}){let{status:n=vn.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="get",n.key=e,n.cache=this);let i=this.#z(e,t);return n&&(i!==void 0&&(n.value=i),vn.hasSubscribers&&vn.publish(n)),i}#z(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=t,c=this.#l.get(e);if(c===void 0){o&&(o.get="miss");return}let l=this.#o[c],u=this.#h(l);return o&&this.#F(o,c),this.#I(c)?u?(o&&(o.get="stale-fetching"),n&&l.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),l.__staleWhileFetching):void 0):(s||this.#j(e,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),l):void 0):(o&&(o.get=u?"fetching":"hit"),this.#K(c),i&&this.#C(c),u?l.__staleWhileFetching:l)}#Q(e,t){this.#E[t]=e,this.#g[e]=t}#K(e){e!==this.#S&&(e===this.#b?this.#b=this.#g[e]:this.#Q(this.#E[e],this.#g[e]),this.#Q(this.#S,e),this.#S=e)}delete(e){return this.#j(e,"delete")}#j(e,t){vn.hasSubscribers&&vn.publish({op:"delete",delete:t,key:e,cache:this});let n=!1;if(this.#c!==0){let i=this.#l.get(e);if(i!==void 0)if(this.#_?.[i]&&(clearTimeout(this.#_[i]),this.#_[i]=void 0),n=!0,this.#c===1)this.#X(t);else{this.#N(i);let s=this.#o[i];if(this.#h(s)?s.__abortController.abort(new Error("deleted")):(this.#w||this.#s)&&(this.#w&&this.#n?.(s,e,t),this.#s&&this.#y?.push([s,e,t])),this.#l.delete(e),this.#d[i]=void 0,this.#o[i]=void 0,i===this.#S)this.#S=this.#E[i];else if(i===this.#b)this.#b=this.#g[i];else{let o=this.#E[i];this.#g[o]=this.#g[i];let c=this.#g[i];this.#E[c]=this.#E[i]}this.#c--,this.#A.push(i)}}if(this.#s&&this.#y?.length){let i=this.#y,s;for(;s=i?.shift();)this.#i?.(...s)}return n}clear(){return this.#X("delete")}#X(e){for(let t of this.#D({allowStale:!0})){let n=this.#o[t];if(this.#h(n))n.__abortController.abort(new Error("deleted"));else{let i=this.#d[t];this.#w&&this.#n?.(n,i,e),this.#s&&this.#y?.push([n,i,e])}}if(this.#l.clear(),this.#o.fill(void 0),this.#d.fill(void 0),this.#m&&this.#T){this.#m.fill(0),this.#T.fill(0);for(let t of this.#_??[])t!==void 0&&clearTimeout(t);this.#_?.fill(void 0)}if(this.#v&&this.#v.fill(0),this.#b=0,this.#S=0,this.#A.length=0,this.#f=0,this.#c=0,this.#s&&this.#y){let t=this.#y,n;for(;n=t?.shift();)this.#i?.(...n)}}}});var OS,yx,hU,uU,ppe,hpe,mpe,Pa,Da,Pc,TS,Rm,AS,fU,IS,dU,Us,Ad,rn,Cm,Id,nn,ai,sn,fx,RS,Un,Sr,dx,px,pU,hx,To,mx,CS,xm,iu,Bi,Om,gpe,ype,_pe,bpe,xS,gx,Spe,wpe,Dc,_x=qe(()=>{OS=require("node:events"),yx=ne(require("node:stream"),1),hU=require("node:string_decoder"),uU=typeof process=="object"&&process?process:{stdout:null,stderr:null},ppe=a(r=>!!r&&typeof r=="object"&&(r instanceof Dc||r instanceof yx.default||hpe(r)||mpe(r)),"isStream"),hpe=a(r=>!!r&&typeof r=="object"&&r instanceof OS.EventEmitter&&typeof r.pipe=="function"&&r.pipe!==yx.default.Writable.prototype.pipe,"isReadable"),mpe=a(r=>!!r&&typeof r=="object"&&r instanceof OS.EventEmitter&&typeof r.write=="function"&&typeof r.end=="function","isWritable"),Pa=Symbol("EOF"),Da=Symbol("maybeEmitEnd"),Pc=Symbol("emittedEnd"),TS=Symbol("emittingEnd"),Rm=Symbol("emittedError"),AS=Symbol("closed"),fU=Symbol("read"),IS=Symbol("flush"),dU=Symbol("flushChunk"),Us=Symbol("encoding"),Ad=Symbol("decoder"),rn=Symbol("flowing"),Cm=Symbol("paused"),Id=Symbol("resume"),nn=Symbol("buffer"),ai=Symbol("pipes"),sn=Symbol("bufferLength"),fx=Symbol("bufferPush"),RS=Symbol("bufferShift"),Un=Symbol("objectMode"),Sr=Symbol("destroyed"),dx=Symbol("error"),px=Symbol("emitData"),pU=Symbol("emitEnd"),hx=Symbol("emitEnd2"),To=Symbol("async"),mx=Symbol("abort"),CS=Symbol("aborted"),xm=Symbol("signal"),iu=Symbol("dataListeners"),Bi=Symbol("discarded"),Om=a(r=>Promise.resolve().then(r),"defer"),gpe=a(r=>r(),"nodefer"),ype=a(r=>r==="end"||r==="finish"||r==="prefinish","isEndish"),_pe=a(r=>r instanceof ArrayBuffer||!!r&&typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,"isArrayBufferLike"),bpe=a(r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r),"isArrayBufferView"),xS=class{static{a(this,"Pipe")}src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[Id](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},gx=class extends xS{static{a(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=i=>t.emit("error",i),e.on("error",this.proxyErrors)}},Spe=a(r=>!!r.objectMode,"isObjectModeOptions"),wpe=a(r=>!r.objectMode&&!!r.encoding&&r.encoding!=="buffer","isEncodingOptions"),Dc=class extends OS.EventEmitter{static{a(this,"Minipass")}[rn]=!1;[Cm]=!1;[ai]=[];[nn]=[];[Un];[Us];[To];[Ad];[Pa]=!1;[Pc]=!1;[TS]=!1;[AS]=!1;[Rm]=null;[sn]=0;[Sr]=!1;[xm];[CS]=!1;[iu]=0;[Bi]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Spe(t)?(this[Un]=!0,this[Us]=null):wpe(t)?(this[Us]=t.encoding,this[Un]=!1):(this[Un]=!1,this[Us]=null),this[To]=!!t.async,this[Ad]=this[Us]?new hU.StringDecoder(this[Us]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:a(()=>this[nn],"get")}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:a(()=>this[ai],"get")});let{signal:n}=t;n&&(this[xm]=n,n.aborted?this[mx]():n.addEventListener("abort",()=>this[mx]()))}get bufferLength(){return this[sn]}get encoding(){return this[Us]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Un]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[To]}set async(e){this[To]=this[To]||!!e}[mx](){this[CS]=!0,this.emit("abort",this[xm]?.reason),this.destroy(this[xm]?.reason)}get aborted(){return this[CS]}set aborted(e){}write(e,t,n){if(this[CS])return!1;if(this[Pa])throw new Error("write after end");if(this[Sr])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(n=t,t="utf8"),t||(t="utf8");let i=this[To]?Om:gpe;if(!this[Un]&&!Buffer.isBuffer(e)){if(bpe(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(_pe(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Un]?(this[rn]&&this[sn]!==0&&this[IS](!0),this[rn]?this.emit("data",e):this[fx](e),this[sn]!==0&&this.emit("readable"),n&&i(n),this[rn]):e.length?(typeof e=="string"&&!(t===this[Us]&&!this[Ad]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Us]&&(e=this[Ad].write(e)),this[rn]&&this[sn]!==0&&this[IS](!0),this[rn]?this.emit("data",e):this[fx](e),this[sn]!==0&&this.emit("readable"),n&&i(n),this[rn]):(this[sn]!==0&&this.emit("readable"),n&&i(n),this[rn])}read(e){if(this[Sr])return null;if(this[Bi]=!1,this[sn]===0||e===0||e&&e>this[sn])return this[Da](),null;this[Un]&&(e=null),this[nn].length>1&&!this[Un]&&(this[nn]=[this[Us]?this[nn].join(""):Buffer.concat(this[nn],this[sn])]);let t=this[fU](e||null,this[nn][0]);return this[Da](),t}[fU](e,t){if(this[Un])this[RS]();else{let n=t;e===n.length||e===null?this[RS]():typeof n=="string"?(this[nn][0]=n.slice(e),t=n.slice(0,e),this[sn]-=e):(this[nn][0]=n.subarray(e),t=n.subarray(0,e),this[sn]-=e)}return this.emit("data",t),!this[nn].length&&!this[Pa]&&this.emit("drain"),t}end(e,t,n){return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t="utf8"),e!==void 0&&this.write(e,t),n&&this.once("end",n),this[Pa]=!0,this.writable=!1,(this[rn]||!this[Cm])&&this[Da](),this}[Id](){this[Sr]||(!this[iu]&&!this[ai].length&&(this[Bi]=!0),this[Cm]=!1,this[rn]=!0,this.emit("resume"),this[nn].length?this[IS]():this[Pa]?this[Da]():this.emit("drain"))}resume(){return this[Id]()}pause(){this[rn]=!1,this[Cm]=!0,this[Bi]=!1}get destroyed(){return this[Sr]}get flowing(){return this[rn]}get paused(){return this[Cm]}[fx](e){this[Un]?this[sn]+=1:this[sn]+=e.length,this[nn].push(e)}[RS](){return this[Un]?this[sn]-=1:this[sn]-=this[nn][0].length,this[nn].shift()}[IS](e=!1){do;while(this[dU](this[RS]())&&this[nn].length);!e&&!this[nn].length&&!this[Pa]&&this.emit("drain")}[dU](e){return this.emit("data",e),this[rn]}pipe(e,t){if(this[Sr])return e;this[Bi]=!1;let n=this[Pc];return t=t||{},e===uU.stdout||e===uU.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[ai].push(t.proxyErrors?new gx(this,e,t):new xS(this,e,t)),this[To]?Om(()=>this[Id]()):this[Id]()),e}unpipe(e){let t=this[ai].find(n=>n.dest===e);t&&(this[ai].length===1?(this[rn]&&this[iu]===0&&(this[rn]=!1),this[ai]=[]):this[ai].splice(this[ai].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e==="data")this[Bi]=!1,this[iu]++,!this[ai].length&&!this[rn]&&this[Id]();else if(e==="readable"&&this[sn]!==0)super.emit("readable");else if(ype(e)&&this[Pc])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Rm]){let i=t;this[To]?Om(()=>i.call(this,this[Rm])):i.call(this,this[Rm])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e==="data"&&(this[iu]=this.listeners("data").length,this[iu]===0&&!this[Bi]&&!this[ai].length&&(this[rn]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[iu]=0,!this[Bi]&&!this[ai].length&&(this[rn]=!1)),t}get emittedEnd(){return this[Pc]}[Da](){!this[TS]&&!this[Pc]&&!this[Sr]&&this[nn].length===0&&this[Pa]&&(this[TS]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[AS]&&this.emit("close"),this[TS]=!1)}emit(e,...t){let n=t[0];if(e!=="error"&&e!=="close"&&e!==Sr&&this[Sr])return!1;if(e==="data")return!this[Un]&&!n?!1:this[To]?(Om(()=>this[px](n)),!0):this[px](n);if(e==="end")return this[pU]();if(e==="close"){if(this[AS]=!0,!this[Pc]&&!this[Sr])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Rm]=n,super.emit(dx,n);let s=!this[xm]||this.listeners("error").length?super.emit("error",n):!1;return this[Da](),s}else if(e==="resume"){let s=super.emit("resume");return this[Da](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let i=super.emit(e,...t);return this[Da](),i}[px](e){for(let n of this[ai])n.dest.write(e)===!1&&this.pause();let t=this[Bi]?!1:super.emit("data",e);return this[Da](),t}[pU](){return this[Pc]?!1:(this[Pc]=!0,this.readable=!1,this[To]?(Om(()=>this[hx]()),!0):this[hx]())}[hx](){if(this[Ad]){let t=this[Ad].end();if(t){for(let n of this[ai])n.dest.write(t);this[Bi]||super.emit("data",t)}}for(let t of this[ai])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[Un]||(e.dataLength=0);let t=this.promise();return this.on("data",n=>{e.push(n),this[Un]||(e.dataLength+=n.length)}),await t,e}async concat(){if(this[Un])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Us]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(Sr,()=>t(new Error("stream destroyed"))),this.on("error",n=>t(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Bi]=!1;let e=!1,t=a(async()=>(this.pause(),e=!0,{value:void 0,done:!0}),"stop");return{next:a(()=>{if(e)return t();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[Pa])return t();let s,o,c=a(d=>{this.off("data",l),this.off("end",u),this.off(Sr,f),t(),o(d)},"onerr"),l=a(d=>{this.off("error",c),this.off("end",u),this.off(Sr,f),this.pause(),s({value:d,done:!!this[Pa]})},"ondata"),u=a(()=>{this.off("error",c),this.off("data",l),this.off(Sr,f),t(),s({done:!0,value:void 0})},"onend"),f=a(()=>c(new Error("stream destroyed")),"ondestroy");return new Promise((d,p)=>{o=p,s=d,this.once(Sr,f),this.once("error",c),this.once("end",u),this.once("data",l)})},"next"),throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Bi]=!1;let e=!1,t=a(()=>(this.pause(),this.off(dx,t),this.off(Sr,t),this.off("end",t),e=!0,{done:!0,value:void 0}),"stop"),n=a(()=>{if(e)return t();let i=this.read();return i===null?t():{done:!1,value:i}},"next");return this.once("end",t),this.once(dx,t),this.once(Sr,t),{next:n,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[Sr])return e?this.emit("error",e):this.emit(Sr),this;this[Sr]=!0,this[Bi]=!0,this[nn].length=0,this[sn]=0;let t=this;return typeof t.close=="function"&&!this[AS]&&t.close(),e?this.emit("error",e):this.emit(Sr),this}static get isStream(){return ppe}}});var Rd,bU,Io,Epe,Fc,vpe,Dm,SU,wU,Tpe,Ape,ns,EU,vU,Ao,TU,AU,su,IU,rs,Pm,bx,mU,Fm,Bs,PS,FS,gU,Ipe,Sx,yU,Lm,_U,DS,LS,wx,RU,Bn,NS,kS,MS,Cd,xd,Nm,iPe,CU,xU=qe(()=>{lU();Rd=require("node:path"),bU=require("node:url"),Io=require("fs"),Epe=ne(require("node:fs"),1),Fc=require("node:fs/promises");_x();vpe=Io.realpathSync.native,Dm={lstatSync:Io.lstatSync,readdir:Io.readdir,readdirSync:Io.readdirSync,readlinkSync:Io.readlinkSync,realpathSync:vpe,promises:{lstat:Fc.lstat,readdir:Fc.readdir,readlink:Fc.readlink,realpath:Fc.realpath}},SU=a(r=>!r||r===Dm||r===Epe?Dm:{...Dm,...r,promises:{...Dm.promises,...r.promises||{}}},"fsFromOption"),wU=/^\\\\\?\\([a-z]:)\\?$/i,Tpe=a(r=>r.replace(/\//g,"\\").replace(wU,"$1\\"),"uncToDrive"),Ape=/[\\\/]/,ns=0,EU=1,vU=2,Ao=4,TU=6,AU=8,su=10,IU=12,rs=15,Pm=~rs,bx=16,mU=32,Fm=64,Bs=128,PS=256,FS=512,gU=Fm|Bs|FS,Ipe=1023,Sx=a(r=>r.isFile()?AU:r.isDirectory()?Ao:r.isSymbolicLink()?su:r.isCharacterDevice()?vU:r.isBlockDevice()?TU:r.isSocket()?IU:r.isFIFO()?EU:ns,"entToType"),yU=new Im({max:2**12}),Lm=a(r=>{let e=yU.get(r);if(e)return e;let t=r.normalize("NFKD");return yU.set(r,t),t},"normalize"),_U=new Im({max:2**12}),DS=a(r=>{let e=_U.get(r);if(e)return e;let t=Lm(r.toLowerCase());return _U.set(r,t),t},"normalizeNocase"),LS=class extends Im{static{a(this,"ResolveCache")}constructor(){super({max:256})}},wx=class extends Im{static{a(this,"ChildrenCache")}constructor(e=16*1024){super({maxSize:e,sizeCalculation:a(t=>t.length+1,"sizeCalculation")})}},RU=Symbol("PathScurry setAsCwd"),Bn=class{static{a(this,"PathBase")}name;root;roots;parent;nocase;isCWD=!1;#t;#r;get dev(){return this.#r}#n;get mode(){return this.#n}#e;get nlink(){return this.#e}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#p;get rdev(){return this.#p}#u;get blksize(){return this.#u}#c;get ino(){return this.#c}#f;get size(){return this.#f}#l;get blocks(){return this.#l}#d;get atimeMs(){return this.#d}#o;get mtimeMs(){return this.#o}#g;get ctimeMs(){return this.#g}#E;get birthtimeMs(){return this.#E}#b;get atime(){return this.#b}#S;get mtime(){return this.#S}#A;get ctime(){return this.#A}#y;get birthtime(){return this.#y}#v;#T;#m;#_;#w;#R;#s;#x;#O;#C;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=ns,n,i,s,o,c){this.name=e,this.#v=s?DS(e):Lm(e),this.#s=t&Ipe,this.nocase=s,this.roots=i,this.root=n||this,this.#x=o,this.#m=c.fullpath,this.#w=c.relative,this.#R=c.relativePosix,this.parent=c.parent,this.parent?this.#t=this.parent.#t:this.#t=SU(c.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#x}resolve(e){if(!e)return this;let t=this.getRootString(e),i=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#F(i):this.#F(i)}#F(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#x.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#x.set(this,t),this.#s&=~bx,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),i=this.nocase?DS(e):Lm(e);for(let l of n)if(l.#v===i)return l;let s=this.parent?this.sep:"",o=this.#m?this.#m+s+e:void 0,c=this.newChild(e,ns,{...t,parent:this,fullpath:o});return this.canReaddir()||(c.#s|=Bs),n.push(c),c}relative(){if(this.isCWD)return"";if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.name;let n=t.relative();return n+(!n||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#R!==void 0)return this.#R;let e=this.name,t=this.parent;if(!t)return this.#R=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?"":"/")+e}fullpath(){if(this.#m!==void 0)return this.#m;let e=this.name,t=this.parent;if(!t)return this.#m=this.name;let i=t.fullpath()+(t.parent?this.sep:"")+e;return this.#m=i}fullpathPosix(){if(this.#_!==void 0)return this.#_;if(this.sep==="/")return this.#_=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#_=`//?/${i}`:this.#_=i}let e=this.parent,t=e.fullpathPosix(),n=t+(!t||!e.parent?"":"/")+this.name;return this.#_=n}isUnknown(){return(this.#s&rs)===ns}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#s&rs)===AU}isDirectory(){return(this.#s&rs)===Ao}isCharacterDevice(){return(this.#s&rs)===vU}isBlockDevice(){return(this.#s&rs)===TU}isFIFO(){return(this.#s&rs)===EU}isSocket(){return(this.#s&rs)===IU}isSymbolicLink(){return(this.#s&su)===su}lstatCached(){return this.#s&mU?this:void 0}readlinkCached(){return this.#O}realpathCached(){return this.#C}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#O)return!0;if(!this.parent)return!1;let e=this.#s&rs;return!(e!==ns&&e!==su||this.#s&PS||this.#s&Bs)}calledReaddir(){return!!(this.#s&bx)}isENOENT(){return!!(this.#s&Bs)}isNamed(e){return this.nocase?this.#v===DS(e):this.#v===Lm(e)}async readlink(){let e=this.#O;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=await this.#t.promises.readlink(this.fullpath()),n=(await this.parent.realpath())?.resolve(t);if(n)return this.#O=n}catch(t){this.#D(t.code);return}}readlinkSync(){let e=this.#O;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=this.#t.readlinkSync(this.fullpath()),n=this.parent.realpathSync()?.resolve(t);if(n)return this.#O=n}catch(t){this.#D(t.code);return}}#$(e){this.#s|=bx;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#I()}}#I(){this.#s&Bs||(this.#s=(this.#s|Bs)&Pm,this.#q())}#q(){let e=this.children();e.provisional=0;for(let t of e)t.#I()}#N(){this.#s|=FS,this.#L()}#L(){if(this.#s&Fm)return;let e=this.#s;(e&rs)===Ao&&(e&=Pm),this.#s=e|Fm,this.#q()}#U(e=""){e==="ENOTDIR"||e==="EPERM"?this.#L():e==="ENOENT"?this.#I():this.children().provisional=0}#P(e=""){e==="ENOTDIR"?this.parent.#L():e==="ENOENT"&&this.#I()}#D(e=""){let t=this.#s;t|=PS,e==="ENOENT"&&(t|=Bs),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Pm),this.#s=t,e==="ENOTDIR"&&this.parent&&this.parent.#L()}#B(e,t){return this.#G(e,t)||this.#k(e,t)}#k(e,t){let n=Sx(e),i=this.newChild(e.name,n,{parent:this}),s=i.#s&rs;return s!==Ao&&s!==su&&s!==ns&&(i.#s|=Fm),t.unshift(i),t.provisional++,i}#G(e,t){for(let n=t.provisional;n<t.length;n++){let i=t[n];if((this.nocase?DS(e.name):Lm(e.name))===i.#v)return this.#Y(e,i,n,t)}}#Y(e,t,n,i){let s=t.name;return t.#s=t.#s&Pm|Sx(e),s!==e.name&&(t.name=e.name),n!==i.provisional&&(n===i.length-1?i.pop():i.splice(n,1),i.unshift(t)),i.provisional++,t}async lstat(){if((this.#s&Bs)===0)try{return this.#W(await this.#t.promises.lstat(this.fullpath())),this}catch(e){this.#P(e.code)}}lstatSync(){if((this.#s&Bs)===0)try{return this.#W(this.#t.lstatSync(this.fullpath())),this}catch(e){this.#P(e.code)}}#W(e){let{atime:t,atimeMs:n,birthtime:i,birthtimeMs:s,blksize:o,blocks:c,ctime:l,ctimeMs:u,dev:f,gid:d,ino:p,mode:h,mtime:m,mtimeMs:g,nlink:_,rdev:b,size:T,uid:I}=e;this.#b=t,this.#d=n,this.#y=i,this.#E=s,this.#u=o,this.#l=c,this.#A=l,this.#g=u,this.#r=f,this.#a=d,this.#c=p,this.#n=h,this.#S=m,this.#o=g,this.#e=_,this.#p=b,this.#f=T,this.#i=I;let w=Sx(e);this.#s=this.#s&Pm|w|mU,w!==ns&&w!==Ao&&w!==su&&(this.#s|=Fm)}#M=[];#h=!1;#H(e){this.#h=!1;let t=this.#M.slice();this.#M.length=0,t.forEach(n=>n(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let s=n.slice(0,n.provisional);t?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#M.push(e),this.#h)return;this.#h=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(s,o)=>{if(s)this.#U(s.code),n.provisional=0;else{for(let c of o)this.#B(c,n);this.#$(n)}this.#H(n.slice(0,n.provisional))})}#V;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#V)await this.#V;else{let n=a(()=>{},"resolve");this.#V=new Promise(i=>n=i);try{for(let i of await this.#t.promises.readdir(t,{withFileTypes:!0}))this.#B(i,e);this.#$(e)}catch(i){this.#U(i.code),e.provisional=0}this.#V=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#t.readdirSync(t,{withFileTypes:!0}))this.#B(n,e);this.#$(e)}catch(n){this.#U(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#s&gU)return!1;let e=rs&this.#s;return e===ns||e===Ao||e===su}shouldWalk(e,t){return(this.#s&Ao)===Ao&&!(this.#s&gU)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#C)return this.#C;if(!((FS|PS|Bs)&this.#s))try{let e=await this.#t.promises.realpath(this.fullpath());return this.#C=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#C)return this.#C;if(!((FS|PS|Bs)&this.#s))try{let e=this.#t.realpathSync(this.fullpath());return this.#C=this.resolve(e)}catch{this.#N()}}[RU](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],i=this;for(;i&&i.parent;)t.add(i),i.#w=n.join(this.sep),i.#R=n.join("/"),i=i.parent,n.push("..");for(i=e;i&&i.parent&&!t.has(i);)i.#w=void 0,i.#R=void 0,i=i.parent}},NS=class r extends Bn{static{a(this,"PathWin32")}sep="\\";splitSep=Ape;constructor(e,t=ns,n,i,s,o,c){super(e,t,n,i,s,o,c)}newChild(e,t=ns,n={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return Rd.win32.parse(e).root}getRoot(e){if(e=Tpe(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new Cd(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(wU,"$1\\"),e===t}},kS=class r extends Bn{static{a(this,"PathPosix")}splitSep="/";sep="/";constructor(e,t=ns,n,i,s,o,c){super(e,t,n,i,s,o,c)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=ns,n={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}},MS=class{static{a(this,"PathScurryBase")}root;rootPath;roots;cwd;#t;#r;#n;nocase;#e;constructor(e=process.cwd(),t,n,{nocase:i,childrenCacheSize:s=16*1024,fs:o=Dm}={}){this.#e=SU(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,bU.fileURLToPath)(e));let c=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(c),this.#t=new LS,this.#r=new LS,this.#n=new wx(s);let l=c.substring(this.rootPath.length).split(n);if(l.length===1&&!l[0]&&l.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#e),this.roots[this.rootPath]=this.root;let u=this.root,f=l.length-1,d=t.sep,p=this.rootPath,h=!1;for(let m of l){let g=f--;u=u.child(m,{relative:new Array(g).fill("..").join(d),relativePosix:new Array(g).fill("..").join("/"),fullpath:p+=(h?"":d)+m}),h=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#t.get(t);if(n!==void 0)return n;let i=this.cwd.resolve(t).fullpath();return this.#t.set(t,i),i}resolvePosix(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#r.get(t);if(n!==void 0)return n;let i=this.cwd.resolve(t).fullpathPosix();return this.#r.set(t,i),i}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let i=await e.readdir();return n?i:i.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(i=>i.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=[];(!s||s(e))&&c.push(n?e:e.fullpath());let l=new Set,u=a((d,p)=>{l.add(d),d.readdirCB((h,m)=>{if(h)return p(h);let g=m.length;if(!g)return p();let _=a(()=>{--g===0&&p()},"next");for(let b of m)(!s||s(b))&&c.push(n?b:b.fullpath()),i&&b.isSymbolicLink()?b.realpath().then(T=>T?.isUnknown()?T.lstat():T).then(T=>T?.shouldWalk(l,o)?u(T,_):_()):b.shouldWalk(l,o)?u(b,_):_()},!0)},"walk"),f=e;return new Promise((d,p)=>{u(f,h=>{if(h)return p(h);d(c)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=[];(!s||s(e))&&c.push(n?e:e.fullpath());let l=new Set([e]);for(let u of l){let f=u.readdirSync();for(let d of f){(!s||s(d))&&c.push(n?d:d.fullpath());let p=d;if(d.isSymbolicLink()){if(!(i&&(p=d.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(l,o)&&l.add(p)}}return c}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t;(!s||s(e))&&(yield n?e:e.fullpath());let c=new Set([e]);for(let l of c){let u=l.readdirSync();for(let f of u){(!s||s(f))&&(yield n?f:f.fullpath());let d=f;if(f.isSymbolicLink()){if(!(i&&(d=f.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(c,o)&&c.add(d)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=new Dc({objectMode:!0});(!s||s(e))&&c.write(n?e:e.fullpath());let l=new Set,u=[e],f=0,d=a(()=>{let p=!1;for(;!p;){let h=u.shift();if(!h){f===0&&c.end();return}f++,l.add(h);let m=a((_,b,T=!1)=>{if(_)return c.emit("error",_);if(i&&!T){let I=[];for(let w of b)w.isSymbolicLink()&&I.push(w.realpath().then(S=>S?.isUnknown()?S.lstat():S));if(I.length){Promise.all(I).then(()=>m(null,b,!0));return}}for(let I of b)I&&(!s||s(I))&&(c.write(n?I:I.fullpath())||(p=!0));f--;for(let I of b){let w=I.realpathCached()||I;w.shouldWalk(l,o)&&u.push(w)}p&&!c.flowing?c.once("drain",d):g||d()},"onReaddir"),g=!0;h.readdirCB(m,!0),g=!1}},"process");return d(),c}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=new Dc({objectMode:!0}),l=new Set;(!s||s(e))&&c.write(n?e:e.fullpath());let u=[e],f=0,d=a(()=>{let p=!1;for(;!p;){let h=u.shift();if(!h){f===0&&c.end();return}f++,l.add(h);let m=h.readdirSync();for(let g of m)(!s||s(g))&&(c.write(n?g:g.fullpath())||(p=!0));f--;for(let g of m){let _=g;if(g.isSymbolicLink()){if(!(i&&(_=g.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(l,o)&&u.push(_)}}p&&!c.flowing&&c.once("drain",d)},"process");return d(),c}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[RU](t)}},Cd=class extends MS{static{a(this,"PathScurryWin32")}sep="\\";constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,Rd.win32,"\\",{...t,nocase:n}),this.nocase=n;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(e){return Rd.win32.parse(e).root.toUpperCase()}newRoot(e){return new NS(this.rootPath,Ao,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},xd=class extends MS{static{a(this,"PathScurryPosix")}sep="/";constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,Rd.posix,"/",{...t,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new kS(this.rootPath,Ao,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Nm=class extends xd{static{a(this,"PathScurryDarwin")}constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}},iPe=process.platform==="win32"?NS:kS,CU=process.platform==="win32"?Cd:process.platform==="darwin"?Nm:xd});var Rpe,Cpe,Od,Ex=qe(()=>{xc();Rpe=a(r=>r.length>=1,"isPatternList"),Cpe=a(r=>r.length>=1,"isGlobList"),Od=class r{static{a(this,"Pattern")}#t;#r;#n;length;#e;#i;#a;#p;#u;#c;#f=!0;constructor(e,t,n,i){if(!Rpe(e))throw new TypeError("empty pattern list");if(!Cpe(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#t=e,this.#r=t,this.#n=n,this.#e=i,this.#n===0){if(this.isUNC()){let[s,o,c,l,...u]=this.#t,[f,d,p,h,...m]=this.#r;u[0]===""&&(u.shift(),m.shift());let g=[s,o,c,l,""].join("/"),_=[f,d,p,h,""].join("/");this.#t=[g,...u],this.#r=[_,...m],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#t,[c,...l]=this.#r;o[0]===""&&(o.shift(),l.shift());let u=s+"/",f=c+"/";this.#t=[u,...o],this.#r=[f,...l],this.length=this.#t.length}}}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===br}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#a=this.#a||(this.#n===0?this.isAbsolute()?this.#r[0]+this.#r.slice(1).join("/"):this.#r.join("/"):this.#r.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#i!==void 0?this.#i:this.hasMore()?(this.#i=new r(this.#t,this.#r,this.#n+1,this.#e),this.#i.#c=this.#c,this.#i.#u=this.#u,this.#i.#p=this.#p,this.#i):this.#i=null}isUNC(){let e=this.#t;return this.#u!==void 0?this.#u:this.#u=this.#e==="win32"&&this.#n===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#t;return this.#p!==void 0?this.#p:this.#p=this.#e==="win32"&&this.#n===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#t;return this.#c!==void 0?this.#c:this.#c=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#t[0];return typeof e=="string"&&this.isAbsolute()&&this.#n===0?e:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}}});var xpe,Pd,vx=qe(()=>{xc();Ex();xpe=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Pd=class{static{a(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:i,noglobstar:s,platform:o=xpe}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:i,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let c of e)this.add(c)}add(e){let t=new Ui(e,this.mmopts);for(let n=0;n<t.set.length;n++){let i=t.set[n],s=t.globParts[n];if(!i||!s)throw new Error("invalid pattern object");for(;i[0]==="."&&s[0]===".";)i.shift(),s.shift();let o=new Od(i,s,0,this.platform),c=new Ui(o.globString(),this.mmopts),l=s[s.length-1]==="**",u=o.isAbsolute();u?this.absolute.push(c):this.relative.push(c),l&&(u?this.absoluteChildren.push(c):this.relativeChildren.push(c))}}ignored(e){let t=e.fullpath(),n=`${t}/`,i=e.relative()||".",s=`${i}/`;for(let o of this.relative)if(o.match(i)||o.match(s))return!0;for(let o of this.absolute)if(o.match(t)||o.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",n=(e.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(n))return!0;for(let i of this.absoluteChildren)if(i.match(t))return!0;return!1}}});var Tx,Ax,Ix,km,OU=qe(()=>{xc();Tx=class r{static{a(this,"HasWalkedCache")}store;constructor(e=new Map){this.store=e}copy(){return new r(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),i=this.store.get(n);i?i.add(t.globString()):this.store.set(n,new Set([t.globString()]))}},Ax=class{static{a(this,"MatchRecord")}store=new Map;add(e,t,n){let i=(t?2:0)|(n?1:0),s=this.store.get(e);this.store.set(e,s===void 0?i:i&s)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},Ix=class{static{a(this,"SubWalks")}store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(i=>i.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},km=class r{static{a(this,"Processor")}hasWalkedCache;matches=new Ax;subwalks=new Ix;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new Tx}processPatterns(e,t){this.patterns=t;let n=t.map(i=>[e,i]);for(let[i,s]of n){this.hasWalkedCache.storeWalked(i,s);let o=s.root(),c=s.isAbsolute()&&this.opts.absolute!==!1;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let d=s.rest();if(d)s=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let l,u,f=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)i=i.resolve(l),s=u,f=!0;if(l=s.pattern(),u=s.rest(),f){if(this.hasWalkedCache.hasWalked(i,s))continue;this.hasWalkedCache.storeWalked(i,s)}if(typeof l=="string"){let d=l===".."||l===""||l===".";this.matches.add(i.resolve(l),c,d);continue}else if(l===br){(!i.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(i,s);let d=u?.pattern(),p=u?.rest();if(!u||(d===""||d===".")&&!p)this.matches.add(i,c,d===""||d===".");else if(d===".."){let h=i.parent||i;p?this.hasWalkedCache.hasWalked(h,p)||this.subwalks.add(h,p):this.matches.add(h,c,!0)}}else l instanceof RegExp&&this.subwalks.add(i,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new r(this.opts,this.hasWalkedCache)}filterEntries(e,t){let n=this.subwalks.get(e),i=this.child();for(let s of t)for(let o of n){let c=o.isAbsolute(),l=o.pattern(),u=o.rest();l===br?i.testGlobstar(s,o,u,c):l instanceof RegExp?i.testRegExp(s,l,u,c):i.testString(s,l,u,c)}return i}testGlobstar(e,t,n,i){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,i,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let s=n.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,n.rest(),i);else if(s===".."){let o=e.parent||e;this.subwalks.add(o,n)}else s instanceof RegExp&&this.testRegExp(e,s,n.rest(),i)}}testRegExp(e,t,n,i){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}testString(e,t,n,i){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}}});var Ope,jS,Mm,jm,PU=qe(()=>{_x();vx();OU();Ope=a((r,e)=>typeof r=="string"?new Pd([r],e):Array.isArray(r)?new Pd(r,e):r,"makeIgnore"),jS=class{static{a(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#r;#n;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#n=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#r=Ope(n.ignore??[],n),!this.includeChildMatches&&typeof this.#r.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#e(e){return this.seen.has(e)||!!this.#r?.ignored?.(e)}#i(e){return!!this.#r?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#t.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#t.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=await s.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(s,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#e(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=s.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(s,t)}matchFinish(e,t){if(this.#e(e))return;if(!this.includeChildMatches&&this.#r?.add){let s=`${e.relativePosix()}/**`;this.#r.add(s)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let i=this.opts.mark&&e.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+i)}else{let s=this.opts.posix?e.relativePosix():e.relative(),o=this.opts.dotRelative&&!s.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(s?o+s+i:"."+i)}}async match(e,t,n){let i=await this.matchCheck(e,n);i&&this.matchFinish(i,t)}matchSync(e,t,n){let i=this.matchCheckSync(e,n);i&&this.matchFinish(i,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new km(this.opts),n)}walkCB2(e,t,n,i){if(this.#i(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,i));return}n.processPatterns(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||(s++,this.match(c,l,u).then(()=>o()));for(let c of n.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;s++;let l=c.readdirCached();c.calledReaddir()?this.walkCB3(c,l,n,o):c.readdirCB((u,f)=>this.walkCB3(c,f,n,o),!0)}o()}walkCB3(e,t,n,i){n=n.filterEntries(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||(s++,this.match(c,l,u).then(()=>o()));for(let[c,l]of n.subwalks.entries())s++,this.walkCB2(c,l,n.child(),o);o()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new km(this.opts),n)}walkCB2Sync(e,t,n,i){if(this.#i(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,i));return}n.processPatterns(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||this.matchSync(c,l,u);for(let c of n.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;s++;let l=c.readdirSync();this.walkCB3Sync(c,l,n,o)}o()}walkCB3Sync(e,t,n,i){n=n.filterEntries(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||this.matchSync(c,l,u);for(let[c,l]of n.subwalks.entries())s++,this.walkCB2Sync(c,l,n.child(),o);o()}},Mm=class extends jS{static{a(this,"GlobWalker")}matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},jm=class extends jS{static{a(this,"GlobStream")}results;constructor(e,t,n){super(e,t,n),this.results=new Dc({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}});var DU,Ppe,Vs,Rx=qe(()=>{xc();DU=require("node:url");xU();Ex();PU();Ppe=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Vs=class{static{a(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,DU.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=t.platform||Ppe,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=t.platform==="win32"?Cd:t.platform==="darwin"?Nm:t.platform?xd:CU;this.scurry=new l(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",i={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new Ui(l,i)),[o,c]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=o.map((l,u)=>{let f=c[u];if(!f)throw new Error("invalid pattern object");return new Od(l,f,0,this.platform)})}async walk(){return[...await new Mm(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 Mm(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 jm(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 jm(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()}}});var Cx,xx=qe(()=>{xc();Cx=a((r,e={})=>{Array.isArray(r)||(r=[r]);for(let t of r)if(new Ui(t,e).hasMagic())return!0;return!1},"hasMagic")});function $S(r,e={}){return new Vs(r,e).streamSync()}function LU(r,e={}){return new Vs(r,e).stream()}function NU(r,e={}){return new Vs(r,e).walkSync()}async function FU(r,e={}){return new Vs(r,e).walk()}function US(r,e={}){return new Vs(r,e).iterateSync()}function kU(r,e={}){return new Vs(r,e).iterate()}var Dpe,Fpe,Lpe,Npe,kpe,Dd,Ox=qe(()=>{xc();Rx();xx();xc();Rx();xx();vx();a($S,"globStreamSync");a(LU,"globStream");a(NU,"globSync");a(FU,"glob_");a(US,"globIterateSync");a(kU,"globIterate");Dpe=$S,Fpe=Object.assign(LU,{sync:$S}),Lpe=US,Npe=Object.assign(kU,{sync:US}),kpe=Object.assign(NU,{stream:$S,iterate:US}),Dd=Object.assign(FU,{glob:FU,globSync:NU,sync:kpe,globStream:LU,stream:Fpe,globStreamSync:$S,streamSync:Dpe,globIterate:kU,iterate:Npe,globIterateSync:US,iterateSync:Lpe,Glob:Vs,hasMagic:Cx,escape:Td,unescape:$s});Dd.glob=Dd});async function jU(r,e,t,n={}){let{dryRun:i=!1,excludeRelPath:s}=n,o=ou.default.join(r,"**/*.md"),c=await Dd(o,{nodir:!0,ignore:[ou.default.join(r,".obsidian/**"),ou.default.join(r,".trash/**"),ou.default.join(r,"**/.obsidian/**"),ou.default.join(r,"**/.trash/**")]}),l={filesScanned:0,filesModified:0,replacements:0,modifiedFiles:[]};for(let u of c){let f=ou.default.relative(r,u);if(s&&f===s)continue;l.filesScanned+=1;let d;try{d=await Px.default.readFile(u,"utf-8")}catch{continue}let{updated:p,replacements:h}=Mpe(d,e,t);h>0&&(l.filesModified+=1,l.replacements+=h,l.modifiedFiles.push(f),i||await Px.default.writeFile(u,p,"utf-8"))}return l}function Mpe(r,e,t){let n=r.split(/(^```[\s\S]*?^```)/m),i=0;for(let s=0;s<n.length;s++){if(s%2===1)continue;let o=n[s],c=jpe(o,e,t);i+=c.replacements,n[s]=c.updated}return{updated:n.join(""),replacements:i}}function jpe(r,e,t){let n=r.split(/(`[^`\n]*`)/),i=0;for(let s=0;s<n.length;s++){if(s%2===1)continue;let o=$pe(n[s],e,t);i+=o.replacements,n[s]=o.updated}return{updated:n.join(""),replacements:i}}function $pe(r,e,t){let n=/(?<!!)\[\[([^\[\]\n|#^]+)((?:[#^][^\[\]\n|]*)?)(?:\|[^\[\]\n]*)?\]\]/g,i=0;return{updated:r.replace(n,(o,c,l)=>c.trim()!==e?o:(i+=1,`[[${t}${l}]]`)),replacements:i}}var Px,ou,$U=qe(()=>{"use strict";Px=ne(Ca()),ou=ne(require("path"));Ox();a(jU,"rewriteInboundWikilinks");a(Mpe,"rewriteContent");a(jpe,"rewriteProseSegment");a($pe,"replaceWikilinks")});var Fr,ar,BS,Upe,Ut,Vi=qe(()=>{"use strict";Fr=ne(Ca()),ar=ne(require("path"));Sm();BS=ne(We());$U();Upe=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Ut=class r{constructor(e){this.rootPath=e;this.uuidIndex=null;this.basenameIndex=null;this.aliasIndex=null}static{a(this,"FileSystemVaultAdapter")}async read(e){let t=this.resolvePath(e.path);if(!await Fr.default.pathExists(t))throw new Error(`File not found: ${e.path}`);return Fr.default.readFile(t,"utf-8")}async create(e,t){let n=this.resolvePath(e);if(await Fr.default.pathExists(n))throw new Error(`File already exists: ${e}`);return await Fr.default.ensureDir(ar.default.dirname(n)),await Fr.default.writeFile(n,t,"utf-8"),this.createFileObject(e)}async modify(e,t){let n=this.resolvePath(e.path);if(!await Fr.default.pathExists(n))throw new Error(`File not found: ${e.path}`);await Fr.default.writeFile(n,t,"utf-8")}async delete(e){let t=this.resolvePath(e.path);if(!await Fr.default.pathExists(t))throw new Error(`File not found: ${e.path}`);await Fr.default.remove(t)}async exists(e){let t=this.resolvePath(e);return Fr.default.pathExists(t)}getAbstractFileByPath(e){let t=this.resolvePath(e);try{let n=Fr.default.statSync(t);if(n.isFile())return this.createFileObject(e);if(n.isDirectory())return this.createFolderObject(e)}catch{return null}return null}getAllFiles(){let e=[];return this.walkDirectory(this.rootPath,t=>{if(t.endsWith(".md")){let n=ar.default.relative(this.rootPath,t);e.push(this.createFileObject(n))}}),e}getFrontmatter(e){try{let t=Fr.default.readFileSync(this.resolvePath(e.path),"utf-8");return this.extractFrontmatter(t)}catch{return null}}async updateFrontmatter(e,t){let n=await this.read(e),i=this.extractFrontmatter(n),s=r.FRONTMATTER_BLOCK.exec(n)?.[1];if(i===null&&s!==void 0&&s.trim()!=="")throw new Error(`updateFrontmatter: frontmatter of ${e.path} is not parseable \u2014 refusing to patch (would drop keys)`);let o=i??{},c=t({...o});BS.FrontmatterService.applyPatch(o,c);let l=this.replaceFrontmatter(n,o);await this.modify(e,l)}async rename(e,t){let n=this.resolvePath(e.path),i=this.resolvePath(t);if(!await Fr.default.pathExists(n))throw new Error(`File not found: ${e.path}`);await Fr.default.ensureDir(ar.default.dirname(i)),await Fr.default.move(n,i)}async createFolder(e){let t=this.resolvePath(e);await Fr.default.ensureDir(t)}getFirstLinkpathDest(e,t,n){let i=e.split("|")[0].trim();if(!i)return null;if(Upe.test(i)){this.uuidIndex===null&&this.buildUuidIndex();let u=i.toLowerCase(),f=this.uuidIndex.get(u);return f?this.createFileObject(f):null}let s=ar.default.dirname(this.resolvePath(t)),o;if(ar.default.isAbsolute(i)?o=this.resolvePath(i):o=ar.default.resolve(s,i),i.endsWith(".md")||(o+=".md"),Fr.default.existsSync(o)){let u=ar.default.relative(this.rootPath,o);return this.createFileObject(u)}(this.basenameIndex===null||this.aliasIndex===null)&&this.buildLinkpathIndex();let c=i.toLowerCase(),l=this.basenameIndex.get(c);if(l)return this.createFileObject(l);if(n?.allowAliasFallback!==!1){let u=this.aliasIndex.get(c);if(u)return this.createFileObject(u)}return null}buildLinkpathIndex(){this.basenameIndex=new Map,this.aliasIndex=new Map,this.walkDirectory(this.rootPath,e=>{if(!e.endsWith(".md"))return;let t=ar.default.relative(this.rootPath,e),n=ar.default.basename(e,".md").toLowerCase();this.basenameIndex.has(n)||this.basenameIndex.set(n,t);let i;try{i=Fr.default.readFileSync(e,"utf-8")}catch{return}let s=this.extractFrontmatter(i);if(!s)return;let o=s.aliases,c=Array.isArray(o)?o:typeof o=="string"?[o]:[];for(let l of c){if(typeof l!="string")continue;let u=l.trim().toLowerCase();u&&(this.aliasIndex.has(u)||this.aliasIndex.set(u,t))}})}buildUuidIndex(){this.uuidIndex=new Map,this.walkDirectory(this.rootPath,e=>{if(e.endsWith(".md")){let n=ar.default.basename(e,".md").match(/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i);if(n){let i=n[1].toLowerCase(),s=ar.default.relative(this.rootPath,e);this.uuidIndex.set(i,s)}}})}async process(e,t){let n=await this.read(e),i=t(n);return await this.modify(e,i),i}getDefaultNewFileParent(){return{path:"",name:""}}async updateLinks(e,t,n){let i=ar.default.basename(t,".md");await jU(this.rootPath,n,i,{excludeRelPath:e})}resolvePath(e){if(ar.default.isAbsolute(e))return e;let t=this.rootPath.replace(/[/\\]+$/,""),n=ar.default.sep+e;return n===t||n.startsWith(t+ar.default.sep)?n:ar.default.join(this.rootPath,e)}createFileObject(e){let t=ar.default.basename(e),n=ar.default.basename(e,ar.default.extname(e)),i=ar.default.dirname(e);return{path:e,basename:n,name:t,parent:i!=="."?this.createFolderObject(i):null}}createFolderObject(e){return{path:e,name:ar.default.basename(e)}}static{this.FRONTMATTER_BLOCK=/^---\n([\s\S]*?)\n---/}extractFrontmatter(e){let t=e.match(r.FRONTMATTER_BLOCK);return t?(0,BS.parseYamlFrontmatterTolerant)(t[1]):null}replaceFrontmatter(e,t){let n=vd(t,{lineWidth:-1,noRefs:!0,quoteStyle:"double"}),i=r.FRONTMATTER_BLOCK;return e.match(i)?e.replace(i,`---
403
- ${n.trim()}
404
- ---`):`---
405
- ${n.trim()}
406
- ---
402
+ `)}return n}function vd(r,e={}){let t={...rde,...e},n=Efe(r,t.schema,{noRefs:t.noRefs,skipInvalid:t.skipInvalid});return t.flowLevel>=0&&Tfe(n,(i,s)=>{if(!(s.depth<t.flowLevel))return i.style.flow=!0,x5}),t.transform(n),tde(n,{...PC(t,Object.keys(ZC)),schema:t.schema})}var _t,Cle,xle,Ole,Ple,Dle,Fle,Lle,Nle,kle,Mle,jle,$le,Ule,Ble,Vle,Gle,qle,p5,zle,Kle,Xle,Jle,xC,tue,rue,h5,sue,oue,lue,uue,fue,OC,hue,mue,_ue,bue,Sue,Eue,vue,Tue,Aue,Iue,Rue,_S,HC,tOe,ru,zC,Pue,rOe,nOe,Due,Rc,mr,En,Cc,$i,Lue,y5,_5,Vue,md,Gue,YC,wt,v5,bd,DC,T5,hS,Yue,Que,A5,FC,I5,Xue,Jue,Zue,QC,_fe,uS,Ql,vfe,x5,XC,Afe,tu,O5,Ife,Rfe,P5,kC,Cfe,xfe,D5,Ofe,MC,JC,gm,Pfe,Dfe,F5,Ffe,jC,$C,Lfe,UC,Nfe,BC,$n,ZC,_m,mm,ex,tx,Ic,rde,iOe,sOe,oOe,aOe,cOe,lOe,uOe,fOe,dOe,pOe,hOe,mOe,gOe,yOe,_Oe,bOe,Sm=qe(()=>{_t=Symbol("NOT_RESOLVED");a(jn,"defineScalarTag");a(WC,"defineSequenceTag");a(gS,"defineMappingTag");Cle=jn("tag:yaml.org,2002:str",{resolve:a(r=>r,"resolve"),identify:a(r=>typeof r=="string","identify")}),xle=["","~","null","Null","NULL"],Ole=jn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:a(r=>xle.indexOf(r)!==-1?null:_t,"resolve"),identify:a(r=>r===null,"identify"),represent:a(()=>"null","represent")}),Ple=jn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:a((r,e)=>r==="null"||e&&r===""?null:_t,"resolve"),identify:a(r=>r===null,"identify"),represent:a(()=>"null","represent")}),Dle=["","~","null","Null","NULL"],Fle=jn("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:a(r=>Dle.indexOf(r)!==-1?null:_t,"resolve"),identify:a(r=>r===null,"identify"),represent:a(()=>"null","represent")}),Lle=["true","True","TRUE"],Nle=["false","False","FALSE"],kle=jn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:a(r=>Lle.indexOf(r)!==-1?!0:Nle.indexOf(r)!==-1?!1:_t,"resolve"),identify:a(r=>Object.prototype.toString.call(r)==="[object Boolean]","identify"),represent:a(r=>r?"true":"false","represent")}),Mle=["true"],jle=["false"],$le=jn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:a(r=>Mle.indexOf(r)!==-1?!0:jle.indexOf(r)!==-1?!1:_t,"resolve"),identify:a(r=>Object.prototype.toString.call(r)==="[object Boolean]","identify"),represent:a(r=>r?"true":"false","represent")}),Ule=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],Ble=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],Vle=jn("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:a(r=>Ule.indexOf(r)!==-1?!0:Ble.indexOf(r)!==-1?!1:_t,"resolve"),identify:a(r=>Object.prototype.toString.call(r)==="[object Boolean]","identify"),represent:a(r=>r?"true":"false","represent")}),Gle=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),qle=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");a(Wle,"parseYamlInteger$2");a(Hle,"resolveYamlInteger$2");p5=jn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:Hle,identify:a(r=>Number.isInteger(r)&&!Object.is(r,-0)&&r.toString(10).indexOf("e")<0,"identify"),represent:a(r=>r.toString(10),"represent")}),zle=new RegExp("^-?(?:0|[1-9][0-9]*)$"),Kle=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");a(Yle,"parseYamlInteger$1");a(Qle,"resolveYamlInteger$1");Xle=jn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Qle,identify:a(r=>Number.isInteger(r)&&!Object.is(r,-0)&&r.toString(10).indexOf("e")<0,"identify"),represent:a(r=>r.toString(10),"represent")}),Jle=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");a(Zle,"parseYamlInteger");a(eue,"resolveYamlInteger");xC=jn("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:eue,identify:a(r=>Number.isInteger(r)&&!Object.is(r,-0)&&r.toString(10).indexOf("e")<0,"identify"),represent:a(r=>r.toString(10),"represent")}),tue=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),rue=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");a(nue,"resolveYamlFloat$2");a(iue,"representYamlFloat$2");h5=jn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:nue,identify:a(r=>typeof r=="number"&&(!Number.isInteger(r)||Object.is(r,-0)||r.toString(10).indexOf("e")>=0),"identify"),represent:iue}),sue=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),oue=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");a(aue,"resolveYamlFloat$1");a(cue,"representYamlFloat$1");lue=jn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:aue,identify:a(r=>typeof r=="number"&&(!Number.isInteger(r)||Object.is(r,-0)||r.toString(10).indexOf("e")>=0),"identify"),represent:cue}),uue=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),fue=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");a(due,"resolveYamlFloat");a(pue,"representYamlFloat");OC=jn("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:due,identify:a(r=>typeof r=="number"&&(!Number.isInteger(r)||Object.is(r,-0)||r.toString(10).indexOf("e")>=0),"identify"),represent:pue}),hue=jn("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:a((r,e)=>r==="<<"||e&&r===""?"<<":_t,"resolve"),identify:a(()=>!1,"identify")}),mue=/^[A-Za-z0-9+/]*={0,2}$/;a(gue,"resolveYamlBinary");a(yue,"representYamlBinary");_ue=jn("tag:yaml.org,2002:binary",{resolve:gue,identify:a(r=>Object.prototype.toString.call(r)==="[object Uint8Array]","identify"),represent:yue}),bue=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Sue=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");a(Y9,"makeUtcDate");a(wue,"resolveYamlTimestamp");Eue=jn("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:wue,identify:a(r=>r instanceof Date,"identify"),represent:a(r=>r.toISOString(),"represent")}),vue=WC("tag:yaml.org,2002:seq",{create:a(()=>[],"create"),addItem:a((r,e)=>{r.push(e)},"addItem"),identify:Array.isArray});a(yS,"isPlainObject");a(PC,"pick");Tue=WC("tag:yaml.org,2002:omap",{create:a(()=>({list:[],seen:new Set}),"create"),addItem:a((r,e)=>{let t;if(e instanceof Map){if(e.size!==1)return"cannot resolve an ordered map item";t=e.keys().next().value}else if(yS(e)){let n=Object.keys(e);if(n.length!==1)return"cannot resolve an ordered map item";t=n[0]}else return"cannot resolve an ordered map item";return r.seen.has(t)?"duplicate key in ordered map":(r.seen.add(t),r.list.push(e),"")},"addItem"),finalize:a(r=>r.list,"finalize"),identify:a(()=>!1,"identify")}),Aue=WC("tag:yaml.org,2002:pairs",{create:a(()=>[],"create"),addItem:a((r,e)=>{if(e instanceof Map)return e.size!==1?"cannot resolve a pairs item":(r.push(e.entries().next().value),"");if(Object.prototype.toString.call(e)!=="[object Object]")return"cannot resolve a pairs item";let t=e,n=Object.keys(t);return n.length!==1?"cannot resolve a pairs item":(r.push([n[0],t[n[0]]]),"")},"addItem"),identify:a(()=>!1,"identify")}),Iue=gS("tag:yaml.org,2002:map",{create:a(()=>({}),"create"),identify:yS,represent:a(r=>{let e=new Map;for(let t of Object.keys(r))e.set(t,r[t]);return e},"represent"),addPair:a((r,e,t)=>{if(e!==null&&typeof e=="object")return"object-based map does not support complex keys";let n=String(e);return n==="__proto__"?Object.defineProperty(r,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[n]=t,""},"addPair"),has:a((r,e)=>e!==null&&typeof e=="object"?!1:Object.prototype.hasOwnProperty.call(r,String(e)),"has"),keys:a(r=>Object.keys(r),"keys"),get:a((r,e)=>{let t=String(e);return Object.prototype.hasOwnProperty.call(r,t)?r[t]:null},"get")}),Rue=gS("tag:yaml.org,2002:set",{create:a(()=>new Set,"create"),identify:a(r=>r instanceof Set,"identify"),represent:a(r=>{let e=new Map;for(let t of r)e.set(t,null);return e},"represent"),addPair:a((r,e,t)=>t!==null?"cannot resolve a set item":(r.add(e),""),"addPair"),has:a((r,e)=>r.has(e),"has"),keys:a(r=>r.keys(),"keys"),get:a(()=>null,"get")});a(Cue,"createTagDefinitionMap");a(xue,"createTagDefinitionListMap");a(Oue,"compileTags");_S=class m5{static{a(this,"Schema")}tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(e){let t=Oue(e),n=[],i=Cue(),s=xue();for(let f of t){if(f.nodeKind==="scalar"&&f.implicit){if(f.matchByTagPrefix)throw new Error("Implicit scalar tags cannot match by tag prefix");n.push(f)}switch(f.nodeKind){case"scalar":f.matchByTagPrefix?s.scalar.push(f):i.scalar[f.tagName]=f;break;case"sequence":f.matchByTagPrefix?s.sequence.push(f):i.sequence[f.tagName]=f;break;case"mapping":f.matchByTagPrefix?s.mapping.push(f):i.mapping[f.tagName]=f;break}}let o=n.filter(f=>f.implicitFirstChars===null),c=new Set;for(let f of n)if(f.implicitFirstChars!==null)for(let d of f.implicitFirstChars)c.add(d);let l=new Map;for(let f of c)l.set(f,n.filter(d=>d.implicitFirstChars===null||d.implicitFirstChars.indexOf(f)!==-1));let u=i.scalar["tag:yaml.org,2002:str"];if(!u)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=t,this.implicitScalarTags=n,this.implicitScalarByFirstChar=l,this.implicitScalarAnyFirstChar=o,this.defaultScalarTag=u,this.defaultSequenceTag=i.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=i.mapping["tag:yaml.org,2002:map"],this.exact=i,this.prefix=s}lookupScalarTag(e){let t=this.exact.scalar[e];if(t)return t;for(let n of this.prefix.scalar)if(e.startsWith(n.tagName))return n}lookupSequenceTag(e){let t=this.exact.sequence[e];if(t)return t;for(let n of this.prefix.sequence)if(e.startsWith(n.tagName))return n}lookupMappingTag(e){let t=this.exact.mapping[e];if(t)return t;for(let n of this.prefix.mapping)if(e.startsWith(n.tagName))return n}resolveImplicitScalarTag(e){let t=this.implicitScalarByFirstChar.get(e.charAt(0))??this.implicitScalarAnyFirstChar;for(let i of t){let s=i.resolve(e,!1,i.tagName);if(s!==_t)return{value:s,tag:i}}let n=this.defaultScalarTag;return{value:n.resolve(e,!1,n.tagName),tag:n}}withTags(...e){let t=[];for(let n of e)t=t.concat(n);return new m5([...this.tags,...t])}},HC=new _S([Cle,vue,Iue]),tOe=new _S([...HC.tags,Ple,$le,Xle,lue]),ru=new _S([...HC.tags,Ole,kle,p5,h5]),zC=new _S([...HC.tags,Fle,Vle,xC,OC,Eue,hue,_ue,Tue,Aue,Rue]),Pue=zC.withTags({...xC,resolve:a((r,e,t)=>{let n=xC.resolve(r,e,t);return n===_t?p5.resolve(r,e,t):n},"resolve")},{...OC,resolve:a((r,e,t)=>{let n=OC.resolve(r,e,t);return n===_t?h5.resolve(r,e,t):n},"resolve")}),rOe=gS("tag:yaml.org,2002:map",{create:a(()=>new Map,"create"),addPair:a((r,e,t)=>(r.set(e,t),""),"addPair"),has:a((r,e)=>r.has(e),"has"),keys:a(r=>r.keys(),"keys"),get:a((r,e)=>r.get(e),"get"),identify:a(r=>r instanceof Map||yS(r),"identify"),represent:a(r=>{if(r instanceof Map)return r;let e=new Map,t=r;for(let n of Object.keys(t))e.set(n,t[n]);return e},"represent")});a(Q9,"normalizeKey");nOe=gS("tag:yaml.org,2002:map",{create:a(()=>({}),"create"),identify:yS,represent:a(r=>{let e=new Map;for(let t of Object.keys(r))e.set(t,r[t]);return e},"represent"),addPair:a((r,e,t)=>{let n=Q9(e);return n===null?"nested arrays are not supported inside keys":(n==="__proto__"?Object.defineProperty(r,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[n]=t,"")},"addPair"),has:a((r,e)=>{let t=Q9(e);return t!==null&&Object.prototype.hasOwnProperty.call(r,t)},"has"),keys:a(r=>Object.keys(r),"keys"),get:a((r,e)=>{let t=String(e);return Object.prototype.hasOwnProperty.call(r,t)?r[t]:null},"get")}),Due={maxLength:79,indent:1,linesBefore:3,linesAfter:2};a(vC,"getLine");a(TC,"padStart");a(Fue,"makeSnippet");a(X9,"formatError");Rc=class g5 extends Error{static{a(this,"YAMLException")}reason;mark;constructor(e,t){super(),this.name="YAMLException",this.reason=e,this.mark=t,this.message=X9(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(e){return`${this.name}: ${X9(this,e)}`}static throwAt(e,t,n,i=""){let s=0,o=0;for(let l=0;l<t;l++){let u=e.charCodeAt(l);u===10?(s++,o=l+1):u===13&&(s++,e.charCodeAt(l+1)===10&&l++,o=l+1)}let c={name:i,buffer:e,position:t,line:s,column:t-o};throw c.snippet=Fue(c),new g5(n,c)}},mr={DOCUMENT:1,SEQUENCE:2,MAPPING:3,SCALAR:4,ALIAS:5,POP:6},En={PLAIN:1,SINGLE_QUOTED:2,DOUBLE_QUOTED:3,LITERAL_BLOCK:4,FOLDED_BLOCK:5},Cc={BLOCK:1,FLOW:2},$i={CLIP:1,STRIP:2,KEEP:3},Lue=-1;a(J9,"simpleEscapeSequence");y5=new Array(256),_5=new Array(256);for(let r=0;r<256;r++)y5[r]=J9(r)?1:0,_5[r]=J9(r);a(Nue,"charFromCodepoint");a(kue,"fromHexCode$1");a(Mue,"escapedHexLen$1");a(pS,"skipFoldedBreaks");a(KC,"foldedBreaks");a(jue,"getPlainValue");a($ue,"getSingleQuotedValue");a(Uue,"getDoubleQuotedValue");a(Z9,"getBlockValue");a(Bue,"getScalarValue");Vue=Object.assign(Object.create(null),{"!":"!","!!":"tag:yaml.org,2002:"});a(AC,"tagPercentEncode");a(b5,"tagNameFull");a(S5,"tagNameShort");md=-1,Gue="tag:yaml.org,2002:merge",YC={filename:"",schema:ru,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};a(que,"eventPosition$1");a(Mn,"throwError$1");a(w5,"finalizeCollection");a(Wue,"constructScalar");a(e5,"collectionTagName");a(E5,"isMappingTag");a(t5,"mergeKeys");a(Hue,"mergeSource");a(zue,"addMappingValue");a(IC,"addValue");a(RC,"storeAnchor");a(Kue,"constructFromEvents");wt=-1,v5=Object.prototype.hasOwnProperty,bd=1,DC=2,T5=3,hS=4,Yue=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Que=/[,\[\]{}]/,A5=/^(?:!|!!|![0-9A-Za-z-]+!)$/,FC=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,I5=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,Xue=new RegExp(`^(?:${FC})*$`),Jue=new RegExp(`^(?:${I5})+$`),Zue=new RegExp(`^(?:!(?:${FC})*|${I5}(?:${FC})*)$`),QC={filename:"",maxDepth:100};a(efe,"addDocumentEvent");a(R5,"addSequenceEvent");a(LC,"addMappingEvent");a(r5,"insertFlowPairMappingEvent");a(wd,"addScalarEvent");a(tfe,"addAliasEvent");a(gd,"addPopEvent");a(ii,"addEmptyScalarEvent");a(n5,"emptyProperties");a(hm,"snapshotState");a(yd,"restoreState");a(Ne,"throwError");a(tn,"isEol");a(Zl,"isWhiteSpace");a(js,"isWsOrEol");a(xa,"isWsOrEolOrEnd");a(eu,"isFlowIndicator");a(rfe,"fromDecimalCode");a(nfe,"fromHexCode");a(ife,"escapedHexLen");a(sfe,"isSimpleEscape");a(mS,"consumeLineBreak");a(si,"skipSeparationSpace");a(Xl,"testDocumentSeparator");a(i5,"skipUntilLineEnd");a(C5,"checkPrintable");a(ofe,"readTagProperty");a(afe,"readAnchorProperty");a(cfe,"readAlias");a(NC,"readFlowScalarBreak");a(lfe,"readSingleQuotedScalar");a(ufe,"readDoubleQuotedScalar");a(ffe,"readBlockScalar");a(dfe,"canStartPlainScalar");a(pfe,"readPlainScalar");a(dm,"skipFlowSeparationSpace");a(hfe,"readFlowCollection");a(s5,"readBlockSequence");a(CC,"readBlockMapping");a(Jl,"parseNode");a(mfe,"readDirective");a(gfe,"readDocument");a(yfe,"parseEvents");_fe={...QC,...YC};a(bfe,"loadDocuments");a(Ed,"load");uS=class{static{a(this,"Style")}tagged=!1;flow=!1;singleQuoted=!1;doubleQuoted=!1;literal=!1;folded=!1},Ql=Symbol("INVALID");a(Sfe,"buildRepresentTypes");a(wfe,"matchTag");a(pm,"build");a(Efe,"jsToAst");vfe=Symbol("visit:break"),x5=Symbol("visit:skip");a(dS,"visitNode");a(Tfe,"visit");XC=65279,Afe=9,tu=10,O5=13,Ife=32,Rfe=33,P5=34,kC=35,Cfe=37,xfe=38,D5=39,Ofe=42,MC=44,JC=45,gm=58,Pfe=61,Dfe=62,F5=63,Ffe=64,jC=91,$C=93,Lfe=96,UC=123,Nfe=124,BC=125,$n={};$n[0]="\\0";$n[7]="\\a";$n[8]="\\b";$n[9]="\\t";$n[10]="\\n";$n[11]="\\v";$n[12]="\\f";$n[13]="\\r";$n[27]="\\e";$n[34]='\\"';$n[92]="\\\\";$n[133]="\\N";$n[160]="\\_";$n[8232]="\\L";$n[8233]="\\P";ZC={indent:2,seqNoIndent:!1,seqInlineFirst:!0,sortKeys:!1,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:"single",forceQuotes:!1,tagBeforeAnchor:!1};a(kfe,"nodeTagShort");a(Mfe,"createPresenterState");a(jfe,"encodeNonPrintable");a(o5,"indentString");a(VC,"generateNextLine");a($fe,"scalarLayout");a(Sd,"isWhitespace");a(Ufe,"startsWithDocumentSeparator");a(ym,"isPrintable");a(a5,"isNsCharOrWhitespace");a(GC,"isPlainSafe");a(Bfe,"isPlainSafeFirst");a(Vfe,"isPlainSafeAtStart");a(Gfe,"isPlainSafeLast");a(_d,"codePointAt");a(L5,"needIndentIndicator");_m=1,mm=2,ex=3,tx=4,Ic=5;a(qfe,"chooseScalarStyle");a(Wfe,"renderScalarStyle");a(Hfe,"resolveScalarStyle");a(c5,"blockHeader");a(l5,"encodeFlowBreaks");a(u5,"dropEndingNewline");a(bm,"isMoreIndented");a(zfe,"foldBlockScalar");a(f5,"foldLine");a(Kfe,"escapeString");a(Yfe,"writeFlowSequence");a(d5,"writeBlockSequence");a(Qfe,"writeFlowMapping");a(fS,"sortKeyValue");a(N5,"sortMappingItems");a(Xfe,"writeBlockMapping");a(qC,"cannotBeCompact");a(Oa,"writeNode");a(Jfe,"rootStartsOwnLine");a(Zfe,"isOpenEnded");a(ede,"writeDocumentDirectives");a(tde,"present");rde={...ZC,schema:Pue,skipInvalid:!1,noRefs:!1,flowLevel:-1,transform:a(()=>{},"transform")};a(vd,"dump");iOe=mr.DOCUMENT,sOe=mr.SEQUENCE,oOe=mr.MAPPING,aOe=mr.SCALAR,cOe=mr.ALIAS,lOe=mr.POP,uOe=En.PLAIN,fOe=En.SINGLE_QUOTED,dOe=En.DOUBLE_QUOTED,pOe=En.LITERAL_BLOCK,hOe=En.FOLDED_BLOCK,mOe=Cc.BLOCK,gOe=Cc.FLOW,yOe=$i.CLIP,_Oe=$i.STRIP,bOe=$i.KEEP});var rx,k5,nde,M5=qe(()=>{rx=a((r,e,t)=>{let n=r instanceof RegExp?k5(r,t):r,i=e instanceof RegExp?k5(e,t):e,s=n!==null&&i!=null&&nde(n,i,t);return s&&{start:s[0],end:s[1],pre:t.slice(0,s[0]),body:t.slice(s[0]+n.length,s[1]),post:t.slice(s[1]+i.length)}},"balanced"),k5=a((r,e)=>{let t=e.match(r);return t?t[0]:null},"maybeMatch"),nde=a((r,e,t)=>{let n,i,s,o,c,l=t.indexOf(r),u=t.indexOf(e,l+1),f=l;if(l>=0&&u>0){if(r===e)return[l,u];for(n=[],s=t.length;f>=0&&!c;){if(f===l)n.push(f),l=t.indexOf(r,f+1);else if(n.length===1){let d=n.pop();d!==void 0&&(c=[d,u])}else i=n.pop(),i!==void 0&&i<s&&(s=i,o=u),u=t.indexOf(e,f+1);f=l<u&&l>=0?l:u}n.length&&o!==void 0&&(c=[s,o])}return c},"range")});function nx(r){return isNaN(r)?r.charCodeAt(0):parseInt(r,10)}function gde(r){return r.replace(lde,j5).replace(ude,$5).replace(fde,sx).replace(dde,U5).replace(pde,B5)}function yde(r){return r.replace(ide,"\\").replace(sde,"{").replace(ode,"}").replace(ade,",").replace(cde,".")}function V5(r){if(!r)return[""];let e=[],t=rx("{","}",r);if(!t)return r.split(",");let{pre:n,body:i,post:s}=t,o=n.split(",");o[o.length-1]+="{"+i+"}";let c=V5(s);return s.length&&(o[o.length-1]+=c.shift(),o.push.apply(o,c)),e.push.apply(e,o),e}function G5(r,e={}){if(!r)return[];let{max:t=hde,maxLength:n=mde}=e;return r.slice(0,2)==="{}"&&(r="\\{\\}"+r.slice(2)),ix(gde(r),t,n,!0).map(yde)}function _de(r){return"{"+r+"}"}function bde(r){return/^-?0\d/.test(r)}function Sde(r,e){return r<=e}function wde(r,e){return r>=e}function wm(r,e,t,n,i,s){let o=[],c=0;for(let l=0;l<r.length;l++)for(let u=0;u<t.length;u++){if(o.length>=n)return o;let f=r[l]+e+t[u];if(!(s&&!f)){if(c+f.length>i)return o;o.push(f),c+=f.length}}return o}function Ede(r,e,t,n){let i=r.split(/\.\./),s=[];if(i[0]===void 0||i[1]===void 0)return s;let o=nx(i[0]),c=nx(i[1]),l=Math.max(i[0].length,i[1].length),u=i.length===3&&i[2]!==void 0?Math.max(Math.abs(nx(i[2])),1):1,f=Sde;c<o&&(u*=-1,f=wde);let p=i.some(bde),h=0;for(let m=o;f(m,c)&&s.length<t;m+=u){let g;if(e)g=String.fromCharCode(m),g==="\\"&&(g="");else if(g=String(m),p){let _=l-g.length;if(_>0){let b=new Array(_+1).join("0");m<0?g="-"+b+g.slice(1):g=b+g}}if(h+g.length>n)break;s.push(g),h+=g.length}return s}function ix(r,e,t,n){let i=[""],s=!1,o=!0;for(;;){let c=rx("{","}",r);if(!c)return wm(i,r,[""],e,t,s);let l=c.pre;if(/\$$/.test(l)){if(i=wm(i,l+"{"+c.body+"}",[""],e,t,s&&!c.post.length),o=!1,!c.post.length)break;r=c.post;continue}let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(c.body),f=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(c.body),d=u||f,p=c.body.indexOf(",")>=0;if(!d&&!p){if(c.post.match(/,(?!,).*\}/)){r=c.pre+"{"+c.body+sx+c.post,n=!0;continue}return wm(i,l+"{"+c.body+"}"+c.post,[""],e,t,s)}o&&(s=n&&!d,o=!1);let h;if(d)h=Ede(c.body,f,e,t);else{let m=V5(c.body);if(m.length===1&&m[0]!==void 0&&(m=ix(m[0],e,t,!1).map(_de),m.length===1)){if(i=wm(i,l+m[0],[""],e,t,s&&!c.post.length),!c.post.length)break;r=c.post;continue}let g=s&&!c.post.length&&!l;for(let b=0;g&&b<i.length;b++)i[b]&&(g=!1);h=[];let _=0;e:for(let b=0;b<m.length;b++){let T=ix(m[b],e,t,!1);for(let I=0;I<T.length;I++){let w=T[I];if(!(g&&!w)){if(h.length>=e||_+w.length>t)break e;h.push(w),_+=w.length}}}}if(i=wm(i,l,h,e,t,s&&!c.post.length),!c.post.length)break;r=c.post}return i}var j5,$5,sx,U5,B5,ide,sde,ode,ade,cde,lde,ude,fde,dde,pde,hde,mde,q5=qe(()=>{M5();j5="\0SLASH"+Math.random()+"\0",$5="\0OPEN"+Math.random()+"\0",sx="\0CLOSE"+Math.random()+"\0",U5="\0COMMA"+Math.random()+"\0",B5="\0PERIOD"+Math.random()+"\0",ide=new RegExp(j5,"g"),sde=new RegExp($5,"g"),ode=new RegExp(sx,"g"),ade=new RegExp(U5,"g"),cde=new RegExp(B5,"g"),lde=/\\\\/g,ude=/\\{/g,fde=/\\}/g,dde=/\\,/g,pde=/\\\./g,hde=1e5,mde=4e6;a(nx,"numeric");a(gde,"escapeBraces");a(yde,"unescapeBraces");a(V5,"parseCommaParts");a(G5,"expand");a(_de,"embrace");a(bde,"isPadded");a(Sde,"lte");a(wde,"gte");a(wm,"combine");a(Ede,"expandSequence");a(ix,"expand_")});var Em,W5=qe(()=>{Em=a(r=>{if(typeof r!="string")throw new TypeError("invalid pattern");if(r.length>65536)throw new TypeError("pattern is too long")},"assertValidPattern")});var vde,vm,Tde,H5,z5,K5=qe(()=>{vde={"[: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]},vm=a(r=>r.replace(/[[\]\\-]/g,"\\$&"),"braceEscape"),Tde=a(r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regexpEscape"),H5=a(r=>r.join(""),"rangesToString"),z5=a((r,e)=>{let t=e;if(r.charAt(t)!=="[")throw new Error("not in a brace expression");let n=[],i=[],s=t+1,o=!1,c=!1,l=!1,u=!1,f=t,d="";e:for(;s<r.length;){let g=r.charAt(s);if((g==="!"||g==="^")&&s===t+1){u=!0,s++;continue}if(g==="]"&&o&&!l){f=s+1;break}if(o=!0,g==="\\"&&!l){l=!0,s++;continue}if(g==="["&&!l){for(let[_,[b,T,I]]of Object.entries(vde))if(r.startsWith(_,s)){if(d)return["$.",!1,r.length-t,!0];s+=_.length,I?i.push(b):n.push(b),c=c||T;continue e}}if(l=!1,d){g>d?n.push(vm(d)+"-"+vm(g)):g===d&&n.push(vm(g)),d="",s++;continue}if(r.startsWith("-]",s+1)){n.push(vm(g+"-")),s+=2;continue}if(r.startsWith("-",s+1)){d=g,s+=2;continue}n.push(vm(g)),s++}if(f<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,r.length-t,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!u){let g=n[0].length===2?n[0].slice(-1):n[0];return[Tde(g),!1,f-t,!1]}let p="["+(u?"^":"")+H5(n)+"]",h="["+(u?"":"^")+H5(i)+"]";return[n.length&&i.length?"("+p+"|"+h+")":n.length?p:h,c,f-t,!0]},"parseClass")});var $s,SS=qe(()=>{$s=a((r,{windowsPathsNoEscape:e=!1,magicalBraces:t=!0}={})=>t?e?r.replace(/\[([^/\\])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?r.replace(/\[([^/\\{}])\]/g,"$1"):r.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1"),"unescape")});var xi,Ade,ox,Y5,Ide,Rde,Cde,Q5,xde,wS,Ode,Pde,Dde,Fde,ax,X5,J5,Lde,nu,cx=qe(()=>{K5();SS();Ade=new Set(["!","?","+","*","@"]),ox=a(r=>Ade.has(r),"isExtglobType"),Y5=a(r=>ox(r.type),"isExtglobAST"),Ide=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),Rde=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),Cde=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),Q5=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),xde="(?!(?:^|/)\\.\\.?(?:$|/))",wS="(?!\\.)",Ode=new Set(["[","."]),Pde=new Set(["..","."]),Dde=new Set("().*{}+?[]^$\\!"),Fde=a(r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),ax="[^/]",X5=ax+"*?",J5=ax+"+?",Lde=0,nu=class{static{a(this,"AST")}type;#t;#r;#n=!1;#e=[];#i;#a;#p;#u=!1;#c;#f;#l=!1;id=++Lde;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#t.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(e,t,n={}){this.type=e,e&&(this.#r=!0),this.#i=t,this.#t=this.#i?this.#i.#t:this,this.#c=this.#t===this?n:this.#t.#c,this.#p=this.#t===this?[]:this.#t.#p,e==="!"&&!this.#t.#u&&this.#p.push(this),this.#a=this.#i?this.#i.#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.#f!==void 0?this.#f:this.type?this.#f=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#f=this.#e.map(e=>String(e)).join("")}#d(){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.#p.pop();){if(e.type!=="!")continue;let t=e,n=t.#i;for(;n;){for(let i=t.#a+1;!n.type&&i<n.#e.length;i++)for(let s of e.#e){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#e[i])}t=n,n=t.#i}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof xi&&t.#i===this))throw new Error("invalid part: "+t);this.#e.push(t)}}toJSON(){let e=this.type===null?this.#e.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#e.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#t||this.#t.#u&&this.#i?.type==="!")&&e.push({}),e}isStart(){if(this.#t===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let n=e.#e[t];if(!(n instanceof xi&&n.type==="!"))return!1}return!0}isEnd(){if(this.#t===this||this.#i?.type==="!")return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#e.length:0;return this.#a===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new xi(this.type,e);for(let n of this.#e)t.copyIn(n);return t}static#o(e,t,n,i,s){let o=i.maxExtglobRecursion??2,c=!1,l=!1,u=-1,f=!1;if(t.type===null){let g=n,_="";for(;g<e.length;){let b=e.charAt(g++);if(c||b==="\\"){c=!c,_+=b;continue}if(l){g===u+1?(b==="^"||b==="!")&&(f=!0):b==="]"&&!(g===u+2&&f)&&(l=!1),_+=b;continue}else if(b==="["){l=!0,u=g,f=!1,_+=b;continue}if(!i.noext&&ox(b)&&e.charAt(g)==="("&&s<=o){t.push(_),_="";let I=new xi(b,t);g=xi.#o(e,I,g,i,s+1),t.push(I);continue}_+=b}return t.push(_),g}let d=n+1,p=new xi(null,t),h=[],m="";for(;d<e.length;){let g=e.charAt(d++);if(c||g==="\\"){c=!c,m+=g;continue}if(l){d===u+1?(g==="^"||g==="!")&&(f=!0):g==="]"&&!(d===u+2&&f)&&(l=!1),m+=g;continue}else if(g==="["){l=!0,u=d,f=!1,m+=g;continue}if(!i.noext&&ox(g)&&e.charAt(d)==="("&&(s<=o||t&&t.#b(g))){let b=t&&t.#b(g)?0:1;p.push(m),m="";let T=new xi(g,p);p.push(T),d=xi.#o(e,T,d,i,s+b);continue}if(g==="|"){p.push(m),m="",h.push(p),p=new xi(null,t);continue}if(g===")")return m===""&&t.#e.length===0&&(t.#l=!0),p.push(m),m="",t.push(...h,p),d;m+=g}return t.type=null,t.#r=void 0,t.#e=[e.substring(n-1)],d}#g(e){return this.#E(e,Rde)}#E(e,t=Ide){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.#b(n.type,t)}#b(e,t=Cde){return!!t.get(this.type)?.includes(e)}#S(e,t){let n=e.#e[0],i=new xi(null,n,this.options);i.#e.push(""),n.push(i),this.#A(e,t)}#A(e,t){let n=e.#e[0];this.#e.splice(t,1,...n.#e);for(let i of n.#e)typeof i=="object"&&(i.#i=this);this.#f=void 0}#y(e){return!!Q5.get(this.type)?.has(e)}#v(e){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let t=e.#e[0];return!t||typeof t!="object"||t.type===null?!1:this.#y(t.type)}#T(e){let t=Q5.get(this.type),n=e.#e[0],i=t?.get(n.type);if(!i)return!1;this.#e=n.#e;for(let s of this.#e)typeof s=="object"&&(s.#i=this);this.type=i,this.#f=void 0,this.#l=!1}static fromGlob(e,t={}){let n=new xi(null,void 0,t);return xi.#o(e,n,0,t,0),n}toMMPattern(){if(this!==this.#t)return this.#t.toMMPattern();let e=this.toString(),[t,n,i,s]=this.toRegExpSource();if(!(i||this.#r||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let c=(this.#c.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${t}$`,c),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#t===this&&(this.#m(),this.#d()),!Y5(this)){let l=this.isStart()&&this.isEnd()&&!this.#e.some(h=>typeof h!="string"),u=this.#e.map(h=>{let[m,g,_,b]=typeof h=="string"?xi.#w(h,this.#r,l):h.toRegExpSource(e);return this.#r=this.#r||_,this.#n=this.#n||b,m}).join(""),f="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&Pde.has(this.#e[0]))){let m=Ode,g=t&&m.has(u.charAt(0))||u.startsWith("\\.")&&m.has(u.charAt(2))||u.startsWith("\\.\\.")&&m.has(u.charAt(4)),_=!t&&!e&&m.has(u.charAt(0));f=g?xde:_?wS:""}let d="";return this.isEnd()&&this.#t.#u&&this.#i?.type==="!"&&(d="(?:$|\\/)"),[f+u+d,$s(u),this.#r=!!this.#r,this.#n]}let n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#_(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString(),u=this;return u.#e=[l],u.type=null,u.#r=void 0,[l,$s(this.toString()),!1,!1]}let o=!n||e||t||!wS?"":this.#_(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!t?wS:"")+J5;else{let l=this.type==="!"?"))"+(this.isStart()&&!t&&!e?wS:"")+X5+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;c=i+s+l}return[c,$s(s),this.#r=!!this.#r,this.#n]}#m(){if(Y5(this)){let e=0,t=!1;do{t=!0;for(let n=0;n<this.#e.length;n++){let i=this.#e[n];typeof i=="object"&&(i.#m(),this.#E(i)?(t=!1,this.#A(i,n)):this.#g(i)?(t=!1,this.#S(i,n)):this.#v(i)&&(t=!1,this.#T(i)))}}while(!t&&++e<10)}else for(let e of this.#e)typeof e=="object"&&e.#m();this.#f=void 0}#_(e){return this.#e.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[n,i,s,o]=t.toRegExpSource(e);return this.#n=this.#n||o,n}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#w(e,t,n=!1){let i=!1,s="",o=!1,c=!1;for(let l=0;l<e.length;l++){let u=e.charAt(l);if(i){i=!1,s+=(Dde.has(u)?"\\":"")+u;continue}if(u==="*"){if(c)continue;c=!0,s+=n&&/^[*]+$/.test(e)?J5:X5,t=!0;continue}else c=!1;if(u==="\\"){l===e.length-1?s+="\\\\":i=!0;continue}if(u==="["){let[f,d,p,h]=z5(e,l);if(p){s+=f,o=o||d,l+=p-1,t=t||h;continue}}if(u==="?"){s+=ax,t=!0;continue}s+=Fde(u)}return[s,$s(e),!!t,o]}};xi=nu});var Td,lx=qe(()=>{Td=a((r,{windowsPathsNoEscape:e=!1,magicalBraces:t=!1}={})=>t?e?r.replace(/[?*()[\]{}]/g,"[$&]"):r.replace(/[?*()[\]\\{}]/g,"\\$&"):e?r.replace(/[?*()[\]]/g,"[$&]"):r.replace(/[?*()[\]\\]/g,"\\$&"),"escape")});var oi,Nde,kde,Mde,jde,$de,Ude,Bde,Vde,Gde,qde,Wde,Hde,zde,Kde,Yde,Qde,Xde,Jde,tU,rU,nU,Z5,Zde,br,epe,tpe,rpe,npe,ipe,ts,spe,iU,ope,ape,eU,cpe,Ui,xc=qe(()=>{q5();W5();cx();lx();SS();cx();lx();SS();oi=a((r,e,t={})=>(Em(e),!t.nocomment&&e.charAt(0)==="#"?!1:new Ui(e,t).match(r)),"minimatch"),Nde=/^\*+([^+@!?*[(]*)$/,kde=a(r=>e=>!e.startsWith(".")&&e.endsWith(r),"starDotExtTest"),Mde=a(r=>e=>e.endsWith(r),"starDotExtTestDot"),jde=a(r=>(r=r.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(r)),"starDotExtTestNocase"),$de=a(r=>(r=r.toLowerCase(),e=>e.toLowerCase().endsWith(r)),"starDotExtTestNocaseDot"),Ude=/^\*+\.\*+$/,Bde=a(r=>!r.startsWith(".")&&r.includes("."),"starDotStarTest"),Vde=a(r=>r!=="."&&r!==".."&&r.includes("."),"starDotStarTestDot"),Gde=/^\.\*+$/,qde=a(r=>r!=="."&&r!==".."&&r.startsWith("."),"dotStarTest"),Wde=/^\*+$/,Hde=a(r=>r.length!==0&&!r.startsWith("."),"starTest"),zde=a(r=>r.length!==0&&r!=="."&&r!=="..","starTestDot"),Kde=/^\?+([^+@!?*[(]*)?$/,Yde=a(([r,e=""])=>{let t=tU([r]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},"qmarksTestNocase"),Qde=a(([r,e=""])=>{let t=rU([r]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},"qmarksTestNocaseDot"),Xde=a(([r,e=""])=>{let t=rU([r]);return e?n=>t(n)&&n.endsWith(e):t},"qmarksTestDot"),Jde=a(([r,e=""])=>{let t=tU([r]);return e?n=>t(n)&&n.endsWith(e):t},"qmarksTest"),tU=a(([r])=>{let e=r.length;return t=>t.length===e&&!t.startsWith(".")},"qmarksTestNoExt"),rU=a(([r])=>{let e=r.length;return t=>t.length===e&&t!=="."&&t!==".."},"qmarksTestNoExtDot"),nU=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Z5={win32:{sep:"\\"},posix:{sep:"/"}},Zde=nU==="win32"?Z5.win32.sep:Z5.posix.sep;oi.sep=Zde;br=Symbol("globstar **");oi.GLOBSTAR=br;epe="[^/]",tpe=epe+"*?",rpe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",npe="(?:(?!(?:\\/|^)\\.).)*?",ipe=a((r,e={})=>t=>oi(t,r,e),"filter");oi.filter=ipe;ts=a((r,e={})=>Object.assign({},r,e),"ext"),spe=a(r=>{if(!r||typeof r!="object"||!Object.keys(r).length)return oi;let e=oi;return Object.assign(a((n,i,s={})=>e(n,i,ts(r,s)),"m"),{Minimatch:class extends e.Minimatch{static{a(this,"Minimatch")}constructor(i,s={}){super(i,ts(r,s))}static defaults(i){return e.defaults(ts(r,i)).Minimatch}},AST:class extends e.AST{static{a(this,"AST")}constructor(i,s,o={}){super(i,s,ts(r,o))}static fromGlob(i,s={}){return e.AST.fromGlob(i,ts(r,s))}},unescape:a((n,i={})=>e.unescape(n,ts(r,i)),"unescape"),escape:a((n,i={})=>e.escape(n,ts(r,i)),"escape"),filter:a((n,i={})=>e.filter(n,ts(r,i)),"filter"),defaults:a(n=>e.defaults(ts(r,n)),"defaults"),makeRe:a((n,i={})=>e.makeRe(n,ts(r,i)),"makeRe"),braceExpand:a((n,i={})=>e.braceExpand(n,ts(r,i)),"braceExpand"),match:a((n,i,s={})=>e.match(n,i,ts(r,s)),"match"),sep:e.sep,GLOBSTAR:br})},"defaults");oi.defaults=spe;iU=a((r,e={})=>(Em(r),e.nobrace||!/\{(?:(?!\{).)*\}/.test(r)?[r]:G5(r,{max:e.braceExpandMax})),"braceExpand");oi.braceExpand=iU;ope=a((r,e={})=>new Ui(r,e).makeRe(),"makeRe");oi.makeRe=ope;ape=a((r,e,t={})=>{let n=new Ui(e,t);return r=r.filter(i=>n.match(i)),n.options.nonull&&!r.length&&r.push(e),r},"match");oi.match=ape;eU=/[?*]|[+@!]\(.*?\)|\[|\]/,cpe=a(r=>r.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"regExpEscape"),Ui=class{static{a(this,"Minimatch")}options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){Em(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||nU,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map((s,o,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!eU.test(s[2]))&&!eU.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(f=>this.parse(f))];if(u)return[s[0],...s.slice(1).map(f=>this.parse(f))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,i),this.set=i.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][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 of e)for(let i=0;i<n.length;i++)n[i]==="**"&&(n[i]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let n=-1;for(;(n=t.indexOf("**",n+1))!==-1;){let i=n;for(;t[i+1]==="**";)i++;i!==n&&t.splice(n,i-n)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((n,i)=>{let s=n[n.length-1];return i==="**"&&s==="**"?n:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(i),n)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){let s=e[i];i===1&&s===""&&e[0]===""||(s==="."||s==="")&&(t=!0,e.splice(i,1),i--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let i=e[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(i))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let c=n[i+1],l=n[i+2],u=n[i+3];if(c!==".."||!l||l==="."||l===".."||!u||u==="."||u==="..")continue;t=!0,n.splice(i,1);let f=n.slice(0);f[i]="**",e.push(f),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){let c=n[o];o===1&&c===""&&n[0]===""||(c==="."||c==="")&&(t=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(t=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let l=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...l),n.length===0&&n.push(""),s-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let i=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(i){e[t]=[],e[n]=i;break}}return e.filter(t=>t.length)}partsMatch(e,t,n=!1){let i=0,s=0,o=[],c="";for(;i<e.length&&s<t.length;)if(e[i]===t[s])o.push(c==="b"?t[s]:e[i]),i++,s++;else if(n&&e[i]==="**"&&t[s]===e[i+1])o.push(e[i]),i++;else if(n&&t[s]==="**"&&e[i]===t[s+1])o.push(t[s]),s++;else if(e[i]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(c==="b")return!1;c="a",o.push(e[i]),i++,s++}else if(t[s]==="*"&&e[i]&&(this.options.dot||!e[i].startsWith("."))&&e[i]!=="**"){if(c==="a")return!1;c="b",o.push(t[s]),i++,s++}else return!1;return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let i=0,s=0;if(this.isWindows){let c=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),l=!c&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),u=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),f=!u&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),d=l?3:c?0:void 0,p=f?3:u?0:void 0;if(typeof d=="number"&&typeof p=="number"){let[h,m]=[e[d],t[p]];h.toLowerCase()===m.toLowerCase()&&(t[p]=h,s=p,i=d)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(br)?this.#t(e,t,n,i,s):this.#n(e,t,n,i,s)}#t(e,t,n,i,s){let o=t.indexOf(br,s),c=t.lastIndexOf(br),[l,u,f]=n?[t.slice(s,o),t.slice(o+1),[]]:[t.slice(s,o),t.slice(o+1,c),t.slice(c+1)];if(l.length){let T=e.slice(i,i+l.length);if(!this.#n(T,l,n,0,0))return!1;i+=l.length,s+=l.length}let d=0;if(f.length){if(f.length+i>e.length)return!1;let T=e.length-f.length;if(this.#n(e,f,n,T,0))d=f.length;else{if(e[e.length-1]!==""||i+f.length===e.length||(T--,!this.#n(e,f,n,T,0)))return!1;d=f.length+1}}if(!u.length){let T=!!d;for(let I=i;I<e.length-d;I++){let w=String(e[I]);if(T=!0,w==="."||w===".."||!this.options.dot&&w.startsWith("."))return!1}return n||T}let p=[[[],0]],h=p[0],m=0,g=[0];for(let T of u)T===br?(g.push(m),h=[[],0],p.push(h)):(h[0].push(T),m++);let _=p.length-1,b=e.length-d;for(let T of p)T[1]=b-(g[_--]+T[0].length);return!!this.#r(e,p,i,0,n,0,!!d)}#r(e,t,n,i,s,o,c){let l=t[i];if(!l){for(let d=n;d<e.length;d++){c=!0;let p=e[d];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return c}let[u,f]=l;for(;n<=f;){if(this.#n(e.slice(0,n+u.length),u,s,n,0)&&o<this.maxGlobstarRecursion){let h=this.#r(e,t,n+u.length,i+1,s,o+1,c);if(h!==!1)return h}let p=e[n];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;n++}return s||null}#n(e,t,n,i,s){let o,c,l,u;for(o=i,c=s,u=e.length,l=t.length;o<u&&c<l;o++,c++){this.debug("matchOne loop");let f=t[c],d=e[o];if(this.debug(t,f,d),f===!1||f===br)return!1;let p;if(typeof f=="string"?(p=d===f,this.debug("string match",f,d,p)):(p=f.test(d),this.debug("pattern match",f,d,p)),!p)return!1}if(o===u&&c===l)return!0;if(o===u)return n;if(c===l)return o===u-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return iU(this.pattern,this.options)}parse(e){Em(e);let t=this.options;if(e==="**")return br;if(e==="")return"";let n,i=null;(n=e.match(Wde))?i=t.dot?zde:Hde:(n=e.match(Nde))?i=(t.nocase?t.dot?$de:jde:t.dot?Mde:kde)(n[1]):(n=e.match(Kde))?i=(t.nocase?t.dot?Qde:Yde:t.dot?Xde:Jde)(n):(n=e.match(Ude))?i=t.dot?Vde:Bde:(n=e.match(Gde))&&(i=qde);let s=nu.fromGlob(e,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?tpe:t.dot?rpe:npe,i=new Set(t.nocase?["i"]:[]),s=e.map(l=>{let u=l.map(d=>{if(d instanceof RegExp)for(let p of d.flags.split(""))i.add(p);return typeof d=="string"?cpe(d):d===br?br:d._src});u.forEach((d,p)=>{let h=u[p+1],m=u[p-1];d!==br||m===br||(m===void 0?h!==void 0&&h!==br?u[p+1]="(?:\\/|"+n+"\\/)?"+h:u[p]=n:h===void 0?u[p-1]=m+"(?:\\/|\\/"+n+")?":h!==br&&(u[p-1]=m+"(?:\\/|\\/"+n+"\\/)"+h,u[p+1]=br))});let f=u.filter(d=>d!==br);if(this.partial&&f.length>=1){let d=[];for(let p=1;p<=f.length;p++)d.push(f.slice(0,p).join("/"));return"(?:"+d.join("|")+")"}return f.join("/")}).join("|"),[o,c]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+c+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+c+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let i=this.slashSplit(e);this.debug(this.pattern,"split",i);let s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let c=i.length-2;!o&&c>=0;c--)o=i[c];for(let c of s){let l=i;if(n.matchBase&&c.length===1&&(l=[o]),this.matchOne(l,c,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return oi.defaults(e).Minimatch}};oi.AST=nu;oi.Minimatch=Ui;oi.escape=Td;oi.unescape=$s});var vS,vn,Tm,lpe,ux,oU,sU,upe,fpe,Oc,aU,ES,dpe,Im,lU=qe(()=>{vS=require("node:diagnostics_channel"),vn=(0,vS.channel)("lru-cache:metrics"),Tm=(0,vS.tracingChannel)("lru-cache"),lpe=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,ux=a(()=>vn.hasSubscribers||Tm.hasSubscribers,"R"),oU=new Set,sU=typeof process=="object"&&process?process:{},upe=a((r,e,t,n)=>{typeof sU.emitWarning=="function"?sU.emitWarning(r,e,t,n):console.error(`[${t}] ${e}: ${r}`)},"k"),fpe=a(r=>!oU.has(r),"H"),Oc=a(r=>!!r&&r===Math.floor(r)&&r>0&&isFinite(r),"T"),aU=a(r=>Oc(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?ES:null:null,"j"),ES=class extends Array{static{a(this,"O")}constructor(r){super(r),this.fill(0)}},dpe=class Am{static{a(this,"d")}heap;length;static#t=!1;static create(e){let t=aU(e);if(!t)return[];Am.#t=!0;let n=new Am(e,t);return Am.#t=!1,n}constructor(e,t){if(!Am.#t)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Im=class cU{static{a(this,"d")}#t;#r;#n;#e;#i;#a;#p;#u;get perf(){return this.#u}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#c;#f;#l;#d;#o;#g;#E;#b;#S;#A;#y;#v;#T;#m;#_;#w;#R;#s;#x;static unsafeExposeInternals(e){return{starts:e.#T,ttls:e.#m,autopurgeTimers:e.#_,sizes:e.#v,keyMap:e.#l,keyList:e.#d,valList:e.#o,next:e.#g,prev:e.#E,get head(){return e.#b},get tail(){return e.#S},free:e.#A,isBackgroundFetch:a(t=>e.#h(t),"isBackgroundFetch"),backgroundFetch:a((t,n,i,s)=>e.#M(t,n,i,s),"backgroundFetch"),moveToTail:a(t=>e.#K(t),"moveToTail"),indexes:a(t=>e.#P(t),"indexes"),rindexes:a(t=>e.#D(t),"rindexes"),isStale:a(t=>e.#I(t),"isStale")}}get max(){return this.#t}get maxSize(){return this.#r}get calculatedSize(){return this.#f}get size(){return this.#c}get fetchMethod(){return this.#a}get memoMethod(){return this.#p}get dispose(){return this.#n}get onInsert(){return this.#e}get disposeAfter(){return this.#i}constructor(e){let{max:t=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:c,allowStale:l,dispose:u,onInsert:f,disposeAfter:d,noDisposeOnSet:p,noUpdateTTL:h,maxSize:m=0,maxEntrySize:g=0,sizeCalculation:_,fetchMethod:b,memoMethod:T,noDeleteOnFetchRejection:I,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:R,ignoreFetchAbort:L,backgroundFetchSize:P=1,perf:M}=e;if(this.backgroundFetchSize=P,M!==void 0&&typeof M?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#u=M??lpe,t!==0&&!Oc(t))throw new TypeError("max option must be a nonnegative integer");let O=t?aU(t):Array;if(!O)throw new Error("invalid max value: "+t);if(this.#t=t,this.#r=m,this.maxEntrySize=g||this.#r,this.sizeCalculation=_,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(T!==void 0&&typeof T!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#p=T,b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#a=b,this.#R=!!b,this.#l=new Map,this.#d=Array.from({length:t}).fill(void 0),this.#o=Array.from({length:t}).fill(void 0),this.#g=new O(t),this.#E=new O(t),this.#b=0,this.#S=0,this.#A=dpe.create(t),this.#c=0,this.#f=0,typeof u=="function"&&(this.#n=u),typeof f=="function"&&(this.#e=f),typeof d=="function"?(this.#i=d,this.#y=[]):(this.#i=void 0,this.#y=void 0),this.#w=!!this.#n,this.#x=!!this.#e,this.#s=!!this.#i,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!I,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!R,this.ignoreFetchAbort=!!L,this.maxEntrySize!==0){if(this.#r!==0&&!Oc(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!Oc(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#q()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!c,this.ttlResolution=Oc(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!Oc(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#O()}if(this.#t===0&&this.ttl===0&&this.#r===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#r){let F="LRU_CACHE_UNBOUNDED";fpe(F)&&(oU.add(F),upe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",F,cU))}}getRemainingTTL(e){return this.#l.has(e)?1/0:0}#O(){let e=new ES(this.#t),t=new ES(this.#t);this.#m=e,this.#T=t;let n=this.ttlAutopurge?Array.from({length:this.#t}):void 0;this.#_=n,this.#$=(l,u,f=this.#u.now())=>{t[l]=u!==0?f:0,e[l]=u,i(l,u)},this.#C=l=>{t[l]=e[l]!==0?this.#u.now():0,i(l,e[l])};let i=this.ttlAutopurge?(l,u)=>{if(n?.[l]&&(clearTimeout(n[l]),n[l]=void 0),u&&u!==0&&n){let f=setTimeout(()=>{this.#I(l)?(this.#j(this.#d[l],"expire"),n[l]=void 0):i(l,c(l))},u+1);f.unref&&f.unref(),n[l]=f}}:()=>{};this.#F=(l,u)=>{if(e[u]){let f=e[u],d=t[u];if(!f||!d)return;l.ttl=f,l.start=d,l.now=s||o();let p=l.now-d;l.remainingTTL=f-p}};let s=0,o=a(()=>{let l=this.#u.now();if(this.ttlResolution>0){s=l;let u=setTimeout(()=>s=0,this.ttlResolution);u.unref&&u.unref()}return l},"o");this.getRemainingTTL=l=>{let u=this.#l.get(l);return u===void 0?0:c(u)};let c=a(l=>{let u=e[l],f=t[l];if(!u||!f)return 1/0;let d=(s||o())-f;return u-d},"l");this.#I=l=>{let u=t[l],f=e[l];return!!f&&!!u&&(s||o())-u>f}}#C=a(()=>{},"#R");#F=a(()=>{},"#v");#$=a(()=>{},"#H");#I=a(()=>!1,"#p");#q(){let e=new ES(this.#t);this.#f=0,this.#v=e,this.#N=t=>{this.#f-=e[t],e[t]=0},this.#U=(t,n,i,s)=>{if(!Oc(i)){if(this.#h(n))return this.backgroundFetchSize;if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(n,t),!Oc(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return i},this.#L=(t,n,i)=>{if(e[t]=n,this.#r){let s=this.#r-e[t];for(;this.#f>s;)this.#G(!0)}this.#f+=e[t],i&&(i.entrySize=n,i.totalCalculatedSize=this.#f)}}#N=a(e=>{},"#x");#L=a((e,t,n)=>{},"#j");#U=a((e,t,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#N");*#P({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#S;this.#B(t)&&((e||!this.#I(t))&&(yield t),t!==this.#b);)t=this.#E[t]}*#D({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#b;this.#B(t)&&((e||!this.#I(t))&&(yield t),t!==this.#S);)t=this.#g[t]}#B(e){return e!==void 0&&this.#l.get(this.#d[e])===e}*entries(){for(let e of this.#P())this.#o[e]!==void 0&&this.#d[e]!==void 0&&!this.#h(this.#o[e])&&(yield[this.#d[e],this.#o[e]])}*rentries(){for(let e of this.#D())this.#o[e]!==void 0&&this.#d[e]!==void 0&&!this.#h(this.#o[e])&&(yield[this.#d[e],this.#o[e]])}*keys(){for(let e of this.#P()){let t=this.#d[e];t!==void 0&&!this.#h(this.#o[e])&&(yield t)}}*rkeys(){for(let e of this.#D()){let t=this.#d[e];t!==void 0&&!this.#h(this.#o[e])&&(yield t)}}*values(){for(let e of this.#P())this.#o[e]!==void 0&&!this.#h(this.#o[e])&&(yield this.#o[e])}*rvalues(){for(let e of this.#D())this.#o[e]!==void 0&&!this.#h(this.#o[e])&&(yield this.#o[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let n of this.#P()){let i=this.#o[n],s=this.#h(i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,this.#d[n],this))return this.#z(this.#d[n],t)}}forEach(e,t=this){for(let n of this.#P()){let i=this.#o[n],s=this.#h(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(t,s,this.#d[n],this)}}rforEach(e,t=this){for(let n of this.#D()){let i=this.#o[n],s=this.#h(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(t,s,this.#d[n],this)}}purgeStale(){let e=!1;for(let t of this.#D({allowStale:!0}))this.#I(t)&&(this.#j(this.#d[t],"expire"),e=!0);return e}info(e){let t=this.#l.get(e);if(t===void 0)return;let n=this.#o[t],i=this.#h(n)?n.__staleWhileFetching:n;if(i===void 0)return;let s={value:i};if(this.#m&&this.#T){let o=this.#m[t],c=this.#T[t];if(o&&c){let l=o-(this.#u.now()-c);s.ttl=l,s.start=Date.now()}}return this.#v&&(s.size=this.#v[t]),s}dump(){let e=[];for(let t of this.#P({allowStale:!0})){let n=this.#d[t],i=this.#o[t],s=this.#h(i)?i.__staleWhileFetching:i;if(s===void 0||n===void 0)continue;let o={value:s};if(this.#m&&this.#T){o.ttl=this.#m[t];let c=this.#u.now()-this.#T[t];o.start=Math.floor(Date.now()-c)}this.#v&&(o.size=this.#v[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let i=Date.now()-n.start;n.start=this.#u.now()-i}this.#k(t,n.value,n)}}set(e,t,n={}){let{status:i=vn.hasSubscribers?{}:void 0}=n;n.status=i,i&&(i.op="set",i.key=e,t!==void 0&&(i.value=t),i.cache=this);let s=this.#k(e,t,n);return i&&vn.hasSubscribers&&vn.publish(i),s}#k(e,t,n,i){let{ttl:s=this.ttl,start:o,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:u}=n,f=this.#h(t);if(t===void 0)return u&&(u.set="deleted"),this.delete(e),this;let{noUpdateTTL:d=this.noUpdateTTL}=n;u&&!f&&(u.value=t);let p=this.#U(e,t,n.size||0,l,u);if(this.maxEntrySize&&p>this.maxEntrySize)return this.#j(e,"set"),u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this;let h=this.#c===0?void 0:this.#l.get(e);if(h===void 0)h=this.#c===0?this.#S:this.#A.length!==0?this.#A.pop():this.#c===this.#t?this.#G(!1):this.#c,this.#d[h]=e,this.#o[h]=t,this.#l.set(e,h),this.#g[this.#S]=h,this.#E[h]=this.#S,this.#S=h,this.#c++,this.#L(h,p,u),u&&(u.set="add"),d=!1,this.#x&&!f&&this.#e?.(t,e,"add");else{this.#K(h);let m=this.#o[h];if(t!==m){if(!c)if(this.#h(m)){m!==i&&m.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:g}=m;g!==void 0&&g!==t&&(this.#w&&this.#n?.(g,e,"set"),this.#s&&this.#y?.push([g,e,"set"]))}else this.#w&&this.#n?.(m,e,"set"),this.#s&&this.#y?.push([m,e,"set"]);if(this.#N(h),this.#L(h,p,u),this.#o[h]=t,!f){let g=m&&this.#h(m)?m.__staleWhileFetching:m,_=g===void 0?"add":t!==g?"replace":"update";u&&(u.set=_,g!==void 0&&(u.oldValue=g)),this.#x&&this.onInsert?.(t,e,_)}}else f||(u&&(u.set="update"),this.#x&&this.onInsert?.(t,e,"update"))}if(s!==0&&!this.#m&&this.#O(),this.#m&&(d||this.#$(h,s,o),u&&this.#F(u,h)),!c&&this.#s&&this.#y){let m=this.#y,g;for(;g=m?.shift();)this.#i?.(...g)}return this}pop(){try{for(;this.#c;){let e=this.#o[this.#b];if(this.#G(!0),this.#h(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#s&&this.#y){let e=this.#y,t;for(;t=e?.shift();)this.#i?.(...t)}}}#G(e){let t=this.#b,n=this.#d[t],i=this.#o[t],s=this.#h(i);s&&i.__abortController.abort(new Error("evicted"));let o=s?i.__staleWhileFetching:i;return(this.#w||this.#s)&&o!==void 0&&(this.#w&&this.#n?.(o,n,"evict"),this.#s&&this.#y?.push([o,n,"evict"])),this.#N(t),this.#_?.[t]&&(clearTimeout(this.#_[t]),this.#_[t]=void 0),e&&(this.#d[t]=void 0,this.#o[t]=void 0,this.#A.push(t)),this.#c===1?(this.#b=this.#S=0,this.#A.length=0):this.#b=this.#g[t],this.#l.delete(n),this.#c--,t}has(e,t={}){let{status:n=vn.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="has",n.key=e,n.cache=this);let i=this.#Y(e,t);return vn.hasSubscribers&&vn.publish(n),i}#Y(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=t,s=this.#l.get(e);if(s!==void 0){let o=this.#o[s];if(this.#h(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#I(s))i&&(i.has="stale",this.#F(i,s));else return n&&this.#C(s),i&&(i.has="hit",this.#F(i,s)),!0}else i&&(i.has="miss");return!1}peek(e,t={}){let{status:n=ux()?{}:void 0}=t;n&&(n.op="peek",n.key=e,n.cache=this),t.status=n;let i=this.#W(e,t);return vn.hasSubscribers&&vn.publish(n),i}#W(e,t){let{status:n,allowStale:i=this.allowStale}=t,s=this.#l.get(e);if(s===void 0||!i&&this.#I(s)){n&&(n.peek=s===void 0?"miss":"stale");return}let o=this.#o[s],c=this.#h(o)?o.__staleWhileFetching:o;return n&&(c!==void 0?(n.peek="hit",n.value=c):n.peek="miss"),c}#M(e,t,n,i){let s=t===void 0?void 0:this.#o[t];if(this.#h(s))return s;let o=new AbortController,{signal:c}=n;c?.addEventListener("abort",()=>o.abort(c.reason),{signal:o.signal});let l={signal:o.signal,options:n,context:i},u=a((g,_=!1)=>{let{aborted:b}=o.signal,T=n.ignoreFetchAbort&&g!==void 0,I=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&g!==void 0);if(n.status&&(b&&!_?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,T&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),b&&!T&&!_)return d(o.signal.reason,I);let w=h,S=this.#o[t];return(S===h||S===void 0&&T&&_)&&(g===void 0?w.__staleWhileFetching!==void 0?this.#o[t]=w.__staleWhileFetching:this.#j(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#k(e,g,l.options,w))),g},"r"),f=a(g=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=g),d(g,!1)),"c"),d=a((g,_)=>{let{aborted:b}=o.signal,T=b&&n.allowStaleOnFetchAbort,I=T||n.allowStaleOnFetchRejection,w=I||n.noDeleteOnFetchRejection,S=h;if(this.#o[t]===h&&(!w||!_&&S.__staleWhileFetching===void 0?this.#j(e,"fetch"):T||(this.#o[t]=S.__staleWhileFetching)),I)return n.status&&S.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw g},"m"),p=a((g,_)=>{let b=this.#a?.(e,s,l);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(g(void 0),n.allowStaleOnFetchAbort&&(g=a(T=>u(T,!0),"f")))}),b&&b instanceof Promise?b.then(T=>g(T===void 0?void 0:T),_):b!==void 0&&g(b)},"_");n.status&&(n.status.fetchDispatched=!0);let h=new Promise(p).then(u,f),m=Object.assign(h,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.#k(e,m,{...l.options,status:void 0}),t=this.#l.get(e)):this.#o[t]=m,m}#h(e){if(!this.#R)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let n=Tm.hasSubscribers,{status:i=ux()?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let s=this.#H(e,t);return i&&n&&(i.trace=!0,Tm.tracePromise(()=>s,i).catch(()=>{})),s}async#H(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:l=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:m=this.allowStaleOnFetchAbort,context:g,forceRefresh:_=!1,status:b,signal:T}=t;if(b&&(b.op="fetch",b.key=e,_&&(b.forceRefresh=!0),b.cache=this),!this.#R)return b&&(b.fetch="get"),this.#z(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:b});let I={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:c,size:l,sizeCalculation:u,noUpdateTTL:f,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:m,ignoreFetchAbort:h,status:b,signal:T},w=this.#l.get(e);if(w===void 0){b&&(b.fetch="miss");let S=this.#M(e,w,I,g);return S.__returned=S}else{let S=this.#o[w];if(this.#h(S)){let M=n&&S.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",M&&(b.returnedStale=!0)),M?S.__staleWhileFetching:S.__returned=S}let R=this.#I(w);if(!_&&!R)return b&&(b.fetch="hit"),this.#K(w),i&&this.#C(w),b&&this.#F(b,w),S;let L=this.#M(e,w,I,g),P=L.__staleWhileFetching!==void 0&&n;return b&&(b.fetch=R?"stale":"refresh",P&&R&&(b.returnedStale=!0)),P?L.__staleWhileFetching:L.__returned=L}}forceFetch(e,t={}){let n=Tm.hasSubscribers,{status:i=ux()?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let s=this.#V(e,t);return i&&n&&(i.trace=!0,Tm.tracePromise(()=>s,i).catch(()=>{})),s}async#V(e,t={}){let n=await this.#H(e,t);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,t={}){let{status:n=vn.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="memo",n.key=e,t.context&&(n.context=t.context),n.cache=this);let i=this.#J(e,t);return n&&(n.value=i),vn.hasSubscribers&&vn.publish(n),i}#J(e,t={}){let n=this.#p;if(!n)throw new Error("no memoMethod provided to constructor");let{context:i,status:s,forceRefresh:o,...c}=t;s&&o&&(s.forceRefresh=!0);let l=this.#z(e,c),u=o||l===void 0;if(s&&(s.memo=u?"miss":"hit",u||(s.value=l)),!u)return l;let f=n(e,l,{options:c,context:i});return s&&(s.value=f),this.#k(e,f,c),f}get(e,t={}){let{status:n=vn.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="get",n.key=e,n.cache=this);let i=this.#z(e,t);return n&&(i!==void 0&&(n.value=i),vn.hasSubscribers&&vn.publish(n)),i}#z(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=t,c=this.#l.get(e);if(c===void 0){o&&(o.get="miss");return}let l=this.#o[c],u=this.#h(l);return o&&this.#F(o,c),this.#I(c)?u?(o&&(o.get="stale-fetching"),n&&l.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),l.__staleWhileFetching):void 0):(s||this.#j(e,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),l):void 0):(o&&(o.get=u?"fetching":"hit"),this.#K(c),i&&this.#C(c),u?l.__staleWhileFetching:l)}#Q(e,t){this.#E[t]=e,this.#g[e]=t}#K(e){e!==this.#S&&(e===this.#b?this.#b=this.#g[e]:this.#Q(this.#E[e],this.#g[e]),this.#Q(this.#S,e),this.#S=e)}delete(e){return this.#j(e,"delete")}#j(e,t){vn.hasSubscribers&&vn.publish({op:"delete",delete:t,key:e,cache:this});let n=!1;if(this.#c!==0){let i=this.#l.get(e);if(i!==void 0)if(this.#_?.[i]&&(clearTimeout(this.#_[i]),this.#_[i]=void 0),n=!0,this.#c===1)this.#X(t);else{this.#N(i);let s=this.#o[i];if(this.#h(s)?s.__abortController.abort(new Error("deleted")):(this.#w||this.#s)&&(this.#w&&this.#n?.(s,e,t),this.#s&&this.#y?.push([s,e,t])),this.#l.delete(e),this.#d[i]=void 0,this.#o[i]=void 0,i===this.#S)this.#S=this.#E[i];else if(i===this.#b)this.#b=this.#g[i];else{let o=this.#E[i];this.#g[o]=this.#g[i];let c=this.#g[i];this.#E[c]=this.#E[i]}this.#c--,this.#A.push(i)}}if(this.#s&&this.#y?.length){let i=this.#y,s;for(;s=i?.shift();)this.#i?.(...s)}return n}clear(){return this.#X("delete")}#X(e){for(let t of this.#D({allowStale:!0})){let n=this.#o[t];if(this.#h(n))n.__abortController.abort(new Error("deleted"));else{let i=this.#d[t];this.#w&&this.#n?.(n,i,e),this.#s&&this.#y?.push([n,i,e])}}if(this.#l.clear(),this.#o.fill(void 0),this.#d.fill(void 0),this.#m&&this.#T){this.#m.fill(0),this.#T.fill(0);for(let t of this.#_??[])t!==void 0&&clearTimeout(t);this.#_?.fill(void 0)}if(this.#v&&this.#v.fill(0),this.#b=0,this.#S=0,this.#A.length=0,this.#f=0,this.#c=0,this.#s&&this.#y){let t=this.#y,n;for(;n=t?.shift();)this.#i?.(...n)}}}});var OS,yx,hU,uU,ppe,hpe,mpe,Pa,Da,Pc,TS,Rm,AS,fU,IS,dU,Us,Ad,rn,Cm,Id,nn,ai,sn,fx,RS,Un,Sr,dx,px,pU,hx,To,mx,CS,xm,iu,Bi,Om,gpe,ype,_pe,bpe,xS,gx,Spe,wpe,Dc,_x=qe(()=>{OS=require("node:events"),yx=ne(require("node:stream"),1),hU=require("node:string_decoder"),uU=typeof process=="object"&&process?process:{stdout:null,stderr:null},ppe=a(r=>!!r&&typeof r=="object"&&(r instanceof Dc||r instanceof yx.default||hpe(r)||mpe(r)),"isStream"),hpe=a(r=>!!r&&typeof r=="object"&&r instanceof OS.EventEmitter&&typeof r.pipe=="function"&&r.pipe!==yx.default.Writable.prototype.pipe,"isReadable"),mpe=a(r=>!!r&&typeof r=="object"&&r instanceof OS.EventEmitter&&typeof r.write=="function"&&typeof r.end=="function","isWritable"),Pa=Symbol("EOF"),Da=Symbol("maybeEmitEnd"),Pc=Symbol("emittedEnd"),TS=Symbol("emittingEnd"),Rm=Symbol("emittedError"),AS=Symbol("closed"),fU=Symbol("read"),IS=Symbol("flush"),dU=Symbol("flushChunk"),Us=Symbol("encoding"),Ad=Symbol("decoder"),rn=Symbol("flowing"),Cm=Symbol("paused"),Id=Symbol("resume"),nn=Symbol("buffer"),ai=Symbol("pipes"),sn=Symbol("bufferLength"),fx=Symbol("bufferPush"),RS=Symbol("bufferShift"),Un=Symbol("objectMode"),Sr=Symbol("destroyed"),dx=Symbol("error"),px=Symbol("emitData"),pU=Symbol("emitEnd"),hx=Symbol("emitEnd2"),To=Symbol("async"),mx=Symbol("abort"),CS=Symbol("aborted"),xm=Symbol("signal"),iu=Symbol("dataListeners"),Bi=Symbol("discarded"),Om=a(r=>Promise.resolve().then(r),"defer"),gpe=a(r=>r(),"nodefer"),ype=a(r=>r==="end"||r==="finish"||r==="prefinish","isEndish"),_pe=a(r=>r instanceof ArrayBuffer||!!r&&typeof r=="object"&&r.constructor&&r.constructor.name==="ArrayBuffer"&&r.byteLength>=0,"isArrayBufferLike"),bpe=a(r=>!Buffer.isBuffer(r)&&ArrayBuffer.isView(r),"isArrayBufferView"),xS=class{static{a(this,"Pipe")}src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[Id](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},gx=class extends xS{static{a(this,"PipeProxyErrors")}unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=i=>t.emit("error",i),e.on("error",this.proxyErrors)}},Spe=a(r=>!!r.objectMode,"isObjectModeOptions"),wpe=a(r=>!r.objectMode&&!!r.encoding&&r.encoding!=="buffer","isEncodingOptions"),Dc=class extends OS.EventEmitter{static{a(this,"Minipass")}[rn]=!1;[Cm]=!1;[ai]=[];[nn]=[];[Un];[Us];[To];[Ad];[Pa]=!1;[Pc]=!1;[TS]=!1;[AS]=!1;[Rm]=null;[sn]=0;[Sr]=!1;[xm];[CS]=!1;[iu]=0;[Bi]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");Spe(t)?(this[Un]=!0,this[Us]=null):wpe(t)?(this[Us]=t.encoding,this[Un]=!1):(this[Un]=!1,this[Us]=null),this[To]=!!t.async,this[Ad]=this[Us]?new hU.StringDecoder(this[Us]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:a(()=>this[nn],"get")}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:a(()=>this[ai],"get")});let{signal:n}=t;n&&(this[xm]=n,n.aborted?this[mx]():n.addEventListener("abort",()=>this[mx]()))}get bufferLength(){return this[sn]}get encoding(){return this[Us]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[Un]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[To]}set async(e){this[To]=this[To]||!!e}[mx](){this[CS]=!0,this.emit("abort",this[xm]?.reason),this.destroy(this[xm]?.reason)}get aborted(){return this[CS]}set aborted(e){}write(e,t,n){if(this[CS])return!1;if(this[Pa])throw new Error("write after end");if(this[Sr])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(n=t,t="utf8"),t||(t="utf8");let i=this[To]?Om:gpe;if(!this[Un]&&!Buffer.isBuffer(e)){if(bpe(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(_pe(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[Un]?(this[rn]&&this[sn]!==0&&this[IS](!0),this[rn]?this.emit("data",e):this[fx](e),this[sn]!==0&&this.emit("readable"),n&&i(n),this[rn]):e.length?(typeof e=="string"&&!(t===this[Us]&&!this[Ad]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Us]&&(e=this[Ad].write(e)),this[rn]&&this[sn]!==0&&this[IS](!0),this[rn]?this.emit("data",e):this[fx](e),this[sn]!==0&&this.emit("readable"),n&&i(n),this[rn]):(this[sn]!==0&&this.emit("readable"),n&&i(n),this[rn])}read(e){if(this[Sr])return null;if(this[Bi]=!1,this[sn]===0||e===0||e&&e>this[sn])return this[Da](),null;this[Un]&&(e=null),this[nn].length>1&&!this[Un]&&(this[nn]=[this[Us]?this[nn].join(""):Buffer.concat(this[nn],this[sn])]);let t=this[fU](e||null,this[nn][0]);return this[Da](),t}[fU](e,t){if(this[Un])this[RS]();else{let n=t;e===n.length||e===null?this[RS]():typeof n=="string"?(this[nn][0]=n.slice(e),t=n.slice(0,e),this[sn]-=e):(this[nn][0]=n.subarray(e),t=n.subarray(0,e),this[sn]-=e)}return this.emit("data",t),!this[nn].length&&!this[Pa]&&this.emit("drain"),t}end(e,t,n){return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t="utf8"),e!==void 0&&this.write(e,t),n&&this.once("end",n),this[Pa]=!0,this.writable=!1,(this[rn]||!this[Cm])&&this[Da](),this}[Id](){this[Sr]||(!this[iu]&&!this[ai].length&&(this[Bi]=!0),this[Cm]=!1,this[rn]=!0,this.emit("resume"),this[nn].length?this[IS]():this[Pa]?this[Da]():this.emit("drain"))}resume(){return this[Id]()}pause(){this[rn]=!1,this[Cm]=!0,this[Bi]=!1}get destroyed(){return this[Sr]}get flowing(){return this[rn]}get paused(){return this[Cm]}[fx](e){this[Un]?this[sn]+=1:this[sn]+=e.length,this[nn].push(e)}[RS](){return this[Un]?this[sn]-=1:this[sn]-=this[nn][0].length,this[nn].shift()}[IS](e=!1){do;while(this[dU](this[RS]())&&this[nn].length);!e&&!this[nn].length&&!this[Pa]&&this.emit("drain")}[dU](e){return this.emit("data",e),this[rn]}pipe(e,t){if(this[Sr])return e;this[Bi]=!1;let n=this[Pc];return t=t||{},e===uU.stdout||e===uU.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[ai].push(t.proxyErrors?new gx(this,e,t):new xS(this,e,t)),this[To]?Om(()=>this[Id]()):this[Id]()),e}unpipe(e){let t=this[ai].find(n=>n.dest===e);t&&(this[ai].length===1?(this[rn]&&this[iu]===0&&(this[rn]=!1),this[ai]=[]):this[ai].splice(this[ai].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e==="data")this[Bi]=!1,this[iu]++,!this[ai].length&&!this[rn]&&this[Id]();else if(e==="readable"&&this[sn]!==0)super.emit("readable");else if(ype(e)&&this[Pc])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[Rm]){let i=t;this[To]?Om(()=>i.call(this,this[Rm])):i.call(this,this[Rm])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e==="data"&&(this[iu]=this.listeners("data").length,this[iu]===0&&!this[Bi]&&!this[ai].length&&(this[rn]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[iu]=0,!this[Bi]&&!this[ai].length&&(this[rn]=!1)),t}get emittedEnd(){return this[Pc]}[Da](){!this[TS]&&!this[Pc]&&!this[Sr]&&this[nn].length===0&&this[Pa]&&(this[TS]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[AS]&&this.emit("close"),this[TS]=!1)}emit(e,...t){let n=t[0];if(e!=="error"&&e!=="close"&&e!==Sr&&this[Sr])return!1;if(e==="data")return!this[Un]&&!n?!1:this[To]?(Om(()=>this[px](n)),!0):this[px](n);if(e==="end")return this[pU]();if(e==="close"){if(this[AS]=!0,!this[Pc]&&!this[Sr])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[Rm]=n,super.emit(dx,n);let s=!this[xm]||this.listeners("error").length?super.emit("error",n):!1;return this[Da](),s}else if(e==="resume"){let s=super.emit("resume");return this[Da](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let i=super.emit(e,...t);return this[Da](),i}[px](e){for(let n of this[ai])n.dest.write(e)===!1&&this.pause();let t=this[Bi]?!1:super.emit("data",e);return this[Da](),t}[pU](){return this[Pc]?!1:(this[Pc]=!0,this.readable=!1,this[To]?(Om(()=>this[hx]()),!0):this[hx]())}[hx](){if(this[Ad]){let t=this[Ad].end();if(t){for(let n of this[ai])n.dest.write(t);this[Bi]||super.emit("data",t)}}for(let t of this[ai])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[Un]||(e.dataLength=0);let t=this.promise();return this.on("data",n=>{e.push(n),this[Un]||(e.dataLength+=n.length)}),await t,e}async concat(){if(this[Un])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Us]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(Sr,()=>t(new Error("stream destroyed"))),this.on("error",n=>t(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Bi]=!1;let e=!1,t=a(async()=>(this.pause(),e=!0,{value:void 0,done:!0}),"stop");return{next:a(()=>{if(e)return t();let i=this.read();if(i!==null)return Promise.resolve({done:!1,value:i});if(this[Pa])return t();let s,o,c=a(d=>{this.off("data",l),this.off("end",u),this.off(Sr,f),t(),o(d)},"onerr"),l=a(d=>{this.off("error",c),this.off("end",u),this.off(Sr,f),this.pause(),s({value:d,done:!!this[Pa]})},"ondata"),u=a(()=>{this.off("error",c),this.off("data",l),this.off(Sr,f),t(),s({done:!0,value:void 0})},"onend"),f=a(()=>c(new Error("stream destroyed")),"ondestroy");return new Promise((d,p)=>{o=p,s=d,this.once(Sr,f),this.once("error",c),this.once("end",u),this.once("data",l)})},"next"),throw:t,return:t,[Symbol.asyncIterator](){return this}}}[Symbol.iterator](){this[Bi]=!1;let e=!1,t=a(()=>(this.pause(),this.off(dx,t),this.off(Sr,t),this.off("end",t),e=!0,{done:!0,value:void 0}),"stop"),n=a(()=>{if(e)return t();let i=this.read();return i===null?t():{done:!1,value:i}},"next");return this.once("end",t),this.once(dx,t),this.once(Sr,t),{next:n,throw:t,return:t,[Symbol.iterator](){return this}}}destroy(e){if(this[Sr])return e?this.emit("error",e):this.emit(Sr),this;this[Sr]=!0,this[Bi]=!0,this[nn].length=0,this[sn]=0;let t=this;return typeof t.close=="function"&&!this[AS]&&t.close(),e?this.emit("error",e):this.emit(Sr),this}static get isStream(){return ppe}}});var Rd,bU,Io,Epe,Fc,vpe,Dm,SU,wU,Tpe,Ape,ns,EU,vU,Ao,TU,AU,su,IU,rs,Pm,bx,mU,Fm,Bs,PS,FS,gU,Ipe,Sx,yU,Lm,_U,DS,LS,wx,RU,Bn,NS,kS,MS,Cd,xd,Nm,iPe,CU,xU=qe(()=>{lU();Rd=require("node:path"),bU=require("node:url"),Io=require("fs"),Epe=ne(require("node:fs"),1),Fc=require("node:fs/promises");_x();vpe=Io.realpathSync.native,Dm={lstatSync:Io.lstatSync,readdir:Io.readdir,readdirSync:Io.readdirSync,readlinkSync:Io.readlinkSync,realpathSync:vpe,promises:{lstat:Fc.lstat,readdir:Fc.readdir,readlink:Fc.readlink,realpath:Fc.realpath}},SU=a(r=>!r||r===Dm||r===Epe?Dm:{...Dm,...r,promises:{...Dm.promises,...r.promises||{}}},"fsFromOption"),wU=/^\\\\\?\\([a-z]:)\\?$/i,Tpe=a(r=>r.replace(/\//g,"\\").replace(wU,"$1\\"),"uncToDrive"),Ape=/[\\\/]/,ns=0,EU=1,vU=2,Ao=4,TU=6,AU=8,su=10,IU=12,rs=15,Pm=~rs,bx=16,mU=32,Fm=64,Bs=128,PS=256,FS=512,gU=Fm|Bs|FS,Ipe=1023,Sx=a(r=>r.isFile()?AU:r.isDirectory()?Ao:r.isSymbolicLink()?su:r.isCharacterDevice()?vU:r.isBlockDevice()?TU:r.isSocket()?IU:r.isFIFO()?EU:ns,"entToType"),yU=new Im({max:2**12}),Lm=a(r=>{let e=yU.get(r);if(e)return e;let t=r.normalize("NFKD");return yU.set(r,t),t},"normalize"),_U=new Im({max:2**12}),DS=a(r=>{let e=_U.get(r);if(e)return e;let t=Lm(r.toLowerCase());return _U.set(r,t),t},"normalizeNocase"),LS=class extends Im{static{a(this,"ResolveCache")}constructor(){super({max:256})}},wx=class extends Im{static{a(this,"ChildrenCache")}constructor(e=16*1024){super({maxSize:e,sizeCalculation:a(t=>t.length+1,"sizeCalculation")})}},RU=Symbol("PathScurry setAsCwd"),Bn=class{static{a(this,"PathBase")}name;root;roots;parent;nocase;isCWD=!1;#t;#r;get dev(){return this.#r}#n;get mode(){return this.#n}#e;get nlink(){return this.#e}#i;get uid(){return this.#i}#a;get gid(){return this.#a}#p;get rdev(){return this.#p}#u;get blksize(){return this.#u}#c;get ino(){return this.#c}#f;get size(){return this.#f}#l;get blocks(){return this.#l}#d;get atimeMs(){return this.#d}#o;get mtimeMs(){return this.#o}#g;get ctimeMs(){return this.#g}#E;get birthtimeMs(){return this.#E}#b;get atime(){return this.#b}#S;get mtime(){return this.#S}#A;get ctime(){return this.#A}#y;get birthtime(){return this.#y}#v;#T;#m;#_;#w;#R;#s;#x;#O;#C;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=ns,n,i,s,o,c){this.name=e,this.#v=s?DS(e):Lm(e),this.#s=t&Ipe,this.nocase=s,this.roots=i,this.root=n||this,this.#x=o,this.#m=c.fullpath,this.#w=c.relative,this.#R=c.relativePosix,this.parent=c.parent,this.parent?this.#t=this.parent.#t:this.#t=SU(c.fs)}depth(){return this.#T!==void 0?this.#T:this.parent?this.#T=this.parent.depth()+1:this.#T=0}childrenCache(){return this.#x}resolve(e){if(!e)return this;let t=this.getRootString(e),i=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#F(i):this.#F(i)}#F(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#x.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#x.set(this,t),this.#s&=~bx,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),i=this.nocase?DS(e):Lm(e);for(let l of n)if(l.#v===i)return l;let s=this.parent?this.sep:"",o=this.#m?this.#m+s+e:void 0,c=this.newChild(e,ns,{...t,parent:this,fullpath:o});return this.canReaddir()||(c.#s|=Bs),n.push(c),c}relative(){if(this.isCWD)return"";if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.name;let n=t.relative();return n+(!n||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#R!==void 0)return this.#R;let e=this.name,t=this.parent;if(!t)return this.#R=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?"":"/")+e}fullpath(){if(this.#m!==void 0)return this.#m;let e=this.name,t=this.parent;if(!t)return this.#m=this.name;let i=t.fullpath()+(t.parent?this.sep:"")+e;return this.#m=i}fullpathPosix(){if(this.#_!==void 0)return this.#_;if(this.sep==="/")return this.#_=this.fullpath();if(!this.parent){let i=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(i)?this.#_=`//?/${i}`:this.#_=i}let e=this.parent,t=e.fullpathPosix(),n=t+(!t||!e.parent?"":"/")+this.name;return this.#_=n}isUnknown(){return(this.#s&rs)===ns}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#s&rs)===AU}isDirectory(){return(this.#s&rs)===Ao}isCharacterDevice(){return(this.#s&rs)===vU}isBlockDevice(){return(this.#s&rs)===TU}isFIFO(){return(this.#s&rs)===EU}isSocket(){return(this.#s&rs)===IU}isSymbolicLink(){return(this.#s&su)===su}lstatCached(){return this.#s&mU?this:void 0}readlinkCached(){return this.#O}realpathCached(){return this.#C}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#O)return!0;if(!this.parent)return!1;let e=this.#s&rs;return!(e!==ns&&e!==su||this.#s&PS||this.#s&Bs)}calledReaddir(){return!!(this.#s&bx)}isENOENT(){return!!(this.#s&Bs)}isNamed(e){return this.nocase?this.#v===DS(e):this.#v===Lm(e)}async readlink(){let e=this.#O;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=await this.#t.promises.readlink(this.fullpath()),n=(await this.parent.realpath())?.resolve(t);if(n)return this.#O=n}catch(t){this.#D(t.code);return}}readlinkSync(){let e=this.#O;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=this.#t.readlinkSync(this.fullpath()),n=this.parent.realpathSync()?.resolve(t);if(n)return this.#O=n}catch(t){this.#D(t.code);return}}#$(e){this.#s|=bx;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#I()}}#I(){this.#s&Bs||(this.#s=(this.#s|Bs)&Pm,this.#q())}#q(){let e=this.children();e.provisional=0;for(let t of e)t.#I()}#N(){this.#s|=FS,this.#L()}#L(){if(this.#s&Fm)return;let e=this.#s;(e&rs)===Ao&&(e&=Pm),this.#s=e|Fm,this.#q()}#U(e=""){e==="ENOTDIR"||e==="EPERM"?this.#L():e==="ENOENT"?this.#I():this.children().provisional=0}#P(e=""){e==="ENOTDIR"?this.parent.#L():e==="ENOENT"&&this.#I()}#D(e=""){let t=this.#s;t|=PS,e==="ENOENT"&&(t|=Bs),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Pm),this.#s=t,e==="ENOTDIR"&&this.parent&&this.parent.#L()}#B(e,t){return this.#G(e,t)||this.#k(e,t)}#k(e,t){let n=Sx(e),i=this.newChild(e.name,n,{parent:this}),s=i.#s&rs;return s!==Ao&&s!==su&&s!==ns&&(i.#s|=Fm),t.unshift(i),t.provisional++,i}#G(e,t){for(let n=t.provisional;n<t.length;n++){let i=t[n];if((this.nocase?DS(e.name):Lm(e.name))===i.#v)return this.#Y(e,i,n,t)}}#Y(e,t,n,i){let s=t.name;return t.#s=t.#s&Pm|Sx(e),s!==e.name&&(t.name=e.name),n!==i.provisional&&(n===i.length-1?i.pop():i.splice(n,1),i.unshift(t)),i.provisional++,t}async lstat(){if((this.#s&Bs)===0)try{return this.#W(await this.#t.promises.lstat(this.fullpath())),this}catch(e){this.#P(e.code)}}lstatSync(){if((this.#s&Bs)===0)try{return this.#W(this.#t.lstatSync(this.fullpath())),this}catch(e){this.#P(e.code)}}#W(e){let{atime:t,atimeMs:n,birthtime:i,birthtimeMs:s,blksize:o,blocks:c,ctime:l,ctimeMs:u,dev:f,gid:d,ino:p,mode:h,mtime:m,mtimeMs:g,nlink:_,rdev:b,size:T,uid:I}=e;this.#b=t,this.#d=n,this.#y=i,this.#E=s,this.#u=o,this.#l=c,this.#A=l,this.#g=u,this.#r=f,this.#a=d,this.#c=p,this.#n=h,this.#S=m,this.#o=g,this.#e=_,this.#p=b,this.#f=T,this.#i=I;let w=Sx(e);this.#s=this.#s&Pm|w|mU,w!==ns&&w!==Ao&&w!==su&&(this.#s|=Fm)}#M=[];#h=!1;#H(e){this.#h=!1;let t=this.#M.slice();this.#M.length=0,t.forEach(n=>n(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let s=n.slice(0,n.provisional);t?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#M.push(e),this.#h)return;this.#h=!0;let i=this.fullpath();this.#t.readdir(i,{withFileTypes:!0},(s,o)=>{if(s)this.#U(s.code),n.provisional=0;else{for(let c of o)this.#B(c,n);this.#$(n)}this.#H(n.slice(0,n.provisional))})}#V;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#V)await this.#V;else{let n=a(()=>{},"resolve");this.#V=new Promise(i=>n=i);try{for(let i of await this.#t.promises.readdir(t,{withFileTypes:!0}))this.#B(i,e);this.#$(e)}catch(i){this.#U(i.code),e.provisional=0}this.#V=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#t.readdirSync(t,{withFileTypes:!0}))this.#B(n,e);this.#$(e)}catch(n){this.#U(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#s&gU)return!1;let e=rs&this.#s;return e===ns||e===Ao||e===su}shouldWalk(e,t){return(this.#s&Ao)===Ao&&!(this.#s&gU)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#C)return this.#C;if(!((FS|PS|Bs)&this.#s))try{let e=await this.#t.promises.realpath(this.fullpath());return this.#C=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#C)return this.#C;if(!((FS|PS|Bs)&this.#s))try{let e=this.#t.realpathSync(this.fullpath());return this.#C=this.resolve(e)}catch{this.#N()}}[RU](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],i=this;for(;i&&i.parent;)t.add(i),i.#w=n.join(this.sep),i.#R=n.join("/"),i=i.parent,n.push("..");for(i=e;i&&i.parent&&!t.has(i);)i.#w=void 0,i.#R=void 0,i=i.parent}},NS=class r extends Bn{static{a(this,"PathWin32")}sep="\\";splitSep=Ape;constructor(e,t=ns,n,i,s,o,c){super(e,t,n,i,s,o,c)}newChild(e,t=ns,n={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return Rd.win32.parse(e).root}getRoot(e){if(e=Tpe(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new Cd(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(wU,"$1\\"),e===t}},kS=class r extends Bn{static{a(this,"PathPosix")}splitSep="/";sep="/";constructor(e,t=ns,n,i,s,o,c){super(e,t,n,i,s,o,c)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=ns,n={}){return new r(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}},MS=class{static{a(this,"PathScurryBase")}root;rootPath;roots;cwd;#t;#r;#n;nocase;#e;constructor(e=process.cwd(),t,n,{nocase:i,childrenCacheSize:s=16*1024,fs:o=Dm}={}){this.#e=SU(o),(e instanceof URL||e.startsWith("file://"))&&(e=(0,bU.fileURLToPath)(e));let c=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(c),this.#t=new LS,this.#r=new LS,this.#n=new wx(s);let l=c.substring(this.rootPath.length).split(n);if(l.length===1&&!l[0]&&l.pop(),i===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=i,this.root=this.newRoot(this.#e),this.roots[this.rootPath]=this.root;let u=this.root,f=l.length-1,d=t.sep,p=this.rootPath,h=!1;for(let m of l){let g=f--;u=u.child(m,{relative:new Array(g).fill("..").join(d),relativePosix:new Array(g).fill("..").join("/"),fullpath:p+=(h?"":d)+m}),h=!0}this.cwd=u}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#n}resolve(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#t.get(t);if(n!==void 0)return n;let i=this.cwd.resolve(t).fullpath();return this.#t.set(t,i),i}resolvePosix(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#r.get(t);if(n!==void 0)return n;let i=this.cwd.resolve(t).fullpathPosix();return this.#r.set(t,i),i}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let i=await e.readdir();return n?i:i.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(i=>i.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=[];(!s||s(e))&&c.push(n?e:e.fullpath());let l=new Set,u=a((d,p)=>{l.add(d),d.readdirCB((h,m)=>{if(h)return p(h);let g=m.length;if(!g)return p();let _=a(()=>{--g===0&&p()},"next");for(let b of m)(!s||s(b))&&c.push(n?b:b.fullpath()),i&&b.isSymbolicLink()?b.realpath().then(T=>T?.isUnknown()?T.lstat():T).then(T=>T?.shouldWalk(l,o)?u(T,_):_()):b.shouldWalk(l,o)?u(b,_):_()},!0)},"walk"),f=e;return new Promise((d,p)=>{u(f,h=>{if(h)return p(h);d(c)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=[];(!s||s(e))&&c.push(n?e:e.fullpath());let l=new Set([e]);for(let u of l){let f=u.readdirSync();for(let d of f){(!s||s(d))&&c.push(n?d:d.fullpath());let p=d;if(d.isSymbolicLink()){if(!(i&&(p=d.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(l,o)&&l.add(p)}}return c}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t;(!s||s(e))&&(yield n?e:e.fullpath());let c=new Set([e]);for(let l of c){let u=l.readdirSync();for(let f of u){(!s||s(f))&&(yield n?f:f.fullpath());let d=f;if(f.isSymbolicLink()){if(!(i&&(d=f.realpathSync())))continue;d.isUnknown()&&d.lstatSync()}d.shouldWalk(c,o)&&c.add(d)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=new Dc({objectMode:!0});(!s||s(e))&&c.write(n?e:e.fullpath());let l=new Set,u=[e],f=0,d=a(()=>{let p=!1;for(;!p;){let h=u.shift();if(!h){f===0&&c.end();return}f++,l.add(h);let m=a((_,b,T=!1)=>{if(_)return c.emit("error",_);if(i&&!T){let I=[];for(let w of b)w.isSymbolicLink()&&I.push(w.realpath().then(S=>S?.isUnknown()?S.lstat():S));if(I.length){Promise.all(I).then(()=>m(null,b,!0));return}}for(let I of b)I&&(!s||s(I))&&(c.write(n?I:I.fullpath())||(p=!0));f--;for(let I of b){let w=I.realpathCached()||I;w.shouldWalk(l,o)&&u.push(w)}p&&!c.flowing?c.once("drain",d):g||d()},"onReaddir"),g=!0;h.readdirCB(m,!0),g=!1}},"process");return d(),c}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof Bn||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:i=!1,filter:s,walkFilter:o}=t,c=new Dc({objectMode:!0}),l=new Set;(!s||s(e))&&c.write(n?e:e.fullpath());let u=[e],f=0,d=a(()=>{let p=!1;for(;!p;){let h=u.shift();if(!h){f===0&&c.end();return}f++,l.add(h);let m=h.readdirSync();for(let g of m)(!s||s(g))&&(c.write(n?g:g.fullpath())||(p=!0));f--;for(let g of m){let _=g;if(g.isSymbolicLink()){if(!(i&&(_=g.realpathSync())))continue;_.isUnknown()&&_.lstatSync()}_.shouldWalk(l,o)&&u.push(_)}}p&&!c.flowing&&c.once("drain",d)},"process");return d(),c}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[RU](t)}},Cd=class extends MS{static{a(this,"PathScurryWin32")}sep="\\";constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,Rd.win32,"\\",{...t,nocase:n}),this.nocase=n;for(let i=this.cwd;i;i=i.parent)i.nocase=this.nocase}parseRootPath(e){return Rd.win32.parse(e).root.toUpperCase()}newRoot(e){return new NS(this.rootPath,Ao,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},xd=class extends MS{static{a(this,"PathScurryPosix")}sep="/";constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,Rd.posix,"/",{...t,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new kS(this.rootPath,Ao,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Nm=class extends xd{static{a(this,"PathScurryDarwin")}constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}},iPe=process.platform==="win32"?NS:kS,CU=process.platform==="win32"?Cd:process.platform==="darwin"?Nm:xd});var Rpe,Cpe,Od,Ex=qe(()=>{xc();Rpe=a(r=>r.length>=1,"isPatternList"),Cpe=a(r=>r.length>=1,"isGlobList"),Od=class r{static{a(this,"Pattern")}#t;#r;#n;length;#e;#i;#a;#p;#u;#c;#f=!0;constructor(e,t,n,i){if(!Rpe(e))throw new TypeError("empty pattern list");if(!Cpe(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#t=e,this.#r=t,this.#n=n,this.#e=i,this.#n===0){if(this.isUNC()){let[s,o,c,l,...u]=this.#t,[f,d,p,h,...m]=this.#r;u[0]===""&&(u.shift(),m.shift());let g=[s,o,c,l,""].join("/"),_=[f,d,p,h,""].join("/");this.#t=[g,...u],this.#r=[_,...m],this.length=this.#t.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#t,[c,...l]=this.#r;o[0]===""&&(o.shift(),l.shift());let u=s+"/",f=c+"/";this.#t=[u,...o],this.#r=[f,...l],this.length=this.#t.length}}}pattern(){return this.#t[this.#n]}isString(){return typeof this.#t[this.#n]=="string"}isGlobstar(){return this.#t[this.#n]===br}isRegExp(){return this.#t[this.#n]instanceof RegExp}globString(){return this.#a=this.#a||(this.#n===0?this.isAbsolute()?this.#r[0]+this.#r.slice(1).join("/"):this.#r.join("/"):this.#r.slice(this.#n).join("/"))}hasMore(){return this.length>this.#n+1}rest(){return this.#i!==void 0?this.#i:this.hasMore()?(this.#i=new r(this.#t,this.#r,this.#n+1,this.#e),this.#i.#c=this.#c,this.#i.#u=this.#u,this.#i.#p=this.#p,this.#i):this.#i=null}isUNC(){let e=this.#t;return this.#u!==void 0?this.#u:this.#u=this.#e==="win32"&&this.#n===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#t;return this.#p!==void 0?this.#p:this.#p=this.#e==="win32"&&this.#n===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#t;return this.#c!==void 0?this.#c:this.#c=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#t[0];return typeof e=="string"&&this.isAbsolute()&&this.#n===0?e:""}checkFollowGlobstar(){return!(this.#n===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#n===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}}});var xpe,Pd,vx=qe(()=>{xc();Ex();xpe=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Pd=class{static{a(this,"Ignore")}relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:i,noglobstar:s,platform:o=xpe}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:i,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let c of e)this.add(c)}add(e){let t=new Ui(e,this.mmopts);for(let n=0;n<t.set.length;n++){let i=t.set[n],s=t.globParts[n];if(!i||!s)throw new Error("invalid pattern object");for(;i[0]==="."&&s[0]===".";)i.shift(),s.shift();let o=new Od(i,s,0,this.platform),c=new Ui(o.globString(),this.mmopts),l=s[s.length-1]==="**",u=o.isAbsolute();u?this.absolute.push(c):this.relative.push(c),l&&(u?this.absoluteChildren.push(c):this.relativeChildren.push(c))}}ignored(e){let t=e.fullpath(),n=`${t}/`,i=e.relative()||".",s=`${i}/`;for(let o of this.relative)if(o.match(i)||o.match(s))return!0;for(let o of this.absolute)if(o.match(t)||o.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",n=(e.relative()||".")+"/";for(let i of this.relativeChildren)if(i.match(n))return!0;for(let i of this.absoluteChildren)if(i.match(t))return!0;return!1}}});var Tx,Ax,Ix,km,OU=qe(()=>{xc();Tx=class r{static{a(this,"HasWalkedCache")}store;constructor(e=new Map){this.store=e}copy(){return new r(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),i=this.store.get(n);i?i.add(t.globString()):this.store.set(n,new Set([t.globString()]))}},Ax=class{static{a(this,"MatchRecord")}store=new Map;add(e,t,n){let i=(t?2:0)|(n?1:0),s=this.store.get(e);this.store.set(e,s===void 0?i:i&s)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},Ix=class{static{a(this,"SubWalks")}store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(i=>i.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},km=class r{static{a(this,"Processor")}hasWalkedCache;matches=new Ax;subwalks=new Ix;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new Tx}processPatterns(e,t){this.patterns=t;let n=t.map(i=>[e,i]);for(let[i,s]of n){this.hasWalkedCache.storeWalked(i,s);let o=s.root(),c=s.isAbsolute()&&this.opts.absolute!==!1;if(o){i=i.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let d=s.rest();if(d)s=d;else{this.matches.add(i,!0,!1);continue}}if(i.isENOENT())continue;let l,u,f=!1;for(;typeof(l=s.pattern())=="string"&&(u=s.rest());)i=i.resolve(l),s=u,f=!0;if(l=s.pattern(),u=s.rest(),f){if(this.hasWalkedCache.hasWalked(i,s))continue;this.hasWalkedCache.storeWalked(i,s)}if(typeof l=="string"){let d=l===".."||l===""||l===".";this.matches.add(i.resolve(l),c,d);continue}else if(l===br){(!i.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(i,s);let d=u?.pattern(),p=u?.rest();if(!u||(d===""||d===".")&&!p)this.matches.add(i,c,d===""||d===".");else if(d===".."){let h=i.parent||i;p?this.hasWalkedCache.hasWalked(h,p)||this.subwalks.add(h,p):this.matches.add(h,c,!0)}}else l instanceof RegExp&&this.subwalks.add(i,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new r(this.opts,this.hasWalkedCache)}filterEntries(e,t){let n=this.subwalks.get(e),i=this.child();for(let s of t)for(let o of n){let c=o.isAbsolute(),l=o.pattern(),u=o.rest();l===br?i.testGlobstar(s,o,u,c):l instanceof RegExp?i.testRegExp(s,l,u,c):i.testString(s,l,u,c)}return i}testGlobstar(e,t,n,i){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,i,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let s=n.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,n.rest(),i);else if(s===".."){let o=e.parent||e;this.subwalks.add(o,n)}else s instanceof RegExp&&this.testRegExp(e,s,n.rest(),i)}}testRegExp(e,t,n,i){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}testString(e,t,n,i){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,i,!1))}}});var Ope,jS,Mm,jm,PU=qe(()=>{_x();vx();OU();Ope=a((r,e)=>typeof r=="string"?new Pd([r],e):Array.isArray(r)?new Pd(r,e):r,"makeIgnore"),jS=class{static{a(this,"GlobUtil")}path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#t=[];#r;#n;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#n=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#r=Ope(n.ignore??[],n),!this.includeChildMatches&&typeof this.#r.add!="function")){let i="cannot ignore child matches, ignore lacks add() method.";throw new Error(i)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#t.length=0}))}#e(e){return this.seen.has(e)||!!this.#r?.ignored?.(e)}#i(e){return!!this.#r?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#t.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#t.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=await s.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(s,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#e(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=s.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(s,t)}matchFinish(e,t){if(this.#e(e))return;if(!this.includeChildMatches&&this.#r?.add){let s=`${e.relativePosix()}/**`;this.#r.add(s)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let i=this.opts.mark&&e.isDirectory()?this.#n:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+i)}else{let s=this.opts.posix?e.relativePosix():e.relative(),o=this.opts.dotRelative&&!s.startsWith(".."+this.#n)?"."+this.#n:"";this.matchEmit(s?o+s+i:"."+i)}}async match(e,t,n){let i=await this.matchCheck(e,n);i&&this.matchFinish(i,t)}matchSync(e,t,n){let i=this.matchCheckSync(e,n);i&&this.matchFinish(i,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new km(this.opts),n)}walkCB2(e,t,n,i){if(this.#i(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,i));return}n.processPatterns(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||(s++,this.match(c,l,u).then(()=>o()));for(let c of n.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;s++;let l=c.readdirCached();c.calledReaddir()?this.walkCB3(c,l,n,o):c.readdirCB((u,f)=>this.walkCB3(c,f,n,o),!0)}o()}walkCB3(e,t,n,i){n=n.filterEntries(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||(s++,this.match(c,l,u).then(()=>o()));for(let[c,l]of n.subwalks.entries())s++,this.walkCB2(c,l,n.child(),o);o()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new km(this.opts),n)}walkCB2Sync(e,t,n,i){if(this.#i(e))return i();if(this.signal?.aborted&&i(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,i));return}n.processPatterns(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||this.matchSync(c,l,u);for(let c of n.subwalkTargets()){if(this.maxDepth!==1/0&&c.depth()>=this.maxDepth)continue;s++;let l=c.readdirSync();this.walkCB3Sync(c,l,n,o)}o()}walkCB3Sync(e,t,n,i){n=n.filterEntries(e,t);let s=1,o=a(()=>{--s===0&&i()},"next");for(let[c,l,u]of n.matches.entries())this.#e(c)||this.matchSync(c,l,u);for(let[c,l]of n.subwalks.entries())s++,this.walkCB2Sync(c,l,n.child(),o);o()}},Mm=class extends jS{static{a(this,"GlobWalker")}matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},jm=class extends jS{static{a(this,"GlobStream")}results;constructor(e,t,n){super(e,t,n),this.results=new Dc({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}});var DU,Ppe,Vs,Rx=qe(()=>{xc();DU=require("node:url");xU();Ex();PU();Ppe=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Vs=class{static{a(this,"Glob")}absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=(0,DU.fileURLToPath)(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=t.platform||Ppe,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=t.platform==="win32"?Cd:t.platform==="darwin"?Nm:t.platform?xd:CU;this.scurry=new l(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",i={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new Ui(l,i)),[o,c]=s.reduce((l,u)=>(l[0].push(...u.set),l[1].push(...u.globParts),l),[[],[]]);this.patterns=o.map((l,u)=>{let f=c[u];if(!f)throw new Error("invalid pattern object");return new Od(l,f,0,this.platform)})}async walk(){return[...await new Mm(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 Mm(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 jm(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 jm(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()}}});var Cx,xx=qe(()=>{xc();Cx=a((r,e={})=>{Array.isArray(r)||(r=[r]);for(let t of r)if(new Ui(t,e).hasMagic())return!0;return!1},"hasMagic")});function $S(r,e={}){return new Vs(r,e).streamSync()}function LU(r,e={}){return new Vs(r,e).stream()}function NU(r,e={}){return new Vs(r,e).walkSync()}async function FU(r,e={}){return new Vs(r,e).walk()}function US(r,e={}){return new Vs(r,e).iterateSync()}function kU(r,e={}){return new Vs(r,e).iterate()}var Dpe,Fpe,Lpe,Npe,kpe,Dd,Ox=qe(()=>{xc();Rx();xx();xc();Rx();xx();vx();a($S,"globStreamSync");a(LU,"globStream");a(NU,"globSync");a(FU,"glob_");a(US,"globIterateSync");a(kU,"globIterate");Dpe=$S,Fpe=Object.assign(LU,{sync:$S}),Lpe=US,Npe=Object.assign(kU,{sync:US}),kpe=Object.assign(NU,{stream:$S,iterate:US}),Dd=Object.assign(FU,{glob:FU,globSync:NU,sync:kpe,globStream:LU,stream:Fpe,globStreamSync:$S,streamSync:Dpe,globIterate:kU,iterate:Npe,globIterateSync:US,iterateSync:Lpe,Glob:Vs,hasMagic:Cx,escape:Td,unescape:$s});Dd.glob=Dd});async function jU(r,e,t,n={}){let{dryRun:i=!1,excludeRelPath:s}=n,o=ou.default.join(r,"**/*.md"),c=await Dd(o,{nodir:!0,ignore:[ou.default.join(r,".obsidian/**"),ou.default.join(r,".trash/**"),ou.default.join(r,"**/.obsidian/**"),ou.default.join(r,"**/.trash/**")]}),l={filesScanned:0,filesModified:0,replacements:0,modifiedFiles:[]};for(let u of c){let f=ou.default.relative(r,u);if(s&&f===s)continue;l.filesScanned+=1;let d;try{d=await Px.default.readFile(u,"utf-8")}catch{continue}let{updated:p,replacements:h}=Mpe(d,e,t);h>0&&(l.filesModified+=1,l.replacements+=h,l.modifiedFiles.push(f),i||await Px.default.writeFile(u,p,"utf-8"))}return l}function Mpe(r,e,t){let n=r.split(/(^```[\s\S]*?^```)/m),i=0;for(let s=0;s<n.length;s++){if(s%2===1)continue;let o=n[s],c=jpe(o,e,t);i+=c.replacements,n[s]=c.updated}return{updated:n.join(""),replacements:i}}function jpe(r,e,t){let n=r.split(/(`[^`\n]*`)/),i=0;for(let s=0;s<n.length;s++){if(s%2===1)continue;let o=$pe(n[s],e,t);i+=o.replacements,n[s]=o.updated}return{updated:n.join(""),replacements:i}}function $pe(r,e,t){let n=/(?<!!)\[\[([^\[\]\n|#^]+)((?:[#^][^\[\]\n|]*)?)(?:\|[^\[\]\n]*)?\]\]/g,i=0;return{updated:r.replace(n,(o,c,l)=>c.trim()!==e?o:(i+=1,`[[${t}${l}]]`)),replacements:i}}var Px,ou,$U=qe(()=>{"use strict";Px=ne(Ca()),ou=ne(require("path"));Ox();a(jU,"rewriteInboundWikilinks");a(Mpe,"rewriteContent");a(jpe,"rewriteProseSegment");a($pe,"replaceWikilinks")});var Fr,ar,BS,Upe,Ut,Vi=qe(()=>{"use strict";Fr=ne(Ca()),ar=ne(require("path"));Sm();BS=ne(We());$U();Upe=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Ut=class r{constructor(e){this.rootPath=e;this.uuidIndex=null;this.basenameIndex=null;this.aliasIndex=null}static{a(this,"FileSystemVaultAdapter")}async read(e){let t=this.resolvePath(e.path);if(!await Fr.default.pathExists(t))throw new Error(`File not found: ${e.path}`);return Fr.default.readFile(t,"utf-8")}async create(e,t){let n=this.resolvePath(e);if(await Fr.default.pathExists(n))throw new Error(`File already exists: ${e}`);return await Fr.default.ensureDir(ar.default.dirname(n)),await Fr.default.writeFile(n,t,"utf-8"),this.createFileObject(e)}async modify(e,t){let n=this.resolvePath(e.path);if(!await Fr.default.pathExists(n))throw new Error(`File not found: ${e.path}`);await Fr.default.writeFile(n,t,"utf-8")}async delete(e){let t=this.resolvePath(e.path);if(!await Fr.default.pathExists(t))throw new Error(`File not found: ${e.path}`);await Fr.default.remove(t)}async exists(e){let t=this.resolvePath(e);return Fr.default.pathExists(t)}getAbstractFileByPath(e){let t=this.resolvePath(e);try{let n=Fr.default.statSync(t);if(n.isFile())return this.createFileObject(e);if(n.isDirectory())return this.createFolderObject(e)}catch{return null}return null}getAllFiles(){let e=[];return this.walkDirectory(this.rootPath,t=>{if(t.endsWith(".md")){let n=ar.default.relative(this.rootPath,t);e.push(this.createFileObject(n))}}),e}getFrontmatter(e){try{let t=Fr.default.readFileSync(this.resolvePath(e.path),"utf-8");return this.extractFrontmatter(t)}catch{return null}}async updateFrontmatter(e,t){let n=await this.read(e),i=this.extractFrontmatter(n),s=r.FRONTMATTER_BLOCK.exec(n)?.[1];if(i===null&&s!==void 0&&s.trim()!=="")throw new Error(`updateFrontmatter: frontmatter of ${e.path} is not parseable \u2014 refusing to patch (would drop keys)`);let o=i??{},c=t({...o});BS.FrontmatterService.applyPatch(o,c);let l=this.replaceFrontmatter(n,o);await this.modify(e,l)}async rename(e,t){let n=this.resolvePath(e.path),i=this.resolvePath(t);if(!await Fr.default.pathExists(n))throw new Error(`File not found: ${e.path}`);await Fr.default.ensureDir(ar.default.dirname(i)),await Fr.default.move(n,i)}async createFolder(e){let t=this.resolvePath(e);await Fr.default.ensureDir(t)}getFirstLinkpathDest(e,t,n){let i=e.split("|")[0].trim();if(!i)return null;if(Upe.test(i)){this.uuidIndex===null&&this.buildUuidIndex();let u=i.toLowerCase(),f=this.uuidIndex.get(u);return f?this.createFileObject(f):null}let s=ar.default.dirname(this.resolvePath(t)),o;if(ar.default.isAbsolute(i)?o=this.resolvePath(i):o=ar.default.resolve(s,i),i.endsWith(".md")||(o+=".md"),Fr.default.existsSync(o)){let u=ar.default.relative(this.rootPath,o);return this.createFileObject(u)}(this.basenameIndex===null||this.aliasIndex===null)&&this.buildLinkpathIndex();let c=i.toLowerCase(),l=this.basenameIndex.get(c);if(l)return this.createFileObject(l);if(n?.allowAliasFallback!==!1){let u=this.aliasIndex.get(c);if(u)return this.createFileObject(u)}return null}buildLinkpathIndex(){this.basenameIndex=new Map,this.aliasIndex=new Map,this.walkDirectory(this.rootPath,e=>{if(!e.endsWith(".md"))return;let t=ar.default.relative(this.rootPath,e),n=ar.default.basename(e,".md").toLowerCase();this.basenameIndex.has(n)||this.basenameIndex.set(n,t);let i;try{i=Fr.default.readFileSync(e,"utf-8")}catch{return}let s=this.extractFrontmatter(i);if(!s)return;let o=s.aliases,c=Array.isArray(o)?o:typeof o=="string"?[o]:[];for(let l of c){if(typeof l!="string")continue;let u=l.trim().toLowerCase();u&&(this.aliasIndex.has(u)||this.aliasIndex.set(u,t))}})}buildUuidIndex(){this.uuidIndex=new Map,this.walkDirectory(this.rootPath,e=>{if(e.endsWith(".md")){let n=ar.default.basename(e,".md").match(/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i);if(n){let i=n[1].toLowerCase(),s=ar.default.relative(this.rootPath,e);this.uuidIndex.set(i,s)}}})}async process(e,t){let n=await this.read(e),i=t(n);return await this.modify(e,i),i}getDefaultNewFileParent(){return{path:"",name:""}}async updateLinks(e,t,n){let i=ar.default.basename(t,".md");await jU(this.rootPath,n,i,{excludeRelPath:e})}resolvePath(e){if(ar.default.isAbsolute(e))return e;let t=this.rootPath.replace(/[/\\]+$/,""),n=ar.default.sep+e;return n===t||n.startsWith(t+ar.default.sep)?n:ar.default.join(this.rootPath,e)}createFileObject(e){let t=ar.default.basename(e),n=ar.default.basename(e,ar.default.extname(e)),i=ar.default.dirname(e);return{path:e,basename:n,name:t,parent:i!=="."?this.createFolderObject(i):null}}createFolderObject(e){return{path:e,name:ar.default.basename(e)}}static{this.FRONTMATTER_BLOCK=/^---\n([\s\S]*?)\n---/}extractFrontmatter(e){let t=e.match(r.FRONTMATTER_BLOCK);return t?(0,BS.parseYamlFrontmatterTolerant)(t[1]):null}replaceFrontmatter(e,t){let i=`---
403
+ ${vd(t,{lineWidth:-1,noRefs:!0,quoteStyle:"double"}).trim()}
404
+ ---`,s=r.FRONTMATTER_BLOCK;return e.match(s)?e.replace(s,()=>i):`${i}
407
405
  ${e}`}shouldSkipDirectory(e){return e.startsWith(".")}walkDirectory(e,t){let n;try{n=Fr.default.readdirSync(e,{withFileTypes:!0})}catch(i){let s=i;if(s.code==="EPERM"||s.code==="EACCES")return;throw i}for(let i of n){let s=ar.default.join(e,i.name);if(i.isDirectory()){if(this.shouldSkipDirectory(i.name))continue;this.walkDirectory(s,t)}else i.isFile()&&t(s)}}}});var gr=qe(()=>{"use strict"});function UU(r){return r.startsWith("VALIDATION_")?"validation":r.startsWith("PERMISSION_")?"permission":r.startsWith("STATE_")?"state":"internal"}var pt,BU=qe(()=>{"use strict";a(UU,"getErrorCategory");pt=class{static{a(this,"ResponseBuilder")}static success(e,t){return{success:!0,data:e,...t&&{meta:t}}}static error(e,t,n,i){return{success:!1,error:{code:e,category:UU(e),message:t,exitCode:n,...i?.recovery&&{recovery:i.recovery},...i?.context&&{context:i.context},...i?.stack&&{stack:i.stack}}}}}});var wr=qe(()=>{"use strict";BU()});var Lr,Gi=qe(()=>{"use strict";wr();Lr=class extends Error{static{a(this,"CLIError")}constructor(e,t,n){super(e),this.name=this.constructor.name,this.context=t,this.recoveryHint=n,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}format(){let e=`\u274C ${this.name}: ${this.message}`;if(this.guidance&&(e+=`
408
406
 
409
407
  \u{1F4A1} ${this.guidance}`),this.context&&Object.keys(this.context).length>0){e+=`
@@ -676,7 +674,7 @@ Next steps:
676
674
  `).map(n=>n.trim()).filter(n=>n.length>0),t=e[e.length-1];if(t!==void 0)try{return JSON.parse(t)}catch{return}}a(U0e,"parseLastJsonLine");function Z7(r,e){return e.filter(t=>{let n=r[t];return typeof n!="string"||n.trim().length===0})}a(Z7,"missingStringFields");var eE=class{constructor(e){this.deps=e}static{a(this,"McpServer")}async handle(e){if(typeof e!="object"||e===null||Array.isArray(e))return{jsonrpc:"2.0",id:null,error:{code:J7,message:"Invalid request: expected a JSON-RPC object"}};let t=e.id,n=t===void 0;if(typeof e.method!="string")return n?null:{jsonrpc:"2.0",id:t??null,error:{code:J7,message:"Invalid request: missing method"}};if(n)return null;let i=t??null;switch(e.method){case"initialize":return{jsonrpc:"2.0",id:i,result:{protocolVersion:j0e,capabilities:{tools:{}},serverInfo:{name:"exocortex",version:this.deps.version}}};case"ping":return{jsonrpc:"2.0",id:i,result:{}};case"tools/list":return{jsonrpc:"2.0",id:i,result:{tools:X7}};case"tools/call":return{jsonrpc:"2.0",id:i,result:await this.callTool(e.params??{})};default:return{jsonrpc:"2.0",id:i,error:{code:$0e,message:`Method not found: ${e.method}`}}}}async callTool(e){let t=e.name,n=e.arguments??{},i;if(t==="create_asset"){let c=Z7(n,["vault","class","label"]);if(c.length>0)return np(`create_asset: missing required argument(s): ${c.join(", ")}`,!0);let l=K7(n);if(l!==null)return np(`create_asset: ${l}`,!0);i=Y7(n)}else if(t==="create_effort"){let c=Z7(n,["vault","command","target"]);if(c.length>0)return np(`create_effort: missing required argument(s): ${c.join(", ")}`,!0);i=Q7(n)}else return np(`Unknown tool: ${String(t)}`,!0);let s=await this.deps.runCli(i);if(s.exitCode!==0){let c=s.stderr.trim()||s.stdout.trim()||"(no diagnostic output)";return np(`exocortex-cli exited ${s.exitCode}
677
675
  ${c}`,!0)}let o=U0e(s.stdout);return np(o===void 0?s.stdout.trim():JSON.stringify(o))}};var r8=require("child_process");var B0e=32*1024*1024;function n8(r){return e=>new Promise(t=>{(0,r8.execFile)(process.execPath,[r,...e],{maxBuffer:B0e},(n,i,s)=>{let o=0;if(n){let c=n.code;o=typeof c=="number"?c:1}t({stdout:i,stderr:s,exitCode:o})})})}a(n8,"createSelfCliRunner");async function V0e(r,e,t){let n=(0,i8.createInterface)({input:e,crlfDelay:1/0});for await(let i of n){let s=i.trim();if(s.length===0)continue;let o;try{o=JSON.parse(s)}catch{t(JSON.stringify({jsonrpc:"2.0",id:null,error:{code:e8,message:"Parse error: invalid JSON"}})+`
678
676
  `);continue}let c;try{c=await r.handle(o)}catch(l){c={jsonrpc:"2.0",id:typeof o?.id=="string"||typeof o?.id=="number"?o.id:null,error:{code:t8,message:`Internal error: ${l instanceof Error?l.message:String(l)}`}}}c!==null&&t(JSON.stringify(c)+`
679
- `)}}a(V0e,"runStdioServer");function s8(r){return new de("mcp").description("Run an MCP (Model Context Protocol) stdio server exposing create_asset / create_effort tools backed by this CLI").option("--entry <path>","Path to the CLI entry script the tools invoke (defaults to this process's script)").action(async e=>{let t=e.entry??process.argv[1],n=new eE({runCli:n8(t),version:r??"unknown"});await V0e(n,process.stdin,i=>process.stdout.write(i))})}a(s8,"mcpCommand");function tE(r){let e=new de;return e.name("exocortex").description("CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more").version(r??"16.240.1"),e.addCommand(j6()),e.addCommand(z6()),e.addCommand(DB()),e.addCommand(kB()),e.addCommand(i6()),e.addCommand(MB()),e.addCommand(GB()),e.addCommand(qB()),e.addCommand(f6()),e.addCommand(g6()),e.addCommand(C6()),e.addCommand(P6()),e.addCommand(D6()),e.addCommand(L6()),e.addCommand(N6()),e.addCommand(_7()),e.addCommand(w7()),e.addCommand(k7()),e.addCommand(j7()),e.addCommand(B7()),e.addCommand(V7()),e.addCommand(W7()),e.addCommand(R7()),e.addCommand(F7()),e.addCommand(H7()),e.addCommand(s8(r??"16.240.1")),e}a(tE,"createProgram");tE().parse();0&&(module.exports={createProgram});
677
+ `)}}a(V0e,"runStdioServer");function s8(r){return new de("mcp").description("Run an MCP (Model Context Protocol) stdio server exposing create_asset / create_effort tools backed by this CLI").option("--entry <path>","Path to the CLI entry script the tools invoke (defaults to this process's script)").action(async e=>{let t=e.entry??process.argv[1],n=new eE({runCli:n8(t),version:r??"unknown"});await V0e(n,process.stdin,i=>process.stdout.write(i))})}a(s8,"mcpCommand");function tE(r){let e=new de;return e.name("exocortex").description("CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more").version(r??"16.240.2"),e.addCommand(j6()),e.addCommand(z6()),e.addCommand(DB()),e.addCommand(kB()),e.addCommand(i6()),e.addCommand(MB()),e.addCommand(GB()),e.addCommand(qB()),e.addCommand(f6()),e.addCommand(g6()),e.addCommand(C6()),e.addCommand(P6()),e.addCommand(D6()),e.addCommand(L6()),e.addCommand(N6()),e.addCommand(_7()),e.addCommand(w7()),e.addCommand(k7()),e.addCommand(j7()),e.addCommand(B7()),e.addCommand(V7()),e.addCommand(W7()),e.addCommand(R7()),e.addCommand(F7()),e.addCommand(H7()),e.addCommand(s8(r??"16.240.2")),e}a(tE,"createProgram");tE().parse();0&&(module.exports={createProgram});
680
678
  /*! Bundled license information:
681
679
 
682
680
  reflect-metadata/Reflect.js:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitelev/exocortex-cli",
3
- "version": "16.240.1",
3
+ "version": "16.240.2",
4
4
  "description": "CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more",
5
5
  "main": "dist/index.js",
6
6
  "bin": {