import CJS_COMPAT_NODE_URL from 'node:url';
import CJS_COMPAT_NODE_PATH from 'node:path';
import CJS_COMPAT_NODE_MODULE from "node:module";

const __filename = CJS_COMPAT_NODE_URL.fileURLToPath(import.meta.url);
const __dirname = CJS_COMPAT_NODE_PATH.dirname(__filename);
const require = CJS_COMPAT_NODE_MODULE.createRequire(import.meta.url);
// ------------------------------------------------------------
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
// ------------------------------------------------------------
import {
  a as _,
  b as ft,
  d as J
} from "./chunk-HRN2KQZP.js";

// ../node_modules/picomatch/lib/constants.js
var et = J((ye, Lt) => {
  "use strict";
  var Xt = ft("path"), Q = "\\\\/", $t = `[^${Q}]`, Z = "\\.", Ft = "\\+", Wt = "\\?", at = "\\/", Qt = "(?=.)", yt = "[^/]", At = `(?:${at}|$)`, dt = `(?:^|${at})`, Rt = `${Z}{1,2}${At}`, Zt = `(?!${Z})`, jt = `(?!${dt}${Rt})`, Vt = `(?!${Z}{0,1}${At})`, Yt = `(?!${Rt})`, zt = `[^.${at}]`, Jt = `${yt}*?`, Ht = {
    DOT_LITERAL: Z,
    PLUS_LITERAL: Ft,
    QMARK_LITERAL: Wt,
    SLASH_LITERAL: at,
    ONE_CHAR: Qt,
    QMARK: yt,
    END_ANCHOR: At,
    DOTS_SLASH: Rt,
    NO_DOT: Zt,
    NO_DOTS: jt,
    NO_DOT_SLASH: Vt,
    NO_DOTS_SLASH: Yt,
    QMARK_NO_DOT: zt,
    STAR: Jt,
    START_ANCHOR: dt
  }, te = {
    ...Ht,
    SLASH_LITERAL: `[${Q}]`,
    QMARK: $t,
    STAR: `${$t}*?`,
    DOTS_SLASH: `${Z}{1,2}(?:[${Q}]|$)`,
    NO_DOT: `(?!${Z})`,
    NO_DOTS: `(?!(?:^|[${Q}])${Z}{1,2}(?:[${Q}]|$))`,
    NO_DOT_SLASH: `(?!${Z}{0,1}(?:[${Q}]|$))`,
    NO_DOTS_SLASH: `(?!${Z}{1,2}(?:[${Q}]|$))`,
    QMARK_NO_DOT: `[^.${Q}]`,
    START_ANCHOR: `(?:^|[${Q}])`,
    END_ANCHOR: `(?:[${Q}]|$)`
  }, ee = {
    alnum: "a-zA-Z0-9",
    alpha: "a-zA-Z",
    ascii: "\\x00-\\x7F",
    blank: " \\t",
    cntrl: "\\x00-\\x1F\\x7F",
    digit: "0-9",
    graph: "\\x21-\\x7E",
    lower: "a-z",
    print: "\\x20-\\x7E ",
    punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
    space: " \\t\\r\\n\\v\\f",
    upper: "A-Z",
    word: "A-Za-z0-9_",
    xdigit: "A-Fa-f0-9"
  };
  Lt.exports = {
    MAX_LENGTH: 1024 * 64,
    POSIX_REGEX_SOURCE: ee,
    // regular expressions
    REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
    REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
    REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
    REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
    REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
    REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
    // Replace globs with equivalent patterns to reduce parsing time.
    REPLACEMENTS: {
      "***": "*",
      "**/**": "**",
      "**/**/**": "**"
    },
    // Digits
    CHAR_0: 48,
    /* 0 */
    CHAR_9: 57,
    /* 9 */
    // Alphabet chars.
    CHAR_UPPERCASE_A: 65,
    /* A */
    CHAR_LOWERCASE_A: 97,
    /* a */
    CHAR_UPPERCASE_Z: 90,
    /* Z */
    CHAR_LOWERCASE_Z: 122,
    /* z */
    CHAR_LEFT_PARENTHESES: 40,
    /* ( */
    CHAR_RIGHT_PARENTHESES: 41,
    /* ) */
    CHAR_ASTERISK: 42,
    /* * */
    // Non-alphabetic chars.
    CHAR_AMPERSAND: 38,
    /* & */
    CHAR_AT: 64,
    /* @ */
    CHAR_BACKWARD_SLASH: 92,
    /* \ */
    CHAR_CARRIAGE_RETURN: 13,
    /* \r */
    CHAR_CIRCUMFLEX_ACCENT: 94,
    /* ^ */
    CHAR_COLON: 58,
    /* : */
    CHAR_COMMA: 44,
    /* , */
    CHAR_DOT: 46,
    /* . */
    CHAR_DOUBLE_QUOTE: 34,
    /* " */
    CHAR_EQUAL: 61,
    /* = */
    CHAR_EXCLAMATION_MARK: 33,
    /* ! */
    CHAR_FORM_FEED: 12,
    /* \f */
    CHAR_FORWARD_SLASH: 47,
    /* / */
    CHAR_GRAVE_ACCENT: 96,
    /* ` */
    CHAR_HASH: 35,
    /* # */
    CHAR_HYPHEN_MINUS: 45,
    /* - */
    CHAR_LEFT_ANGLE_BRACKET: 60,
    /* < */
    CHAR_LEFT_CURLY_BRACE: 123,
    /* { */
    CHAR_LEFT_SQUARE_BRACKET: 91,
    /* [ */
    CHAR_LINE_FEED: 10,
    /* \n */
    CHAR_NO_BREAK_SPACE: 160,
    /* \u00A0 */
    CHAR_PERCENT: 37,
    /* % */
    CHAR_PLUS: 43,
    /* + */
    CHAR_QUESTION_MARK: 63,
    /* ? */
    CHAR_RIGHT_ANGLE_BRACKET: 62,
    /* > */
    CHAR_RIGHT_CURLY_BRACE: 125,
    /* } */
    CHAR_RIGHT_SQUARE_BRACKET: 93,
    /* ] */
    CHAR_SEMICOLON: 59,
    /* ; */
    CHAR_SINGLE_QUOTE: 39,
    /* ' */
    CHAR_SPACE: 32,
    /*   */
    CHAR_TAB: 9,
    /* \t */
    CHAR_UNDERSCORE: 95,
    /* _ */
    CHAR_VERTICAL_LINE: 124,
    /* | */
    CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
    /* \uFEFF */
    SEP: Xt.sep,
    /**
     * Create EXTGLOB_CHARS
     */
    extglobChars(t) {
      return {
        "!": { type: "negate", open: "(?:(?!(?:", close: `))${t.STAR})` },
        "?": { type: "qmark", open: "(?:", close: ")?" },
        "+": { type: "plus", open: "(?:", close: ")+" },
        "*": { type: "star", open: "(?:", close: ")*" },
        "@": { type: "at", open: "(?:", close: ")" }
      };
    },
    /**
     * Create GLOB_CHARS
     */
    globChars(t) {
      return t === !0 ? te : Ht;
    }
  };
});

