import { n as ro, k as lo, l as V, ae as vo, o as f, _ as g, p as j, m as xo, d as Ue, f as T, g as W, af as yo, P as t, h as io, ag as Ao, w as Vo, v as mo, x as to, ah as Fo, z as No, ai as Bo, aj as ho, ak as he, al as Po, am as Ae, an as wo, ao as Ho, ap as Uo, aq as _o, H as Wo, j as He, ar as Ko, K as ao } from "./index-b203ecbb.js";
import { P as Go } from "./index-56e81c67.js";
import { f as qo } from "./style-c902ea32.js";
import * as v from "react";
import { createElement as Jo } from "react";
import { P as Do } from "./Popper-2776137d.js";
import "react-dom";
const Yo = (e) => {
  const o = v.useRef({});
  return v.useEffect(() => {
    o.current = e;
  }), o.current;
}, Xo = Yo;
function Qo(e) {
  return lo("MuiIconButton", e);
}
const Zo = ro("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge"]), et = Zo, ot = ["edge", "children", "className", "color", "disabled", "disableFocusRipple", "size"], tt = (e) => {
  const {
    classes: o,
    disabled: i,
    color: s,
    edge: b,
    size: I
  } = e, m = {
    root: ["root", i && "disabled", s !== "default" && `color${f(s)}`, b && `edge${f(b)}`, `size${f(I)}`]
  };
  return io(m, Qo, o);
}, nt = V(vo, {
  name: "MuiIconButton",
  slot: "Root",
  overridesResolver: (e, o) => {
    const {
      ownerState: i
    } = e;
    return [o.root, i.color !== "default" && o[`color${f(i.color)}`], i.edge && o[`edge${f(i.edge)}`], o[`size${f(i.size)}`]];
  }
})(({
  theme: e,
  ownerState: o
}) => g({
  textAlign: "center",
  flex: "0 0 auto",
  fontSize: e.typography.pxToRem(24),
  padding: 8,
  borderRadius: "50%",
  overflow: "visible",
  // Explicitly set the default value to solve a bug on IE11.
  color: (e.vars || e).palette.action.active,
  transition: e.transitions.create("background-color", {
    duration: e.transitions.duration.shortest
  })
}, !o.disableRipple && {
  "&:hover": {
    backgroundColor: e.vars ? `rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})` : j(e.palette.action.active, e.palette.action.hoverOpacity),
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: "transparent"
    }
  }
}, o.edge === "start" && {
  marginLeft: o.size === "small" ? -3 : -12
}, o.edge === "end" && {
  marginRight: o.size === "small" ? -3 : -12
}), ({
  theme: e,
  ownerState: o
}) => {
  var i;
  const s = (i = (e.vars || e).palette) == null ? void 0 : i[o.color];
  return g({}, o.color === "inherit" && {
    color: "inherit"
  }, o.color !== "inherit" && o.color !== "default" && g({
    color: s == null ? void 0 : s.main
  }, !o.disableRipple && {
    "&:hover": g({}, s && {
      backgroundColor: e.vars ? `rgba(${s.mainChannel} / ${e.vars.palette.action.hoverOpacity})` : j(s.main, e.palette.action.hoverOpacity)
    }, {
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        backgroundColor: "transparent"
      }
    })
  }), o.size === "small" && {
    padding: 5,
    fontSize: e.typography.pxToRem(18)
  }, o.size === "large" && {
    padding: 12,
    fontSize: e.typography.pxToRem(28)
  }, {
    [`&.${et.disabled}`]: {
      backgroundColor: "transparent",
      color: (e.vars || e).palette.action.disabled
    }
  });
}), Eo = /* @__PURE__ */ v.forwardRef(function(o, i) {
  const s = xo({
    props: o,
    name: "MuiIconButton"
  }), {
    edge: b = !1,
    children: I,
    className: m,
    color: d = "default",
    disabled: P = !1,
    disableFocusRipple: $ = !1,
    size: S = "medium"
  } = s, R = Ue(s, ot), z = g({}, s, {
    edge: b,
    color: d,
    disabled: P,
    disableFocusRipple: $,
    size: S
  }), w = tt(z);
  return /* @__PURE__ */ T.jsx(nt, g({
    className: W(w.root, m),
    centerRipple: !0,
    focusRipple: !$,
    disabled: P,
    ref: i
  }, R, {
    ownerState: z,
    children: I
  }));
});
process.env.NODE_ENV !== "production" && (Eo.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * The icon to display.
   */
  children: yo(t.node, (e) => v.Children.toArray(e.children).some((i) => /* @__PURE__ */ v.isValidElement(i) && i.props.onClick) ? new Error(["MUI: You are providing an onClick event listener to a child of a button element.", "Prefer applying it to the IconButton directly.", "This guarantees that the whole <button> will be responsive to click events."].join(`
`)) : null),
  /**
   * Override or extend the styles applied to the component.
   */
  classes: t.object,
  /**
   * @ignore
   */
  className: t.string,
  /**
   * The color of the component.
   * It supports both default and custom theme colors, which can be added as shown in the
   * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
   * @default 'default'
   */
  color: t.oneOfType([t.oneOf(["inherit", "default", "primary", "secondary", "error", "info", "success", "warning"]), t.string]),
  /**
   * If `true`, the component is disabled.
   * @default false
   */
  disabled: t.bool,
  /**
   * If `true`, the  keyboard focus ripple is disabled.
   * @default false
   */
  disableFocusRipple: t.bool,
  /**
   * If `true`, the ripple effect is disabled.
   *
   * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure
   * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.
   * @default false
   */
  disableRipple: t.bool,
  /**
   * If given, uses a negative margin to counteract the padding on one
   * side (this is often helpful for aligning the left or right
   * side of the icon with content above or below, without ruining the border
   * size and shape).
   * @default false
   */
  edge: t.oneOf(["end", "start", !1]),
  /**
   * The size of the component.
   * `small` is equivalent to the dense button styling.
   * @default 'medium'
   */
  size: t.oneOfType([t.oneOf(["small", "medium", "large"]), t.string]),
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
});
const zo = Eo, at = Ao(/* @__PURE__ */ T.jsx("path", {
  d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
}), "Close");
function ko(e) {
  return typeof e.normalize < "u" ? e.normalize("NFD").replace(/[\u0300-\u036f]/g, "") : e;
}
function rt(e = {}) {
  const {
    ignoreAccents: o = !0,
    ignoreCase: i = !0,
    limit: s,
    matchFrom: b = "any",
    stringify: I,
    trim: m = !1
  } = e;
  return (d, {
    inputValue: P,
    getOptionLabel: $
  }) => {
    let S = m ? P.trim() : P;
    i && (S = S.toLowerCase()), o && (S = ko(S));
    const R = S ? d.filter((z) => {
      let w = (I || $)(z);
      return i && (w = w.toLowerCase()), o && (w = ko(w)), b === "start" ? w.indexOf(S) === 0 : w.indexOf(S) > -1;
    }) : d;
    return typeof s == "number" ? R.slice(0, s) : R;
  };
}
function no(e, o) {
  for (let i = 0; i < e.length; i += 1)
    if (o(e[i]))
      return i;
  return -1;
}
const lt = rt(), To = 5, it = (e) => {
  var o;
  return e.current !== null && ((o = e.current.parentElement) == null ? void 0 : o.contains(document.activeElement));
};
function st(e) {
  const {
    // eslint-disable-next-line @typescript-eslint/naming-convention
    unstable_isActiveElementInListbox: o = it,
    // eslint-disable-next-line @typescript-eslint/naming-convention
    unstable_classNamePrefix: i = "Mui",
    autoComplete: s = !1,
    autoHighlight: b = !1,
    autoSelect: I = !1,
    blurOnSelect: m = !1,
    clearOnBlur: d = !e.freeSolo,
    clearOnEscape: P = !1,
    componentName: $ = "useAutocomplete",
    defaultValue: S = e.multiple ? [] : null,
    disableClearable: R = !1,
    disableCloseOnSelect: z = !1,
    disabled: w,
    disabledItemsFocusable: K = !1,
    disableListWrap: ve = !1,
    filterOptions: Ne = lt,
    filterSelectedOptions: ue = !1,
    freeSolo: X = !1,
    getOptionDisabled: Q,
    getOptionKey: we,
    getOptionLabel: ye = (a) => {
      var n;
      return (n = a.label) != null ? n : a;
    },
    groupBy: re,
    handleHomeEndKeys: te = !e.freeSolo,
    id: De,
    includeInputInList: Ee = !1,
    inputValue: xe,
    isOptionEqualToValue: G = (a, n) => a === n,
    multiple: x = !1,
    onChange: le,
    onClose: q,
    onHighlightChange: $e,
    onInputChange: J,
    onOpen: ce,
    open: Ce,
    openOnFocus: A = !1,
    options: de,
    readOnly: fe = !1,
    selectOnFocus: ze = !e.freeSolo,
    value: _e
  } = e, H = Vo(De);
  let M = ye;
  M = (a) => {
    const n = ye(a);
    if (typeof n != "string") {
      if (process.env.NODE_ENV !== "production") {
        const l = n === void 0 ? "undefined" : `${typeof n} (${n})`;
        console.error(`MUI: The \`getOptionLabel\` method of ${$} returned ${l} instead of a string for ${JSON.stringify(a)}.`);
      }
      return String(n);
    }
    return n;
  };
  const Me = v.useRef(!1), We = v.useRef(!0), k = v.useRef(null), U = v.useRef(null), [Ie, so] = v.useState(null), [F, je] = v.useState(-1), Ke = b ? 0 : -1, D = v.useRef(Ke), [c, Co] = mo({
    controlled: _e,
    default: S,
    name: $
  }), [C, ie] = mo({
    controlled: xe,
    default: "",
    name: $,
    state: "inputValue"
  }), [Oe, Ge] = v.useState(!1), ge = v.useCallback((a, n) => {
    if (!(x ? c.length < n.length : n !== null) && !d)
      return;
    let r;
    if (x)
      r = "";
    else if (n == null)
      r = "";
    else {
      const p = M(n);
      r = typeof p == "string" ? p : "";
    }
    C !== r && (ie(r), J && J(a, r, "reset"));
  }, [M, C, x, J, ie, d, c]), [pe, qe] = mo({
    controlled: Ce,
    default: !1,
    name: $,
    state: "open"
  }), [co, Je] = v.useState(!0), Ye = !x && c != null && C === M(c), B = pe && !fe, O = B ? Ne(
    de.filter((a) => !(ue && (x ? c : [c]).some((n) => n !== null && G(a, n)))),
    // we use the empty string to manipulate `filterOptions` to not filter any options
    // i.e. the filter predicate always returns true
    {
      inputValue: Ye && co ? "" : C,
      getOptionLabel: M
    }
  ) : [], Z = Xo({
    filteredOptions: O,
    value: c,
    inputValue: C
  });
  v.useEffect(() => {
    const a = c !== Z.value;
    Oe && !a || X && !a || ge(null, c);
  }, [c, ge, Oe, Z.value, X]);
  const Ve = pe && O.length > 0 && !fe;
  if (process.env.NODE_ENV !== "production" && c !== null && !X && de.length > 0) {
    const a = (x ? c : [c]).filter((n) => !de.some((l) => G(l, n)));
    a.length > 0 && console.warn([`MUI: The value provided to ${$} is invalid.`, `None of the options match with \`${a.length > 1 ? JSON.stringify(a) : JSON.stringify(a[0])}\`.`, "You can use the `isOptionEqualToValue` prop to customize the equality test."].join(`
`));
  }
  const Pe = to((a) => {
    a === -1 ? k.current.focus() : Ie.querySelector(`[data-tag-index="${a}"]`).focus();
  });
  v.useEffect(() => {
    x && F > c.length - 1 && (je(-1), Pe(-1));
  }, [c, x, F, Pe]);
  function ke(a, n) {
    if (!U.current || a < 0 || a >= O.length)
      return -1;
    let l = a;
    for (; ; ) {
      const r = U.current.querySelector(`[data-option-index="${l}"]`), p = K ? !1 : !r || r.disabled || r.getAttribute("aria-disabled") === "true";
      if (r && r.hasAttribute("tabindex") && !p)
        return l;
      if (n === "next" ? l = (l + 1) % O.length : l = (l - 1 + O.length) % O.length, l === a)
        return -1;
    }
  }
  const ne = to(({
    event: a,
    index: n,
    reason: l = "auto"
  }) => {
    if (D.current = n, n === -1 ? k.current.removeAttribute("aria-activedescendant") : k.current.setAttribute("aria-activedescendant", `${H}-option-${n}`), $e && $e(a, n === -1 ? null : O[n], l), !U.current)
      return;
    const r = U.current.querySelector(`[role="option"].${i}-focused`);
    r && (r.classList.remove(`${i}-focused`), r.classList.remove(`${i}-focusVisible`));
    let p = U.current;
    if (U.current.getAttribute("role") !== "listbox" && (p = U.current.parentElement.querySelector('[role="listbox"]')), !p)
      return;
    if (n === -1) {
      p.scrollTop = 0;
      return;
    }
    const h = U.current.querySelector(`[data-option-index="${n}"]`);
    if (h && (h.classList.add(`${i}-focused`), l === "keyboard" && h.classList.add(`${i}-focusVisible`), p.scrollHeight > p.clientHeight && l !== "mouse" && l !== "touch")) {
      const L = h, _ = p.clientHeight + p.scrollTop, oo = L.offsetTop + L.offsetHeight;
      oo > _ ? p.scrollTop = oo - p.clientHeight : L.offsetTop - L.offsetHeight * (re ? 1.3 : 0) < p.scrollTop && (p.scrollTop = L.offsetTop - L.offsetHeight * (re ? 1.3 : 0));
    }
  }), ee = to(({
    event: a,
    diff: n,
    direction: l = "next",
    reason: r = "auto"
  }) => {
    if (!B)
      return;
    const h = ke((() => {
      const L = O.length - 1;
      if (n === "reset")
        return Ke;
      if (n === "start")
        return 0;
      if (n === "end")
        return L;
      const _ = D.current + n;
      return _ < 0 ? _ === -1 && Ee ? -1 : ve && D.current !== -1 || Math.abs(n) > 1 ? 0 : L : _ > L ? _ === L + 1 && Ee ? -1 : ve || Math.abs(n) > 1 ? L : 0 : _;
    })(), l);
    if (ne({
      index: h,
      reason: r,
      event: a
    }), s && n !== "reset")
      if (h === -1)
        k.current.value = C;
      else {
        const L = M(O[h]);
        k.current.value = L, L.toLowerCase().indexOf(C.toLowerCase()) === 0 && C.length > 0 && k.current.setSelectionRange(C.length, L.length);
      }
  }), Te = () => {
    const a = (n, l) => {
      const r = n ? M(n) : "", p = l ? M(l) : "";
      return r === p;
    };
    if (D.current !== -1 && Z.filteredOptions && Z.filteredOptions.length !== O.length && Z.inputValue === C && (x ? c.length === Z.value.length && Z.value.every((n, l) => M(c[l]) === M(n)) : a(Z.value, c))) {
      const n = Z.filteredOptions[D.current];
      if (n)
        return no(O, (l) => M(l) === M(n));
    }
    return -1;
  }, Fe = v.useCallback(() => {
    if (!B)
      return;
    const a = Te();
    if (a !== -1) {
      D.current = a;
      return;
    }
    const n = x ? c[0] : c;
    if (O.length === 0 || n == null) {
      ee({
        diff: "reset"
      });
      return;
    }
    if (U.current) {
      if (n != null) {
        const l = O[D.current];
        if (x && l && no(c, (p) => G(l, p)) !== -1)
          return;
        const r = no(O, (p) => G(p, n));
        r === -1 ? ee({
          diff: "reset"
        }) : ne({
          index: r
        });
        return;
      }
      if (D.current >= O.length - 1) {
        ne({
          index: O.length - 1
        });
        return;
      }
      ne({
        index: D.current
      });
    }
  }, [
    // Only sync the highlighted index when the option switch between empty and not
    O.length,
    // Don't sync the highlighted index with the value when multiple
    // eslint-disable-next-line react-hooks/exhaustive-deps
    x ? !1 : c,
    ue,
    ee,
    ne,
    B,
    C,
    x
  ]), po = to((a) => {
    Fo(U, a), a && Fe();
  });
  process.env.NODE_ENV !== "production" && v.useEffect(() => {
    (!k.current || k.current.nodeName !== "INPUT") && (k.current && k.current.nodeName === "TEXTAREA" ? console.warn([`A textarea element was provided to ${$} where input was expected.`, "This is not a supported scenario but it may work under certain conditions.", "A textarea keyboard navigation may conflict with Autocomplete controls (for example enter and arrow keys).", "Make sure to test keyboard navigation and add custom event handlers if necessary."].join(`
`)) : console.error([`MUI: Unable to find the input element. It was resolved to ${k.current} while an HTMLInputElement was expected.`, `Instead, ${$} expects an input element.`, "", $ === "useAutocomplete" ? "Make sure you have bound getInputProps correctly and that the normal ref/effect resolutions order is guaranteed." : "Make sure you have customized the input component correctly."].join(`
`)));
  }, [$]), v.useEffect(() => {
    Fe();
  }, [Fe]);
  const Y = (a) => {
    pe || (qe(!0), Je(!0), ce && ce(a));
  }, se = (a, n) => {
    pe && (qe(!1), q && q(a, n));
  }, ae = (a, n, l, r) => {
    if (x) {
      if (c.length === n.length && c.every((p, h) => p === n[h]))
        return;
    } else if (c === n)
      return;
    le && le(a, n, l, r), Co(n);
  }, Se = v.useRef(!1), be = (a, n, l = "selectOption", r = "options") => {
    let p = l, h = n;
    if (x) {
      if (h = Array.isArray(c) ? c.slice() : [], process.env.NODE_ENV !== "production") {
        const _ = h.filter((oo) => G(n, oo));
        _.length > 1 && console.error([`MUI: The \`isOptionEqualToValue\` method of ${$} does not handle the arguments correctly.`, `The component expects a single value to match a given option but found ${_.length} matches.`].join(`
`));
      }
      const L = no(h, (_) => G(n, _));
      L === -1 ? h.push(n) : r !== "freeSolo" && (h.splice(L, 1), p = "removeOption");
    }
    ge(a, h), ae(a, h, p, {
      option: n
    }), !z && (!a || !a.ctrlKey && !a.metaKey) && se(a, p), (m === !0 || m === "touch" && Se.current || m === "mouse" && !Se.current) && k.current.blur();
  };
  function Xe(a, n) {
    if (a === -1)
      return -1;
    let l = a;
    for (; ; ) {
      if (n === "next" && l === c.length || n === "previous" && l === -1)
        return -1;
      const r = Ie.querySelector(`[data-tag-index="${l}"]`);
      if (!r || !r.hasAttribute("tabindex") || r.disabled || r.getAttribute("aria-disabled") === "true")
        l += n === "next" ? 1 : -1;
      else
        return l;
    }
  }
  const Qe = (a, n) => {
    if (!x)
      return;
    C === "" && se(a, "toggleInput");
    let l = F;
    F === -1 ? C === "" && n === "previous" && (l = c.length - 1) : (l += n === "next" ? 1 : -1, l < 0 && (l = 0), l === c.length && (l = -1)), l = Xe(l, n), je(l), Pe(l);
  }, Ze = (a) => {
    Me.current = !0, ie(""), J && J(a, "", "clear"), ae(a, x ? [] : null, "clear");
  }, uo = (a) => (n) => {
    if (a.onKeyDown && a.onKeyDown(n), !n.defaultMuiPrevented && (F !== -1 && ["ArrowLeft", "ArrowRight"].indexOf(n.key) === -1 && (je(-1), Pe(-1)), n.which !== 229))
      switch (n.key) {
        case "Home":
          B && te && (n.preventDefault(), ee({
            diff: "start",
            direction: "next",
            reason: "keyboard",
            event: n
          }));
          break;
        case "End":
          B && te && (n.preventDefault(), ee({
            diff: "end",
            direction: "previous",
            reason: "keyboard",
            event: n
          }));
          break;
        case "PageUp":
          n.preventDefault(), ee({
            diff: -To,
            direction: "previous",
            reason: "keyboard",
            event: n
          }), Y(n);
          break;
        case "PageDown":
          n.preventDefault(), ee({
            diff: To,
            direction: "next",
            reason: "keyboard",
            event: n
          }), Y(n);
          break;
        case "ArrowDown":
          n.preventDefault(), ee({
            diff: 1,
            direction: "next",
            reason: "keyboard",
            event: n
          }), Y(n);
          break;
        case "ArrowUp":
          n.preventDefault(), ee({
            diff: -1,
            direction: "previous",
            reason: "keyboard",
            event: n
          }), Y(n);
          break;
        case "ArrowLeft":
          Qe(n, "previous");
          break;
        case "ArrowRight":
          Qe(n, "next");
          break;
        case "Enter":
          if (D.current !== -1 && B) {
            const l = O[D.current], r = Q ? Q(l) : !1;
            if (n.preventDefault(), r)
              return;
            be(n, l, "selectOption"), s && k.current.setSelectionRange(k.current.value.length, k.current.value.length);
          } else
            X && C !== "" && Ye === !1 && (x && n.preventDefault(), be(n, C, "createOption", "freeSolo"));
          break;
        case "Escape":
          B ? (n.preventDefault(), n.stopPropagation(), se(n, "escape")) : P && (C !== "" || x && c.length > 0) && (n.preventDefault(), n.stopPropagation(), Ze(n));
          break;
        case "Backspace":
          if (x && !fe && C === "" && c.length > 0) {
            const l = F === -1 ? c.length - 1 : F, r = c.slice();
            r.splice(l, 1), ae(n, r, "removeOption", {
              option: c[l]
            });
          }
          break;
        case "Delete":
          if (x && !fe && C === "" && c.length > 0 && F !== -1) {
            const l = F, r = c.slice();
            r.splice(l, 1), ae(n, r, "removeOption", {
              option: c[l]
            });
          }
          break;
      }
  }, Io = (a) => {
    Ge(!0), A && !Me.current && Y(a);
  }, Re = (a) => {
    if (o(U)) {
      k.current.focus();
      return;
    }
    Ge(!1), We.current = !0, Me.current = !1, I && D.current !== -1 && B ? be(a, O[D.current], "blur") : I && X && C !== "" ? be(a, C, "blur", "freeSolo") : d && ge(a, c), se(a, "blur");
  }, E = (a) => {
    const n = a.target.value;
    C !== n && (ie(n), Je(!1), J && J(a, n, "input")), n === "" ? !R && !x && ae(a, null, "clear") : Y(a);
  }, N = (a) => {
    const n = Number(a.currentTarget.getAttribute("data-option-index"));
    D.current !== n && ne({
      event: a,
      index: n,
      reason: "mouse"
    });
  }, oe = (a) => {
    ne({
      event: a,
      index: Number(a.currentTarget.getAttribute("data-option-index")),
      reason: "touch"
    }), Se.current = !0;
  }, Oo = (a) => {
    const n = Number(a.currentTarget.getAttribute("data-option-index"));
    be(a, O[n], "selectOption"), Se.current = !1;
  }, fo = (a) => (n) => {
    const l = c.slice();
    l.splice(a, 1), ae(n, l, "removeOption", {
      option: c[a]
    });
  }, go = (a) => {
    pe ? se(a, "toggleInput") : Y(a);
  }, bo = (a) => {
    a.currentTarget.contains(a.target) && a.target.getAttribute("id") !== H && a.preventDefault();
  }, eo = (a) => {
    a.currentTarget.contains(a.target) && (k.current.focus(), ze && We.current && k.current.selectionEnd - k.current.selectionStart === 0 && k.current.select(), We.current = !1);
  }, Be = (a) => {
    !w && (C === "" || !pe) && go(a);
  };
  let me = X && C.length > 0;
  me = me || (x ? c.length > 0 : c !== null);
  let Le = O;
  if (re) {
    const a = /* @__PURE__ */ new Map();
    let n = !1;
    Le = O.reduce((l, r, p) => {
      const h = re(r);
      return l.length > 0 && l[l.length - 1].group === h ? l[l.length - 1].options.push(r) : (process.env.NODE_ENV !== "production" && (a.get(h) && !n && (console.warn(`MUI: The options provided combined with the \`groupBy\` method of ${$} returns duplicated headers.`, "You can solve the issue by sorting the options with the output of `groupBy`."), n = !0), a.set(h, !0)), l.push({
        key: p,
        index: p,
        group: h,
        options: [r]
      })), l;
    }, []);
  }
  return w && Oe && Re(), {
    getRootProps: (a = {}) => g({
      "aria-owns": Ve ? `${H}-listbox` : null
    }, a, {
      onKeyDown: uo(a),
      onMouseDown: bo,
      onClick: eo
    }),
    getInputLabelProps: () => ({
      id: `${H}-label`,
      htmlFor: H
    }),
    getInputProps: () => ({
      id: H,
      value: C,
      onBlur: Re,
      onFocus: Io,
      onChange: E,
      onMouseDown: Be,
      // if open then this is handled imperatively so don't let react override
      // only have an opinion about this when closed
      "aria-activedescendant": B ? "" : null,
      "aria-autocomplete": s ? "both" : "list",
      "aria-controls": Ve ? `${H}-listbox` : void 0,
      "aria-expanded": Ve,
      // Disable browser's suggestion that might overlap with the popup.
      // Handle autocomplete but not autofill.
      autoComplete: "off",
      ref: k,
      autoCapitalize: "none",
      spellCheck: "false",
      role: "combobox",
      disabled: w
    }),
    getClearProps: () => ({
      tabIndex: -1,
      type: "button",
      onClick: Ze
    }),
    getPopupIndicatorProps: () => ({
      tabIndex: -1,
      type: "button",
      onClick: go
    }),
    getTagProps: ({
      index: a
    }) => g({
      key: a,
      "data-tag-index": a,
      tabIndex: -1
    }, !fe && {
      onDelete: fo(a)
    }),
    getListboxProps: () => ({
      role: "listbox",
      id: `${H}-listbox`,
      "aria-labelledby": `${H}-label`,
      ref: po,
      onMouseDown: (a) => {
        a.preventDefault();
      }
    }),
    getOptionProps: ({
      index: a,
      option: n
    }) => {
      var l;
      const r = (x ? c : [c]).some((h) => h != null && G(n, h)), p = Q ? Q(n) : !1;
      return {
        key: (l = we == null ? void 0 : we(n)) != null ? l : M(n),
        tabIndex: -1,
        role: "option",
        id: `${H}-option-${a}`,
        onMouseMove: N,
        onClick: Oo,
        onTouchStart: oe,
        "data-option-index": a,
        "aria-disabled": p,
        "aria-selected": r
      };
    },
    id: H,
    inputValue: C,
    value: c,
    dirty: me,
    expanded: B && Ie,
    popupOpen: B,
    focused: Oe || F !== -1,
    anchorEl: Ie,
    setAnchorEl: so,
    focusedTag: F,
    groupedOptions: Le
  };
}
function ct(e) {
  return lo("MuiListSubheader", e);
}
ro("MuiListSubheader", ["root", "colorPrimary", "colorInherit", "gutters", "inset", "sticky"]);
const pt = ["className", "color", "component", "disableGutters", "disableSticky", "inset"], ut = (e) => {
  const {
    classes: o,
    color: i,
    disableGutters: s,
    inset: b,
    disableSticky: I
  } = e, m = {
    root: ["root", i !== "default" && `color${f(i)}`, !s && "gutters", b && "inset", !I && "sticky"]
  };
  return io(m, ct, o);
}, dt = V("li", {
  name: "MuiListSubheader",
  slot: "Root",
  overridesResolver: (e, o) => {
    const {
      ownerState: i
    } = e;
    return [o.root, i.color !== "default" && o[`color${f(i.color)}`], !i.disableGutters && o.gutters, i.inset && o.inset, !i.disableSticky && o.sticky];
  }
})(({
  theme: e,
  ownerState: o
}) => g({
  boxSizing: "border-box",
  lineHeight: "48px",
  listStyle: "none",
  color: (e.vars || e).palette.text.secondary,
  fontFamily: e.typography.fontFamily,
  fontWeight: e.typography.fontWeightMedium,
  fontSize: e.typography.pxToRem(14)
}, o.color === "primary" && {
  color: (e.vars || e).palette.primary.main
}, o.color === "inherit" && {
  color: "inherit"
}, !o.disableGutters && {
  paddingLeft: 16,
  paddingRight: 16
}, o.inset && {
  paddingLeft: 72
}, !o.disableSticky && {
  position: "sticky",
  top: 0,
  zIndex: 1,
  backgroundColor: (e.vars || e).palette.background.paper
})), $o = /* @__PURE__ */ v.forwardRef(function(o, i) {
  const s = xo({
    props: o,
    name: "MuiListSubheader"
  }), {
    className: b,
    color: I = "default",
    component: m = "li",
    disableGutters: d = !1,
    disableSticky: P = !1,
    inset: $ = !1
  } = s, S = Ue(s, pt), R = g({}, s, {
    color: I,
    component: m,
    disableGutters: d,
    disableSticky: P,
    inset: $
  }), z = ut(R);
  return /* @__PURE__ */ T.jsx(dt, g({
    as: m,
    className: W(z.root, b),
    ref: i,
    ownerState: R
  }, S));
});
$o.muiSkipListHighlight = !0;
process.env.NODE_ENV !== "production" && ($o.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * The content of the component.
   */
  children: t.node,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: t.object,
  /**
   * @ignore
   */
  className: t.string,
  /**
   * The color of the component. It supports those theme colors that make sense for this component.
   * @default 'default'
   */
  color: t.oneOf(["default", "inherit", "primary"]),
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component: t.elementType,
  /**
   * If `true`, the List Subheader will not have gutters.
   * @default false
   */
  disableGutters: t.bool,
  /**
   * If `true`, the List Subheader will not stick to the top during scroll.
   * @default false
   */
  disableSticky: t.bool,
  /**
   * If `true`, the List Subheader is indented.
   * @default false
   */
  inset: t.bool,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object])
});
const ft = $o, gt = Ao(/* @__PURE__ */ T.jsx("path", {
  d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"
}), "Cancel");
function bt(e) {
  return lo("MuiChip", e);
}
const mt = ro("MuiChip", ["root", "sizeSmall", "sizeMedium", "colorError", "colorInfo", "colorPrimary", "colorSecondary", "colorSuccess", "colorWarning", "disabled", "clickable", "clickableColorPrimary", "clickableColorSecondary", "deletable", "deletableColorPrimary", "deletableColorSecondary", "outlined", "filled", "outlinedPrimary", "outlinedSecondary", "filledPrimary", "filledSecondary", "avatar", "avatarSmall", "avatarMedium", "avatarColorPrimary", "avatarColorSecondary", "icon", "iconSmall", "iconMedium", "iconColorPrimary", "iconColorSecondary", "label", "labelSmall", "labelMedium", "deleteIcon", "deleteIconSmall", "deleteIconMedium", "deleteIconColorPrimary", "deleteIconColorSecondary", "deleteIconOutlinedColorPrimary", "deleteIconOutlinedColorSecondary", "deleteIconFilledColorPrimary", "deleteIconFilledColorSecondary", "focusVisible"]), y = mt, ht = ["avatar", "className", "clickable", "color", "component", "deleteIcon", "disabled", "icon", "label", "onClick", "onDelete", "onKeyDown", "onKeyUp", "size", "variant", "tabIndex", "skipFocusWhenDisabled"], vt = (e) => {
  const {
    classes: o,
    disabled: i,
    size: s,
    color: b,
    iconColor: I,
    onDelete: m,
    clickable: d,
    variant: P
  } = e, $ = {
    root: ["root", P, i && "disabled", `size${f(s)}`, `color${f(b)}`, d && "clickable", d && `clickableColor${f(b)}`, m && "deletable", m && `deletableColor${f(b)}`, `${P}${f(b)}`],
    label: ["label", `label${f(s)}`],
    avatar: ["avatar", `avatar${f(s)}`, `avatarColor${f(b)}`],
    icon: ["icon", `icon${f(s)}`, `iconColor${f(I)}`],
    deleteIcon: ["deleteIcon", `deleteIcon${f(s)}`, `deleteIconColor${f(b)}`, `deleteIcon${f(P)}Color${f(b)}`]
  };
  return io($, bt, o);
}, yt = V("div", {
  name: "MuiChip",
  slot: "Root",
  overridesResolver: (e, o) => {
    const {
      ownerState: i
    } = e, {
      color: s,
      iconColor: b,
      clickable: I,
      onDelete: m,
      size: d,
      variant: P
    } = i;
    return [{
      [`& .${y.avatar}`]: o.avatar
    }, {
      [`& .${y.avatar}`]: o[`avatar${f(d)}`]
    }, {
      [`& .${y.avatar}`]: o[`avatarColor${f(s)}`]
    }, {
      [`& .${y.icon}`]: o.icon
    }, {
      [`& .${y.icon}`]: o[`icon${f(d)}`]
    }, {
      [`& .${y.icon}`]: o[`iconColor${f(b)}`]
    }, {
      [`& .${y.deleteIcon}`]: o.deleteIcon
    }, {
      [`& .${y.deleteIcon}`]: o[`deleteIcon${f(d)}`]
    }, {
      [`& .${y.deleteIcon}`]: o[`deleteIconColor${f(s)}`]
    }, {
      [`& .${y.deleteIcon}`]: o[`deleteIcon${f(P)}Color${f(s)}`]
    }, o.root, o[`size${f(d)}`], o[`color${f(s)}`], I && o.clickable, I && s !== "default" && o[`clickableColor${f(s)})`], m && o.deletable, m && s !== "default" && o[`deletableColor${f(s)}`], o[P], o[`${P}${f(s)}`]];
  }
})(({
  theme: e,
  ownerState: o
}) => {
  const i = e.palette.mode === "light" ? e.palette.grey[700] : e.palette.grey[300];
  return g({
    maxWidth: "100%",
    fontFamily: e.typography.fontFamily,
    fontSize: e.typography.pxToRem(13),
    display: "inline-flex",
    alignItems: "center",
    justifyContent: "center",
    height: 32,
    color: (e.vars || e).palette.text.primary,
    backgroundColor: (e.vars || e).palette.action.selected,
    borderRadius: 32 / 2,
    whiteSpace: "nowrap",
    transition: e.transitions.create(["background-color", "box-shadow"]),
    // reset cursor explicitly in case ButtonBase is used
    cursor: "unset",
    // We disable the focus ring for mouse, touch and keyboard users.
    outline: 0,
    textDecoration: "none",
    border: 0,
    // Remove `button` border
    padding: 0,
    // Remove `button` padding
    verticalAlign: "middle",
    boxSizing: "border-box",
    [`&.${y.disabled}`]: {
      opacity: (e.vars || e).palette.action.disabledOpacity,
      pointerEvents: "none"
    },
    [`& .${y.avatar}`]: {
      marginLeft: 5,
      marginRight: -6,
      width: 24,
      height: 24,
      color: e.vars ? e.vars.palette.Chip.defaultAvatarColor : i,
      fontSize: e.typography.pxToRem(12)
    },
    [`& .${y.avatarColorPrimary}`]: {
      color: (e.vars || e).palette.primary.contrastText,
      backgroundColor: (e.vars || e).palette.primary.dark
    },
    [`& .${y.avatarColorSecondary}`]: {
      color: (e.vars || e).palette.secondary.contrastText,
      backgroundColor: (e.vars || e).palette.secondary.dark
    },
    [`& .${y.avatarSmall}`]: {
      marginLeft: 4,
      marginRight: -4,
      width: 18,
      height: 18,
      fontSize: e.typography.pxToRem(10)
    },
    [`& .${y.icon}`]: g({
      marginLeft: 5,
      marginRight: -6
    }, o.size === "small" && {
      fontSize: 18,
      marginLeft: 4,
      marginRight: -4
    }, o.iconColor === o.color && g({
      color: e.vars ? e.vars.palette.Chip.defaultIconColor : i
    }, o.color !== "default" && {
      color: "inherit"
    })),
    [`& .${y.deleteIcon}`]: g({
      WebkitTapHighlightColor: "transparent",
      color: e.vars ? `rgba(${e.vars.palette.text.primaryChannel} / 0.26)` : j(e.palette.text.primary, 0.26),
      fontSize: 22,
      cursor: "pointer",
      margin: "0 5px 0 -6px",
      "&:hover": {
        color: e.vars ? `rgba(${e.vars.palette.text.primaryChannel} / 0.4)` : j(e.palette.text.primary, 0.4)
      }
    }, o.size === "small" && {
      fontSize: 16,
      marginRight: 4,
      marginLeft: -4
    }, o.color !== "default" && {
      color: e.vars ? `rgba(${e.vars.palette[o.color].contrastTextChannel} / 0.7)` : j(e.palette[o.color].contrastText, 0.7),
      "&:hover, &:active": {
        color: (e.vars || e).palette[o.color].contrastText
      }
    })
  }, o.size === "small" && {
    height: 24
  }, o.color !== "default" && {
    backgroundColor: (e.vars || e).palette[o.color].main,
    color: (e.vars || e).palette[o.color].contrastText
  }, o.onDelete && {
    [`&.${y.focusVisible}`]: {
      backgroundColor: e.vars ? `rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : j(e.palette.action.selected, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
    }
  }, o.onDelete && o.color !== "default" && {
    [`&.${y.focusVisible}`]: {
      backgroundColor: (e.vars || e).palette[o.color].dark
    }
  });
}, ({
  theme: e,
  ownerState: o
}) => g({}, o.clickable && {
  userSelect: "none",
  WebkitTapHighlightColor: "transparent",
  cursor: "pointer",
  "&:hover": {
    backgroundColor: e.vars ? `rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : j(e.palette.action.selected, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity)
  },
  [`&.${y.focusVisible}`]: {
    backgroundColor: e.vars ? `rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : j(e.palette.action.selected, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
  },
  "&:active": {
    boxShadow: (e.vars || e).shadows[1]
  }
}, o.clickable && o.color !== "default" && {
  [`&:hover, &.${y.focusVisible}`]: {
    backgroundColor: (e.vars || e).palette[o.color].dark
  }
}), ({
  theme: e,
  ownerState: o
}) => g({}, o.variant === "outlined" && {
  backgroundColor: "transparent",
  border: e.vars ? `1px solid ${e.vars.palette.Chip.defaultBorder}` : `1px solid ${e.palette.mode === "light" ? e.palette.grey[400] : e.palette.grey[700]}`,
  [`&.${y.clickable}:hover`]: {
    backgroundColor: (e.vars || e).palette.action.hover
  },
  [`&.${y.focusVisible}`]: {
    backgroundColor: (e.vars || e).palette.action.focus
  },
  [`& .${y.avatar}`]: {
    marginLeft: 4
  },
  [`& .${y.avatarSmall}`]: {
    marginLeft: 2
  },
  [`& .${y.icon}`]: {
    marginLeft: 4
  },
  [`& .${y.iconSmall}`]: {
    marginLeft: 2
  },
  [`& .${y.deleteIcon}`]: {
    marginRight: 5
  },
  [`& .${y.deleteIconSmall}`]: {
    marginRight: 3
  }
}, o.variant === "outlined" && o.color !== "default" && {
  color: (e.vars || e).palette[o.color].main,
  border: `1px solid ${e.vars ? `rgba(${e.vars.palette[o.color].mainChannel} / 0.7)` : j(e.palette[o.color].main, 0.7)}`,
  [`&.${y.clickable}:hover`]: {
    backgroundColor: e.vars ? `rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})` : j(e.palette[o.color].main, e.palette.action.hoverOpacity)
  },
  [`&.${y.focusVisible}`]: {
    backgroundColor: e.vars ? `rgba(${e.vars.palette[o.color].mainChannel} / ${e.vars.palette.action.focusOpacity})` : j(e.palette[o.color].main, e.palette.action.focusOpacity)
  },
  [`& .${y.deleteIcon}`]: {
    color: e.vars ? `rgba(${e.vars.palette[o.color].mainChannel} / 0.7)` : j(e.palette[o.color].main, 0.7),
    "&:hover, &:active": {
      color: (e.vars || e).palette[o.color].main
    }
  }
})), xt = V("span", {
  name: "MuiChip",
  slot: "Label",
  overridesResolver: (e, o) => {
    const {
      ownerState: i
    } = e, {
      size: s
    } = i;
    return [o.label, o[`label${f(s)}`]];
  }
})(({
  ownerState: e
}) => g({
  overflow: "hidden",
  textOverflow: "ellipsis",
  paddingLeft: 12,
  paddingRight: 12,
  whiteSpace: "nowrap"
}, e.variant === "outlined" && {
  paddingLeft: 11,
  paddingRight: 11
}, e.size === "small" && {
  paddingLeft: 8,
  paddingRight: 8
}, e.size === "small" && e.variant === "outlined" && {
  paddingLeft: 7,
  paddingRight: 7
}));
function So(e) {
  return e.key === "Backspace" || e.key === "Delete";
}
const Mo = /* @__PURE__ */ v.forwardRef(function(o, i) {
  const s = xo({
    props: o,
    name: "MuiChip"
  }), {
    avatar: b,
    className: I,
    clickable: m,
    color: d = "default",
    component: P,
    deleteIcon: $,
    disabled: S = !1,
    icon: R,
    label: z,
    onClick: w,
    onDelete: K,
    onKeyDown: ve,
    onKeyUp: Ne,
    size: ue = "medium",
    variant: X = "filled",
    tabIndex: Q,
    skipFocusWhenDisabled: we = !1
    // TODO v6: Rename to `focusableWhenDisabled`.
  } = s, ye = Ue(s, ht), re = v.useRef(null), te = No(re, i), De = (A) => {
    A.stopPropagation(), K && K(A);
  }, Ee = (A) => {
    A.currentTarget === A.target && So(A) && A.preventDefault(), ve && ve(A);
  }, xe = (A) => {
    A.currentTarget === A.target && (K && So(A) ? K(A) : A.key === "Escape" && re.current && re.current.blur()), Ne && Ne(A);
  }, G = m !== !1 && w ? !0 : m, x = G || K ? vo : P || "div", le = g({}, s, {
    component: x,
    disabled: S,
    size: ue,
    color: d,
    iconColor: /* @__PURE__ */ v.isValidElement(R) && R.props.color || d,
    onDelete: !!K,
    clickable: G,
    variant: X
  }), q = vt(le), $e = x === vo ? g({
    component: P || "div",
    focusVisibleClassName: q.focusVisible
  }, K && {
    disableRipple: !0
  }) : {};
  let J = null;
  K && (J = $ && /* @__PURE__ */ v.isValidElement($) ? /* @__PURE__ */ v.cloneElement($, {
    className: W($.props.className, q.deleteIcon),
    onClick: De
  }) : /* @__PURE__ */ T.jsx(gt, {
    className: W(q.deleteIcon),
    onClick: De
  }));
  let ce = null;
  b && /* @__PURE__ */ v.isValidElement(b) && (ce = /* @__PURE__ */ v.cloneElement(b, {
    className: W(q.avatar, b.props.className)
  }));
  let Ce = null;
  return R && /* @__PURE__ */ v.isValidElement(R) && (Ce = /* @__PURE__ */ v.cloneElement(R, {
    className: W(q.icon, R.props.className)
  })), process.env.NODE_ENV !== "production" && ce && Ce && console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one."), /* @__PURE__ */ T.jsxs(yt, g({
    as: x,
    className: W(q.root, I),
    disabled: G && S ? !0 : void 0,
    onClick: w,
    onKeyDown: Ee,
    onKeyUp: xe,
    ref: te,
    tabIndex: we && S ? -1 : Q,
    ownerState: le
  }, $e, ye, {
    children: [ce || Ce, /* @__PURE__ */ T.jsx(xt, {
      className: W(q.label),
      ownerState: le,
      children: z
    }), J]
  }));
});
process.env.NODE_ENV !== "production" && (Mo.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * The Avatar element to display.
   */
  avatar: t.element,
  /**
   * This prop isn't supported.
   * Use the `component` prop if you need to change the children structure.
   */
  children: Bo,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: t.object,
  /**
   * @ignore
   */
  className: t.string,
  /**
   * If `true`, the chip will appear clickable, and will raise when pressed,
   * even if the onClick prop is not defined.
   * If `false`, the chip will not appear clickable, even if onClick prop is defined.
   * This can be used, for example,
   * along with the component prop to indicate an anchor Chip is clickable.
   * Note: this controls the UI and does not affect the onClick event.
   */
  clickable: t.bool,
  /**
   * The color of the component.
   * It supports both default and custom theme colors, which can be added as shown in the
   * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
   * @default 'default'
   */
  color: t.oneOfType([t.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), t.string]),
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component: t.elementType,
  /**
   * Override the default delete icon element. Shown only if `onDelete` is set.
   */
  deleteIcon: t.element,
  /**
   * If `true`, the component is disabled.
   * @default false
   */
  disabled: t.bool,
  /**
   * Icon element.
   */
  icon: t.element,
  /**
   * The content of the component.
   */
  label: t.node,
  /**
   * @ignore
   */
  onClick: t.func,
  /**
   * Callback fired when the delete icon is clicked.
   * If set, the delete icon will be shown.
   */
  onDelete: t.func,
  /**
   * @ignore
   */
  onKeyDown: t.func,
  /**
   * @ignore
   */
  onKeyUp: t.func,
  /**
   * The size of the component.
   * @default 'medium'
   */
  size: t.oneOfType([t.oneOf(["medium", "small"]), t.string]),
  /**
   * If `true`, allows the disabled chip to escape focus.
   * If `false`, allows the disabled chip to receive focus.
   * @default false
   */
  skipFocusWhenDisabled: t.bool,
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
  /**
   * @ignore
   */
  tabIndex: t.number,
  /**
   * The variant to use.
   * @default 'filled'
   */
  variant: t.oneOfType([t.oneOf(["filled", "outlined"]), t.string])
});
const $t = Mo;
function Ct(e) {
  return lo("MuiAutocomplete", e);
}
const It = ro("MuiAutocomplete", ["root", "expanded", "fullWidth", "focused", "focusVisible", "tag", "tagSizeSmall", "tagSizeMedium", "hasPopupIcon", "hasClearIcon", "inputRoot", "input", "inputFocused", "endAdornment", "clearIndicator", "popupIndicator", "popupIndicatorOpen", "popper", "popperDisablePortal", "paper", "listbox", "loading", "noOptions", "option", "groupLabel", "groupUl"]), u = It;
var Ro, Lo;
const Ot = ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionKey", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "slotProps", "value"], Pt = ["ref"], kt = _o(), Tt = (e) => {
  const {
    classes: o,
    disablePortal: i,
    expanded: s,
    focused: b,
    fullWidth: I,
    hasClearIcon: m,
    hasPopupIcon: d,
    inputFocused: P,
    popupOpen: $,
    size: S
  } = e, R = {
    root: ["root", s && "expanded", b && "focused", I && "fullWidth", m && "hasClearIcon", d && "hasPopupIcon"],
    inputRoot: ["inputRoot"],
    input: ["input", P && "inputFocused"],
    tag: ["tag", `tagSize${f(S)}`],
    endAdornment: ["endAdornment"],
    clearIndicator: ["clearIndicator"],
    popupIndicator: ["popupIndicator", $ && "popupIndicatorOpen"],
    popper: ["popper", i && "popperDisablePortal"],
    paper: ["paper"],
    listbox: ["listbox"],
    loading: ["loading"],
    noOptions: ["noOptions"],
    option: ["option"],
    groupLabel: ["groupLabel"],
    groupUl: ["groupUl"]
  };
  return io(R, Ct, o);
}, St = V("div", {
  name: "MuiAutocomplete",
  slot: "Root",
  overridesResolver: (e, o) => {
    const {
      ownerState: i
    } = e, {
      fullWidth: s,
      hasClearIcon: b,
      hasPopupIcon: I,
      inputFocused: m,
      size: d
    } = i;
    return [{
      [`& .${u.tag}`]: o.tag
    }, {
      [`& .${u.tag}`]: o[`tagSize${f(d)}`]
    }, {
      [`& .${u.inputRoot}`]: o.inputRoot
    }, {
      [`& .${u.input}`]: o.input
    }, {
      [`& .${u.input}`]: m && o.inputFocused
    }, o.root, s && o.fullWidth, I && o.hasPopupIcon, b && o.hasClearIcon];
  }
})({
  [`&.${u.focused} .${u.clearIndicator}`]: {
    visibility: "visible"
  },
  /* Avoid double tap issue on iOS */
  "@media (pointer: fine)": {
    [`&:hover .${u.clearIndicator}`]: {
      visibility: "visible"
    }
  },
  [`& .${u.tag}`]: {
    margin: 3,
    maxWidth: "calc(100% - 6px)"
  },
  [`& .${u.inputRoot}`]: {
    flexWrap: "wrap",
    [`.${u.hasPopupIcon}&, .${u.hasClearIcon}&`]: {
      paddingRight: 26 + 4
    },
    [`.${u.hasPopupIcon}.${u.hasClearIcon}&`]: {
      paddingRight: 52 + 4
    },
    [`& .${u.input}`]: {
      width: 0,
      minWidth: 30
    }
  },
  [`& .${ho.root}`]: {
    paddingBottom: 1,
    "& .MuiInput-input": {
      padding: "4px 4px 4px 0px"
    }
  },
  [`& .${ho.root}.${he.sizeSmall}`]: {
    [`& .${ho.input}`]: {
      padding: "2px 4px 3px 0"
    }
  },
  [`& .${Po.root}`]: {
    padding: 9,
    [`.${u.hasPopupIcon}&, .${u.hasClearIcon}&`]: {
      paddingRight: 26 + 4 + 9
    },
    [`.${u.hasPopupIcon}.${u.hasClearIcon}&`]: {
      paddingRight: 52 + 4 + 9
    },
    [`& .${u.input}`]: {
      padding: "7.5px 4px 7.5px 5px"
    },
    [`& .${u.endAdornment}`]: {
      right: 9
    }
  },
  [`& .${Po.root}.${he.sizeSmall}`]: {
    // Don't specify paddingRight, as it overrides the default value set when there is only
    // one of the popup or clear icon as the specificity is equal so the latter one wins
    paddingTop: 6,
    paddingBottom: 6,
    paddingLeft: 6,
    [`& .${u.input}`]: {
      padding: "2.5px 4px 2.5px 8px"
    }
  },
  [`& .${Ae.root}`]: {
    paddingTop: 19,
    paddingLeft: 8,
    [`.${u.hasPopupIcon}&, .${u.hasClearIcon}&`]: {
      paddingRight: 26 + 4 + 9
    },
    [`.${u.hasPopupIcon}.${u.hasClearIcon}&`]: {
      paddingRight: 52 + 4 + 9
    },
    [`& .${Ae.input}`]: {
      padding: "7px 4px"
    },
    [`& .${u.endAdornment}`]: {
      right: 9
    }
  },
  [`& .${Ae.root}.${he.sizeSmall}`]: {
    paddingBottom: 1,
    [`& .${Ae.input}`]: {
      padding: "2.5px 4px"
    }
  },
  [`& .${he.hiddenLabel}`]: {
    paddingTop: 8
  },
  [`& .${Ae.root}.${he.hiddenLabel}`]: {
    paddingTop: 0,
    paddingBottom: 0,
    [`& .${u.input}`]: {
      paddingTop: 16,
      paddingBottom: 17
    }
  },
  [`& .${Ae.root}.${he.hiddenLabel}.${he.sizeSmall}`]: {
    [`& .${u.input}`]: {
      paddingTop: 8,
      paddingBottom: 9
    }
  },
  [`& .${u.input}`]: {
    flexGrow: 1,
    textOverflow: "ellipsis",
    opacity: 0
  },
  variants: [{
    props: {
      fullWidth: !0
    },
    style: {
      width: "100%"
    }
  }, {
    props: {
      size: "small"
    },
    style: {
      [`& .${u.tag}`]: {
        margin: 2,
        maxWidth: "calc(100% - 4px)"
      }
    }
  }, {
    props: {
      inputFocused: !0
    },
    style: {
      [`& .${u.input}`]: {
        opacity: 1
      }
    }
  }]
}), Rt = V("div", {
  name: "MuiAutocomplete",
  slot: "EndAdornment",
  overridesResolver: (e, o) => o.endAdornment
})({
  // We use a position absolute to support wrapping tags.
  position: "absolute",
  right: 0,
  top: "50%",
  transform: "translate(0, -50%)"
}), Lt = V(zo, {
  name: "MuiAutocomplete",
  slot: "ClearIndicator",
  overridesResolver: (e, o) => o.clearIndicator
})({
  marginRight: -2,
  padding: 4,
  visibility: "hidden"
}), At = V(zo, {
  name: "MuiAutocomplete",
  slot: "PopupIndicator",
  overridesResolver: ({
    ownerState: e
  }, o) => g({}, o.popupIndicator, e.popupOpen && o.popupIndicatorOpen)
})({
  padding: 2,
  marginRight: -2,
  variants: [{
    props: {
      popupOpen: !0
    },
    style: {
      transform: "rotate(180deg)"
    }
  }]
}), Nt = V(Do, {
  name: "MuiAutocomplete",
  slot: "Popper",
  overridesResolver: (e, o) => {
    const {
      ownerState: i
    } = e;
    return [{
      [`& .${u.option}`]: o.option
    }, o.popper, i.disablePortal && o.popperDisablePortal];
  }
})(({
  theme: e
}) => ({
  zIndex: (e.vars || e).zIndex.modal,
  variants: [{
    props: {
      disablePortal: !0
    },
    style: {
      position: "absolute"
    }
  }]
})), wt = V(wo, {
  name: "MuiAutocomplete",
  slot: "Paper",
  overridesResolver: (e, o) => o.paper
})(({
  theme: e
}) => g({}, e.typography.body1, {
  overflow: "auto"
})), Dt = V("div", {
  name: "MuiAutocomplete",
  slot: "Loading",
  overridesResolver: (e, o) => o.loading
})(({
  theme: e
}) => ({
  color: (e.vars || e).palette.text.secondary,
  padding: "14px 16px"
})), Et = V("div", {
  name: "MuiAutocomplete",
  slot: "NoOptions",
  overridesResolver: (e, o) => o.noOptions
})(({
  theme: e
}) => ({
  color: (e.vars || e).palette.text.secondary,
  padding: "14px 16px"
})), zt = V("div", {
  name: "MuiAutocomplete",
  slot: "Listbox",
  overridesResolver: (e, o) => o.listbox
})(({
  theme: e
}) => ({
  listStyle: "none",
  margin: 0,
  padding: "8px 0",
  maxHeight: "40vh",
  overflow: "auto",
  position: "relative",
  [`& .${u.option}`]: {
    minHeight: 48,
    display: "flex",
    overflow: "hidden",
    justifyContent: "flex-start",
    alignItems: "center",
    cursor: "pointer",
    paddingTop: 6,
    boxSizing: "border-box",
    outline: "0",
    WebkitTapHighlightColor: "transparent",
    paddingBottom: 6,
    paddingLeft: 16,
    paddingRight: 16,
    [e.breakpoints.up("sm")]: {
      minHeight: "auto"
    },
    [`&.${u.focused}`]: {
      backgroundColor: (e.vars || e).palette.action.hover,
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        backgroundColor: "transparent"
      }
    },
    '&[aria-disabled="true"]': {
      opacity: (e.vars || e).palette.action.disabledOpacity,
      pointerEvents: "none"
    },
    [`&.${u.focusVisible}`]: {
      backgroundColor: (e.vars || e).palette.action.focus
    },
    '&[aria-selected="true"]': {
      backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})` : j(e.palette.primary.main, e.palette.action.selectedOpacity),
      [`&.${u.focused}`]: {
        backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))` : j(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.hoverOpacity),
        // Reset on touch devices, it doesn't add specificity
        "@media (hover: none)": {
          backgroundColor: (e.vars || e).palette.action.selected
        }
      },
      [`&.${u.focusVisible}`]: {
        backgroundColor: e.vars ? `rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))` : j(e.palette.primary.main, e.palette.action.selectedOpacity + e.palette.action.focusOpacity)
      }
    }
  }
})), Mt = V(ft, {
  name: "MuiAutocomplete",
  slot: "GroupLabel",
  overridesResolver: (e, o) => o.groupLabel
})(({
  theme: e
}) => ({
  backgroundColor: (e.vars || e).palette.background.paper,
  top: -8
})), jt = V("ul", {
  name: "MuiAutocomplete",
  slot: "GroupUl",
  overridesResolver: (e, o) => o.groupUl
})({
  padding: 0,
  [`& .${u.option}`]: {
    paddingLeft: 24
  }
}), jo = /* @__PURE__ */ v.forwardRef(function(o, i) {
  var s, b, I, m;
  const d = kt({
    props: o,
    name: "MuiAutocomplete"
  }), {
    autoComplete: P = !1,
    autoHighlight: $ = !1,
    autoSelect: S = !1,
    blurOnSelect: R = !1,
    ChipProps: z,
    className: w,
    clearIcon: K = Ro || (Ro = /* @__PURE__ */ T.jsx(at, {
      fontSize: "small"
    })),
    clearOnBlur: ve = !d.freeSolo,
    clearOnEscape: Ne = !1,
    clearText: ue = "Clear",
    closeText: X = "Close",
    componentsProps: Q = {},
    defaultValue: we = d.multiple ? [] : null,
    disableClearable: ye = !1,
    disableCloseOnSelect: re = !1,
    disabled: te = !1,
    disabledItemsFocusable: De = !1,
    disableListWrap: Ee = !1,
    disablePortal: xe = !1,
    filterSelectedOptions: G = !1,
    forcePopupIcon: x = "auto",
    freeSolo: le = !1,
    fullWidth: q = !1,
    getLimitTagsText: $e = (r) => `+${r}`,
    getOptionLabel: J,
    groupBy: ce,
    handleHomeEndKeys: Ce = !d.freeSolo,
    includeInputInList: A = !1,
    limitTags: de = -1,
    ListboxComponent: fe = "ul",
    ListboxProps: ze,
    loading: _e = !1,
    loadingText: H = "Loading…",
    multiple: M = !1,
    noOptionsText: Me = "No options",
    openOnFocus: We = !1,
    openText: k = "Open",
    PaperComponent: U = wo,
    PopperComponent: Ie = Do,
    popupIcon: so = Lo || (Lo = /* @__PURE__ */ T.jsx(Ho, {})),
    readOnly: F = !1,
    renderGroup: je,
    renderInput: Ke,
    renderOption: D,
    renderTags: c,
    selectOnFocus: Co = !d.freeSolo,
    size: C = "medium",
    slotProps: ie = {}
  } = d, Oe = Ue(d, Ot), {
    getRootProps: Ge,
    getInputProps: ge,
    getInputLabelProps: pe,
    getPopupIndicatorProps: qe,
    getClearProps: co,
    getTagProps: Je,
    getListboxProps: Ye,
    getOptionProps: B,
    value: O,
    dirty: Z,
    expanded: Ve,
    id: Pe,
    popupOpen: ke,
    focused: ne,
    focusedTag: ee,
    anchorEl: Te,
    setAnchorEl: Fe,
    inputValue: po,
    groupedOptions: Y
  } = st(g({}, d, {
    componentName: "Autocomplete"
  })), se = !ye && !te && Z && !F, ae = (!le || x === !0) && x !== !1, {
    onMouseDown: Se
  } = ge(), {
    ref: be
  } = ze ?? {}, Xe = Ye(), {
    ref: Qe
  } = Xe, Ze = Ue(Xe, Pt), uo = No(Qe, be), Re = J || ((r) => {
    var p;
    return (p = r.label) != null ? p : r;
  }), E = g({}, d, {
    disablePortal: xe,
    expanded: Ve,
    focused: ne,
    fullWidth: q,
    getOptionLabel: Re,
    hasClearIcon: se,
    hasPopupIcon: ae,
    inputFocused: ee === -1,
    popupOpen: ke,
    size: C
  }), N = Tt(E);
  let oe;
  if (M && O.length > 0) {
    const r = (p) => g({
      className: N.tag,
      disabled: te
    }, Je(p));
    c ? oe = c(O, r, E) : oe = O.map((p, h) => /* @__PURE__ */ T.jsx($t, g({
      label: Re(p),
      size: C
    }, r({
      index: h
    }), z)));
  }
  if (de > -1 && Array.isArray(oe)) {
    const r = oe.length - de;
    !ne && r > 0 && (oe = oe.splice(0, de), oe.push(/* @__PURE__ */ T.jsx("span", {
      className: N.tag,
      children: $e(r)
    }, oe.length)));
  }
  const fo = je || ((r) => /* @__PURE__ */ T.jsxs("li", {
    children: [/* @__PURE__ */ T.jsx(Mt, {
      className: N.groupLabel,
      ownerState: E,
      component: "div",
      children: r.group
    }), /* @__PURE__ */ T.jsx(jt, {
      className: N.groupUl,
      ownerState: E,
      children: r.children
    })]
  }, r.key)), bo = D || ((r, p) => /* @__PURE__ */ Jo("li", g({}, r, {
    key: r.key
  }), Re(p))), eo = (r, p) => {
    const h = B({
      option: r,
      index: p
    });
    return bo(g({}, h, {
      className: N.option
    }), r, {
      selected: h["aria-selected"],
      index: p,
      inputValue: po
    }, E);
  }, Be = (s = ie.clearIndicator) != null ? s : Q.clearIndicator, me = (b = ie.paper) != null ? b : Q.paper, Le = (I = ie.popper) != null ? I : Q.popper, a = (m = ie.popupIndicator) != null ? m : Q.popupIndicator, n = (r) => /* @__PURE__ */ T.jsx(Nt, g({
    as: Ie,
    disablePortal: xe,
    style: {
      width: Te ? Te.clientWidth : null
    },
    ownerState: E,
    role: "presentation",
    anchorEl: Te,
    open: ke
  }, Le, {
    className: W(N.popper, Le == null ? void 0 : Le.className),
    children: /* @__PURE__ */ T.jsx(wt, g({
      ownerState: E,
      as: U
    }, me, {
      className: W(N.paper, me == null ? void 0 : me.className),
      children: r
    }))
  }));
  let l = null;
  return Y.length > 0 ? l = n(/* @__PURE__ */ T.jsx(zt, g({
    as: fe,
    className: N.listbox,
    ownerState: E
  }, Ze, ze, {
    ref: uo,
    children: Y.map((r, p) => ce ? fo({
      key: r.key,
      group: r.group,
      children: r.options.map((h, L) => eo(h, r.index + L))
    }) : eo(r, p))
  }))) : _e && Y.length === 0 ? l = n(/* @__PURE__ */ T.jsx(Dt, {
    className: N.loading,
    ownerState: E,
    children: H
  })) : Y.length === 0 && !le && !_e && (l = n(/* @__PURE__ */ T.jsx(Et, {
    className: N.noOptions,
    ownerState: E,
    role: "presentation",
    onMouseDown: (r) => {
      r.preventDefault();
    },
    children: Me
  }))), /* @__PURE__ */ T.jsxs(v.Fragment, {
    children: [/* @__PURE__ */ T.jsx(St, g({
      ref: i,
      className: W(N.root, w),
      ownerState: E
    }, Ge(Oe), {
      children: Ke({
        id: Pe,
        disabled: te,
        fullWidth: !0,
        size: C === "small" ? "small" : void 0,
        InputLabelProps: pe(),
        InputProps: g({
          ref: Fe,
          className: N.inputRoot,
          startAdornment: oe,
          onClick: (r) => {
            r.target === r.currentTarget && Se(r);
          }
        }, (se || ae) && {
          endAdornment: /* @__PURE__ */ T.jsxs(Rt, {
            className: N.endAdornment,
            ownerState: E,
            children: [se ? /* @__PURE__ */ T.jsx(Lt, g({}, co(), {
              "aria-label": ue,
              title: ue,
              ownerState: E
            }, Be, {
              className: W(N.clearIndicator, Be == null ? void 0 : Be.className),
              children: K
            })) : null, ae ? /* @__PURE__ */ T.jsx(At, g({}, qe(), {
              disabled: te,
              "aria-label": ke ? X : k,
              title: ke ? X : k,
              ownerState: E
            }, a, {
              className: W(N.popupIndicator, a == null ? void 0 : a.className),
              children: so
            })) : null]
          })
        }),
        inputProps: g({
          className: N.input,
          disabled: te,
          readOnly: F
        }, ge())
      })
    })), Te ? l : null]
  });
});
process.env.NODE_ENV !== "production" && (jo.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │    To update them, edit the d.ts file and run `pnpm proptypes`.     │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * If `true`, the portion of the selected suggestion that the user hasn't typed,
   * known as the completion string, appears inline after the input cursor in the textbox.
   * The inline completion string is visually highlighted and has a selected state.
   * @default false
   */
  autoComplete: t.bool,
  /**
   * If `true`, the first option is automatically highlighted.
   * @default false
   */
  autoHighlight: t.bool,
  /**
   * If `true`, the selected option becomes the value of the input
   * when the Autocomplete loses focus unless the user chooses
   * a different option or changes the character string in the input.
   *
   * When using the `freeSolo` mode, the typed value will be the input value
   * if the Autocomplete loses focus without highlighting an option.
   * @default false
   */
  autoSelect: t.bool,
  /**
   * Control if the input should be blurred when an option is selected:
   *
   * - `false` the input is not blurred.
   * - `true` the input is always blurred.
   * - `touch` the input is blurred after a touch event.
   * - `mouse` the input is blurred after a mouse event.
   * @default false
   */
  blurOnSelect: t.oneOfType([t.oneOf(["mouse", "touch"]), t.bool]),
  /**
   * Props applied to the [`Chip`](/material-ui/api/chip/) element.
   */
  ChipProps: t.object,
  /**
   * Override or extend the styles applied to the component.
   */
  classes: t.object,
  /**
   * @ignore
   */
  className: t.string,
  /**
   * The icon to display in place of the default clear icon.
   * @default <ClearIcon fontSize="small" />
   */
  clearIcon: t.node,
  /**
   * If `true`, the input's text is cleared on blur if no value is selected.
   *
   * Set it to `true` if you want to help the user enter a new value.
   * Set it to `false` if you want to help the user resume their search.
   * @default !props.freeSolo
   */
  clearOnBlur: t.bool,
  /**
   * If `true`, clear all values when the user presses escape and the popup is closed.
   * @default false
   */
  clearOnEscape: t.bool,
  /**
   * Override the default text for the *clear* icon button.
   *
   * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
   * @default 'Clear'
   */
  clearText: t.string,
  /**
   * Override the default text for the *close popup* icon button.
   *
   * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
   * @default 'Close'
   */
  closeText: t.string,
  /**
   * The props used for each slot inside.
   * @default {}
   */
  componentsProps: t.shape({
    clearIndicator: t.object,
    paper: t.object,
    popper: t.object,
    popupIndicator: t.object
  }),
  /**
   * The default value. Use when the component is not controlled.
   * @default props.multiple ? [] : null
   */
  defaultValue: yo(t.any, (e) => e.multiple && e.defaultValue !== void 0 && !Array.isArray(e.defaultValue) ? new Error(["MUI: The Autocomplete expects the `defaultValue` prop to be an array when `multiple={true}` or undefined.", `However, ${e.defaultValue} was provided.`].join(`
