import { __exports as y } from "./index-_virtual70.js";
import de from "react";
import { __require as me } from "./index-prop-types.js";
import { __require as he } from "./index-DayCell.js";
import ye from "./index-_virtual54.js";
import ve from "./index-_virtual37.js";
import Oe from "./index-_virtual71.js";
import _e from "./index-_virtual68.js";
import De from "./index-_virtual51.js";
import ge from "./index-_virtual41.js";
import be from "./index-_virtual52.js";
import we from "./index-_virtual53.js";
import Pe from "./index-_virtual62.js";
import Me from "./index-_virtual61.js";
import Se from "./index-_virtual55.js";
import { __require as qe } from "./index-utils7.js";
var N;
function ze() {
  if (N) return y;
  N = 1;
  function d(e) {
    "@babel/helpers - typeof";
    return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? d = function(r) {
      return typeof r;
    } : d = function(r) {
      return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
    }, d(e);
  }
  Object.defineProperty(y, "__esModule", {
    value: !0
  }), y.default = void 0;
  var l = R(de), n = u(/* @__PURE__ */ me()), w = R(he()), P = u(ye), T = u(ve), I = u(Oe), F = u(_e), p = u(De), B = u(ge), M = u(be), S = u(we), C = u(Pe), L = u(Me), q = u(Se), H = qe();
  function u(e) {
    return e && e.__esModule ? e : { default: e };
  }
  function $(e) {
    if (typeof WeakMap != "function") return null;
    var t = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap();
    return ($ = function(o) {
      return o ? r : t;
    })(e);
  }
  function R(e, t) {
    if (e && e.__esModule)
      return e;
    if (e === null || d(e) !== "object" && typeof e != "function")
      return { default: e };
    var r = $(t);
    if (r && r.has(e))
      return r.get(e);
    var a = {}, o = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for (var f in e)
      if (f !== "default" && Object.prototype.hasOwnProperty.call(e, f)) {
        var s = o ? Object.getOwnPropertyDescriptor(e, f) : null;
        s && (s.get || s.set) ? Object.defineProperty(a, f, s) : a[f] = e[f];
      }
    return a.default = e, r && r.set(e, a), a;
  }
  function O() {
    return O = Object.assign || function(e) {
      for (var t = 1; t < arguments.length; t++) {
        var r = arguments[t];
        for (var a in r)
          Object.prototype.hasOwnProperty.call(r, a) && (e[a] = r[a]);
      }
      return e;
    }, O.apply(this, arguments);
  }
  function E(e, t) {
    var r = Object.keys(e);
    if (Object.getOwnPropertySymbols) {
      var a = Object.getOwnPropertySymbols(e);
      t && (a = a.filter(function(o) {
        return Object.getOwnPropertyDescriptor(e, o).enumerable;
      })), r.push.apply(r, a);
    }
    return r;
  }
  function W(e) {
    for (var t = 1; t < arguments.length; t++) {
      var r = arguments[t] != null ? arguments[t] : {};
      t % 2 ? E(Object(r), !0).forEach(function(a) {
        U(e, a, r[a]);
      }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : E(Object(r)).forEach(function(a) {
        Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(r, a));
      });
    }
    return e;
  }
  function U(e, t, r) {
    return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
  }
  function z(e, t) {
    if (!(e instanceof t))
      throw new TypeError("Cannot call a class as a function");
  }
  function A(e, t) {
    for (var r = 0; r < t.length; r++) {
      var a = t[r];
      a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(e, a.key, a);
    }
  }
  function K(e, t, r) {
    return t && A(e.prototype, t), e;
  }
  function G(e, t) {
    if (typeof t != "function" && t !== null)
      throw new TypeError("Super expression must either be null or a function");
    e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && _(e, t);
  }
  function _(e, t) {
    return _ = Object.setPrototypeOf || function(a, o) {
      return a.__proto__ = o, a;
    }, _(e, t);
  }
  function J(e) {
    var t = X();
    return function() {
      var a = v(e), o;
      if (t) {
        var f = v(this).constructor;
        o = Reflect.construct(a, arguments, f);
      } else
        o = a.apply(this, arguments);
      return Q(this, o);
    };
  }
  function Q(e, t) {
    return t && (d(t) === "object" || typeof t == "function") ? t : V(e);
  }
  function V(e) {
    if (e === void 0)
      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
    return e;
  }
  function X() {
    if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
    if (typeof Proxy == "function") return !0;
    try {
      return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
      })), !0;
    } catch {
      return !1;
    }
  }
  function v(e) {
    return v = Object.setPrototypeOf ? Object.getPrototypeOf : function(r) {
      return r.__proto__ || Object.getPrototypeOf(r);
    }, v(e);
  }
  function Y(e, t, r) {
    var a = /* @__PURE__ */ new Date();
    return /* @__PURE__ */ l.default.createElement("div", {
      className: e.weekDays
    }, (0, P.default)({
      start: (0, S.default)(a, t),
      end: (0, M.default)(a, t)
    }).map(function(o, f) {
      return /* @__PURE__ */ l.default.createElement("span", {
        className: e.weekDay,
        key: f
      }, (0, q.default)(o, r, t));
    }));
  }
  var D = /* @__PURE__ */ (function(e) {
    G(r, e);
    var t = J(r);
    function r() {
      return z(this, r), t.apply(this, arguments);
    }
    return K(r, [{
      key: "render",
      value: function() {
        var o = this, f = /* @__PURE__ */ new Date(), s = this.props, ee = s.displayMode, te = s.focusedRange, m = s.drag, h = s.styles, re = s.disabledDates, ae = s.disabledDay, j = this.props.minDate && (0, L.default)(this.props.minDate), k = this.props.maxDate && (0, C.default)(this.props.maxDate), c = (0, H.getMonthDisplayRange)(this.props.month, this.props.dateOptions, this.props.fixedHeight), g = this.props.ranges;
        if (ee === "dateRange" && m.status) {
          var x = m.range, ne = x.startDate, oe = x.endDate;
          g = g.map(function(i, b) {
            return b !== te[0] ? i : W(W({}, i), {}, {
              startDate: ne,
              endDate: oe
            });
          });
        }
        var ie = this.props.showPreview && !m.disablePreview;
        return /* @__PURE__ */ l.default.createElement("div", {
          className: h.month,
          style: this.props.style
        }, this.props.showMonthName ? /* @__PURE__ */ l.default.createElement("div", {
          className: h.monthName
        }, (0, q.default)(this.props.month, this.props.monthDisplayFormat, this.props.dateOptions)) : null, this.props.showWeekDays && Y(h, this.props.dateOptions, this.props.weekdayDisplayFormat), /* @__PURE__ */ l.default.createElement("div", {
          className: h.days,
          onMouseLeave: this.props.onMouseLeave
        }, (0, P.default)({
          start: c.start,
          end: c.end
        }).map(function(i, b) {
          var ue = (0, p.default)(i, c.startDateOfMonth), fe = (0, p.default)(i, c.endDateOfMonth), se = j && (0, B.default)(i, j) || k && (0, F.default)(i, k), le = re.some(function(ce) {
            return (0, p.default)(ce, i);
          }), pe = ae(i);
          return /* @__PURE__ */ l.default.createElement(w.default, O({}, o.props, {
            ranges: g,
            day: i,
            preview: ie ? o.props.preview : null,
            isWeekend: (0, I.default)(i, o.props.dateOptions),
            isToday: (0, p.default)(i, f),
            isStartOfWeek: (0, p.default)(i, (0, S.default)(i, o.props.dateOptions)),
            isEndOfWeek: (0, p.default)(i, (0, M.default)(i, o.props.dateOptions)),
            isStartOfMonth: ue,
            isEndOfMonth: fe,
            key: b,
            disabled: se || le || pe,
            isPassive: !(0, T.default)(i, {
              start: c.startDateOfMonth,
              end: c.endDateOfMonth
            }),
            styles: h,
            onMouseDown: o.props.onDragSelectionStart,
            onMouseUp: o.props.onDragSelectionEnd,
            onMouseEnter: o.props.onDragSelectionMove,
            dragRange: m.range,
            drag: m.status
          }));
        })));
      }
    }]), r;
  })(l.PureComponent);
  D.defaultProps = {}, D.propTypes = {
    style: n.default.object,
    styles: n.default.object,
    month: n.default.object,
    drag: n.default.object,
    dateOptions: n.default.object,
    disabledDates: n.default.array,
    disabledDay: n.default.func,
    preview: n.default.shape({
      startDate: n.default.object,
      endDate: n.default.object
    }),
    showPreview: n.default.bool,
    displayMode: n.default.oneOf(["dateRange", "date"]),
    minDate: n.default.object,
    maxDate: n.default.object,
    ranges: n.default.arrayOf(w.rangeShape),
    focusedRange: n.default.arrayOf(n.default.number),
    onDragSelectionStart: n.default.func,
    onDragSelectionEnd: n.default.func,
    onDragSelectionMove: n.default.func,
    onMouseLeave: n.default.func,
    monthDisplayFormat: n.default.string,
    weekdayDisplayFormat: n.default.string,
    dayDisplayFormat: n.default.string,
    showWeekDays: n.default.bool,
    showMonthName: n.default.bool,
    fixedHeight: n.default.bool
  };
  var Z = D;
  return y.default = Z, y;
}
export {
  ze as __require
};