// ../node_modules/picomatch/lib/utils.js
var ct = J((M) => {
  "use strict";
  var se = ft("path"), re = process.platform === "win32", {
    REGEX_BACKSLASH: ue,
    REGEX_REMOVE_BACKSLASH: ne,
    REGEX_SPECIAL_CHARS: oe,
    REGEX_SPECIAL_CHARS_GLOBAL: ae
  } = et();
  M.isObject = (t) => t !== null && typeof t == "object" && !Array.isArray(t);
  M.hasRegexChars = (t) => oe.test(t);
  M.isRegexChar = (t) => t.length === 1 && M.hasRegexChars(t);
  M.escapeRegex = (t) => t.replace(ae, "\\$1");
  M.toPosixSlashes = (t) => t.replace(ue, "/");
  M.removeBackslashes = (t) => t.replace(ne, (a) => a === "\\" ? "" : a);
  M.supportsLookbehinds = () => {
    let t = process.version.slice(1).split(".").map(Number);
    return t.length === 3 && t[0] >= 9 || t[0] === 8 && t[1] >= 10;
  };
  M.isWindows = (t) => t && typeof t.windows == "boolean" ? t.windows : re === !0 || se.sep === "\\";
  M.escapeLast = (t, a, e) => {
    let E = t.lastIndexOf(a, e);
    return E === -1 ? t : t[E - 1] === "\\" ? M.escapeLast(t, a, E - 1) : `${t.slice(0, E)}\\${t.slice(E)}`;
  };
  M.removePrefix = (t, a = {}) => {
    let e = t;
    return e.startsWith("./") && (e = e.slice(2), a.prefix = "./"), e;
  };
  M.wrapOutput = (t, a = {}, e = {}) => {
    let E = e.contains ? "" : "^", i = e.contains ? "" : "$", g = `${E}(?:${t})${i}`;
    return a.negated === !0 && (g = `(?:^(?!${g}).*$)`), g;
  };
});

