import { jsx as s, jsxs as C, Fragment as F } from "react/jsx-runtime";
import { S as De, T as Ne, U as ke } from "./index.dWlEA7uO.js";
import { a as nn } from "./index.CfQlFjZU.js";
import { createContext as Y, forwardRef as tn, useContext as E, useState as j, useEffect as X, useLayoutEffect as an, useRef as rn } from "react";
import { t as N, c as H, s as Z, a as z, b as we, g as on, e as ln, d as I, f as T, h as sn, i as fe, j as dn, k as un, l as Le } from "./format.CRlSnSc-.js";
import { b as cn } from "./constants.Ctgl3Xcy.js";
import { c as Ce } from "./index.CfM2L_w0.js";
function w(e, t) {
  const n = N(e);
  return isNaN(t) ? H(e, NaN) : (t && n.setDate(n.getDate() + t), n);
}
function O(e, t) {
  const n = N(e);
  if (isNaN(t)) return H(e, NaN);
  if (!t)
    return n;
  const a = n.getDate(), r = H(e, n.getTime());
  r.setMonth(n.getMonth() + t + 1, 0);
  const o = r.getDate();
  return a >= o ? r : (n.setFullYear(
    r.getFullYear(),
    r.getMonth(),
    a
  ), n);
}
function ue(e, t) {
  const n = t * 7;
  return w(e, n);
}
function fn(e, t) {
  return O(e, t * 12);
}
function vn(e) {
  let t;
  return e.forEach(function(n) {
    const a = N(n);
    (t === void 0 || t < a || isNaN(Number(a))) && (t = a);
  }), t || /* @__PURE__ */ new Date(NaN);
}
function hn(e) {
  let t;
  return e.forEach((n) => {
    const a = N(n);
    (!t || t > a || isNaN(+a)) && (t = a);
  }), t || /* @__PURE__ */ new Date(NaN);
}
function P(e, t) {
  const n = Z(e), a = Z(t);
  return +n == +a;
}
function U(e, t) {
  const n = N(e), a = N(t), r = n.getFullYear() - a.getFullYear(), o = n.getMonth() - a.getMonth();
  return r * 12 + o;
}
function mn(e, t, n) {
  const a = z(e, n), r = z(t, n), o = +a - we(a), i = +r - we(r);
  return Math.round((o - i) / cn);
}
function ve(e) {
  const t = N(e), n = t.getMonth();
  return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(23, 59, 59, 999), t;
}
function x(e) {
  const t = N(e);
  return t.setDate(1), t.setHours(0, 0, 0, 0), t;
}
function he(e, t) {
  const n = on(), a = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, r = N(e), o = r.getDay(), i = (o < a ? -7 : 0) + 6 - (o - a);
  return r.setDate(r.getDate() + i), r.setHours(23, 59, 59, 999), r;
}
function Ie(e) {
  return he(e, { weekStartsOn: 1 });
}
function yn(e) {
  const t = N(e), n = t.getFullYear(), a = t.getMonth(), r = H(e, 0);
  return r.setFullYear(n, a + 1, 0), r.setHours(0, 0, 0, 0), r.getDate();
}
function bn(e) {
  return Math.trunc(+N(e) / 1e3);
}
function pn(e) {
  const t = N(e), n = t.getMonth();
  return t.setFullYear(t.getFullYear(), n + 1, 0), t.setHours(0, 0, 0, 0), t;
}
function _n(e, t) {
  return mn(
    pn(e),
    x(e),
    t
  ) + 1;
}
function ce(e, t) {
  const n = N(e), a = N(t);
  return n.getTime() > a.getTime();
}
function Fe(e, t) {
  const n = N(e), a = N(t);
  return +n < +a;
}
function K(e, t) {
  const n = N(e), a = N(t);
  return n.getFullYear() === a.getFullYear() && n.getMonth() === a.getMonth();
}
function gn(e, t) {
  const n = N(e), a = N(t);
  return n.getFullYear() === a.getFullYear();
}
function re(e, t) {
  return w(e, -t);
}
function oe(e, t) {
  const n = N(e), a = n.getFullYear(), r = n.getDate(), o = H(e, 0);
  o.setFullYear(a, t, 15), o.setHours(0, 0, 0, 0);
  const i = yn(o);
  return n.setMonth(t, Math.min(r, i)), n;
}
function Pe(e, t) {
  const n = N(e);
  return isNaN(+n) ? H(e, NaN) : (n.setFullYear(t), n);
}
var y = function() {
  return y = Object.assign || function(t) {
    for (var n, a = 1, r = arguments.length; a < r; a++) {
      n = arguments[a];
      for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
    }
    return t;
  }, y.apply(this, arguments);
};
function Mn(e, t) {
  var n = {};
  for (var a in e) Object.prototype.hasOwnProperty.call(e, a) && t.indexOf(a) < 0 && (n[a] = e[a]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var r = 0, a = Object.getOwnPropertySymbols(e); r < a.length; r++)
      t.indexOf(a[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, a[r]) && (n[a[r]] = e[a[r]]);
  return n;
}
function Te(e, t, n) {
  for (var a = 0, r = t.length, o; a < r; a++)
    (o || !(a in t)) && (o || (o = Array.prototype.slice.call(t, 0, a)), o[a] = t[a]);
  return e.concat(o || Array.prototype.slice.call(t));
}
function V(e) {
  return e.mode === "multiple";
}
function G(e) {
  return e.mode === "range";
}
function J(e) {
  return e.mode === "single";
}
var Dn = {
  root: "rdp",
  multiple_months: "rdp-multiple_months",
  with_weeknumber: "rdp-with_weeknumber",
  vhidden: "rdp-vhidden",
  button_reset: "rdp-button_reset",
  button: "rdp-button",
  caption: "rdp-caption",
  caption_start: "rdp-caption_start",
  caption_end: "rdp-caption_end",
  caption_between: "rdp-caption_between",
  caption_label: "rdp-caption_label",
  caption_dropdowns: "rdp-caption_dropdowns",
  dropdown: "rdp-dropdown",
  dropdown_month: "rdp-dropdown_month",
  dropdown_year: "rdp-dropdown_year",
  dropdown_icon: "rdp-dropdown_icon",
  months: "rdp-months",
  month: "rdp-month",
  table: "rdp-table",
  tbody: "rdp-tbody",
  tfoot: "rdp-tfoot",
  head: "rdp-head",
  head_row: "rdp-head_row",
  head_cell: "rdp-head_cell",
  nav: "rdp-nav",
  nav_button: "rdp-nav_button",
  nav_button_previous: "rdp-nav_button_previous",
  nav_button_next: "rdp-nav_button_next",
  nav_icon: "rdp-nav_icon",
  row: "rdp-row",
  weeknumber: "rdp-weeknumber",
  cell: "rdp-cell",
  day: "rdp-day",
  day_today: "rdp-day_today",
  day_outside: "rdp-day_outside",
  day_selected: "rdp-day_selected",
  day_disabled: "rdp-day_disabled",
  day_hidden: "rdp-day_hidden",
  day_range_start: "rdp-day_range_start",
  day_range_end: "rdp-day_range_end",
  day_range_middle: "rdp-day_range_middle"
};
function Nn(e, t) {
  return T(e, "LLLL y", t);
}
function kn(e, t) {
  return T(e, "d", t);
}
function wn(e, t) {
  return T(e, "LLLL", t);
}
function Cn(e) {
  return "".concat(e);
}
function Pn(e, t) {
  return T(e, "cccccc", t);
}
function xn(e, t) {
  return T(e, "yyyy", t);
}
var On = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  formatCaption: Nn,
  formatDay: kn,
  formatMonthCaption: wn,
  formatWeekNumber: Cn,
  formatWeekdayName: Pn,
  formatYearCaption: xn
}), Sn = function(e, t, n) {
  return T(e, "do MMMM (EEEE)", n);
}, Wn = function() {
  return "Month: ";
}, Ln = function() {
  return "Go to next month";
}, In = function() {
  return "Go to previous month";
}, Fn = function(e, t) {
  return T(e, "cccc", t);
}, Tn = function(e) {
  return "Week n. ".concat(e);
}, Yn = function() {
  return "Year: ";
}, En = /* @__PURE__ */ Object.freeze({
  __proto__: null,
  labelDay: Sn,
  labelMonthDropdown: Wn,
  labelNext: Ln,
  labelPrevious: In,
  labelWeekNumber: Tn,
  labelWeekday: Fn,
  labelYearDropdown: Yn
});
function Hn() {
  var e = "buttons", t = Dn, n = ln, a = {}, r = {}, o = 1, i = {}, l = /* @__PURE__ */ new Date();
  return {
    captionLayout: e,
    classNames: t,
    formatters: On,
    labels: En,
    locale: n,
    modifiersClassNames: a,
    modifiers: r,
    numberOfMonths: o,
    styles: i,
    today: l,
    mode: "default"
  };
}
function Rn(e) {
  var t = e.fromYear, n = e.toYear, a = e.fromMonth, r = e.toMonth, o = e.fromDate, i = e.toDate;
  return a ? o = x(a) : t && (o = new Date(t, 0, 1)), r ? i = ve(r) : n && (i = new Date(n, 11, 31)), {
    fromDate: o ? Z(o) : void 0,
    toDate: i ? Z(i) : void 0
  };
}
var Ye = Y(void 0);
function Bn(e) {
  var t, n = e.initialProps, a = Hn(), r = Rn(n), o = r.fromDate, i = r.toDate, l = (t = n.captionLayout) !== null && t !== void 0 ? t : a.captionLayout;
  l !== "buttons" && (!o || !i) && (l = "buttons");
  var d;
  (J(n) || V(n) || G(n)) && (d = n.onSelect);
  var c = y(y(y({}, a), n), { captionLayout: l, classNames: y(y({}, a.classNames), n.classNames), components: y({}, n.components), formatters: y(y({}, a.formatters), n.formatters), fromDate: o, labels: y(y({}, a.labels), n.labels), mode: n.mode || a.mode, modifiers: y(y({}, a.modifiers), n.modifiers), modifiersClassNames: y(y({}, a.modifiersClassNames), n.modifiersClassNames), onSelect: d, styles: y(y({}, a.styles), n.styles), toDate: i });
  return s(Ye.Provider, { value: c, children: e.children });
}
function M() {
  var e = E(Ye);
  if (!e)
    throw new Error("useDayPicker must be used within a DayPickerProvider.");
  return e;
}
function Ee(e) {
  var t = M(), n = t.locale, a = t.classNames, r = t.styles, o = t.formatters.formatCaption;
  return s("div", { className: a.caption_label, style: r.caption_label, "aria-live": "polite", role: "presentation", id: e.id, children: o(e.displayMonth, { locale: n }) });
}
function An(e) {
  return s("svg", y({ width: "8px", height: "8px", viewBox: "0 0 120 120", "data-testid": "iconDropdown" }, e, { children: s("path", { d: "M4.22182541,48.2218254 C8.44222828,44.0014225 15.2388494,43.9273804 19.5496459,47.9996989 L19.7781746,48.2218254 L60,88.443 L100.221825,48.2218254 C104.442228,44.0014225 111.238849,43.9273804 115.549646,47.9996989 L115.778175,48.2218254 C119.998577,52.4422283 120.07262,59.2388494 116.000301,63.5496459 L115.778175,63.7781746 L67.7781746,111.778175 C63.5577717,115.998577 56.7611506,116.07262 52.4503541,112.000301 L52.2218254,111.778175 L4.22182541,63.7781746 C-0.0739418023,59.4824074 -0.0739418023,52.5175926 4.22182541,48.2218254 Z", fill: "currentColor", fillRule: "nonzero" }) }));
}
function He(e) {
  var t, n, a = e.onChange, r = e.value, o = e.children, i = e.caption, l = e.className, d = e.style, c = M(), u = (n = (t = c.components) === null || t === void 0 ? void 0 : t.IconDropdown) !== null && n !== void 0 ? n : An;
  return C("div", { className: l, style: d, children: [s("span", { className: c.classNames.vhidden, children: e["aria-label"] }), s("select", { name: e.name, "aria-label": e["aria-label"], className: c.classNames.dropdown, style: c.styles.dropdown, value: r, onChange: a, children: o }), C("div", { className: c.classNames.caption_label, style: c.styles.caption_label, "aria-hidden": "true", children: [i, s(u, { className: c.classNames.dropdown_icon, style: c.styles.dropdown_icon })] })] });
}
function jn(e) {
  var t, n = M(), a = n.fromDate, r = n.toDate, o = n.styles, i = n.locale, l = n.formatters.formatMonthCaption, d = n.classNames, c = n.components, u = n.labels.labelMonthDropdown;
  if (!a)
    return s(F, {});
  if (!r)
    return s(F, {});
  var f = [];
  if (gn(a, r))
    for (var v = x(a), m = a.getMonth(); m <= r.getMonth(); m++)
      f.push(oe(v, m));
  else
    for (var v = x(/* @__PURE__ */ new Date()), m = 0; m <= 11; m++)
      f.push(oe(v, m));
  var p = function(_) {
    var k = Number(_.target.value), D = oe(x(e.displayMonth), k);
    e.onChange(D);
  }, g = (t = c?.Dropdown) !== null && t !== void 0 ? t : He;
  return s(g, { name: "months", "aria-label": u(), className: d.dropdown_month, style: o.dropdown_month, onChange: p, value: e.displayMonth.getMonth(), caption: l(e.displayMonth, { locale: i }), children: f.map(function(_) {
    return s("option", { value: _.getMonth(), children: l(_, { locale: i }) }, _.getMonth());
  }) });
}
function zn(e) {
  var t, n = e.displayMonth, a = M(), r = a.fromDate, o = a.toDate, i = a.locale, l = a.styles, d = a.classNames, c = a.components, u = a.formatters.formatYearCaption, f = a.labels.labelYearDropdown, v = [];
  if (!r)
    return s(F, {});
  if (!o)
    return s(F, {});
  for (var m = r.getFullYear(), p = o.getFullYear(), g = m; g <= p; g++)
    v.push(Pe(sn(/* @__PURE__ */ new Date()), g));
  var _ = function(D) {
    var B = Pe(x(n), Number(D.target.value));
    e.onChange(B);
  }, k = (t = c?.Dropdown) !== null && t !== void 0 ? t : He;
  return s(k, { name: "years", "aria-label": f(), className: d.dropdown_year, style: l.dropdown_year, onChange: _, value: n.getFullYear(), caption: u(n, { locale: i }), children: v.map(function(D) {
    return s("option", { value: D.getFullYear(), children: u(D, { locale: i }) }, D.getFullYear());
  }) });
}
function Un(e, t) {
  var n = j(e), a = n[0], r = n[1], o = t === void 0 ? a : t;
  return [o, r];
}
function Kn(e) {
  var t = e.month, n = e.defaultMonth, a = e.today, r = t || n || a || /* @__PURE__ */ new Date(), o = e.toDate, i = e.fromDate, l = e.numberOfMonths, d = l === void 0 ? 1 : l;
  if (o && U(o, r) < 0) {
    var c = -1 * (d - 1);
    r = O(o, c);
  }
  return i && U(r, i) < 0 && (r = i), x(r);
}
function Vn() {
  var e = M(), t = Kn(e), n = Un(t, e.month), a = n[0], r = n[1], o = function(i) {
    var l;
    if (!e.disableNavigation) {
      var d = x(i);
      r(d), (l = e.onMonthChange) === null || l === void 0 || l.call(e, d);
    }
  };
  return [a, o];
}
function Gn(e, t) {
  for (var n = t.reverseMonths, a = t.numberOfMonths, r = x(e), o = x(O(r, a)), i = U(o, r), l = [], d = 0; d < i; d++) {
    var c = O(r, d);
    l.push(c);
  }
  return n && (l = l.reverse()), l;
}
function Qn(e, t) {
  if (!t.disableNavigation) {
    var n = t.toDate, a = t.pagedNavigation, r = t.numberOfMonths, o = r === void 0 ? 1 : r, i = a ? o : 1, l = x(e);
    if (!n)
      return O(l, i);
    var d = U(n, e);
    if (!(d < o))
      return O(l, i);
  }
}
function Zn(e, t) {
  if (!t.disableNavigation) {
    var n = t.fromDate, a = t.pagedNavigation, r = t.numberOfMonths, o = r === void 0 ? 1 : r, i = a ? o : 1, l = x(e);
    if (!n)
      return O(l, -i);
    var d = U(l, n);
    if (!(d <= 0))
      return O(l, -i);
  }
}
var Re = Y(void 0);
function qn(e) {
  var t = M(), n = Vn(), a = n[0], r = n[1], o = Gn(a, t), i = Qn(a, t), l = Zn(a, t), d = function(f) {
    return o.some(function(v) {
      return K(f, v);
    });
  }, c = function(f, v) {
    d(f) || (v && Fe(f, v) ? r(O(f, 1 + t.numberOfMonths * -1)) : r(f));
  }, u = {
    currentMonth: a,
    displayMonths: o,
    goToMonth: r,
    goToDate: c,
    previousMonth: l,
    nextMonth: i,
    isDateDisplayed: d
  };
  return s(Re.Provider, { value: u, children: e.children });
}
function R() {
  var e = E(Re);
  if (!e)
    throw new Error("useNavigation must be used within a NavigationProvider");
  return e;
}
function xe(e) {
  var t, n = M(), a = n.classNames, r = n.styles, o = n.components, i = R().goToMonth, l = function(u) {
    i(O(u, e.displayIndex ? -e.displayIndex : 0));
  }, d = (t = o?.CaptionLabel) !== null && t !== void 0 ? t : Ee, c = s(d, { id: e.id, displayMonth: e.displayMonth });
  return C("div", { className: a.caption_dropdowns, style: r.caption_dropdowns, children: [s("div", { className: a.vhidden, children: c }), s(jn, { onChange: l, displayMonth: e.displayMonth }), s(zn, { onChange: l, displayMonth: e.displayMonth })] });
}
function Xn(e) {
  return s("svg", y({ width: "16px", height: "16px", viewBox: "0 0 120 120" }, e, { children: s("path", { d: "M69.490332,3.34314575 C72.6145263,0.218951416 77.6798462,0.218951416 80.8040405,3.34314575 C83.8617626,6.40086786 83.9268205,11.3179931 80.9992143,14.4548388 L80.8040405,14.6568542 L35.461,60 L80.8040405,105.343146 C83.8617626,108.400868 83.9268205,113.317993 80.9992143,116.454839 L80.8040405,116.656854 C77.7463184,119.714576 72.8291931,119.779634 69.6923475,116.852028 L69.490332,116.656854 L18.490332,65.6568542 C15.4326099,62.5991321 15.367552,57.6820069 18.2951583,54.5451612 L18.490332,54.3431458 L69.490332,3.34314575 Z", fill: "currentColor", fillRule: "nonzero" }) }));
}
function Jn(e) {
  return s("svg", y({ width: "16px", height: "16px", viewBox: "0 0 120 120" }, e, { children: s("path", { d: "M49.8040405,3.34314575 C46.6798462,0.218951416 41.6145263,0.218951416 38.490332,3.34314575 C35.4326099,6.40086786 35.367552,11.3179931 38.2951583,14.4548388 L38.490332,14.6568542 L83.8333725,60 L38.490332,105.343146 C35.4326099,108.400868 35.367552,113.317993 38.2951583,116.454839 L38.490332,116.656854 C41.5480541,119.714576 46.4651794,119.779634 49.602025,116.852028 L49.8040405,116.656854 L100.804041,65.6568542 C103.861763,62.5991321 103.926821,57.6820069 100.999214,54.5451612 L100.804041,54.3431458 L49.8040405,3.34314575 Z", fill: "currentColor" }) }));
}
var q = tn(function(e, t) {
  var n = M(), a = n.classNames, r = n.styles, o = [a.button_reset, a.button];
  e.className && o.push(e.className);
  var i = o.join(" "), l = y(y({}, r.button_reset), r.button);
  return e.style && Object.assign(l, e.style), s("button", y({}, e, { ref: t, type: "button", className: i, style: l }));
});
function $n(e) {
  var t, n, a = M(), r = a.dir, o = a.locale, i = a.classNames, l = a.styles, d = a.labels, c = d.labelPrevious, u = d.labelNext, f = a.components;
  if (!e.nextMonth && !e.previousMonth)
    return s(F, {});
  var v = c(e.previousMonth, { locale: o }), m = [
    i.nav_button,
    i.nav_button_previous
  ].join(" "), p = u(e.nextMonth, { locale: o }), g = [
    i.nav_button,
    i.nav_button_next
  ].join(" "), _ = (t = f?.IconRight) !== null && t !== void 0 ? t : Jn, k = (n = f?.IconLeft) !== null && n !== void 0 ? n : Xn;
  return C("div", { className: i.nav, style: l.nav, children: [!e.hidePrevious && s(q, { name: "previous-month", "aria-label": v, className: m, style: l.nav_button_previous, disabled: !e.previousMonth, onClick: e.onPreviousClick, children: r === "rtl" ? s(_, { className: i.nav_icon, style: l.nav_icon }) : s(k, { className: i.nav_icon, style: l.nav_icon }) }), !e.hideNext && s(q, { name: "next-month", "aria-label": p, className: g, style: l.nav_button_next, disabled: !e.nextMonth, onClick: e.onNextClick, children: r === "rtl" ? s(k, { className: i.nav_icon, style: l.nav_icon }) : s(_, { className: i.nav_icon, style: l.nav_icon }) })] });
}
function Oe(e) {
  var t = M().numberOfMonths, n = R(), a = n.previousMonth, r = n.nextMonth, o = n.goToMonth, i = n.displayMonths, l = i.findIndex(function(p) {
    return K(e.displayMonth, p);
  }), d = l === 0, c = l === i.length - 1, u = t > 1 && (d || !c), f = t > 1 && (c || !d), v = function() {
    a && o(a);
  }, m = function() {
    r && o(r);
  };
  return s($n, { displayMonth: e.displayMonth, hideNext: u, hidePrevious: f, nextMonth: r, previousMonth: a, onPreviousClick: v, onNextClick: m });
}
function et(e) {
  var t, n = M(), a = n.classNames, r = n.disableNavigation, o = n.styles, i = n.captionLayout, l = n.components, d = (t = l?.CaptionLabel) !== null && t !== void 0 ? t : Ee, c;
  return r ? c = s(d, { id: e.id, displayMonth: e.displayMonth }) : i === "dropdown" ? c = s(xe, { displayMonth: e.displayMonth, id: e.id }) : i === "dropdown-buttons" ? c = C(F, { children: [s(xe, { displayMonth: e.displayMonth, displayIndex: e.displayIndex, id: e.id }), s(Oe, { displayMonth: e.displayMonth, displayIndex: e.displayIndex, id: e.id })] }) : c = C(F, { children: [s(d, { id: e.id, displayMonth: e.displayMonth, displayIndex: e.displayIndex }), s(Oe, { displayMonth: e.displayMonth, id: e.id })] }), s("div", { className: a.caption, style: o.caption, children: c });
}
function nt(e) {
  var t = M(), n = t.footer, a = t.styles, r = t.classNames.tfoot;
  return n ? s("tfoot", { className: r, style: a.tfoot, children: s("tr", { children: s("td", { colSpan: 8, children: n }) }) }) : s(F, {});
}
function tt(e, t, n) {
  for (var a = n ? fe(/* @__PURE__ */ new Date()) : z(/* @__PURE__ */ new Date(), { locale: e, weekStartsOn: t }), r = [], o = 0; o < 7; o++) {
    var i = w(a, o);
    r.push(i);
  }
  return r;
}
function at() {
  var e = M(), t = e.classNames, n = e.styles, a = e.showWeekNumber, r = e.locale, o = e.weekStartsOn, i = e.ISOWeek, l = e.formatters.formatWeekdayName, d = e.labels.labelWeekday, c = tt(r, o, i);
  return C("tr", { style: n.head_row, className: t.head_row, children: [a && s("td", { style: n.head_cell, className: t.head_cell }), c.map(function(u, f) {
    return s("th", { scope: "col", className: t.head_cell, style: n.head_cell, "aria-label": d(u, { locale: r }), children: l(u, { locale: r }) }, f);
  })] });
}
function rt() {
  var e, t = M(), n = t.classNames, a = t.styles, r = t.components, o = (e = r?.HeadRow) !== null && e !== void 0 ? e : at;
  return s("thead", { style: a.head, className: n.head, children: s(o, {}) });
}
function ot(e) {
  var t = M(), n = t.locale, a = t.formatters.formatDay;
  return s(F, { children: a(e.date, { locale: n }) });
}
var me = Y(void 0);
function it(e) {
  if (!V(e.initialProps)) {
    var t = {
      selected: void 0,
      modifiers: {
        disabled: []
      }
    };
    return s(me.Provider, { value: t, children: e.children });
  }
  return s(lt, { initialProps: e.initialProps, children: e.children });
}
function lt(e) {
  var t = e.initialProps, n = e.children, a = t.selected, r = t.min, o = t.max, i = function(c, u, f) {
    var v, m;
    (v = t.onDayClick) === null || v === void 0 || v.call(t, c, u, f);
    var p = !!(u.selected && r && a?.length === r);
    if (!p) {
      var g = !!(!u.selected && o && a?.length === o);
      if (!g) {
        var _ = a ? Te([], a) : [];
        if (u.selected) {
          var k = _.findIndex(function(D) {
            return P(c, D);
          });
          _.splice(k, 1);
        } else
          _.push(c);
        (m = t.onSelect) === null || m === void 0 || m.call(t, _, c, u, f);
      }
    }
  }, l = {
    disabled: []
  };
  a && l.disabled.push(function(c) {
    var u = o && a.length > o - 1, f = a.some(function(v) {
      return P(v, c);
    });
    return !!(u && !f);
  });
  var d = {
    selected: a,
    onDayClick: i,
    modifiers: l
  };
  return s(me.Provider, { value: d, children: n });
}
function ye() {
  var e = E(me);
  if (!e)
    throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");
  return e;
}
function st(e, t) {
  var n = t || {}, a = n.from, r = n.to;
  return a && r ? P(r, e) && P(a, e) ? void 0 : P(r, e) ? { from: r, to: void 0 } : P(a, e) ? void 0 : ce(a, e) ? { from: e, to: r } : { from: a, to: e } : r ? ce(e, r) ? { from: r, to: e } : { from: e, to: r } : a ? Fe(e, a) ? { from: e, to: a } : { from: a, to: e } : { from: e, to: void 0 };
}
var be = Y(void 0);
function dt(e) {
  if (!G(e.initialProps)) {
    var t = {
      selected: void 0,
      modifiers: {
        range_start: [],
        range_end: [],
        range_middle: [],
        disabled: []
      }
    };
    return s(be.Provider, { value: t, children: e.children });
  }
  return s(ut, { initialProps: e.initialProps, children: e.children });
}
function ut(e) {
  var t = e.initialProps, n = e.children, a = t.selected, r = a || {}, o = r.from, i = r.to, l = t.min, d = t.max, c = function(m, p, g) {
    var _, k;
    (_ = t.onDayClick) === null || _ === void 0 || _.call(t, m, p, g);
    var D = st(m, a);
    (k = t.onSelect) === null || k === void 0 || k.call(t, D, m, p, g);
  }, u = {
    range_start: [],
    range_end: [],
    range_middle: [],
    disabled: []
  };
  if (o ? (u.range_start = [o], i ? (u.range_end = [i], P(o, i) || (u.range_middle = [
    {
      after: o,
      before: i
    }
  ])) : u.range_end = [o]) : i && (u.range_start = [i], u.range_end = [i]), l && (o && !i && u.disabled.push({
    after: re(o, l - 1),
    before: w(o, l - 1)
  }), o && i && u.disabled.push({
    after: o,
    before: w(o, l - 1)
  }), !o && i && u.disabled.push({
    after: re(i, l - 1),
    before: w(i, l - 1)
  })), d) {
    if (o && !i && (u.disabled.push({
      before: w(o, -d + 1)
    }), u.disabled.push({
      after: w(o, d - 1)
    })), o && i) {
      var f = I(i, o) + 1, v = d - f;
      u.disabled.push({
        before: re(o, v)
      }), u.disabled.push({
        after: w(i, v)
      });
    }
    !o && i && (u.disabled.push({
      before: w(i, -d + 1)
    }), u.disabled.push({
      after: w(i, d - 1)
    }));
  }
  return s(be.Provider, { value: { selected: a, onDayClick: c, modifiers: u }, children: n });
}
function pe() {
  var e = E(be);
  if (!e)
    throw new Error("useSelectRange must be used within a SelectRangeProvider");
  return e;
}
function Q(e) {
  return Array.isArray(e) ? Te([], e) : e !== void 0 ? [e] : [];
}
function ct(e) {
  var t = {};
  return Object.entries(e).forEach(function(n) {
    var a = n[0], r = n[1];
    t[a] = Q(r);
  }), t;
}
var S;
(function(e) {
  e.Outside = "outside", e.Disabled = "disabled", e.Selected = "selected", e.Hidden = "hidden", e.Today = "today", e.RangeStart = "range_start", e.RangeEnd = "range_end", e.RangeMiddle = "range_middle";
})(S || (S = {}));
var ft = S.Selected, W = S.Disabled, vt = S.Hidden, ht = S.Today, ie = S.RangeEnd, le = S.RangeMiddle, se = S.RangeStart, mt = S.Outside;
function yt(e, t, n) {
  var a, r = (a = {}, a[ft] = Q(e.selected), a[W] = Q(e.disabled), a[vt] = Q(e.hidden), a[ht] = [e.today], a[ie] = [], a[le] = [], a[se] = [], a[mt] = [], a);
  return e.fromDate && r[W].push({ before: e.fromDate }), e.toDate && r[W].push({ after: e.toDate }), V(e) ? r[W] = r[W].concat(t.modifiers[W]) : G(e) && (r[W] = r[W].concat(n.modifiers[W]), r[se] = n.modifiers[se], r[le] = n.modifiers[le], r[ie] = n.modifiers[ie]), r;
}
var Be = Y(void 0);
function bt(e) {
  var t = M(), n = ye(), a = pe(), r = yt(t, n, a), o = ct(t.modifiers), i = y(y({}, r), o);
  return s(Be.Provider, { value: i, children: e.children });
}
function Ae() {
  var e = E(Be);
  if (!e)
    throw new Error("useModifiers must be used within a ModifiersProvider");
  return e;
}
function pt(e) {
  return !!(e && typeof e == "object" && "before" in e && "after" in e);
}
function _t(e) {
  return !!(e && typeof e == "object" && "from" in e);
}
function gt(e) {
  return !!(e && typeof e == "object" && "after" in e);
}
function Mt(e) {
  return !!(e && typeof e == "object" && "before" in e);
}
function Dt(e) {
  return !!(e && typeof e == "object" && "dayOfWeek" in e);
}
function Nt(e, t) {
  var n, a = t.from, r = t.to;
  if (a && r) {
    var o = I(r, a) < 0;
    o && (n = [r, a], a = n[0], r = n[1]);
    var i = I(e, a) >= 0 && I(r, e) >= 0;
    return i;
  }
  return r ? P(r, e) : a ? P(a, e) : !1;
}
function kt(e) {
  return Le(e);
}
function wt(e) {
  return Array.isArray(e) && e.every(Le);
}
function Ct(e, t) {
  return t.some(function(n) {
    if (typeof n == "boolean")
      return n;
    if (kt(n))
      return P(e, n);
    if (wt(n))
      return n.includes(e);
    if (_t(n))
      return Nt(e, n);
    if (Dt(n))
      return n.dayOfWeek.includes(e.getDay());
    if (pt(n)) {
      var a = I(n.before, e), r = I(n.after, e), o = a > 0, i = r < 0, l = ce(n.before, n.after);
      return l ? i && o : o || i;
    }
    return gt(n) ? I(e, n.after) > 0 : Mt(n) ? I(n.before, e) > 0 : typeof n == "function" ? n(e) : !1;
  });
}
function _e(e, t, n) {
  var a = Object.keys(t).reduce(function(o, i) {
    var l = t[i];
    return Ct(e, l) && o.push(i), o;
  }, []), r = {};
  return a.forEach(function(o) {
    return r[o] = !0;
  }), n && !K(e, n) && (r.outside = !0), r;
}
function Pt(e, t) {
  for (var n = x(e[0]), a = ve(e[e.length - 1]), r, o, i = n; i <= a; ) {
    var l = _e(i, t), d = !l.disabled && !l.hidden;
    if (!d) {
      i = w(i, 1);
      continue;
    }
    if (l.selected)
      return i;
    l.today && !o && (o = i), r || (r = i), i = w(i, 1);
  }
  return o || r;
}
var xt = 365;
function je(e, t) {
  var n = t.moveBy, a = t.direction, r = t.context, o = t.modifiers, i = t.retry, l = i === void 0 ? { count: 0, lastFocused: e } : i, d = r.weekStartsOn, c = r.fromDate, u = r.toDate, f = r.locale, v = {
    day: w,
    week: ue,
    month: O,
    year: fn,
    startOfWeek: function(_) {
      return r.ISOWeek ? fe(_) : z(_, { locale: f, weekStartsOn: d });
    },
    endOfWeek: function(_) {
      return r.ISOWeek ? Ie(_) : he(_, { locale: f, weekStartsOn: d });
    }
  }, m = v[n](e, a === "after" ? 1 : -1);
  a === "before" && c ? m = vn([c, m]) : a === "after" && u && (m = hn([u, m]));
  var p = !0;
  if (o) {
    var g = _e(m, o);
    p = !g.disabled && !g.hidden;
  }
  return p ? m : l.count > xt ? l.lastFocused : je(m, {
    moveBy: n,
    direction: a,
    context: r,
    modifiers: o,
    retry: y(y({}, l), { count: l.count + 1 })
  });
}
var ze = Y(void 0);
function Ot(e) {
  var t = R(), n = Ae(), a = j(), r = a[0], o = a[1], i = j(), l = i[0], d = i[1], c = Pt(t.displayMonths, n), u = r ?? (l && t.isDateDisplayed(l)) ? l : c, f = function() {
    d(r), o(void 0);
  }, v = function(_) {
    o(_);
  }, m = M(), p = function(_, k) {
    if (r) {
      var D = je(r, {
        moveBy: _,
        direction: k,
        context: m,
        modifiers: n
      });
      P(r, D) || (t.goToDate(D, r), v(D));
    }
  }, g = {
    focusedDay: r,
    focusTarget: u,
    blur: f,
    focus: v,
    focusDayAfter: function() {
      return p("day", "after");
    },
    focusDayBefore: function() {
      return p("day", "before");
    },
    focusWeekAfter: function() {
      return p("week", "after");
    },
    focusWeekBefore: function() {
      return p("week", "before");
    },
    focusMonthBefore: function() {
      return p("month", "before");
    },
    focusMonthAfter: function() {
      return p("month", "after");
    },
    focusYearBefore: function() {
      return p("year", "before");
    },
    focusYearAfter: function() {
      return p("year", "after");
    },
    focusStartOfWeek: function() {
      return p("startOfWeek", "before");
    },
    focusEndOfWeek: function() {
      return p("endOfWeek", "after");
    }
  };
  return s(ze.Provider, { value: g, children: e.children });
}
function ge() {
  var e = E(ze);
  if (!e)
    throw new Error("useFocusContext must be used within a FocusProvider");
  return e;
}
function St(e, t) {
  var n = Ae(), a = _e(e, n, t);
  return a;
}
var Me = Y(void 0);
function Wt(e) {
  if (!J(e.initialProps)) {
    var t = {
      selected: void 0
    };
    return s(Me.Provider, { value: t, children: e.children });
  }
  return s(Lt, { initialProps: e.initialProps, children: e.children });
}
function Lt(e) {
  var t = e.initialProps, n = e.children, a = function(o, i, l) {
    var d, c, u;
    if ((d = t.onDayClick) === null || d === void 0 || d.call(t, o, i, l), i.selected && !t.required) {
      (c = t.onSelect) === null || c === void 0 || c.call(t, void 0, o, i, l);
      return;
    }
    (u = t.onSelect) === null || u === void 0 || u.call(t, o, o, i, l);
  }, r = {
    selected: t.selected,
    onDayClick: a
  };
  return s(Me.Provider, { value: r, children: n });
}
function Ue() {
  var e = E(Me);
  if (!e)
    throw new Error("useSelectSingle must be used within a SelectSingleProvider");
  return e;
}
function It(e, t) {
  var n = M(), a = Ue(), r = ye(), o = pe(), i = ge(), l = i.focusDayAfter, d = i.focusDayBefore, c = i.focusWeekAfter, u = i.focusWeekBefore, f = i.blur, v = i.focus, m = i.focusMonthBefore, p = i.focusMonthAfter, g = i.focusYearBefore, _ = i.focusYearAfter, k = i.focusStartOfWeek, D = i.focusEndOfWeek, B = function(b) {
    var h, ne, te, ae;
    J(n) ? (h = a.onDayClick) === null || h === void 0 || h.call(a, e, t, b) : V(n) ? (ne = r.onDayClick) === null || ne === void 0 || ne.call(r, e, t, b) : G(n) ? (te = o.onDayClick) === null || te === void 0 || te.call(o, e, t, b) : (ae = n.onDayClick) === null || ae === void 0 || ae.call(n, e, t, b);
  }, $ = function(b) {
    var h;
    v(e), (h = n.onDayFocus) === null || h === void 0 || h.call(n, e, t, b);
  }, ee = function(b) {
    var h;
    f(), (h = n.onDayBlur) === null || h === void 0 || h.call(n, e, t, b);
  }, A = function(b) {
    var h;
    (h = n.onDayMouseEnter) === null || h === void 0 || h.call(n, e, t, b);
  }, Ke = function(b) {
    var h;
    (h = n.onDayMouseLeave) === null || h === void 0 || h.call(n, e, t, b);
  }, Ve = function(b) {
    var h;
    (h = n.onDayPointerEnter) === null || h === void 0 || h.call(n, e, t, b);
  }, Ge = function(b) {
    var h;
    (h = n.onDayPointerLeave) === null || h === void 0 || h.call(n, e, t, b);
  }, Qe = function(b) {
    var h;
    (h = n.onDayTouchCancel) === null || h === void 0 || h.call(n, e, t, b);
  }, Ze = function(b) {
    var h;
    (h = n.onDayTouchEnd) === null || h === void 0 || h.call(n, e, t, b);
  }, qe = function(b) {
    var h;
    (h = n.onDayTouchMove) === null || h === void 0 || h.call(n, e, t, b);
  }, Xe = function(b) {
    var h;
    (h = n.onDayTouchStart) === null || h === void 0 || h.call(n, e, t, b);
  }, Je = function(b) {
    var h;
    (h = n.onDayKeyUp) === null || h === void 0 || h.call(n, e, t, b);
  }, $e = function(b) {
    var h;
    switch (b.key) {
      case "ArrowLeft":
        b.preventDefault(), b.stopPropagation(), n.dir === "rtl" ? l() : d();
        break;
      case "ArrowRight":
        b.preventDefault(), b.stopPropagation(), n.dir === "rtl" ? d() : l();
        break;
      case "ArrowDown":
        b.preventDefault(), b.stopPropagation(), c();
        break;
      case "ArrowUp":
        b.preventDefault(), b.stopPropagation(), u();
        break;
      case "PageUp":
        b.preventDefault(), b.stopPropagation(), b.shiftKey ? g() : m();
        break;
      case "PageDown":
        b.preventDefault(), b.stopPropagation(), b.shiftKey ? _() : p();
        break;
      case "Home":
        b.preventDefault(), b.stopPropagation(), k();
        break;
      case "End":
        b.preventDefault(), b.stopPropagation(), D();
        break;
    }
    (h = n.onDayKeyDown) === null || h === void 0 || h.call(n, e, t, b);
  }, en = {
    onClick: B,
    onFocus: $,
    onBlur: ee,
    onKeyDown: $e,
    onKeyUp: Je,
    onMouseEnter: A,
    onMouseLeave: Ke,
    onPointerEnter: Ve,
    onPointerLeave: Ge,
    onTouchCancel: Qe,
    onTouchEnd: Ze,
    onTouchMove: qe,
    onTouchStart: Xe
  };
  return en;
}
function Ft() {
  var e = M(), t = Ue(), n = ye(), a = pe(), r = J(e) ? t.selected : V(e) ? n.selected : G(e) ? a.selected : void 0;
  return r;
}
function Tt(e) {
  return Object.values(S).includes(e);
}
function Yt(e, t) {
  var n = [e.classNames.day];
  return Object.keys(t).forEach(function(a) {
    var r = e.modifiersClassNames[a];
    if (r)
      n.push(r);
    else if (Tt(a)) {
      var o = e.classNames["day_".concat(a)];
      o && n.push(o);
    }
  }), n;
}
function Et(e, t) {
  var n = y({}, e.styles.day);
  return Object.keys(t).forEach(function(a) {
    var r;
    n = y(y({}, n), (r = e.modifiersStyles) === null || r === void 0 ? void 0 : r[a]);
  }), n;
}
function Ht(e, t, n) {
  var a, r, o, i = M(), l = ge(), d = St(e, t), c = It(e, d), u = Ft(), f = !!(i.onDayClick || i.mode !== "default");
  X(function() {
    var A;
    d.outside || l.focusedDay && f && P(l.focusedDay, e) && ((A = n.current) === null || A === void 0 || A.focus());
  }, [
    l.focusedDay,
    e,
    n,
    f,
    d.outside
  ]);
  var v = Yt(i, d).join(" "), m = Et(i, d), p = !!(d.outside && !i.showOutsideDays || d.hidden), g = (o = (r = i.components) === null || r === void 0 ? void 0 : r.DayContent) !== null && o !== void 0 ? o : ot, _ = s(g, { date: e, displayMonth: t, activeModifiers: d }), k = {
    style: m,
    className: v,
    children: _,
    role: "gridcell"
  }, D = l.focusTarget && P(l.focusTarget, e) && !d.outside, B = l.focusedDay && P(l.focusedDay, e), $ = y(y(y({}, k), (a = { disabled: d.disabled, role: "gridcell" }, a["aria-selected"] = d.selected, a.tabIndex = B || D ? 0 : -1, a)), c), ee = {
    isButton: f,
    isHidden: p,
    activeModifiers: d,
    selectedDays: u,
    buttonProps: $,
    divProps: k
  };
  return ee;
}
function Rt(e) {
  var t = rn(null), n = Ht(e.date, e.displayMonth, t);
  return n.isHidden ? s("div", { role: "gridcell" }) : n.isButton ? s(q, y({ name: "day", ref: t }, n.buttonProps)) : s("div", y({}, n.divProps));
}
function Bt(e) {
  var t = e.number, n = e.dates, a = M(), r = a.onWeekNumberClick, o = a.styles, i = a.classNames, l = a.locale, d = a.labels.labelWeekNumber, c = a.formatters.formatWeekNumber, u = c(Number(t), { locale: l });
  if (!r)
    return s("span", { className: i.weeknumber, style: o.weeknumber, children: u });
  var f = d(Number(t), { locale: l }), v = function(m) {
    r(t, n, m);
  };
  return s(q, { name: "week-number", "aria-label": f, className: i.weeknumber, style: o.weeknumber, onClick: v, children: u });
}
function At(e) {
  var t, n, a = M(), r = a.styles, o = a.classNames, i = a.showWeekNumber, l = a.components, d = (t = l?.Day) !== null && t !== void 0 ? t : Rt, c = (n = l?.WeekNumber) !== null && n !== void 0 ? n : Bt, u;
  return i && (u = s("td", { className: o.cell, style: r.cell, children: s(c, { number: e.weekNumber, dates: e.dates }) })), C("tr", { className: o.row, style: r.row, children: [u, e.dates.map(function(f) {
    return s("td", { className: o.cell, style: r.cell, role: "presentation", children: s(d, { displayMonth: e.displayMonth, date: f }) }, bn(f));
  })] });
}
function Se(e, t, n) {
  for (var a = n?.ISOWeek ? Ie(t) : he(t, n), r = n?.ISOWeek ? fe(e) : z(e, n), o = I(a, r), i = [], l = 0; l <= o; l++)
    i.push(w(r, l));
  var d = i.reduce(function(c, u) {
    var f = n?.ISOWeek ? dn(u) : un(u, n), v = c.find(function(m) {
      return m.weekNumber === f;
    });
    return v ? (v.dates.push(u), c) : (c.push({
      weekNumber: f,
      dates: [u]
    }), c);
  }, []);
  return d;
}
function jt(e, t) {
  var n = Se(x(e), ve(e), t);
  if (t?.useFixedWeeks) {
    var a = _n(e, t);
    if (a < 6) {
      var r = n[n.length - 1], o = r.dates[r.dates.length - 1], i = ue(o, 6 - a), l = Se(ue(o, 1), i, t);
      n.push.apply(n, l);
    }
  }
  return n;
}
function zt(e) {
  var t, n, a, r = M(), o = r.locale, i = r.classNames, l = r.styles, d = r.hideHead, c = r.fixedWeeks, u = r.components, f = r.weekStartsOn, v = r.firstWeekContainsDate, m = r.ISOWeek, p = jt(e.displayMonth, {
    useFixedWeeks: !!c,
    ISOWeek: m,
    locale: o,
    weekStartsOn: f,
    firstWeekContainsDate: v
  }), g = (t = u?.Head) !== null && t !== void 0 ? t : rt, _ = (n = u?.Row) !== null && n !== void 0 ? n : At, k = (a = u?.Footer) !== null && a !== void 0 ? a : nt;
  return C("table", { id: e.id, className: i.table, style: l.table, role: "grid", "aria-labelledby": e["aria-labelledby"], children: [!d && s(g, {}), s("tbody", { className: i.tbody, style: l.tbody, children: p.map(function(D) {
    return s(_, { displayMonth: e.displayMonth, dates: D.dates, weekNumber: D.weekNumber }, D.weekNumber);
  }) }), s(k, { displayMonth: e.displayMonth })] });
}
function Ut() {
  return !!(typeof window < "u" && window.document && window.document.createElement);
}
var Kt = Ut() ? an : X, de = !1, Vt = 0;
function We() {
  return "react-day-picker-".concat(++Vt);
}
function Gt(e) {
  var t, n = e ?? (de ? We() : null), a = j(n), r = a[0], o = a[1];
  return Kt(function() {
    r === null && o(We());
  }, []), X(function() {
    de === !1 && (de = !0);
  }, []), (t = e ?? r) !== null && t !== void 0 ? t : void 0;
}
function Qt(e) {
  var t, n, a = M(), r = a.dir, o = a.classNames, i = a.styles, l = a.components, d = R().displayMonths, c = Gt(a.id ? "".concat(a.id, "-").concat(e.displayIndex) : void 0), u = a.id ? "".concat(a.id, "-grid-").concat(e.displayIndex) : void 0, f = [o.month], v = i.month, m = e.displayIndex === 0, p = e.displayIndex === d.length - 1, g = !m && !p;
  r === "rtl" && (t = [m, p], p = t[0], m = t[1]), m && (f.push(o.caption_start), v = y(y({}, v), i.caption_start)), p && (f.push(o.caption_end), v = y(y({}, v), i.caption_end)), g && (f.push(o.caption_between), v = y(y({}, v), i.caption_between));
  var _ = (n = l?.Caption) !== null && n !== void 0 ? n : et;
  return C("div", { className: f.join(" "), style: v, children: [s(_, { id: c, displayMonth: e.displayMonth, displayIndex: e.displayIndex }), s(zt, { id: u, "aria-labelledby": c, displayMonth: e.displayMonth })] }, e.displayIndex);
}
function Zt(e) {
  var t = M(), n = t.classNames, a = t.styles;
  return s("div", { className: n.months, style: a.months, children: e.children });
}
function qt(e) {
  var t, n, a = e.initialProps, r = M(), o = ge(), i = R(), l = j(!1), d = l[0], c = l[1];
  X(function() {
    r.initialFocus && o.focusTarget && (d || (o.focus(o.focusTarget), c(!0)));
  }, [
    r.initialFocus,
    d,
    o.focus,
    o.focusTarget,
    o
  ]);
  var u = [r.classNames.root, r.className];
  r.numberOfMonths > 1 && u.push(r.classNames.multiple_months), r.showWeekNumber && u.push(r.classNames.with_weeknumber);
  var f = y(y({}, r.styles.root), r.style), v = Object.keys(a).filter(function(p) {
    return p.startsWith("data-");
  }).reduce(function(p, g) {
    var _;
    return y(y({}, p), (_ = {}, _[g] = a[g], _));
  }, {}), m = (n = (t = a.components) === null || t === void 0 ? void 0 : t.Months) !== null && n !== void 0 ? n : Zt;
  return s("div", y({ className: u.join(" "), style: f, dir: r.dir, id: r.id, nonce: a.nonce, title: a.title, lang: a.lang }, v, { children: s(m, { children: i.displayMonths.map(function(p, g) {
    return s(Qt, { displayIndex: g, displayMonth: p }, g);
  }) }) }));
}
function Xt(e) {
  var t = e.children, n = Mn(e, ["children"]);
  return s(Bn, { initialProps: n, children: s(qn, { children: s(Wt, { initialProps: n, children: s(it, { initialProps: n, children: s(dt, { initialProps: n, children: s(bt, { children: s(Ot, { children: t }) }) }) }) }) }) });
}
function fa(e) {
  return s(Xt, y({}, e, { children: s(qt, { initialProps: e }) }));
}
const Jt = "creator_datePickerHeader_8HAzy", $t = "creator_datePickerHeaderMenu_idyfV", ea = "creator_datePickerHeaderMenuText_nBa1E", na = "creator_cursorPointer_QjQQC", ta = "creator_datePickerHeaderMenuNavigationDisabled_fHumM", L = { datePickerHeader: Jt, datePickerHeaderMenu: $t, datePickerHeaderMenuText: ea, cursorPointer: na, datePickerHeaderMenuNavigationDisabled: ta }, aa = (e) => {
  const { goToMonth: t, currentMonth: n, nextMonth: a, previousMonth: r } = R(), o = () => t(
    new Date(n.getFullYear() - 1, n.getMonth())
  ), i = () => t(
    new Date(n.getFullYear() + 1, n.getMonth())
  ), l = () => {
    r && t(r);
  }, d = () => {
    a && t(a);
  }, c = () => {
    e.handleModeSelection("months");
  }, u = () => {
    e.handleModeSelection("years");
  }, f = T(e.displayMonth, "MMM"), v = T(e.displayMonth, "yyy"), m = Ce(L.cursorPointer, {
    [L.datePickerHeaderMenuNavigationDisabled]: e.disablePastDates && K(/* @__PURE__ */ new Date(), n)
  }), p = Ce(L.cursorPointer, {
    [L.datePickerHeaderMenuNavigationDisabled]: e.disableFutureDates && K(/* @__PURE__ */ new Date(), n)
  });
  return {
    selectedMonth: f,
    selectedYear: v,
    navigateBeforeClassName: m,
    navigateAfterClassName: p,
    handleGoToPreviousMonth: l,
    handleGoToNextMonth: d,
    handleGoToPreviousYear: o,
    handleGoToNextYear: i,
    handleMonthsModeSelection: c,
    handleYearsModeSelection: u,
    ...e
  };
}, ra = ({
  selectedMonth: e,
  selectedYear: t,
  navigateBeforeClassName: n,
  navigateAfterClassName: a,
  handleGoToPreviousMonth: r,
  handleGoToNextMonth: o,
  handleGoToPreviousYear: i,
  handleGoToNextYear: l,
  handleMonthsModeSelection: d,
  handleYearsModeSelection: c
}) => /* @__PURE__ */ C("div", { className: L.datePickerHeader, children: [
  /* @__PURE__ */ C("div", { className: L.datePickerHeaderMenu, children: [
    /* @__PURE__ */ s(
      De,
      {
        size: 24,
        className: n,
        onClick: r
      }
    ),
    /* @__PURE__ */ C(
      "div",
      {
        className: L.datePickerHeaderMenuText,
        onClick: d,
        children: [
          e,
          " ",
          /* @__PURE__ */ s(Ne, { fontSize: "small" })
        ]
      }
    ),
    /* @__PURE__ */ s(
      ke,
      {
        size: 24,
        className: a,
        onClick: o
      }
    )
  ] }),
  /* @__PURE__ */ C("div", { className: L.datePickerHeaderMenu, children: [
    /* @__PURE__ */ s(
      De,
      {
        size: 24,
        className: n,
        onClick: i
      }
    ),
    /* @__PURE__ */ C(
      "div",
      {
        className: L.datePickerHeaderMenuText,
        onClick: c,
        children: [
          t,
          " ",
          /* @__PURE__ */ s(Ne, { fontSize: "small" })
        ]
      }
    ),
    /* @__PURE__ */ s(
      ke,
      {
        size: 24,
        className: a,
        onClick: l
      }
    )
  ] })
] }), va = nn(ra, aa);
export {
  va as C,
  fa as D,
  w as a,
  R as b,
  x as c,
  re as s,
  aa as u
};
