import e from"../../_virtual/_node_util.mjs";import{__require as t}from"../braces/index.mjs";import{__require as r}from"./node_modules/picomatch/index.mjs";import{__require as n}from"./node_modules/picomatch/lib/utils.mjs";var o,i;function a(){if(i)return o;i=1;const a=e,s=t(),c=r(),u=n(),l=e=>""===e||"./"===e,f=e=>{const t=e.indexOf("{");return t>-1&&e.indexOf("}",t)>-1},p=(e,t,r)=>{t=[].concat(t),e=[].concat(e);let n=new Set,o=new Set,i=new Set,a=0,s=e=>{i.add(e.output),r&&r.onResult&&r.onResult(e)};for(let i=0;i<t.length;i++){let u=c(String(t[i]),{...r,onResult:s},!0),l=u.state.negated||u.state.negatedExtglob;l&&a++;for(let t of e){let e=u(t,!0);(l?!e.isMatch:e.isMatch)&&(l?n.add(e.output):(n.delete(e.output),o.add(e.output)))}}let u=(a===t.length?[...i]:[...o]).filter(e=>!n.has(e));if(r&&0===u.length){if(!0===r.failglob)throw new Error(`No matches found for "${t.join(", ")}"`);if(!0===r.nonull||!0===r.nullglob)return r.unescape?t.map(e=>e.replace(/\\/g,"")):t}return u};return p.match=p,p.matcher=(e,t)=>c(e,t),p.any=p.isMatch=(e,t,r)=>c(t,r)(e),p.not=(e,t,r={})=>{t=[].concat(t).map(String);let n=new Set,o=[],i=new Set(p(e,t,{...r,onResult:e=>{r.onResult&&r.onResult(e),o.push(e.output)}}));for(let e of o)i.has(e)||n.add(e);return[...n]},p.contains=(e,t,r)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${a.inspect(e)}"`);if(Array.isArray(t))return t.some(t=>p.contains(e,t,r));if("string"==typeof t){if(l(e)||l(t))return!1;if(e.includes(t)||e.startsWith("./")&&e.slice(2).includes(t))return!0}return p.isMatch(e,t,{...r,contains:!0})},p.matchKeys=(e,t,r)=>{if(!u.isObject(e))throw new TypeError("Expected the first argument to be an object");let n=p(Object.keys(e),t,r),o={};for(let t of n)o[t]=e[t];return o},p.some=(e,t,r)=>{let n=[].concat(e);for(let e of[].concat(t)){let t=c(String(e),r);if(n.some(e=>t(e)))return!0}return!1},p.every=(e,t,r)=>{let n=[].concat(e);for(let e of[].concat(t)){let t=c(String(e),r);if(!n.every(e=>t(e)))return!1}return!0},p.all=(e,t,r)=>{if("string"!=typeof e)throw new TypeError(`Expected a string: "${a.inspect(e)}"`);return[].concat(t).every(t=>c(t,r)(e))},p.capture=(e,t,r)=>{let n=u.isWindows(r),o=c.makeRe(String(e),{...r,capture:!0}).exec(n?u.toPosixSlashes(t):t);if(o)return o.slice(1).map(e=>void 0===e?"":e)},p.makeRe=(...e)=>c.makeRe(...e),p.scan=(...e)=>c.scan(...e),p.parse=(e,t)=>{let r=[];for(let n of[].concat(e||[]))for(let e of s(String(n),t))r.push(c.parse(e,t));return r},p.braces=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return t&&!0===t.nobrace||!f(e)?[e]:s(e,t)},p.braceExpand=(e,t)=>{if("string"!=typeof e)throw new TypeError("Expected a string");return p.braces(e,{...t,expand:!0})},p.hasBraces=f,o=p}export{a as __require};import s from"node:url";import c from"node:path";import u from"node:module";const l=s.fileURLToPath(import.meta.url);c.dirname(l),u.createRequire(import.meta.url);