import { __exports as u } from "./index-defaultRanges2.js";
import R from "./index-_virtual40.js";
import q from "./index-_virtual51.js";
import T from "./index-_virtual52.js";
import W from "./index-_virtual53.js";
import P from "./index-_virtual57.js";
import S from "./index-_virtual45.js";
import k from "./index-_virtual46.js";
import L from "./index-_virtual61.js";
import j from "./index-_virtual62.js";
import C from "./index-_virtual39.js";
var v;
function F() {
  if (v) return u;
  v = 1, Object.defineProperty(u, "__esModule", {
    value: !0
  }), u.createStaticRanges = h, u.defaultInputRanges = u.defaultStaticRanges = void 0;
  var o = n(R), s = n(q), i = n(T), l = n(W), O = n(P), D = n(S), c = n(k), g = n(L), p = n(j), d = n(C);
  function n(e) {
    return e && e.__esModule ? e : { default: e };
  }
  function y(e, t) {
    var r = Object.keys(e);
    if (Object.getOwnPropertySymbols) {
      var f = Object.getOwnPropertySymbols(e);
      t && (f = f.filter(function(M) {
        return Object.getOwnPropertyDescriptor(e, M).enumerable;
      })), r.push.apply(r, f);
    }
    return r;
  }
  function m(e) {
    for (var t = 1; t < arguments.length; t++) {
      var r = arguments[t] != null ? arguments[t] : {};
      t % 2 ? y(Object(r), !0).forEach(function(f) {
        w(e, f, r[f]);
      }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : y(Object(r)).forEach(function(f) {
        Object.defineProperty(e, f, Object.getOwnPropertyDescriptor(r, f));
      });
    }
    return e;
  }
  function w(e, t, r) {
    return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
  }
  var a = {
    startOfWeek: (0, l.default)(/* @__PURE__ */ new Date()),
    endOfWeek: (0, i.default)(/* @__PURE__ */ new Date()),
    startOfLastWeek: (0, l.default)((0, d.default)(/* @__PURE__ */ new Date(), -7)),
    endOfLastWeek: (0, i.default)((0, d.default)(/* @__PURE__ */ new Date(), -7)),
    startOfToday: (0, g.default)(/* @__PURE__ */ new Date()),
    endOfToday: (0, p.default)(/* @__PURE__ */ new Date()),
    startOfYesterday: (0, g.default)((0, d.default)(/* @__PURE__ */ new Date(), -1)),
    endOfYesterday: (0, p.default)((0, d.default)(/* @__PURE__ */ new Date(), -1)),
    startOfMonth: (0, c.default)(/* @__PURE__ */ new Date()),
    endOfMonth: (0, D.default)(/* @__PURE__ */ new Date()),
    startOfLastMonth: (0, c.default)((0, O.default)(/* @__PURE__ */ new Date(), -1)),
    endOfLastMonth: (0, D.default)((0, O.default)(/* @__PURE__ */ new Date(), -1))
  }, _ = {
    range: {},
    isSelected: function(t) {
      var r = this.range();
      return (0, s.default)(t.startDate, r.startDate) && (0, s.default)(t.endDate, r.endDate);
    }
  };
  function h(e) {
    return e.map(function(t) {
      return m(m({}, _), t);
    });
  }
  var b = h([{
    label: "Today",
    range: function() {
      return {
        startDate: a.startOfToday,
        endDate: a.endOfToday
      };
    }
  }, {
    label: "Yesterday",
    range: function() {
      return {
        startDate: a.startOfYesterday,
        endDate: a.endOfYesterday
      };
    }
  }, {
    label: "This Week",
    range: function() {
      return {
        startDate: a.startOfWeek,
        endDate: a.endOfWeek
      };
    }
  }, {
    label: "Last Week",
    range: function() {
      return {
        startDate: a.startOfLastWeek,
        endDate: a.endOfLastWeek
      };
    }
  }, {
    label: "This Month",
    range: function() {
      return {
        startDate: a.startOfMonth,
        endDate: a.endOfMonth
      };
    }
  }, {
    label: "Last Month",
    range: function() {
      return {
        startDate: a.startOfLastMonth,
        endDate: a.endOfLastMonth
      };
    }
  }]);
  u.defaultStaticRanges = b;
  var $ = [{
    label: "days up to today",
    range: function(t) {
      return {
        startDate: (0, d.default)(a.startOfToday, (Math.max(Number(t), 1) - 1) * -1),
        endDate: a.endOfToday
      };
    },
    getCurrentValue: function(t) {
      return (0, s.default)(t.endDate, a.endOfToday) ? t.startDate ? (0, o.default)(a.endOfToday, t.startDate) + 1 : "∞" : "-";
    }
  }, {
    label: "days starting today",
    range: function(t) {
      var r = /* @__PURE__ */ new Date();
      return {
        startDate: r,
        endDate: (0, d.default)(r, Math.max(Number(t), 1) - 1)
      };
    },
    getCurrentValue: function(t) {
      return (0, s.default)(t.startDate, a.startOfToday) ? t.endDate ? (0, o.default)(t.endDate, a.startOfToday) + 1 : "∞" : "-";
    }
  }];
  return u.defaultInputRanges = $, u;
}
export {
  F as __require
};
