import { $ as re } from "./Button-BjcDZ5eb.es.js";
import { $ as Xe, a as He } from "./Heading-BMsylHxq.es.js";
import { $ as ge, c as he, b as ye, f as Ve, a as Pe, e as De } from "./utils-B6pV5ewr.es.js";
import { d as xe, e as Oe, f as Re, g as Je, h as Ce, i as Qe, j as A, k as z, l as Ye, m as Fe, n as pe } from "./DateField-DCWy1Ysp.es.js";
import { e as Te, h as Ze, i as Ie } from "./Dialog-B0BQfdQa.es.js";
import { $ as Be } from "./FieldError-CXcEMuBf.es.js";
import { $ as Me } from "./Form-CXcEMuBf.es.js";
import { a as oe } from "./Group-BQc9LuMT.es.js";
import { $ as se } from "./Label-DIseLESi.es.js";
import { $ as ue } from "./Text-DOcU1ycg.es.js";
import { a as X, $ as Q } from "./mergeProps-Dsl8k3Ig.es.js";
import { $ as Y } from "./filterDOMProps-BSVCO5jK.es.js";
import { $ as we, c as Ee } from "./OverlayArrow-BIjbCSXk.es.js";
import H, { useMemo as N, useRef as G, useState as W, forwardRef as Se, createContext as p, useCallback as _e } from "react";
import { $ as J, a as te, b as de } from "./useDateFormatter-9juUpmrj.es.js";
import { b as ne, c as $e, d as me, $ as We } from "./useFormValidation-BCVLtR0U.es.js";
import { $ as ke } from "./useControlledState-u436Wbp1.es.js";
import { $ as Ue } from "./FocusScope-CqEZq7sr.es.js";
import { a as Ke } from "./scrollIntoView-B7D07fJk.es.js";
import { $ as Le } from "./useFocusWithin-EFOG-Jn1.es.js";
import { $ as Ne } from "./useField-CHrpmkxe.es.js";
import { $ as je } from "./context-DW7UvQ8z.es.js";
import { $ as qe } from "./useLocalizedStringFormatter-DWb0DkHL.es.js";
import { $ as ze } from "./useFocusRing-FPt2Rwil.es.js";
function ea(e) {
  return e && e.__esModule ? e.default : e;
}
function aa(e, a, n) {
  let P = X(), v = X(), $ = X(), b = qe(ea(Re), "@react-aria/datepicker"), { isInvalid: i, validationErrors: o, validationDetails: l } = a.displayValidation, { labelProps: x, fieldProps: O, descriptionProps: m, errorMessageProps: T } = Ne({
    ...e,
    labelElementType: "span",
    isInvalid: i,
    errorMessage: e.errorMessage || o
  }), R = xe(a, n), Z = O["aria-labelledby"] || O.id, { locale: C } = je(), u = a.formatValue(C, {
    month: "long"
  }), I = u ? b.format("selectedDateDescription", {
    date: u
  }) : "", t = Ke(I), F = [
    t["aria-describedby"],
    O["aria-describedby"]
  ].filter(Boolean).join(" ") || void 0, E = Y(e), B = N(() => Ue(n), [
    n
  ]), y = G(!1), { focusWithinProps: w } = Le({
    ...e,
    isDisabled: a.isOpen,
    onBlurWithin: (f) => {
      let g = document.getElementById(v);
      if (!g?.contains(f.relatedTarget)) {
        var V, M;
        y.current = !1, (V = e.onBlur) === null || V === void 0 || V.call(e, f), (M = e.onFocusChange) === null || M === void 0 || M.call(e, !1);
      }
    },
    onFocusWithin: (f) => {
      if (!y.current) {
        var g, V;
        y.current = !0, (g = e.onFocus) === null || g === void 0 || g.call(e, f), (V = e.onFocusChange) === null || V === void 0 || V.call(e, !0);
      }
    }
  });
  return {
    groupProps: Q(E, R, O, t, w, {
      role: "group",
      "aria-disabled": e.isDisabled || null,
      "aria-labelledby": Z,
      "aria-describedby": F,
      onKeyDown(f) {
        a.isOpen || e.onKeyDown && e.onKeyDown(f);
      },
      onKeyUp(f) {
        a.isOpen || e.onKeyUp && e.onKeyUp(f);
      }
    }),
    labelProps: {
      ...x,
      onClick: () => {
        B.focusFirst();
      }
    },
    fieldProps: {
      ...O,
      id: $,
      [Oe]: "presentation",
      "aria-describedby": F,
      value: a.value,
      defaultValue: a.defaultValue,
      onChange: a.setValue,
      placeholderValue: e.placeholderValue,
      hideTimeZone: e.hideTimeZone,
      hourCycle: e.hourCycle,
      shouldForceLeadingZeros: e.shouldForceLeadingZeros,
      granularity: e.granularity,
      isDisabled: e.isDisabled,
      isReadOnly: e.isReadOnly,
      isRequired: e.isRequired,
      validationBehavior: e.validationBehavior,
      // DatePicker owns the validation state for the date field.
      [ne]: a,
      autoFocus: e.autoFocus,
      name: e.name,
      form: e.form
    },
    descriptionProps: m,
    errorMessageProps: T,
    buttonProps: {
      ...t,
      id: P,
      "aria-haspopup": "dialog",
      "aria-label": b.format("calendar"),
      "aria-labelledby": `${P} ${Z}`,
      "aria-describedby": F,
      "aria-expanded": a.isOpen,
      isDisabled: e.isDisabled || e.isReadOnly,
      onPress: () => a.setOpen(!0)
    },
    dialogProps: {
      id: v,
      "aria-labelledby": `${P} ${Z}`
    },
    calendarProps: {
      autoFocus: !0,
      value: a.dateValue,
      onChange: a.setDateValue,
      minValue: e.minValue,
      maxValue: e.maxValue,
      isDisabled: e.isDisabled,
      isReadOnly: e.isReadOnly,
      isDateUnavailable: e.isDateUnavailable,
      defaultFocusedValue: a.dateValue ? void 0 : e.placeholderValue,
      isInvalid: a.isInvalid,
      errorMessage: typeof e.errorMessage == "function" ? e.errorMessage(a.displayValidation) : e.errorMessage || a.displayValidation.validationErrors.join(" "),
      firstDayOfWeek: e.firstDayOfWeek,
      pageBehavior: e.pageBehavior
    },
    isInvalid: i,
    validationErrors: o,
    validationDetails: l
  };
}
function la(e) {
  return e && e.__esModule ? e.default : e;
}
function ia(e, a, n) {
  var P, v, $, b, i;
  let o = qe(la(Re), "@react-aria/datepicker"), { isInvalid: l, validationErrors: x, validationDetails: O } = a.displayValidation, { labelProps: m, fieldProps: T, descriptionProps: R, errorMessageProps: Z } = Ne({
    ...e,
    labelElementType: "span",
    isInvalid: l,
    errorMessage: e.errorMessage || x
  }), C = T["aria-labelledby"] || T.id, { locale: u } = je(), I = a.formatValue(u, {
    month: "long"
  }), t = I ? o.format("selectedRangeDescription", {
    startDate: I.start,
    endDate: I.end
  }) : "", F = Ke(t), E = {
    "aria-label": o.format("startDate"),
    "aria-labelledby": C
  }, B = {
    "aria-label": o.format("endDate"),
    "aria-labelledby": C
  }, y = X(), w = X(), f = xe(a, n), g = [
    F["aria-describedby"],
    T["aria-describedby"]
  ].filter(Boolean).join(" ") || void 0, V = N(() => Ue(n, {
    // Exclude the button from the focus manager.
    accept: (d) => d.id !== y
  }), [
    n,
    y
  ]), M = {
    [Je]: V,
    [Oe]: "presentation",
    "aria-describedby": g,
    placeholderValue: e.placeholderValue,
    hideTimeZone: e.hideTimeZone,
    hourCycle: e.hourCycle,
    granularity: e.granularity,
    shouldForceLeadingZeros: e.shouldForceLeadingZeros,
    isDisabled: e.isDisabled,
    isReadOnly: e.isReadOnly,
    isRequired: e.isRequired,
    validationBehavior: e.validationBehavior
  }, h = Y(e), D = G(!1), { focusWithinProps: k } = Le({
    ...e,
    isDisabled: a.isOpen,
    onBlurWithin: (d) => {
      let c = document.getElementById(w);
      if (!c?.contains(d.relatedTarget)) {
        var S, q;
        D.current = !1, (S = e.onBlur) === null || S === void 0 || S.call(e, d), (q = e.onFocusChange) === null || q === void 0 || q.call(e, !1);
      }
    },
    onFocusWithin: (d) => {
      if (!D.current) {
        var c, S;
        D.current = !0, (c = e.onFocus) === null || c === void 0 || c.call(e, d), (S = e.onFocusChange) === null || S === void 0 || S.call(e, !0);
      }
    }
  }), U = G($e), j = G($e);
  var r, s;
  return {
    groupProps: Q(h, f, T, F, k, {
      role: "group",
      "aria-disabled": e.isDisabled || null,
      "aria-describedby": g,
      onKeyDown(d) {
        a.isOpen || e.onKeyDown && e.onKeyDown(d);
      },
      onKeyUp(d) {
        a.isOpen || e.onKeyUp && e.onKeyUp(d);
      }
    }),
    labelProps: {
      ...m,
      onClick: () => {
        V.focusFirst();
      }
    },
    buttonProps: {
      ...F,
      id: y,
      "aria-haspopup": "dialog",
      "aria-label": o.format("calendar"),
      "aria-labelledby": `${y} ${C}`,
      "aria-describedby": g,
      "aria-expanded": a.isOpen,
      isDisabled: e.isDisabled || e.isReadOnly,
      onPress: () => a.setOpen(!0)
    },
    dialogProps: {
      id: w,
      "aria-labelledby": `${y} ${C}`
    },
    startFieldProps: {
      ...E,
      ...M,
      value: (r = (P = a.value) === null || P === void 0 ? void 0 : P.start) !== null && r !== void 0 ? r : null,
      defaultValue: (v = a.defaultValue) === null || v === void 0 ? void 0 : v.start,
      onChange: (d) => a.setDateTime("start", d),
      autoFocus: e.autoFocus,
      name: e.startName,
      form: e.form,
      [ne]: {
        realtimeValidation: a.realtimeValidation,
        displayValidation: a.displayValidation,
        updateValidation(d) {
          U.current = d, a.updateValidation(me(d, j.current));
        },
        resetValidation: a.resetValidation,
        commitValidation: a.commitValidation
      }
    },
    endFieldProps: {
      ...B,
      ...M,
      value: (s = ($ = a.value) === null || $ === void 0 ? void 0 : $.end) !== null && s !== void 0 ? s : null,
      defaultValue: (b = a.defaultValue) === null || b === void 0 ? void 0 : b.end,
      onChange: (d) => a.setDateTime("end", d),
      name: e.endName,
      form: e.form,
      [ne]: {
        realtimeValidation: a.realtimeValidation,
        displayValidation: a.displayValidation,
        updateValidation(d) {
          j.current = d, a.updateValidation(me(U.current, d));
        },
        resetValidation: a.resetValidation,
        commitValidation: a.commitValidation
      }
    },
    descriptionProps: R,
    errorMessageProps: Z,
    calendarProps: {
      autoFocus: !0,
      value: !((i = a.dateRange) === null || i === void 0) && i.start && a.dateRange.end ? a.dateRange : null,
      onChange: a.setDateRange,
      minValue: e.minValue,
      maxValue: e.maxValue,
      isDisabled: e.isDisabled,
      isReadOnly: e.isReadOnly,
      isDateUnavailable: e.isDateUnavailable,
      allowsNonContiguousRanges: e.allowsNonContiguousRanges,
      defaultFocusedValue: a.dateRange ? void 0 : e.placeholderValue,
      isInvalid: a.isInvalid,
      errorMessage: typeof e.errorMessage == "function" ? e.errorMessage(a.displayValidation) : e.errorMessage || a.displayValidation.validationErrors.join(" "),
      firstDayOfWeek: e.firstDayOfWeek,
      pageBehavior: e.pageBehavior
    },
    isInvalid: l,
    validationErrors: x,
    validationDetails: O
  };
}
function ta(e) {
  let a = we(e), [n, P] = ke(e.value, e.defaultValue || null, e.onChange), [v] = W(n), $ = n || e.placeholderValue || null, [b, i] = Ce($, e.granularity), o = n != null ? n.toDate(i ?? "UTC") : null, l = b === "hour" || b === "minute" || b === "second";
  var x;
  let O = (x = e.shouldCloseOnSelect) !== null && x !== void 0 ? x : !0, [m, T] = W(null), [R, Z] = W(null);
  if (n && (m = n, "hour" in n && (R = n)), $ && !(b in $)) throw new Error("Invalid granularity " + b + " for value " + $.toString());
  let C = n?.calendar.identifier === "gregory" && n.era === "BC", u = N(() => ({
    granularity: b,
    timeZone: i,
    hideTimeZone: e.hideTimeZone,
    hourCycle: e.hourCycle,
    shouldForceLeadingZeros: e.shouldForceLeadingZeros,
    showEra: C
  }), [
    b,
    e.hourCycle,
    e.shouldForceLeadingZeros,
    i,
    e.hideTimeZone,
    C
  ]), { minValue: I, maxValue: t, isDateUnavailable: F } = e, E = N(() => Qe(n, I, t, F, u), [
    n,
    I,
    t,
    F,
    u
  ]), B = We({
    ...e,
    value: n,
    builtinValidation: E
  }), y = B.displayValidation.isInvalid, w = e.validationState || (y ? "invalid" : null), f = (h, D) => {
    P("timeZone" in D ? D.set(de(h)) : te(h, D)), T(null), Z(null), B.commitValidation();
  }, g = (h) => {
    let D = typeof O == "function" ? O() : O;
    l ? R || D ? f(h, R || z(e.defaultValue || e.placeholderValue)) : T(h) : (P(h), B.commitValidation()), D && a.setOpen(!1);
  }, V = (h) => {
    m && h ? f(m, h) : Z(h);
  };
  var M;
  return {
    ...B,
    value: n,
    defaultValue: (M = e.defaultValue) !== null && M !== void 0 ? M : v,
    setValue: P,
    dateValue: m,
    timeValue: R,
    setDateValue: g,
    setTimeValue: V,
    granularity: b,
    hasTime: l,
    ...a,
    setOpen(h) {
      !h && !n && m && l && f(m, R || z(e.defaultValue || e.placeholderValue)), a.setOpen(h);
    },
    validationState: w,
    isInvalid: y,
    formatValue(h, D) {
      if (!o) return "";
      let k = A(D, u);
      return new J(h, k).format(o);
    },
    getDateFormatter(h, D) {
      let k = {
        ...u,
        ...D
      }, U = A({}, k);
      return new J(h, U);
    }
  };
}
function da(e) {
  var a, n;
  let P = we(e), [v, $] = ke(e.value, e.defaultValue || null, e.onChange), [b] = W(v), [i, o] = W(() => v || {
    start: null,
    end: null
  });
  v == null && i.start && i.end && (i = {
    start: null,
    end: null
  }, o(i));
  let l = v || i, x = (r) => {
    l = r || {
      start: null,
      end: null
    }, o(l), L(l) ? $(l) : $(null);
  }, O = l?.start || l?.end || e.placeholderValue || null, [m, T] = Ce(O, e.granularity), R = m === "hour" || m === "minute" || m === "second";
  var Z;
  let C = (Z = e.shouldCloseOnSelect) !== null && Z !== void 0 ? Z : !0, [u, I] = W(null), [t, F] = W(null);
  l && L(l) && (u = l, "hour" in l.start && (t = l));
  let E = (r, s) => {
    x({
      start: "timeZone" in s.start ? s.start.set(de(r.start)) : te(r.start, s.start),
      end: "timeZone" in s.end ? s.end.set(de(r.end)) : te(r.end, s.end)
    }), I(null), F(null), D.commitValidation();
  }, B = (r) => {
    let s = typeof C == "function" ? C() : C;
    R ? L(r) && (s || t?.start && t?.end) ? E(r, {
      start: t?.start || z(e.placeholderValue),
      end: t?.end || z(e.placeholderValue)
    }) : I(r) : L(r) ? (x(r), D.commitValidation()) : I(r), s && P.setOpen(!1);
  }, y = (r) => {
    L(u) && L(r) ? E(u, r) : F(r);
  }, w = (l == null || (a = l.start) === null || a === void 0 ? void 0 : a.calendar.identifier) === "gregory" && l.start.era === "BC" || (l == null || (n = l.end) === null || n === void 0 ? void 0 : n.calendar.identifier) === "gregory" && l.end.era === "BC", f = N(() => ({
    granularity: m,
    timeZone: T,
    hideTimeZone: e.hideTimeZone,
    hourCycle: e.hourCycle,
    shouldForceLeadingZeros: e.shouldForceLeadingZeros,
    showEra: w
  }), [
    m,
    e.hourCycle,
    e.shouldForceLeadingZeros,
    T,
    e.hideTimeZone,
    w
  ]), { minValue: g, maxValue: V, isDateUnavailable: M } = e, h = N(() => Ye(l, g, V, M, f), [
    l,
    g,
    V,
    M,
    f
  ]), D = We({
    ...e,
    value: v,
    name: N(() => [
      e.startName,
      e.endName
    ].filter((r) => r != null), [
      e.startName,
      e.endName
    ]),
    builtinValidation: h
  }), k = D.displayValidation.isInvalid, U = e.validationState || (k ? "invalid" : null);
  var j;
  return {
    ...D,
    value: l,
    defaultValue: (j = e.defaultValue) !== null && j !== void 0 ? j : b,
    setValue: x,
    dateRange: u,
    timeRange: t,
    granularity: m,
    hasTime: R,
    setDate(r, s) {
      var d, c;
      B(r === "start" ? {
        start: s,
        end: (d = u?.end) !== null && d !== void 0 ? d : null
      } : {
        start: (c = u?.start) !== null && c !== void 0 ? c : null,
        end: s
      });
    },
    setTime(r, s) {
      var d, c;
      y(r === "start" ? {
        start: s,
        end: (d = t?.end) !== null && d !== void 0 ? d : null
      } : {
        start: (c = t?.start) !== null && c !== void 0 ? c : null,
        end: s
      });
    },
    setDateTime(r, s) {
      var d, c;
      x(r === "start" ? {
        start: s,
        end: (d = l?.end) !== null && d !== void 0 ? d : null
      } : {
        start: (c = l?.start) !== null && c !== void 0 ? c : null,
        end: s
      });
    },
    setDateRange: B,
    setTimeRange: y,
    ...P,
    setOpen(r) {
      !r && !(l?.start && l?.end) && L(u) && R && E(u, {
        start: t?.start || z(e.placeholderValue),
        end: t?.end || z(e.placeholderValue)
      }), P.setOpen(r);
    },
    validationState: U,
    isInvalid: k,
    formatValue(r, s) {
      if (!l || !l.start || !l.end) return null;
      let d = "timeZone" in l.start ? l.start.timeZone : void 0, c = e.granularity || (l.start && "minute" in l.start ? "minute" : "day"), S = "timeZone" in l.end ? l.end.timeZone : void 0, q = e.granularity || (l.end && "minute" in l.end ? "minute" : "day"), Ae = A(s, {
        granularity: c,
        timeZone: d,
        hideTimeZone: e.hideTimeZone,
        hourCycle: e.hourCycle,
        showEra: l.start.calendar.identifier === "gregory" && l.start.era === "BC" || l.end.calendar.identifier === "gregory" && l.end.era === "BC"
      }), fe = l.start.toDate(d || "UTC"), ce = l.end.toDate(S || "UTC"), ee = new J(r, Ae), ae;
      if (d === S && c === q && l.start.compare(l.end) !== 0) {
        try {
          let K = ee.formatRangeToParts(fe, ce), le = -1;
          for (let _ = 0; _ < K.length; _++) {
            let ie = K[_];
            if (ie.source === "shared" && ie.type === "literal") le = _;
            else if (ie.source === "endRange") break;
          }
          let be = "", ve = "";
          for (let _ = 0; _ < K.length; _++)
            _ < le ? be += K[_].value : _ > le && (ve += K[_].value);
          return {
            start: be,
            end: ve
          };
        } catch {
        }
        ae = ee;
      } else {
        let K = A(s, {
          granularity: q,
          timeZone: S,
          hideTimeZone: e.hideTimeZone,
          hourCycle: e.hourCycle
        });
        ae = new J(r, K);
      }
      return {
        start: ee.format(fe),
        end: ae.format(ce)
      };
    },
    getDateFormatter(r, s) {
      let d = {
        ...f,
        ...s
      }, c = A({}, d);
      return new J(r, c);
    }
  };
}
function L(e) {
  return e?.start != null && e.end != null;
}
const na = /* @__PURE__ */ p(null), ra = /* @__PURE__ */ p(null), oa = /* @__PURE__ */ p(null), sa = /* @__PURE__ */ p(null), Ge = [
  oe,
  re,
  se,
  ue
], Ea = /* @__PURE__ */ Se(function(a, n) {
  [a, n] = ge(a, n, na);
  let { validationBehavior: P } = he(Me) || {};
  var v, $;
  let b = ($ = (v = a.validationBehavior) !== null && v !== void 0 ? v : P) !== null && $ !== void 0 ? $ : "native", i = ta({
    ...a,
    validationBehavior: b
  }), o = G(null), [l, x] = ye(!a["aria-label"] && !a["aria-labelledby"]), { groupProps: O, labelProps: m, fieldProps: T, buttonProps: R, dialogProps: Z, calendarProps: C, descriptionProps: u, errorMessageProps: I, ...t } = aa({
    ...Ve(a),
    label: x,
    validationBehavior: b
  }, i, o), [F, E] = W(null), B = _e(() => {
    o.current && E(o.current.offsetWidth + "px");
  }, []);
  Ee({
    ref: o,
    onResize: B
  });
  let { focusProps: y, isFocused: w, isFocusVisible: f } = ze({
    within: !0
  }), g = Pe({
    ...a,
    values: {
      state: i,
      isFocusWithin: w,
      isFocusVisible: f,
      isDisabled: a.isDisabled || !1,
      isInvalid: i.isInvalid,
      isOpen: i.isOpen,
      isReadOnly: a.isReadOnly || !1
    },
    defaultClassName: "react-aria-DatePicker"
  }), V = Y(a, {
    global: !0
  });
  return delete V.id, /* @__PURE__ */ H.createElement(De, {
    values: [
      [
        oa,
        i
      ],
      [
        oe,
        {
          ...O,
          ref: o,
          isInvalid: i.isInvalid
        }
      ],
      [
        Fe,
        T
      ],
      [
        re,
        {
          ...R,
          isPressed: i.isOpen
        }
      ],
      [
        se,
        {
          ...m,
          ref: l,
          elementType: "span"
        }
      ],
      [
        He,
        C
      ],
      [
        Te,
        i
      ],
      [
        Ze,
        {
          trigger: "DatePicker",
          triggerRef: o,
          placement: "bottom start",
          style: {
            "--trigger-width": F
          },
          clearContexts: Ge
        }
      ],
      [
        Ie,
        Z
      ],
      [
        ue,
        {
          slots: {
            description: u,
            errorMessage: I
          }
        }
      ],
      [
        Be,
        t
      ]
    ]
  }, /* @__PURE__ */ H.createElement("div", {
    ...Q(V, g, y),
    ref: n,
    slot: a.slot || void 0,
    "data-focus-within": w || void 0,
    "data-invalid": i.isInvalid || void 0,
    "data-focus-visible": f || void 0,
    "data-disabled": a.isDisabled || void 0,
    "data-readonly": a.isReadOnly || void 0,
    "data-open": i.isOpen || void 0
  }), /* @__PURE__ */ H.createElement(pe, {
    autoComplete: a.autoComplete,
    name: a.name,
    isDisabled: a.isDisabled,
    state: i
  }));
}), Sa = /* @__PURE__ */ Se(function(a, n) {
  [a, n] = ge(a, n, ra);
  let { validationBehavior: P } = he(Me) || {};
  var v, $;
  let b = ($ = (v = a.validationBehavior) !== null && v !== void 0 ? v : P) !== null && $ !== void 0 ? $ : "native", i = da({
    ...a,
    validationBehavior: b
  }), o = G(null), [l, x] = ye(!a["aria-label"] && !a["aria-labelledby"]), { groupProps: O, labelProps: m, startFieldProps: T, endFieldProps: R, buttonProps: Z, dialogProps: C, calendarProps: u, descriptionProps: I, errorMessageProps: t, ...F } = ia({
    ...Ve(a),
    label: x,
    validationBehavior: b
  }, i, o), [E, B] = W(null), y = _e(() => {
    o.current && B(o.current.offsetWidth + "px");
  }, []);
  Ee({
    ref: o,
    onResize: y
  });
  let { focusProps: w, isFocused: f, isFocusVisible: g } = ze({
    within: !0
  }), V = Pe({
    ...a,
    values: {
      state: i,
      isFocusWithin: f,
      isFocusVisible: g,
      isDisabled: a.isDisabled || !1,
      isInvalid: i.isInvalid,
      isOpen: i.isOpen,
      isReadOnly: a.isReadOnly || !1
    },
    defaultClassName: "react-aria-DateRangePicker"
  }), M = Y(a, {
    global: !0
  });
  return delete M.id, /* @__PURE__ */ H.createElement(De, {
    values: [
      [
        sa,
        i
      ],
      [
        oe,
        {
          ...O,
          ref: o,
          isInvalid: i.isInvalid
        }
      ],
      [
        re,
        {
          ...Z,
          isPressed: i.isOpen
        }
      ],
      [
        se,
        {
          ...m,
          ref: l,
          elementType: "span"
        }
      ],
      [
        Xe,
        u
      ],
      [
        Te,
        i
      ],
      [
        Ze,
        {
          trigger: "DateRangePicker",
          triggerRef: o,
          placement: "bottom start",
          style: {
            "--trigger-width": E
          },
          clearContexts: Ge
        }
      ],
      [
        Ie,
        C
      ],
      [
        Fe,
        {
          slots: {
            start: T,
            end: R
          }
        }
      ],
      [
        ue,
        {
          slots: {
            description: I,
            errorMessage: t
          }
        }
      ],
      [
        Be,
        F
      ]
    ]
  }, /* @__PURE__ */ H.createElement("div", {
    ...Q(M, V, w),
    ref: n,
    slot: a.slot || void 0,
    "data-focus-within": f || void 0,
    "data-invalid": i.isInvalid || void 0,
    "data-focus-visible": g || void 0,
    "data-disabled": a.isDisabled || void 0,
    "data-readonly": a.isReadOnly || void 0,
    "data-open": i.isOpen || void 0
  }));
});
export {
  sa as $,
  Sa as a,
  oa as b,
  Ea as c
};
//# sourceMappingURL=DatePicker-CL72jbDo.es.js.map