`)) : null),
  /**
   * If `true`, the input can't be cleared.
   * @default false
   */
  disableClearable: t.bool,
  /**
   * If `true`, the popup won't close when a value is selected.
   * @default false
   */
  disableCloseOnSelect: t.bool,
  /**
   * If `true`, the component is disabled.
   * @default false
   */
  disabled: t.bool,
  /**
   * If `true`, will allow focus on disabled items.
   * @default false
   */
  disabledItemsFocusable: t.bool,
  /**
   * If `true`, the list box in the popup will not wrap focus.
   * @default false
   */
  disableListWrap: t.bool,
  /**
   * If `true`, the `Popper` content will be under the DOM hierarchy of the parent component.
   * @default false
   */
  disablePortal: t.bool,
  /**
   * A function that determines the filtered options to be rendered on search.
   *
   * @default createFilterOptions()
   * @param {Value[]} options The options to render.
   * @param {object} state The state of the component.
   * @returns {Value[]}
   */
  filterOptions: t.func,
  /**
   * If `true`, hide the selected options from the list box.
   * @default false
   */
  filterSelectedOptions: t.bool,
  /**
   * Force the visibility display of the popup icon.
   * @default 'auto'
   */
  forcePopupIcon: t.oneOfType([t.oneOf(["auto"]), t.bool]),
  /**
   * If `true`, the Autocomplete is free solo, meaning that the user input is not bound to provided options.
   * @default false
   */
  freeSolo: t.bool,
  /**
   * If `true`, the input will take up the full width of its container.
   * @default false
   */
  fullWidth: t.bool,
  /**
   * The label to display when the tags are truncated (`limitTags`).
   *
   * @param {number} more The number of truncated tags.
   * @returns {ReactNode}
   * @default (more) => `+${more}`
   */
  getLimitTagsText: t.func,
  /**
   * Used to determine the disabled state for a given option.
   *
   * @param {Value} option The option to test.
   * @returns {boolean}
   */
  getOptionDisabled: t.func,
  /**
   * Used to determine the key for a given option.
   * This can be useful when the labels of options are not unique (since labels are used as keys by default).
   *
   * @param {Value} option The option to get the key for.
   * @returns {string | number}
   */
  getOptionKey: t.func,
  /**
   * Used to determine the string value for a given option.
   * It's used to fill the input (and the list box options if `renderOption` is not provided).
   *
   * If used in free solo mode, it must accept both the type of the options and a string.
   *
   * @param {Value} option
   * @returns {string}
   * @default (option) => option.label ?? option
   */
  getOptionLabel: t.func,
  /**
   * If provided, the options will be grouped under the returned string.
   * The groupBy value is also used as the text for group headings when `renderGroup` is not provided.
   *
   * @param {Value} options The options to group.
   * @returns {string}
   */
  groupBy: t.func,
  /**
   * If `true`, the component handles the "Home" and "End" keys when the popup is open.
   * It should move focus to the first option and last option, respectively.
   * @default !props.freeSolo
   */
  handleHomeEndKeys: t.bool,
  /**
   * This prop is used to help implement the accessibility logic.
   * If you don't provide an id it will fall back to a randomly generated one.
   */
  id: t.string,
  /**
   * If `true`, the highlight can move to the input.
   * @default false
   */
  includeInputInList: t.bool,
  /**
   * The input value.
   */
  inputValue: t.string,
  /**
   * Used to determine if the option represents the given value.
   * Uses strict equality by default.
   * ⚠️ Both arguments need to be handled, an option can only match with one value.
   *
   * @param {Value} option The option to test.
   * @param {Value} value The value to test against.
   * @returns {boolean}
   */
  isOptionEqualToValue: t.func,
  /**
   * The maximum number of tags that will be visible when not focused.
   * Set `-1` to disable the limit.
   * @default -1
   */
  limitTags: Uo,
  /**
   * The component used to render the listbox.
   * @default 'ul'
   */
  ListboxComponent: t.elementType,
  /**
   * Props applied to the Listbox element.
   */
  ListboxProps: t.object,
  /**
   * If `true`, the component is in a loading state.
   * This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).
   * @default false
   */
  loading: t.bool,
  /**
   * Text to display when in a loading state.
   *
   * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
   * @default 'Loading…'
   */
  loadingText: t.node,
  /**
   * If `true`, `value` must be an array and the menu will support multiple selections.
   * @default false
   */
  multiple: t.bool,
  /**
   * Text to display when there are no options.
   *
   * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
   * @default 'No options'
   */
  noOptionsText: t.node,
  /**
   * Callback fired when the value changes.
   *
   * @param {React.SyntheticEvent} event The event source of the callback.
   * @param {Value|Value[]} value The new value of the component.
   * @param {string} reason One of "createOption", "selectOption", "removeOption", "blur" or "clear".
   * @param {string} [details]
   */
  onChange: t.func,
  /**
   * Callback fired when the popup requests to be closed.
   * Use in controlled mode (see open).
   *
   * @param {React.SyntheticEvent} event The event source of the callback.
   * @param {string} reason Can be: `"toggleInput"`, `"escape"`, `"selectOption"`, `"removeOption"`, `"blur"`.
   */
  onClose: t.func,
  /**
   * Callback fired when the highlight option changes.
   *
   * @param {React.SyntheticEvent} event The event source of the callback.
   * @param {Value} option The highlighted option.
   * @param {string} reason Can be: `"keyboard"`, `"auto"`, `"mouse"`, `"touch"`.
   */
  onHighlightChange: t.func,
  /**
   * Callback fired when the input value changes.
   *
   * @param {React.SyntheticEvent} event The event source of the callback.
   * @param {string} value The new value of the text input.
   * @param {string} reason Can be: `"input"` (user input), `"reset"` (programmatic change), `"clear"`.
   */
  onInputChange: t.func,
  /**
   * @ignore
   */
  onKeyDown: t.func,
  /**
   * Callback fired when the popup requests to be opened.
   * Use in controlled mode (see open).
   *
   * @param {React.SyntheticEvent} event The event source of the callback.
   */
  onOpen: t.func,
  /**
   * If `true`, the component is shown.
   */
  open: t.bool,
  /**
   * If `true`, the popup will open on input focus.
   * @default false
   */
  openOnFocus: t.bool,
  /**
   * Override the default text for the *open popup* icon button.
   *
   * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
   * @default 'Open'
   */
  openText: t.string,
  /**
   * Array of options.
   */
  options: t.array.isRequired,
  /**
   * The component used to render the body of the popup.
   * @default Paper
   */
  PaperComponent: t.elementType,
  /**
   * The component used to position the popup.
   * @default Popper
   */
  PopperComponent: t.elementType,
  /**
   * The icon to display in place of the default popup icon.
   * @default <ArrowDropDownIcon />
   */
  popupIcon: t.node,
  /**
   * If `true`, the component becomes readonly. It is also supported for multiple tags where the tag cannot be deleted.
   * @default false
   */
  readOnly: t.bool,
  /**
   * Render the group.
   *
   * @param {AutocompleteRenderGroupParams} params The group to render.
   * @returns {ReactNode}
   */
  renderGroup: t.func,
  /**
   * Render the input.
   *
   * @param {object} params
   * @returns {ReactNode}
   */
  renderInput: t.func.isRequired,
  /**
   * Render the option, use `getOptionLabel` by default.
   *
   * @param {object} props The props to apply on the li element.
   * @param {Value} option The option to render.
   * @param {object} state The state of each option.
   * @param {object} ownerState The state of the Autocomplete component.
   * @returns {ReactNode}
   */
  renderOption: t.func,
  /**
   * Render the selected value.
   *
   * @param {Value[]} value The `value` provided to the component.
   * @param {function} getTagProps A tag props getter.
   * @param {object} ownerState The state of the Autocomplete component.
   * @returns {ReactNode}
   */
  renderTags: t.func,
  /**
   * If `true`, the input's text is selected on focus.
   * It helps the user clear the selected value.
   * @default !props.freeSolo
   */
  selectOnFocus: t.bool,
  /**
   * The size of the component.
   * @default 'medium'
   */
  size: t.oneOfType([t.oneOf(["small", "medium"]), t.string]),
  /**
   * The props used for each slot inside.
   * @default {}
   */
  slotProps: t.shape({
    clearIndicator: t.object,
    paper: t.object,
    popper: t.object,
    popupIndicator: t.object
  }),
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: t.oneOfType([t.arrayOf(t.oneOfType([t.func, t.object, t.bool])), t.func, t.object]),
  /**
   * The value of the autocomplete.
   *
   * The value must have reference equality with the option in order to be selected.
   * You can customize the equality behavior with the `isOptionEqualToValue` prop.
   */
  value: yo(t.any, (e) => e.multiple && e.value !== void 0 && !Array.isArray(e.value) ? new Error(["MUI: The Autocomplete expects the `value` prop to be an array when `multiple={true}` or undefined.", `However, ${e.value} was provided.`].join(`