// ../node_modules/picomatch/lib/scan.js
var It = J((He, wt) => {
  "use strict";
  var Tt = ct(), {
    CHAR_ASTERISK: _t,
    /* * */
    CHAR_AT: ce,
    /* @ */
    CHAR_BACKWARD_SLASH: st,
    /* \ */
    CHAR_COMMA: ie,
    /* , */
    CHAR_DOT: ht,
    /* . */
    CHAR_EXCLAMATION_MARK: Et,
    /* ! */
    CHAR_FORWARD_SLASH: kt,
    /* / */
    CHAR_LEFT_CURLY_BRACE: xt,
    /* { */
    CHAR_LEFT_PARENTHESES: gt,
    /* ( */
    CHAR_LEFT_SQUARE_BRACKET: le,
    /* [ */
    CHAR_PLUS: pe,
    /* + */
    CHAR_QUESTION_MARK: Ot,
    /* ? */
    CHAR_RIGHT_CURLY_BRACE: fe,
    /* } */
    CHAR_RIGHT_PARENTHESES: vt,
    /* ) */
    CHAR_RIGHT_SQUARE_BRACKET: Ae
    /* ] */
  } = et(), mt = /* @__PURE__ */ _((t) => t === kt || t === st, "isPathSeparator"), Nt = /* @__PURE__ */ _((t) => {
    t.isPrefix !== !0 && (t.depth = t.isGlobstar ? 1 / 0 : 1);
  }, "depth"), Re = /* @__PURE__ */ _((t, a) => {
    let e = a || {}, E = t.length - 1, i = e.parts === !0 || e.scanToEnd === !0, g = [], l = [], x = [], A = t, m = -1, b = 0, v = 0, k = !1, I = !1, C = !1, H = !1, j = !1, q = !1, U = !1, L = !1, X = !1, w = !1, V = 0, B, c, h = { value: "", depth: 0, isGlob: !1 }, N = /* @__PURE__ */ _(() => m >= E, "eos"), u = /* @__PURE__ */ _(() => A.charCodeAt(m + 1), "peek"), y = /* @__PURE__ */ _(() => (B = c, A.charCodeAt(++m)), "advance");
    for (; m < E; ) {
      c = y();
      let G;
      if (c === st) {
        U = h.backslashes = !0, c = y(), c === xt && (q = !0);
        continue;
      }
      if (q === !0 || c === xt) {
        for (V++; N() !== !0 && (c = y()); ) {
          if (c === st) {
            U = h.backslashes = !0, y();
            continue;
          }
          if (c === xt) {
            V++;
            continue;
          }
          if (q !== !0 && c === ht && (c = y()) === ht) {
            if (k = h.isBrace = !0, C = h.isGlob = !0, w = !0, i === !0)
              continue;
            break;
          }
          if (q !== !0 && c === ie) {
            if (k = h.isBrace = !0, C = h.isGlob = !0, w = !0, i === !0)
              continue;
            break;
          }
          if (c === fe && (V--, V === 0)) {
            q = !1, k = h.isBrace = !0, w = !0;
            break;
          }
        }
        if (i === !0)
          continue;
        break;
      }
      if (c === kt) {
        if (g.push(m), l.push(h), h = { value: "", depth: 0, isGlob: !1 }, w === !0) continue;
        if (B === ht && m === b + 1) {
          b += 2;
          continue;
        }
        v = m + 1;
        continue;
      }
      if (e.noext !== !0 && (c === pe || c === ce || c === _t || c === Ot || c === Et) === !0 && u() === gt) {
        if (C = h.isGlob = !0, H = h.isExtglob = !0, w = !0, c === Et && m === b && (X = !0), i === !0) {
          for (; N() !== !0 && (c = y()); ) {
            if (c === st) {
              U = h.backslashes = !0, c = y();
              continue;
            }
            if (c === vt) {
              C = h.isGlob = !0, w = !0;
              break;
            }
          }
          continue;
        }
        break;
      }
      if (c === _t) {
        if (B === _t && (j = h.isGlobstar = !0), C = h.isGlob = !0, w = !0, i === !0)
          continue;
        break;
      }
      if (c === Ot) {
        if (C = h.isGlob = !0, w = !0, i === !0)
          continue;
        break;
      }
      if (c === le) {
        for (; N() !== !0 && (G = y()); ) {
          if (G === st) {
            U = h.backslashes = !0, y();
            continue;
          }
          if (G === Ae) {
            I = h.isBracket = !0, C = h.isGlob = !0, w = !0;
            break;
          }
        }
        if (i === !0)
          continue;
        break;
      }
      if (e.nonegate !== !0 && c === Et && m === b) {
        L = h.negated = !0, b++;
        continue;
      }
      if (e.noparen !== !0 && c === gt) {
        if (C = h.isGlob = !0, i === !0) {
          for (; N() !== !0 && (c = y()); ) {
            if (c === gt) {
              U = h.backslashes = !0, c = y();
              continue;
            }
            if (c === vt) {
              w = !0;
              break;
            }
          }
          continue;
        }
        break;
      }
      if (C === !0) {
        if (w = !0, i === !0)
          continue;
        break;
      }
    }
    e.noext === !0 && (H = !1, C = !1);
    let S = A, Y = "", s = "";
    b > 0 && (Y = A.slice(0, b), A = A.slice(b), v -= b), S && C === !0 && v > 0 ? (S = A.slice(0, v), s = A.slice(v)) : C === !0 ? (S = "", s = A) : S = A, S && S !== "" && S !== "/" && S !== A && mt(S.charCodeAt(S.length - 1)) && (S = S.slice(0, -1)), e.unescape === !0 && (s && (s = Tt.removeBackslashes(s)), S && U === !0 && (S = Tt.removeBackslashes(S)));
    let r = {
      prefix: Y,
      input: t,
      start: b,
      base: S,
      glob: s,
      isBrace: k,
      isBracket: I,
      isGlob: C,
      isExtglob: H,
      isGlobstar: j,
      negated: L,
      negatedExtglob: X
    };
    if (e.tokens === !0 && (r.maxDepth = 0, mt(c) || l.push(h), r.tokens = l), e.parts === !0 || e.tokens === !0) {
      let G;
      for (let R = 0; R < g.length; R++) {
        let F = G ? G + 1 : b, W = g[R], P = t.slice(F, W);
        e.tokens && (R === 0 && b !== 0 ? (l[R].isPrefix = !0, l[R].value = Y) : l[R].value = P, Nt(l[R]), r.maxDepth += l[R].depth), (R !== 0 || P !== "") && x.push(P), G = W;
      }
      if (G && G + 1 < t.length) {
        let R = t.slice(G + 1);
        x.push(R), e.tokens && (l[l.length - 1].value = R, Nt(l[l.length - 1]), r.maxDepth += l[l.length - 1].depth);
      }
      r.slashes = g, r.parts = x;
    }
    return r;
  }, "scan");
  wt.exports = Re;
});

