export function processPatternList(raw) {
    if (!raw || !raw.length)
        return [];
    return Array.from(new Set(raw.flatMap(raiz => raiz.split(/[\s,]+/)).map(string => string.trim()).filter(Boolean)));
}
export function expandIncludePatterns(list) {
    const META = /[\\*\?\{\}\[\]]/;
    const out = new Set();
    for (const caminho of list) {
        out.add(caminho);
        if (!META.test(caminho)) {
            const withoutTrailing = caminho.replace(/\\+$/, '').replace(/\/+$/, '');
            out.add(`${withoutTrailing}/**`);
            if (!caminho.includes('/') && !caminho.includes('\\')) {
                out.add(`**/${caminho}/**`);
            }
        }
    }
    return Array.from(out);
}
//# sourceMappingURL=pattern-helpers.js.map