`)) : null)
});
const Vt = jo, Ft = (e = !1) => e ? ao`
        width: 100%;
      ` : qo, Bt = (e = !1) => {
  const o = ao`
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  `, i = ao`
    flex-direction: column;
    gap: 8px;
  `;
  return ao`
    display: flex;
    padding: 8px 0;
    ${e ? i : o};
    width: 100%;
  `;
}, Ht = (e) => {
  const {
    isSetterSingleRow: o,
    options: i,
    attrName: s,
    handleUpdateDsl: b,
    value: I,
    onChange: m,
    labelName: d,
    labelDesc: P,
    labelSize: $
  } = e;
  return /* @__PURE__ */ Wo("div", { css: Bt(o), children: [
    /* @__PURE__ */ He("span", { children: d && /* @__PURE__ */ He(
      Go,
      {
        labelName: d,
        labelDesc: P,
        labelSize: $
      }
    ) }),
    /* @__PURE__ */ He("div", { css: Ft(o), children: /* @__PURE__ */ He(
      Vt,
      {
        id: "combo-box-demo",
        value: I,
        options: i,
        sx: { width: 180 },
        renderInput: (S) => /* @__PURE__ */ He(Ko, { ...S, size: "small" }),
        onChange: (S, R) => {
          const { value: z } = R ?? { value: "" };
          b(s, z), m == null || m(z);
        }
      }
    ) })
  ] });
};
Ht.displayName = "BaseSelect";
export {
  Ht as default
};
//# sourceMappingURL=baseSelect-3b8966ae.js.map