// ../node_modules/picomatch/lib/parse.js
var Dt = J((Te, Gt) => {
  "use strict";
  var it = et(), K = ct(), {
    MAX_LENGTH: lt,
    POSIX_REGEX_SOURCE: _e,
    REGEX_NON_SPECIAL_CHARS: he,
    REGEX_SPECIAL_CHARS_BACKREF: Ee,
    REPLACEMENTS: Bt
  } = it, xe = /* @__PURE__ */ _((t, a) => {
    if (typeof a.expandRange == "function")
      return a.expandRange(...t, a);
    t.sort();
    let e = `[${t.join("-")}]`;
    try {
      new RegExp(e);
    } catch {
      return t.map((i) => K.escapeRegex(i)).join("..");
    }
    return e;
  }, "expandRange"), tt = /* @__PURE__ */ _((t, a) => `Missing ${t}: "${a}" - use "\\\\${a}" to match literal characters`, "syntaxError"), bt = /* @__PURE__ */ _((t, a) => {
    if (typeof t != "string")
      throw new TypeError("Expected a string");
    t = Bt[t] || t;
    let e = { ...a }, E = typeof e.maxLength == "number" ? Math.min(lt, e.maxLength) : lt, i = t.length;
    if (i > E)
      throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${E}`);
    let g = { type: "bos", value: "", output: e.prepend || "" }, l = [g], x = e.capture ? "" : "?:", A = K.isWindows(a), m = it.globChars(A), b = it.extglobChars(m), {
      DOT_LITERAL: v,
      PLUS_LITERAL: k,
      SLASH_LITERAL: I,
      ONE_CHAR: C,
      DOTS_SLASH: H,
      NO_DOT: j,
      NO_DOT_SLASH: q,
      NO_DOTS_SLASH: U,
      QMARK: L,
      QMARK_NO_DOT: X,
      STAR: w,
      START_ANCHOR: V
    } = m, B = /* @__PURE__ */ _((o) => `(${x}(?:(?!${V}${o.dot ? H : v}).)*?)`, "globstar"), c = e.dot ? "" : j, h = e.dot ? L : X, N = e.bash === !0 ? B(e) : w;
    e.capture && (N = `(${N})`), typeof e.noext == "boolean" && (e.noextglob = e.noext);
    let u = {
      input: t,
      index: -1,
      start: 0,
      dot: e.dot === !0,
      consumed: "",
      output: "",
      prefix: "",
      backtrack: !1,
      negated: !1,
      brackets: 0,
      braces: 0,
      parens: 0,
      quotes: 0,
      globstar: !1,
      tokens: l
    };
    t = K.removePrefix(t, u), i = t.length;
    let y = [], S = [], Y = [], s = g, r, G = /* @__PURE__ */ _(() => u.index === i - 1, "eos"), R = u.peek = (o = 1) => t[u.index + o], F = u.advance = () => t[++u.index] || "", W = /* @__PURE__ */ _(() => t.slice(u.index + 1), "remaining"), P = /* @__PURE__ */ _((o = "", $ = 0) => {
      u.consumed += o, u.index += $;
    }, "consume"), rt = /* @__PURE__ */ _((o) => {
      u.output += o.output != null ? o.output : o.value, P(o.value);
    }, "append"), Ut = /* @__PURE__ */ _(() => {
      let o = 1;
      for (; R() === "!" && (R(2) !== "(" || R(3) === "?"); )
        F(), u.start++, o++;
      return o % 2 === 0 ? !1 : (u.negated = !0, u.start++, !0);
    }, "negate"), ut = /* @__PURE__ */ _((o) => {
      u[o]++, Y.push(o);
    }, "increment"), z = /* @__PURE__ */ _((o) => {
      u[o]--, Y.pop();
    }, "decrement"), f = /* @__PURE__ */ _((o) => {
      if (s.type === "globstar") {
        let $ = u.braces > 0 && (o.type === "comma" || o.type === "brace"), n = o.extglob === !0 || y.length && (o.type === "pipe" || o.type === "paren");
        o.type !== "slash" && o.type !== "paren" && !$ && !n && (u.output = u.output.slice(0, -s.output.length), s.type = "star", s.value = "*", s.output = N, u.output += s.output);
      }
      if (y.length && o.type !== "paren" && (y[y.length - 1].inner += o.value), (o.value || o.output) && rt(o), s && s.type === "text" && o.type === "text") {
        s.value += o.value, s.output = (s.output || "") + o.value;
        return;
      }
      o.prev = s, l.push(o), s = o;
    }, "push"), nt = /* @__PURE__ */ _((o, $) => {
      let n = { ...b[$], conditions: 1, inner: "" };
      n.prev = s, n.parens = u.parens, n.output = u.output;
      let p = (e.capture ? "(" : "") + n.open;
      ut("parens"), f({ type: o, value: $, output: u.output ? "" : C }), f({ type: "paren", extglob: !0, value: F(), output: p }), y.push(n);
    }, "extglobOpen"), qt = /* @__PURE__ */ _((o) => {
      let $ = o.close + (e.capture ? ")" : ""), n;
      if (o.type === "negate") {
        let p = N;
        if (o.inner && o.inner.length > 1 && o.inner.includes("/") && (p = B(e)), (p !== N || G() || /^\)+$/.test(W())) && ($ = o.close = `)$))${p}`), o.inner.includes("*") && (n = W()) && /^\.[^\\/.]+$/.test(n)) {
          let d = bt(n, { ...a, fastpaths: !1 }).output;
          $ = o.close = `)${d})${p})`;
        }
        o.prev.type === "bos" && (u.negatedExtglob = !0);
      }
      f({ type: "paren", extglob: !0, value: r, output: $ }), z("parens");
    }, "extglobClose");
    if (e.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(t)) {
      let o = !1, $ = t.replace(Ee, (n, p, d, D, O, pt) => D === "\\" ? (o = !0, n) : D === "?" ? p ? p + D + (O ? L.repeat(O.length) : "") : pt === 0 ? h + (O ? L.repeat(O.length) : "") : L.repeat(d.length) : D === "." ? v.repeat(d.length) : D === "*" ? p ? p + D + (O ? N : "") : N : p ? n : `\\${n}`);
      return o === !0 && (e.unescape === !0 ? $ = $.replace(/\\/g, "") : $ = $.replace(/\\+/g, (n) => n.length % 2 === 0 ? "\\\\" : n ? "\\" : "")), $ === t && e.contains === !0 ? (u.output = t, u) : (u.output = K.wrapOutput($, u, a), u);
    }
    for (; !G(); ) {
      if (r = F(), r === "\0")
        continue;
      if (r === "\\") {
        let n = R();
        if (n === "/" && e.bash !== !0 || n === "." || n === ";")
          continue;
        if (!n) {
          r += "\\", f({ type: "text", value: r });
          continue;
        }
        let p = /^\\+/.exec(W()), d = 0;
        if (p && p[0].length > 2 && (d = p[0].length, u.index += d, d % 2 !== 0 && (r += "\\")), e.unescape === !0 ? r = F() : r += F(), u.brackets === 0) {
          f({ type: "text", value: r });
          continue;
        }
      }
      if (u.brackets > 0 && (r !== "]" || s.value === "[" || s.value === "[^")) {
        if (e.posix !== !1 && r === ":") {
          let n = s.value.slice(1);
          if (n.includes("[") && (s.posix = !0, n.includes(":"))) {
            let p = s.value.lastIndexOf("["), d = s.value.slice(0, p), D = s.value.slice(p + 2), O = _e[D];
            if (O) {
              s.value = d + O, u.backtrack = !0, F(), !g.output && l.indexOf(s) === 1 && (g.output = C);
              continue;
            }
          }
        }
        (r === "[" && R() !== ":" || r === "-" && R() === "]") && (r = `\\${r}`), r === "]" && (s.value === "[" || s.value === "[^") && (r = `\\${r}`), e.posix === !0 && r === "!" && s.value === "[" && (r = "^"), s.value += r, rt({ value: r });
        continue;
      }
      if (u.quotes === 1 && r !== '"') {
        r = K.escapeRegex(r), s.value += r, rt({ value: r });
        continue;
      }
      if (r === '"') {
        u.quotes = u.quotes === 1 ? 0 : 1, e.keepQuotes === !0 && f({ type: "text", value: r });
        continue;
      }
      if (r === "(") {
        ut("parens"), f({ type: "paren", value: r });
        continue;
      }
      if (r === ")") {
        if (u.parens === 0 && e.strictBrackets === !0)
          throw new SyntaxError(tt("opening", "("));
        let n = y[y.length - 1];
        if (n && u.parens === n.parens + 1) {
          qt(y.pop());
          continue;
        }
        f({ type: "paren", value: r, output: u.parens ? ")" : "\\)" }), z("parens");
        continue;
      }
      if (r === "[") {
        if (e.nobracket === !0 || !W().includes("]")) {
          if (e.nobracket !== !0 && e.strictBrackets === !0)
            throw new SyntaxError(tt("closing", "]"));
          r = `\\${r}`;
        } else
          ut("brackets");
        f({ type: "bracket", value: r });
        continue;
      }
      if (r === "]") {
        if (e.nobracket === !0 || s && s.type === "bracket" && s.value.length === 1) {
          f({ type: "text", value: r, output: `\\${r}` });
          continue;
        }
        if (u.brackets === 0) {
          if (e.strictBrackets === !0)
            throw new SyntaxError(tt("opening", "["));
          f({ type: "text", value: r, output: `\\${r}` });
          continue;
        }
        z("brackets");
        let n = s.value.slice(1);
        if (s.posix !== !0 && n[0] === "^" && !n.includes("/") && (r = `/${r}`), s.value += r, rt({ value: r }), e.literalBrackets === !1 || K.hasRegexChars(n))
          continue;
        let p = K.escapeRegex(s.value);
        if (u.output = u.output.slice(0, -s.value.length), e.literalBrackets === !0) {
          u.output += p, s.value = p;
          continue;
        }
        s.value = `(${x}${p}|${s.value})`, u.output += s.value;
        continue;
      }
      if (r === "{" && e.nobrace !== !0) {
        ut("braces");
        let n = {
          type: "brace",
          value: r,
          output: "(",
          outputIndex: u.output.length,
          tokensIndex: u.tokens.length
        };
        S.push(n), f(n);
        continue;
      }
      if (r === "}") {
        let n = S[S.length - 1];
        if (e.nobrace === !0 || !n) {
          f({ type: "text", value: r, output: r });
          continue;
        }
        let p = ")";
        if (n.dots === !0) {
          let d = l.slice(), D = [];
          for (let O = d.length - 1; O >= 0 && (l.pop(), d[O].type !== "brace"); O--)
            d[O].type !== "dots" && D.unshift(d[O].value);
          p = xe(D, e), u.backtrack = !0;
        }
        if (n.comma !== !0 && n.dots !== !0) {
          let d = u.output.slice(0, n.outputIndex), D = u.tokens.slice(n.tokensIndex);
          n.value = n.output = "\\{", r = p = "\\}", u.output = d;
          for (let O of D)
            u.output += O.output || O.value;
        }
        f({ type: "brace", value: r, output: p }), z("braces"), S.pop();
        continue;
      }
      if (r === "|") {
        y.length > 0 && y[y.length - 1].conditions++, f({ type: "text", value: r });
        continue;
      }
      if (r === ",") {
        let n = r, p = S[S.length - 1];
        p && Y[Y.length - 1] === "braces" && (p.comma = !0, n = "|"), f({ type: "comma", value: r, output: n });
        continue;
      }
      if (r === "/") {
        if (s.type === "dot" && u.index === u.start + 1) {
          u.start = u.index + 1, u.consumed = "", u.output = "", l.pop(), s = g;
          continue;
        }
        f({ type: "slash", value: r, output: I });
        continue;
      }
      if (r === ".") {
        if (u.braces > 0 && s.type === "dot") {
          s.value === "." && (s.output = v);
          let n = S[S.length - 1];
          s.type = "dots", s.output += r, s.value += r, n.dots = !0;
          continue;
        }
        if (u.braces + u.parens === 0 && s.type !== "bos" && s.type !== "slash") {
          f({ type: "text", value: r, output: v });
          continue;
        }
        f({ type: "dot", value: r, output: v });
        continue;
      }
      if (r === "?") {
        if (!(s && s.value === "(") && e.noextglob !== !0 && R() === "(" && R(2) !== "?") {
          nt("qmark", r);
          continue;
        }
        if (s && s.type === "paren") {
          let p = R(), d = r;
          if (p === "<" && !K.supportsLookbehinds())
            throw new Error("Node.js v10 or higher is required for regex lookbehinds");
          (s.value === "(" && !/[!=<:]/.test(p) || p === "<" && !/<([!=]|\w+>)/.test(W())) && (d = `\\${r}`), f({ type: "text", value: r, output: d });
          continue;
        }
        if (e.dot !== !0 && (s.type === "slash" || s.type === "bos")) {
          f({ type: "qmark", value: r, output: X });
          continue;
        }
        f({ type: "qmark", value: r, output: L });
        continue;
      }
      if (r === "!") {
        if (e.noextglob !== !0 && R() === "(" && (R(2) !== "?" || !/[!=<:]/.test(R(3)))) {
          nt("negate", r);
          continue;
        }
        if (e.nonegate !== !0 && u.index === 0) {
          Ut();
          continue;
        }
      }
      if (r === "+") {
        if (e.noextglob !== !0 && R() === "(" && R(2) !== "?") {
          nt("plus", r);
          continue;
        }
        if (s && s.value === "(" || e.regex === !1) {
          f({ type: "plus", value: r, output: k });
          continue;
        }
        if (s && (s.type === "bracket" || s.type === "paren" || s.type === "brace") || u.parens > 0) {
          f({ type: "plus", value: r });
          continue;
        }
        f({ type: "plus", value: k });
        continue;
      }
      if (r === "@") {
        if (e.noextglob !== !0 && R() === "(" && R(2) !== "?") {
          f({ type: "at", extglob: !0, value: r, output: "" });
          continue;
        }
        f({ type: "text", value: r });
        continue;
      }
      if (r !== "*") {
        (r === "$" || r === "^") && (r = `\\${r}`);
        let n = he.exec(W());
        n && (r += n[0], u.index += n[0].length), f({ type: "text", value: r });
        continue;
      }
      if (s && (s.type === "globstar" || s.star === !0)) {
        s.type = "star", s.star = !0, s.value += r, s.output = N, u.backtrack = !0, u.globstar = !0, P(r);
        continue;
      }
      let o = W();
      if (e.noextglob !== !0 && /^\([^?]/.test(o)) {
        nt("star", r);
        continue;
      }
      if (s.type === "star") {
        if (e.noglobstar === !0) {
          P(r);
          continue;
        }
        let n = s.prev, p = n.prev, d = n.type === "slash" || n.type === "bos", D = p && (p.type === "star" || p.type === "globstar");
        if (e.bash === !0 && (!d || o[0] && o[0] !== "/")) {
          f({ type: "star", value: r, output: "" });
          continue;
        }
        let O = u.braces > 0 && (n.type === "comma" || n.type === "brace"), pt = y.length && (n.type === "pipe" || n.type === "paren");
        if (!d && n.type !== "paren" && !O && !pt) {
          f({ type: "star", value: r, output: "" });
          continue;
        }
        for (; o.slice(0, 3) === "/**"; ) {
          let ot = t[u.index + 4];
          if (ot && ot !== "/")
            break;
          o = o.slice(3), P("/**", 3);
        }
        if (n.type === "bos" && G()) {
          s.type = "globstar", s.value += r, s.output = B(e), u.output = s.output, u.globstar = !0, P(r);
          continue;
        }
        if (n.type === "slash" && n.prev.type !== "bos" && !D && G()) {
          u.output = u.output.slice(0, -(n.output + s.output).length), n.output = `(?:${n.output}`, s.type = "globstar", s.output = B(e) + (e.strictSlashes ? ")" : "|$)"), s.value += r, u.globstar = !0, u.output += n.output + s.output, P(r);
          continue;
        }
        if (n.type === "slash" && n.prev.type !== "bos" && o[0] === "/") {
          let ot = o[1] !== void 0 ? "|$" : "";
          u.output = u.output.slice(0, -(n.output + s.output).length), n.output = `(?:${n.output}`, s.type = "globstar", s.output = `${B(e)}${I}|${I}${ot})`, s.value += r, u.output += n.output + s.output, u.globstar = !0, P(r + F()), f({ type: "slash", value: "/", output: "" });
          continue;
        }
        if (n.type === "bos" && o[0] === "/") {
          s.type = "globstar", s.value += r, s.output = `(?:^|${I}|${B(e)}${I})`, u.output = s.output, u.globstar = !0, P(r + F()), f({ type: "slash", value: "/", output: "" });
          continue;
        }
        u.output = u.output.slice(0, -s.output.length), s.type = "globstar", s.output = B(e), s.value += r, u.output += s.output, u.globstar = !0, P(r);
        continue;
      }
      let $ = { type: "star", value: r, output: N };
      if (e.bash === !0) {
        $.output = ".*?", (s.type === "bos" || s.type === "slash") && ($.output = c + $.output), f($);
        continue;
      }
      if (s && (s.type === "bracket" || s.type === "paren") && e.regex === !0) {
        $.output = r, f($);
        continue;
      }
      (u.index === u.start || s.type === "slash" || s.type === "dot") && (s.type === "dot" ? (u.output += q, s.output += q) : e.dot === !0 ? (u.output += U, s.output += U) : (u.output += c, s.output += c), R() !== "*" && (u.output += C, s.output += C)), f($);
    }
    for (; u.brackets > 0; ) {
      if (e.strictBrackets === !0) throw new SyntaxError(tt("closing", "]"));
      u.output = K.escapeLast(u.output, "["), z("brackets");
    }
    for (; u.parens > 0; ) {
      if (e.strictBrackets === !0) throw new SyntaxError(tt("closing", ")"));
      u.output = K.escapeLast(u.output, "("), z("parens");
    }
    for (; u.braces > 0; ) {
      if (e.strictBrackets === !0) throw new SyntaxError(tt("closing", "}"));
      u.output = K.escapeLast(u.output, "{"), z("braces");
    }
    if (e.strictSlashes !== !0 && (s.type === "star" || s.type === "bracket") && f({ type: "maybe_slash", value: "", output: `${I}?` }), u.backtrack === !0) {
      u.output = "";
      for (let o of u.tokens)
        u.output += o.output != null ? o.output : o.value, o.suffix && (u.output += o.suffix);
    }
    return u;
  }, "parse");
  bt.fastpaths = (t, a) => {
    let e = { ...a }, E = typeof e.maxLength == "number" ? Math.min(lt, e.maxLength) : lt, i = t.length;
    if (i > E)
      throw new SyntaxError(`Input length: ${i}, exceeds maximum allowed length: ${E}`);
    t = Bt[t] || t;
    let g = K.isWindows(a), {
      DOT_LITERAL: l,
      SLASH_LITERAL: x,
      ONE_CHAR: A,
      DOTS_SLASH: m,
      NO_DOT: b,
      NO_DOTS: v,
      NO_DOTS_SLASH: k,
      STAR: I,
      START_ANCHOR: C
    } = it.globChars(g), H = e.dot ? v : b, j = e.dot ? k : b, q = e.capture ? "" : "?:", U = { negated: !1, prefix: "" }, L = e.bash === !0 ? ".*?" : I;
    e.capture && (L = `(${L})`);
    let X = /* @__PURE__ */ _((c) => c.noglobstar === !0 ? L : `(${q}(?:(?!${C}${c.dot ? m : l}).)*?)`, "globstar"), w = /* @__PURE__ */ _((c) => {
      switch (c) {
        case "*":
          return `${H}${A}${L}`;
        case ".*":
          return `${l}${A}${L}`;
        case "*.*":
          return `${H}${L}${l}${A}${L}`;
        case "*/*":
          return `${H}${L}${x}${A}${j}${L}`;
        case "**":
          return H + X(e);
        case "**/*":
          return `(?:${H}${X(e)}${x})?${j}${A}${L}`;
        case "**/*.*":
          return `(?:${H}${X(e)}${x})?${j}${L}${l}${A}${L}`;
        case "**/.*":
          return `(?:${H}${X(e)}${x})?${l}${A}${L}`;
        default: {
          let h = /^(.*?)\.(\w+)$/.exec(c);
          if (!h) return;
          let N = w(h[1]);
          return N ? N + l + h[2] : void 0;
        }
      }
    }, "create"), V = K.removePrefix(t, U), B = w(V);
    return B && e.strictSlashes !== !0 && (B += `${x}?`), B;
  };
  Gt.exports = bt;
});

// ../node_modules/picomatch/lib/picomatch.js
var Pt = J((ve, Mt) => {
  "use strict";
  var ge = ft("path"), be = It(), Ct = Dt(), St = ct(), Ce = et(), Se = /* @__PURE__ */ _((t) => t && typeof t == "object" && !Array.isArray(t), "isObject"), T = /* @__PURE__ */ _((t, a, e = !1) => {
    if (Array.isArray(t)) {
      let b = t.map((k) => T(k, a, e));
      return /* @__PURE__ */ _((k) => {
        for (let I of b) {
          let C = I(k);
          if (C) return C;
        }
        return !1;
      }, "arrayMatcher");
    }
    let E = Se(t) && t.tokens && t.input;
    if (t === "" || typeof t != "string" && !E)
      throw new TypeError("Expected pattern to be a non-empty string");
    let i = a || {}, g = St.isWindows(a), l = E ? T.compileRe(t, a) : T.makeRe(t, a, !1, !0), x = l.state;
    delete l.state;
    let A = /* @__PURE__ */ _(() => !1, "isIgnored");
    if (i.ignore) {
      let b = { ...a, ignore: null, onMatch: null, onResult: null };
      A = T(i.ignore, b, e);
    }
    let m = /* @__PURE__ */ _((b, v = !1) => {
      let { isMatch: k, match: I, output: C } = T.test(b, l, a, { glob: t, posix: g }), H = { glob: t, state: x, regex: l, posix: g, input: b, output: C, match: I, isMatch: k };
      return typeof i.onResult == "function" && i.onResult(H), k === !1 ? (H.isMatch = !1, v ? H : !1) : A(b) ? (typeof i.onIgnore == "function" && i.onIgnore(H), H.isMatch = !1, v ? H : !1) : (typeof i.onMatch == "function" && i.onMatch(H), v ? H : !0);
    }, "matcher");
    return e && (m.state = x), m;
  }, "picomatch");
  T.test = (t, a, e, { glob: E, posix: i } = {}) => {
    if (typeof t != "string")
      throw new TypeError("Expected input to be a string");
    if (t === "")
      return { isMatch: !1, output: "" };
    let g = e || {}, l = g.format || (i ? St.toPosixSlashes : null), x = t === E, A = x && l ? l(t) : t;
    return x === !1 && (A = l ? l(t) : t, x = A === E), (x === !1 || g.capture === !0) && (g.matchBase === !0 || g.basename === !0 ? x = T.matchBase(t, a, e, i) : x = a.exec(A)), { isMatch: !!x, match: x, output: A };
  };
  T.matchBase = (t, a, e, E = St.isWindows(e)) => (a instanceof RegExp ? a : T.makeRe(a, e)).test(ge.basename(t));
  T.isMatch = (t, a, e) => T(a, e)(t);
  T.parse = (t, a) => Array.isArray(t) ? t.map((e) => T.parse(e, a)) : Ct(t, { ...a, fastpaths: !1 });
  T.scan = (t, a) => be(t, a);
  T.compileRe = (t, a, e = !1, E = !1) => {
    if (e === !0)
      return t.output;
    let i = a || {}, g = i.contains ? "" : "^", l = i.contains ? "" : "$", x = `${g}(?:${t.output})${l}`;
    t && t.negated === !0 && (x = `^(?!${x}).*$`);
    let A = T.toRegex(x, a);
    return E === !0 && (A.state = t), A;
  };
  T.makeRe = (t, a = {}, e = !1, E = !1) => {
    if (!t || typeof t != "string")
      throw new TypeError("Expected a non-empty string");
    let i = { negated: !1, fastpaths: !0 };
    return a.fastpaths !== !1 && (t[0] === "." || t[0] === "*") && (i.output = Ct.fastpaths(t, a)), i.output || (i = Ct(t, a)), T.compileRe(i, a, e, E);
  };
  T.toRegex = (t, a) => {
    try {
      let e = a || {};
      return new RegExp(t, e.flags || (e.nocase ? "i" : ""));
    } catch (e) {
      if (a && a.debug === !0) throw e;
      return /$^/;
    }
  };
  T.constants = Ce;
  Mt.exports = T;
});

// ../node_modules/picomatch/index.js
var $e = J((Ne, Kt) => {
  "use strict";
  Kt.exports = Pt();
});

export {
  ct as a,
  $e as b
};
